Theodox
February 13, 2019, 8:01pm
1
View in #pipelines on Slack
@mavcart : any experienced FBX SDK users out there?
@bob.w : @meatplowz has written about it a bit
@mavcart : I’m attempting to transfer animation between two FBX’s with the same skeleton, in pure python
@meatplowz : If you are using the SDK it should be as simple as reconnecting the curves from one to the other
“should”
Is this just a different skeletal mesh that shares the same skeleton?
cause if the skeletons are the same then with FBX it shouldnt matter
depending on where you are going with the Animation…
@mavcart : that’s exactly what I’m attempting to do
so i’m extracting curve node instances from one scene’s objects, and then calling ConnectToChannel on them to connect them to the curves of the second scene’s objects
except that doesn’t seem to do anything
nah, i can’t get it to work
i’m reconnecting the curves, but it’s not doing anything whatever i try
i’ve arrived at this point now:
ConnectToChannel returns True, but when i check the FBX, nothing has changed
It’s worth mentioning that when i inspect the values in the incoming animation data, the rotational information being applied to the incoming animation is actually there, and present in the curves i’m reconnecting
i’ve tried disconnecting them from their original parent first, doesn’t work either
@dhruvagovil : @instinct-vfx I ended up just prepending my dev area to the Maya sys path and making sure my imports were relatively the same.
@mavcart : solved it.
since i bothered this channel with the problem i might as well post the solution
@passerby : if you press the plus button beside the chat box you can paste in code snippets complete with syntax highlighting
or you can use triple ticks around text to have it be monospaced
@bob.w : Much easier for folks to copy pasta if its text not pictures.
@mavcart : got it, ill edit one sec
couldn’t add it back in, so it’s a new message
# -- output animation data - create a new curve node if necessary.
curves = []
for i in range(3):
curve = curve_node_in.GetCurve(i)
curves.append(curve)
# -- copying Animation curves from one to the other.
for i in range(3):
curve_node_out.CreateCurve(curve_node_in.GetName(), i)
curve = curve_node_out.GetCurve(i)
curve.CopyFrom(curves[i], True)