[Bf-blender-cvs] [260fca5d08e] master: Fix T83673: Custom node trees selectable in nodes modifier

Hans Goudey noreply at git.blender.org
Mon Dec 14 06:00:14 CET 2020


Commit: 260fca5d08e2f95e1b600a9c76a98dedd2541e10
Author: Hans Goudey
Date:   Sun Dec 13 22:59:52 2020 -0600
Branches: master
https://developer.blender.org/rB260fca5d08e2f95e1b600a9c76a98dedd2541e10

Fix T83673: Custom node trees selectable in nodes modifier

Node tree types from addons were selectable in the modifier's drop-down.
Obviously they didn't do anything, but it shouldn't be possible anyway.
This was just caused by an unimplemented poll function.

===================================================================

M	source/blender/makesrna/intern/rna_modifier.c

===================================================================

diff --git a/source/blender/makesrna/intern/rna_modifier.c b/source/blender/makesrna/intern/rna_modifier.c
index 80c2cbfb3ad..c32cc89aa30 100644
--- a/source/blender/makesrna/intern/rna_modifier.c
+++ b/source/blender/makesrna/intern/rna_modifier.c
@@ -1603,12 +1603,10 @@ static int rna_MeshSequenceCacheModifier_read_velocity_get(PointerRNA *ptr)
 #  endif
 }
 
-static bool rna_NodesModifier_node_group_poll(PointerRNA *ptr, PointerRNA value)
+static bool rna_NodesModifier_node_group_poll(PointerRNA *UNUSED(ptr), PointerRNA value)
 {
-  NodesModifierData *nmd = ptr->data;
   bNodeTree *ntree = value.data;
-  UNUSED_VARS(nmd, ntree);
-  return true;
+  return ntree->type == NTREE_GEOMETRY;
 }
 
 static void rna_NodesModifier_node_group_update(Main *bmain, Scene *scene, PointerRNA *ptr)



More information about the Bf-blender-cvs mailing list