[Bf-extensions-cvs] [5638a878] master: Skinify: Fix crash with access from Search and Repeat History

lijenstina noreply at git.blender.org
Fri Jul 21 16:19:08 CEST 2017


Commit: 5638a8783502138500912061dde0e8ee476d7fca
Author: lijenstina
Date:   Fri Jul 21 16:18:18 2017 +0200
Branches: master
https://developer.blender.org/rBA5638a8783502138500912061dde0e8ee476d7fca

Skinify: Fix crash with access from Search and Repeat History

Bumped version to 0.9.2
Fix the issue reported on the IRC:
Setting bl_options to UNDO, INTERNAL since access through
the Search Menu or Repeat History will cause a context
loss and crash
Similar to the solution for the Task 50086

===================================================================

M	object_skinify.py

===================================================================

diff --git a/object_skinify.py b/object_skinify.py
index 4a0b503e..02e7fadd 100644
--- a/object_skinify.py
+++ b/object_skinify.py
@@ -19,7 +19,7 @@
 bl_info = {
     "name": "Skinify Rig",
     "author": "Albert Makac (karab44)",
-    "version": (0, 9, 1),
+    "version": (0, 9, 2),
     "blender": (2, 7, 9),
     "location": "Properties > Bone > Skinify Rig (visible on pose mode only)",
     "description": "Creates a mesh object from selected bones",
@@ -644,12 +644,11 @@ def main(context):
     me.name = mesh_name
 
     # this way we fit mesh and bvh with armature modifier correctly
-
     skin = generate_edges(
-                            me, ob, bone_selection, scale, sknfy.connect_mesh,
-                            sknfy.connect_parents, sknfy.head_ornaments,
-                            sknfy.generate_all, sknfy.thickness, sknfy.finger_thickness
-                            )
+                me, ob, bone_selection, scale, sknfy.connect_mesh,
+                sknfy.connect_parents, sknfy.head_ornaments,
+                sknfy.generate_all, sknfy.thickness, sknfy.finger_thickness
+                )
 
     generate_mesh(ob, size, sknfy.sub_level,
                   sknfy.connect_mesh, sknfy.connect_parents, sknfy.generate_all,
@@ -683,11 +682,15 @@ def main(context):
     return {'FINISHED'}, me
 
 
+# Note: setting bl_options to UNDO, INTERNAL since access through
+# the Search Menu or Repeat History will cause a context loss and crash
+# See a similar problem solution in commit b947810291b1
+
 class BONE_OT_custom_shape(Operator):
-    '''Creates a mesh object at the selected bones positions'''
     bl_idname = "object.skinify_rig"
     bl_label = "Skinify Rig"
-    bl_options = {'REGISTER', 'UNDO'}
+    bl_description = "Creates a mesh object at the selected bones positions"
+    bl_options = {'UNDO', 'INTERNAL'}
 
     @classmethod
     def poll(cls, context):



More information about the Bf-extensions-cvs mailing list