Getting a toolbar to open in a fixed size and position

Links and discussions concerning tutorials
User avatar
Rork
Posts: 1351
Joined: 09 Jul 2009, 08:59
Location: Close to The Hague, Netherlands

Getting a toolbar to open in a fixed size and position

Post by Rork » 22 Nov 2013, 14:37

When you create a toolbar, like a “shader presets” toolbar for instance, you might like to open it up at the same location, and the same size the next time you open it again.

How to do that? Well... it's not so hard to do:

If you have a look at the code of your newly created toolbar, we can see a set of coordinates in the top part of the XML coding:

X - - - - - - -

<?xml version=”1.0″ encoding=”iso-8859-1″?>

<xsi_file type=”Shelf” xsi_version=”5.11.2006.0529″ syntax_version=”1.0″>
<shelf_view name=”mia_presets” clsid=”{7EA70760-167C-475F-A105-FF235C6FA556}”>
<definition maxinstances=”10000″ acceptfocus=”true” private=”false” defaultsize=”107,47,607,457″ cmdmap=”{00000000-0000-0000-0000-000000000000}” supportedtypes=”6″ category=”"></definition>

X - - - - - - -

The “defaultsize=107,47,607,475″ lines is what we’re after.
The first set of coordinates; 107,47 is the topleft corner of the toolbar.
The second set of coordinates; 607,457 places the bottomright corner of the toolbar. It’s absolute coordinates, not a given width/height value.

Note:
Be aware that the coordinates are influenced by the height of the windowbar and frame, or better said the windows interface settings.
So if you changed any of the values in the “Advanced appearance” window of the windows desktop, you’ll have to subtract the amount of these pixels to line it up properly.
The real 0,0 starting point will be the topleft corner of the XSI interface itself.

Image

So with this information we have a look at our toolbar, in this case will start 107 pixels from the left and 47 pixels from the top of the interface.
It ends at 607 pixels from the left and 457 from the top, making the toolbar occupying 500×410 pixels of screen space in total.

The simplest way of doing things is probably to screen dump the XSI interface into Photoshop and check out the pixel values.
Edit the toolbar file coordinates, save it, restart XSI and see your toolbar open at the correct location and size.

P.S.: Your toolbars are saved as .xsitb files, and are normally located in the Application\toolbars folder of your user settings or workgroup.


Note: This was published on my blog a while ago. But as the blog is going the way of the Dodo soon, I wanted to preserve it here ;)
SI UI tutorials: Toolbar http://goo.gl/iYOL0l | Custom Layout http://goo.gl/6iP5xQ | RenderManager View http://goo.gl/b4ZkjQ

SpookyMunky
Posts: 102
Joined: 14 Jun 2012, 02:30

Re: Getting a toolbar to open in a fixed size and position

Post by SpookyMunky » 24 Nov 2013, 11:30

Think I mighta seen this on your blog a while ago, helped me out, thanks :)

Jho
Posts: 49
Joined: 12 Feb 2013, 07:57

Re: Getting a toolbar to open in a fixed size and position

Post by Jho » 25 Nov 2013, 07:09

Thanks, this will be helpful for sure.
Is it possible to do it for other UI elements too? Like for instance explorer or the animation editor? I always have to arrange them on my second screen when I start up.

EDIT: No wait, I think I got it now (didn't notice your other post before). Thanks.

User avatar
minilogoguy18
Posts: 99
Joined: 24 Dec 2012, 19:34

Re: Getting a toolbar to open in a fixed size and position

Post by minilogoguy18 » 07 Jan 2019, 20:03

Sorry to bump this but that's probably better than starting a new thread.

I keep having trouble with this, sometimes it works, sometimes it doesn't. Are there some temp files I can clear out to make the changes stay? My custom toolbars were carried over from another user, made sure that I now have full permission of the file but it still loads in the default location rather than where I tell it to.

User avatar
Rork
Posts: 1351
Joined: 09 Jul 2009, 08:59
Location: Close to The Hague, Netherlands

Re: Getting a toolbar to open in a fixed size and position

Post by Rork » 07 Jan 2019, 20:31

Not sure....

Maybe you can check the toolbar code and see if it's still looking at wrong coordinates.
And be sure to have all the rights on the files too. Maybe something's off there too.

Other than that, it's been a while, and the version of Softimage and Windows could interfere somehow by now.

rob
SI UI tutorials: Toolbar http://goo.gl/iYOL0l | Custom Layout http://goo.gl/6iP5xQ | RenderManager View http://goo.gl/b4ZkjQ

User avatar
minilogoguy18
Posts: 99
Joined: 24 Dec 2012, 19:34

Re: Getting a toolbar to open in a fixed size and position

Post by minilogoguy18 » 30 Mar 2019, 13:36

I got it working, blaming windows and its user permissions being weird. The file saved with the changes but its like it was reading from a cached version or something. Only until after went in and took full control of the folder did the changes take effect.