Hi, All !
MoonDoggie i've just followed your dev to make a complete VRay_Quickcreate Dialog. Very simple, but can be useful for Cecofuli, dlparisi and perhaps some other users !
Here is the complete dialog :
And here's the maxscript code (EDIT on 03/04/09 : new working code - last one was truncated !?)
MoonDoggie, i'm interested by the dockable resources, if it's not a problem for you, of course
MoonDoggie i've just followed your dev to make a complete VRay_Quickcreate Dialog. Very simple, but can be useful for Cecofuli, dlparisi and perhaps some other users !
Here is the complete dialog :
And here's the maxscript code (EDIT on 03/04/09 : new working code - last one was truncated !?)
Code:
macroScript VRayToolbar category:"VRay" tooltip:"VRayToolbar" ( global rlt_VRayToolbar -- sets the variable for the rollout try (destroyDialog rlt_VRayToolbar) catch () -- This attempts to close the VRayToolbar if it's already opened rollout rlt_VRayToolbar "VRay Toolbar" width:92 height:420 ( button btn_CreateVRayLightPlane "Plane" pos:[8,24] width:76 height:20 button btn_CreateVRayLightDome "Dome" pos:[8,44] width:76 height:20 button btn_CreateVRayLightSphere "Sphere" pos:[8,64] width:76 height:20 button btn_CreateVRayLightMesh "Mesh" pos:[8,84] width:76 height:20 button btn_CreateVRaySunSky "Sun + Sky" pos:[8,108] width:76 height:20 button btn_CreateVRayGeomPlane "Vray Plane" pos:[8,216] width:76 height:20 button btn_CreateVRayGeomSphere "Vray Sphere" pos:[8,236] width:76 height:20 button btn_CreateVRayGeomProxy "Vray Proxy" pos:[8,256] width:76 height:20 button btn_CreateVRayGeomFur "Vray Fur" pos:[8,276] width:76 height:20 button btn_CreateVRayCamDome "Dome Cam" pos:[8,152] width:76 height:20 button btn_CreateVRayCamPhysCam "Phys. Cam" pos:[8,172] width:76 height:20 button btn_CreateVRayModifDisplace "Displace Mod" pos:[8,320] width:76 height:20 button btn_Meditor "Materials..." pos:[8,368] width:76 height:20 button btn_ShowLast "Last Render" pos:[8,392] width:76 height:20 GroupBox grp1 "Vray Lights" pos:[4,8] width:84 height:124 GroupBox grp2 "Vray Geom." pos:[4,200] width:84 height:100 GroupBox grp3 "Vray Cameras" pos:[4,136] width:84 height:60 GroupBox grp4 "Modifiers" pos:[4,304] width:84 height:40 groupBox grp11 "Other" pos:[4,352] width:84 height:64 local thetype local sourcenode fn setType obj = ( obj.type = thetype ) fn setfur obj = ( obj.sourceNode = $ ) on btn_CreateVRayLightPlane pressed do ( thetype = 0 startObjectCreation VrayLight newNodeCallback:setType ) on btn_CreateVRayLightDome pressed do ( thetype = 1 startObjectCreation VrayLight newNodeCallback:setType ) on btn_CreateVRayLightSphere pressed do ( thetype = 2 startObjectCreation VrayLight newNodeCallback:setType ) on btn_CreateVRayLightMesh pressed do ( thetype = 3 startObjectCreation VrayLight newNodeCallback:setType ) on btn_CreateVRaySunSky pressed do startObjectCreation VraySun on btn_CreateVRayGeomPlane pressed do startObjectCreation Vrayplane on btn_CreateVRayGeomSphere pressed do startObjectCreation VraySphere on btn_CreateVRayGeomProxy pressed do startObjectCreation Vrayproxy on btn_CreateVRayGeomFur pressed do ( if superclassof $ == GeometryClass then ( startObjectCreation Vrayfur newNodeCallback:setfur ) else messagebox("Please choose a valid object first...") ) on btn_CreateVRayCamDome pressed do startObjectCreation Vraydomecamera on btn_CreateVRayCamPhysCam pressed do startObjectCreation Vrayphysicalcamera on btn_CreateVRayModifDisplace pressed do ( if $ != undefined then modPanel.addModToSelection (VRayDisplacementMod ()) ui:on else messagebox("You need to select something...") ) on btn_Meditor pressed do ( if MatEditor.isOpen() then MatEditor.Close() else MatEditor.open() ) on btn_ShowLast pressed do ( try( if Renderers.current.output_on then Renderers.current.showLastVFB() else max show last img ) catch(messagebox ("You need to use Vray as default renderer...")) ) ) createdialog rlt_VRayToolbar 90 420 )
Run the above code, and go into your Customize->Customize User Interface->Toolbars and go to the category "VRay" and drag "VRayToolbar to a toolbar, anytime you want your toolbar to popup, just click the button! If you want it dockable etc, I can point you to those resources as well. Hope this helps.
Comment