[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [13795] trunk/blender/source/blender/src/ poselib.c: PoseLib Preview - Bugfix:
Joshua Leung
aligorith at gmail.com
Thu Feb 21 12:34:42 CET 2008
Revision: 13795
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=13795
Author: aligorith
Date: 2008-02-21 12:34:39 +0100 (Thu, 21 Feb 2008)
Log Message:
-----------
PoseLib Preview - Bugfix:
PoseLib preview didn't correctly check if a bone was visible or not. Also, the check for when there were no selected bones (thus whole armature is affected) didn't work right.
Modified Paths:
--------------
trunk/blender/source/blender/src/poselib.c
Modified: trunk/blender/source/blender/src/poselib.c
===================================================================
--- trunk/blender/source/blender/src/poselib.c 2008-02-21 11:14:21 UTC (rev 13794)
+++ trunk/blender/source/blender/src/poselib.c 2008-02-21 11:34:39 UTC (rev 13795)
@@ -647,6 +647,7 @@
/* apply this achan? */
if (achan->ipo) {
/* find a keyframe at this frame - users may not have defined the pose on every channel, so this is necessary */
+ // TODO: this may be bad for user-defined poses...
for (icu= achan->ipo->curve.first; icu; icu= icu->next) {
BezTriple *bezt;
int i;
@@ -666,10 +667,17 @@
pchan= get_pose_channel(pose, achan->name);
if (pchan) {
- short ok;
+ short ok= 0;
- ok= (pchan->bone) ? (pchan->bone->flag & (BONE_SELECTED|BONE_ACTIVE)) : 0;
- ok= (ok || pld->selcount) ? 1 : 0;
+ if (pchan->bone) {
+ if ( (pchan->bone->flag & (BONE_SELECTED|BONE_ACTIVE)) &&
+ (pchan->bone->flag & BONE_HIDDEN_P)==0 )
+ ok = 1;
+ else if (pld->selcount == 0)
+ ok= 1;
+ }
+ else if (pld->selcount == 0)
+ ok= 1;
if (ok) {
/* Evaluates and sets the internal ipo values */
More information about the Bf-blender-cvs
mailing list