Skip to content

Commit

Permalink
Merge pull request #85 from BrendanParmer/v3.0
Browse files Browse the repository at this point in the history
V3.0
  • Loading branch information
BrendanParmer authored Jan 28, 2024
2 parents 7bd92df + 8c6968f commit 50af817
Show file tree
Hide file tree
Showing 20 changed files with 3,966 additions and 1,500 deletions.
37 changes: 23 additions & 14 deletions __init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,27 @@
"name": "Node to Python",
"description": "Convert Blender node groups to a Python add-on!",
"author": "Brendan Parmer",
"version": (2, 2, 0),
"version": (3, 0, 0),
"blender": (3, 0, 0),
"location": "Node",
"category": "Node",
}

if "bpy" in locals():
import importlib
importlib.reload(materials)
importlib.reload(geo_nodes)
importlib.reload(compositor)
importlib.reload(geometry)
importlib.reload(material)
importlib.reload(options)
else:
from . import materials
from . import geo_nodes
from . import compositor
from . import geometry
from . import material
from . import options

import bpy


class NodeToPythonMenu(bpy.types.Menu):
bl_idname = "NODE_MT_node_to_python"
bl_label = "Node To Python"
Expand All @@ -33,17 +36,23 @@ def draw(self, context):
layout.operator_context = 'INVOKE_DEFAULT'




classes = [NodeToPythonMenu,
#options
options.NTPOptions,
geo_nodes.GeoNodesToPython,
geo_nodes.SelectGeoNodesMenu,
geo_nodes.GeoNodesToPythonPanel,
materials.MaterialToPython,
materials.SelectMaterialMenu,
materials.MaterialToPythonPanel,
options.NTPOptionsPanel
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
material.operator.NTPMaterialOperator,
material.ui.NTPMaterialMenu,
material.ui.NTPMaterialPanel,
]

def register():
Expand Down
11 changes: 11 additions & 0 deletions compositor/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
if "bpy" in locals():
import importlib
importlib.reload(node_settings)
importlib.reload(operator)
importlib.reload(ui)
else:
from . import node_settings
from . import operator
from . import ui

import bpy
Loading

0 comments on commit 50af817

Please sign in to comment.