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:
authorKévin Dietrich <kevin.dietrich@mailoo.org>2022-05-03 18:43:03 +0300
committerKévin Dietrich <kevin.dietrich@mailoo.org>2022-05-03 18:43:03 +0300
commit20621169244db1d5bad46b4bb8765ff37ff8ba01 (patch)
treefb84832d60babe85a3722faf99458dc9b8b38f99 /release/scripts/modules/bpy_types.py
parent9fb98735ea1a308925d87255b826bc54dffbfdab (diff)
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
Diffstat (limited to 'release/scripts/modules/bpy_types.py')
-rw-r--r--release/scripts/modules/bpy_types.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/release/scripts/modules/bpy_types.py b/release/scripts/modules/bpy_types.py
index b3f0c055769..4c6e2508859 100644
--- a/release/scripts/modules/bpy_types.py
+++ b/release/scripts/modules/bpy_types.py
@@ -1145,3 +1145,11 @@ class TextureNode(NodeInternal):
@classmethod
def poll(cls, ntree):
return ntree.bl_idname == 'TextureNodeTree'
+
+
+class GeometryNode(NodeInternal):
+ __slots__ = ()
+
+ @classmethod
+ def poll(cls, ntree):
+ return ntree.bl_idname == 'GeometryNodeTree'