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.
This commit is contained in:
Hans Goudey 2020-12-13 22:59:52 -06:00
parent 977ef04746
commit 260fca5d08
Notes: blender-bot 2023-02-14 09:29:42 +01:00
Referenced by issue #83673, Assigning custom tree to geometry node modifier
1 changed files with 2 additions and 4 deletions

View File

@ -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)