ZBrushCentral

ZSC-TXT conversion

Hi.
Dear experts,
Can one convert Scripts from ZSC to understandable TXT so that one could edit the former?

Or does it contradict:lol: the copyright?

Anatom.

No, it is not possible to convert a compiled zscript (.zsc) back to text form (.txt). As you said it contradicts one of the reasons for having compiled zscripts in the first place.

You can however ask the author if he/she is willing to share the source code (.txt) or help you with a zscripting problem.

Yes.
I shall try to make the script.
In fact I like so much the script inclosed in Zbrush,
located in Utilities of ZScript Menu. It changes the size of the brush
with the keys “[” and “]”.
I was so glad to find it yesterday. Exactly what I needed.
I just wanted to replace the keys with , say, “1” and “2”, which is more
cozy for the left hand, letting the right one control the mouse.
:confused:
Anatom.

I think it’s possible to do this - at least, I don’t think there will be any conflicts.

Put this text file in your ZPlugs folder (…\ZBrush2\ZData\ZPlugs) and then load it from the ZScript menu - Ctrl+Shift+L then navigate to the file. The shortcuts will then be available, 1 for increasing the drawsize, 2 for decreasing it.

Marcus

Edit: Actually, I’m not sure this works entirely satisfactorily, so I’ve deleted the file. Sorry!

Compiled Zscripts (.zsc) in the …/Zdata/Zplugs folder are loaded automatically and in alphabetical order. So placing many small “shortcut” scripts in that folder is not advisable. Instead I would suggest placing [IsetHotkey,…] commands in the DefaultZscript.txt located at the root of the Zscripts folder. The DefaultZscript is the last script loaded.

Just be sure that the last line of the DefaulZscript is “[PD]” and you should be fine.

TVeyes:
Ah, now that’s interesting and useful. Thanks. :slight_smile: But is it possible to set a hotkey like that for increasing a slider incrementally?

Marcus

There is one other method I was looking into but never finished (I did get it to work though). If you build 2 scripts one with a hotkey for ‘[’ and one with hotkey set to ‘1’ then you can compare the .zsc files , you will have the difference. Now I was making a utility for my own compiled script, so users could reassign the hotkeys by clicking on my settings button.

The only time I found it difficult to change was when a CTRL or SHFT key was used. Otherwise it is only 2 bytes of info to change in the whole file, And the bytes are alligned next to each other. I have only tried this on my simple scripts. but it was very simple.

I used UltraEdit32.
Opened the files in the FILE --> COMPARE .
Then Just type the new settings.

Wish I had more time, I would finish the utility. I Have to soon anyways, but first have to get some of my scripts finished.

GoodLuck.

Chris Reid

Here are the Hex conversions/encryption values for the letters a-z (same as A-Z)

A, 0x46 B, 0x45 C, 0x44 D, 0x43 E, 0x42 F, 0x41 G, 0x40 H, 0x4F I, 0x4E J, 0x4D K, 0x4C L, 0x4B M, 0x4A N, 0x49 O, 0x48 P, 0x57 Q, 0x56 R, 0x55 S, 0x54 T, 0x53 U, 0x52 V, 0x51 W, 0x50 X, 0x5F Y, 0x5E Z, 0x5D

That’s interesting but not really necessary. When I posted above I hadn’t realized that that particular script works just like any other. You can write a script for incrementally increasing a slider as here . Alternatively the ISetHotkey command will set/change the hotkey for an interface item.