diff options
-rw-r--r-- | source/blender/blenkernel/BKE_effect.h | 2 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/effect.c | 9 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/softbody.c | 2 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_object_types.h | 1 | ||||
-rw-r--r-- | source/blender/src/drawarmature.c | 43 | ||||
-rwxr-xr-x | source/blender/src/transform_conversions.c | 7 |
6 files changed, 34 insertions, 30 deletions
diff --git a/source/blender/blenkernel/BKE_effect.h b/source/blender/blenkernel/BKE_effect.h index 9ebafdff3e4..c68d4b8b10e 100644 --- a/source/blender/blenkernel/BKE_effect.h +++ b/source/blender/blenkernel/BKE_effect.h @@ -57,7 +57,7 @@ void build_particle_system(struct Object *ob); /* particle deflector */ #define PE_WIND_AS_SPEED 0x00000001 -struct ListBase *pdInitEffectors(unsigned int layer); +struct ListBase *pdInitEffectors(struct Object *ob); void pdEndEffectors(struct ListBase *lb); void pdDoEffectors(struct ListBase *lb, float *opco, float *force, float *speed, float cur_time, float loc_time, unsigned int flags); diff --git a/source/blender/blenkernel/intern/effect.c b/source/blender/blenkernel/intern/effect.c index dd759ea035b..021f0c7dc63 100644 --- a/source/blender/blenkernel/intern/effect.c +++ b/source/blender/blenkernel/intern/effect.c @@ -324,18 +324,19 @@ typedef struct pEffectorCache { /* returns ListBase handle with objects taking part in the effecting */ -ListBase *pdInitEffectors(unsigned int layer) +ListBase *pdInitEffectors(Object *obsrc) { static ListBase listb={NULL, NULL}; + unsigned int layer= obsrc->lay; Base *base; for(base = G.scene->base.first; base; base= base->next) { - if( (base->lay & layer) && base->object->pd) { + if( (base->lay & layer) && base->object->pd && base->object!=obsrc) { Object *ob= base->object; PartDeflect *pd= ob->pd; if(pd->forcefield == PFIELD_GUIDE) { - if(ob->type==OB_CURVE) { + if(ob->type==OB_CURVE && obsrc->type==OB_MESH) { /* guides only do mesh particles */ Curve *cu= ob->data; if(cu->flag & CU_PATH) { if(cu->path==NULL || cu->path->data==NULL) @@ -1647,7 +1648,7 @@ void build_particle_system(Object *ob) } /* get the effectors */ - effectorbase= pdInitEffectors(ob->lay); + effectorbase= pdInitEffectors(ob); /* init geometry, return is 6 x float * me->totvert in size */ vertexcosnos= (VeNoCo *)mesh_get_mapped_verts_nors(ob); diff --git a/source/blender/blenkernel/intern/softbody.c b/source/blender/blenkernel/intern/softbody.c index 418751839ec..e45368a1f4a 100644 --- a/source/blender/blenkernel/intern/softbody.c +++ b/source/blender/blenkernel/intern/softbody.c @@ -542,7 +542,7 @@ static void softbody_calc_forces(Object *ob, float forcetime) /* check! */ do_deflector= is_there_deflection(ob->lay); - do_effector= pdInitEffectors(ob->lay); + do_effector= pdInitEffectors(ob); iks = 1.0f/(1.0f-sb->inspring)-1.0f ;/* inner spring constants function */ bproot= sb->bpoint; /* need this for proper spring addressing */ diff --git a/source/blender/makesdna/DNA_object_types.h b/source/blender/makesdna/DNA_object_types.h index 4a9a4bf1784..1d16015a628 100644 --- a/source/blender/makesdna/DNA_object_types.h +++ b/source/blender/makesdna/DNA_object_types.h @@ -393,6 +393,7 @@ extern Object workob; #define OB_LOCK_LOCX 1 #define OB_LOCK_LOCY 2 #define OB_LOCK_LOCZ 4 +#define OB_LOCK_LOC 7 #define OB_LOCK_ROTX 8 #define OB_LOCK_ROTY 16 #define OB_LOCK_ROTZ 32 diff --git a/source/blender/src/drawarmature.c b/source/blender/src/drawarmature.c index fc02d18c655..8834fa52514 100644 --- a/source/blender/src/drawarmature.c +++ b/source/blender/src/drawarmature.c @@ -1467,27 +1467,28 @@ static void draw_pose_channels(Base *base, int dt) if(G.vd->zbuf) glDisable(GL_DEPTH_TEST); for(pchan= ob->pose->chanbase.first; pchan; pchan= pchan->next) { - - if (arm->flag & (ARM_EDITMODE|ARM_POSEMODE)) { - bone= pchan->bone; - if(bone->flag & BONE_SELECTED) BIF_ThemeColor(TH_TEXT_HI); - else BIF_ThemeColor(TH_TEXT); - } - else if(dt > OB_WIRE) BIF_ThemeColor(TH_TEXT); - - if (arm->flag & ARM_DRAWNAMES){ - VecMidf(vec, pchan->pose_head, pchan->pose_tail); - glRasterPos3fv(vec); - BMF_DrawString(G.font, " "); - BMF_DrawString(G.font, pchan->name); - } - /* Draw additional axes */ - if( (arm->flag & ARM_DRAWAXES) && (arm->flag & ARM_POSEMODE) ){ - glPushMatrix(); - glMultMatrixf(pchan->pose_mat); - glTranslatef(0.0f, pchan->bone->length, 0.0f); - drawaxes(0.25f*pchan->bone->length); - glPopMatrix(); + if((pchan->bone->flag & BONE_HIDDEN_P)==0) { + if (arm->flag & (ARM_EDITMODE|ARM_POSEMODE)) { + bone= pchan->bone; + if(bone->flag & BONE_SELECTED) BIF_ThemeColor(TH_TEXT_HI); + else BIF_ThemeColor(TH_TEXT); + } + else if(dt > OB_WIRE) BIF_ThemeColor(TH_TEXT); + + if (arm->flag & ARM_DRAWNAMES){ + VecMidf(vec, pchan->pose_head, pchan->pose_tail); + glRasterPos3fv(vec); + BMF_DrawString(G.font, " "); + BMF_DrawString(G.font, pchan->name); + } + /* Draw additional axes */ + if( (arm->flag & ARM_DRAWAXES) && (arm->flag & ARM_POSEMODE) ){ + glPushMatrix(); + glMultMatrixf(pchan->pose_mat); + glTranslatef(0.0f, pchan->bone->length, 0.0f); + drawaxes(0.25f*pchan->bone->length); + glPopMatrix(); + } } } diff --git a/source/blender/src/transform_conversions.c b/source/blender/src/transform_conversions.c index 4d5489486d9..4cadac89627 100755 --- a/source/blender/src/transform_conversions.c +++ b/source/blender/src/transform_conversions.c @@ -642,10 +642,11 @@ static void set_pose_transflags(TransInfo *t, Object *ob) t->total++; if(t->mode==TFM_TRANSLATION) { - if(pchan->parent && (pchan->bone->flag & BONE_CONNECTED)) { - if( has_targetless_ik(pchan)==NULL ) { + if( has_targetless_ik(pchan)==NULL ) { + if(pchan->parent && (pchan->bone->flag & BONE_CONNECTED)) + t->mode= TFM_ROTATION; + else if((pchan->protectflag & OB_LOCK_LOC)==OB_LOCK_LOC) t->mode= TFM_ROTATION; - } } } } |