Sorry for the delayed posting of the source code. I have been way to busy. Please excuse me.
First of all, a couple of notes on why the script works:
1) By defining an [ISubPalette,…] outside any existing subpalette you get a subpalette that exists within the ZBrush main window. For example, [ISubPalette, “Floating”] defines a subpalette within nothing, and is placed within the Zbrush Windows available space (Top left corner to top right corner to be exact).
2) You have to define a button, switch or slider into the above [ISubPalette,…] before it will show.
3) The [ISubPalette,…] inset values can only be changed by deleting the [ISubPalette,…] and then reloading the script.
And a couple of reasons why it does not work:
1) Zscript generated items are automatically assigned a new Window ID which only increments according to the last Zscript generated Window ID. The value increases steadily, eventhough there might be unused lower values.
2) By deleting the [ISubPalette,…] with [IClose,…], which is currently neccesary, you are also deleting every interface item within that subpalette. Reloading the entire script is then neccesary.
What I would really like is some way to set the Window ID of all zscript generated items, of course checking them against already existing Window IDs. Being able to change the [ISubPalette,…] inset values would be nice, but to really make the most of this framework it is still neccesary to delete buttons and reload the script in order to change bitmaps assigned to buttons(Thus allowing a floating material loader, for example). Of course you could add that as another wish; being able to change the bitmap of a zplugin interface item without reloading.
Anyway enough talking. The script code is below. Unzip to a familiar location and run the “Framework.txt” script from there. The other .txt files should not be run, although nothing bad will happen if you should do so.
I hope everyone realises the possibilities with this script framework example. All the possibilities mentioned in my first post are not coded into this framework.txt but they are entirely possible. I am just worried it can/should all be made much easier by the [IDialog,…] command in ZBrush 2.5.
A bit late but,
Happy new year and Happy ZScripting
Mark
-------------------------------------------------------------------------
Mark: Thanks for looking Mark, I hope you can get something out of the script code. Regarding the testing to window ID 33000, well I did increase the button count within my subpallete to about 40, so it did not take that long. Although I must admit after all that clicking I did have great difficulty in picking my nose. I kept hitting my eye instead. True story.
Svengali: Thanks for the encouraging words. To make the idea really work it would be nice to be able to delete interface items and restore them again with the same windows ID. That would allow the changing of bitmap assigned buttons.
Down under was great although it drew out a bit longer than I wanted it to, I only got about 1 week off by myself. The weather was great and everything but the longer I stayed the more I worried about home and what was happening on ZBC Still a great work experience.
Cameyo: Cheers Cameyo, but this is the fun part, finding something "new". It does not really matter that it does not work perfectly right now, there is still the possibility.