View Full Version : Zplugin: Draw Size/ Focal Shift/Z Intensity Sweep
marcus_civis
08-05-05, 04:51 AM
This is a rework of a zplugin I posted earlier. It makes it easy to adjust Draw Size, Focal Shift and Z Itensity while you're working simply by moving the mouse left or right while pressing the hotkeys:
Hotkey [S] sets the Draw Size
Hotkey [1] sets the Z Itensity (and the RGB Itensity when the sliders are locked in 2.5D mode)
Hotkey [2] sets the Focal Shift
Clicking the mouse/pen after adjusting recalls the previous zscript so your workflow is not interrupted.
Unzip the zip to your ZStartup\ZPlugs folder and the hotkeys will be available next time you start ZBrush. NOTE: if you installed the previous DrawSizeSweep.zsc this should be deleted or the new hotkeys will not function properly.
The zip contains three files:
AdjDrawSize.zsc
AdjFocalShift.zsc
AdjZInt.zsc
Simply delete the relevant file if you don't want that hotkey.
I hope you find these hotkeys useful.
Great enhancement :tu::tu::tu: Thanks buddy!
Just found this, what a great little tool, cheers Marcus (BTW do you ever sleep???)
chris543
08-18-05, 07:55 PM
Good tool ~!!i like it~!:tu:
pajonate
08-18-05, 09:00 PM
Great addition. Just only in my case, hotkey 1 changes the Z Intensity/ RGB, and hotkey 2 gets Focal Shift.
I like it a lot.
marcus_civis
08-18-05, 11:42 PM
Thanks guys, I'm glad you like it. :)
pajonate,
Ha ha, thanks for pointing that out. :) Just an error in my post. I chose 2 for Focal Shift because the button on the ZB interface is to the right of Z Intensity.
Cheers,
This is great! I have been dreaming with this kind of script for a long time :)
Just one very little note. Can it be faster? It works very well, but there is a retard of about half a second while you press the key and it starts to work. Am I the only one experiencing this?
thanks a lot!
marcus_civis
08-19-05, 02:23 AM
Hi Jhotun,
I'm glad you like the script. :)
As for the delay, I do get a slight one but it is not as much as half a second. The script is quite complicated and speed may vary on different systems. I'm not sure that I can speed it up but I'll have a look when I've a moment.
Cheers,
I´m running a Pentium4 3,2 HT with a gf6600 here at the job place.
Anyway, i´m using your script since this morning with lots of pleasure :)
Thanks!
marcus_civis
08-19-05, 03:32 AM
Yes, I don't think it's a system speed issue (my system is pretty archaic), more to do with particular setups. The script uses the zscript 'Sleep' command which seems to vary in its efficiency and behaviour. Anyway, I'm glad you like it. :)
I´m thinking that probably this could end being implemented inside the zbrush stantard workflow (core). One of the things that for sure would boost modeling inside zbrush would be the ability to have "gestures" to switch between different pencil presets. That way, if you press some key and do a simple gesture like a diagonal line, the pencil could change to a predefined one with size, alpha, zadd/on-off, rgb, intensity... Presets are cool :)
Zbrush is better and better due to scripts like yours marcus :) thannnnks!
marcus_civis
08-19-05, 07:14 AM
Jhotun,
Thanks for the kind words, they are much appreciated. :)
Presets are a nice idea but pretty difficult - or impossible - to code (in the way you suggest) using standard zscripting. I imagine that it would need a dll to work properly but then just about anything would be possible. Time I got down and learnt C++. ;)
I hope this goes to the right ears :)
EDIT: Or eyes...
boozy floozie
08-24-05, 06:25 AM
A great help with productivity.
I've always thought that this should be built into ZBrush.
Tveyes kindly notified me of our posting as it's been something I've talked about for many moons.
Look forward to trying it out and as always many thanks Marcus.
:tu: :tu: :tu:
arapisque
10-13-05, 02:59 PM
Hay, Thanks alot Marcus for this great script which was my first demand from zbrush after my dealing with it latly
:tu: :tu: :tu:
great script!
Is there a way i could change the shortcut keys?
I think for me the best i can think of right now would be
Size - A
Focal - S
Z intensity - D
thanks
marcus_civis
02-05-06, 12:53 AM
great script!
Is there a way i could change the shortcut keys?
I think for me the best i can think of right now would be
Size - A
Focal - S
Z intensity - D
thanks
Hi rv_el,
Changing the hotkeys for these scripts would mean re-writing them which I don't have time to do just now. But also I avoided using the hotkeys you suggest because they are already assigned in ZBrush and using them again could cause a conflict. A is the hotkey for ZSphere mesh Preview, S is DrawSize and D is used to switch to a higher-level mesh in Edit mode.
ludikastyle
02-05-06, 04:36 AM
You're my personal jesus with this script now! :)
I know something about C++ & dlls so I wonder if I could help... let me know!
:lol: THANKS MAN!
Keep brushin',
marcus_civis
02-05-06, 10:47 AM
You're my personal jesus with this script now! :)
I know something about C++ & dlls so I wonder if I could help... let me know!
:lol: THANKS MAN!
Keep brushin',
ludikastyle,
Many thanks, I'll bear your kind offer in mind. :) And I'm glad you like the script!
Cheers,
Originally i installed somebody elses script. it was like "20 usefull hotkeys" then i tried installing yours. I can only get "S" to work but i can't get the "1" and "2" to work, even though i got rid of the "20 usefull hotkeys" scripts.
How can i get the "1" and "2" key to work. i even try manually loading the scripts up and they just wont budge.
There just has to be a better way for all this madness :rolleyes:
marcus_civis
02-05-06, 11:09 PM
Originally i installed somebody elses script. it was like "20 usefull hotkeys" then i tried installing yours. I can only get "S" to work but i can't get the "1" and "2" to work, even though i got rid of the "20 usefull hotkeys" scripts.
How can i get the "1" and "2" key to work. i even try manually loading the scripts up and they just wont budge.
There just has to be a better way for all this madness
The other script uses those same hotkeys so you will need to remove that before mine will work. Look in you ZStartup/ZPlugs folder for a file named '20 Useful Short-cuts.zsc' (or something similar) and remove it. Restart ZBrush and my hotkeys should work OK.
Cheers,
i was confused. When i was hitting S this drawsize pop up would come up. i thought that was your script and that the other 2 would function the same way. Turns out that the Draw Size one of yours was not even loaded and that the stock S shortcut does that strange pop up thing.
Looks like all is well now. although zbrush doesn't like to auto load them for some reason. I have to hand load them.
marcus_civis
02-06-06, 01:34 AM
i was confused. When i was hitting S this drawsize pop up would come up. i thought that was your script and that the other 2 would function the same way. Turns out that the Draw Size one of yours was not even loaded and that the stock S shortcut does that strange pop up thing.
Looks like all is well now. although zbrush doesn't like to auto load them for some reason. I have to hand load them.
Check that the three .zsc files (AdjDrawSize.zsc, AdjFocalShift.zsc, AdjZInt.zsc) are in the main ZPlugs folder (ZBrush2/ZStartup/ZPlugs) and not in a subfolder created by the unzipping. Plugin .zsc files that aren't in the main ZPlugs folder is the usual reason for them not loading on startup.
Hi Marcus,
Thanks for the great script, I been using it sense you frst posted and love it. I have a question though I think its probably a wacom issue. I setup my pen to so that the toggle switchs activate the "s" and "1" hotkeys. I figured it be pretty sweet to control everything from the pen, but sadly it does't work. Instead of getting a fluid transition from a larger cursor to a smaller one I get this nasty stuttering effect. For Some reason I can't simply click and scroll the size.
Any ideas?
marcus_civis
02-22-06, 02:09 AM
Hi Enigma,
I'm glad you've found the plugin useful. :) As for the problem, I would think that it is to do with the way ZBrush/the plugin handles key presses. For scripting purposes ZB interprets holding down a key in the same way as pressing it repeatedly and the plugin has to work accordingly. This works ok with an ordinary keypress but with the Wacom pen obviously things don't work the same way. I have a Wacom myself so I'll take a look at the set up but I doubt if there's anything I can do to improve things.
EDIT: I've tried it. The only way I could get any reasonable response was to press the button repeatedly - but it was far from smooth and frankly not worth the effort. Sorry.
Hey, Marcus
Thanks for the reply, the plugin rock regardless. I noticed the same behavior with keystroke that I assign to the express keys. Strangely though the pre-assigned keys like ALT, CTRL, and Shift, all work fine as held keys. Oh well, so much for pure sculpting nirvana. :lol:
Thanks again!
marcus_civis
02-22-06, 02:32 AM
Strangely though the pre-assigned keys like ALT, CTRL, and Shift, all work fine as held keys. Oh well, so much for pure sculpting nirvana. :lol:
Thanks again!
Hi Enigma,
Yes, the Modifier keys work differently in ZB - they aren't automatically cleared. Perhaps ZB 2.5 will have better hotkey handling... :)
Cheers,
Hey Marcus super duper sweet script.
one issue that I am having with it however is if you are painting on the canvas and you use the "1" hotkey to change the RGB / Z intensity all the way to 0 instead of going to zero the RGB Intensity seems to go to 100 %. if you manually go and set it to 0 with the mouse it does indeed go all the way to 0% but not with the custom hotkey.
Not a huge deal just thought I would throw it out there.
Again very very very nice script. save a lot of time and make painting/modeling much more intuitive. ROCK ON
Hello again Marcus,
once again very awesome script.
I had one more suggestion for improvement on it however,
by default in zbrush when you hold down the "s" key you get a very similar effect as your script, it adjusts the Draw Size but not quite as intuitively as yours. you have to let off the mouse and manually move the slider. I am sure you are already aware of this.
However the very cool part about the default way is it brings up a little slider and tells you what number you are on and what you are editing.
a lot of times I work with all the tabs and windows hidden to maximize my workspace and so I don’t have the top panel where it says focal shift, draw size and z intensity displayed.
so I guess in short, my question is, is it possible to incorporate a tiny little slider with a number over your mouse when you hold down 1, 2 or s so that the user can tell what he/she is editing and what number they are changing it to, just like the default way that the hotkey “s” does it? Of course the way you change the number by just moving the mouse or pen would be nice to keep as well :D
Again, awesome script!
marcus_civis
05-07-06, 12:16 AM
Hi --E--,
Many thanks for your comments and I'm glad you like the plugin.
On your first issue (and apologies for the delay in replying): I can't reproduce this and don't know why you should be getting it. I have noticed that zscripts can work slightly differently on different set ups so perhaps this may be the problem.
On your second suggestion, this isn't practically possible within the limits of scripting. I will experiment with some indicator (perhaps in the NoteBar) when I get around to updating the plugin but as far as a slider goes it's an either or situation. All sliders in ZBrush will pop up at the cursor if they have a hotkey assigned but it's not possible to combine them with my script action.
Cheers,
marcus_civis
05-07-06, 03:03 AM
Well, I had a look at the script and here is an update. :)
Unzip the zip file into your ZStartup\ZPlugs folder. If you've installed the plugin before then the three new files should overwrite the old (the names are the same):
AdjDrawSize.zsc
AdjFocalShift.zsc
AdjZInt.zsc
Hotkeys as before. If you don't want any of the hotkeys simply delete the relevant file.
In this updated version the Draw Size, Focal Shift and Z Intensity are all indicated in the NoteBar at the top of the UI. This helps if you use a maximized workspace.
(--E-- : I have also included a line of code which may solve your ZIntensity problem - let me know!)
A tip for those who work with a maximized work space:
To stop the canvas being resized when you use the hotkeys (or many other plugins), drag the bottom canvas resize handle until it is almost at the bottom - about 5 pixels is right. Then store your UI configuration (Ctrl+Shift+I). The canvas will now remain at this size.
UIwindow.jpg
I hope you find the update useful,
Marcus! wow awesome as hell, that is even better than I would have wanted! Because the ui that tells you what you’re editing and the number you are changing it to, is off of the viewport and where you would be modeling! This is definitely in my top 2 fav scripts now :D
the "rgb intensity" being 100% when I use the "1" hotkey to go to zero is still there for me. But again not that big of a deal since who paints at 0?? ;)
this script rocks!!!!!!!!!!! great work! :D
jacquesBroquard
06-25-06, 03:00 PM
Hi,
I have noticed in some tutorials and manuals that people are able to set their draw size quite high (512). I seem to max out my draw size at 256. Any thoughts on how to go about getting larger draw sizes?
Best,
Jacques
Erklaerbar
06-25-06, 03:55 PM
preferences / draw / max brush size should let you set the max to 512
marcus_civis
09-01-06, 04:29 AM
Thanks for comments. :)
This small update enables you to change the hotkeys if you wish to using the Hotkey Editor (http://www.zbrushcentral.com/zbc/showthread.php?p=299481#post299481). In the Editor the plugins will be listed under the ZPlugin tab as MarcusTools:Focal Shift or whatever. Just assign the hotkey of your choice, and save the new hotkey before closing the Editor. You will need to restart ZBrush before the new hotkeys will be available.
Svengali
09-01-06, 05:03 AM
Hi Marcus,
I wondered if there was some specific ZScript command usage that you would recommend be applied in future scripts when coding HotKeys?
Sven
marcus_civis
09-01-06, 06:04 AM
I wondered if there was some specific ZScript command usage that you would recommend be applied in future scripts when coding HotKeys?
Hi Sven,
In general it won't be a problem - a hotkey assigned in the relevant part of the value elsewhere and that caused the problem. As you suggest, I think it would be useful to alert other zscripters to this and so I shall add a bit about it to the ZScript Code Samples (http://www.zbrushcentral.com/zbc/showthread.php?t=22826) thread and the ZBrush Wiki.
xueqing0622
11-22-06, 12:28 PM
Hi Marcus,
First, I'd love to use your Zplugin: Draw Size/ Focal Shift/Z Intensity Sweep.
Here is a little advise: When change the z intensity, I want to see the z intensity value show where the mouse is!!!
Because when I change the Draw Size/ Focal Shift, I can see the change by the mouse circle. But only change the Z Intensity, I must look up to check the value. It is realy bother me. I hope you can help me.
xueqing0622
11-22-06, 12:31 PM
Hi Marcus,
This is a little advise: When change the z intensity, I want to see the z intensity value show where the mouse is!!!
xueqing0622
11-22-06, 12:33 PM
Hi Marcus,
This is a little advise: When change the z intensity, I want to see the z intensity value show where the mouse is!!!
marcus_civis
11-22-06, 03:03 PM
Hi Marcus,
First, I'd love to use your Zplugin: Draw Size/ Focal Shift/Z Intensity Sweep.
Here is a little advise: When change the z intensity, I want to see the z intensity value show where the mouse is!!!
Because when I change the Draw Size/ Focal Shift, I can see the change by the mouse circle. But only change the Z Intensity, I must look up to check the value. It is realy bother me. I hope you can help me.
Hi xueqing0622,
Thanks for trying the plugin. I agree it would be good to see how the Z Intensity changes but unfortunately it can't be done in zscripting. :(
xueqing0622
11-22-06, 08:32 PM
Thanks for your reply, Marcus
I want to know it is any way to invoke plugin/order like z intensity(shift+I).
Kaizer_Soze
11-30-06, 05:32 PM
Thanks for the great plugin, Marcus !!! I love it :D :D :D
DigitalDreamer
12-24-06, 05:15 AM
Thanks Marcus for a great script. I've started using Zbrush again and recently downloaded your MaxCanvas script, It works really well with this plugin. But have you or anybody used Silo2 beta? their displacement painting works really well using just the - MMB - adjust radius and strength of the current brush. Drag left/right for radius, up/down for strength. This shortens key strokes even more (you don't use any) Would you be able to code a similar script like this?
A Merry Christmas to all. :D
marcus_civis
12-24-06, 05:46 AM
Thanks Marcus for a great script. I've started using Zbrush again and recently downloaded your MaxCanvas script, It works really well with this plugin. But have you or anybody used Silo2 beta? their displacement painting works really well using just the - MMB - adjust radius and strength of the current brush. Drag left/right for radius, up/down for strength. This shortens key strokes even more (you don't use any) Would you be able to code a similar script like this?
A Merry Christmas to all. :D
Hi DigitalDreamer,
I'm glad you like the plugin. :) Yes, I've used the Silo beta and I know the functionality you're talking of. It would certainly be possible to script something similar, though I shall probably leave doing it until the release of the update.
Happy Christmas to you!
Cheers,
DigitalDreamer
12-24-06, 06:25 AM
OK thanks Marcus, looking forward to that.
Merry Christmas to you! :D
marcus_civis
12-30-06, 04:22 AM
Marcus. thanks heaps for this little plug. i've been using it a good while now but one thing has always bugged me. and it might just be my setup. not sure. but i get this inconsistency with the resizing of my brush. seems like most of the time it evaluates the size from the left edge of the canvas ( the effect being that if my starting location is beyond 256 pixels from that edge. say. the cursor will jump straight to 256 in size. my default max. and i'll have to resize from there ). and sometimes it's even a little random. neither of these bahaviours are preferable. i'd like for the increase / decrease to begin from the current brush size and be calculated from there. would it be possible for you to make this edit ? or. alternatively. make public the code and i'd tinker with it myself ?
tacit math,
I'm glad you find the plugin useful. :)
The problems you are having may be due in part to your set up (zscripts appear to work slightly differently on different set ups) but also the nature of the script can also throw up these effects in specific circumstances. In part this stems from the fact that if you hold down the script hotkey (in this case 'S') the script continually reloads - a 'feature' of all zscripted plugins. I've had to script around this.
You'll appreciate that for the script to work I have to grab a starting point on the canvas and then measure mouse movement. This starting point is only deleted from memory when the mouse or pen button is clicked. (It can't be when the script exits for the reason given above.) So if you click the hotkey once, move the mouse to the right, then click the hotkey again there will be jump in Draw Size such as you describe. In my testing it's quite easy to do this inadvertently and perhaps that is what you are doing. (Note you should be able to adjust the size anywhere on the canvas area or background. If you can't check you have the latest version from post# 31.)
I'd certainly like to get rid of this behaviour and I hope to revisit the code soon.
Cheers,
vBulletin v3.0.3, Copyright ©2000-2010, Jelsoft Enterprises Ltd.