Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
93 commits
Select commit Hold shift + click to select a range
54a5b9e
feat: new method of adding compositor nodes
BrendanParmer Sep 21, 2025
f5317e4
feat: geometry nodes ui port, refactor module registration
BrendanParmer Oct 1, 2025
4c1d966
feat: shader nodes ui port
BrendanParmer Oct 1, 2025
f007356
cleanup: add ntp prefix to some scene properties
BrendanParmer Oct 1, 2025
3739248
feat: add ui for adding world, linestyle, and light nodes
BrendanParmer Oct 1, 2025
1d26074
refactor: class renamings, fix bug on some slot removal operators
BrendanParmer Oct 4, 2025
d80318a
refactor: more descriptive option names/tooltips
BrendanParmer Oct 4, 2025
cc81659
fix: bring back group defaults and node sizes
BrendanParmer Oct 4, 2025
05f798f
refactor: move menu to its own file, rename options file
BrendanParmer Oct 5, 2025
b2d4c65
refactor: main menu naming consistency
BrendanParmer Oct 5, 2025
4c24ec0
cleanup: remove unnecessary menu class
BrendanParmer Oct 5, 2025
96946a3
feat: reorganize options panel
BrendanParmer Oct 5, 2025
a866f24
feat: shrink default ui list size
BrendanParmer Oct 5, 2025
afdc8c8
feat: new export button and node group gatherer class
BrendanParmer Oct 5, 2025
9362e7b
feat: button actually exports node groups
BrendanParmer Oct 5, 2025
42e80d5
Merge pull request #175 from BrendanParmer/UIImprovements
BrendanParmer Oct 5, 2025
a42ff82
other: version bump to 4.0.0
BrendanParmer Oct 5, 2025
0d734a8
tools: add tool to package up NodeToPython
BrendanParmer Oct 5, 2025
4f62378
Merge pull request #177 from BrendanParmer/PackageTool
BrendanParmer Oct 5, 2025
d8df5d4
tools: add new 5.0 setting types
BrendanParmer Oct 8, 2025
404f2ca
feat: initial 5.0 settings changes
BrendanParmer Oct 8, 2025
8ac67f9
feat: add new 5.0 zones
BrendanParmer Oct 10, 2025
84a83fe
feat: 5.0+ scenes use compositing_node_group instead of node_tree
BrendanParmer Oct 12, 2025
28db2d5
feat: bundles and closures support
BrendanParmer Oct 12, 2025
6f6e4d5
feat: handle field to grid items
BrendanParmer Oct 12, 2025
0c4c852
feat: handle geometry viewer items
BrendanParmer Oct 12, 2025
5f791f8
feat: add compositor file output items
BrendanParmer Oct 12, 2025
d9170e9
refactor: use settings_str instead of recreating each time
BrendanParmer Oct 12, 2025
389975f
feat: add display and view settings
BrendanParmer Oct 12, 2025
c4d7d4a
feat: add viewer auto remove property
BrendanParmer Oct 15, 2025
275f61c
fix: handle dimensions for vector default tree sockets
BrendanParmer Oct 15, 2025
f467e9a
feat: add optional label socket attribute
BrendanParmer Oct 15, 2025
6ed4edc
feat: add use_wait_for_click and show_modifier_manager_panel flags to…
BrendanParmer Oct 15, 2025
810ef43
feat: material.use_nodes is now only set pre-Blender 5.0
BrendanParmer Oct 15, 2025
e0ec191
Merge pull request #181 from BrendanParmer/Blender-5.0
BrendanParmer Oct 15, 2025
b6ffb19
refactor: separate out material-specific functionality
BrendanParmer Oct 16, 2025
55e5939
refactor: cleanup material creation function
BrendanParmer Oct 16, 2025
f083ea4
feat: handle node groups
BrendanParmer Oct 16, 2025
36bbd11
feat: basic light export
BrendanParmer Oct 16, 2025
7883282
feat: create basic linestyle
BrendanParmer Oct 18, 2025
5f78036
feat: create basic world
BrendanParmer Oct 18, 2025
c18a26b
Merge pull request #182 from BrendanParmer/ShaderNodeGroupsDev
BrendanParmer Oct 18, 2025
80a4298
other: bump blender max version warning, cleanup
BrendanParmer Oct 20, 2025
f3d3e6b
refactor: separate out bl_info and import statement functions
BrendanParmer Oct 20, 2025
b1d1779
fix: typo with show_modifier_manage_panel
BrendanParmer Oct 20, 2025
f176eee
cleanup: better warnings
BrendanParmer Oct 20, 2025
0dc4c05
feat: option to link essential node groups rather than recreating them
BrendanParmer Oct 20, 2025
92d3e2f
Merge pull request #183 from BrendanParmer/EssentialNodeGroups
BrendanParmer Oct 21, 2025
c78e4c9
feat: ui improvements
BrendanParmer Oct 21, 2025
4caf9d5
refactor: separate operator from nodetree export logic
BrendanParmer Nov 8, 2025
318f6c0
feat: basic multiple node group export
BrendanParmer Nov 8, 2025
725a308
refactor: easier group type enum handling
BrendanParmer Nov 12, 2025
9fcfc62
fix: multiple export now takes into account tree dependencies
BrendanParmer Nov 12, 2025
e07cba9
fix: dependency issues, some unsafe refs
BrendanParmer Nov 15, 2025
6177f14
cleanup: remove debug prints
BrendanParmer Nov 15, 2025
ea0ed44
fix: some addon mode export bugs
BrendanParmer Nov 15, 2025
8732ddf
refactor: use NodeTreeInfo in exporter constructor
BrendanParmer Nov 15, 2025
5151038
refactor: import modules just once at beginning of each base export
BrendanParmer Nov 15, 2025
7f61c31
fix: clean up generated class names
BrendanParmer Nov 15, 2025
21b9027
fix: separate node tree generation from operator
BrendanParmer Nov 15, 2025
d249202
refactor: input socket default value
BrendanParmer Nov 15, 2025
71fcb0a
fix: string safety
BrendanParmer Nov 16, 2025
3850fca
cleanup: remove old/unnecessary code
BrendanParmer Nov 16, 2025
cac57ad
fix: group type now correctly identifies objects
BrendanParmer Nov 16, 2025
5a8d0b3
fix: object node trees
BrendanParmer Nov 16, 2025
fefb8c7
fix: WIP on module imports in addon mode
BrendanParmer Nov 16, 2025
afc0152
fix: move to using dictionary of node tree names instead of globals
BrendanParmer Nov 16, 2025
4a17620
fix: dependency creation order
BrendanParmer Nov 16, 2025
c824cd9
fix: guarantee that dependency order is preserved
BrendanParmer Nov 16, 2025
f15f0b1
fix: script mode node tree creation and misc. errors
BrendanParmer Nov 16, 2025
74fbb7e
fix: bug where subtree group types went uninitialized
BrendanParmer Nov 16, 2025
deac069
fix: some library issues
BrendanParmer Nov 16, 2025
8da80a7
fix: more library issues
BrendanParmer Nov 17, 2025
fcb3faf
fix: object dependency node group module names
BrendanParmer Nov 17, 2025
5da4ba7
fix: library linking in addon mode
BrendanParmer Nov 17, 2025
e319483
refactor: cleanup, get rid of unnecessary code
BrendanParmer Nov 17, 2025
7952fc7
Merge pull request #185 from BrendanParmer/MultipleNodeGroups
BrendanParmer Nov 17, 2025
2aa6ead
feat: add view center to node trees
BrendanParmer Nov 17, 2025
e7f4dd5
fix: remove read-only attribute
BrendanParmer Nov 17, 2025
0c0974c
feat: add more settings for materials, lights, linestyles, and worlds
BrendanParmer Nov 17, 2025
e54724f
feat: add more scene settings
BrendanParmer Nov 17, 2025
d4b11d1
Merge pull request #186 from BrendanParmer/ObjectEnhancements
BrendanParmer Nov 17, 2025
67fc52b
v4.0: deprecate Blender < 4.2
BrendanParmer Nov 18, 2025
1e61119
v4.0: update node settings and script for < 4.2 deprecation
BrendanParmer Nov 18, 2025
c8200e4
v4.0: remove vestigial bl_info
BrendanParmer Nov 18, 2025
4773621
v4.0: blender 4.2 compatibility
BrendanParmer Nov 18, 2025
b80cfda
fix: better save message
BrendanParmer Nov 18, 2025
21caf5a
fix: scene references
BrendanParmer Nov 18, 2025
c0fa119
fix: light attribute versioning
BrendanParmer Nov 18, 2025
5523c79
fix: function name collision with exporting multiple objects of the s…
BrendanParmer Nov 18, 2025
fe9db3d
docs: update README
BrendanParmer Nov 18, 2025
8178779
config: clean string returns the word empty on empty strings
BrendanParmer Nov 18, 2025
205eb6a
docs: update README
BrendanParmer Nov 18, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
81 changes: 22 additions & 59 deletions NodeToPython/__init__.py
Original file line number Diff line number Diff line change
@@ -1,71 +1,34 @@
bl_info = {
"name": "Node to Python",
"description": "Convert Blender node groups to a Python add-on!",
"author": "Brendan Parmer",
"version": (3, 5, 1),
"blender": (3, 0, 0),
"location": "Node",
"category": "Node",
}

if "bpy" in locals():
import importlib
importlib.reload(compositor)
importlib.reload(geometry)
importlib.reload(shader)
importlib.reload(options)
importlib.reload(export)
importlib.reload(ui)
else:
from . import compositor
from . import geometry
from . import shader
from . import options

from . import export
from . import ui
import bpy


class NodeToPythonMenu(bpy.types.Menu):
bl_idname = "NODE_MT_node_to_python"
bl_label = "Node To Python"

@classmethod
def poll(cls, context):
return True

def draw(self, context):
layout = self.layout.column_flow(columns=1)
layout.operator_context = 'INVOKE_DEFAULT'


classes = [
NodeToPythonMenu,
#options
options.NTPOptions,
options.NTPOptionsPanel,
#compositor
compositor.operator.NTPCompositorOperator,
compositor.ui.NTPCompositorScenesMenu,
compositor.ui.NTPCompositorGroupsMenu,
compositor.ui.NTPCompositorPanel,
#geometry
geometry.operator.NTPGeoNodesOperator,
geometry.ui.NTPGeoNodesMenu,
geometry.ui.NTPGeoNodesPanel,
#material
shader.operator.NTPShaderOperator,
shader.ui.NTPShaderMenu,
shader.ui.NTPShaderPanel,
]
modules = []
for parent_module in [export, ui]:
if hasattr(parent_module, "modules"):
modules += parent_module.modules
else:
raise Exception(f"Module {parent_module} does not have list of modules")

def register():
for cls in classes:
bpy.utils.register_class(cls)
scene = bpy.types.Scene
scene.ntp_options = bpy.props.PointerProperty(type=options.NTPOptions)
for module in modules:
if hasattr(module, "classes"):
for cls in getattr(module, "classes"):
bpy.utils.register_class(cls)
if hasattr(module, "register_props"):
getattr(module, "register_props")()

def unregister():
for cls in classes:
bpy.utils.unregister_class(cls)
del bpy.types.Scene.ntp_options
for module in modules:
if hasattr(module, "classes"):
for cls in getattr(module, "classes"):
bpy.utils.unregister_class(cls)
if hasattr(module, "unregister_props"):
getattr(module, "unregister_props")()

if __name__ == "__main__":
register()
2 changes: 1 addition & 1 deletion NodeToPython/blender_manifest.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
schema_version = "1.0.0"

id = "node_to_python"
version = "3.5.1"
version = "4.0.0"
name = "Node To Python"
tagline = "Turn node groups into Python code"
maintainer = "Brendan Parmer <brendanparmer+nodetopython@gmail.com>"
Expand Down
9 changes: 0 additions & 9 deletions NodeToPython/compositor/__init__.py

This file was deleted.

283 changes: 0 additions & 283 deletions NodeToPython/compositor/operator.py

This file was deleted.

Loading