diff options
author | Bastien Montagne <mont29> | 2022-08-25 18:21:39 +0300 |
---|---|---|
committer | Bastien Montagne <bastien@blender.org> | 2022-08-25 18:21:39 +0300 |
commit | 500d815478966de6ad509c2e6a73c61fce8513a5 (patch) | |
tree | 32cfbf558ce022a6f37ef01ac658d76c936c5e5d /source/blender/makesrna | |
parent | b27856f12e35b23b5e30443e2647ac76234c2fa7 (diff) |
Fix T100255: Make RigidBodyWorld (and effector_weights) collections refcounted.
Those collections were so far mainly just tagged as fake user (even
though a few places in code already incremented usercount on them).
Since we now clear the fakeuser flag when linking/appending data, ensure
that these collections are preserved by making these usages regular ID
refcounting ones.
Reviewed By: brecht
Differential Revision: https://developer.blender.org/D15783
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r-- | source/blender/makesrna/intern/rna_object_force.c | 2 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_rigidbody.c | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/makesrna/intern/rna_object_force.c b/source/blender/makesrna/intern/rna_object_force.c index 2ed539aa511..40000a49f03 100644 --- a/source/blender/makesrna/intern/rna_object_force.c +++ b/source/blender/makesrna/intern/rna_object_force.c @@ -1276,7 +1276,7 @@ static void rna_def_effector_weight(BlenderRNA *brna) prop = RNA_def_property(srna, "collection", PROP_POINTER, PROP_NONE); RNA_def_property_struct_type(prop, "Collection"); RNA_def_property_pointer_sdna(prop, NULL, "group"); - RNA_def_property_flag(prop, PROP_EDITABLE); + RNA_def_property_flag(prop, PROP_EDITABLE | PROP_ID_REFCOUNT); RNA_def_property_ui_text(prop, "Effector Collection", "Limit effectors to this collection"); RNA_def_property_update(prop, 0, "rna_EffectorWeight_dependency_update"); diff --git a/source/blender/makesrna/intern/rna_rigidbody.c b/source/blender/makesrna/intern/rna_rigidbody.c index 0c1fd8cab3c..7a499d10d3a 100644 --- a/source/blender/makesrna/intern/rna_rigidbody.c +++ b/source/blender/makesrna/intern/rna_rigidbody.c @@ -865,7 +865,7 @@ static void rna_def_rigidbody_world(BlenderRNA *brna) prop = RNA_def_property(srna, "collection", PROP_POINTER, PROP_NONE); RNA_def_property_struct_type(prop, "Collection"); RNA_def_property_pointer_sdna(prop, NULL, "group"); - RNA_def_property_flag(prop, PROP_EDITABLE | PROP_ID_SELF_CHECK); + RNA_def_property_flag(prop, PROP_EDITABLE | PROP_ID_SELF_CHECK | PROP_ID_REFCOUNT); RNA_def_property_override_flag(prop, PROPOVERRIDE_OVERRIDABLE_LIBRARY); RNA_def_property_ui_text( prop, "Collection", "Collection containing objects participating in this simulation"); @@ -873,7 +873,7 @@ static void rna_def_rigidbody_world(BlenderRNA *brna) prop = RNA_def_property(srna, "constraints", PROP_POINTER, PROP_NONE); RNA_def_property_struct_type(prop, "Collection"); - RNA_def_property_flag(prop, PROP_EDITABLE | PROP_ID_SELF_CHECK); + RNA_def_property_flag(prop, PROP_EDITABLE | PROP_ID_SELF_CHECK | PROP_ID_REFCOUNT); RNA_def_property_override_flag(prop, PROPOVERRIDE_OVERRIDABLE_LIBRARY); RNA_def_property_ui_text( prop, "Constraints", "Collection containing rigid body constraint objects"); |