Page 1 of 1

Getting a toolbar to open in a fixed size and position

Posted: 22 Nov 2013, 14:37
by Rork
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 ;)

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

Posted: 24 Nov 2013, 11:30
by SpookyMunky
Think I mighta seen this on your blog a while ago, helped me out, thanks :)

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

Posted: 25 Nov 2013, 07:09
by Jho
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.

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

Posted: 07 Jan 2019, 20:03
by minilogoguy18
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.

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

Posted: 07 Jan 2019, 20:31
by Rork
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

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

Posted: 30 Mar 2019, 13:36
by minilogoguy18
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.