Me and friends just working on some big shot and found Some annoying thing that vray proxies had.
If you create Vray proxies and tick the "Automatically create proxies" It's work fine on that scence you got a shaders.
But!!!!
If you import normal Proxies and it's didn't get shaders for you. just a name of it that they had.
so you must to import material and replace it one by one.
in the Vraymeshmtl >> shaders
so it had a name that matching your shaders name import in.
The concept just simple we just detect the name and get the shader assign on it own just that!!!
Here it a script and me and my friends want vray to put some button like this in.....
- Original Idea & Concept By : Manatjosef khamphan (jooldschool)
jooldscool@gmail.com
- Scriping By : Akkarin Sorhasan (Cyangryphon)
cyangryphon@gmail.com
////////////////////// How to use //////////////////////
If you create Vray proxies and tick the "Automatically create proxies" It's work fine on that scence you got a shaders.
But!!!!
If you import normal Proxies and it's didn't get shaders for you. just a name of it that they had.
so you must to import material and replace it one by one.
in the Vraymeshmtl >> shaders
so it had a name that matching your shaders name import in.
The concept just simple we just detect the name and get the shader assign on it own just that!!!
Here it a script and me and my friends want vray to put some button like this in.....
Code:
//////////////////////////////////////////////////////////////////////////// //////////////////////////// Windows Zome ////////////////////////////////// /////////////////////////////////////////////////////////////////////////// if (`window -exists VrayAA`) { deleteUI VrayAA; windowPref -remove VrayAA; } window -widthHeight 200 210 -menuBar true -t "Sync_Proxy" -s 0 VrayAA; columnLayout clolumn; text -label "Sync_Proxy" -fn boldLabelFont -bgc 0.084 0.084 0.084 -w 200 -h 20 optionBar; text ""; text " 1. import Proxy"; text " 2. import Shader"; text " 3. Merge Name space with root "; text " 4. Hit Button !!!!!!"; text " "; button -l "Sync_Proxy" -w 100 -h 30 -c "VrayProxy_AutoAssign"; text " "; text "5. check it's work?"; showWindow VrayAA; /////////////////////// // ==================================================================== ///////////////////////////// VrayProxy_AutoAssign ///////////////////////////////// // ==================================================================== // // // Original Idea & Concept By : Manatjosef khamphan (jooldschool) // jooldscool@gmail.com // // Scriping By : Akkarin Sorhasan (Cyangryphon) // cyangryphon@gmail.com // // // ==================================================================== global proc VrayProxy_AutoAssign() { string $GvrMesh[] = `ls -typ "VRayMeshMaterial"`; string $msg = "\n===================\n//result//\n"; string $miss = "\n\n----------\nMissing Shader\n"; string $Cnect = "\n----------\nConnect Shader\n"; for ($e in $GvrMesh) { $ShaderMax = `getAttr -size ($e + ".shaderNames")`; for ($i=0;$i<$ShaderMax;$i++) { $GSdname = `getAttr ($e + ".shaderNames[" + $i + "]")`; if (`objExists $GSdname`) { //if alredy connect if (`vrayShaderConnectionDefaultTraversal ($e + ".shaders[" + $i + "]")` == $GSdname ) { $Cnect += "\nAlredy connect: " + $GSdname + " ==> " + ($e + ".shaders[" + $i + "]") ; }else { connectAttr -f ($GSdname + ".outColor") ($e + ".shaders[" + $i + "]"); $Cnect += "\nConnect Shader : " + $GSdname + " ==> " + ($e + ".shaders[" + $i + "]") ; } }else { $miss += "\nMissing Shader : " + $GSdname + " ==> " + ($e + ".shaders[" + $i + "]") ; } } } $msg += $Cnect + $miss +"\n\n\nDone~~\n==================="; print $msg; } ///////////////////////////////////////
jooldscool@gmail.com
- Scriping By : Akkarin Sorhasan (Cyangryphon)
cyangryphon@gmail.com
////////////////////// How to use //////////////////////
Comment