Ich versuche, Animation von Blender zu exportieren, hier ist, was ich bisher getan habe: --- Dies ist nur, um Ihnen eine Idee von dem, was ich tue und ich habe hat viel weggelassen, um es kurz zu halten.
--- Wenn es zu verwirrend ist oder wenn es benötigt wird, könnte ich die gesamte Quelle veröffentlichen. die Lage und Drehwerte des Knochens relativExportieren von Keyframes in Blender python
# Get the armature
arm = ob.getData()
# Start at the root bone
for bone in bones:
if not bone.parent:
traceBone(bone)
def traceBone(bone):
# Get the channel for this bone
channel=action.getChannelIpo(bone.name);
# Get the loc x, y, z channels
c_locx=channel[Ipo.OB_LOCX].bezierPoints
frameCount=len(c_locx)
# Write each location frame
for frameIndex in range(frameCount):
frame_x=c_locx[frameIndex].pt
frameTime=int(frame_x[0]-1)
# Write the time of the frame
writeInt(frameTime)
# Write the x, y and z coordinates
writeFloats(frame_x[1], frame_z[1], frame_y[1])
# Iv'e done the same for rotation
c_quatx=channel[Ipo.PO_QUATX].bezierPoints
# Write the quaternion w, x, y and z values
writeFloats(frame_w[1], frame_x[1], frame_z[1], frame_y[1])
# Go through the children
for child in bone.children:
traceBone(child)
Soweit ich das in Ordnung funktioniert alles sagen kann, ist das Problem, dass diese Werte Offsets, Änderung darstellt, aber was brauche ich absolute Werte repräsentiert, es ist Elternteil.
Wie bekomme ich die Position und Drehung relativ zu ihrem Elternteil?
Wow, ich habe Blender Code in einer Weile nicht gesehen. Sie können mehr Erfolg bei http://blenderartists.org/forum/ als hier erhalten. –
Postleitzahl, die Sie haben. Oder Arbeitscode, wenn Sie das Problem gelöst haben. – HaltingState