diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2017-12-18 12:08:22 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2017-12-18 12:08:22 +0300 |
commit | 994648a6741087ae40227037ee87395aa18f5b18 (patch) | |
tree | c75888e9901d85ccaad1ffa0d91f6d6c66803b8f /source/blender/makesrna/intern/rna_armature.c | |
parent | c2ad5e805a4a26e6cc0f7959212f6d8b1285779d (diff) |
RNA: add new property falg for pointers (and collection), 'NO_OWNERSHIP'.
This flag means that the pointer does not 'own' the data it references.
This is the case of nearly all ID RNA pointers (NodeTrees will probably
again be some nasty exception here :( ), but also several other cases.
That kind of information is mandatory for complex processing over whole
data-blocks done in RNA, like some static override tasks (advanced
comparison...).
Diffstat (limited to 'source/blender/makesrna/intern/rna_armature.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_armature.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_armature.c b/source/blender/makesrna/intern/rna_armature.c index 1ec0fd92a67..bbcb583ab39 100644 --- a/source/blender/makesrna/intern/rna_armature.c +++ b/source/blender/makesrna/intern/rna_armature.c @@ -726,6 +726,7 @@ static void rna_def_bone(BlenderRNA *brna) prop = RNA_def_property(srna, "parent", PROP_POINTER, PROP_NONE); RNA_def_property_struct_type(prop, "Bone"); RNA_def_property_pointer_sdna(prop, NULL, "parent"); + RNA_def_property_flag(prop, PROP_PTR_NO_OWNERSHIP); RNA_def_property_ui_text(prop, "Parent", "Parent bone (in same Armature)"); RNA_def_property_update(prop, 0, "rna_Armature_redraw_data"); @@ -733,6 +734,7 @@ static void rna_def_bone(BlenderRNA *brna) prop = RNA_def_property(srna, "children", PROP_COLLECTION, PROP_NONE); RNA_def_property_collection_sdna(prop, NULL, "childbase", NULL); RNA_def_property_struct_type(prop, "Bone"); + RNA_def_property_flag(prop, PROP_PTR_NO_OWNERSHIP); RNA_def_property_ui_text(prop, "Children", "Bones which are children of this bone"); rna_def_bone_common(srna, 0); |