when try to read .apk action but find some trouble...
is it a Bone_Matrix bug happen ?or build action in wrong way
main code
Code: Select all
Q_x = ba.readFloat()
Q_y = ba.readFloat()
Q_z = ba.readFloat()
Q_w = ba.readFloat()
Q_read = mathutils.Quaternion((Q_w,Q_x,Q_y,Q_z))
bpy.data.objects[BONE_hierarchy_name].pose.bones[bonename].rotation_quaternion = Q_read.inverted()
some simple pose works,like :
charater "ネル ダガー"(cp0305_b01a) Motion: viewer_Daggercp0305_b01a
home_t_stance (T-Pose)
but a lot of action is just look like the gameplay,inaccurate
here is a spin action
====
edit:fix the W-xyz,Thank akderebur.
edit2:fix read location_XYZ move,:the reading way mark by "03 05 04",now it's active.and fix the Blender .iqe plugin(2012-12-2),sorry to author "Tor Andersson".directly,ban "has_v0" (about curmesh) in line633
Code: Select all
has_v0 = False#len(iqmodel.meshes[0].v0) > 0
now some .iqe model don't make bug when import into Blender,like cp0005_b01a(ベルダ,gunner),cp0108_b01a(フィア) ...etc
sadly,find more problems:1.Bone_Matrix bug,all Bead user character,like cp0110_b01a, the bone "R:at_W08Be" use 2 bone_matrix
reading Bone way marking "FF 07 02 02" ?(not sure) have some
A.location[0,-90.86,0] scale[1,1,1]
B.
Code: Select all
[0.93457,0,0, 0]
[0,0.93457,0, -2.3]
[0,0,0.93457, 0]
when use animation,the bone use location[0,-90.86/0.93457,0] as origin_point,in another word=copy parent_bone "R:POS_Pad2" bone_matrix.check in action"viewer_Beadscp0110_b01a_unpack" (character:マーヴェル)and "viewer_BeadsFemale_unpack"
pic up later ==
cp005,bone of lash or bone of eye may lack of some animation
cp0110,マーヴェル
NOT SSR female character who use bead(magic_ball) as weapon have a default action"viewer_BeadsFemale_unpack" .
if.not fix bone"R:at_W08Be"
change it's bone_matrix = it's parent_bone's bone_matrix
cp0110's action in view_room
(have fix reading euler_rotation way marking"02 07 08", one of the skirt bone,"R:XD_SLska_01" use it )
=====
edit3:fix location_move marking"03 00 01", "03 00 02","03 00 03"
(mainly be used in bone[R:POS_ROOT] to control charater's X,Z. in bone[R:Hips] to control Y ,example:FemaleKnuckle_unpack xxx.aaf)
fix euler_rotation way marking"03 05 08"
and,In default, euler_rotation data translate to quternion "WXYZ". it's convenient for Blender NLA_editor .
now,majority RUSH action('s location_moving) should be worked,except for some action use 6 byte/Frame rotation data.