Cleanup: defer import until needed

This commit is contained in:
Campbell Barton
2024-10-30 15:16:25 +11:00
parent 74988d9368
commit 6ab0efad41

View File

@@ -26,8 +26,6 @@ from bpy.app.translations import (
pgettext_rpt as rpt_,
)
from nodeitems_builtins import node_tree_group_type
class NodeSetting(PropertyGroup):
value: StringProperty(
@@ -151,6 +149,8 @@ class NODE_OT_add_node(NodeAddOperator, Operator):
@classmethod
def description(cls, _context, properties):
from nodeitems_builtins import node_tree_group_type
nodetype = properties["type"]
if nodetype in node_tree_group_type.values():
for setting in properties.settings: