Brushstroke Tools: Initial Version #328

Merged
Simon Thommes merged 229 commits from SimonThommes/blender-studio-tools:brushstroke_tools-initial-version into main 2024-11-06 15:03:47 +01:00
2 changed files with 5 additions and 1 deletions
Showing only changes of commit e7c23bbc91 - Show all commits

View File

@ -1,10 +1,13 @@
from . import utils, icons, settings, ui, draw_tool, ops
import toml
modules = [utils, icons, settings, ui, draw_tool, ops]
def register():
for m in modules:
m.register()
m.register()
manifest = toml.load(f"{utils.get_addon_directory()}/blender_manifest.toml")
utils.addon_version = manifest['version']
SimonThommes marked this conversation as resolved Outdated

Generally it's recommended to unregister in reverse registration order: for m in reversed(modules):

Generally it's recommended to unregister in reverse registration order: `for m in reversed(modules):`
def unregister():
for m in reversed(modules):

View File

@ -36,6 +36,7 @@ class BSBST_OT_new_brushstrokes(bpy.types.Operator):
brushstrokes_object = bpy.data.objects.new(name, brushstrokes_data)
context.collection.objects.link(brushstrokes_object)
brushstrokes_object.visible_shadow = False
brushstrokes_object['BSBST_version'] = utils.addon_version
return brushstrokes_object
def new_flow_object(self, context, name):