Adjusting transparency
As Im working on projects, I realized its a PITA to have to go into the material's properties, and adjust the transparency by hand. Is there an easier way to do this? Blendshape, MEL script, etc? Something that can be adjusted by a slider of some sort.
Its just annoying to have to change the transparency to something like 0.3, make a few adjustments according to my ref image, then go back in, and put it back to 0 once Im done..... thoughts? |
Hi I-Iybrid, if i understand correctly u want 2 switch between a bit of transparency to full transparency with something easy to get 2 right
well i'm no expert but u can use the "Time Slider" by simply "set key" to the transparency attribute. frame 1 = 0 transparency, frame 5 = transparency 0.3 so just scratch over the Time Slider Hope This Helps :beer: |
Never thought about key framing it.....good idea. I was hoping for more of a pop-up GUI window.... but the time slider idea would definately work.....
|
Turn on and off X-ray mode. Under shading (I think) in the panel menu set.
|
Quick script I whipped together.
Code:
string $material = "lambert2"; |
NextDesign,
that script errors out on me. Says "$material" is an undeclared variable. What am I doing wrong? lol |
The $material is defined outside the
"global proc transSliderButton( string $HUD )" So it will not work ... in the global... you must declare it so the script will go like that " global proc transSliderButton( string $HUD ) { string $material = "lambert2"; undoInfo -swf true; float $value = `hudSliderButton -q -v $HUD`; setAttr ($material + ".transparency") -type double3 $value $value $value ; } hudSliderButton -s 5 -b 5 -vis 1 -sl "Trans:" -value 0 -type "float" -min -0 -max 1 -slw 50 -vw 50 -sln 100 -bl "Close" -bw 60 -bsh "rectangle" -brc "headsUpDisplay -remove HUDTransSliderButton" -sdc "transSliderButton( \"HUDTransSliderButton\" )" HUDTransSliderButton; I hope i helped :) |
Ah, sorry about that. Yes, paste this script into your script editor, change "lambert2" to the name of your material, but make sure to keep the quotes, grab that line, and paste it into the function, and run it.
Good catch mate. |
I tried it . It works just fine i'll use it too. I was looking for something like that ... :beer:
|
Thanks for the help, guys! Im JUST starting to get into MEL scripting, so when it errored out, I was like "ok...wtf do I do now?"
But yea, it works like a charm. Thanks for the script! Quick question tho.... would it be possible to make that slider in a seperate window? So when you run the script, it opens up a new window, sort of like the blendshape editor.... If I knew more about scripting, I could do it myself. But...Im a putz when it comes to programming of any kind. Unless its Visual Basic...that I know ALITTLE of. lol |
All times are GMT. The time now is 02:14 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Simply Maya 2018