[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [40248] trunk/blender: - remove deprecated pose channel members
Campbell Barton
ideasman42 at gmail.com
Fri Sep 16 04:42:51 CEST 2011
Revision: 40248
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=40248
Author: campbellbarton
Date: 2011-09-16 02:42:50 +0000 (Fri, 16 Sep 2011)
Log Message:
-----------
- 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)
Modified Paths:
--------------
trunk/blender/doc/python_api/sphinx_doc_gen.py
trunk/blender/source/blender/blenkernel/intern/action.c
trunk/blender/source/blender/blenkernel/intern/armature.c
trunk/blender/source/blender/blenloader/intern/readfile.c
trunk/blender/source/blender/editors/space_outliner/outliner_tree.c
trunk/blender/source/blender/makesdna/DNA_action_types.h
trunk/blender/source/gameengine/Converter/BL_ArmatureObject.cpp
Modified: trunk/blender/doc/python_api/sphinx_doc_gen.py
===================================================================
--- trunk/blender/doc/python_api/sphinx_doc_gen.py 2011-09-16 02:08:00 UTC (rev 40247)
+++ trunk/blender/doc/python_api/sphinx_doc_gen.py 2011-09-16 02:42:50 UTC (rev 40248)
@@ -621,7 +621,7 @@
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
"""
Modified: trunk/blender/source/blender/blenkernel/intern/action.c
===================================================================
--- trunk/blender/source/blender/blenkernel/intern/action.c 2011-09-16 02:08:00 UTC (rev 40247)
+++ trunk/blender/source/blender/blenkernel/intern/action.c 2011-09-16 02:42:50 UTC (rev 40248)
@@ -524,7 +524,6 @@
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_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) {
Modified: trunk/blender/source/blender/blenkernel/intern/armature.c
===================================================================
--- trunk/blender/source/blender/blenkernel/intern/armature.c 2011-09-16 02:08:00 UTC (rev 40247)
+++ trunk/blender/source/blender/blenkernel/intern/armature.c 2011-09-16 02:42:50 UTC (rev 40248)
@@ -1483,7 +1483,6 @@
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) {
Modified: trunk/blender/source/blender/blenloader/intern/readfile.c
===================================================================
--- trunk/blender/source/blender/blenloader/intern/readfile.c 2011-09-16 02:08:00 UTC (rev 40247)
+++ trunk/blender/source/blender/blenloader/intern/readfile.c 2011-09-16 02:42:50 UTC (rev 40248)
@@ -3967,7 +3967,6 @@
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);
Modified: trunk/blender/source/blender/editors/space_outliner/outliner_tree.c
===================================================================
--- trunk/blender/source/blender/editors/space_outliner/outliner_tree.c 2011-09-16 02:08:00 UTC (rev 40247)
+++ trunk/blender/source/blender/editors/space_outliner/outliner_tree.c 2011-09-16 02:42:50 UTC (rev 40248)
@@ -473,7 +473,7 @@
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 @@
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 */
Modified: trunk/blender/source/blender/makesdna/DNA_action_types.h
===================================================================
--- trunk/blender/source/blender/makesdna/DNA_action_types.h 2011-09-16 02:08:00 UTC (rev 40247)
+++ trunk/blender/source/blender/makesdna/DNA_action_types.h 2011-09-16 02:42:50 UTC (rev 40248)
@@ -188,18 +188,13 @@
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 @@
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;
Modified: trunk/blender/source/gameengine/Converter/BL_ArmatureObject.cpp
===================================================================
--- trunk/blender/source/gameengine/Converter/BL_ArmatureObject.cpp 2011-09-16 02:08:00 UTC (rev 40247)
+++ trunk/blender/source/gameengine/Converter/BL_ArmatureObject.cpp 2011-09-16 02:42:50 UTC (rev 40248)
@@ -110,7 +110,6 @@
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;
More information about the Bf-blender-cvs
mailing list