From 99b82dc3a3901909d78eb3e8d67b483669b8e9d9 Mon Sep 17 00:00:00 2001 From: Ryan Inch Date: Fri, 26 Jul 2024 08:24:40 -0400 Subject: [PATCH] Make Blender 4+ nodes default to moving when added. This mimics the behavior of pre-4.0 Blender versions. --- addons/io_hubs_addon/nodes/lightmap.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/addons/io_hubs_addon/nodes/lightmap.py b/addons/io_hubs_addon/nodes/lightmap.py index 84f6d709..7193156e 100644 --- a/addons/io_hubs_addon/nodes/lightmap.py +++ b/addons/io_hubs_addon/nodes/lightmap.py @@ -29,7 +29,9 @@ class NODE_MT_mozilla_hubs_nodes(bpy.types.Menu): def draw(self, context): layout = self.layout - layout.operator("node.add_node", text="MOZ_lightmap settings").type = "moz_lightmap.node" + op = layout.operator("node.add_node", text="MOZ_lightmap settings") + op.type = "moz_lightmap.node" + op.use_transform = True class MozLightmapNode(Node):