PDA

View Full Version : souce file for the HotKeyDrawSize.zsc available?



oDDity
06-13-07, 11:08 AM
Is the souce file for the HotKeyDrawSize.zsc available anywhere?

marcus_civis
06-13-07, 02:21 PM
Is the souce file for the HotKeyDrawSize.zsc available anywhere?

Not that I know of. Why did you want it?

oDDity
06-14-07, 03:59 AM
I don't like the way it changes the brushes in leaps of 10, I just want to change it to a 2.
Yeah, I know there are other ways of scaling the brushes, but I've been used to the [ ] keys for so long in photoshop and mudbox.
How difficult would it be for you to write a quick script that changes the 10 to a 2? It's be much appreciated if you would :)

Also, have you ever considered writing a script to give brushes a memory in zbrush?
In mudbox, each brush retains it's own settings, which is a better system IMO.

marcus_civis
06-14-07, 04:57 AM
I don't like the way it changes the brushes in leaps of 10, I just want to change it to a 2.
Yeah, I know there are other ways of scaling the brushes, but I've been used to the [ ] keys for so long in photoshop and mudbox.
How difficult would it be for you to write a quick script that changes the 10 to a 2? It's be much appreciated if you would :)


Here you are. :)
Unzip and put the .zsc file in your ZStartup\ZPlugs folder. The hotkeys are the same (the others are disabled) and it increments by 2, unless the value is less than 10 in which case the increments are 1.


Also, have you ever considered writing a script to give brushes a memory in zbrush?
In mudbox, each brush retains it's own settings, which is a better system IMO.

Have you not found the Save Brush button at the bottom of the Brush palette? You can save many settings, including Brush size. Check out the Wiki:

http://www.zbrush.info/wiki/index.php/Brush_Manager

oDDity
06-14-07, 01:22 PM
Cheers for the script Marcus, it works fine.

THat's not quite what I meant about saving brushes, I mean while modeling, and flipping back and forth between the brushes, that each should remember the size, strenth, alpha and falloff it had from the last use, and also whether it was add or sub.

I know you could set up a macro, but it's not really the same thng, since every time you go to that macro brush it reverts to the original macro settings rather than the settings you had the last time you used the brush.

marcus_civis
06-16-07, 03:35 AM
THat's not quite what I meant about saving brushes, I mean while modeling, and flipping back and forth between the brushes, that each should remember the size, strenth, alpha and falloff it had from the last use, and also whether it was add or sub.

I know you could set up a macro, but it's not really the same thng, since every time you go to that macro brush it reverts to the original macro settings rather than the settings you had the last time you used the brush.

It's a nice idea but this isn't really possible using zscripting. I say it isn't really possible because there is a way but it's not satisfactory because of 'features' in the zscript code.

The main problem is monitoring the interface. ZScripts or plugins can only do this while they are active and the moment a different plugin or macro is used they cease to be active. The solution is to set up plugin buttons to use instead of the UI ones but that's when the features mentioned above begin to spoil things.

--E--
06-24-07, 06:40 PM
This is a very nice script Marcus!

You wrote something very similar for me in zb2. I was wondering (when you find the time) if you could make a revision of this script that does the exact same thing as this one. Except instead of moving in steps of 2 it moved in steps of 4?

Thanks mate. :D

marcus_civis
06-25-07, 01:27 AM
You wrote something very similar for me in zb2. I was wondering (when you find the time) if you could make a revision of this script that does the exact same thing as this one. Except instead of moving in steps of 2 it moved in steps of 4?


Hello Eric,
I can go one better than that. ;) Here's a version that has a slider to adjust the increment, any value between 1 and 20. Whatever the slider is set to, when the brush size is 10 or below the increments will be 1.

Unzip and put the .zsc file in your ZStartup\ZPlugs folder. Restart ZBrush and you'll find the adjustment slider in the ZPlugin:Misc Utilities subpalette.

HTH,

--E--
06-25-07, 10:32 AM
wow that is awesome!

It took me a minute to find the slider though;)

very cool script, once again marcus!

marcus_civis
06-25-07, 10:48 AM
wow that is awesome!

It took me a minute to find the slider though;)

very cool script, once again marcus!

Eric,

Glad you like it. :) Yeah, perhaps I could have put the slider somewhere else but if you use it a lot you can stick it on the interface. I've just uploaded a little update so that the setting is saved between ZBrush sessions, so if you want it at 5 it will stay there.

Cheers,

--E--
06-25-07, 10:50 AM
Oh even better!

Question:

Is there a special zscript command to force things like this to be saved so that every time you start zbrush they will be loaded?

marcus_civis
06-25-07, 11:08 AM
Oh even better!

Question:

Is there a special zscript command to force things like this to be saved so that every time you start zbrush they will be loaded?

You just have to save the setting to file whenever the slider is changed and load the setting from file whenever the plugin is called. Here's the code:

--E--
06-25-07, 11:20 AM
Wow, thanks so much marcus!

One last question that I have been meaning to ask you.

Do you know if it is possible to assign the f1 - f12 keys in zbrush to be hot keys for different things? perhaps through scripting? I have not been able to do so.

marcus_civis
06-25-07, 12:10 PM
Do you know if it is possible to assign the f1 - f12 keys in zbrush to be hot keys for different things? perhaps through scripting? I have not been able to do so.

Unfortunately not. They register with codes that are equivalent to other keys, so that, for example, F3 is the same as 'R' and F4 'S'.

soulstice
01-14-08, 05:45 PM
sorry to revive an old thread, just wondering if this script is still working or if there is an update for zb3.1? because I loaded this script and it still only increases draw size by increments of 10. any help would be appreciated.

--E--
01-14-08, 10:58 PM
there is a slider under, zplugin > misc utilties labeled "br amount" that is where you set the slider amount.

soulstice
01-15-08, 11:31 AM
Thanks I'll give that a shot! =)

Reg_Spyder
01-28-08, 02:58 PM
Thank you hugely! You are a star.

Kerwin
10-31-08, 05:51 PM
Thanks! This script has been really useful to me.

Calzoncillos
03-03-09, 10:12 AM
Thanks dude! This plugin is a life-saver for me. :)

cannedmushrooms
05-16-09, 08:17 PM
ya could we get HotKeyDrawSize.Zsc pre-compiled for 3.12b

I also want to see if I could modify it to Raise and lower the Sdiv by 1 using a button so I can assign it a hotkey.


would the sdiv slider be "Geometry:Sdiv"

Is there a reference somewhere for the menu/sliders in Zbrush?

Keep in mind I am a script noob but can learn pretty fast with a few examples.

Svengali
05-16-09, 08:51 PM
CM,

The most immediate way to see any ZScript command's syntax and often to see an example of usage, is to go into the ZScript menu and click on the "CMD" button.

Then, if you grab the handle on the ZScript window just below the screen and pull it open (up) a bit, you can click and scroll through the entire ZScript command set.

You'll be looking for the ISlider command in this case.

However, the better option I think is to go to the Wiki and search on Zscript Command Reference. There you'll find the command set and lots of examples.

Also, if you need to see any button's complete path, just hold Ctrl Key down and cursor over the button... (look @ the bottom of the popup box).

Sven

cannedmushrooms
05-17-09, 05:41 AM
very cool Sven
heh right out in front of my face the whole time

this script stuff is fun ;)

spaceboy412
05-17-09, 02:33 PM
canned, couldn't you make a macro that toggles between the two levels and just assign a hotkey to it?

cannedmushrooms
05-17-09, 08:26 PM
ya that would be the easy way;)

But I thought it might be cool to have a couple fundamental Zscripts under my belt. A slider changing script like this one makes a great template. I figured out what the issue was with the script and how to up and lower the mesh resolution but still working on the incremental from the slider. But I will get it eventually.

Svengali
05-17-09, 09:11 PM
CM,

A while back TVeyes posted a neat little ZPlugin package called Tiny Tools which included a utility he calls a Subdivision Switch which sounds similar what you are trying to make.

The whole Tiny Tool set is remarkably useful and what's more remarkable is that he provides the source scripts for them as well. If you want to see how his Tiny Tools version works you can find the zipped .txt files >>> HERE <<< (http://www.zbrushcentral.com/zbc/showthread.php?t=26940)

Frankly, the sample scripts are a little overwhelming (as often happens, making something simple to use requires a complex investment in behind-the-scenes code).

But if you are trying to learn ZScripting this might be a good place to start - TVeyes demonstrates a good eye for interface design and good technique in his scripting implementation - lots o' meat on dem bones.

Note, too, the terms of usage he outlines in the same post.


Sven

marcus_civis
05-18-09, 02:30 PM
cannedmushrooms,

Welcome to the wonderful world of zscripting. :) You mentioned the HotKeyDrawSize.Zsc. You should already have this - to check, look in the ZPlugin>Misc Utilities submenu. There should be two buttons for <<Brush and Brush>>.

modemmack
12-22-09, 11:10 AM
I'm glad I finally came around to viewing it though. It's fortunate that the plugin seems to work just fine in ZBrush 3.5 too. Thanks for the awesome plugin. I wish I had those kind of skills.