PDA

View Full Version : Quick center item : my free little script



Stephane
07-21-2004, 10:44 AM
I've read the LScript manual. And now, I know that I never be a coder but... I'm really proud to offer you a little LS script that help you to quickly center an item in Layout. Map it to a key!



// CenterItem.ls
// Quick centers the viewport on selected item but not continuously
// Stephane Bernard 2003

@warnings
@name CenterItem

generic
{
CenterItem();
CenterItem();
}

Karmacop
07-21-2004, 12:32 PM
What does using CenterItem(); twice do? Why not only use it once?

NanoGator
07-21-2004, 02:22 PM
Originally posted by Karmacop
What does using CenterItem(); twice do? Why not only use it once?

Ditto....

Stephane
07-21-2004, 05:48 PM
Try it before and you'll understand. My script works like the center command in modeler (so map it to the same key). Unlike the cross in upper-right corner of layout, it don't keep the selected item centered. You don't have to toggle on to center an item, then toggle off before scrolling again... cause it do that in one key!

NanoGator
07-21-2004, 05:59 PM
Originally posted by Stephane
Try it before and you'll understand. My script works like the center command in modeler (so map it to the same key). Unlike the cross in upper-right corner of layout, it don't keep the selected item centered. You don't have to toggle on to center an item, then toggle off before scrolling again... cause it do that in one key!

Ah, that makes perfect sense, thank you. :)

riki
07-21-2004, 07:05 PM
Nice one, many thanks.

Karmacop
07-22-2004, 05:25 AM
Ahh, good idea. The amount of times I've forgotten to turn off center item. Funny no one has thought of this before.