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:
authorCampbell Barton <ideasman42@gmail.com>2013-07-25 12:36:35 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-07-25 12:36:35 +0400
commitaec8cff9ab730fdf525242ffbf1f4dcfd67c2bb1 (patch)
tree43920e6b461108502a8968b28fba27ec878f7d2f /source/blender/editors/transform/transform_orientations.c
parenta15e9ca495df03bdbe84b37b033ba02dbf2089cb (diff)
optimization: manipulator was looping over all objects on redraw when the active object was being used and it didn't need to.
Diffstat (limited to 'source/blender/editors/transform/transform_orientations.c')
-rw-r--r--source/blender/editors/transform/transform_orientations.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/source/blender/editors/transform/transform_orientations.c b/source/blender/editors/transform/transform_orientations.c
index c6cc7bc1330..47a63bdb063 100644
--- a/source/blender/editors/transform/transform_orientations.c
+++ b/source/blender/editors/transform/transform_orientations.c
@@ -880,11 +880,14 @@ int getTransformOrientation(const bContext *C, float normal[3], float plane[3],
else {
/* we need the one selected object, if its not active */
ob = OBACT;
- if (ob && !(ob->flag & SELECT)) ob = NULL;
-
- for (base = scene->base.first; base; base = base->next) {
- if (TESTBASELIB(v3d, base)) {
- if (ob == NULL) {
+ if (ob && (ob->flag & SELECT)) {
+ /* pass */
+ }
+ else {
+ /* first selected */
+ ob = NULL;
+ for (base = scene->base.first; base; base = base->next) {
+ if (TESTBASELIB(v3d, base)) {
ob = base->object;
break;
}