[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [27358] trunk/blender/source/blender/ editors/transform: Bugfix #21508: Hidden bones remain "selected" and are affected by transforms
Joshua Leung
aligorith at gmail.com
Tue Mar 9 09:31:41 CET 2010
Revision: 27358
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=27358
Author: aligorith
Date: 2010-03-09 09:31:41 +0100 (Tue, 09 Mar 2010)
Log Message:
-----------
Bugfix #21508: Hidden bones remain "selected" and are affected by transforms
Made hidden bones get ignored by transform code. This should be quite an old bug...
Modified Paths:
--------------
trunk/blender/source/blender/editors/transform/transform_conversions.c
trunk/blender/source/blender/editors/transform/transform_generics.c
Modified: trunk/blender/source/blender/editors/transform/transform_conversions.c
===================================================================
--- trunk/blender/source/blender/editors/transform/transform_conversions.c 2010-03-09 07:41:27 UTC (rev 27357)
+++ trunk/blender/source/blender/editors/transform/transform_conversions.c 2010-03-09 08:31:41 UTC (rev 27358)
@@ -712,14 +712,14 @@
int hastranslation = 0;
int total = 0;
- for(pchan = ob->pose->chanbase.first; pchan; pchan = pchan->next) {
+ for (pchan = ob->pose->chanbase.first; pchan; pchan = pchan->next) {
bone = pchan->bone;
- if(bone->layer & arm->layer) {
- if((bone->flag & BONE_SELECTED) && !(ob->proxy && pchan->bone->layer & arm->layer_protected))
+ if ((bone->layer & arm->layer) && !(pchan->bone->flag & BONE_HIDDEN_P)) {
+ if ((bone->flag & BONE_SELECTED) && !(ob->proxy && pchan->bone->layer & arm->layer_protected))
bone->flag |= BONE_TRANSFORM;
else
bone->flag &= ~BONE_TRANSFORM;
-
+
bone->flag &= ~BONE_HINGE_CHILD_TRANSFORM;
bone->flag &= ~BONE_TRANSFORM_CHILD;
}
@@ -1068,7 +1068,7 @@
t->total = 0;
for (ebo = edbo->first; ebo; ebo = ebo->next)
{
- if(ebo->layer & arm->layer)
+ if (EBONE_VISIBLE(arm, ebo) && !(ebo->flag & BONE_EDITMODE_LOCKED))
{
if (t->mode==TFM_BONESIZE)
{
@@ -1101,7 +1101,8 @@
{
ebo->oldlength = ebo->length; // length==0.0 on extrude, used for scaling radius of bone points
- if(ebo->layer & arm->layer) {
+ if (EBONE_VISIBLE(arm, ebo) && !(ebo->flag & BONE_EDITMODE_LOCKED))
+ {
if (t->mode==TFM_BONE_ENVELOPE)
{
if (ebo->flag & BONE_ROOTSEL)
Modified: trunk/blender/source/blender/editors/transform/transform_generics.c
===================================================================
--- trunk/blender/source/blender/editors/transform/transform_generics.c 2010-03-09 07:41:27 UTC (rev 27357)
+++ trunk/blender/source/blender/editors/transform/transform_generics.c 2010-03-09 08:31:41 UTC (rev 27358)
@@ -326,7 +326,7 @@
BezTriple *bezt= fcu->bezt;
int i;
- if(bezt==NULL) /* ignore baked */
+ if (bezt==NULL) /* ignore baked */
return 0;
for (i=0; i < fcu->totvert; i++, bezt++) {
@@ -422,11 +422,11 @@
/* now test if there is a need to re-sort */
for (ale= anim_data.first; ale; ale= ale->next) {
FCurve *fcu= (FCurve *)ale->key_data;
-
+
/* ignore unselected fcurves */
- if(!fcu_test_selected(fcu))
+ if (!fcu_test_selected(fcu))
continue;
-
+
// fixme: only do this for selected verts...
ANIM_unit_mapping_apply_fcurve(ac.scene, ale->id, ale->key_data, ANIM_UNITCONV_ONLYSEL|ANIM_UNITCONV_SELVERTS|ANIM_UNITCONV_RESTORE);
@@ -442,7 +442,6 @@
*/
if ((sipo->flag & SIPO_NOREALTIMEUPDATES) == 0)
ANIM_list_elem_update(t->scene, ale);
-
}
/* do resort and other updates? */
@@ -1111,7 +1110,7 @@
if (t->data) {
int a;
- /* since ipokeys are optional on objects, we mallocced them per trans-data */
+ /* free data malloced per trans-data */
for(a=0, td= t->data; a<t->total; a++, td++) {
if (td->flag & TD_BEZTRIPLE)
MEM_freeN(td->hdata);
More information about the Bf-blender-cvs
mailing list