skip unneeded calculations when calling calculateTransformCenter()
authorCampbell Barton <ideasman42@gmail.com>
Thu, 4 Apr 2013 21:40:39 +0000 (21:40 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Thu, 4 Apr 2013 21:40:39 +0000 (21:40 +0000)
which gets called whenever the view is rotated when rotate-around-selected preference is enabled.

source/blender/editors/transform/transform.c

index be2960256245f8e75d2dbede3ef448a64045eb82..bf4baf9ea22ec5bb7e6692b8c6b311847057afb3 100644 (file)
@@ -1407,12 +1407,16 @@ int calculateTransformCenter(bContext *C, int centerMode, float cent3d[3], int c
 
        t->state = TRANS_RUNNING;
 
-       t->options = CTX_NONE;
+       /* avoid calculating PET */
+       t->options = CTX_NONE | CTX_NO_PET;
 
        t->mode = TFM_DUMMY;
 
        initTransInfo(C, t, NULL, NULL);    // internal data, mouse, vectors
 
+       /* avoid doing connectivity lookups (when V3D_LOCAL is set) */
+       t->around = V3D_CENTER;
+
        createTransData(C, t);              // make TransData structs from selection
 
        t->around = centerMode;             // override userdefined mode