void BKE_pose_channel_free(bPoseChannel *pchan) { if (pchan->custom) { id_us_min(&pchan->custom->id); pchan->custom = NULL; } if (pchan->mpath) { animviz_free_motionpath(pchan->mpath); pchan->mpath = NULL; } BKE_free_constraints(&pchan->constraints); if (pchan->prop) { IDP_FreeProperty(pchan->prop); MEM_freeN(pchan->prop); } }
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) { IDP_FreeProperty(pchan->prop); MEM_freeN(pchan->prop); } }
/** * Deallocates a pose channel. * Does not free the pose channel itself. */ void BKE_pose_channel_free_ex(bPoseChannel *pchan, bool do_id_user) { if (pchan->custom) { if (do_id_user) { id_us_min(&pchan->custom->id); } pchan->custom = NULL; } if (pchan->mpath) { animviz_free_motionpath(pchan->mpath); pchan->mpath = NULL; } BKE_constraints_free_ex(&pchan->constraints, do_id_user); if (pchan->prop) { IDP_FreeProperty(pchan->prop); MEM_freeN(pchan->prop); } }