PDA

View Full Version : Centre viewport on objects bounding box rather than pivot



adk
02-26-2013, 06:09 PM
I posted this request in the Twilight Zone & seem to recall reading a post elsewhere ( think it was either James or Matt ) that this was coming in the next version. Search being what it is I can't seem to find that elusive reference, so here I go again...

Anyone ever wish they could actually centre the viewport on the bounding box of the object that they have selected rather than it's pivot point? I know I constantly do.
I know there are scripts that can move the pivot point but I'd rather not muck about with scripts & a work around in this case.
Just wish there was another option available rather than having to constantly centre a viewport by hand. Could be another icon (as shown in the gif) or an option to toggle between the two modes ?

Cheers.

lertola2
02-26-2013, 07:45 PM
Yes. That is a much needed feature.

jeric_synergy
02-26-2013, 08:25 PM
Hmmmmm...........Psuedo code for that script would be:


Save the Selection
Select All
Fit Selected
Deselect All
Restore Selection



I wonder if LScript could do that fast enough?

adk
02-26-2013, 09:40 PM
Hmmmm ... might be a good introductory way to dip my toes into the Python water. Would anyone be willing to guess if the classes I might need for this are available ? Remember reading somewhere that not all are present at this stage.

jeric_synergy
02-26-2013, 11:08 PM
I was wrong-- that won't work. Move along, nuthin' to see here...

However, a NULL object at the center of the bounding box.... :hack: ... You could associate a null with an object (perhaps via naming), and put the null's center at the bounding box center. When you hit the special "Center" button, it would reference the null rather than the object, sort of a 'center proxy'.