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>2010-10-08 21:57:13 +0400
committerJohn Phan <darkneter@gmail.com>2010-10-08 21:57:13 +0400
commite5fd9d36abeafe71c44d9f920b21c816cd87b0e5 (patch)
tree7ea3be2b0bc28e66032ab4394507038da01ed0a4 /io_export_unreal_psk_psa.py
parent0e4a36c66512b173b03d76ba5f158dd6e6976b83 (diff)
Fixed missing option in export menu for export all actions check box.
Diffstat (limited to 'io_export_unreal_psk_psa.py')
-rw-r--r--io_export_unreal_psk_psa.py42
1 files changed, 21 insertions, 21 deletions
diff --git a/io_export_unreal_psk_psa.py b/io_export_unreal_psk_psa.py
index 0c7f6dd7..74a34616 100644
--- a/io_export_unreal_psk_psa.py
+++ b/io_export_unreal_psk_psa.py
@@ -763,7 +763,7 @@ def parse_meshes(blender_meshes, psk_file):
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 @@ def parse_bone(blender_bone, psk_file, psa_file, parent_id, is_root_bone, parent
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 @@ def parse_animation(blender_scene, blender_armatures, psa_file):
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 @@ def parse_animation(blender_scene, blender_armatures, psa_file):
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 @@ def parse_animation(blender_scene, blender_armatures, psa_file):
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 @@ def parse_animation(blender_scene, blender_armatures, psa_file):
#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 @@ def parse_animation(blender_scene, blender_armatures, psa_file):
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 @@ def fs_callback(filename, context, user_setting):
#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 @@ class ExportUDKAnimData(bpy.types.Operator):
# 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,7 +1686,12 @@ class ExportUDKAnimData(bpy.types.Operator):
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 @@ class ExportUDKAnimData(bpy.types.Operator):
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 @@ class OBJECT_OT_UnrealExport(bpy.types.Operator):
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)