diff options
Diffstat (limited to 'source/blender/editors/transform/transform_manipulator.c')
-rw-r--r-- | source/blender/editors/transform/transform_manipulator.c | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/source/blender/editors/transform/transform_manipulator.c b/source/blender/editors/transform/transform_manipulator.c index 37fd79e38e1..93bc02d7180 100644 --- a/source/blender/editors/transform/transform_manipulator.c +++ b/source/blender/editors/transform/transform_manipulator.c @@ -62,6 +62,7 @@ #include "BKE_mesh.h" #include "BKE_object.h" #include "BKE_particle.h" +#include "BKE_pointcache.h" #include "BKE_utildefines.h" #include "BLI_arithb.h" @@ -251,7 +252,7 @@ int calc_manipulator_stats(const bContext *C) nu= cu->editnurb->first; while(nu) { - if((nu->type & 7)==CU_BEZIER) { + if(nu->type == CU_BEZIER) { bezt= nu->bezt; a= nu->pntsu; while(a--) { @@ -259,7 +260,7 @@ int calc_manipulator_stats(const bContext *C) * if handles are hidden then only check the center points. * If 2 or more are selected then only use the center point too. */ - if (G.f & G_HIDDENHANDLES) { + if (cu->drawflag & CU_HIDE_HANDLES) { if (bezt->f2 & SELECT) { calc_tw_center(scene, bezt->vec[1]); totsel++; @@ -362,18 +363,19 @@ int calc_manipulator_stats(const bContext *C) ; } else if(ob && ob->mode & OB_MODE_PARTICLE_EDIT) { - ParticleSystem *psys= PE_get_current(scene, ob); - ParticleData *pa = psys->particles; - ParticleEditKey *ek; + PTCacheEdit *edit= PE_get_current(scene, ob); + PTCacheEditPoint *point; + PTCacheEditKey *ek; int k; - if(psys->edit) { - for(a=0; a<psys->totpart; a++,pa++) { - if(pa->flag & PARS_HIDE) continue; + if(edit) { + point = edit->points; + for(a=0; a<edit->totpoint; a++,point++) { + if(point->flag & PEP_HIDE) continue; - for(k=0, ek=psys->edit->keys[a]; k<pa->totkey; k++, ek++) { + for(k=0, ek=point->keys; k<point->totkey; k++, ek++) { if(ek->flag & PEK_SELECT) { - calc_tw_center(scene, ek->world_co); + calc_tw_center(scene, ek->flag & PEK_USE_WCO ? ek->world_co : ek->co); totsel++; } } |