Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoshua Leung <aligorith@gmail.com>2007-12-02 08:50:38 +0300
committerJoshua Leung <aligorith@gmail.com>2007-12-02 08:50:38 +0300
commit77e6a2ba8657f06c49df2ca8971d06434a163c2b (patch)
tree8cd97090cd7763934f19f474c53e398d0302cce5 /source/blender/src/poseobject.c
parent1e32ec2000ef2e50a93d2934f4692c7a88e59ac5 (diff)
== Bone Path Drawing - More Tweaks Again ==
Bugfixes: * "Clear Paths" change from last commit wasn't complete yet. Now it REALLY only clears the paths of the selected bones * Button layout in "Armature Visualisation" panel has been reorganised a bit to better present the options (clearer separation between Display and Calculation buttons) New Stuff (Yay!): * Paths of active bones now draw more visibly than those of unselected bones. This makes it easier to identify the path that is taken by the bone * The part of path on the current frame is now drawn in green (the same shade that is used for the current-frame line in the Animation Editors). This nicely blends between the black and blue parts of the path (before and after current frame, respectively), and looks much nicer. * The colour of the current-frame marker in the Animation Editors and the 3D-View, are now theme-colours. This is needed to make the previous option work.
Diffstat (limited to 'source/blender/src/poseobject.c')
-rw-r--r--source/blender/src/poseobject.c32
1 files changed, 17 insertions, 15 deletions
diff --git a/source/blender/src/poseobject.c b/source/blender/src/poseobject.c
index fe7dd0109e1..6a2fdac1e85 100644
--- a/source/blender/src/poseobject.c
+++ b/source/blender/src/poseobject.c
@@ -253,33 +253,33 @@ void pose_calculate_path(Object *ob)
DAG_object_update_flags(G.scene, ob, screen_view3d_layers());
/* malloc the path blocks */
- for(pchan= ob->pose->chanbase.first; pchan; pchan= pchan->next) {
- if(pchan->bone && (pchan->bone->flag & BONE_SELECTED)) {
- if(arm->layer & pchan->bone->layer) {
+ for (pchan= ob->pose->chanbase.first; pchan; pchan= pchan->next) {
+ if ((pchan->bone) && (pchan->bone->flag & BONE_SELECTED)) {
+ if (arm->layer & pchan->bone->layer) {
pchan->pathlen= efra-sfra+1;
pchan->pathsf= sfra;
pchan->pathef= efra+1;
- if(pchan->path)
+ if (pchan->path)
MEM_freeN(pchan->path);
pchan->path= MEM_callocN(3*pchan->pathlen*sizeof(float), "pchan path");
}
}
}
- for(CFRA=sfra; CFRA<=efra; CFRA++) {
+ for (CFRA=sfra; CFRA<=efra; CFRA++) {
/* do all updates */
- for(base= FIRSTBASE; base; base= base->next) {
- if(base->object->recalc) {
+ for (base= FIRSTBASE; base; base= base->next) {
+ if (base->object->recalc) {
int temp= base->object->recalc;
object_handle_update(base->object);
base->object->recalc= temp;
}
}
- for(pchan= ob->pose->chanbase.first; pchan; pchan= pchan->next) {
- if(pchan->bone && (pchan->bone->flag & BONE_SELECTED)) {
- if(arm->layer & pchan->bone->layer) {
- if(pchan->path) {
+ for (pchan= ob->pose->chanbase.first; pchan; pchan= pchan->next) {
+ if (pchan->bone && (pchan->bone->flag & BONE_SELECTED)) {
+ if (arm->layer & pchan->bone->layer) {
+ if (pchan->path) {
fp= pchan->path+3*(CFRA-sfra);
if (arm->pathflag & ARM_PATH_HEADS) {
@@ -307,14 +307,16 @@ void pose_clear_paths(Object *ob)
{
bPoseChannel *pchan;
- if(ob==NULL || ob->pose==NULL)
+ if (ob==NULL || ob->pose==NULL)
return;
/* free the path blocks */
for (pchan= ob->pose->chanbase.first; pchan; pchan= pchan->next) {
- if (pchan->path) {
- MEM_freeN(pchan->path);
- pchan->path= NULL;
+ if ((pchan->bone) && (pchan->bone->flag & BONE_SELECTED)) {
+ if (pchan->path) {
+ MEM_freeN(pchan->path);
+ pchan->path= NULL;
+ }
}
}