Newer
Older
# ##### BEGIN GPL LICENSE BLOCK #####
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ##### END GPL LICENSE BLOCK #####
"author": "Campbell Barton, Silvio Falcinelli, Maurice Raybaud, "
"Constantin Rahn, Bastien Montagne, Leonid Desyatkov",
Bastien Montagne
committed
"version": (0, 0, 9),
"blender": (2, 75, 0),
Jonathan Smith
committed
"location": "Render > Engine > POV-Ray 3.7",
"description": "Basic POV-Ray 3.7 integration for blender",
"warning": "this script is RC",
Campbell Barton
committed
"wiki_url": "http://wiki.blender.org/index.php/Extensions:2.6/Py/"
"Scripts/Render/POV-Ray",
"category": "Render",
}
import importlib
importlib.reload(ui)
importlib.reload(render)
importlib.reload(update_files)
import addon_utils # To use some other addons
import nodeitems_utils #for Nodes
from nodeitems_utils import NodeCategory, NodeItem #for Nodes
from bpy.types import (
AddonPreferences,
PropertyGroup,
)
from bpy.props import (
StringProperty,
BoolProperty,
IntProperty,
FloatProperty,
FloatVectorProperty,
EnumProperty,
PointerProperty,
)
from . import (
ui,
render,
update_files,
)
CoDEmanX
committed
def string_strip_hyphen(name):
return name.replace("-", "")
Bastien Montagne
committed
###############################################################################
# Scene POV properties.
###############################################################################
class RenderPovSettingsScene(PropertyGroup):
Bastien Montagne
committed
tempfiles_enable = BoolProperty(
description="Enable the OS-Tempfiles. Otherwise set the path where"
" to save the files",
pov_editor = BoolProperty(
name="POV-Ray editor",
description="Don't Close POV-Ray editor after rendering (Overriden"
" by /EXIT command)",
Bastien Montagne
committed
deletefiles_enable = BoolProperty(
description="Delete files after rendering. "
"Doesn't work with the image",
Bastien Montagne
committed
scene_name = StringProperty(
description="Name of POV-Ray scene to create. Empty name will use "
"the name of the blend file",
Bastien Montagne
committed
scene_path = StringProperty(
# Bug in POV-Ray RC3
# description="Path to directory where the exported scene "
description="Path to directory where the files are created",
maxlen=1024, subtype="DIR_PATH")
Bastien Montagne
committed
renderimage_path = StringProperty(
description="Full path to directory where the rendered image is "
"saved",
maxlen=1024, subtype="DIR_PATH")
Bastien Montagne
committed
list_lf_enable = BoolProperty(
description="Enable line breaks in lists (vectors and indices). "
"Disabled: lists are exported in one line",
# Not a real pov option, just to know if we should write
Bastien Montagne
committed
radio_enable = BoolProperty(
description="Enable POV-Rays radiosity calculation",
Bastien Montagne
committed
radio_display_advanced = BoolProperty(
name="Advanced Options",
description="Show advanced options",
default=False)
Bastien Montagne
committed
media_enable = BoolProperty(
name="Enable Media",
description="Enable POV-Rays atmospheric media",
default=False)
Bastien Montagne
committed
media_samples = IntProperty(
name="Samples",
Campbell Barton
committed
description="Number of samples taken from camera to first object "
Bastien Montagne
committed
"encountered along ray path for media calculation",
min=1, max=100, default=35)
Bastien Montagne
committed
media_color = FloatVectorProperty(
name="Media Color", description="The atmospheric media color",
Bastien Montagne
committed
precision=4, step=0.01, min=0, soft_max=1,
default=(0.001, 0.001, 0.001),
Bastien Montagne
committed
baking_enable = BoolProperty(
description="Enable POV-Rays texture baking",
Bastien Montagne
committed
indentation_character = EnumProperty(
name="Indentation",
description="Select the indentation type",
Campbell Barton
committed
items=(('NONE', "None", "No indentation"),
('TAB', "Tabs", "Indentation with tabs"),
('SPACE', "Spaces", "Indentation with spaces")),
default='SPACE')
Bastien Montagne
committed
indentation_spaces = IntProperty(
name="Quantity of spaces",
description="The number of spaces for indentation",
Bastien Montagne
committed
comments_enable = BoolProperty(
Constantin Rahn
committed
description="Add comments to pov file",
Bastien Montagne
committed
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",
Bastien Montagne
committed
antialias_enable = BoolProperty(
name="Anti-Alias", description="Enable Anti-Aliasing",
default=True)
Bastien Montagne
committed
antialias_method = EnumProperty(
description="AA-sampling method. Type 1 is an adaptive, "
"non-recursive, super-sampling method. Type 2 is an "
"adaptive and recursive super-sampling method. Type 3 "
"is a stochastic halton based super-sampling method",
items=(("0", "non-recursive AA", "Type 1 Sampling in POV-Ray"),
("1", "recursive AA", "Type 2 Sampling in POV-Ray"),
("2", "stochastic AA", "Type 3 Sampling in UberPOV")),
antialias_confidence = FloatProperty(
name="Antialias Confidence",
description="how surely the computed color "
"of a given pixel is indeed"
"within the threshold error margin",
min=0.0001, max=1.0000, default=0.9900, precision=4)
Bastien Montagne
committed
antialias_depth = IntProperty(
name="Antialias Depth", description="Depth of pixel for sampling",
min=1, max=9, default=3)
Bastien Montagne
committed
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.03)
Bastien Montagne
committed
jitter_enable = BoolProperty(
Loading
Loading full blame...