Skip to content

Commit

Permalink
bump version and repackage template
Browse files Browse the repository at this point in the history
  • Loading branch information
BradyAJohnston committed Jan 23, 2024
1 parent dc22bf7 commit 687d17b
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 20 deletions.
41 changes: 22 additions & 19 deletions molecularnodes/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,42 +11,44 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.

from .util.utils import template_install
from . import auto_load
from .io.load import MolecularNodesObjectProperties
from .ui.node_menu import MN_add_node_menu
from .io.mda import _rejuvenate_universe, _sync_universe
import bpy

bl_info = {
"name" : "molecularnodes",
"author" : "Brady Johnston",
"description" : "Toolbox for molecular animations in Blender & Geometry Nodes.",
"blender" : (4, 0, 0),
"version" : (4, 0, 8),
"location" : "Scene Properties -> Molecular Nodes",
"warning" : "",
"doc_url" : "https://bradyajohnston.github.io/MolecularNodes/",
"tracker_url" : "https://github.com/BradyAJohnston/MolecularNodes/issues",
"category" : "Import"
"name": "molecularnodes",
"author": "Brady Johnston",
"description": "Toolbox for molecular animations in Blender & Geometry Nodes.",
"blender": (4, 0, 0),
"version": (4, 0, 9),
"location": "Scene Properties -> Molecular Nodes",
"warning": "",
"doc_url": "https://bradyajohnston.github.io/MolecularNodes/",
"tracker_url": "https://github.com/BradyAJohnston/MolecularNodes/issues",
"category": "Import"
}

import bpy
from . import io
from .io.mda import _rejuvenate_universe, _sync_universe
from .ui.node_menu import MN_add_node_menu
from .io.load import MolecularNodesObjectProperties
from . import auto_load
from .util.utils import template_install

auto_load.init()

universe_funcs = [_sync_universe, _rejuvenate_universe]


def register():
auto_load.register()
bpy.types.NODE_MT_add.append(MN_add_node_menu)
bpy.types.Object.mn = bpy.props.PointerProperty(type=MolecularNodesObjectProperties)
bpy.types.Object.mn = bpy.props.PointerProperty(
type=MolecularNodesObjectProperties)
for func in universe_funcs:
try:
bpy.app.handlers.load_post.append(func)
except ValueError as e:
print(f"Filaed to append {func}, error: {e}.")
template_install()


def unregister():
try:
bpy.types.NODE_MT_add.remove(MN_add_node_menu)
Expand All @@ -63,6 +65,7 @@ def unregister():
# if __name__ == "main":
# register()


# # register won't be called when MN is run as a module
bpy.app.handlers.load_post.append(_rejuvenate_universe)
bpy.app.handlers.save_post.append(_sync_universe)
Binary file modified molecularnodes/assets/template/MolecularNodes.zip
Binary file not shown.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "molecularnodes"
version = "4.0.8"
version = "4.0.9"
description = "Toolbox for molecular animations with Blender and Geometry Nodes."
authors = ["Brady Johnston <[email protected]>"]
license = "MIT"
Expand Down

0 comments on commit 687d17b

Please sign in to comment.