def poll(cls, context):
		material = active_node_mat(context.material)
		if material is None:
			return False
		VRayMaterial = material.vray
		if VRayMaterial.nodetree:
			return False
		return active_node_mat(context.material) and engine_poll(__class__, context)
 def poll(cls, context):
     material = active_node_mat(context.material)
     if material is None:
         return False
     VRayMaterial = material.vray
     if VRayMaterial.nodetree:
         return False
     return active_node_mat(context.material) and engine_poll(
         __class__, context)
Exemple #3
0
    def draw(self, context):
        layout = self.layout
        mat = active_node_mat(context.material)

        layout.label(text="Refraction and Reflections:")
        split = layout.split()
        col = split.column()
        col.prop(mat.bounty, "IOR_refraction")

        col = split.column()
        col.menu("TheBounty_presets_ior_list",
                 text=bpy.types.TheBounty_presets_ior_list.bl_label)

        split = layout.split()
        col = split.column(align=True)
        col.prop(mat.bounty, "absorption")
        layout.prop(mat.bounty, "absorption_dist")

        col = split.column(align=True)
        col.label(text="Dispersion power:")
        col.prop(mat.bounty, "dispersion_power", text="")

        if mat.bounty.mat_type == "rough_glass":
            row = layout.row()
            #box.label(text="Glass roughness:")
            row.prop(mat.bounty,
                     "refr_roughness",
                     text="Roughness exponent",
                     slider=True)
Exemple #4
0
    def draw(self, context):
        layout = self.layout
        yaf_mat = active_node_mat(context.material)

        split = layout.split()
        col = split.column()
        col.prop(yaf_mat, "diffuse_color")
        col.prop(yaf_mat, "emit")
        layout.row().prop(yaf_mat, "diffuse_reflect", slider=True)

        col = split.column()
        sub = col.column()
        sub.label(text="Reflectance model:")
        sub.prop(yaf_mat, "brdf_type", text="")
        brdf = sub.column()
        brdf.enabled = yaf_mat.brdf_type == "oren-nayar"
        brdf.prop(yaf_mat, "sigma")

        layout.separator()

        box = layout.box()
        box.label(text="Transparency and translucency:")
        split = box.split()
        col = split.column()
        col.prop(yaf_mat, "transparency", slider=True)
        col = split.column()
        col.prop(yaf_mat, "translucency", slider=True)
        box.row().prop(yaf_mat, "transmit_filter", slider=True)
    def draw(self, context):
        layout = self.layout
        yaf_mat = active_node_mat(context.material)

        layout.label(text="Refraction and Reflections:")
        split = layout.split()
        col = split.column()
        col.prop(yaf_mat, "IOR_refraction")

        col = split.column()
        col.menu("YAF_MT_presets_ior_list", text=bpy.types.YAF_MT_presets_ior_list.bl_label)

        split = layout.split()
        col = split.column(align=True)
        col.prop(yaf_mat, "absorption")
        col.prop(yaf_mat, "absorption_dist")

        col = split.column(align=True)
        col.label(text="Dispersion:")
        col.prop(yaf_mat, "dispersion_power")

        if yaf_mat.mat_type == "rough_glass":
            box = layout.box()
            box.label(text="Glass roughness:")
            box.row().prop(yaf_mat, "refr_roughness", slider=True)
Exemple #6
0
	def draw(self, context):
		wide_ui= context.region.width > narrowui

		ob= context.object
		ma= active_node_mat(context.material)

		MtlOverride= ma.vray.MtlOverride

		layout= self.layout
		layout.active= MtlOverride.use

		split= layout.split()
		col= split.column()
		col.prop_search(MtlOverride, 'gi_mtl',      bpy.data, 'materials', text= "GI")
		col.prop_search(MtlOverride, 'reflect_mtl', bpy.data, 'materials', text= "Reflection")
		col.prop_search(MtlOverride, 'refract_mtl', bpy.data, 'materials', text= "Refraction")
		col.prop_search(MtlOverride, 'shadow_mtl',  bpy.data, 'materials', text= "Shadow")

		layout.separator()
		split= layout.split()
		col= split.column()
		col.prop_search(MtlOverride, 'environment_override',  bpy.data, 'textures', text= "Environment")

		layout.separator()

		split= layout.split()
		col= split.column()
		col.prop(MtlOverride, 'environment_priority')
    def draw(self, context):
        layout = self.layout
        yaf_mat = active_node_mat(context.material)

        split = layout.split()
        col = split.column()
        col.prop(yaf_mat, "glossy_color")
        exp = col.column()
        exp.enabled = yaf_mat.anisotropic == False
        exp.prop(yaf_mat, "exponent")

        col = split.column()
        sub = col.column(align=True)
        sub.prop(yaf_mat, "anisotropic")
        ani = sub.column()
        ani.enabled = yaf_mat.anisotropic == True
        ani.prop(yaf_mat, "exp_u")
        ani.prop(yaf_mat, "exp_v")
        layout.row().prop(yaf_mat, "glossy_reflect", slider=True)
        layout.row().prop(yaf_mat, "as_diffuse")

        layout.separator()

        if yaf_mat.mat_type == "coated_glossy":
            box = layout.box()
            box.label(text="Coated layer for glossy:")
            split = box.split()
            col = split.column()
            col.prop(yaf_mat, "coat_mir_col")
            col = split.column(align=True)
            col.label(text="Fresnel reflection:")
            col.prop(yaf_mat, "IOR_reflection")
            col.label()
Exemple #8
0
    def draw(self, context):
        layout = self.layout
        yaf_mat = active_node_mat(context.material)

        layout.label(text="Refraction and Reflections:")
        split = layout.split()
        col = split.column()
        col.prop(yaf_mat, "IOR_refraction")

        col = split.column()
        col.menu("YAF_MT_presets_ior_list",
                 text=bpy.types.YAF_MT_presets_ior_list.bl_label)

        split = layout.split()
        col = split.column(align=True)
        col.prop(yaf_mat, "absorption")
        col.prop(yaf_mat, "absorption_dist")

        col = split.column(align=True)
        col.label(text="Dispersion:")
        col.prop(yaf_mat, "dispersion_power")

        if yaf_mat.mat_type == "rough_glass":
            box = layout.box()
            box.label(text="Glass roughness:")
            box.row().prop(yaf_mat, "refr_roughness", slider=True)
    def draw(self, context):
        layout = self.layout

        mat = active_node_mat(context.material).arnold

        split = layout.split()

        col = split.column()
        col.prop(mat, "diffuse_color", text="")
        sub = col.column()
##        sub.active = (not mat.use_shadeless)
        sub.prop(mat, "diffuse_weight", text="Weight")

        col = split.column()
##        col.active = (not mat.use_shadeless)
##        col.prop(mat, "diffuse_shader", text="")
##        col.prop(mat, "use_diffuse_ramp", text="Ramp")

        col = layout.column()
##        col.active = (not mat.use_shadeless)
        col.prop(mat, "diffuse_roughness")
##        col.prop(mat, "")

##def register():
##    bpy.utils.register_module(__name__)
##
##def unregister():
##    bpy.utils.unregister_module(__name__)
Exemple #10
0
def context_tex_datablock(context):
    idblock = context.material
    if idblock:
        return active_node_mat(idblock)

    idblock = context.lamp
    if idblock:
        return idblock

    idblock = context.world
    if idblock:
        return idblock

    idblock = context.brush
    if idblock:
        return idblock

    idblock = context.line_style
    if idblock:
        return idblock

    if context.particle_system:
        idblock = context.particle_system.settings

    return idblock
Exemple #11
0
def context_tex_datablock(context):
    idblock = context.material
    if idblock:
        return active_node_mat(idblock)

    idblock = context.lamp
    if idblock:
        return idblock

    idblock = context.world
    if idblock:
        return idblock

    idblock = context.brush
    if idblock:
        return idblock

    idblock = context.line_style
    if idblock:
        return idblock

    if context.particle_system:
        idblock = context.particle_system.settings

    return idblock
    def draw(self, context):
        layout = self.layout
        mat = active_node_mat(context.material)

        layout.label(text="Refraction and Reflections:")
        split = layout.split()
        col = split.column()
        col.prop(mat.bounty, "IOR_refraction")

        col = split.column()
        col.menu("TheBounty_presets_ior_list", text=bpy.types.TheBounty_presets_ior_list.bl_label)

        split = layout.split()
        col = split.column(align=True)
        col.prop(mat.bounty, "absorption")
        layout.prop(mat.bounty, "absorption_dist")

        col = split.column(align=True)
        col.label(text="Dispersion power:")
        col.prop(mat.bounty, "dispersion_power", text="")

        if mat.bounty.mat_type == "rough_glass":
            row = layout.row()
            #box.label(text="Glass roughness:")
            row.prop(mat.bounty, "refr_roughness",text="Roughness exponent", slider=True)
Exemple #13
0
	def draw(self, context):
		layout= self.layout

		mat= active_node_mat(context.material)
		
		ob= context.object
		slot= context.material_slot
		space= context.space_data

		wide_ui= context.region.width > narrowui

		if ob:
			row = layout.row()
			row.template_list(ob, "material_slots", ob, "active_material_index", rows=2)
			col = row.column(align=True)
			col.operator("object.material_slot_add", icon='ZOOMIN', text="")
			col.operator("object.material_slot_remove", icon='ZOOMOUT', text="")
			col.menu("MATERIAL_MT_specials", icon='DOWNARROW_HLT', text="")
			if ob.mode == 'EDIT':
				row = layout.row(align=True)
				row.operator("object.material_slot_assign", text="Assign")
				row.operator("object.material_slot_select", text="Select")
				row.operator("object.material_slot_deselect", text="Deselect")

		if wide_ui:
			split = layout.split(percentage=0.65)

			if ob:
				split.template_ID(ob, "active_material", new="material.new")
				row = split.row()
				if mat:
					row.prop(mat, "use_nodes", icon="NODETREE", text="")

				if slot:
					row.prop(slot, "link", text="")
				else:
					row.label()
			elif mat:
				split.template_ID(space, "pin_id")
				split.separator()
		else:
			if ob:
				layout.template_ID(ob, "active_material", new="material.new")
			elif mat:
				layout.template_ID(space, "pin_id")

		if mat:
			VRayMaterial= mat.vray

			split= layout.split()
			col= split.column()
			col.label(text="Simple materials:")
			if wide_ui:
				col= split.column()
			col.menu('VRAY_MT_preset_material', text="Preset")

			if wide_ui:
				layout.prop(VRayMaterial, 'type', expand=True)
			else:
				layout.prop(VRayMaterial, 'type')
    def draw(self, context):
        layout = self.layout
        yaf_mat = active_node_mat(context.material)

        layout.prop(yaf_mat, "pass_index")

        split = layout.split()
        col = split.column()
        layout.row().prop(yaf_mat, "visibility")

        split = layout.split()
        col = split.column()
        layout.row().prop(yaf_mat, "receive_shadows")
        
        if yaf_mat.mat_type == "shinydiffusemat":
            split = layout.split()
            col = split.column()
            layout.row().prop(yaf_mat, "flat_material")
            split = layout.split()
            col = split.column()
            row = layout.row()
            row.prop(yaf_mat, "transparentbias_factor")
            col = row.column()
            col.prop(yaf_mat, "transparentbias_multiply_raydepth")

        if yaf_mat.mat_type != "blend":
            split = layout.split()
            col = split.column()
            layout.row().prop(yaf_mat, "additionaldepth")

        split = layout.split()
        col = split.column()
        layout.row().prop(yaf_mat, "samplingfactor")
Exemple #15
0
	def draw(self, context):
		wide_ui= context.region.width > narrowui

		ob= context.object
		ma= active_node_mat(context.material)

		MtlOverride= ma.vray.MtlOverride
		
		layout= self.layout
		layout.active= MtlOverride.use

		split= layout.split()
		col= split.column()
		col.prop_search(MtlOverride, 'gi_mtl',      bpy.data, 'materials', text= "GI")
		col.prop_search(MtlOverride, 'reflect_mtl', bpy.data, 'materials', text= "Reflection")
		col.prop_search(MtlOverride, 'refract_mtl', bpy.data, 'materials', text= "Refraction")
		col.prop_search(MtlOverride, 'shadow_mtl',  bpy.data, 'materials', text= "Shadow")

		layout.separator()
		split= layout.split()
		col= split.column()
		col.prop_search(MtlOverride, 'environment_override',  bpy.data, 'textures', text= "Environment")

		layout.separator()

		split= layout.split()
		col= split.column()
		col.prop(MtlOverride, 'environment_priority')
    def draw(self, context):
        layout = self.layout
        yaf_mat = active_node_mat(context.material)

        split = layout.split()
        col = split.column()
        col.prop(yaf_mat, "diffuse_color")
        col.prop(yaf_mat, "emit")
        layout.row().prop(yaf_mat, "diffuse_reflect", slider=True)

        col = split.column()
        sub = col.column()
        sub.label(text="Reflectance model:")
        sub.prop(yaf_mat, "brdf_type", text="")
        brdf = sub.column()
        brdf.enabled = yaf_mat.brdf_type == "oren-nayar"
        brdf.prop(yaf_mat, "sigma")

        layout.separator()

        box = layout.box()
        box.label(text="Transparency and translucency:")
        split = box.split()
        col = split.column()
        col.prop(yaf_mat, "transparency", slider=True)
        col = split.column()
        col.prop(yaf_mat, "translucency", slider=True)
        box.row().prop(yaf_mat, "transmit_filter", slider=True)
Exemple #17
0
    def draw(self, context):
        layout = self.layout
        yaf_mat = active_node_mat(context.material)

        split = layout.split()
        col = split.column()
        col.prop(yaf_mat, "glossy_color")
        exp = col.column()
        exp.enabled = yaf_mat.anisotropic == False
        exp.prop(yaf_mat, "exponent")

        col = split.column()
        sub = col.column(align=True)
        sub.prop(yaf_mat, "anisotropic")
        ani = sub.column()
        ani.enabled = yaf_mat.anisotropic == True
        ani.prop(yaf_mat, "exp_u")
        ani.prop(yaf_mat, "exp_v")
        layout.row().prop(yaf_mat, "glossy_reflect", slider=True)
        layout.row().prop(yaf_mat, "as_diffuse")

        layout.separator()

        if yaf_mat.mat_type == "coated_glossy":
            box = layout.box()
            box.label(text="Coated layer for glossy:")
            split = box.split()
            col = split.column()
            col.prop(yaf_mat, "coat_mir_col")
            col = split.column(align=True)
            col.label(text="Fresnel reflection:")
            col.prop(yaf_mat, "IOR_reflection")
            col.label()
Exemple #18
0
	def draw(self, context):
		wide_ui= context.region.width > narrowui

		ob= context.object
		ma= active_node_mat(context.material)

		MtlWrapper= ma.vray.MtlWrapper
		
		layout= self.layout
		layout.active= MtlWrapper.use

		split= layout.split()
		col= split.column()
		col.prop(MtlWrapper, 'generate_gi')
		col.prop(MtlWrapper, 'receive_gi')
		if wide_ui:
			col= split.column()
		col.prop(MtlWrapper, 'generate_caustics')
		col.prop(MtlWrapper, 'receive_caustics')

		split= layout.split()
		col= split.column()
		col.prop(MtlWrapper, 'gi_quality_multiplier')

		split= layout.split()
		col= split.column()
		col.label(text="Matte properties")

		split= layout.split()
		colL= split.column()
		colL.prop(MtlWrapper, 'matte_surface')
		if wide_ui:
			colR= split.column()
		else:
			colR= colL
		colR.prop(MtlWrapper, 'alpha_contribution')
		if MtlWrapper.matte_surface:
			colL.prop(MtlWrapper, 'affect_alpha')
			colL.prop(MtlWrapper, 'shadows')
			if MtlWrapper.shadows:
				colL.prop(MtlWrapper, 'shadow_tint_color')
				colL.prop(MtlWrapper, 'shadow_brightness')

			colR.prop(MtlWrapper, 'reflection_amount')
			colR.prop(MtlWrapper, 'refraction_amount')
			colR.prop(MtlWrapper, 'gi_amount')
			colR.prop(MtlWrapper, 'no_gi_on_other_mattes')

		split= layout.split()
		col= split.column()
		col.label(text="Miscellaneous")

		split= layout.split()
		col= split.column()
		col.prop(MtlWrapper, 'gi_surface_id')
		col.prop(MtlWrapper, 'trace_depth')
		if wide_ui:
			col= split.column()
		col.prop(MtlWrapper, 'matte_for_secondary_rays')
Exemple #19
0
	def draw(self, context):
		wide_ui= context.region.width > narrowui

		ob= context.object
		ma= active_node_mat(context.material)

		VRayMaterial= ma.vray
		MtlRenderStats= VRayMaterial.MtlRenderStats

		layout= self.layout
		
		split= layout.split()
		col= split.column()
		col.prop(VRayMaterial, 'round_edges')
		if wide_ui:
			col= split.column()
		else:
			col= col.column()
		col.active= VRayMaterial.round_edges
		col.prop(VRayMaterial, 'radius', text="Radius")

		layout.separator()
		
		split= layout.split()
		col= split.column()
		col.prop(VRayMaterial, 'material_id_number')
		if wide_ui:
			col= split.column()
		else:
			col= col.column()
		col.active= VRayMaterial.material_id_number
		col.prop(VRayMaterial, 'material_id_color', text="")

		layout.separator()

		layout.prop(MtlRenderStats, 'use')

		split= layout.split()
		split.active= MtlRenderStats.use
		col= split.column()
		col.prop(MtlRenderStats, 'visibility', text="Visible")

		split= layout.split()
		split.active= MtlRenderStats.use
		col= split.column()
		col.label(text="Visible to:")

		split= layout.split()
		split.active= MtlRenderStats.use
		sub= split.column()
		sub.active= MtlRenderStats.visibility
		sub.prop(MtlRenderStats, 'camera_visibility', text="Camera")
		sub.prop(MtlRenderStats, 'gi_visibility', text="GI")
		sub.prop(MtlRenderStats, 'shadows_visibility', text="Shadows")
		if wide_ui:
			sub= split.column()
			sub.active= MtlRenderStats.visibility
		sub.prop(MtlRenderStats, 'reflections_visibility', text="Reflections")
		sub.prop(MtlRenderStats, 'refractions_visibility', text="Refractions")
Exemple #20
0
	def draw(self, context):
		wide_ui= context.region.width > narrowui

		ob= context.object
		ma= active_node_mat(context.material)

		MtlWrapper= ma.vray.MtlWrapper

		layout= self.layout
		layout.active= MtlWrapper.use

		split= layout.split()
		col= split.column()
		col.prop(MtlWrapper, 'generate_gi')
		col.prop(MtlWrapper, 'receive_gi')
		if wide_ui:
			col= split.column()
		col.prop(MtlWrapper, 'generate_caustics')
		col.prop(MtlWrapper, 'receive_caustics')

		split= layout.split()
		col= split.column()
		col.prop(MtlWrapper, 'gi_quality_multiplier')

		split= layout.split()
		col= split.column()
		col.label(text="Matte properties")

		split= layout.split()
		colL= split.column()
		colL.prop(MtlWrapper, 'matte_surface')
		if wide_ui:
			colR= split.column()
		else:
			colR= colL
		colR.prop(MtlWrapper, 'alpha_contribution')
		if MtlWrapper.matte_surface:
			colL.prop(MtlWrapper, 'affect_alpha')
			colL.prop(MtlWrapper, 'shadows')
			if MtlWrapper.shadows:
				colL.prop(MtlWrapper, 'shadow_tint_color')
				colL.prop(MtlWrapper, 'shadow_brightness')

			colR.prop(MtlWrapper, 'reflection_amount')
			colR.prop(MtlWrapper, 'refraction_amount')
			colR.prop(MtlWrapper, 'gi_amount')
			colR.prop(MtlWrapper, 'no_gi_on_other_mattes')

		split= layout.split()
		col= split.column()
		col.label(text="Miscellaneous")

		split= layout.split()
		col= split.column()
		col.prop(MtlWrapper, 'gi_surface_id')
		col.prop(MtlWrapper, 'trace_depth')
		if wide_ui:
			col= split.column()
		col.prop(MtlWrapper, 'matte_for_secondary_rays')
 def draw(self, context):
     #
     layout = self.layout
     mat = active_node_mat(context.material)
     
     self.drawTranslucent(context, layout, mat)
     self.drawSSS(context, layout, mat)
     self.drawScattering(context, layout, mat)
Exemple #22
0
	def draw(self, context):
		layout= self.layout

		material=     active_node_mat(context.material)
		VRayMaterial= material.vray
		BRDFVRayMtl=  VRayMaterial.BRDFVRayMtl

		PLUGINS['BRDF']['BRDFVRayMtl'].gui_options(context, layout, BRDFVRayMtl, material= None)
Exemple #23
0
	def draw(self, context):
		layout= self.layout
		
		material=     active_node_mat(context.material)
		VRayMaterial= material.vray
		BRDFVRayMtl=  VRayMaterial.BRDFVRayMtl

		PLUGINS['BRDF']['BRDFVRayMtl'].gui_options(context, layout, BRDFVRayMtl, material= None)
Exemple #24
0
    def draw(self, context):
        layout = self.layout

        mat = properties_material.active_node_mat(context.material)

        layout.prop(mat, "emit", text="Emission Intensity")

        layout.prop(mat, "iileEmission", text="Emission color")
	def poll(cls, context):
		material = active_node_mat(context.material)
		if material is None:
			return False
		VRayMaterial = material.vray
		if VRayMaterial.nodetree:
			return False
		return engine_poll(__class__, context) and not (VRayMaterial.type == 'EMIT' and VRayMaterial.emitter_type == 'MESH') and not VRayMaterial.type == 'VOL'
Exemple #26
0
    def draw(self, context):
        #
        layout = self.layout
        mat = active_node_mat(context.material)

        self.drawTranslucent(context, layout, mat)
        self.drawSSS(context, layout, mat)
        self.drawScattering(context, layout, mat)
Exemple #27
0
 def draw(self, context):
     if context.scene.yafaray.preview.enable:
         layout = self.layout
         yaf_mat = active_node_mat(context.material)
         split = layout.split() 
         col = split.column()
         col.label("Preview dynamic rotation/zoom")
         split = layout.split() 
         col = split.column()
         col.prop(context.scene.yafaray.preview, "camRot", text="")
         col = split.column()
         row = col.row()
         row.operator("preview.camzoomout", text='Zoom Out', icon='ZOOM_OUT')
         col2 = row.column()
         col2.operator("preview.camzoomin", text='Zoom In', icon='ZOOM_IN')
         row = col.row()
         row.label("")
         row = col.row()
         row.operator("preview.camrotreset", text='Reset dynamic rotation/zoom')
         split = layout.split() 
         col = split.column()
         col.label("Preview object control")
         split = layout.split()
         col = split.column()
         col.prop(context.scene.yafaray.preview, "objScale", text="Scale")
         col = split.column()
         col.prop(context.scene.yafaray.preview, "rotZ", text="Z Rotation")
         col = split.column()
         col.prop_search(context.scene.yafaray.preview, "previewObject", bpy.data, "objects", text="")
         split = layout.split() 
         col = split.column()
         col.label("Preview lights control")
         col = split.column()
         col.prop(context.scene.yafaray.preview, "lightRotZ", text="lights Z Rotation")
         split = layout.split()
         col = split.column()
         col.label("Key light:")
         col = split.column()
         col.prop(context.scene.yafaray.preview, "keyLightPowerFactor", text="Power factor")
         col = split.column()
         col.prop(context.scene.yafaray.preview, "keyLightColor", text="")
         split = layout.split() 
         col = split.column()
         col.label("Fill lights:")
         col = split.column()
         col.prop(context.scene.yafaray.preview, "fillLightPowerFactor", text="Power factor")
         col = split.column()
         col.prop(context.scene.yafaray.preview, "fillLightColor", text="")
         split = layout.split() 
         col = split.column()
         col.label("Preview scene control")
         split = layout.split()
         col = split.column()
         col.prop(context.scene.yafaray.preview, "previewRayDepth", text="Ray Depth")
         col = split.column()
         col.prop(context.scene.yafaray.preview, "previewAApasses", text="AA samples")
         col = split.column()
         col.prop(context.scene.yafaray.preview, "previewBackground", text="")
 def draw(self, context):
     if context.scene.yafaray.preview.enable:
         layout = self.layout
         yaf_mat = active_node_mat(context.material)
         split = layout.split() 
         col = split.column()
         col.label("Preview dynamic rotation/zoom")
         split = layout.split() 
         col = split.column()
         col.prop(context.scene.yafaray.preview, "camRot", text="")
         col = split.column()
         row = col.row()
         row.operator("preview.camzoomout", text='Zoom Out', icon='ZOOM_OUT')
         col2 = row.column()
         col2.operator("preview.camzoomin", text='Zoom In', icon='ZOOM_IN')
         row = col.row()
         row.label("")
         row = col.row()
         row.operator("preview.camrotreset", text='Reset dynamic rotation/zoom')
         split = layout.split() 
         col = split.column()
         col.label("Preview object control")
         split = layout.split()
         col = split.column()
         col.prop(context.scene.yafaray.preview, "objScale", text="Scale")
         col = split.column()
         col.prop(context.scene.yafaray.preview, "rotZ", text="Z Rotation")
         col = split.column()
         col.prop_search(context.scene.yafaray.preview, "previewObject", bpy.data, "objects", text="")
         split = layout.split() 
         col = split.column()
         col.label("Preview lights control")
         col = split.column()
         col.prop(context.scene.yafaray.preview, "lightRotZ", text="lights Z Rotation")
         split = layout.split()
         col = split.column()
         col.label("Key light:")
         col = split.column()
         col.prop(context.scene.yafaray.preview, "keyLightPowerFactor", text="Power factor")
         col = split.column()
         col.prop(context.scene.yafaray.preview, "keyLightColor", text="")
         split = layout.split() 
         col = split.column()
         col.label("Fill lights:")
         col = split.column()
         col.prop(context.scene.yafaray.preview, "fillLightPowerFactor", text="Power factor")
         col = split.column()
         col.prop(context.scene.yafaray.preview, "fillLightColor", text="")
         split = layout.split() 
         col = split.column()
         col.label("Preview scene control")
         split = layout.split()
         col = split.column()
         col.prop(context.scene.yafaray.preview, "previewRayDepth", text="Ray Depth")
         col = split.column()
         col.prop(context.scene.yafaray.preview, "previewAApasses", text="AA samples")
         col = split.column()
         col.prop(context.scene.yafaray.preview, "previewBackground", text="")
Exemple #29
0
    def draw(self, context):
        wide_ui = context.region.width > narrowui
        layout = self.layout

        material = active_node_mat(context.material)

        VRayMaterial = material.vray

        PLUGINS["BRDF"][VRayMaterial.type].gui(context, layout, getattr(VRayMaterial, VRayMaterial.type), material)
Exemple #30
0
def callback_match_BI_diffuse(self, context):
    if not hasattr(context, 'material'):
        return
    material = active_node_mat(context.material)
    if not context.material:
        return
    if not self.as_viewport_color:
        material.diffuse_color = (0.5, 0.5, 0.5)
        return
    material.diffuse_color = self.diffuse
 def poll(cls, context):
     material = active_node_mat(context.material)
     if material is None:
         return False
     VRayMaterial = material.vray
     if VRayMaterial.nodetree:
         return False
     return engine_poll(__class__, context) and not (
         VRayMaterial.type == 'EMIT' and VRayMaterial.emitter_type
         == 'MESH') and not VRayMaterial.type == 'VOL'
    def draw(self, context):
        layout = self.layout
        mat = active_node_mat(context.material)

        layout.separator()
        blend_one_draw(layout, mat)
        layout.separator()
        layout.prop(mat.bounty, "blend_value", slider=True)
        layout.separator()
        blend_two_draw(layout, mat)
Exemple #33
0
def callback_match_BI_diffuse(self, context):
	if not hasattr(context, 'material'):
		return
	material = active_node_mat(context.material)
	if not context.material:
		return
	if not self.as_viewport_color:
		material.diffuse_color = (0.5, 0.5, 0.5)
		return
	material.diffuse_color = self.diffuse
Exemple #34
0
    def draw(self, context):
        layout = self.layout
        mat = active_node_mat(context.material)

        layout.separator()
        blend_one_draw(layout, mat)
        layout.separator()
        layout.prop(mat.bounty, "blend_value", slider=True)
        layout.separator()
        blend_two_draw(layout, mat)
        layout.operator('material.parse_blend')
    def draw(self, context):
        wide_ui = context.region.width > narrowui
        layout = self.layout

        material = active_node_mat(context.material)

        VRayMaterial = material.vray

        PLUGINS['BRDF'][VRayMaterial.type].gui(
            context, layout, getattr(VRayMaterial, VRayMaterial.type),
            material)
    def draw(self, context):
        layout = self.layout
        yaf_mat = active_node_mat(context.material)

        split = layout.split()
        col = split.column()
        col.prop(yaf_mat, "filter_color")
        col = split.column()
        col.prop(yaf_mat, "glass_mir_col")
        layout.row().prop(yaf_mat, "glass_transmit", slider=True)
        layout.row().prop(yaf_mat, "fake_shadows")
Exemple #37
0
    def draw(self, context):
        layout = self.layout
        yaf_mat = active_node_mat(context.material)

        split = layout.split()
        col = split.column()
        col.prop(yaf_mat, "wireframe_amount", slider=True, text="Amount")
        col.prop(yaf_mat, "wireframe_color", text="")
        col = split.column()
        col.prop(yaf_mat, "wireframe_thickness", slider=True, text="Thickness")
        col.prop(yaf_mat, "wireframe_exponent", slider=True, text="Softness")
Exemple #38
0
    def draw(self, context):
        layout = self.layout
        yaf_mat = active_node_mat(context.material)

        split = layout.split()
        col = split.column()
        col.prop(yaf_mat, "filter_color")
        col = split.column()
        col.prop(yaf_mat, "glass_mir_col")
        layout.row().prop(yaf_mat, "glass_transmit", slider=True)
        layout.row().prop(yaf_mat, "fake_shadows")
    def draw(self, context):
        layout = self.layout
        yaf_mat = active_node_mat(context.material)

        split = layout.split()
        col = split.column()
        col.prop(yaf_mat, "wireframe_amount", slider=True, text="Amount")
        col.prop(yaf_mat, "wireframe_color", text="")
        col = split.column()
        col.prop(yaf_mat, "wireframe_thickness", slider=True, text="Thickness")
        col.prop(yaf_mat, "wireframe_exponent", slider=True, text="Softness")
Exemple #40
0
	def draw(self, context):
		wide_ui= context.region.width > narrowui
		layout= self.layout

		ob= context.object
		ma= active_node_mat(context.material)

		VRayMaterial= ma.vray
		VolumeVRayToon= VRayMaterial.VolumeVRayToon

		layout.active= VolumeVRayToon.use

		PLUGINS['SETTINGS']['SettingsEnvironment'].draw_VolumeVRayToon(context, layout, VRayMaterial)
Exemple #41
0
	def draw(self, context):
		wide_ui= context.region.width > narrowui
		layout= self.layout

		ob= context.object
		ma= active_node_mat(context.material)

		VRayMaterial= ma.vray
		VolumeVRayToon= VRayMaterial.VolumeVRayToon

		layout.active= VolumeVRayToon.use

		PLUGINS['SETTINGS']['SettingsEnvironment'].draw_VolumeVRayToon(context, layout, VRayMaterial)
    def draw(self, context):
        layout = self.layout

        wide_ui = context.region.width > narrowui

        ma = active_node_mat(context.material)

        Mtl2Sided = ma.vray.Mtl2Sided

        layout.active = Mtl2Sided.use

        split = layout.split()
        col = split.column()
        col.prop_search(Mtl2Sided,
                        'back',
                        bpy.data,
                        'materials',
                        text="Back material")

        layout.separator()

        split = layout.split()
        col = split.column()
        col.prop(Mtl2Sided, 'control')

        if Mtl2Sided.control == 'SLIDER':
            split = layout.split()
            col = split.column()
            col.prop(Mtl2Sided, 'translucency_slider', slider=True)
        elif Mtl2Sided.control == 'COLOR':
            split = layout.split()
            col = split.column()
            col.prop(Mtl2Sided, 'translucency_color', text="")
        else:
            split = layout.split(percentage=0.3)
            col = split.row()
            col.prop(Mtl2Sided, 'translucency_tex_mult', text="Mult")
            col = split.row()
            col.prop_search(Mtl2Sided,
                            'translucency_tex',
                            bpy.data,
                            'textures',
                            text="")

        layout.separator()

        split = layout.split()
        col = split.column()
        col.prop(Mtl2Sided, 'force_1sided')
    def draw(self, context):
        layout = self.layout
        yaf_mat = active_node_mat(context.material)

        split = layout.split()
        col = split.column()
        col.label(text="Mirror color:")
        col.prop(yaf_mat, "mirror_color", text="")

        col = split.column()
        col.prop(yaf_mat, "fresnel_effect")
        sub = col.column()
        sub.enabled = yaf_mat.fresnel_effect
        sub.prop(yaf_mat, "IOR_reflection", slider=True)
        layout.row().prop(yaf_mat, "specular_reflect", slider=True)
Exemple #44
0
    def draw(self, context):
        layout = self.layout
        yaf_mat = active_node_mat(context.material)

        split = layout.split()
        col = split.column()
        col.label(text="Mirror color:")
        col.prop(yaf_mat, "mirror_color", text="")

        col = split.column()
        col.prop(yaf_mat, "fresnel_effect")
        sub = col.column()
        sub.enabled = yaf_mat.fresnel_effect
        sub.prop(yaf_mat, "IOR_reflection", slider=True)
        layout.row().prop(yaf_mat, "specular_reflect", slider=True)
Exemple #45
0
def callback_match_BI_diffuse(self, context):
	if not hasattr(context, 'material'):
		return
	
	material = active_node_mat(context.material)
	
	if not context.material:
		return
	
	if not self.as_viewport_color:
		material.diffuse_color = (0.5, 0.5, 0.5)
		return

	color = self.diffuse if material.vray.type == 'BRDFVRayMtl' else self.color

	material.diffuse_color = color
    def draw(self, context):
        layout = self.layout
        yaf_mat = active_node_mat(context.material)

        split = layout.split()
        col = split.column()
        col.label(text="")
        col.prop(yaf_mat, "blend_value", slider=True)

        layout.separator()

        box = layout.box()
        box.label(text="Choose the two materials you wish to blend.")

        blend_one_draw(layout, yaf_mat)
        blend_two_draw(layout, yaf_mat)
Exemple #47
0
    def draw(self, context):
        layout = self.layout
        yaf_mat = active_node_mat(context.material)

        split = layout.split()
        col = split.column()
        col.label(text="")
        col.prop(yaf_mat, "blend_value", slider=True)

        layout.separator()

        box = layout.box()
        box.label(text="Choose the two materials you wish to blend.")

        blend_one_draw(layout, yaf_mat)
        blend_two_draw(layout, yaf_mat)
Exemple #48
0
    def draw(self, context):
        layout = self.layout
        yaf_mat = active_node_mat(context.material)

        split = layout.split()
        col = split.column()
        col.prop(yaf_mat, "diffuse_color")

        col = split.column()
        ref = col.column(align=True)
        ref.label(text="Reflectance model:")
        ref.prop(yaf_mat, "brdf_type", text="")
        sig = col.column()
        sig.enabled = yaf_mat.brdf_type == "oren-nayar"
        sig.prop(yaf_mat, "sigma")
        layout.row().prop(yaf_mat, "diffuse_reflect", slider=True)
Exemple #49
0
def callback_match_BI_diffuse(self, context):
    if not hasattr(context, 'material'):
        return

    material = active_node_mat(context.material)

    if not context.material:
        return

    if not self.as_viewport_color:
        material.diffuse_color = (0.5, 0.5, 0.5)
        return

    color = self.diffuse if material.vray.type == 'BRDFVRayMtl' else self.color

    material.diffuse_color = color
    def draw(self, context):
        layout = self.layout
        yaf_mat = active_node_mat(context.material)

        split = layout.split()
        col = split.column()
        col.prop(yaf_mat, "diffuse_color")

        col = split.column()
        ref = col.column(align=True)
        ref.label(text="Reflectance model:")
        ref.prop(yaf_mat, "brdf_type", text="")
        sig = col.column()
        sig.enabled = yaf_mat.brdf_type == "oren-nayar"
        sig.prop(yaf_mat, "sigma")
        layout.row().prop(yaf_mat, "diffuse_reflect", slider=True)
    def draw(self, context):
        layout = self.layout
        yaf_mat = active_node_mat(context.material)

        split = layout.split()
        col = split.column()
        col.prop(yaf_mat, "sssColor")
        col.prop(yaf_mat, "diffuse_reflect")
        col.prop(yaf_mat, "sssSpecularColor")
        col.prop(yaf_mat, "sssSigmaS")
        col.prop(yaf_mat, "sssSigmaS_factor")
        col = split.column()
        col.prop(yaf_mat, "glossy_color")
        col.prop(yaf_mat, "glossy_reflect")
        col.prop(yaf_mat, "sssSigmaA")
        col.prop(yaf_mat, "sss_transmit")
        col.prop(yaf_mat, "exponent")
        col.prop(yaf_mat, "sssIOR")
Exemple #52
0
    def draw(self, context):
        layout = self.layout

        wide_ui = context.region.width > narrowui

        ma = active_node_mat(context.material)

        Mtl2Sided = ma.vray.Mtl2Sided

        layout.active = Mtl2Sided.use

        split = layout.split()
        col = split.column()
        col.prop_search(Mtl2Sided, "back", bpy.data, "materials", text="Back material")

        layout.separator()

        split = layout.split()
        col = split.column()
        col.prop(Mtl2Sided, "control")

        if Mtl2Sided.control == "SLIDER":
            split = layout.split()
            col = split.column()
            col.prop(Mtl2Sided, "translucency_slider", slider=True)
        elif Mtl2Sided.control == "COLOR":
            split = layout.split()
            col = split.column()
            col.prop(Mtl2Sided, "translucency_color", text="")
        else:
            split = layout.split(percentage=0.3)
            col = split.row()
            col.prop(Mtl2Sided, "translucency_tex_mult", text="Mult")
            col = split.row()
            col.prop_search(Mtl2Sided, "translucency_tex", bpy.data, "textures", text="")

        layout.separator()

        split = layout.split()
        col = split.column()
        col.prop(Mtl2Sided, "force_1sided")
Exemple #53
0
	def draw(self, context):
		layout= self.layout

		wide_ui= context.region.width > narrowui

		ma= active_node_mat(context.material)

		Mtl2Sided= ma.vray.Mtl2Sided
		
		layout.active= Mtl2Sided.use

		split= layout.split()
		col= split.column()
		col.prop_search(Mtl2Sided, 'back', bpy.data, 'materials', text= "Back material")

		layout.separator()

		split= layout.split()
		col= split.column()
		col.prop(Mtl2Sided, 'control')

		if Mtl2Sided.control == 'SLIDER':
			split= layout.split()
			col= split.column()
			col.prop(Mtl2Sided, 'translucency_slider', slider=True)
		elif Mtl2Sided.control == 'COLOR':
			split= layout.split()
			col= split.column()
			col.prop(Mtl2Sided, 'translucency_color', text="")
		else:
			split= layout.split(percentage=0.3)
			col= split.row()
			col.prop(Mtl2Sided, 'translucency_tex_mult', text="Mult")
			col= split.row()
			col.prop_search(Mtl2Sided, 'translucency_tex', bpy.data, 'textures', text= "")

		layout.separator()

		split= layout.split()
		col= split.column()
		col.prop(Mtl2Sided, 'force_1sided')
    def draw(self, context):
        layout = self.layout
        yaf_mat = active_node_mat(context.material)

        split = layout.split()
        col = split.column()
        col.label(text="")
        col.prop(yaf_mat, "blend_value", slider=True)

        layout.separator()

        box = layout.box()
        box.label(text="Choose the two materials you wish to blend.")
        split = box.split()
        col = split.column()
        col.label(text="Material One:")
        col.prop_search(yaf_mat, "material1", bpy.data, 'materials', text="")

        col = split.column()
        col.label(text="Material Two:")
        col.prop_search(yaf_mat, "material2", bpy.data, 'materials', text="")
Exemple #55
0
    def draw(self, context):
        layout = self.layout

        mat = properties_material.active_node_mat(context.material)

        layout.prop(mat, "iileMaterial", text="Surface type")

        if mat.iileMaterial == "MATTE":
            layout.prop(mat, "iileMatteColor", text="Diffuse color")
            layout.prop(mat, "iileMatteColorTexture", text="Diffuse texture")
        
        elif mat.iileMaterial == "PLASTIC":
            layout.prop(mat, "iilePlasticDiffuseColor", text="Diffuse color")
            layout.prop(mat, "iilePlasticDiffuseTexture", text="Diffuse texture")
            layout.prop(mat, "iilePlasticSpecularColor", text="Specular color")
            layout.prop(mat, "iilePlasticSpecularTexture", text="Specular texture")
            layout.prop(mat, "iilePlasticRoughnessValue", text="Roughness")
            layout.prop(mat, "iilePlasticRoughnessTexture", text="Roughness texture")

        elif mat.iileMaterial == "MIRROR":
            layout.prop(mat, "iileMirrorKr", text="Reflectivity")
            layout.prop(mat, "iileMirrorKrTex", text="Reflectivity texture")

        elif mat.iileMaterial == "MIX":
            layout.prop(mat, "iileMatMixSlot1", text="Mix 1")
            layout.prop(mat, "iileMatMixSlot2", text="Mix 2")
            layout.prop(mat, "iileMatMixAmount", text="Amount")
            layout.prop(mat, "iileMatMixAmountTex", text="Amount texture")
        
        elif mat.iileMaterial == "GLASS":
            layout.prop(mat, "iileMatGlassKr", text="Reflectivity")
            layout.prop(mat, "iileMatGlassKrTex", text="Reflectivity Texture")
            layout.prop(mat, "iileMatGlassKt", text="Transmission")
            layout.prop(mat, "iileMatGlassKtTex", text="Transmission Texture")
            layout.prop(mat, "iileMatGlassIor", text="IOR")
            layout.prop(mat, "iileMatGlassIorTex", text="IOR Texture")
            layout.prop(mat, "iileMatGlassURough", text="U Roughness")
            layout.prop(mat, "iileMatGlassURoughTex", text="U Roughness Texture")
            layout.prop(mat, "iileMatGlassVRough", text="V Roughness")
            layout.prop(mat, "iileMatGlassVRoughTex", text="V Roughness Texture")
    def draw(self, context):
        layout = self.layout
        yaf_mat = active_node_mat(context.material)

        layout.prop(yaf_mat, "pass_index")

        split = layout.split()
        col = split.column()
        layout.row().prop(yaf_mat, "visibility")

        split = layout.split()
        col = split.column()
        layout.row().prop(yaf_mat, "receive_shadows")

        if yaf_mat.mat_type != "blend":
            split = layout.split()
            col = split.column()
            layout.row().prop(yaf_mat, "additionaldepth")

        split = layout.split()
        col = split.column()
        layout.row().prop(yaf_mat, "samplingfactor")
Exemple #57
0
    def draw(self, context):
        layout = self.layout
        yaf_mat = active_node_mat(context.material)

        layout.prop(yaf_mat, "pass_index")

        split = layout.split()
        col = split.column()
        layout.row().prop(yaf_mat, "visibility")

        split = layout.split()
        col = split.column()
        layout.row().prop(yaf_mat, "receive_shadows")

        if yaf_mat.mat_type != "blend":
            split = layout.split()
            col = split.column()
            layout.row().prop(yaf_mat, "additionaldepth")

        split = layout.split()
        col = split.column()
        layout.row().prop(yaf_mat, "samplingfactor")
    def draw(self, context):
        layout = self.layout

        mat = active_node_mat(context.material)

        ob = context.object
        slot = context.material_slot
        space = context.space_data

        wide_ui = context.region.width > narrowui

        if ob:
            row = layout.row()

            row.template_list("VRayListMaterialSlots",
                              "",
                              ob,
                              "material_slots",
                              ob,
                              "active_material_index",
                              rows=2)

            col = row.column(align=True)
            col.operator("object.material_slot_add", icon='ZOOMIN', text="")
            col.operator("object.material_slot_remove",
                         icon='ZOOMOUT',
                         text="")

            col.menu("MATERIAL_MT_specials", icon='DOWNARROW_HLT', text="")

            if ob.mode == 'EDIT':
                row = layout.row(align=True)
                row.operator("object.material_slot_assign", text="Assign")
                row.operator("object.material_slot_select", text="Select")
                row.operator("object.material_slot_deselect", text="Deselect")

        if wide_ui:
            split = layout.split()

            if ob:
                split.template_ID(ob, "active_material", new="material.new")
            elif mat:
                split.template_ID(space, "pin_id")
                split.separator()
        else:
            if ob:
                layout.template_ID(ob, "active_material", new="material.new")
            elif mat:
                layout.template_ID(space, "pin_id")

        if mat:
            VRayMaterial = mat.vray

            split = layout.split()
            col = split.column()
            col.label(text="Simple materials:")
            if wide_ui:
                col = split.column()
            col.menu('VRAY_MT_preset_material', text="Preset")

            if wide_ui:
                layout.prop(VRayMaterial, 'type', expand=True)
            else:
                layout.prop(VRayMaterial, 'type')
    def draw(self, context):
        wide_ui = context.region.width > narrowui

        ob = context.object
        ma = active_node_mat(context.material)

        VRayMaterial = ma.vray
        MtlRenderStats = VRayMaterial.MtlRenderStats

        layout = self.layout

        layout.prop(VRayMaterial, 'dontOverride')
        layout.separator()

        split = layout.split()
        col = split.column()
        col.prop(VRayMaterial, 'round_edges')
        if wide_ui:
            col = split.column()
        else:
            col = col.column()
        col.active = VRayMaterial.round_edges
        col.prop(VRayMaterial, 'radius', text="Radius")

        layout.separator()

        split = layout.split()
        col = split.column()
        col.prop(VRayMaterial, 'material_id_number')
        if wide_ui:
            col = split.column()
        else:
            col = col.column()
        col.prop(VRayMaterial, 'material_id_color', text="")

        layout.separator()

        layout.prop(MtlRenderStats, 'use')

        split = layout.split()
        split.active = MtlRenderStats.use
        col = split.column()
        col.prop(MtlRenderStats, 'visibility', text="Visible")

        split = layout.split()
        split.active = MtlRenderStats.use
        col = split.column()
        col.label(text="Visible to:")

        split = layout.split()
        split.active = MtlRenderStats.use
        sub = split.column()
        sub.active = MtlRenderStats.visibility
        sub.prop(MtlRenderStats, 'camera_visibility', text="Camera")
        sub.prop(MtlRenderStats, 'gi_visibility', text="GI")
        sub.prop(MtlRenderStats, 'shadows_visibility', text="Shadows")
        if wide_ui:
            sub = split.column()
            sub.active = MtlRenderStats.visibility
        sub.prop(MtlRenderStats, 'reflections_visibility', text="Reflections")
        sub.prop(MtlRenderStats, 'refractions_visibility', text="Refractions")
 def draw_header(self, context):
     ma = active_node_mat(context.material)
     VRayMaterial = ma.vray
     VolumeVRayToon = VRayMaterial.VolumeVRayToon
     self.layout.prop(VolumeVRayToon, 'use', text="")