Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'render_povray/ui.py')
-rw-r--r--render_povray/ui.py130
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, ")