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:
authorJohn Phan <darkneter@gmail.com>2011-06-21 01:29:36 +0400
committerJohn Phan <darkneter@gmail.com>2011-06-21 01:29:36 +0400
commit5a00d2f14022a060ea84f5e198a65bc765ea2b28 (patch)
tree671677b82cab0a31d1e3bb3587ec50e7acaafc53 /io_export_unreal_psk_psa.py
parent6e371ae57053e1f0cd480555a9e8849796f89fa8 (diff)
added some features to able to delete first index action set and remove all mesh vertex weight selected mesh.
Diffstat (limited to 'io_export_unreal_psk_psa.py')
-rw-r--r--io_export_unreal_psk_psa.py28
1 files changed, 27 insertions, 1 deletions
diff --git a/io_export_unreal_psk_psa.py b/io_export_unreal_psk_psa.py
index 0d62bb12..a02357d6 100644
--- a/io_export_unreal_psk_psa.py
+++ b/io_export_unreal_psk_psa.py
@@ -1528,7 +1528,7 @@ def fs_callback(filename, context):
start_time = time.clock()
print ("========EXPORTING TO UNREAL SKELETAL MESH FORMATS========\r\n")
- print("Blender Version:", bpy.app.version_string)
+ print("Blender Version:", bpy.app.version[1],"-")
psk = PSKFile()
psa = PSAFile()
@@ -1952,6 +1952,8 @@ class VIEW3D_PT_unrealtools_objectmode(bpy.types.Panel):
layout.operator(OBJECT_OT_UTRebuildArmature.bl_idname)
layout.operator(OBJECT_OT_UTRebuildMesh.bl_idname)
layout.operator(OBJECT_OT_ToggleConsle.bl_idname)
+ layout.operator(OBJECT_OT_DeleteActionSet.bl_idname)
+ layout.operator(OBJECT_OT_MeshClearWeights.bl_idname)
class OBJECT_OT_UnrealExport(bpy.types.Operator):
global exportmessage
@@ -2030,6 +2032,30 @@ class OBJECT_OT_UTSelectedFaceSmooth(bpy.types.Operator):
print("----------------------------------------")
return{'FINISHED'}
+class OBJECT_OT_DeleteActionSet(bpy.types.Operator):
+ bl_idname = "object.deleteactionset" # XXX, name???
+ bl_label = "Delete Action Set"
+ __doc__ = """It will remove the first top of the index of the action list. It used for unable to delete action set."""
+
+ def invoke(self, context, event):
+ if len(bpy.data.actions) > 0:
+ bpy.data.actions[0].user_clear()
+ bpy.data.actions.remove( bpy.data.actions[0])
+ return{'FINISHED'}
+
+class OBJECT_OT_MeshClearWeights(bpy.types.Operator):
+ bl_idname = "object.meshclearweights" # XXX, name???
+ bl_label = "Mesh Clear Weights"
+ __doc__ = """Clear selected mesh vertex group weights for the bones. Be sure you unparent the armature."""
+
+ def invoke(self, context, event):
+ for obj in bpy.data.objects:
+ if obj.type == 'MESH' and obj.select == True:
+ for vg in obj.vertex_groups:
+ obj.vertex_groups.remove(vg)
+ break
+ return{'FINISHED'}
+
class OBJECT_OT_UTRebuildArmature(bpy.types.Operator):
bl_idname = "object.utrebuildarmature" # XXX, name???
bl_label = "Rebuild Armature"