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:
authorConstantin Rahn <conz@vrchannel.de>2011-01-23 23:39:02 +0300
committerConstantin Rahn <conz@vrchannel.de>2011-01-23 23:39:02 +0300
commit3a02375d7bee535091943f508dbd46c5fde62a0f (patch)
treed66dd9ef3336ad2bf68b8f6d7c3e7098b3a4c4b5 /render_povray/ui.py
parente069b00331a1cf3316053c61bca6b49e37155eef (diff)
Added file options for export.
Usage: Deactivate "OS Tempfile" to see the new options. Some UI and code cleanup.
Diffstat (limited to 'render_povray/ui.py')
-rw-r--r--render_povray/ui.py299
1 files changed, 158 insertions, 141 deletions
diff --git a/render_povray/ui.py b/render_povray/ui.py
index 93a21e0c..678314f1 100644
--- a/render_povray/ui.py
+++ b/render_povray/ui.py
@@ -25,7 +25,7 @@ import properties_render
properties_render.RENDER_PT_render.COMPAT_ENGINES.add('POVRAY_RENDER')
properties_render.RENDER_PT_dimensions.COMPAT_ENGINES.add('POVRAY_RENDER')
# properties_render.RENDER_PT_antialiasing.COMPAT_ENGINES.add('POVRAY_RENDER')
-properties_render.RENDER_PT_shading.COMPAT_ENGINES.add('POVRAY_RENDER')
+properties_render.RENDER_PT_shading.COMPAT_ENGINES.add('POVRAY_RENDER') # We don't use it right now. Should be implemented later.
properties_render.RENDER_PT_output.COMPAT_ENGINES.add('POVRAY_RENDER')
del properties_render
@@ -134,143 +134,57 @@ class ObjectButtonsPanel():
rd = context.scene.render
return obj and (rd.use_game_engine == False) and (rd.engine in cls.COMPAT_ENGINES)
-########################################MR######################################
-
-class MATERIAL_PT_povray_mirrorIOR(MaterialButtonsPanel, bpy.types.Panel):
- bl_label = "IOR Mirror"
- 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:
- split = layout.split()
- col = split.column()
- row = col.row()
- row.alignment = 'CENTER'
- row.label(text="The current Raytrace ")
- row = col.row()
- row.alignment = 'CENTER'
- row.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
-
-
-class MATERIAL_PT_povray_conserve_energy(MaterialButtonsPanel, bpy.types.Panel):
- bl_label = "conserve energy"
+class RENDER_PT_povray_export_settings(RenderButtonsPanel, bpy.types.Panel):
+ bl_label = "Export Settings"
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="")
+ scene = context.scene
+ rd = scene.render
- def draw(self, context):
- layout = self.layout
+ layout.active = scene.pov_max_trace_level
+ split = layout.split()
- mat = context.material
- layout.active = mat.pov_irid_enable
+ col = split.column()
+ col.label(text="Command line switches:")
+ col.prop(scene, "pov_command_line_switches", text="")
+ split = layout.split()
+ col = split.column()
+ col.prop(scene, "pov_tempfiles_enable", text="OS Tempfiles")
+ if not scene.pov_tempfiles_enable:
+ col = split.column()
+ col.prop(scene, "pov_deletefiles_enable", text="Delete files")
+ else:
+ col = split.column()
- if mat.pov_irid_enable:
+ split = layout.split()
+ if not scene.pov_tempfiles_enable:
+ col = split.column()
+ col.prop(scene, "pov_scene_name", text="Name")
split = layout.split()
-
col = split.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)
-
-
-class MATERIAL_PT_povray_caustics(MaterialButtonsPanel, bpy.types.Panel):
- bl_label = "Caustics"
- COMPAT_ENGINES = {'POVRAY_RENDER'}
-
- def draw_header(self, context):
- mat = context.material
-
- self.layout.prop(mat, "pov_caustics_enable", text="")
-
- def draw(self, context):
-
- layout = self.layout
-
- mat = context.material
- layout.active = mat.pov_caustics_enable
- Radio = 1
- if mat.pov_caustics_enable:
+ col.prop(scene, "pov_scene_path", text="Path to files")
+ #col.prop(scene, "pov_scene_path", text="Path to POV-file")
split = layout.split()
+ #col = split.column() # Bug in POV-Ray RC3
+ #col.prop(scene, "pov_renderimage_path", text="Path to image")
+ #split = layout.split()
col = split.column()
- col.prop(mat, "pov_refraction_type")
-## if mat.pov_refraction_type=="0":
-## mat.pov_fake_caustics = False
-## mat.pov_photons_refraction = False
-## mat.pov_photons_reflection = True
- if mat.pov_refraction_type == "1":
-## mat.pov_fake_caustics = True
-## mat.pov_photons_refraction = False
- col.prop(mat, "pov_fake_caustics_power", slider=True)
- elif mat.pov_refraction_type == "2":
-## mat.pov_fake_caustics = False
-## mat.pov_photons_refraction = True
- col.prop(mat, "pov_photons_dispersion", slider=True)
- col.prop(mat, "pov_photons_reflection")
-
-## col.prop(mat, "pov_fake_caustics")
-## if mat.pov_fake_caustics:
-## col.prop(mat, "pov_fake_caustics_power", slider=True)
-## mat.pov_photons_refraction=0
-## else:
-## col.prop(mat, "pov_photons_refraction")
-## if mat.pov_photons_refraction:
-## col.prop(mat, "pov_photons_dispersion", slider=True)
-## Radio = 0
-## mat.pov_fake_caustics=Radio
-## col.prop(mat, "pov_photons_reflection")
-####TODO : MAKE THIS A real RADIO BUTTON (using EnumProperty?)
-######################################EndMR#####################################
+ col.prop(scene, "pov_indentation_character", text="Indent")
+ col = split.column()
+ if scene.pov_indentation_character == "2":
+ col.prop(scene, "pov_indentation_spaces", text="Spaces")
+ split = layout.split()
+ col = split.column()
+ col.prop(scene, "pov_comments_enable", text="Comments")
-class RENDER_PT_povray_global_settings(RenderButtonsPanel, bpy.types.Panel):
- bl_label = "Global Settings"
+class RENDER_PT_povray_render_settings(RenderButtonsPanel, bpy.types.Panel):
+ bl_label = "Render Settings"
COMPAT_ENGINES = {'POVRAY_RENDER'}
def draw(self, context):
@@ -281,11 +195,6 @@ class RENDER_PT_povray_global_settings(RenderButtonsPanel, bpy.types.Panel):
layout.active = scene.pov_max_trace_level
split = layout.split()
-
- col = split.column()
- col.label(text="Command line switches:")
- col.prop(scene, "pov_command_line_switches", text="")
- split = layout.split()
col = split.column()
col.prop(scene, "pov_max_trace_level", text="Ray Depth")
col = split.column()
@@ -407,7 +316,6 @@ class RENDER_PT_povray_media(RenderButtonsPanel, bpy.types.Panel):
col = split.column()
col.prop(scene, "pov_media_color", text="Color")
-
##class RENDER_PT_povray_baking(RenderButtonsPanel, bpy.types.Panel):
## bl_label = "Baking"
## COMPAT_ENGINES = {'POVRAY_RENDER'}
@@ -426,26 +334,135 @@ class RENDER_PT_povray_media(RenderButtonsPanel, bpy.types.Panel):
## layout.active = scene.pov_baking_enable
-class RENDER_PT_povray_formatting(RenderButtonsPanel, bpy.types.Panel):
- bl_label = "Formatting POV-Ray file"
+class MATERIAL_PT_povray_mirrorIOR(MaterialButtonsPanel, bpy.types.Panel):
+ bl_label = "IOR Mirror"
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
- scene = context.scene
- rd = scene.render
+ mat = context.material
+ layout.active = mat.pov_mirror_use_IOR
- split = layout.split()
+ if mat.pov_mirror_use_IOR:
+ split = layout.split()
+ col = split.column()
+ row = col.row()
+ row.alignment = 'CENTER'
+ row.label(text="The current Raytrace ")
+ row = col.row()
+ row.alignment = 'CENTER'
+ row.label(text="Transparency IOR is: " + str(mat.raytrace_transparency.ior))
- col = split.column()
- col.prop(scene, "pov_indentation_character", text="Indent")
- col = split.column()
- if scene.pov_indentation_character == "2":
- col.prop(scene, "pov_indentation_spaces", text="Spaces")
- split = layout.split()
- col = split.column()
- col.prop(scene, "pov_comments_enable", text="Comments")
+
+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
+
+
+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:
+ split = layout.split()
+
+ col = split.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)
+
+
+class MATERIAL_PT_povray_caustics(MaterialButtonsPanel, bpy.types.Panel):
+ bl_label = "Caustics"
+ COMPAT_ENGINES = {'POVRAY_RENDER'}
+
+ def draw_header(self, context):
+ mat = context.material
+
+ self.layout.prop(mat, "pov_caustics_enable", text="")
+
+ def draw(self, context):
+
+ layout = self.layout
+
+ mat = context.material
+ layout.active = mat.pov_caustics_enable
+ Radio = 1
+ if mat.pov_caustics_enable:
+ split = layout.split()
+
+ col = split.column()
+ col.prop(mat, "pov_refraction_type")
+## if mat.pov_refraction_type=="0":
+## mat.pov_fake_caustics = False
+## mat.pov_photons_refraction = False
+## mat.pov_photons_reflection = True
+ if mat.pov_refraction_type == "1":
+## mat.pov_fake_caustics = True
+## mat.pov_photons_refraction = False
+ col.prop(mat, "pov_fake_caustics_power", slider=True)
+ elif mat.pov_refraction_type == "2":
+## mat.pov_fake_caustics = False
+## mat.pov_photons_refraction = True
+ col.prop(mat, "pov_photons_dispersion", slider=True)
+ col.prop(mat, "pov_photons_reflection")
+
+## col.prop(mat, "pov_fake_caustics")
+## if mat.pov_fake_caustics:
+## col.prop(mat, "pov_fake_caustics_power", slider=True)
+## mat.pov_photons_refraction=0
+## else:
+## col.prop(mat, "pov_photons_refraction")
+## if mat.pov_photons_refraction:
+## col.prop(mat, "pov_photons_dispersion", slider=True)
+## Radio = 0
+## mat.pov_fake_caustics=Radio
+## col.prop(mat, "pov_photons_reflection")
+####TODO : MAKE THIS A real RADIO BUTTON (using EnumProperty?)
class TEXTURE_PT_povray_tex_gamma(TextureButtonsPanel, bpy.types.Panel):