RNA: properly tag 'embedded' ID pointers as owned.
This is important at several level, mainly for overrides currently. Note that this also includes shape keys, since from RNA point of view those are also 'embedded' (they are not editable, not linkable, ...).
This commit is contained in:
@@ -1534,6 +1534,8 @@ static void rna_def_curve(BlenderRNA *brna)
|
||||
|
||||
prop = RNA_def_property(srna, "shape_keys", PROP_POINTER, PROP_NONE);
|
||||
RNA_def_property_pointer_sdna(prop, NULL, "key");
|
||||
RNA_def_property_override_flag(prop, PROPOVERRIDE_OVERRIDABLE_LIBRARY);
|
||||
RNA_def_property_clear_flag(prop, PROP_PTR_NO_OWNERSHIP);
|
||||
RNA_def_property_ui_text(prop, "Shape Keys", "");
|
||||
|
||||
prop = RNA_def_property(srna, "splines", PROP_COLLECTION, PROP_NONE);
|
||||
|
||||
@@ -382,6 +382,8 @@ static void rna_def_lattice(BlenderRNA *brna)
|
||||
|
||||
prop = RNA_def_property(srna, "shape_keys", PROP_POINTER, PROP_NONE);
|
||||
RNA_def_property_pointer_sdna(prop, NULL, "key");
|
||||
RNA_def_property_override_flag(prop, PROPOVERRIDE_OVERRIDABLE_LIBRARY);
|
||||
RNA_def_property_clear_flag(prop, PROP_PTR_NO_OWNERSHIP);
|
||||
RNA_def_property_ui_text(prop, "Shape Keys", "");
|
||||
|
||||
prop = RNA_def_property(srna, "points", PROP_COLLECTION, PROP_NONE);
|
||||
|
||||
@@ -173,6 +173,7 @@ static void rna_def_light(BlenderRNA *brna)
|
||||
/* nodes */
|
||||
prop = RNA_def_property(srna, "node_tree", PROP_POINTER, PROP_NONE);
|
||||
RNA_def_property_pointer_sdna(prop, NULL, "nodetree");
|
||||
RNA_def_property_clear_flag(prop, PROP_PTR_NO_OWNERSHIP);
|
||||
RNA_def_property_ui_text(prop, "Node Tree", "Node tree for node based lights");
|
||||
|
||||
prop = RNA_def_property(srna, "use_nodes", PROP_BOOLEAN, PROP_NONE);
|
||||
|
||||
@@ -2188,6 +2188,7 @@ static void rna_def_linestyle(BlenderRNA *brna)
|
||||
/* nodes */
|
||||
prop = RNA_def_property(srna, "node_tree", PROP_POINTER, PROP_NONE);
|
||||
RNA_def_property_pointer_sdna(prop, NULL, "nodetree");
|
||||
RNA_def_property_clear_flag(prop, PROP_PTR_NO_OWNERSHIP);
|
||||
RNA_def_property_ui_text(prop, "Node Tree", "Node tree for node-based shaders");
|
||||
|
||||
prop = RNA_def_property(srna, "use_nodes", PROP_BOOLEAN, PROP_NONE);
|
||||
|
||||
@@ -784,6 +784,7 @@ void RNA_def_material(BlenderRNA *brna)
|
||||
/* nodetree */
|
||||
prop = RNA_def_property(srna, "node_tree", PROP_POINTER, PROP_NONE);
|
||||
RNA_def_property_pointer_sdna(prop, NULL, "nodetree");
|
||||
RNA_def_property_clear_flag(prop, PROP_PTR_NO_OWNERSHIP);
|
||||
RNA_def_property_ui_text(prop, "Node Tree", "Node tree for node based materials");
|
||||
|
||||
prop = RNA_def_property(srna, "use_nodes", PROP_BOOLEAN, PROP_NONE);
|
||||
|
||||
@@ -3304,6 +3304,8 @@ static void rna_def_mesh(BlenderRNA *brna)
|
||||
|
||||
prop = RNA_def_property(srna, "shape_keys", PROP_POINTER, PROP_NONE);
|
||||
RNA_def_property_pointer_sdna(prop, NULL, "key");
|
||||
RNA_def_property_override_flag(prop, PROPOVERRIDE_OVERRIDABLE_LIBRARY);
|
||||
RNA_def_property_clear_flag(prop, PROP_PTR_NO_OWNERSHIP);
|
||||
RNA_def_property_ui_text(prop, "Shape Keys", "");
|
||||
|
||||
/* texture space */
|
||||
|
||||
@@ -7490,6 +7490,7 @@ void RNA_def_scene(BlenderRNA *brna)
|
||||
/* Nodes (Compositing) */
|
||||
prop = RNA_def_property(srna, "node_tree", PROP_POINTER, PROP_NONE);
|
||||
RNA_def_property_pointer_sdna(prop, NULL, "nodetree");
|
||||
RNA_def_property_clear_flag(prop, PROP_PTR_NO_OWNERSHIP);
|
||||
RNA_def_property_ui_text(prop, "Node Tree", "Compositing node tree");
|
||||
|
||||
prop = RNA_def_property(srna, "use_nodes", PROP_BOOLEAN, PROP_NONE);
|
||||
@@ -7720,6 +7721,7 @@ void RNA_def_scene(BlenderRNA *brna)
|
||||
RNA_def_property_flag(prop, PROP_NEVER_NULL);
|
||||
RNA_def_property_pointer_sdna(prop, NULL, "master_collection");
|
||||
RNA_def_property_struct_type(prop, "Collection");
|
||||
RNA_def_property_clear_flag(prop, PROP_PTR_NO_OWNERSHIP);
|
||||
RNA_def_property_ui_text(
|
||||
prop,
|
||||
"Collection",
|
||||
|
||||
@@ -42,6 +42,7 @@ static void rna_def_simulation(BlenderRNA *brna)
|
||||
|
||||
prop = RNA_def_property(srna, "node_tree", PROP_POINTER, PROP_NONE);
|
||||
RNA_def_property_pointer_sdna(prop, NULL, "nodetree");
|
||||
RNA_def_property_clear_flag(prop, PROP_PTR_NO_OWNERSHIP);
|
||||
RNA_def_property_ui_text(prop, "Node Tree", "Node tree defining the simulation");
|
||||
|
||||
/* common */
|
||||
|
||||
@@ -1634,6 +1634,7 @@ static void rna_def_texture(BlenderRNA *brna)
|
||||
|
||||
prop = RNA_def_property(srna, "node_tree", PROP_POINTER, PROP_NONE);
|
||||
RNA_def_property_pointer_sdna(prop, NULL, "nodetree");
|
||||
RNA_def_property_clear_flag(prop, PROP_PTR_NO_OWNERSHIP);
|
||||
RNA_def_property_ui_text(prop, "Node Tree", "Node tree for node-based textures");
|
||||
RNA_def_property_update(prop, 0, "rna_Texture_nodes_update");
|
||||
|
||||
|
||||
@@ -236,6 +236,7 @@ void RNA_def_world(BlenderRNA *brna)
|
||||
/* nodes */
|
||||
prop = RNA_def_property(srna, "node_tree", PROP_POINTER, PROP_NONE);
|
||||
RNA_def_property_pointer_sdna(prop, NULL, "nodetree");
|
||||
RNA_def_property_clear_flag(prop, PROP_PTR_NO_OWNERSHIP);
|
||||
RNA_def_property_ui_text(prop, "Node Tree", "Node tree for node based worlds");
|
||||
|
||||
prop = RNA_def_property(srna, "use_nodes", PROP_BOOLEAN, PROP_NONE);
|
||||
|
||||
Reference in New Issue
Block a user