In the Asset Browser while showing the Current File asset library, we now show a menu to choose between Duplicate or Reuse. This is similar to the menu for external asset libraries, that allows selecting between Link, Append and Append (Reuse Data).
{Append (Reuse Data)} and Reuse should behave as consistent as possible with each other.
Unfortunately we can't currently do a generic duplication in the more asset-specific code. Dupliation is ID type specific and in some cases there also needs to be special handling (e.g. local objects are always duplicated, because otherwise a drop would only transform the object). So the duplication has to happen in the operators executed on dropping.
Basic idea of the patch:
- Only the Asset Browser knows about the option, so it has to let the dragged item know if it wants it to be duplicated or reused on drop.
- On drop, the copy() callback of a drop-box sets a "duplicate" property of the operator, if available, based on what the drag item requests.