optimization: manipulator was looping over all objects on redraw when the active object was being used and it didn't need to.

This commit is contained in:
Campbell Barton
2013-07-25 08:36:35 +00:00
parent a15e9ca495
commit aec8cff9ab

View File

@@ -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;
}