Ejemplo n.º 1
0
 def registerNodeExtensions(self):
     """Register Corona specific node extensions. e.g. camera type, diaphram_blades and others
     """
     pm.addExtension(nodeType="camera", longName="mtco_diaphragm_blades", attributeType="long", defaultValue = 5)
     pm.addExtension(nodeType="camera", longName="mtco_diaphragm_tilt_angle", attributeType="float", defaultValue = 0.0)
     
     # exponent for sun light
     pm.addExtension(nodeType="directionalLight", longName="mtco_sun_multiplier", attributeType="float", defaultValue = 1.0)
     
     pm.addExtension(nodeType="displacementShader", longName="mtco_displacementMin", attributeType="float", defaultValue = 0.0)
     pm.addExtension(nodeType="displacementShader", longName="mtco_displacementMax", attributeType="float", defaultValue = 0.01)
Ejemplo n.º 2
0
 def registerNodeExtensions(self):
     """Register Corona specific node extensions. e.g. camera type, diaphram_blades and others
     """
     pm.addExtension(nodeType="camera", longName="mtco_controls_exposure", attributeType="bool", defaultValue=False)
     pm.addExtension(nodeType="camera", longName="mtco_iso", attributeType="float", defaultValue=100.0)
     pm.addExtension(nodeType="camera", longName="mtco_shutterSpeed", attributeType="float", defaultValue=125.0, minValue=0.001, softMaxValue=2048.0)
     
     # exponent for sun light
     pm.addExtension(nodeType="directionalLight", longName="mtco_sun_multiplier", attributeType="float", defaultValue=1.0)
     
     pm.addExtension(nodeType="displacementShader", longName="mtco_displacementMin", attributeType="float", defaultValue=0.0)
     pm.addExtension(nodeType="displacementShader", longName="mtco_displacementMax", attributeType="float", defaultValue=0.01)
     
     # testing ies
     pm.addExtension(nodeType="CoronaSurface", longName="mtco_mat_iesProfile", dataType="string", usedAsFilename=True)
Ejemplo n.º 3
0
    def registerNodeExtensions(self):
        """Register Fuji specific node extensions. e.g. camera type, diaphram_blades and others
        """
        # we will have a thinlens camera only
        #pm.addExtension(nodeType="camera", longName="mtfu_cameraType", attributeType="enum", enumName="Pinhole:Thinlens", defaultValue = 0)
        pm.addExtension(nodeType="camera",
                        longName="someFancyCameraAttribute",
                        attributeType="long",
                        defaultValue=0)

        # mesh
        pm.addExtension(nodeType="mesh",
                        longName="someFancyMeshAttribute",
                        attributeType="bool",
                        defaultValue=False)

        # lights
        pm.addExtension(nodeType="areaLight",
                        longName="sample_count",
                        attributeType="long",
                        defaultValue=8)
        pm.addExtension(nodeType="areaLight",
                        longName="double_sided",
                        attributeType="bool",
                        defaultValue=False)
        pm.addExtension(nodeType="ambientLight",
                        longName="sample_count",
                        attributeType="long",
                        defaultValue=32)
        pm.addExtension(nodeType="ambientLight",
                        longName="double_sided",
                        attributeType="bool",
                        defaultValue=False)
Ejemplo n.º 4
0
    def registerNodeExtensions(self):
        """Register Fuji specific node extensions. e.g. camera type, diaphram_blades and others
        """
        # we will have a thinlens camera only
        #pm.addExtension(nodeType="camera", longName="mtfu_cameraType", attributeType="enum", enumName="Pinhole:Thinlens", defaultValue = 0)
        pm.addExtension(nodeType="camera", longName="someFancyCameraAttribute", attributeType="long", defaultValue = 0)
        
        # mesh
        pm.addExtension(nodeType="mesh", longName="someFancyMeshAttribute", attributeType="bool", defaultValue = False)

        # lights
        pm.addExtension(nodeType="areaLight", longName="sample_count", attributeType="long", defaultValue = 8)
        pm.addExtension(nodeType="areaLight", longName="double_sided", attributeType="bool", defaultValue = False)
        pm.addExtension(nodeType="ambientLight", longName="sample_count", attributeType="long", defaultValue = 32)
        pm.addExtension(nodeType="ambientLight", longName="double_sided", attributeType="bool", defaultValue = False)
Ejemplo n.º 5
0
    def registerNodeExtensions(self):
        """Register Mantra specific node extensions. e.g. reflection blur, area light type etc.
        """
        pm.addExtension(nodeType="spotLight",
                        longName="mtm_deepShadowMap",
                        attributeType="bool",
                        defaultValue=True)
        pm.addExtension(nodeType="spotLight",
                        longName="mtm_spread",
                        attributeType="double",
                        defaultValue=1.0)
        pm.addExtension(nodeType="spotLight",
                        longName="mtm_bias",
                        attributeType="double",
                        defaultValue=0.05)
        pm.addExtension(nodeType="spotLight",
                        longName="mtm_blur",
                        attributeType="double",
                        defaultValue=0.0)
        pm.addExtension(nodeType="spotLight",
                        longName="mtm_shadowQuality",
                        attributeType="double",
                        defaultValue=1.0)
        pm.addExtension(nodeType="spotLight",
                        longName="mtm_activeRadius",
                        attributeType="double",
                        defaultValue=0.0)
        pm.addExtension(nodeType="spotLight",
                        longName="mtm_samplingQuality",
                        attributeType="double",
                        defaultValue=1.0)

        # area light
        pm.addExtension(nodeType="areaLight",
                        longName="mtm_samplingQuality",
                        attributeType="double",
                        defaultValue=1.0)
        pm.addExtension(nodeType="areaLight",
                        longName="mtm_areaType",
                        attributeType="enum",
                        enumName="line:grid:disk:sphere")
        pm.addExtension(nodeType="areaLight",
                        longName="mtm_normalizeArea",
                        attributeType="bool",
                        defaultValue=True)
        pm.addExtension(nodeType="areaLight",
                        longName="mtm_useLightGeometry",
                        attributeType="bool",
                        defaultValue=False)
        pm.addExtension(nodeType="areaLight",
                        longName="mtm_lightGeometry",
                        attributeType="message")
        pm.addExtension(nodeType="areaLight",
                        longName="mtm_renderLightGeometry",
                        attributeType="bool",
                        defaultValue=False)
        pm.addExtension(nodeType="areaLight",
                        longName="mtm_activeRadius",
                        attributeType="double",
                        defaultValue=0.0)

        #point light
        pm.addExtension(nodeType="pointLight",
                        longName="mtm_samplingQuality",
                        attributeType="double",
                        defaultValue=1.0)
        pm.addExtension(nodeType="pointLight",
                        longName="mtm_activeRadius",
                        attributeType="double",
                        defaultValue=0.0)

        #directional light
        pm.addExtension(nodeType="directionalLight",
                        longName="mtm_samplingQuality",
                        attributeType="double",
                        defaultValue=1.0)
        pm.addExtension(nodeType="directionalLight",
                        longName="mtm_activeRadius",
                        attributeType="double",
                        defaultValue=0.0)

        pm.addExtension(nodeType="spotLight",
                        longName="mtm_surfaceShaders",
                        attributeType="bool",
                        defaultValue=False)
        pm.addExtension(nodeType="areaLight",
                        longName="mtm_surfaceShaders",
                        attributeType="bool",
                        defaultValue=False)
        pm.addExtension(nodeType="pointLight",
                        longName="mtm_surfaceShaders",
                        attributeType="bool",
                        defaultValue=False)
        pm.addExtension(nodeType="directionalLight",
                        longName="mtm_surfaceShaders",
                        attributeType="bool",
                        defaultValue=False)
        pm.addExtension(nodeType="volumeLight",
                        longName="mtm_surfaceShaders",
                        attributeType="bool",
                        defaultValue=False)

        pm.addExtension(nodeType="light",
                        longName="mtm_fastShadows",
                        attributeType="bool",
                        defaultValue=False)

        # mesh
        pm.addExtension(nodeType="mesh",
                        longName="mtm_renderAsSubdiv",
                        attributeType="bool",
                        defaultValue=False)
        # nurbsCurve
        pm.addExtension(nodeType="nurbsCurve",
                        longName="primaryVisibility",
                        attributeType="bool",
                        defaultValue=True)

        # displacement shader
        pm.addExtension(nodeType="displacementShader",
                        longName="mtm_displacebound",
                        attributeType="double",
                        defaultValue=1.0)

        # phong, blinn, phongE, lambert ...
        pm.addExtension(nodeType="phong",
                        longName="mtm_refrBlur",
                        attributeType="double",
                        defaultValue=0.0,
                        min=0.0,
                        softMaxValue=1.0)
        pm.addExtension(nodeType="phongE",
                        longName="mtm_refrBlur",
                        attributeType="double",
                        defaultValue=0.0,
                        min=0.0,
                        softMaxValue=1.0)
        pm.addExtension(nodeType="blinn",
                        longName="mtm_refrBlur",
                        attributeType="double",
                        defaultValue=0.0,
                        min=0.0,
                        softMaxValue=1.0)
        pm.addExtension(nodeType="lambert",
                        longName="mtm_refrBlur",
                        attributeType="double",
                        defaultValue=0.0,
                        min=0.0,
                        softMaxValue=1.0)
        pm.addExtension(nodeType="lambert",
                        longName="mtm_fresnel",
                        attributeType="double",
                        defaultValue=0.0,
                        min=0.0,
                        max=1.0)
        pm.addExtension(nodeType="phong",
                        longName="mtm_fresnel",
                        attributeType="double",
                        defaultValue=0.0,
                        min=0.0,
                        max=1.0)
        pm.addExtension(nodeType="blinn",
                        longName="mtm_fresnel",
                        attributeType="double",
                        defaultValue=0.0,
                        min=0.0,
                        max=1.0)

        pm.addExtension(nodeType="phong",
                        longName="mtm_refrSamples",
                        attributeType="long",
                        defaultValue=1)
        pm.addExtension(nodeType="phongE",
                        longName="mtm_refrSamples",
                        attributeType="long",
                        defaultValue=1)
        pm.addExtension(nodeType="blinn",
                        longName="mtm_refrSamples",
                        attributeType="long",
                        defaultValue=1)
        pm.addExtension(nodeType="lambert",
                        longName="mtm_refrSamples",
                        attributeType="long",
                        defaultValue=1)

        pm.addExtension(nodeType="phong",
                        longName="mtm_reflBlur",
                        attributeType="double",
                        defaultValue=0.0,
                        min=0.0,
                        softMaxValue=1.0)
        pm.addExtension(nodeType="phongE",
                        longName="mtm_reflBlur",
                        attributeType="double",
                        defaultValue=0.0,
                        min=0.0,
                        softMaxValue=1.0)
        pm.addExtension(nodeType="blinn",
                        longName="mtm_reflBlur",
                        attributeType="double",
                        defaultValue=0.0,
                        min=0.0,
                        softMaxValue=1.0)

        pm.addExtension(nodeType="phong",
                        longName="mtm_reflSamples",
                        attributeType="long",
                        defaultValue=1)
        pm.addExtension(nodeType="phongE",
                        longName="mtm_reflSamples",
                        attributeType="long",
                        defaultValue=1)
        pm.addExtension(nodeType="blinn",
                        longName="mtm_reflSamples",
                        attributeType="long",
                        defaultValue=1)

        # orenNayar
        pm.addExtension(nodeType="lambert",
                        longName="mtm_orenNayar",
                        attributeType="long",
                        defaultValue=0)
Ejemplo n.º 6
0
    def registerNodeExtensions(self):
        """Register Thea specific node extensions. e.g. camera type, diaphram_blades and others
        """
        # we will have a thinlens camera only
        pm.addExtension(nodeType="camera", longName="mtth_camera_projection", attributeType="enum", enumName="Perspective:Parallel:Spherical:Cylindrical", defaultValue = 0)
        pm.addExtension(nodeType="camera", longName="mtth_diaphragm_blades", attributeType="long", defaultValue = 5)
        pm.addExtension(nodeType="camera", longName="mtth_diaphragm_type", attributeType="enum", enumName="Circular:Polygonal", defaultValue = 0.0)
        pm.addExtension(nodeType="camera", longName="mtth_shutter_speed", attributeType="float", defaultValue = 250.0)
        pm.addExtension(nodeType="camera", longName="mtth_focusRange", attributeType="float", defaultValue = 0.1)
        pm.addExtension(nodeType="camera", longName="mtth_autoFocus", attributeType="bool", defaultValue = False)
        
        # mesh
        #pm.addExtension(nodeType="mesh", longName="mtth_mesh_useassembly", attributeType="bool", defaultValue = False)

        # file
        pm.addExtension(nodeType="file", longName="mtth_file_iblIntensity", attributeType="float", defaultValue = 1.0)
        pm.addExtension(nodeType="file", longName="mtth_file_iblRotation", attributeType="float", defaultValue = 0.0)
        pm.addExtension(nodeType="file", longName="mtth_file_iblWrapping", attributeType="enum", enumName="CenterWrapping:TileWrapping:FitWrapping:AngularProbeWrapping:HemisphericalWrapping:SphericalWrapping", defaultValue = 3.0)
        pm.addExtension(nodeType="file", longName="mtth_file_interpolation", attributeType="enum", enumName="NoInterpolation:BilinearInterpolation:TrilinearInterpolation", defaultValue = 1.0)
Ejemplo n.º 7
0
 def registerNodeExtensions(self):
     """Register Indigo specific node extensions. e.g. camera type, diaphram_blades and others
     """
     pm.addExtension(nodeType="camera", longName="mtin_lensRadius", attributeType="float", defaultValue = 0.1, minValue = 0.0001, softMaxValue=10.0)
     pm.addExtension(nodeType="camera", longName="mtin_autoFocus", attributeType="bool", defaultValue = False)
     pm.addExtension(nodeType="camera", longName="mtin_exposureDuration", attributeType="float", defaultValue = 0.33, minValue = 0.0001, softMaxValue=100.0)
     pm.addExtension(nodeType="camera", longName="mtin_apertureShape", attributeType="enum", enumName="circular:generated:image", defaultValue=0)
     pm.addExtension(nodeType="camera", longName="mtin_numBlades", attributeType="long", defaultValue = 5, minValue = 3, softMaxValue=10)
     pm.addExtension(nodeType="camera", longName="mtin_startAngle", attributeType="float", defaultValue = 0.0, minValue = 0.0, softMaxValue=360.0)
     pm.addExtension(nodeType="camera", longName="mtin_bladeOffset", attributeType="float", defaultValue = 0.0, minValue = 0.0, softMaxValue=360.0)
     pm.addExtension(nodeType="camera", longName="mtin_bladeCurvatureRadius", attributeType="float", defaultValue = 0.0, softMaxValue=10.0)
     pm.addExtension(nodeType="camera", longName="mtin_appFile", dataType="string", usedAsFilename=True)
     
     # mesh
     pm.addExtension(nodeType="mesh", longName="mtin_mesh_subdivUse", attributeType="bool", defaultValue = False)
     pm.addExtension(nodeType="mesh", longName="mtin_mesh_subdivMaxSubdiv", attributeType="long", defaultValue = 1, minValue = 1, softMaxValue=4)
     pm.addExtension(nodeType="mesh", longName="mtin_mesh_subdivViewDependent", attributeType="bool", defaultValue = False)
     pm.addExtension(nodeType="mesh", longName="mtin_mesh_subdivSmooth", attributeType="bool", defaultValue = True)
     pm.addExtension(nodeType="mesh", longName="mtin_mesh_subdivPixelThreshold", attributeType="float", defaultValue = 0.4, minValue = .001, softMaxValue=5.0)
     pm.addExtension(nodeType="mesh", longName="mtin_mesh_subdivCurvatureThreshold", attributeType="float", defaultValue = 0.1, minValue = .001, softMaxValue=5.0)
     pm.addExtension(nodeType="mesh", longName="mtin_mesh_subdivErrorThreshold", attributeType="float", defaultValue = 0.1, minValue = .001, softMaxValue=5.0)
Ejemplo n.º 8
0
    def registerNodeExtensions(self):
        """Register Appleseed specific node extensions. e.g. camera type, diaphram_blades and others
        """
        # we will have a thinlens camera only
        # pm.addExtension(nodeType="camera", longName="mtap_cameraType", attributeType="enum", enumName="Pinhole:Thinlens", defaultValue = 0)
        pm.addExtension(nodeType="camera", longName="mtap_diaphragm_blades", attributeType="long", defaultValue=0)
        pm.addExtension(nodeType="camera", longName="mtap_diaphragm_tilt_angle", attributeType="float", defaultValue=0.0)
        pm.addExtension(nodeType="camera", longName="mtap_latLongLens", attributeType="bool", defaultValue=False)
        
        # mesh
        pm.addExtension(nodeType="mesh", longName="mtap_mesh_useassembly", attributeType="bool", defaultValue=False)
        pm.addExtension(nodeType="mesh", longName="mtap_ray_bias_method", attributeType="enum", enumName="none:normal:incoming_direction:outgoing_direction", defaultValue=0)
        pm.addExtension(nodeType="mesh", longName="mtap_ray_bias_distance", attributeType="float", defaultValue=0.0)
        pm.addExtension(nodeType="mesh", longName="mtap_standin_path", dataType="string", usedAsFilename=True)
        pm.addExtension(nodeType="mesh", longName="mtap_visibleLights", attributeType="bool", defaultValue=True)
        pm.addExtension(nodeType="mesh", longName="mtap_visibleProbe", attributeType="bool", defaultValue=True)
        pm.addExtension(nodeType="mesh", longName="mtap_visibleGlossy", attributeType="bool", defaultValue=True)
        pm.addExtension(nodeType="mesh", longName="mtap_visibleSpecular", attributeType="bool", defaultValue=True)
        pm.addExtension(nodeType="mesh", longName="mtap_visibleDiffuse", attributeType="bool", defaultValue=True)

        pm.addExtension(nodeType="spotLight", longName="mtap_cast_indirect_light", attributeType="bool", defaultValue=True)
        pm.addExtension(nodeType="spotLight", longName="mtap_importance_multiplier", attributeType="float", defaultValue=1.0)
        pm.addExtension(nodeType="directionalLight", longName="mtap_cast_indirect_light", attributeType="bool", defaultValue=True)
        pm.addExtension(nodeType="directionalLight", longName="mtap_importance_multiplier", attributeType="float", defaultValue=1.0)
        pm.addExtension(nodeType="pointLight", longName="mtap_cast_indirect_light", attributeType="bool", defaultValue=True)
        pm.addExtension(nodeType="pointLight", longName="mtap_importance_multiplier", attributeType="float", defaultValue=1.0)
        
        pm.addExtension(nodeType="areaLight", longName="primaryVisibility", attributeType="bool", defaultValue=True)
        pm.addExtension(nodeType="areaLight", longName="castsShadows", attributeType="bool", defaultValue=False)
        pm.addExtension(nodeType="areaLight", longName="mtap_visibleLights", attributeType="bool", defaultValue=False)
        pm.addExtension(nodeType="areaLight", longName="mtap_visibleProbe", attributeType="bool", defaultValue=True)
        pm.addExtension(nodeType="areaLight", longName="mtap_visibleGlossy", attributeType="bool", defaultValue=True)
        pm.addExtension(nodeType="areaLight", longName="mtap_visibleSpecular", attributeType="bool", defaultValue=True)
        pm.addExtension(nodeType="areaLight", longName="mtap_visibleDiffuse", attributeType="bool", defaultValue=True)
        pm.addExtension(nodeType="areaLight", longName="mtap_visibleTransparency", attributeType="bool", defaultValue=True)
Ejemplo n.º 9
0
    def registerNodeExtensions(self):
        """Register Thea specific node extensions. e.g. camera type, diaphram_blades and others
        """
        # we will have a thinlens camera only
        pm.addExtension(nodeType="camera",
                        longName="mtth_camera_projection",
                        attributeType="enum",
                        enumName="Perspective:Parallel:Spherical:Cylindrical",
                        defaultValue=0)
        pm.addExtension(nodeType="camera",
                        longName="mtth_diaphragm_blades",
                        attributeType="long",
                        defaultValue=5)
        pm.addExtension(nodeType="camera",
                        longName="mtth_diaphragm_type",
                        attributeType="enum",
                        enumName="Circular:Polygonal",
                        defaultValue=0.0)
        pm.addExtension(nodeType="camera",
                        longName="mtth_shutter_speed",
                        attributeType="float",
                        defaultValue=250.0)
        pm.addExtension(nodeType="camera",
                        longName="mtth_focusRange",
                        attributeType="float",
                        defaultValue=0.1)
        pm.addExtension(nodeType="camera",
                        longName="mtth_autoFocus",
                        attributeType="bool",
                        defaultValue=False)

        # mesh
        #pm.addExtension(nodeType="mesh", longName="mtth_mesh_useassembly", attributeType="bool", defaultValue = False)

        # file
        pm.addExtension(nodeType="file",
                        longName="mtth_file_iblIntensity",
                        attributeType="float",
                        defaultValue=1.0)
        pm.addExtension(nodeType="file",
                        longName="mtth_file_iblRotation",
                        attributeType="float",
                        defaultValue=0.0)
        pm.addExtension(
            nodeType="file",
            longName="mtth_file_iblWrapping",
            attributeType="enum",
            enumName=
            "CenterWrapping:TileWrapping:FitWrapping:AngularProbeWrapping:HemisphericalWrapping:SphericalWrapping",
            defaultValue=3.0)
        pm.addExtension(
            nodeType="file",
            longName="mtth_file_interpolation",
            attributeType="enum",
            enumName=
            "NoInterpolation:BilinearInterpolation:TrilinearInterpolation",
            defaultValue=1.0)
Ejemplo n.º 10
0
 def registerNodeExtensions(self):
     """Register Appleseed specific node extensions. e.g. camera type, diaphram_blades and others
     """
     # we will have a thinlens camera only
     # pm.addExtension(nodeType="camera", longName="mtap_cameraType", attributeType="enum", enumName="Pinhole:Thinlens", defaultValue = 0)
     pm.addExtension(nodeType="camera", longName="mtap_diaphragm_blades", attributeType="long", defaultValue=0)
     pm.addExtension(nodeType="camera", longName="mtap_diaphragm_tilt_angle", attributeType="float", defaultValue=0.0)
     pm.addExtension(nodeType="camera", longName="mtap_latLongLens", attributeType="bool", defaultValue=False)
     
     # mesh
     pm.addExtension(nodeType="mesh", longName="mtap_mesh_useassembly", attributeType="bool", defaultValue=False)
     pm.addExtension(nodeType="mesh", longName="mtap_ray_bias_method", attributeType="enum", enumName="none:normal:incoming_direction:outgoing_direction", defaultValue=0)
     pm.addExtension(nodeType="mesh", longName="mtap_ray_bias_distance", attributeType="float", defaultValue=0.0)
     pm.addExtension(nodeType="mesh", longName="mtap_standin_path", dataType="string", usedAsFilename=True)
Ejemplo n.º 11
0
 def registerNodeExtensions(self):
     """Register Mantra specific node extensions. e.g. reflection blur, area light type etc.
     """
     pm.addExtension(nodeType="spotLight", longName="mtm_deepShadowMap", attributeType="bool", defaultValue=True)
     pm.addExtension(nodeType="spotLight", longName="mtm_spread", attributeType="double", defaultValue=1.0)
     pm.addExtension(nodeType="spotLight", longName="mtm_bias", attributeType="double", defaultValue=0.05)
     pm.addExtension(nodeType="spotLight", longName="mtm_blur", attributeType="double", defaultValue=0.0)
     pm.addExtension(nodeType="spotLight", longName="mtm_shadowQuality", attributeType="double", defaultValue=1.0)
     pm.addExtension(nodeType="spotLight", longName="mtm_activeRadius", attributeType="double", defaultValue=0.0)
     pm.addExtension(nodeType="spotLight", longName="mtm_samplingQuality", attributeType="double", defaultValue=1.0)
 
     # area light
     pm.addExtension(nodeType="areaLight", longName="mtm_samplingQuality", attributeType="double", defaultValue=1.0)
     pm.addExtension(nodeType="areaLight", longName="mtm_areaType", attributeType="enum", enumName="line:grid:disk:sphere")
     pm.addExtension(nodeType="areaLight", longName="mtm_normalizeArea", attributeType="bool", defaultValue=True)
     pm.addExtension(nodeType="areaLight", longName="mtm_useLightGeometry", attributeType="bool", defaultValue=False)
     pm.addExtension(nodeType="areaLight", longName="mtm_lightGeometry", attributeType="message")
     pm.addExtension(nodeType="areaLight", longName="mtm_renderLightGeometry", attributeType="bool", defaultValue=False)
     pm.addExtension(nodeType="areaLight", longName="mtm_activeRadius", attributeType="double", defaultValue=0.0)
     
     #point light
     pm.addExtension(nodeType="pointLight", longName="mtm_samplingQuality", attributeType="double", defaultValue=1.0)
     pm.addExtension(nodeType="pointLight", longName="mtm_activeRadius", attributeType="double", defaultValue=0.0)
 
     #directional light
     pm.addExtension(nodeType="directionalLight", longName="mtm_samplingQuality", attributeType="double", defaultValue=1.0)
     pm.addExtension(nodeType="directionalLight", longName="mtm_activeRadius", attributeType="double", defaultValue=0.0)
 
     pm.addExtension(nodeType="spotLight", longName="mtm_surfaceShaders", attributeType="bool", defaultValue=False)
     pm.addExtension(nodeType="areaLight", longName="mtm_surfaceShaders", attributeType="bool", defaultValue=False)
     pm.addExtension(nodeType="pointLight", longName="mtm_surfaceShaders", attributeType="bool", defaultValue=False)
     pm.addExtension(nodeType="directionalLight", longName="mtm_surfaceShaders", attributeType="bool", defaultValue=False)
     pm.addExtension(nodeType="volumeLight", longName="mtm_surfaceShaders", attributeType="bool", defaultValue=False)
     
     pm.addExtension(nodeType="light", longName="mtm_fastShadows", attributeType="bool", defaultValue=False)
 
     # mesh
     pm.addExtension(nodeType="mesh", longName="mtm_renderAsSubdiv", attributeType="bool", defaultValue=False)
     # nurbsCurve
     pm.addExtension(nodeType="nurbsCurve", longName="primaryVisibility", attributeType="bool", defaultValue=True)
 
     # displacement shader
     pm.addExtension(nodeType="displacementShader", longName="mtm_displacebound", attributeType="double", defaultValue=1.0)
     
     # phong, blinn, phongE, lambert ...
     pm.addExtension(nodeType="phong", longName="mtm_refrBlur", attributeType="double", defaultValue=0.0, min=0.0, softMaxValue=1.0)
     pm.addExtension(nodeType="phongE", longName="mtm_refrBlur", attributeType="double", defaultValue=0.0, min=0.0, softMaxValue=1.0)
     pm.addExtension(nodeType="blinn", longName="mtm_refrBlur", attributeType="double", defaultValue=0.0, min=0.0, softMaxValue=1.0)
     pm.addExtension(nodeType="lambert", longName="mtm_refrBlur", attributeType="double", defaultValue=0.0, min=0.0, softMaxValue=1.0)
     pm.addExtension(nodeType="lambert", longName="mtm_fresnel", attributeType="double", defaultValue=0.0, min=0.0, max=1.0)
     pm.addExtension(nodeType="phong", longName="mtm_fresnel", attributeType="double", defaultValue=0.0, min=0.0, max=1.0)
     pm.addExtension(nodeType="blinn", longName="mtm_fresnel", attributeType="double", defaultValue=0.0, min=0.0, max=1.0)
     
     pm.addExtension(nodeType="phong", longName="mtm_refrSamples", attributeType="long", defaultValue=1)
     pm.addExtension(nodeType="phongE", longName="mtm_refrSamples", attributeType="long", defaultValue=1)
     pm.addExtension(nodeType="blinn", longName="mtm_refrSamples", attributeType="long", defaultValue=1)
     pm.addExtension(nodeType="lambert", longName="mtm_refrSamples", attributeType="long", defaultValue=1)
 
     pm.addExtension(nodeType="phong", longName="mtm_reflBlur", attributeType="double", defaultValue=0.0, min=0.0, softMaxValue=1.0)
     pm.addExtension(nodeType="phongE", longName="mtm_reflBlur", attributeType="double", defaultValue=0.0, min=0.0, softMaxValue=1.0)
     pm.addExtension(nodeType="blinn", longName="mtm_reflBlur", attributeType="double", defaultValue=0.0, min=0.0, softMaxValue=1.0)
 
     pm.addExtension(nodeType="phong", longName="mtm_reflSamples", attributeType="long", defaultValue=1)
     pm.addExtension(nodeType="phongE", longName="mtm_reflSamples", attributeType="long", defaultValue=1)
     pm.addExtension(nodeType="blinn", longName="mtm_reflSamples", attributeType="long", defaultValue=1)
     
     # orenNayar
     pm.addExtension(nodeType="lambert", longName="mtm_orenNayar", attributeType="long", defaultValue=0)
Ejemplo n.º 12
0
    def registerNodeExtensions(self):
        """Register Lux specific node extensions. e.g. camera type, diaphram_blades and others
        """
        # we will have a thinlens camera only
        #pm.addExtension(nodeType="camera", longName="mtlu_cameraType", attributeType="enum", enumName="Pinhole:Thinlens", defaultValue = 0)
        pm.addExtension(nodeType="camera", longName="mtlu_diaphragm_blades", attributeType="long", defaultValue = 0)
        pm.addExtension(nodeType="camera", longName="mtlu_autofocus", attributeType="bool", defaultValue = False)
        pm.addExtension(nodeType="camera", longName="mtlu_distribution", attributeType="enum", enumName = "uniform:exponential:inverse exponential:gaussian:inverse gaussian")
        pm.addExtension(nodeType="camera", longName="mtlu_power", attributeType="long", defaultValue = 1)
        
        # mesh
        pm.addExtension(nodeType="mesh", longName="mtlu_mesh_generatetangents", attributeType="bool", defaultValue = False)
        pm.addExtension(nodeType="mesh", longName="mtlu_mesh_subAlgo", attributeType="enum", enumName = "loop:microdisplacement")
        pm.addExtension(nodeType="mesh", longName="mtlu_mesh_displacementMap", dataType="string", usedAsFilename=True)
        pm.addExtension(nodeType="mesh", longName="mtlu_mesh_dmscale", attributeType="float", defaultValue=0.1)
        pm.addExtension(nodeType="mesh", longName="mtlu_mesh_dmoffset", attributeType="float", defaultValue=0.0)
        pm.addExtension(nodeType="mesh", longName="mtlu_mesh_dmnormalsmooth", attributeType="bool", defaultValue = True)
        pm.addExtension(nodeType="mesh", longName="mtlu_mesh_dmnormalsplit", attributeType="bool", defaultValue = False)
        pm.addExtension(nodeType="mesh", longName="mtlu_mesh_dmsharpboundary", attributeType="bool", defaultValue = False)
        pm.addExtension(nodeType="mesh", longName="mtlu_mesh_subdivlevel", attributeType="long", defaultValue = 0)

        # lights
        pm.addExtension(nodeType="light", longName="mtlu_light_importance", attributeType="float", defaultValue = 1.0)
        
        pm.addExtension(nodeType="directionalLight", longName="mtlu_dirLight_theta", attributeType="float", defaultValue = 0.0)
        
        pm.addExtension(nodeType="areaLight", longName="mtlu_areaLight_samples", attributeType="long", defaultValue = 1)
        pm.addExtension(nodeType="areaLight", longName="mtlu_areaLight_power", attributeType="float", defaultValue = 100.0)
        pm.addExtension(nodeType="areaLight", longName="mtlu_areaLight_efficacy", attributeType="float", defaultValue = 17.0)
        pm.addExtension(nodeType="areaLight", longName="mtlu_areaLight_ies", dataType="string", usedAsFilename=True)
        pm.addExtension(nodeType="areaLight", longName="mtlu_areaLight_geo", attributeType="message")
        
        pm.addExtension(nodeType="pointLight", longName="mtlu_pointLight_power", attributeType="float", defaultValue = 100.0)
        pm.addExtension(nodeType="pointLight", longName="mtlu_pointLight_efficacy", attributeType="float", defaultValue = 17.0)
        pm.addExtension(nodeType="pointLight", longName="mtlu_pointLight_ies", dataType="string", usedAsFilename=True)
        
        pm.addExtension(nodeType="spotLight", longName="mtlu_spotLight_power", attributeType="float", defaultValue = 100.0)
        pm.addExtension(nodeType="spotLight", longName="mtlu_spotLight_efficacy", attributeType="float", defaultValue = 17.0)
        pm.addExtension(nodeType="spotLight", longName="mtlu_spotLight_ies", dataType="string", usedAsFilename=True)

        pm.addExtension(nodeType="ambientLight", longName="mtlu_ambientLight_map", dataType="string", usedAsFilename=True)
        pm.addExtension(nodeType="ambientLight", longName="mtlu_ambientLight_samples", attributeType="long", defaultValue = 1)
Ejemplo n.º 13
0
    def registerNodeExtensions(self):
        """Register Corona specific node extensions. e.g. camera type, diaphram_blades and others
        """
        pm.addExtension(nodeType="camera", longName="mtco_iso", attributeType="float", defaultValue=100.0)
        pm.addExtension(nodeType="camera", longName="mtco_shutterSpeed", attributeType="float", defaultValue=125.0, minValue=0.001, softMaxValue=2048.0)
        
        # exponent for sun light
        pm.addExtension(nodeType="directionalLight", longName="mtco_sun_multiplier", attributeType="float", defaultValue=1.0)
        pm.addExtension( nodeType='areaLight', longName='mtco_envPortal', attributeType='bool', defaultValue=False) 
        pm.addExtension( nodeType='areaLight', longName='mtco_areaVisible', attributeType='bool', defaultValue=True) 

        # displacement shader        
        pm.addExtension(nodeType="displacementShader", longName="mtco_displacementMin", attributeType="float", defaultValue=0.0)
        pm.addExtension(nodeType="displacementShader", longName="mtco_displacementMax", attributeType="float", defaultValue=0.01)
        
        #bump map because the maya implementation is too strange
        pm.addExtension( nodeType='bump2d', longName='normalMap', usedAsColor=True, attributeType='float3' )
        pm.addExtension( nodeType='bump2d', longName='normalMapR', attributeType='float', parent='normalMap' )
        pm.addExtension( nodeType='bump2d', longName='normalMapG', attributeType='float', parent='normalMap' )
        pm.addExtension( nodeType='bump2d', longName='normalMapB', attributeType='float', parent='normalMap' )        
        
        # gamma
        pm.addExtension( nodeType='file', longName='fromSRGB', attributeType='bool', defaultValue=True) 
        pm.addExtension( nodeType='file', longName='toSRGB', attributeType='bool', defaultValue=False) 

        #mesh
        pm.addExtension( nodeType='mesh', longName='mtco_visibleInGI', attributeType='bool', defaultValue=True) 
        pm.addExtension( nodeType='mesh', longName='mtco_envPortal', attributeType='bool', defaultValue=False) 
        pm.addExtension( nodeType="mesh", longName="mtco_shadowCatcherMode", attributeType="enum", enumName="Off::Final:Composite", defaultValue = 0.0)

        
        pm.addExtension(nodeType="CoronaSurface", longName="mtco_mat_iesProfile", dataType="string", usedAsFilename=True)
        
        pm.addExtension( nodeType='samplerInfo', longName='outDPdu', usedAsColor=True, attributeType='float3' )
        pm.addExtension( nodeType='samplerInfo', longName='outDPduR', attributeType='float', parent='outDPdu' )
        pm.addExtension( nodeType='samplerInfo', longName='outDPduG', attributeType='float', parent='outDPdu' )
        pm.addExtension( nodeType='samplerInfo', longName='outDPduB', attributeType='float', parent='outDPdu' )        
        
        pm.addExtension( nodeType='samplerInfo', longName='outDPdv', usedAsColor=True, attributeType='float3' )
        pm.addExtension( nodeType='samplerInfo', longName='outDPdvR', attributeType='float', parent='outDPdv' )
        pm.addExtension( nodeType='samplerInfo', longName='outDPdvG', attributeType='float', parent='outDPdv' )
        pm.addExtension( nodeType='samplerInfo', longName='outDPdvB', attributeType='float', parent='outDPdv' )