ZBrushCentral

scripting question

Hi PSTCHOART,

Here’s a version that will save/load a file with the views data. Note that I have also made a change to the SetTransform routine to correct a problem you can get when loading a views file. (Sometimes loading a view can flip the model upside down but the code change should stop it happening.)

HTH,

Thanks so much Marcus !!

just last thing , can you also add two ordinary buttons that work like switches cust1 and cust2 , i want to add this two buttons on the switches to look like zapplink cus1 and cus2 , with orange back line when the view is stored , ( like the attachment ) Untitled-1.jpg

Thanks !

No, they are complex to script and not a good idea. For example, you can’t move them to a custom interface. They date from when the orange switches didn’t work properly. The switches I have done for you are better.

You are right Marcus
i add it to the interface that i build , and it works great

Thank you

Hi Marcus

i just find the the view script make a issue when i double the size of the document , the position of the models is not on the same place and size , can you fix it ?

Thanks so much !

Hi PSTCHOART,

This will do it but note that it won’t work will views files saved with the previous version.

Thanks Master !

it work great , but i just notice one strange thing when i use it , sometimes when i click on the switch it not save the view and i have to clean it and store it again , i thing this is a problem from zbrush switches because i have this issue for some other script that i use switches . So did you thing if you add a button that is linked to the switch it will work any times when i click on the button and it enable the switch , some close the the zaplink buttons with background orange … I love to have only switches but this issue is broke the working process

Thanks so much !

That’s the best I can do with code snippets like this. The switch problem is partly to do with start up states and switching between plugins, and needs to be addressed for a complete plugin.

i understand … i will use it as it is

Thanks so much for all the help Marcus !

Hey Marcus

can i ask you for a script that just rename all subtools for example : subtool 1, subtool 2 , and etc …

Thanks so much !

Hi,

This code should do it:

[IButton,RenameAllSubTools,“Rename all subtools”,
[VarSet,activeST,[SubToolGetActiveIndex]]
[Loop,[SubToolGetCount],
[SubToolSelect,[Val,n]]
[FileNameSetNext,[StrMerge,“SubTool “,[Val,n+1],”.dat”]]
[IPress,Tool:Import]
,n]
[SubToolSelect,activeST]
]

Thanks Master !

I think it may be possible to script a solution to the polypaint layer problem

Hey Marcus

just wanted to ask you is there a macro or script that can make all layers to 0 ?

Thanks

Hi,

Try this.

Thanks so much !