diff --git a/operators.py b/operators.py index 06e95744..0db6453f 100644 --- a/operators.py +++ b/operators.py @@ -145,11 +145,10 @@ def execute(self, context): continue output = nt.nodes.new('RendermanOutputNode') try: - if not convert_cycles_nodetree(mat, output, self.report): - default = nt.nodes.new('PxrSurfaceBxdfNode') - default.location = output.location - default.location[0] -= 300 - nt.links.new(default.outputs[0], output.inputs[0]) + default = nt.nodes.new('PxrDisneyBxdfNode') + default.location = output.location + default.location[0] -= 300 + nt.links.new(default.outputs[0], output.inputs[0]) except Exception as e: self.report({'ERROR'}, "Error converting " + mat.name) #self.report({'ERROR'}, str(e)) @@ -198,7 +197,7 @@ class SHADING_OT_add_renderman_nodetree(bpy.types.Operator): bl_description = "Add a renderman shader node tree linked to this material" idtype = StringProperty(name="ID Type", default="material") - bxdf_name = StringProperty(name="Bxdf Name", default="PxrSurface") + bxdf_name = StringProperty(name="Bxdf Name", default="PxrDisney") def execute(self, context): idtype = self.properties.idtype @@ -218,12 +217,11 @@ def execute(self, context): if idtype == 'material': output = nt.nodes.new('RendermanOutputNode') - if not convert_cycles_nodetree(idblock, output, self.report): - default = nt.nodes.new('%sBxdfNode' % - self.properties.bxdf_name) - default.location = output.location - default.location[0] -= 300 - nt.links.new(default.outputs[0], output.inputs[0]) + default = nt.nodes.new('%sBxdfNode' % + self.properties.bxdf_name) + default.location = output.location + default.location[0] -= 300 + nt.links.new(default.outputs[0], output.inputs[0]) elif idtype == 'lamp': light_type = idblock.type if light_type == 'SUN': @@ -1099,10 +1097,6 @@ class Add_bxdf(bpy.types.Operator): def get_type_items(self, context): items = [ - ("PxrSurface", "PxrSurface", - 'PxrSurface Uber shader. For most hard surfaces'), - ("PxrLayerSurface", "PxrLayerSurface", - "PxrLayerSurface, creates a surface with two Layers"), ("PxrMarschnerHair", "PxrMarschnerHair", "Hair Shader"), ("PxrDisney", "PxrDisney", "Disney Bxdf, a simple uber shader with no layering"), @@ -1168,14 +1162,14 @@ class New_bxdf(bpy.types.Operator): def execute(self, context): ob = context.object - bxdf_name = 'PxrSurface' + bxdf_name = 'PxrDisney' mat = bpy.data.materials.new(bxdf_name) ob.active_material = mat mat.use_nodes = True nt = mat.node_tree output = nt.nodes.new('RendermanOutputNode') - default = nt.nodes.new('PxrSurfaceBxdfNode') + default = nt.nodes.new('PxrDisneyBxdfNode') default.location = output.location default.location[0] -= 300 nt.links.new(default.outputs[0], output.inputs[0]) diff --git a/preview/preview_scene.rib b/preview/preview_scene.rib index 673c4893..9d95b6cc 100644 --- a/preview/preview_scene.rib +++ b/preview/preview_scene.rib @@ -11,7 +11,7 @@ Transform [ 5.000000 0.000000 0.000000 0.000000 0.000000 5.000000 0.000000 0.000000 0.000000 0.000000 5.000000 0.000000 -3.000000 0.0 0.000000 1.000000 ] Pattern "PxrManifold2D" "PxrManifold2D" "float offsetS" [0] "float angle" [0] "string primvarS" [""] "int invertT" [0] "float offsetT" [0] "float scaleS" [1] "__instanceid" ["Material.002.PxrManifold2D"] "float scaleT" [1] "string primvarT" [""] Pattern "PxrTexture" "PxrTexture" "int linearize" [0] "int atlasStyle" [0] "int invertT" [0] "__instanceid" ["Material.002.PxrTexture"] "int lerp" [1] "reference struct manifold" ["PxrManifold2D:result"] "float blur" [0] "int filter" [1] "float missingAlpha" [1] "string filename" ["ratGrid.tex"] "color missingColor" [1 0 1] "int firstChannel" [0] - Bxdf "PxrSurface" "Material.002.PxrDisney" "__instanceid" ["Material.002.PxrDisney"] "reference color diffuseColor" ["PxrTexture:resultRGB"] + Bxdf "PxrDisney" "Material.002.PxrDisney" "__instanceid" ["Material.002.PxrDisney"] "reference color baseColor" ["PxrTexture:resultRGB"] SubdivisionMesh "catmull-clark" [4 4] [4 1 3 5 0 4 5 2] ["interpolateboundary"] [0 0] [] [] "P" [-0.0201648 -1 0.807218 1 -1 0 -0.0201648 1 0.807218 1 1 0 -0.0144115 -1 0 -0.0144115 1 0] "facevarying float[2] st" [0 0.5 0 1.0 1.0 1.0 1.0 0.5 0 0 0 0.5 1.0 0.5 1.0 0] AttributeEnd @@ -20,7 +20,7 @@ Transform [ .3 0.000000 0.000000 0.000000 0.000000 .3 0.000000 0.000000 0.000000 0.000000 .3 0.000000 0 -2 0.3 1.000000 ] Sides 2 - Bxdf "PxrPxrSurface" "diffuse" + Bxdf "PxrDisney" "diffuse" "color baseColor" [.18 .18 .18] Sphere 1 -1 1 360 AttributeEnd @@ -29,6 +29,6 @@ Transform [ .3 0.000000 0.000000 0.000000 0.000000 .3 0.000000 0.000000 0.000000 0.000000 .3 0.000000 0 2 0.3 1.000000 ] Sides 2 - Bxdf "PxrSurface" "metal" "float diffuseGain" [0] "int specularFresnelMode" [1] "color specularEdgeColor" [1 1 1] "color specularIor" [4.3696842 2.916713 1.654698] "color specularExtinctionCoeff" [5.20643 4.2313662 3.7549689] "float specularRoughness" [0.1] "integer specularModelType" [1] - Sphere 1 -1 1 360 + Bxdf "PxrDisney" "metal" "color baseColor" [1.0 1.0 1.0] "float metallic" [1.0] "float specular" [1.0] + Sphere 1 -1 1 360 AttributeEnd \ No newline at end of file diff --git a/shader_parameters.py b/shader_parameters.py index 2c96eaec..301b762d 100644 --- a/shader_parameters.py +++ b/shader_parameters.py @@ -221,11 +221,7 @@ def class_generate_properties(node, parent_name, shaderparameters): def update_conditional_visops(node): for param_name, prop_meta in getattr(node, 'prop_meta').items(): if 'conditionalVisOp' in prop_meta: -<<<<<<< HEAD - try: -======= try: ->>>>>>> jdent02-master hidden = not eval(prop_meta['conditionalVisOp']) prop_meta['hidden'] = hidden if hasattr(node, 'inputs') and param_name in node.inputs: diff --git a/ui.py b/ui.py index 57388765..af1bba37 100644 --- a/ui.py +++ b/ui.py @@ -714,7 +714,7 @@ def draw(self, context): if mat and not is_renderman_nodetree(mat): layout.operator( 'shading.add_renderman_nodetree').idtype = "material" - layout.operator('shading.convert_cycles_stuff') + #layout.operator('shading.convert_cycles_stuff') # self._draw_shader_menu_params(layout, context, rm) @@ -930,7 +930,7 @@ def draw(self, context): if not lamp.renderman.use_renderman_node: layout.prop(lamp, "type", expand=True) layout.operator('shading.add_renderman_nodetree').idtype = 'lamp' - layout.operator('shading.convert_cycles_stuff') + #layout.operator('shading.convert_cycles_stuff') return else: if ipr_running: