Making some progress on this sculpt.
Also some Scripting for pymel.
import maya.cmds as cmds
import maya.mel as mel
cmds.setAttr("defaultRenderGlobals.currentRenderer", "mentalRay",type="string")
def RenderMenu():
if cmds.window("RenderWindow", exists=1):
cmds.deleteUI("RenderWindow", window=1)
RenderWindow=cmds.window("RenderWindow", title="Render Options")
cmds.rowColumnLayout(numberOfColumns=1) #sets overall layout
cmds.frameLayout( label='Indirect Lighting', borderStyle='in' )
cmds.iconTextCheckBox( style='iconAndTextVertical', image1='render_envSky.png', label='Physical Sun And Sky',onc="SunSkyOn()", ofc="SunSkyOff()")
cmds.button( label='Sun And Sky Options', command="SunNSkyMenu()" )
cmds.iconTextCheckBox( style='iconAndTextVertical', image1='render_envBall.png', label='Image Based Lighting', onc="IBon()", ofc="IBoff()")
cmds.button( label='Image Based Options', command="IBLMenu()" )
cmds.frameLayout( label='Final Gather', borderStyle='in' )
cmds.checkBoxGrp( numberOfCheckBoxes=1, label='Final Gather',v1=0, onc="FGon()", ofc="FGoff()") #turns Final Gather on and off
cmds.floatSliderGrp( label='FG Weight', field=True, minValue=0.0, maxValue=100.0, fieldMinValue=0.0, fieldMaxValue=100.0, value=0 )
cmds.frameLayout( label='Global Illumination', borderStyle='in' )
cmds.checkBoxGrp( numberOfCheckBoxes=1, label='Global Illumination',v1=0, onc="GIon()", ofc="GIoff()") #turns Global Illum on and off
cmds.floatSliderGrp( label='GI Weight', field=True, minValue=0.0, maxValue=100.0, fieldMinValue=0.0, fieldMaxValue=100.0, value=0 )
cmds.checkBoxGrp( numberOfCheckBoxes=1, label='Importons',v1=0, onc="IPon()", ofc="IPoff()")
cmds.checkBoxGrp( numberOfCheckBoxes=1, label='Irradiance Particles',v1=0, onc="IRon()", ofc="IRoff()")
cmds.frameLayout( label='Render', borderStyle='in' )
cmds.checkBoxGrp(numberOfCheckBoxes=1, label='Ambient Occlusion',v1=0, onc="AOon()", ofc="AOoff()")
cmds.floatSliderGrp( label='AO Inensity', field=True, minValue=0.0, maxValue=100.0, fieldMinValue=0.0, fieldMaxValue=100.0, value=0 )
cmds.frameLayout( label='Render', borderStyle='in' )
ImgWidth=cmds.intSliderGrp( field=1, label='Image Width', value=640, min=2, max=1920, fieldMinValue=2, fieldMaxValue=10000)
ImgHeight=cmds.intSliderGrp( field=1, label='Image Height', value=480, min=2, max=1080, fieldMinValue=2, fieldMaxValue=10000 )
DPI=cmds.floatSliderGrp(pre=0, field=1, label='Image Resolution', value=72.000, min=2.000, max=300.000, fieldMinValue=2.000, fieldMaxValue=1000.000)
cmds.floatSliderGrp( label='Overall Quality', field=True, minValue=0.0, maxValue=100.0, fieldMinValue=0.0, fieldMaxValue=100.0, value=0 ) #controls quality of render
cmds.separator( height=40, style='in' )
cmds.button(label="Render Camera One", command="RenderCam1()")
cmds.connectControl(ImgWidth, "defaultResolution.w")
cmds.connectControl(ImgHeight, "defaultResolution.h")
cmds.connectControl(DPI, "defaultResolution.dpi")
cmds.showWindow(RenderWindow)
def DPI():
cmds.setAttr("defaultResolution.dpi")
def SunNSkyMenu():
if cmds.window("SunWindow", exists=1):
cmds.deleteUI("SunWindow", window=1)
cmds.window("SunWindow", title="Sun And Sky Options")
cmds.frameLayout(label='Sun And Sky', borderStyle='in' )
Mult=cmds.floatSliderGrp( label='Light Intensity',pre=3, field=True, minValue=0.0, maxValue=2.5, fieldMinValue=0.0, fieldMaxValue=10.0, value=0 ) #controls intensity of sun
cmds.attrColorSliderGrp( at='mia_physicalsky1.ground_color')
cmds.attrColorSliderGrp( at='mia_physicalsky1.night_color')
Haze=cmds.floatSliderGrp( label='Haze', field=True, minValue=0.0, maxValue=10.0, fieldMinValue=0.0, fieldMaxValue=30.0, value=0 ) #controls intensity of haze
RBShift=cmds.floatSliderGrp( label='Red/Blue Shift', field=True, minValue=-1.0, maxValue=1.0, fieldMinValue=-10.0, fieldMaxValue=10.0, value=0 ) #controls light shift from red to blue
SunSat=cmds.floatSliderGrp( label='Saturation', field=True, minValue=0.0, maxValue=10.0, fieldMinValue=0.0, fieldMaxValue=1000.0, value=1 ) #controls sun saturation
HorizH=cmds.floatSliderGrp( label='Horizon Height', field=True, minValue=-2.0, maxValue=2.0, fieldMinValue=-2.0, fieldMaxValue=2.0, value=0 ) #controls height of horizon
HorizB=cmds.floatSliderGrp( label='Horizon Blur', field=True, minValue=-2.0, maxValue=2.0, fieldMinValue=-2.0, fieldMaxValue=2.0, value=0 ) #controls horizon blur
SunIn=cmds.floatSliderGrp( label='Sun Intensity',pre=3, field=True, minValue=0.0, maxValue=5.0, fieldMinValue=0.0, fieldMaxValue=10.0, value=0 ) #controls sun shape intensity
SunSi=cmds.floatSliderGrp( label='Sun Size', field=True, minValue=0.0, maxValue=20.0, fieldMinValue=0.0, fieldMaxValue=1000.0, value=0 ) #controls horizon height
SunGl=cmds.floatSliderGrp( label='Sun Glow', field=True, minValue=-5.0, maxValue=5.0, fieldMinValue=-100.0, fieldMaxValue=100.0, value=0 ) #controls horizon height
cmds.connectControl(Haze, "mia_physicalsky1.haze")
cmds.connectControl(RBShift, "mia_physicalsky1.redblueshift")
cmds.connectControl(SunSat, "mia_physicalsky1.saturation")
cmds.connectControl(HorizH, "mia_physicalsky1.horizon_height")
cmds.connectControl(HorizB, "mia_physicalsky1.horizon_blur")
cmds.connectControl(SunIn, "mia_physicalsky1.sun_disk_intensity")
cmds.connectControl(SunSi, "mia_physicalsky1.sun_disk_scale")
cmds.connectControl(SunGl, "mia_physicalsky1.sun_glow_intensity")
cmds.connectControl(Mult, "mia_physicalsky1.multiplier")
cmds.showWindow("SunWindow")
def AOon():
cmds.setAttr(
def IBLImport():
mel.eval('AEfilenameBrowser "AEassignFilenameCB mentalrayIblShape1.texture";')
def invertOff():
cmds.setAttr('mentalrayIblShape1.invert', 0)
def invertOn():
cmds.setAttr('mentalrayIblShape1.invert', 1)
def alphaLumOn():
cmds.setAttr('mentalrayIblShape1.alphaIsLuminance', 1)
def alphaLumOff():
cmds.setAttr('mentalrayIblShape1.alphaIsLuminance', 0)
def IBLVisOn():
cmds.setAttr ("mentalrayIblShape1.primaryVisibility", 1)
def IBLVisOff():
cmds.setAttr ("mentalrayIblShape1.primaryVisibility", 0)
def IBLEnvOn():
cmds.setAttr ("mentalrayIblShape1.visibleInEnvironment", 1)
def IBLEnvOff():
cmds.setAttr ("mentalrayIblShape1.visibleInEnvironment", 0)
def IBLSecReflOn():
cmds.setAttr ("mentalrayIblShape1.visibleInReflections", 1)
def IBLSecReflOff():
cmds.setAttr ("mentalrayIblShape1.visibleInReflections", 0)
def IBLRefrOn():
cmds.setAttr ("mentalrayIblShape1.visibleInRefractions", 1)
def IBLRefrOff():
cmds.setAttr ("mentalrayIblShape1.visibleInRefractions", 0)
def IBLFGOn():
cmds.setAttr ("mentalrayIblShape1.visibleInFinalGather", 1)
def IBLFGOff():
cmds.setAttr ("mentalrayIblShape1.visibleInFinalGather", 0)
def IBLEvoOptOn():
cmds.setAttr ("mentalrayIblShape1.overrideEnvColorFx", 1)
def IBLEvoOptOff():
cmds.setAttr ("mentalrayIblShape1.overrideEnvColorFx", 0)
def IBLInvEvoOn():
cmds.setAttr ("mentalrayIblShape1.envInvert", 1)
def IBLInvEvoOff():
cmds.setAttr ("mentalrayIblShape1.envInvert", 0)
def IBLMenu():
if cmds.window("IBLWindow", exists=1):
cmds.deleteUI("IBLWindow", window=1)
cmds.window("IBLWindow", title="Image Based Options") #creates sub windows
cmds.scrollLayout( 'scrollLayout' )
cmds.frameLayout( label='Image Based Lighting', borderStyle='out' )
cmds.frameLayout( label='General', borderStyle='in' )
cmds.button(label='Import File', command="IBLImport()")
IBLExpos=cmds.floatSliderGrp( label='Exposure', field=True, minValue=-10.0, maxValue=10.0, fieldMinValue=-10.0, fieldMaxValue=10.0, value=0 ) #controls exposure
IBLAlpha=cmds.floatSliderGrp(pre=3, label='Alpha', field=True, minValue=0.0, maxValue=1.0, fieldMinValue=-0.0, fieldMaxValue=1.0, value=.5 ) #controls alpha
cmds.connectControl(IBLExpos, "mentalrayIblShape1.hardwareExposure")
cmds.connectControl(IBLAlpha, "mentalrayIblShape1.hardwareAlpha")
cmds.attrColorSliderGrp( at='mentalrayIblShape1.colorGain')
cmds.attrColorSliderGrp( at='mentalrayIblShape1.colorOffset')
cmds.checkBoxGrp( numberOfCheckBoxes=1, label='Invert',v1=0, onc="invertOn()", ofc="invertOff()")
cmds.checkBoxGrp( numberOfCheckBoxes=1, label='Alpha Luminance',v1=0, onc="alphaLumOn()", ofc="alphaLumOff()")
cmds.frameLayout( label='Render Stats', borderStyle='in' )
cmds.checkBoxGrp( numberOfCheckBoxes=1, label='Visibility',v1=1, onc="IBLVisOn()", ofc="IBLVisOff()")
cmds.checkBoxGrp( numberOfCheckBoxes=1, label='Visible As Evnironment',v1=1, onc="IBLEnvOn()", ofc="IBLEnvOff()")
cmds.checkBoxGrp( numberOfCheckBoxes=1, label='Visible Secondary Reflections',v1=1, onc="IBLSecReflOn()", ofc="IBLSecReflOff()")
cmds.checkBoxGrp( numberOfCheckBoxes=1, label='Visible In Refractions',v1=1, onc="IBLRefrOn()", ofc="IBLRefrOff()")
cmds.checkBoxGrp( numberOfCheckBoxes=1, label='Visible In Final Gather',v1=1, onc="IBLFGOn()", ofc="IBLFGOff()")
cmds.checkBoxGrp( numberOfCheckBoxes=1, label='Adjust Environment Color',v1=0, onc="IBLEvoOptOn()", ofc="IBLEvoOptOff()")
cmds.checkBoxGrp( numberOfCheckBoxes=1, label='Invert',v1=0, onc="IBLInvEvoOn()", ofc="IBLInvEvoOff()")
cmds.attrColorSliderGrp( at="mentalrayIblShape1.envColorGain")
cmds.attrColorSliderGrp( at="mentalrayIblShape1.envColorOffset")
cmds.checkBoxGrp( numberOfCheckBoxes=1, label='Adjust Final Gather Color',v1=0, onc="IBLFGColOn()", ofc="IBLFGColOff()")
cmds.checkBoxGrp( numberOfCheckBoxes=1, label='Invert',v1=0, onc="IBLFGColInvOn()", ofc="IBLFGColInvOff()")
cmds.attrColorSliderGrp( at="mentalrayIblShape1.fgColorGain")
cmds.attrColorSliderGrp( at="mentalrayIblShape1.fgColorOffset")
IBLFGFilter=cmds.floatSliderGrp(pre=3, label='Filter Size', field=True, minValue=0.0, maxValue=1.0, fieldMinValue=0.0, fieldMaxValue=5.0, value=0.005 )
cmds.connectControl(IBLFGFilter, "mentalrayIblShape1.fgFilterSize")
cmds.frameLayout( label='Light Emission', borderStyle='in' )
cmds.checkBoxGrp( numberOfCheckBoxes=1, label='Emit Light',v1=0, onc="IBLEmitOn()", ofc="IBLEmitOff()")
IBLEmitFocVar=cmds.floatSliderGrp(pre=3, label='Vary Light Focus', field=True, minValue=0.0, maxValue=1.0, fieldMinValue=0.0, fieldMaxValue=5.0, value=0.800 )
cmds.connectControl(IBLEmitFocVar, "mentalrayIblShape1.jitter")
cmds.checkBoxGrp( numberOfCheckBoxes=1, label='Disable Back Lighting',v1=1, onc="IBLskipBackOn()", ofc="IBLskipBackOff()")
cmds.checkBoxGrp( numberOfCheckBoxes=1, label='Emit Diffuse',v1=1, onc="IBLemitDiffuseOn()", ofc="IBLemitDiffuseOff()")
cmds.checkBoxGrp( numberOfCheckBoxes=1, label='Emit Specular',v1=1, onc="IBLemitSpecularOn()", ofc="IBLemitSpecularOff()")
cmds.checkBoxGrp( numberOfCheckBoxes=1, label='Ray Trace Shadows',v1=1, onc="IBLuseRayTraceShadowsOn()", ofc="IBLuseRayTraceShadowsOff()")
cmds.attrColorSliderGrp( at="mentalrayIblShape1.shadowColor")
cmds.checkBoxGrp( numberOfCheckBoxes=1, label='Adjust Light',v1=0, onc="IBLAdjLightColOn()", ofc="IBLAdjLightColOff()")
cmds.checkBoxGrp( numberOfCheckBoxes=1, label='Invert',v1=0, onc="IBLAdjLightINVOn()", ofc="IBLAdjLightINVOff()")
cmds.attrColorSliderGrp( at="mentalrayIblShape1.lightColorGain")
cmds.attrColorSliderGrp( at="mentalrayIblShape1.lightColorOffset")
cmds.showWindow("IBLWindow")
def IBLAdjLightINVOn():
cmds.setAttr("mentalrayIblShape1.lightInvert", 1)
def IBLAdjLightINVOff():
cmds.setAttr("mentalrayIblShape1.lightInvert", 0)
def IBLAdjLightColOn():
cmds.setAttr("mentalrayIblShape1.overrideLightColorFx", 1)
def IBLAdjLightColOff():
cmds.setAttr("mentalrayIblShape1.overrideLightColorFx", 0)
def IBLskipBackOn():
cmds.setAttr("mentalrayIblShape1.skipBack", 1)
def IBLskipBackOff():
cmds.setAttr("mentalrayIblShape1.skipBack", 0)
def IBLemitDiffuseOn():
cmds.setAttr("mentalrayIblShape1.emitDiffuse", 1)
def IBLemitDiffuseOff():
cmds.setAttr("mentalrayIblShape1.emitDiffuse", 0)
def IBLemitSpecularOn():
cmds.setAttr("mentalrayIblShape1.emitSpecular", 1)
def IBLemitSpecularOff():
cmds.setAttr("mentalrayIblShape1.emitSpecular", 0)
def IBLuseRayTraceShadowsOn():
cmds.setAttr("mentalrayIblShape1.useRayTraceShadows", 1)
def IBLuseRayTraceShadowsOff():
cmds.setAttr("mentalrayIblShape1.useRayTraceShadows", 0)
def IBLEmitOn():
cmds.setAttr("mentalrayIblShape1.emitLight", 1)
def IBLEmitOff():
cmds.setAttr("mentalrayIblShape1.emitLight", 0)
def IBLFGColOn():
cmds.setAttr("mentalrayIblShape1.overrideFgColorFx", 1)
def IBLFGColOff():
cmds.setAttr("mentalrayIblShape1.overrideFgColorFx", 0)
def IBLFGColInvOn():
cmds.setAttr("mentalrayIblShape1.fgInvert", 1)
def IBLFGColInvOff():
cmds.setAttr("mentalrayIblShape1.fgInvert", 0)
def SunSkyOn():
mel.eval("miCreateSunSky;")
def SunSkyOff():
mel.eval("miDeleteSunSky; refreshAE; miUpdateSunSky;")
if cmds.window("SunWindow", exists=1):
cmds.deleteUI("SunWindow", window=1) #creates and deletes Physical Sun N Sky
def IBon():
mel.eval("miCreateIbl;")
def IBoff():
mel.eval("miDeleteIbl; refreshAE; miUpdateIbl;")
if cmds.window("IBLWindow", exists=1):
cmds.deleteUI("IBLWindow", window=1) #creates and deletes Image Based Lighting
def FGon():
cmds.setAttr ("miDefaultOptions.finalGather", 1)
def FGoff():
cmds.setAttr ("miDefaultOptions.finalGather", 0) #turns Final Gather on and off
def GIon():
cmds.setAttr ("miDefaultOptions.globalIllum", 1)
def GIoff():
cmds.setAttr ("miDefaultOptions.globalIllum", 0) #turns Global Illumination on and off
def IRon():
mel.eval('setAttr -type "string" miDefaultOptions.stringOptions[14].value "true";')
def IRoff():
mel.eval('setAttr -type "string" miDefaultOptions.stringOptions[14].value "false";')
def IPon():
mel.eval('setAttr -type "string" miDefaultOptions.stringOptions[3].value "true";')
def IPoff():
mel.eval('setAttr -type "string" miDefaultOptions.stringOptions[3].value "false";')
def RenderCam1():
mel.eval('renderWindowRenderCamera render renderView camera1;')