2858c3b287d7007a6eaf0723562f96b9331d3ea1
When appending e.g. an object, it's generally expected that it is not just appended but also added to the active collection. Something similar happens for adding collections, or just geometry like a mesh data-block. This is called "loose data instantiation" in the source code. Which data is instantiated and how depends on context. Generally, it's best to first do the low-level link or append operation and only afterwards do the instantiation at a higher level where more context is known. For example, when dragging an object asset into the 3D view, it's expected that the object is added to the active collection. When dragging a node group into the node editor that uses an object internally (e.g. as mesh storage), not so much. This patch adds a new `BKE_blendfile_link_append_instantiate_loose` method that does the "default instantiation", i.e. the one we want to happen when using the general link/append operator to import data. Instead of calling this directly from low level `BKE_blendfile_append`, it's now called in `wm_link_append_exec` (and other places where desired). Furthermore, `view3d_ob_drop_copy_external_asset` does not use this anymore, but explicitly adds only the dragged object to the active collection. Some places, e.g. when linking/appending using the Python API, don't do any instantiation at all. They didn't do this before either, but it was way less obvious (it used `BLO_library_link_params_init` instead of `BLO_library_link_params_init_with_context`). Now there is always an explicit call to do instantiation in higher level code. Pull Request: https://projects.blender.org/blender/blender/pulls/125814
…
Blender
Blender is the free and open source 3D creation suite. It supports the entirety of the 3D pipeline-modeling, rigging, animation, simulation, rendering, compositing, motion tracking and video editing.
Project Pages
Development
License
Blender as a whole is licensed under the GNU General Public License, Version 3. Individual files may have a different, but compatible license.
See blender.org/about/license for details.
Description
Languages
C++
78%
Python
14.9%
C
2.9%
GLSL
1.9%
CMake
1.2%
Other
0.9%
