getting ipocurve name for action quats

Scripting in Blender with Python, and working on the API

Moderators: jesterKing, stiv

Post Reply
club_soda
Posts: 0
Joined: Sat Dec 13, 2003 1:34 am

getting ipocurve name for action quats

Post by club_soda »

Gents,

I'm writing some exporter code to export skeleton animation, and I decided to be smart and grab the ipo curves by name instead of index in the ipo. However, it seems that the quaternion ipos Quat{X/Y/Z/W} fail when I attempt to use ipocurve.getName() on them.

Since quat ipocurves are ipocurves with codes 25-28, it seems I can just add them to the name array in the function IpoCurve_getName() ( in python/api2_2x/ipocurve.c). But I'm not sure it is this simple. It seems there are object ipocurvess and action ipocurves; do I need to distinguish between them to figure out what ipocurve name to return? Is there anything else going on that will screw up this simple fix?

Thanks,
Gary

der_ton
Posts: 0
Joined: Mon Oct 20, 2003 1:02 am

Post by der_ton »

I´m having the same problem.
Gary, is there a workaround for Blender2.31? You provided me with some code that worked in 2.28 (a while back on elysiun.com), but it doesn´t work in 2.31 anymore...

Thanks,
Tom

reimpell
Posts: 0
Joined: Wed Oct 01, 2003 5:09 pm

Ipo flaws

Post by reimpell »

der_ton wrote:is there a workaround for Blender2.31?
You can put your old code into a

Code: Select all

try:
  # insert old code
except TypeError:
  # insert code for blender 2.32
block and try to guess Ipo names depending on getNcurves().

Regards,
Michael

der_ton
Posts: 0
Joined: Mon Oct 20, 2003 1:02 am

Post by der_ton »

Yep that´s what I´m doing...
but still I have encountered problems with the "guessing the name of the curve from its index number" method:
http://www.blender.org/modules.php?op=m ... pic&t=2911

breakin
Posts: 0
Joined: Fri Aug 22, 2003 3:33 am

Post by breakin »

I've submitted a patch for this that hopefully gets accepted into the cvs-version of blender later today. It returns names for action-ipos as well as object-ipos. Unless I've missed something obvious it should be there.

Post Reply