Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2019-05-17 14:59:59 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2019-05-17 15:27:13 +0300
commit34d67601b716046cf15f3e808a92bc91d0af804f (patch)
treea6875fadf1c129513a889cba61c6627d1a76e45b /source/blender/makesrna/intern/rna_nodetree.c
parent8b5816e76bbf18246a5e28ec64a8e4c035f15e7a (diff)
Python: Raise an error even NO_MAIN data is assigned to object
The goal is to prevent assignment of temporary or evaluated meshes to objects from the main database. Majority of the change is actually related on passing reports around. On a positive side there are more error prints which can become more visible to scripters. There are still possible further improvements in the related areas. For example, disable user counting for evaluated ID datablocks when assignment happens. But can also happen later on as a separate improvement. Reviewers: brecht, campbellbarton, mont29 Reviewed By: brecht Differential Revision: https://developer.blender.org/D4884
Diffstat (limited to 'source/blender/makesrna/intern/rna_nodetree.c')
-rw-r--r--source/blender/makesrna/intern/rna_nodetree.c20
1 files changed, 15 insertions, 5 deletions
diff --git a/source/blender/makesrna/intern/rna_nodetree.c b/source/blender/makesrna/intern/rna_nodetree.c
index 4906f8ac28e..17072a61bcd 100644
--- a/source/blender/makesrna/intern/rna_nodetree.c
+++ b/source/blender/makesrna/intern/rna_nodetree.c
@@ -814,7 +814,9 @@ static PointerRNA rna_NodeTree_active_node_get(PointerRNA *ptr)
return rna_pointer_inherit_refine(ptr, &RNA_Node, node);
}
-static void rna_NodeTree_active_node_set(PointerRNA *ptr, const PointerRNA value)
+static void rna_NodeTree_active_node_set(struct ReportList *UNUSED(reports),
+ PointerRNA *ptr,
+ const PointerRNA value)
{
bNodeTree *ntree = (bNodeTree *)ptr->data;
bNode *node = (bNode *)value.data;
@@ -1608,7 +1610,9 @@ static IDProperty *rna_Node_idprops(PointerRNA *ptr, bool create)
return node->prop;
}
-static void rna_Node_parent_set(PointerRNA *ptr, PointerRNA value)
+static void rna_Node_parent_set(struct ReportList *UNUSED(reports),
+ PointerRNA *ptr,
+ PointerRNA value)
{
bNode *node = ptr->data;
bNode *parent = value.data;
@@ -2683,7 +2687,9 @@ static void rna_NodeGroup_update(Main *bmain, Scene *UNUSED(scene), PointerRNA *
ED_node_tag_update_nodetree(bmain, ntree, node);
}
-static void rna_NodeGroup_node_tree_set(PointerRNA *ptr, const PointerRNA value)
+static void rna_NodeGroup_node_tree_set(struct ReportList *UNUSED(reports),
+ PointerRNA *ptr,
+ const PointerRNA value)
{
bNodeTree *ntree = ptr->id.data;
bNode *node = ptr->data;
@@ -2791,7 +2797,9 @@ static void rna_Matte_t2_set(PointerRNA *ptr, float value)
chroma->t2 = value;
}
-static void rna_Node_scene_set(PointerRNA *ptr, PointerRNA value)
+static void rna_Node_scene_set(struct ReportList *UNUSED(reports),
+ PointerRNA *ptr,
+ PointerRNA value)
{
bNode *node = (bNode *)ptr->data;
@@ -3345,7 +3353,9 @@ static PointerRNA rna_ShaderNodePointDensity_psys_get(PointerRNA *ptr)
return value;
}
-static void rna_ShaderNodePointDensity_psys_set(PointerRNA *ptr, PointerRNA value)
+static void rna_ShaderNodePointDensity_psys_set(struct ReportList *UNUSED(reports),
+ PointerRNA *ptr,
+ PointerRNA value)
{
bNode *node = ptr->data;
NodeShaderTexPointDensity *shader_point_density = node->storage;