Support linked collections used as input in a Geometry Nodes modifier
Add support for linked collections that are used as input in a Geometry Nodes modifier. This requires iterating over the geometry nodes modifier settings, which consists of ID properties. If such an ID property is of type `IDP_ID`, its pointer is followed and the pointed-to datablock + its library are visited. This following of pointers happens in the 'expand' phase, which was only done for linked library blend files. Since this commit, the old behaviour of simply looping over all non-`DATA` datablocks of the to-be-packed blend file is not enough, and datablock expansion is done for all local datablocks as well.
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -436,6 +436,34 @@ class DepsTest(AbstractTracerTest):
|
||||
},
|
||||
)
|
||||
|
||||
def test_geometry_nodes_modifier_input(self):
|
||||
"""Test linked collection as input to geom nodes modifier.
|
||||
|
||||
Here a Geometry Nodes modifier references a collection that is not
|
||||
instanced into the scene, which caused it to be missed.
|
||||
"""
|
||||
self.assert_deps(
|
||||
"geometry-nodes-2/shot_file.blend",
|
||||
{
|
||||
b"LIset_file.blend": Expect(
|
||||
type="Library",
|
||||
full_field="name[1024]",
|
||||
dirname_field=None,
|
||||
basename_field=None,
|
||||
asset_path=b"//set_file.blend",
|
||||
is_sequence=False,
|
||||
),
|
||||
b"LIlib_trash.blend": Expect(
|
||||
type="Library",
|
||||
full_field="name[1024]",
|
||||
dirname_field=None,
|
||||
basename_field=None,
|
||||
asset_path=b"//lib_trash.blend",
|
||||
is_sequence=False,
|
||||
),
|
||||
},
|
||||
)
|
||||
|
||||
def test_usage_abspath(self):
|
||||
deps = [
|
||||
dep
|
||||
|
||||
Reference in New Issue
Block a user