블렌더에서 애니메이션을 내보내려고합니다. 여기까지 한 내용은
입니다. 이것은 내가하고있는 일에 대한 아이디어를 제공하기위한 것입니다. 짧게 유지하기 위해 많이 버렸습니다.
--- 너무 혼란 스럽거나 필요한 경우 전체 소스를 게시 할 수 있습니다.블렌더 파이썬에서 키 프레임 내보내기
# 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)
지금까지 내가 모두 잘 작동이 말할 수있는, 문제는 이러한 값의 변화를 나타내는 오프셋 (offset), 하지만 내가 필요로하는 것은 그것의에 뼈의 위치와 회전 값을 나타내는 절대 값이라는 것이다 부모의.
부모에 대한 상대적인 위치 및 순환 게재는 어떻게합니까?
와우, 잠시 동안 블렌더 코드를 보지 못했습니다. http://blenderartists.org/forum/에서보다 많은 성공을 얻을 수 있습니다. –
코드를 게시하십시오. 또는 문제를 해결 한 경우 작업 코드. – HaltingState