[Bf-committers] IPO curve attribute array issues
Ken Hughes
khughes at pacific.edu
Fri Jul 8 18:19:15 CEST 2005
While working on BPython IPO modules, I discovered that order of
entries in the name arrays and value arrays used to represent IPO
curve are not consistent. For example:
from source/blender/src/editipo.c:
char *ac_ic_names[AC_TOTNAM] = {
"LocX", "LocY", "LocZ",
"SizeX", "SizeY", "SizeZ",
"QuatW", "QuatX", "QuatY", "QuatZ"};
from source/blender/blenkernel/intern/ipo.c
int ac_ar[AC_TOTIPO]= {
AC_LOC_X, AC_LOC_Y, AC_LOC_Z,
AC_QUAT_W, AC_QUAT_X, AC_QUAT_Y, AC_QUAT_Z,
AC_SIZE_X, AC_SIZE_Y, AC_SIZE_Z};
I've found two other instances of this as well.
It would be nice (for my code) if ac_ar[index] and
ac_ic_names[index] referred to the same item. Furthermore, I think
this change would make it eathis could clean up some code elsewhere
in editipo.c. For example
name = getname_ob_ei(ob_ar[a], colipo);
strcpy(ei->name, name);
could be replaced with
strcpy (ei->name, ob_ic_names[a] );
Also seems like it would be a good idea to put both of these arrays
in the same file.
Should I code a patch for this? Or is there some underlying thing
I'm not seeing?
Ken
More information about the Bf-committers
mailing list