Brushstroke Tools: Initial Version #328
@ -1,10 +1,13 @@
|
|||||||
from . import utils, icons, settings, ui, draw_tool, ops
|
from . import utils, icons, settings, ui, draw_tool, ops
|
||||||
|
import toml
|
||||||
|
|
||||||
modules = [utils, icons, settings, ui, draw_tool, ops]
|
modules = [utils, icons, settings, ui, draw_tool, ops]
|
||||||
|
|
||||||
def register():
|
def register():
|
||||||
for m in modules:
|
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
|
|||||||
|
|
||||||
def unregister():
|
def unregister():
|
||||||
for m in reversed(modules):
|
for m in reversed(modules):
|
||||||
|
@ -36,6 +36,7 @@ class BSBST_OT_new_brushstrokes(bpy.types.Operator):
|
|||||||
brushstrokes_object = bpy.data.objects.new(name, brushstrokes_data)
|
brushstrokes_object = bpy.data.objects.new(name, brushstrokes_data)
|
||||||
context.collection.objects.link(brushstrokes_object)
|
context.collection.objects.link(brushstrokes_object)
|
||||||
brushstrokes_object.visible_shadow = False
|
brushstrokes_object.visible_shadow = False
|
||||||
|
brushstrokes_object['BSBST_version'] = utils.addon_version
|
||||||
return brushstrokes_object
|
return brushstrokes_object
|
||||||
|
|
||||||
def new_flow_object(self, context, name):
|
def new_flow_object(self, context, name):
|
||||||
|
Loading…
Reference in New Issue
Block a user
Generally it's recommended to unregister in reverse registration order:
for m in reversed(modules):