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
path: root/source
diff options
context:
space:
mode:
authorLukas Toenne <lukas.toenne@googlemail.com>2013-05-14 15:18:45 +0400
committerLukas Toenne <lukas.toenne@googlemail.com>2013-05-14 15:18:45 +0400
commite4921a9664b481e3cc6743733f461383392f3017 (patch)
tree3fd69efdd6437cbab6823dc40ab75e59f8ead9ed /source
parentbbea18f8c1d81e11ae5b1859b3d52eba818fbb3b (diff)
"Fix" for #35336. Added a warning in the doc string for nodetree.nodes.new() to point users at the recent API change from node.type enum identifiers to the generic node.bl_idname strings. Not really nice, but could prevent a few bug reports and make scripters' lifes easier.
Diffstat (limited to 'source')
-rw-r--r--source/blender/makesrna/intern/rna_nodetree.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/source/blender/makesrna/intern/rna_nodetree.c b/source/blender/makesrna/intern/rna_nodetree.c
index d05692f9abc..6238e3f7d3d 100644
--- a/source/blender/makesrna/intern/rna_nodetree.c
+++ b/source/blender/makesrna/intern/rna_nodetree.c
@@ -6888,7 +6888,10 @@ static void rna_def_nodetree_nodes_api(BlenderRNA *brna, PropertyRNA *cprop)
func = RNA_def_function(srna, "new", "rna_NodeTree_node_new");
RNA_def_function_ui_description(func, "Add a node to this node tree");
RNA_def_function_flag(func, FUNC_USE_CONTEXT | FUNC_USE_REPORTS);
- parm = RNA_def_string(func, "type", "", MAX_NAME, "Type", "Type of node to add");
+ /* XXX warning note should eventually be removed,
+ * added this here to avoid frequent confusion with API changes from "type" to "bl_idname"
+ */
+ parm = RNA_def_string(func, "type", "", MAX_NAME, "Type", "Type of node to add (Warning: should be same as node.bl_idname, not node.type!)");
RNA_def_property_flag(parm, PROP_REQUIRED);
/* return value */
parm = RNA_def_pointer(func, "node", "Node", "", "New node");