[Bf-extensions-cvs] SVN commit: /data/svn/bf-extensions [1909] trunk/py/scripts/addons/ render_povray: Reorganized the whole pov properties, to place them in PropertyGroups, rather than cluttering the Scene/Material /etc.
Bastien Montagne
montagne29 at wanadoo.fr
Mon May 9 20:29:09 CEST 2011
Revision: 1909
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-extensions&revision=1909
Author: mont29
Date: 2011-05-09 18:29:08 +0000 (Mon, 09 May 2011)
Log Message:
-----------
Reorganized the whole pov properties, to place them in PropertyGroups, rather than cluttering the Scene/Material/etc. objects?\226?\128?\153 spaces?\226?\128?\166
Also added a new file handling the conversion from existing files using the old pov properties (call the ?\203?\152povray render: update to script v0.0.9?\226?\128?\157 operator (bpy.ops.scene.pov_update_properties) in the search box of the 3d views to make the conversion).
Modified Paths:
--------------
trunk/py/scripts/addons/render_povray/__init__.py
trunk/py/scripts/addons/render_povray/render.py
trunk/py/scripts/addons/render_povray/ui.py
Added Paths:
-----------
trunk/py/scripts/addons/render_povray/update_files.py
Modified: trunk/py/scripts/addons/render_povray/__init__.py
===================================================================
--- trunk/py/scripts/addons/render_povray/__init__.py 2011-05-08 12:57:08 UTC (rev 1908)
+++ trunk/py/scripts/addons/render_povray/__init__.py 2011-05-09 18:29:08 UTC (rev 1909)
@@ -21,7 +21,7 @@
bl_info = {
"name": "POV-Ray 3.7",
"author": "Campbell Barton, Silvio Falcinelli, Maurice Raybaud, Constantin Rahn",
- "version": (0, 0, 8),
+ "version": (0, 0, 9),
"blender": (2, 5, 7),
"api": 35622,
"location": "Render > Engine > POV-Ray 3.7",
@@ -37,479 +37,483 @@
import imp
imp.reload(ui)
imp.reload(render)
+ imp.reload(update_files)
else:
import bpy
- from bpy.props import StringProperty, BoolProperty, IntProperty, FloatProperty, FloatVectorProperty, EnumProperty
+ from bpy.props import StringProperty, BoolProperty, IntProperty, FloatProperty, \
+ FloatVectorProperty, EnumProperty, PointerProperty
+ from . import ui
from . import render
- from . import ui
+ from . import update_files
-def register():
- bpy.utils.register_module(__name__)
-
- Scene = bpy.types.Scene
- Mat = bpy.types.Material
- Tex = bpy.types.Texture
- Obj = bpy.types.Object
- Cam = bpy.types.Camera
- Text = bpy.types.Text
- ###########################SCENE##################################
-
+###############################################################################
+# Scene POV properties.
+###############################################################################
+class RenderPovSettingsScene(bpy.types.PropertyGroup):
# File Options
- Scene.pov_tempfiles_enable = BoolProperty(
+ tempfiles_enable = BoolProperty(
name="Enable Tempfiles",
description="Enable the OS-Tempfiles. Otherwise set the path where to save the files.",
default=True)
- Scene.pov_deletefiles_enable = BoolProperty(
+ deletefiles_enable = BoolProperty(
name="Delete files",
description="Delete files after rendering. Doesn't work with the image.",
default=True)
- Scene.pov_scene_name = StringProperty(
+ scene_name = StringProperty(
name="Scene Name",
- description="Name of POV-Ray scene to create. Empty name will use the name of the blend file.",
+ description="Name of POV-Ray scene to create. Empty name will use the name of " \
+ "the blend file.",
default="", maxlen=1024)
- Scene.pov_scene_path = StringProperty(
+ scene_path = StringProperty(
name="Export scene path",
# description="Path to directory where the exported scene (POV and INI) is created", # Bug in POV-Ray RC3
description="Path to directory where the files are created",
default="", maxlen=1024, subtype="DIR_PATH")
- Scene.pov_renderimage_path = StringProperty(
+ renderimage_path = StringProperty(
name="Rendered image path",
description="Full path to directory where the rendered image is saved.",
default="", maxlen=1024, subtype="DIR_PATH")
- Scene.pov_list_lf_enable = BoolProperty(
+ list_lf_enable = BoolProperty(
name="LF in lists",
- description="Enable line breaks in lists (vectors and indices). Disabled: lists are exported in one line.",
+ description="Enable line breaks in lists (vectors and indices). Disabled: " \
+ "lists are exported in one line.",
default=True)
# Not a real pov option, just to know if we should write
- Scene.pov_radio_enable = BoolProperty(
+ radio_enable = BoolProperty(
name="Enable Radiosity",
description="Enable POV-Rays radiosity calculation",
default=False)
- Scene.pov_radio_display_advanced = BoolProperty(
+ radio_display_advanced = BoolProperty(
name="Advanced Options",
description="Show advanced options",
default=False)
- Scene.pov_media_enable = BoolProperty(
+ media_enable = BoolProperty(
name="Enable Media",
description="Enable POV-Rays atmospheric media",
default=False)
- Scene.pov_media_samples = IntProperty(
- name="Samples", description="Number of samples taken from camera to first object encountered along ray path for media calculation",
+ media_samples = IntProperty(
+ name="Samples",
+ description="Number of samples taken from camera to first object " \
+ "encountered along ray path for media calculation",
min=1, max=100, default=35)
- Scene.pov_media_color = FloatVectorProperty(
- name="Media Color",
- description="The atmospheric media color.",
- subtype='COLOR',
- precision=4,
- step=0.01,
- min=0,
- soft_max=1,
- default=(0.001, 0.001, 0.001),
- options={'ANIMATABLE'})
+ media_color = FloatVectorProperty(
+ name="Media Color", description="The atmospheric media color.",
+ precision=4, step=0.01, min=0, soft_max=1,
+ default=(0.001, 0.001, 0.001), options={'ANIMATABLE'}, subtype='COLOR')
- Scene.pov_baking_enable = BoolProperty(
+ baking_enable = BoolProperty(
name="Enable Baking",
description="Enable POV-Rays texture baking",
default=False)
- Scene.pov_indentation_character = EnumProperty(
+ indentation_character = EnumProperty(
name="Indentation",
description="Select the indentation type",
items=(("0", "None", "No indentation"),
- ("1", "Tabs", "Indentation with tabs"),
- ("2", "Spaces", "Indentation with spaces")),
+ ("1", "Tabs", "Indentation with tabs"),
+ ("2", "Spaces", "Indentation with spaces")),
default="2")
- Scene.pov_indentation_spaces = IntProperty(
+ indentation_spaces = IntProperty(
name="Quantity of spaces",
description="The number of spaces for indentation",
min=1, max=10, default=4)
- Scene.pov_comments_enable = BoolProperty(
+ comments_enable = BoolProperty(
name="Enable Comments",
description="Add comments to pov file",
default=True)
# Real pov options
- Scene.pov_command_line_switches = StringProperty(name="Command Line Switches",
- description="Command line switches consist of a + (plus) or - (minus) sign, followed by one or more alphabetic characters and possibly a numeric value.",
+ command_line_switches = StringProperty(
+ name="Command Line Switches",
+ description="Command line switches consist of a + (plus) or - (minus) sign, followed " \
+ "by one or more alphabetic characters and possibly a numeric value.",
default="", maxlen=500)
- Scene.pov_antialias_enable = BoolProperty(
+ antialias_enable = BoolProperty(
name="Anti-Alias", description="Enable Anti-Aliasing",
default=True)
- Scene.pov_antialias_method = EnumProperty(
+ antialias_method = EnumProperty(
name="Method",
- description="AA-sampling method. Type 1 is an adaptive, non-recursive, super-sampling method. Type 2 is an adaptive and recursive super-sampling method.",
+ description="AA-sampling method. Type 1 is an adaptive, non-recursive, super-sampling "\
+ "method. Type 2 is an adaptive and recursive super-sampling method.",
items=(("0", "non-recursive AA", "Type 1 Sampling in POV-Ray"),
- ("1", "recursive AA", "Type 2 Sampling in POV-Ray")),
+ ("1", "recursive AA", "Type 2 Sampling in POV-Ray")),
default="1")
- Scene.pov_antialias_depth = IntProperty(
+ antialias_depth = IntProperty(
name="Antialias Depth", description="Depth of pixel for sampling",
min=1, max=9, default=3)
- Scene.pov_antialias_threshold = FloatProperty(
+ antialias_threshold = FloatProperty(
name="Antialias Threshold", description="Tolerance for sub-pixels",
min=0.0, max=1.0, soft_min=0.05, soft_max=0.5, default=0.1)
- Scene.pov_jitter_enable = BoolProperty(
- name="Jitter", description="Enable Jittering. Adds noise into the sampling process (it should be avoided to use jitter in animation).",
+ jitter_enable = BoolProperty(
+ name="Jitter",
+ description="Enable Jittering. Adds noise into the sampling process (it should be " \
+ "avoided to use jitter in animation).",
default=True)
- Scene.pov_jitter_amount = FloatProperty(
+ jitter_amount = FloatProperty(
name="Jitter Amount", description="Amount of jittering.",
min=0.0, max=1.0, soft_min=0.01, soft_max=1.0, default=1.0)
- Scene.pov_antialias_gamma = FloatProperty(
- name="Antialias Gamma", description="POV-Ray compares gamma-adjusted values for super sampling. Antialias Gamma sets the Gamma before comparison.",
+ antialias_gamma = FloatProperty(
+ name="Antialias Gamma",
+ description="POV-Ray compares gamma-adjusted values for super sampling. Antialias " \
+ "Gamma sets the Gamma before comparison.",
min=0.0, max=5.0, soft_min=0.01, soft_max=2.5, default=2.5)
- Scene.pov_max_trace_level = IntProperty(
- name="Max Trace Level", description="Number of reflections/refractions allowed on ray path",
+ max_trace_level = IntProperty(
+ name="Max Trace Level",
+ description="Number of reflections/refractions allowed on ray path",
min=1, max=256, default=5)
- Scene.pov_photon_spacing = FloatProperty(
- name="Spacing", description="Average distance between photons on surfaces. half this get four times as many surface photons",
+ photon_spacing = FloatProperty(
+ name="Spacing",
+ description="Average distance between photons on surfaces. half this get four times " \
+ "as many surface photons",
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-extensions-cvs
mailing list