Hello, I have just finished my first zplugin and as the title suggests, it is pretty simple.
I learned zscript as I went so I am sure I am not following the best coding practices yet.
It works for my current workflow but now that I’m done with it, I have several questions.
I created the following buttons:
My idea is that it will only affect subtools that have a specific prefix, in this case “dyn”.
I also wanted to turn dynamicSubd on and off on visible subtools only, hence the switch there as one more “filter”.
The “add prefix” button is just that so I don’t have to type it everytime, and it works fine for me.
So my questions are:
-
Is there a way to make it so in a way that zbrush doesn’t go through all the subtools everytime? Even with IFreeze in the code, it still takes more time than Tool: Subtool: All High and Tool: Subtool: All Low standard actions. What I have right now is just a loop that checks the switch, the prefix and if the tool has dynSubd on (when it turns it all off).
-
I’ve tried adding a percentage progress NoteBar to make it a bit fancier, but even with IFreeze, all I see are the “Switching to Subtool” notes for each subtool it goes through. How can I properly implement it during the looping operation?
-
Is it possible to make a ISubPalette that’s inside the main ISubPalette be open by default? Maybe I will just use a separator instead. I’m thinking about future plugins I make in the future.
-
I’ve found two problems that it took me so long to fix. They were affecting the checks in the loop: Folders and Polypaint. Anything above the folders got ignored and the visibility check always returned 1 if the subtool had polypaint. So what I did was turn off “Show Subtools Folders” and Polypaint before the loop and turn it back on after the loop. It feels like a weird workaround. Is that ok to do? Are things taking longer because of this?
Thank you!