Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add node menu refactoring and some new features #4703

Merged
merged 17 commits into from
Oct 24, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
6 changes: 2 additions & 4 deletions __init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
bl_info = {
"name": "Sverchok",
"author": "sverchok-b3d@ya.ru various authors see https://github.com/nortikin/sverchok/graphs/contributors",
"version": (1, 1, 0),
"version": (1, 2, 0),
"blender": (2, 93, 0),
"location": "Node Editor",
"category": "Node",
Expand All @@ -53,7 +53,7 @@
"tracker_url": "http://www.blenderartists.org/forum/showthread.php?272679"
}

VERSION = 'v1.1.0' # looks like the only way to have custom format for the version
VERSION = 'v1.2.0-alpha' # looks like the only way to have custom format for the version

import sys
import importlib
Expand Down Expand Up @@ -93,10 +93,8 @@ def register():
sv_registration_utils.register_all(imported_modules + node_list)
sverchok.core.init_bookkeeping(__name__)

menu.register()
if reload_event:
data_structure.RELOAD_EVENT = True
menu.reload_menu()


def unregister():
Expand Down
10 changes: 5 additions & 5 deletions core/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
reload_event = False

root_modules = [
"menu", "node_tree", "data_structure", "core",
"node_tree", "data_structure", "core",
"utils", "ui", "nodes", "old_nodes"
]

Expand All @@ -22,10 +22,10 @@

def sv_register_modules(modules):
for m in modules:
if m.__name__ != "sverchok.menu":
if hasattr(m, "register"):
# print("Registering module: {}".format(m.__name__))
m.register()
if hasattr(m, "register"):
# print("Registering module: {}".format(m.__name__))
m.register()


def sv_unregister_modules(modules):
clear_all_socket_cache()
Expand Down
18 changes: 0 additions & 18 deletions dependencies.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,6 @@ def draw_message(box, package, dependencies=None):
scipy_d.message = "SciPy is available"
scipy_d.module = scipy
except ImportError:
scipy_d.message = "sv: SciPy package is not available. Voronoi nodes and RBF-based nodes will not be available."
info(scipy_d.message)
scipy = None

geomdl_d = sv_dependencies["geomdl"] = SvDependency("geomdl", "https://github.com/orbingol/NURBS-Python/tree/master/geomdl")
Expand All @@ -130,8 +128,6 @@ def draw_message(box, package, dependencies=None):
geomdl_d.message = "geomdl package is available"
geomdl_d.module = geomdl
except ImportError:
geomdl_d.message = "sv: geomdl package is not available, some NURBS related nodes will not be available"
info(geomdl_d.message)
geomdl = None

skimage_d = sv_dependencies["skimage"] = SvDependency("scikit-image", "https://scikit-image.org/")
Expand All @@ -141,8 +137,6 @@ def draw_message(box, package, dependencies=None):
skimage_d.message = "SciKit-Image package is available"
skimage_d.module = skimage
except ImportError:
skimage_d.message = "sv: SciKit-Image package is not available; SciKit-based implementation of Marching Cubes and Marching Squares will not be available"
info(skimage_d.message)
skimage = None

mcubes_d = sv_dependencies["mcubes"] = SvDependency("mcubes", "https://github.com/pmneila/PyMCubes")
Expand All @@ -151,8 +145,6 @@ def draw_message(box, package, dependencies=None):
mcubes_d.message = "PyMCubes package is available"
mcubes_d.module = mcubes
except ImportError:
mcubes_d.message = "sv: PyMCubes package is not available. PyMCubes-based implementation of Marching Cubes will not be available"
info(mcubes_d.message)
mcubes = None

circlify_d = sv_dependencies["circlify"] = SvDependency("circlify", "https://github.com/elmotec/circlify")
Expand All @@ -162,8 +154,6 @@ def draw_message(box, package, dependencies=None):
circlify_d.message = "Circlify package is available"
circlify_d.module = circlify
except ImportError:
circlify_d.message = "sv: Circlify package is not available. Circlify node will not be available"
info(circlify_d.message)
circlify = None

freecad_d = sv_dependencies["freecad"] = SvDependency("FreeCAD", "https://www.freecadweb.org/")
Expand All @@ -172,8 +162,6 @@ def draw_message(box, package, dependencies=None):
freecad_d.message = "FreeCAD package is available"
freecad_d.module = FreeCAD
except ImportError:
freecad_d.message = "sv: FreeCAD package is not available, Solids nodes will not be available"
info(freecad_d.message)
FreeCAD = None

cython_d = sv_dependencies["cython"] = SvDependency("Cython", "https://cython.org/")
Expand All @@ -183,8 +171,6 @@ def draw_message(box, package, dependencies=None):
cython_d.message = "Cython package is available"
cython_d.module = Cython
except ImportError:
cython_d.message = "sv: Cython package is not available, Enhanched KDTree search will not be available"
info(cython_d.message)
Cython = None

numba_d = sv_dependencies["numba"] = SvDependency("Numba", "https://numba.pydata.org/")
Expand All @@ -194,8 +180,6 @@ def draw_message(box, package, dependencies=None):
numba_d.message = "Numba package is available"
numba_d.module = numba
except ImportError:
numba_d.message = "sv: Numba package is not available, njit compiled functions will not be available"
info(numba_d.message)
numba = None

pyOpenSubdiv_d = sv_dependencies["pyOpenSubdiv"] = SvDependency("pyOpenSubdiv","https://github.com/GeneralPancakeMSTR/pyOpenSubdivision")
Expand All @@ -205,8 +189,6 @@ def draw_message(box, package, dependencies=None):
pyOpenSubdiv_d.message = "pyOpenSubdiv package is available"
pyOpenSubdiv_d.module = pyOpenSubdiv
except ImportError:
pyOpenSubdiv_d.message = "sv: pyOpenSubdiv package is not available, the Catmull-Clark Subdivision node will not be available"
info(pyOpenSubdiv_d.message)
pyOpenSubdiv = None

good_names = [d.package for d in sv_dependencies.values() if d.module is not None and d.package is not None]
Expand Down
Loading