Cleanup: defer importing nodeitems_utils (missed last commit)
This commit is contained in:
parent
3515036319
commit
27dcccb20f
|
@ -20,7 +20,6 @@
|
|||
from __future__ import annotations
|
||||
|
||||
import bpy
|
||||
import nodeitems_utils
|
||||
from bpy.types import (
|
||||
Operator,
|
||||
PropertyGroup,
|
||||
|
@ -195,6 +194,8 @@ class NODE_OT_add_search(NodeAddOperator, Operator):
|
|||
|
||||
# Create an enum list from node items
|
||||
def node_enum_items(self, context):
|
||||
import nodeitems_utils
|
||||
|
||||
enum_items = NODE_OT_add_search._enum_item_hack
|
||||
enum_items.clear()
|
||||
|
||||
|
@ -210,6 +211,8 @@ class NODE_OT_add_search(NodeAddOperator, Operator):
|
|||
|
||||
# Look up the item based on index
|
||||
def find_node_item(self, context):
|
||||
import nodeitems_utils
|
||||
|
||||
node_item = int(self.node_item)
|
||||
for index, item in enumerate(nodeitems_utils.node_items_iter(context)):
|
||||
if index == node_item:
|
||||
|
|
Loading…
Reference in New Issue