BPY types: add default Geometry Node poll function

Contrary to `CompositorNodeCustomGroup` or `ShaderNodeCustomGroup`,
`GeometryNodeCustomGroups` have to define their own poll function.
This is because their is no predefined poll function for `GeometryNode`,
and it may not be clear for addon developers why `GeometryNode` would
be special here.

This adds `GeometryNode` to `bpy_types.py` and defines such a function
for it like for other builtin node types.

Differential Revision: https://developer.blender.org/D14775
This commit is contained in:
Kévin Dietrich 2022-05-03 17:43:03 +02:00
parent 9fb98735ea
commit 2062116924

@ -1145,3 +1145,11 @@ class TextureNode(NodeInternal):
@classmethod @classmethod
def poll(cls, ntree): def poll(cls, ntree):
return ntree.bl_idname == 'TextureNodeTree' return ntree.bl_idname == 'TextureNodeTree'
class GeometryNode(NodeInternal):
__slots__ = ()
@classmethod
def poll(cls, ntree):
return ntree.bl_idname == 'GeometryNodeTree'