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:
authorTon Roosendaal <ton@blender.org>2005-08-16 14:17:02 +0400
committerTon Roosendaal <ton@blender.org>2005-08-16 14:17:02 +0400
commitb45ecb43efb90fa30bdd3fc5d77fab7b0d7542ef (patch)
tree6eb87f21ef22e1f131de761c848472aaa5b4661e /source/blender/src/transform_generics.c
parentf1609dde1151c8b5645cf142be99a349b0482753 (diff)
New! When weight-painting a Mesh, and select a Bone, you can use transform
options on the Bone (G, R, S). The manipulator doesn't show btw. Is usful to get immediate feedback on how painted weights behave with Bones. Martin; I had to change the T_POSE behaviour in code a bit... it now stores in TransInfo the actual posed armature being transformed. Maybe, some day, we'll get mixed posechannel/object transform? Not much required at the moment though. :)
Diffstat (limited to 'source/blender/src/transform_generics.c')
-rwxr-xr-xsource/blender/src/transform_generics.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/source/blender/src/transform_generics.c b/source/blender/src/transform_generics.c
index 32afcd6ea20..d938b43299d 100755
--- a/source/blender/src/transform_generics.c
+++ b/source/blender/src/transform_generics.c
@@ -142,7 +142,6 @@ static void transform_armature_mirror_update(void)
/* called for objects updating while transform acts, once per redraw */
void recalcData(TransInfo *t)
{
- Object *ob= OBACT;
if (G.obedit) {
if (G.obedit->type == OB_MESH) {
@@ -191,7 +190,8 @@ void recalcData(TransInfo *t)
DAG_object_flush_update(G.scene, G.obedit, OB_RECALC_DATA); /* sets recalc flags */
}
}
- else if(ob && (ob->flag & OB_POSEMODE)) {
+ else if( (t->flag & T_POSE) && t->poseobj) {
+ Object *ob= t->poseobj;
bArmature *arm= ob->data;
/* old optimize trick... this enforces to bypass the depgraph */
@@ -302,10 +302,9 @@ void drawLine(float *center, float *dir, char axis, short options)
void initTrans (TransInfo *t)
{
- Object *ob= OBACT;
/* moving: is shown in drawobject() (transform color) */
- if(G.obedit || (ob && (ob->flag & OB_POSEMODE)) ) G.moving= G_TRANSFORM_EDIT;
+ if(G.obedit || (t->flag & T_POSE) ) G.moving= G_TRANSFORM_EDIT;
else G.moving= G_TRANSFORM_OBJ;
t->data = NULL;
@@ -497,7 +496,7 @@ void calculateCenterCursor(TransInfo *t)
VECCOPY(t->center, cursor);
if(t->flag & (T_EDIT|T_POSE)) {
- Object *ob= G.obedit?G.obedit:OBACT;
+ Object *ob= G.obedit?G.obedit:t->poseobj;
float mat[3][3], imat[3][3];
float vec[3];
@@ -535,7 +534,7 @@ void calculateCenterMedian(TransInfo *t)
VECCOPY(t->center, partial);
if (t->flag & (T_EDIT|T_POSE)) {
- Object *ob= G.obedit?G.obedit:OBACT;
+ Object *ob= G.obedit?G.obedit:t->poseobj;
float vec[3];
VECCOPY(vec, t->center);
@@ -574,7 +573,7 @@ void calculateCenterBound(TransInfo *t)
VecMulf(t->center, 0.5);
if (t->flag & (T_EDIT|T_POSE)) {
- Object *ob= G.obedit?G.obedit:OBACT;
+ Object *ob= G.obedit?G.obedit:t->poseobj;
float vec[3];
VECCOPY(vec, t->center);
@@ -618,7 +617,7 @@ void calculateCenter(TransInfo *t)
/* setting constraint center */
VECCOPY(t->con.center, t->center);
if(t->flag & (T_EDIT|T_POSE)) {
- Object *ob= G.obedit?G.obedit:OBACT;
+ Object *ob= G.obedit?G.obedit:t->poseobj;
Mat4MulVecfl(ob->obmat, t->con.center);
}