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:
authorGermano Cavalcante <germano.costa@ig.com.br>2021-02-12 04:53:12 +0300
committerGermano Cavalcante <germano.costa@ig.com.br>2021-02-12 04:53:12 +0300
commitca40d35086be8e527755e09a1fc88c970e93fb6b (patch)
treee29234e6fc42999e9c7b23669135281f6aa3d1ee /mesh_snap_utilities_line
parent393c978bad7193cd01827b45ae79b6407411d1df (diff)
Fix mesh_snap_utilities_line crash when closing blender
When the tool is active and the blender is closed, the `GizmoGroup` type object is freed keeping some invalid RNA members. This is probably an internal error, but for now just work around this error by starting the object name with '_' since "RNA can't start with a "_",".
Diffstat (limited to 'mesh_snap_utilities_line')
-rw-r--r--mesh_snap_utilities_line/widgets.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/mesh_snap_utilities_line/widgets.py b/mesh_snap_utilities_line/widgets.py
index 9879bef7..6c011b7a 100644
--- a/mesh_snap_utilities_line/widgets.py
+++ b/mesh_snap_utilities_line/widgets.py
@@ -164,11 +164,11 @@ class SnapWidgetGroupCommon(bpy.types.GizmoGroup):
return context_mode_check(context, cls.bl_idname)
def init_tool(self, context, gizmo_name):
- self.widget = self.gizmos.new(gizmo_name)
+ self._widget = self.gizmos.new(gizmo_name)
def __del__(self):
- if hasattr(self, "widget"):
- object.__getattribute__(self.widget, 'end_snapwidget')()
+ if hasattr(self, "_widget"):
+ object.__getattribute__(self._widget, 'end_snapwidget')()
class SnapPointWidgetGroup(SnapWidgetGroupCommon):