View Full Version : Simple Zscript & question
I made a simple script that picks up the color underneath the cursor when the 'c' key is pressed.
It works fine, but for an hour I thought it didn't because the color change didn't appear in the floating pallete. It was only when I opened up the color menu on the sidebar did I see the color change displayed. Does anybody have an idea why this happens? Is there a way to fix it?
At any rate, here is the script that you can insert into your favorite script if you like. Enjoy.
color_pick.txt (http://www2.zbrushcentral.com/zbc_uploads/user_file-1017216199jmy.txt)
Thanks Ken,
I have been wanting something like this for ages.
:D
Thanks Ken! This is going right into your commontools script. So much quicker and easier then having to click with the mouse, you're a genius!
Using the same idea I created a button to pick the material under the cursor, which I find useful as well.
[IButton,Material,"Place cursor over canvas, press M to pick Material.",
[Varset,B,[PixolPick,5,[MouseHPos] ,[MouseVPos]]]
[ISet,MATERIAL:ITEMINFO,B]
,,,'m'
]
about the color change didn't appear in the floating pallete you can try this just a idea colorpickerKENb.txt (http://www2.zbrushcentral.com/zbc_uploads/user_file-1017240106fph.txt)
but your going to have to tweak it to get it to work
the code was from davey a while back im sure it can be alterd to work.
Here is another
just a sample once your color is highlited you can click the colorbox but it wont change color until you move the tutrorial window a bit i don't know why so click in the color box and move the window a bit
colorpicker2.txt (http://www2.zbrushcentral.com/zbc_uploads/user_file-1017241056yga.txt) i know your wanting to see the color as its being picked but this is the best i can do for now i got to go to work..
but just a idea
Thanks for the help folks. Digits, that's a great addition too, since many times I forget what materials I might have on a layer. Awesome!
Hi, Ken -- nice work on this ZScript!
I can't offer you an explanation why the floating color palette doesn't update. However, I can offer you the next best thing: a workaround.
Add this to your ZScript, after the [IColorSet,R,G,B] command:
[IPress,3332]
[IClick,3331,10,10,11,11]
This will make it work. What's happening is, the IPress briefly selects the secondary color; the IClick clicks inside the Main color box. For whatever reason, this makes the floating palette refresh to show the new color.
Hope this helps :)
dave
thanks Davey! That does it. It's just nice to have the visual reference if you don't have the color palette open.
Powered by vBulletin® Version 4.1.11 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.