- remove deprecated pose channel members

- change short -> char for flags that support it.
- add pose 'temp' pointer to use for outliner drawing (was using 'prev' and restoring which seems dodjy)
This commit is contained in:
Campbell Barton 2011-09-16 02:42:50 +00:00
parent a6c15d6199
commit 862aababb3
7 changed files with 10 additions and 30 deletions

@ -621,7 +621,7 @@ def pycontext2sphinx(BASEPATH):
file.close()
def pyrna_enum2sphinx(prop, use_empty_descriptions=True):
def pyrna_enum2sphinx(prop, use_empty_descriptions=False):
""" write a bullet point list of enum + descrptons
"""

@ -524,7 +524,6 @@ void copy_pose (bPose **dst, bPose *src, int copycon)
if (copycon) {
copy_constraints(&listb, &pchan->constraints, TRUE); // copy_constraints NULLs listb
pchan->constraints= listb;
pchan->path= NULL; // XXX remove this line when the new motionpaths are ready... (depreceated code)
pchan->mpath= NULL; /* motion paths should not get copied yet... */
}
@ -595,17 +594,12 @@ void free_pose_channels_hash(bPose *pose)
void free_pose_channel(bPoseChannel *pchan)
{
// XXX this case here will need to be removed when the new motionpaths are ready
if (pchan->path) {
MEM_freeN(pchan->path);
pchan->path= NULL;
}
if (pchan->mpath) {
animviz_free_motionpath(pchan->mpath);
pchan->mpath= NULL;
}
free_constraints(&pchan->constraints);
if (pchan->prop) {

@ -1483,7 +1483,6 @@ static void pose_proxy_synchronize(Object *ob, Object *from, int layer_protected
pchanw.next= pchan->next;
pchanw.parent= pchan->parent;
pchanw.child= pchan->child;
pchanw.path= NULL;
/* this is freed so copy a copy, else undo crashes */
if(pchanw.prop) {

@ -3967,7 +3967,6 @@ static void direct_link_pose(FileData *fd, bPose *pose)
direct_link_motionpath(fd, pchan->mpath);
pchan->iktree.first= pchan->iktree.last= NULL;
pchan->path= NULL;
/* incase this value changes in future, clamp else we get undefined behavior */
CLAMP(pchan->rotmode, ROT_MODE_MIN, ROT_MODE_MAX);

@ -473,7 +473,7 @@ static void outliner_add_object_contents(SpaceOops *soops, TreeElement *te, Tree
ten= outliner_add_element(soops, &tenla->subtree, ob, tenla, TSE_POSE_CHANNEL, a);
ten->name= pchan->name;
ten->directdata= pchan;
pchan->prev= (bPoseChannel *)ten;
pchan->temp= (void *)ten;
if(pchan->constraints.first) {
//Object *target;
@ -506,19 +506,13 @@ static void outliner_add_object_contents(SpaceOops *soops, TreeElement *te, Tree
pchan= (bPoseChannel *)ten->directdata;
if(pchan->parent) {
BLI_remlink(&tenla->subtree, ten);
par= (TreeElement *)pchan->parent->prev;
par= (TreeElement *)pchan->parent->temp;
BLI_addtail(&par->subtree, ten);
ten->parent= par;
}
}
ten= nten;
}
/* restore prev pointers */
pchan= ob->pose->chanbase.first;
if(pchan) pchan->prev= NULL;
for(; pchan; pchan= pchan->next) {
if(pchan->next) pchan->next->prev= pchan;
}
}
/* Pose Groups */

@ -188,18 +188,13 @@ typedef struct bPoseChannel {
char name[32]; /* Channels need longer names than normal blender objects */
short flag; /* dynamic, for detecting transform changes */
short constflag; /* for quick detecting which constraints affect this channel */
short ikflag; /* settings for IK bones */
short selectflag; /* copy of bone flag, so you can work with library armatures, not for runtime use */
short protectflag; /* protect channels from being transformed */
short agrp_index; /* index of action-group this bone belongs to (0 = default/no group) */
// XXX depreceated.... old animation system (armature only viz) ----
int pathlen; /* for drawing paths, the amount of frames */
int pathsf; /* for drawing paths, the start frame number */
int pathef; /* for drawing paths, the end frame number */
// XXX end of depreceated code -------------------------------------
char constflag; /* for quick detecting which constraints affect this channel */
char selectflag; /* copy of bone flag, so you can work with library armatures, not for runtime use */
char pad0[6];
struct Bone *bone; /* set on read file or rebuild pose */
struct bPoseChannel *parent; /* set on read file or rebuild pose */
struct bPoseChannel *child; /* set on read file or rebuild pose, the 'ik' child, for b-bones */
@ -233,7 +228,7 @@ typedef struct bPoseChannel {
float ikrotweight; /* weight of joint rotation constraint */
float iklinweight; /* weight of joint stretch constraint */
float *path; /* totpath x 3 x float */ // XXX depreceated... old animation system (armature only viz)
void *temp; /* use for outliner */
} bPoseChannel;

@ -110,7 +110,6 @@ void game_copy_pose(bPose **dst, bPose *src, int copy_constraint)
for (pchan=(bPoseChannel*)out->chanbase.first; pchan; pchan=(bPoseChannel*)pchan->next) {
pchan->parent= (bPoseChannel*)BLI_ghash_lookup(ghash, pchan->parent);
pchan->child= (bPoseChannel*)BLI_ghash_lookup(ghash, pchan->child);
pchan->path= NULL;
if (copy_constraint) {
ListBase listb;