def DefaultSetupAE(pluginName, nodeType, translator, asShape=True):
   import pymel.core as pm
   if not pm.pluginInfo(pluginName, query=1, loaded=1):
      return
  
   try:
      import mtoa.ui.ae.templates as templates
      
      if not asShape:
         class DefaultNodeTemplate(templates.AttributeTemplate):
            def setup(self):
               self.addControl("aiUserOptions", label="User Options")
         
         templates.registerTranslatorUI(DefaultNodeTemplate, nodeType, translator)
      
      else:
         class DefaultShapeTemplate(templates.ShapeTranslatorTemplate):
            def setup(self):
               #self.renderStatsAttributes()
               self.commonShapeAttributes()
               self.addSeparator()
               #self.addControl("aiSssSampleDistribution", label="SSS Samples Distribution")
               #self.addControl("aiSssSampleSpacing", label="SSS Sample Spacing")
               self.addControl("aiSssSetname", label="SSS Set Name")
               self.addSeparator()
               self.addControl("aiUserOptions", label="User Options")
               self.addSeparator()
         
         templates.registerTranslatorUI(DefaultShapeTemplate, nodeType, translator)
      
   except Exception, e:
      print("scriptedTranslatorUtils.DefaultSetupAE: Failed\n%s" % e)
Пример #2
0
def DefaultSetupAE(pluginName, nodeType, translator, asShape=True):
    import pymel.core as pm
    if not pm.pluginInfo(pluginName, query=1, loaded=1):
        return

    try:
        import mtoa.ui.ae.templates as templates

        if not asShape:

            class DefaultNodeTemplate(templates.AttributeTemplate):
                def setup(self):
                    self.addControl("aiUserOptions", label="User Options")

            templates.registerTranslatorUI(DefaultNodeTemplate, nodeType,
                                           translator)

        else:

            class DefaultShapeTemplate(templates.ShapeTranslatorTemplate):
                def setup(self):
                    #self.renderStatsAttributes()
                    self.commonShapeAttributes()
                    self.addSeparator()
                    #self.addControl("aiSssSampleDistribution", label="SSS Samples Distribution")
                    #self.addControl("aiSssSampleSpacing", label="SSS Sample Spacing")
                    self.addControl("aiSssSetname", label="SSS Set Name")
                    self.addSeparator()
                    self.addControl("aiUserOptions", label="User Options")
                    self.addSeparator()

            templates.registerTranslatorUI(DefaultShapeTemplate, nodeType,
                                           translator)

    except Exception, e:
        print("scriptedTranslatorUtils.DefaultSetupAE: Failed\n%s" % e)
        self.addControl("lightVisible")
        
        self.addSeparator()
        
        self.addCommonParameters()

        self.addSeparator()

        self.commonLightAttributes(False)

        self.beginLayout('Subdivision', collapse=True)
        self.addControl("aiSubdivType", label="Type")
        self.addControl("aiSubdivIterations", label="Iterations")
        self.addControl("aiSubdivAdaptiveMetric", label="Adaptive Metric")
        self.addControl("aiSubdivPixelError", label="Pixel Error")
        # TODO: add dicing camera UI
        self.addControl("aiSubdivDicingCamera", label="Dicing Camera")
        self.addControl("aiSubdivUvSmoothing", label="UV Smoothing")
        self.addControl("aiSubdivSmoothDerivs", label="Smooth Tangents")
        self.endLayout()

        self.addControl("aiUserOptions", "User Options")


templates.registerAETemplate(templates.TranslatorControl, "aiAreaLight", label="Light Shape")
templates.registerTranslatorUI(QuadAreaLightTemplate, "aiAreaLight", "quad")
templates.registerTranslatorUI(BaseAreaLightTemplate, "aiAreaLight", "cylinder")
templates.registerTranslatorUI(BaseAreaLightTemplate, "aiAreaLight", "disk")
templates.registerDefaultTranslator('aiAreaLight', "quad")
templates.registerTranslatorUI(MeshLightTemplate, "mesh", "mesh_light")
		self.beginLayout("Focus Distance", collapse=False)
		self.addControl("aiFocusDistance", label="Distance")
		self.addControl("aiFocusPlaneIsPlane", label="Focal Plane is a Plane")
		self.addControl("aiRecalculateDistanceForSideCameras", label="Recalculate Focus Distance for Left and Right Cameras")
		self.endLayout()

		self.beginLayout("Aperture", collapse=False)
		self.addControl("aiApertureSize", label="Size")
		self.addControl("aiApertureAspectRatio", label="Aspect Ratio")
		self.addControl("aiUsePolygonalAperture", label="Polygonal Aperture")
		self.addControl("aiApertureBlades", label="Blades")
		self.addControl("aiApertureBladeCurvature", label="Blade Curvature")
		self.addControl("aiApertureRotation", label="Rotation")
		
		self.beginLayout("Bokeh Quality", collapse=False)
		self.addControl("aiBokehInvert", label="Invert")
		self.addControl("aiBokehBias", label="Bias")
		self.addControl("aiBokehGain", label="Gain")
		self.endLayout()
		
		self.endLayout() #End of Aperture Layout
		
		self.endLayout()     # end Obq_StereoLens layout

		self.beginLayout("Options", collapse=True)
		self.addControl("aiUserOptions", label="User Options")
		self.endLayout()

templates.registerTranslatorUI(Obq_StereoLensTemplate, "camera", "Obq_StereoLens")
#templates.registerTranslatorUI(Obq_StereoLensTemplate, "stereoRigCamera", "Obq_StereoLens")
Пример #5
0
import mtoa.ui.ae.templates as templates
class aiVRCameraTemplate(templates.AttributeTemplate):
    def setup(self):
        self.beginLayout("Main Attributes", collapse=False)
        self.addControl("aiMode")
        self.addControl("aiProjection")
        self.addControl("aiEyeSeparation")
        self.addControl("aiEyeToNeckDistance")
        self.endLayout()
        
        self.beginLayout("Pole Merging", collapse=False)
        self.addControl("aiTopMergeMode")
        self.addControl("aiTopMergeAngle")
        self.addControl("aiTopMergeExp")
        self.addSeparator()
        self.addControl("aiBottomMergeMode")
        self.addControl("aiBottomMergeAngle")
        self.addControl("aiBottomMergeExp")
        self.addSeparator()
        self.addControl("aiMergeShader")
        self.endLayout()

        
templates.registerTranslatorUI(aiVRCameraTemplate, "camera", "vr_camera")
Пример #6
0
import mtoa.ui.ae.templates as templates


class aiOculusCameraTemplate(templates.AttributeTemplate):
    def setup(self):
        self.beginLayout("Main Attributes", collapse=False)
        self.addControl("aiMode")
        self.addControl("aiEyeSeparation")
        self.endLayout()

        self.beginLayout("Pole Merging", collapse=False)
        self.addControl("aiTopMergeMode")
        self.addControl("aiTopMergeAngle")
        self.addControl("aiTopMergeExp")
        self.addSeparator()
        self.addControl("aiBottomMergeMode")
        self.addControl("aiBottomMergeAngle")
        self.addControl("aiBottomMergeExp")
        self.endLayout()


templates.registerTranslatorUI(aiOculusCameraTemplate, "camera",
                               "oculusCamera")
Пример #7
0
		
		# self.addControl("position", label="Position", annotation="Position")
		# self.addControl("look_at", label="Look At", annotation="Look At")
		# self.addControl("up", label="Up", annotation="Up")
		# self.addControl("matrix", label="Matrix", annotation="Matrix")
		# self.addControl("near_clip", label="Near Clip", annotation="Near Clip")
		# self.addControl("far_clip", label="Far Clip", annotation="Far Clip")
		# self.addControl("shutter_start", label="Shutter Start", annotation="Shutter Start")
		# self.addControl("shutter_end", label="Shutter End", annotation="Shutter End")
		# self.addControl("shutter_type", label="Shutter Type", annotation="Shutter Type")
		# self.addControl("shutter_curve", label="Shutter Curve", annotation="Shutter Curve")
		# self.addControl("rolling_shutter", label="Rolling Shutter", annotation="Rolling Shutter")
		# self.addControl("rolling_shutter_duration", label="Rolling Shutter Duration", annotation="Rolling Shutter Duration")
		# self.addControl("filtermap", label="Filtermap", annotation="Filtermap")
		# self.addControl("handedness", label="Handedness", annotation="Handedness")
		# self.addControl("time_samples", label="Time Samples", annotation="Time Samples")
		# self.addControl("screen_window_min", label="Screen Window Min", annotation="Screen Window Min")
		# self.addControl("screen_window_max", label="Screen Window Max", annotation="Screen Window Max")
		# self.addControl("exposure", label="Exposure", annotation="Exposure")

		self.endNoOptimize()

		self.endLayout()     # end Obq_LensDistortion layout

		self.beginLayout("Options", collapse=True )
		self.addControl("aiUserOptions", label="User Options")
		self.endLayout()

templates.registerTranslatorUI(Obq_LensDistortionTemplate, "camera", "Obq_LensDistortion")
#templates.registerTranslatorUI(Obq_LensDistortionTemplate, "stereoRigCamera", "Obq_LensDistortion")
Пример #8
0

class xgmDescriptionTemplate(templates.ShapeTranslatorTemplate):
    def setup(self):
        self.commonShapeAttributes()
        self.addSeparator()
        self.addControl("renderMode", label="Render Mode")
        self.addSeparator()
        self.addControl("motionBlurOverride", label="Motion Blur Override")
        self.addControl("motionBlurMode", label="Motion Blur Mode")
        self.addControl("motionBlurSteps", label="Motion_Blur_Steps")
        self.addControl("motionBlurFactor", label="Motion Blur Factor")
        self.addControl("motionBlurMult", label="Motion Blur Multiplier")
        self.addSeparator()
        self.addControl("aiMinPixelWidth", label="Min Pixel Width")
        self.addControl("aiMode", label="Curve Mode")
        self.addControl("aiUseAuxRenderPatch", label="Use Aux Render Patch")
        self.addControl("aiAuxRenderPatch", label="Auxilary Render Patch")


templates.registerTranslatorUI(xgmDescriptionTemplate, "xgmDescription", "xgenTranslator")

# these  are used to build the  "renderer"  callbacks to slot arnold  settings into the  xgen GUI.   the values of these controls
# are stored on  each description node and can be parsed from there by the translator.
# this is mainly to make  arnold fit into the   XGen workflow better.

xg.registerCallback("RenderAPIRendererTabUIInit", "xgenArnoldUI.xgArnoldUI")
xg.registerCallback("RenderAPIRendererTabUIRefresh", "xgenArnoldUI.xgArnoldRefresh")
if xg.xgGlobal.DescriptionEditor is not None:
    xg.xgGlobal.DescriptionEditor.refresh("Full")
Пример #9
0
    self.addControl("aiHeight", label="Height")
    #self.addControl("aiViewOffset", label="View Offset")

    self.beginLayout("WxH Display Controls", collapse=True)
    self.endLayout()
        
    self.beginLayout("Image Orientation", collapse=True)
    self.beginNoOptimize()
    self.addControl("aiFlipRayX", label="Flip X")
    self.addControl("aiFlipRayY", label="Flip Y")
    self.endNoOptimize()
    self.endLayout()
    
    self.beginLayout( "Options", collapse=False)
    self.addControl("aiExposure", label="Exposure")
    self.addControl("aiFocusDistance", label="Focal Distance")
    self.addControl("aiApertureSize", label="Aperture Size")
    self.addControl("aiApertureBlades", label="Aperture Blades")
    self.addControl("aiApertureBladeCurvature", label="Aperture Blade Curvature")
    self.addControl("aiApertureRotation", label="Aperture Rotation")
    self.addControl("aiApertureAspectRatio", label="Aperture Aspect Ratio")
    self.addControl("aiShutterStart", label="Shutter Start")
    self.addControl("aiShutterEnd", label="Shutter End")
    self.addControl("aiRollingShutterDuration", label="Rolling Shutter Duration")
    self.addControl("aiUserOptions", label="User Options")
    self.endLayout()
    
    self.endLayout()

templates.registerTranslatorUI(DomemasterWxHTemplate, "camera", "DomemasterWxH")
Пример #10
0
        if ret is not None and len(ret):
            self.filenameEdit(ret[0])
            cmds.textFieldButtonGrp("filenameGrp", edit=True, text=ret[0])

    def filenameNew(self, nodeName):
        path = cmds.textFieldButtonGrp("filenameGrp", label="Bokeh image location", changeCommand=self.filenameEdit, width=300)
        cmds.textFieldButtonGrp(path, edit=True, text=cmds.getAttr(nodeName))
        cmds.textFieldButtonGrp(path, edit=True, buttonLabel="...",
        buttonCommand=self.LoadFilenameButtonPush)

    def filenameReplace(self, nodeName):
        cmds.textFieldButtonGrp("filenameGrp", edit=True, text=cmds.getAttr(nodeName) )



    def setup(self):
        self.addControl("aiSensorWidth", label="Sensor Width (cm)")
        self.addControl("aiSensorHeight", label="Sensor Height (cm)")
        self.addControl("aiFocalLength", label="Focal Length (mm)")
        self.addSeparator()
        self.addControl("aiUseDof", label="Enable depth of field")
        self.addControl("aiFStop", label="F-stop")
        self.addControl("aiFocalDistance", label="Focus distance (cm)")
        self.addSeparator()
        self.addControl("aiOpticalVignetting", label="Optical Vignetting")
        self.addSeparator()
        self.addControl("aiUseImage", label="Enable Image based bokeh")
        self.addCustom('aiBokehPath', self.filenameNew, self.filenameReplace)

templates.registerTranslatorUI(aiZoicTemplate, "camera", "zoic")
Пример #11
0
import xgenm as xg

class xgmDescriptionTemplate(templates.ShapeTranslatorTemplate):
    def setup(self):
        self.commonShapeAttributes()
        self.addSeparator()
        self.addControl("renderMode", label="Render Mode")
        self.addSeparator()
        self.addControl("motionBlurOverride", label="Motion Blur Override")
        self.addControl("motionBlurMode", label="Motion Blur Mode")
        self.addControl("motionBlurSteps", label="Motion_Blur_Steps")
        self.addControl("motionBlurFactor", label="Motion Blur Factor")
        self.addControl("motionBlurMult", label="Motion Blur Multiplier")
        self.addSeparator()
        self.addControl("aiMinPixelWidth", label="Min Pixel Width")
        self.addControl("aiMode", label= "Curve Mode")
        self.addControl("aiUseAuxRenderPatch", label = "Use Aux Render Patch")
        self.addControl("aiAuxRenderPatch", label= "Auxilary Render Patch")
        

templates.registerTranslatorUI(xgmDescriptionTemplate, "xgmDescription", "xgenTranslator")

# these  are used to build the  "renderer"  callbacks to slot arnold  settings into the  xgen GUI.   the values of these controls 
# are stored on  each description node and can be parsed from there by the translator.
# this is mainly to make  arnold fit into the   XGen workflow better. 

xg.registerCallback( "RenderAPIRendererTabUIInit", "xgenArnoldUI.xgArnoldUI" )
xg.registerCallback( "RenderAPIRendererTabUIRefresh", "xgenArnoldUI.xgArnoldRefresh" )
if xg.xgGlobal.DescriptionEditor is not None:
    xg.xgGlobal.DescriptionEditor.refresh( "Full" )
        self.addControl("aiMinParticleRadius", label="Min Particle Radius")
        self.addControl("aiRadiusMultiplier", label="Radius Multiplier")
        self.addControl("aiMaxParticleRadius", label="Max Particle Radius")
        self.addControl("aiMinPixelWidth", label="Min Pixel Width")
        self.addSeparator()
        self.addControl("aiExportParticleIDs", label="Export Particle Id")
        self.addControl("aiExportAttributes", label="Export Attributes")
        self.addSeparator()
        self.addControl("aiDeleteDeadParticles", label="Delete Dead Particles")
        self.addSeparator()
        self.addControl('aiStepSize', label="Volume Step Size")
        self.addSeparator()
        self.addControl("aiUserOptions", label="User Options")


templates.registerTranslatorUI(ParticleTemplate, "particle", "<built-in>")


class NParticleTemplate(templates.ShapeTranslatorTemplate):
    def setup(self):
        self.commonShapeAttributes()
        self.addControl("aiRenderPointsAs", label="Render Points As")
        self.addControl("aiMinParticleRadius", label="Min Particle Radius")
        self.addControl("aiRadiusMultiplier", label="Radius Multiplier")
        self.addControl("aiMaxParticleRadius", label="Max Particle Radius")
        self.addControl("aiMinPixelWidth", label="Min Pixel Width")
        self.addSeparator()
        self.addControl("aiExportParticleIDs", label="Export Particle Id")
        self.addControl("aiExportAttributes", label="Export Attributes")
        self.addSeparator()
        self.addControl("aiInterpolateBlur", label="Interpolated Motion Blur")
        self.endLayout()  # end Advanced Layout

        # ---------------------------------------------------------------------

        self.beginLayout("Debug", collapse=False)

        self.beginLayout("Cameras", collapse=False)
        self.addControl("aiOriginCamera", label="Origin Camera")
        self.addControl("aiTargetCamera", label="Target Camera")
        self.endLayout()  # end Cameras Layout

        self.beginLayout("Overscan", collapse=False)
        self.addControl("aiTotalOverscanPixels", label="Total Pixel Overscan")
        self.endLayout()  # end Overscan Layout

        self.endLayout()  # end Debug Layout

        # ---------------------------------------------------------------------

        self.endLayout()  # end Obq_KettleUVStereoLens layout

        self.beginLayout("Options", collapse=True)
        self.addControl("aiUserOptions", label="User Options")
        self.endLayout()


templates.registerTranslatorUI(Obq_KettleUVStereoLensTemplate, "camera",
                               "Obq_KettleUVStereoLens")
#templates.registerTranslatorUI(Obq_KettleUVStereoLensTemplate, "stereoRigCamera", "Obq_KettleUVStereoLens")
Пример #14
0
import pymel.core as pm
import mtoa.ui.ae.templates as templates
from mtoa.ui.ae.templates import AttributeTemplate, registerTranslatorUI

## we want to add this directory to the path so we can use the extra xgenArnoldUI  files
import os
import sys
localPath = os.path.dirname(os.path.realpath(__file__))
sys.path.append(localPath)


class xgenProxyDescriptionTemplate(templates.ShapeTranslatorTemplate):
    def setup(self):
        self.commonShapeAttributes()
        self.addSeparator()
        self.addControl("aiMinPixelWidth", label="Min Pixel Width")
        self.addControl("aiMode", label="Curve Mode")
        self.addControl("aiUseAuxRenderPatch", label="Use Aux Render Patch")
        self.addControl("aiAuxRenderPatch", label="Auxilary Render Patch")


templates.registerTranslatorUI(xgenProxyDescriptionTemplate, "xgenProxy",
                               "xgenProxyTranslator")
Пример #15
0
import pymel.core as pm
import mtoa.ui.ae.templates as templates
from mtoa.ui.ae.templates import AttributeTemplate, ShapeMixin, registerTranslatorUI
from mtoa.ui.ae.shaderTemplate import ShaderMixin


class pgYetiMayaTemplate(AttributeTemplate, ShapeMixin, ShaderMixin):
    def setup(self):
        self.commonShapeAttributes()
        self.addSeparator()

        self.addControl("aiMinPixelWidth")
        self.addControl("aiMode")

        self.addSeparator()
        self.addControl("aiDispHeight")
        self.addControl("aiDispPadding")
        self.addControl("aiDispZeroValue")
        self.addControl("aiDispAutobump")

        self.addAOVLayout()


templates.registerTranslatorUI(pgYetiMayaTemplate, "pgYetiMaya",
                               "pgYetiArnoldMaya")
Пример #16
0
        self.addControl("aiRenderPointsAs", label="Render Points As")
        self.addControl("aiMinParticleRadius", label="Min Particle Radius")
        self.addControl("aiRadiusMultiplier", label="Radius Multiplier")
        self.addControl("aiMaxParticleRadius", label="Max Particle Radius")
        self.addControl("aiMinPixelWidth", label="Min Pixel Width")
        self.addSeparator()   
        self.addControl("aiExportParticleIDs", label="Export Particle Id")
        self.addControl("aiExportAttributes", label="Export Attributes")
        self.addSeparator()
        self.addControl("aiDeleteDeadParticles", label="Delete Dead Particles")
        self.addSeparator()
        self.addControl('aiStepSize', label="Volume Step Size")
        self.addSeparator()
        self.addControl("aiUserOptions", label="User Options")
        
templates.registerTranslatorUI(ParticleTemplate, "particle", "<built-in>")

class NParticleTemplate(templates.ShapeTranslatorTemplate):
    def setup(self):
        self.commonShapeAttributes()
        self.addControl("aiRenderPointsAs", label="Render Points As")
        self.addControl("aiMinParticleRadius", label="Min Particle Radius")
        self.addControl("aiRadiusMultiplier", label="Radius Multiplier")
        self.addControl("aiMaxParticleRadius", label="Max Particle Radius")
        self.addControl("aiMinPixelWidth", label="Min Pixel Width")
        self.addSeparator()   
        self.addControl("aiExportParticleIDs", label="Export Particle Id")
        self.addControl("aiExportAttributes", label="Export Attributes")
        self.addSeparator()
        self.addControl("aiInterpolateBlur", label="Interpolated Motion Blur")
        self.addControl("aiEvaluateEvery", label="nCache Evaluation Interval", annotation="Use nCache's \"Evaluate every # frame(s)\" param value")
Пример #17
0
        self.addControl("aiVignettingRetries", label="Vignetting retries")
        self.addControl("aiApertureBlades", label="Aperture blades")
        self.addControl("aiProperRayDerivatives", label="Proper Ray Derivatives")
        
        # add these in the aovshader template instead
        # self.suppress('normalCamera') 
        # self.suppress('hardwareColor')
        
        
        self.endLayout()

        
        """
        self.addSeparator()
        self.addSeparator()
        self.addSeparator()
        self.addSeparator()
        self.addSeparator()
        self.addSeparator()

        self.beginLayout("AOV shader", collapse=False)
        self.addControl("aiBackwardSamples", label="Backwards samples")
        self.addControl("aiMinimumRgb", label="Minimum RGB")
        self.addCustom("aiBokehEXRPath", self.filenameNewBokeh, self.filenameReplaceBokeh)
        self.endLayout()
        """



templates.registerTranslatorUI(aiPotaTemplate, "camera", "pota")
    
    self.beginLayout("Custom maps", collapse=False)
    self.addControl("aiSeparationMap",  label="Separation Map")
    self.endLayout()
    
    self.beginLayout("Image Orientation", collapse=True)
    self.beginNoOptimize()
    self.addControl("aiFlipRayX", label="Flip X")
    self.addControl("aiFlipRayY", label="Flip Y")
    self.endNoOptimize()
    self.endLayout()
    
    self.beginLayout("Options", collapse=False)
    self.addControl("aiExposure", label="Exposure")
    self.addControl("aiFocusDistance", label="Focal Distance")
    self.addControl("aiApertureSize", label="Aperture Size")
    self.addControl("aiApertureBlades", label="Aperture Blades")
    self.addControl("aiApertureBladeCurvature", label="Aperture Blade Curvature")
    self.addControl("aiApertureRotation", label="Aperture Rotation")
    self.addControl("aiApertureAspectRatio", label="Aperture Aspect Ratio")
    self.addControl("aiShutterStart", label="Shutter Start")
    self.addControl("aiShutterEnd", label="Shutter End")
    self.addControl("aiRollingShutterDuration", label="Rolling Shutter Duration")
    self.addControl("aiUserOptions", label="User Options")
    self.endLayout()
    
    self.endLayout()

templates.registerTranslatorUI(LatLongStereoTemplate, "camera", "LatLongStereo")
#templates.registerTranslatorUI(LatLongStereoTemplate, "stereoRigCamera", "LatLongStereo")
import mtoa.ui.ae.templates as templates
#from mtoa.ui.ae.customShapeAttributes import CameraTemplate as CameraTemplate
 
def Obq_AngularCameraHelpURL():
    # Add the Obq_Shader docs URL to the Attribute Editor help menu
    ObqNodeType = 'Obq_AngularCamera'
    ObqNodeHelpURL = 'http://s3aws.obliquefx.com/public/shaders/help_files/Obq_AngularCamera.html'
    ObqHelpCommand = 'addAttributeEditorNodeHelp("' + ObqNodeType + '", "showHelp -absolute \\"' +ObqNodeHelpURL +'\\"");'
    mel.eval(ObqHelpCommand)
 
class Obq_AngularCameraTemplate(templates.AttributeTemplate):
    def setup(self):
        self.beginLayout("Obq_AngularCamera", collapse=False)
        
        Obq_AngularCameraHelpURL()
        
        self.beginNoOptimize()
        self.addControl("aiAngle", label="Angle", annotation="Angle")
        self.addControl("aiFlip", label="Opposite View", annotation="Opposite View")
        self.addControl("aiOverRender", label="Over Render", annotation="Over Render")
        self.endNoOptimize()

        self.endLayout()     # end Obq_AngularCamera layout

        self.beginLayout("Options", collapse=True )
        self.addControl("aiUserOptions", label="User Options")
        self.endLayout()

templates.registerTranslatorUI(Obq_AngularCameraTemplate, "camera", "Obq_AngularCamera")
#templates.registerTranslatorUI(Obq_AngularCameraTemplate, "stereoRigCamera", "Obq_AngularCamera")
    self.addControl("aiSeparationMap",  label="Separation Map")
    self.addControl("aiHeadTurnMap",  label="Head Turn Map")
    self.addControl("aiHeadTiltMap",  label="Head Tilt Map")
    self.endLayout()
    
    self.beginLayout("Image Orientation", collapse=True)
    self.beginNoOptimize()
    self.addControl("aiFlipRayX", label="Flip X")
    self.addControl("aiFlipRayY", label="Flip Y")
    self.endNoOptimize()
    self.endLayout()
    
    self.beginLayout("Options", collapse=False)
    self.addControl("aiExposure", label="Exposure")
    self.addControl("aiFocusDistance", label="Focal Distance")
    self.addControl("aiApertureSize", label="Aperture Size")
    self.addControl("aiApertureBlades", label="Aperture Blades")
    self.addControl("aiApertureBladeCurvature", label="Aperture Blade Curvature")
    self.addControl("aiApertureRotation", label="Aperture Rotation")
    self.addControl("aiApertureAspectRatio", label="Aperture Aspect Ratio")
    self.addControl("aiShutterStart", label="Shutter Start")
    self.addControl("aiShutterEnd", label="Shutter End")
    self.addControl("aiRollingShutterDuration", label="Rolling Shutter Duration")
    self.addControl("aiUserOptions", label="User Options")
    self.endLayout()
    
    self.endLayout()

templates.registerTranslatorUI(DomemasterStereoTemplate, "camera", "DomemasterStereo")
#templates.registerTranslatorUI(DomemasterStereoTemplate, "stereoRigCamera", "DomemasterStereo")
Пример #21
0
        self.beginLayout("Image Orientation", collapse=True)
        self.beginNoOptimize()
        self.addControl("aiFlipRayX", label="Flip X")
        self.addControl("aiFlipRayY", label="Flip Y")
        self.endNoOptimize()
        self.endLayout()

        self.beginLayout("Options", collapse=False)
        self.addControl("aiExposure", label="Exposure")
        self.addControl("aiFocusDistance", label="Focal Distance")
        self.addControl("aiApertureSize", label="Aperture Size")
        self.addControl("aiApertureBlades", label="Aperture Blades")
        self.addControl("aiApertureBladeCurvature",
                        label="Aperture Blade Curvature")
        self.addControl("aiApertureRotation", label="Aperture Rotation")
        self.addControl("aiApertureAspectRatio", label="Aperture Aspect Ratio")
        self.addControl("aiShutterStart", label="Shutter Start")
        self.addControl("aiShutterEnd", label="Shutter End")
        self.addControl("aiRollingShutterDuration",
                        label="Rolling Shutter Duration")
        self.addControl("aiUserOptions", label="User Options")
        self.endLayout()

        self.endLayout()


templates.registerTranslatorUI(LatLongStereoTemplate, "camera",
                               "LatLongStereo")
#templates.registerTranslatorUI(LatLongStereoTemplate, "stereoRigCamera", "LatLongStereo")
import mtoa.ui.ae.templates as templates
#from mtoa.ui.ae.customShapeAttributes import CameraTemplate as CameraTemplate
 
def Obq_AngularCameraHelpURL():
    # Add the Obq_Shader docs URL to the Attribute Editor help menu
    ObqNodeType = 'Obq_AngularCamera'
    ObqNodeHelpURL = 'https://github.com/madesjardins/Obq_Shaders/wiki/Obq_AngularCamera'
    ObqHelpCommand = 'addAttributeEditorNodeHelp("' + ObqNodeType + '", "showHelp -absolute \\"' +ObqNodeHelpURL +'\\"");'
    mel.eval(ObqHelpCommand)
 
class Obq_AngularCameraTemplate(templates.AttributeTemplate):
    def setup(self):
        self.beginLayout("Obq_AngularCamera", collapse=False)
        
        Obq_AngularCameraHelpURL()
        
        self.beginNoOptimize()
        self.addControl("aiAngle", label="Angle", annotation="Angle")
        self.addControl("aiFlip", label="Opposite View", annotation="Opposite View")
        self.addControl("aiOverRender", label="Over Render", annotation="Over Render")
        self.endNoOptimize()

        self.endLayout()     # end Obq_AngularCamera layout

        self.beginLayout("Options", collapse=True )
        self.addControl("aiUserOptions", label="User Options")
        self.endLayout()

templates.registerTranslatorUI(Obq_AngularCameraTemplate, "camera", "Obq_AngularCamera")
#templates.registerTranslatorUI(Obq_AngularCameraTemplate, "stereoRigCamera", "Obq_AngularCamera")
import mtoa.ui.ae.templates as templates
class aiOculusCameraTemplate(templates.AttributeTemplate):
    def setup(self):
        self.beginLayout("Main Attributes", collapse=False)
        self.addControl("aiMode")
        self.addControl("aiEyeSeparation")
        self.endLayout()
        
        self.beginLayout("Pole Merging", collapse=False)
        self.addControl("aiTopMergeMode")
        self.addControl("aiTopMergeAngle")
        self.addControl("aiTopMergeExp")
        self.addSeparator()
        self.addControl("aiBottomMergeMode")
        self.addControl("aiBottomMergeAngle")
        self.addControl("aiBottomMergeExp")
        self.endLayout()
        
templates.registerTranslatorUI(aiOculusCameraTemplate, "camera", "oculusCamera")
Пример #24
0
import mtoa.ui.ae.templates as templates


class aiVRCameraTemplate(templates.AttributeTemplate):
    def setup(self):
        self.beginLayout("Main Attributes", collapse=False)
        self.addControl("aiMode")
        self.addControl("aiProjection")
        self.addControl("aiEyeSeparation")
        self.addControl("aiEyeToNeckDistance")
        self.endLayout()

        self.beginLayout("Pole Merging", collapse=False)
        self.addControl("aiTopMergeMode")
        self.addControl("aiTopMergeAngle")
        self.addControl("aiTopMergeExp")
        self.addSeparator()
        self.addControl("aiBottomMergeMode")
        self.addControl("aiBottomMergeAngle")
        self.addControl("aiBottomMergeExp")
        self.addSeparator()
        self.addControl("aiMergeShader")
        self.endLayout()


templates.registerTranslatorUI(aiVRCameraTemplate, "camera", "vr_camera")