diff options
author | Maurice Raybaud <mauriceraybaud@hotmail.fr> | 2016-05-23 22:20:39 +0300 |
---|---|---|
committer | Maurice Raybaud <mauriceraybaud@hotmail.fr> | 2016-05-23 22:20:39 +0300 |
commit | 7e05091168f0b1bb01c4164dcfeb80be7b2318b4 (patch) | |
tree | ad4ebdbb68b80d00946c9dbd6d75019f4e2ec4f3 /render_povray/ui.py | |
parent | 4eafe3195c9a18aae0813ccf39371ff910d47a5a (diff) |
*converted all calls to file.write of .shading.py to tabWrite function to no longer pass the file variable
*added a conversion of all image paths to forward slashes, preferred by POV, sending less warning.
*repaired basic handling of packed textures
*rearranged Material UI
Diffstat (limited to 'render_povray/ui.py')
-rw-r--r-- | render_povray/ui.py | 130 |
1 files changed, 45 insertions, 85 deletions
diff --git a/render_povray/ui.py b/render_povray/ui.py index 3216ac2d..106bf6ed 100644 --- a/render_povray/ui.py +++ b/render_povray/ui.py @@ -612,46 +612,36 @@ class RENDER_PT_povray_media(WorldButtonsPanel, bpy.types.Panel): ## layout.active = scene.pov.baking_enable -class MATERIAL_PT_povray_mirrorIOR(MaterialButtonsPanel, bpy.types.Panel): - bl_label = "IOR Mirror" +class MATERIAL_PT_povray_reflection(MaterialButtonsPanel, bpy.types.Panel): + bl_label = "POV-Ray Reflection" COMPAT_ENGINES = {'POVRAY_RENDER'} - def draw_header(self, context): - scene = context.material - - self.layout.prop(scene.pov, "mirror_use_IOR", text="") - def draw(self, context): layout = self.layout - mat = context.material - layout.active = mat.pov.mirror_use_IOR - - if mat.pov.mirror_use_IOR: + col = layout.column() + col.prop(mat.pov, "irid_enable") + if mat.pov.irid_enable: col = layout.column() - col.alignment = 'CENTER' - col.label(text="The current Raytrace ") - col.label(text="Transparency IOR is: " + str(mat.raytrace_transparency.ior)) - - -class MATERIAL_PT_povray_metallic(MaterialButtonsPanel, bpy.types.Panel): - bl_label = "metallic Mirror" - COMPAT_ENGINES = {'POVRAY_RENDER'} - - def draw_header(self, context): - scene = context.material - - self.layout.prop(scene.pov, "mirror_metallic", text="") - - def draw(self, context): - layout = self.layout - - mat = context.material - layout.active = mat.pov.mirror_metallic - - + col.prop(mat.pov, "irid_amount", slider=True) + col.prop(mat.pov, "irid_thickness", slider=True) + col.prop(mat.pov, "irid_turbulence", slider=True) + col.prop(mat.pov, "conserve_energy") + col2=col.split().column() + + if not mat.raytrace_mirror.use: + col2.label(text="Please Check Mirror settings :") + col2.active = mat.raytrace_mirror.use + col2.prop(mat.pov, "mirror_use_IOR") + if mat.pov.mirror_use_IOR: + col2.alignment = 'CENTER' + col2.label(text="The current Raytrace ") + col2.label(text="Transparency IOR is: " + str(mat.raytrace_transparency.ior)) + col2.prop(mat.pov, "mirror_metallic") + + class MATERIAL_PT_povray_fade_color(MaterialButtonsPanel, bpy.types.Panel): - bl_label = "Interior Fade Color" + bl_label = "POV-Ray Absorption" COMPAT_ENGINES = {'POVRAY_RENDER'} def draw_header(self, context): @@ -660,48 +650,15 @@ class MATERIAL_PT_povray_fade_color(MaterialButtonsPanel, bpy.types.Panel): self.layout.prop(mat.pov, "interior_fade_color", text="") def draw(self, context): - # layout = self.layout - # mat = context.material - # layout.active = mat.pov.interior_fade_color - pass - - -class MATERIAL_PT_povray_conserve_energy(MaterialButtonsPanel, bpy.types.Panel): - bl_label = "conserve energy" - COMPAT_ENGINES = {'POVRAY_RENDER'} - - def draw_header(self, context): - mat = context.material - - self.layout.prop(mat.pov, "conserve_energy", text="") - - def draw(self, context): - layout = self.layout - - mat = context.material - layout.active = mat.pov.conserve_energy - - -class MATERIAL_PT_povray_iridescence(MaterialButtonsPanel, bpy.types.Panel): - bl_label = "iridescence" - COMPAT_ENGINES = {'POVRAY_RENDER'} - - def draw_header(self, context): - mat = context.material - - self.layout.prop(mat.pov, "irid_enable", text="") - - def draw(self, context): layout = self.layout - mat = context.material - layout.active = mat.pov.irid_enable - - if mat.pov.irid_enable: - col = layout.column() - col.prop(mat.pov, "irid_amount", slider=True) - col.prop(mat.pov, "irid_thickness", slider=True) - col.prop(mat.pov, "irid_turbulence", slider=True) + # layout.active = mat.pov.interior_fade_color + if mat.pov.interior_fade_color != (0.0, 0.0, 0.0): + layout.label(text="Raytrace transparency") + layout.label(text="depth max Limit needs") + layout.label(text="to be non zero to fade") + + pass class MATERIAL_PT_povray_caustics(MaterialButtonsPanel, bpy.types.Panel): @@ -710,28 +667,31 @@ class MATERIAL_PT_povray_caustics(MaterialButtonsPanel, bpy.types.Panel): def draw_header(self, context): mat = context.material - - self.layout.prop(mat.pov, "caustics_enable", text="") - + if mat.pov.caustics_enable: + self.layout.prop(mat.pov, "caustics_enable", text="", icon="PMARKER_SEL" ) + else: + self.layout.prop(mat.pov, "caustics_enable", text="", icon="PMARKER" ) def draw(self, context): layout = self.layout mat = context.material layout.active = mat.pov.caustics_enable - + col = layout.column() if mat.pov.caustics_enable: - col = layout.column() - col.prop(mat.pov, "refraction_type") + col.prop(mat.pov, "refraction_caustics") + if mat.pov.refraction_caustics: + + col.prop(mat.pov, "refraction_type", text="") - if mat.pov.refraction_type == "1": - col.prop(mat.pov, "fake_caustics_power", slider=True) - elif mat.pov.refraction_type == "2": - col.prop(mat.pov, "photons_dispersion", slider=True) - col.prop(mat.pov, "photons_dispersion_samples", slider=True) + if mat.pov.refraction_type == "1": + col.prop(mat.pov, "fake_caustics_power", slider=True) + elif mat.pov.refraction_type == "2": + col.prop(mat.pov, "photons_dispersion", slider=True) + col.prop(mat.pov, "photons_dispersion_samples", slider=True) col.prop(mat.pov, "photons_reflection") - if mat.pov.refraction_type == "0" and not mat.pov.photons_reflection: + if not mat.pov.refraction_caustics and not mat.pov.photons_reflection: col = layout.column() col.alignment = 'CENTER' col.label(text="Caustics override is on, ") |