Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSpivak Vladimir (cwolf3d) <cwolf3d@gmail.com>2019-09-13 18:35:38 +0300
committerSpivak Vladimir (cwolf3d) <cwolf3d@gmail.com>2019-09-13 18:35:38 +0300
commitfb3a669c750facb8e90215bab43280bfa0899204 (patch)
tree5d4c1e26f9b88f7e8e11f15225525b3493bfe819 /curve_tools
parenta95d8d5ecee68830007b62fbbd4c948b886a8e21 (diff)
Curve Tools 2: Fixed not save panel location
Diffstat (limited to 'curve_tools')
-rw-r--r--curve_tools/PathFinder.py8
-rw-r--r--curve_tools/__init__.py11
2 files changed, 11 insertions, 8 deletions
diff --git a/curve_tools/PathFinder.py b/curve_tools/PathFinder.py
index 801c5293..adc76cba 100644
--- a/curve_tools/PathFinder.py
+++ b/curve_tools/PathFinder.py
@@ -241,14 +241,9 @@ class PathFinder(bpy.types.Operator):
subtype = 'XYZ')
handlers = []
-
- def __init__(self):
- self.report({'INFO'}, "ESC or TAB - cancel")
-
- def __del__(self):
- self.report({'INFO'}, "PathFinder deactivated")
def execute(self, context):
+ self.report({'INFO'}, "ESC or TAB - cancel")
bpy.ops.object.mode_set(mode = 'EDIT')
# color change in the panel
@@ -266,6 +261,7 @@ class PathFinder(bpy.types.Operator):
pass
for handler in self.handlers:
self.handlers.remove(handler)
+ self.report({'INFO'}, "PathFinder deactivated")
return {'CANCELLED'}
if event.type in {'X', 'DEL'}: # Cancel
diff --git a/curve_tools/__init__.py b/curve_tools/__init__.py
index 04d63c09..09b1c410 100644
--- a/curve_tools/__init__.py
+++ b/curve_tools/__init__.py
@@ -447,7 +447,7 @@ class CurveAddonPreferences(AddonPreferences):
category: StringProperty(
name="Tab Category",
description="Choose a name for the category of the panel",
- default="Tools",
+ default="CurveTools",
update=update_panel
)
@@ -485,7 +485,6 @@ classes = cad.operators + toolpath.operators + exports.operators + [
Operators.OperatorSplinesRemoveZeroSegment,
Operators.OperatorSplinesRemoveShort,
Operators.OperatorSplinesJoinNeighbouring,
- VIEW3D_PT_CurvePanel,
SeparateOutline,
Operators.ConvertSelectedFacesToBezier,
Operators.ConvertBezierToSurface,
@@ -527,6 +526,9 @@ def register():
for cls in classes:
bpy.utils.register_class(cls)
+
+ for panel in panels:
+ bpy.utils.register_class(panel)
auto_loft.register()
@@ -537,6 +539,8 @@ def register():
bpy.types.TOPBAR_MT_file_export.append(menu_file_export)
bpy.types.Scene.curvetools = bpy.props.PointerProperty(type=CurveTools2Settings)
+
+ update_panel(None, bpy.context)
def unregister():
@@ -555,6 +559,9 @@ def unregister():
bpy.types.TOPBAR_MT_file_export.remove(menu_file_export)
+ for panel in panels:
+ bpy.utils.unregister_class(panel)
+
for cls in classes:
bpy.utils.unregister_class(cls)