Skip to content

Commit a9e8770

Browse files
committed
fix: no longer set out-of-date settings that share a name with another attribute
1 parent 5d60e06 commit a9e8770

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

ntp_operator.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -295,14 +295,18 @@ def _set_settings_defaults(self, node: Node) -> None:
295295
attr_name = setting.name
296296
st = setting.st
297297

298+
is_version_valid = (bpy.app.version >= setting.min_version and
299+
bpy.app.version < setting.max_version)
298300
if not hasattr(node, attr_name):
299-
if (bpy.app.version >= setting.min_version and
300-
bpy.app.version < setting.max_version):
301+
if is_version_valid:
301302
self.report({'WARNING'},
302303
f"NodeToPython: Couldn't find attribute "
303304
f"\"{attr_name}\" for node {node.name} of type "
304305
f"{node.bl_idname}")
305306
continue
307+
elif not is_version_valid:
308+
continue
309+
306310
attr = getattr(node, attr_name, None)
307311
if attr is None:
308312
continue

0 commit comments

Comments
 (0)