Skip to content

Commit 997540f

Browse files
Merge pull request #147 from BrendanParmer/GroupFixes
Group fixes
2 parents 16b8b92 + bcc5304 commit 997540f

File tree

4 files changed

+7
-5
lines changed

4 files changed

+7
-5
lines changed

NodeToPython/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "Node to Python",
33
"description": "Convert Blender node groups to a Python add-on!",
44
"author": "Brendan Parmer",
5-
"version": (3, 3, 1),
5+
"version": (3, 3, 2),
66
"blender": (3, 0, 0),
77
"location": "Node",
88
"category": "Node",

NodeToPython/blender_manifest.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
schema_version = "1.0.0"
22

33
id = "node_to_python"
4-
version = "3.3.1"
4+
version = "3.3.2"
55
name = "Node To Python"
66
tagline = "Turn node groups into Python code"
77
maintainer = "Brendan Parmer <brendanparmer+nodetopython@gmail.com>"

NodeToPython/compositor/operator.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,9 @@ class NTPCompositorOperator(NTP_Operator):
2222
bl_options = {'REGISTER', 'UNDO'}
2323

2424
compositor_name: bpy.props.StringProperty(name="Node Group")
25-
is_scene : bpy.props.BoolProperty(name="Is Scene", description="Blender stores compositing node trees differently for scenes and in groups")
25+
is_scene : bpy.props.BoolProperty(
26+
name="Is Scene",
27+
description="Blender stores compositing node trees differently for scenes and in groups")
2628

2729
def __init__(self):
2830
super().__init__()
@@ -59,7 +61,7 @@ def _initialize_compositor_node_tree(self, ntp_nt, nt_name):
5961
self._write(f"#initialize {nt_name} node group", self._outer_indent_level)
6062
self._write(f"def {ntp_nt.var}_node_group():", self._outer_indent_level)
6163

62-
if ntp_nt.node_tree == self._base_node_tree:
64+
if ntp_nt.node_tree == self._base_node_tree and self.is_scene:
6365
self._write(f"{ntp_nt.var} = {SCENE}.node_tree")
6466
self._write(f"#start with a clean node tree")
6567
self._write(f"for {NODE} in {ntp_nt.var}.nodes:")

docs/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Blender's node-based editors are powerful, yet accessible tools, and I wanted to
1515
* interfacing with other parts of the software or properties of an object
1616

1717
## Supported Versions
18-
NodeToPython v3.3.1 is supported for Blender 3.0 - 4.3 on Windows, macOS, and Linux.
18+
NodeToPython v3.3.2 is supported for Blender 3.0 - 4.3 on Windows, macOS, and Linux.
1919

2020
## Installation
2121
### Blender Extensions Platform

0 commit comments

Comments
 (0)