[Bf-extensions-cvs] SVN commit: /data/svn/bf-extensions [1088] trunk/py/scripts/addons/ io_export_unreal_psk_psa.py: Fixed missing option in export menu for export all actions check box.
John Phan
darkneter at gmail.com
Fri Oct 8 19:57:13 CEST 2010
Revision: 1088
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-extensions&revision=1088
Author: darknet
Date: 2010-10-08 19:57:13 +0200 (Fri, 08 Oct 2010)
Log Message:
-----------
Fixed missing option in export menu for export all actions check box.
Modified Paths:
--------------
trunk/py/scripts/addons/io_export_unreal_psk_psa.py
Modified: trunk/py/scripts/addons/io_export_unreal_psk_psa.py
===================================================================
--- trunk/py/scripts/addons/io_export_unreal_psk_psa.py 2010-10-02 04:06:09 UTC (rev 1087)
+++ trunk/py/scripts/addons/io_export_unreal_psk_psa.py 2010-10-08 17:57:13 UTC (rev 1088)
@@ -763,7 +763,7 @@
uv = [faceUV.uv[i][0],faceUV.uv[i][1]] #OR bottom works better # 24 for cube
#uv = list(faceUV.uv[i]) #30 just cube
else:
- print ("No UVs?")
+ #print ("No UVs?")
uv = [0.0, 0.0]
#print("UV >",uv)
#uv = [0.0, 0.0] #over ride uv that is not fixed
@@ -977,7 +977,7 @@
quat = make_fquat_default(rot_mat.to_quat())
- print ("[[======= FINAL POSITION:", set_position)
+ #print ("[[======= FINAL POSITION:", set_position)
final_parent_id = parent_id
#RG/RE -
@@ -1114,17 +1114,14 @@
print("Exporting all action:",bpy.context.scene.unrealactionexportall)
print("[==== Action list Start====]")
- actionlist = []
-
print("Number of Action set(s):",len(bpy.data.actions))
for action in bpy.data.actions:#current number action sets
print("========>>>>>")
print("Action Name:",action.name)
- actionlist.append(action.name)
- print("Groups:")
- for bone in action.groups:
- print("> Name: ",bone.name)
+ #print("Groups:")
+ #for bone in action.groups:
+ #print("> Name: ",bone.name)
#print(dir(bone))
print("[==== Action list End ====]")
@@ -1144,10 +1141,10 @@
print("[=========================]")
for ActionNLA in bpy.data.actions:
-
+ print("\n==== Action Set ====")
nobone = 0
baction = True
- print("\nChecking actions matching groups with bone names...")
+ #print("\nChecking actions matching groups with bone names...")
#Check if the bone names matches the action groups names
for group in ActionNLA.groups:
for abone in bonenames:
@@ -1157,10 +1154,11 @@
break
#if action groups matches the bones length and names matching the gourps do something
if (len(ActionNLA.groups) == len(bonenames)) and (nobone == len(ActionNLA.groups)):
- print("Action Set found for this Armature Object: Action set Name: ",ActionNLA.name)
+ print("Action Set match: Pass")
baction = True
else:
- print("Action Set does not match for this Armature Object! , Action set Name: " ,ActionNLA.name)
+ print("Action Set match: Fail")
+ print("Action Name:",ActionNLA.name)
baction = False
if baction == True:
@@ -1190,8 +1188,7 @@
#this deal with action export control
if bHaveAction == True:
- print("")
- print("==== Action Set ====")
+
print("Action Name:",action_name)
#look for min and max frame that current set keys
framemin, framemax = act.frame_range
@@ -1452,7 +1449,7 @@
exportmessage = "Export Finish"
-def fs_callback(filename, context, user_setting):
+def fs_callback(filename, context):
#this deal with repeat export and the reset settings
global bonedata, BBCount, nbone, exportmessage
bonedata = []#clear array
@@ -1612,11 +1609,11 @@
#DONE
print ("PSK/PSA Export Complete")
-def write_data(path, context, user_setting):
+def write_data(path, context):
print("//============================")
print("// running psk/psa export...")
print("//============================")
- fs_callback(path, context, user_setting)
+ fs_callback(path, context)
pass
from bpy.props import *
@@ -1669,7 +1666,6 @@
# to the class instance from the operator settings before calling.
filepath = StringProperty(name="File Path", description="Filepath used for exporting the PSA file", maxlen= 1024, default= "")
- use_setting = BoolProperty(name="No Options Yet", description="No Options Yet", default= True)
pskexportbool = BoolProperty(name="Export PSK", description="Export Skeletal Mesh", default= True)
psaexportbool = BoolProperty(name="Export PSA", description="Export Action Set (Animation Data)", default= True)
actionexportall = BoolProperty(name="All Actions", description="This will export all the actions that matches the current armature.", default=False)
@@ -1690,8 +1686,13 @@
else:
bpy.context.scene.unrealexportpsa = False
- write_data(self.filepath, context, self.use_setting)
+ if (self.actionexportall):
+ bpy.context.scene.unrealactionexportall = True
+ else:
+ bpy.context.scene.unrealactionexportall = False
+ write_data(self.filepath, context)
+
self.report({'WARNING', 'INFO'}, exportmessage)
return {'FINISHED'}
@@ -1700,7 +1701,6 @@
wm.add_fileselect(self)
return {'RUNNING_MODAL'}
-
class VIEW3D_PT_unrealtools_objectmode(bpy.types.Panel):
bl_space_type = "VIEW_3D"
bl_region_type = "TOOLS"
@@ -1765,7 +1765,7 @@
print("Exporting ALL...")
default_path = os.path.splitext(bpy.data.filepath)[0] + ".psk"
- fs_callback(default_path, bpy.context, False)
+ fs_callback(default_path, bpy.context)
#self.report({'WARNING', 'INFO'}, exportmessage)
self.report({'INFO'}, exportmessage)
More information about the Bf-extensions-cvs
mailing list