ZBrushCentral

Returning a list of SubTool data

Hello! I am a first time poster here and complete ZScripting noob. I’m currently trying to sort out how I might make a script that gets the Subtool name and Y size (preferably rounded to the nearest 2 decimal places) of all visible Subtools. I was also not sure if there was a way this data could be selected and copied (for use outside of ZBrush) or even saved as a .txt file - but that would be icing on the cake!

So far I am able to get the data, merge the strings and create a message with the information for a single SubTool, but I’m stuck on creating a full list of all SubTool data and how to add all of those strings to a single message. Any help would be appreciated!

Mock-up image below of what I am looking for - though at my skill level I only set out to make a non-rounded, non-fancy list, so any help with the extra details I’ve listed is gravy.

Thank you all for any advice!
MessageMockUp

Hi,

Welcome to ZBC! :slight_smile:

This is quite complex so I’ve written an example rather than give code here.

Subtool_values.txt (2.3 KB)

This just cuts off the extra decimals rather than rounding but there should be enough for you to adapt to your needs. There isn’t much in the way of error checking (to see if there are appropriate subtools etc.).

Load the file using the ZScript:Load button. The button will appear in the ZScript window at the bottom of the interface. Press “H” on the keyboard t show it.

HTH,
Marcus

1 Like

Wow! I’m glad I was on the right track, but wow that was much more complex than I’d thought! I was actually really intimidated by memory blocks when starting, I guess it’s time I dug into them sooner rather than later.

This works great. I’m going to comb through this and get my learning on; thank you for your great comments in the file! Perfect for a ZScripter padawan :slight_smile:

Thanks again Marcus!