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",
"version": (0, 1, 0),
"blender": (2, 79, 0),
Jonathan Smith
committed
"location": "Render > Engine > POV-Ray 3.7",
"description": "Basic POV-Ray 3.7 integration for blender",
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)
Maurice Raybaud
committed
#import addon_utils # To use some other addons
import nodeitems_utils #for Nodes
from nodeitems_utils import NodeCategory, NodeItem #for Nodes
from bl_operators.presets import AddPresetBase
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("-", "")
Maurice Raybaud
committed
Bastien Montagne
committed
###############################################################################
# Scene POV properties.
###############################################################################
class RenderPovSettingsScene(PropertyGroup):
#Linux SDL-window enable
sdl_window_enable = BoolProperty(
name="Enable SDL window",
description="Enable the SDL window in Linux OS",
default=True)
Maurice Raybaud
committed
text_block = StringProperty(
name="Text Scene Name",
description="Name of POV-Ray scene to use. "
"Set when clicking Run to render current text only",
maxlen=1024)
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)
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
media_scattering_type = EnumProperty(
name="Scattering Type",
description="Scattering model",
items=(('1', "1 Isotropic", "The simplest form of scattering because"
" it is independent of direction."),
('2', "2 Mie haze ", "For relatively small particles such as "
"minuscule water droplets of fog, cloud "
"particles, and particles responsible "
"for the polluted sky. In this model the"
" scattering is extremely directional in"
" the forward direction i.e. the amount "
"of scattered light is largest when the "
"incident light is anti-parallel to the "
"viewing direction (the light goes "
"directly to the viewer). It is smallest"
" when the incident light is parallel to"
" the viewing direction. "),
('3', "3 Mie murky", "Like haze but much more directional"),
('4', "4 Rayleigh", "For extremely small particles such as "
"molecules of the air. The amount of "
"scattered light depends on the incident"
" light angle. It is largest when the "
"incident light is parallel or "
"anti-parallel to the viewing direction "
"and smallest when the incident light is "
"perpendicular to viewing direction."),
('5', "5 Henyey-Greenstein", "The default eccentricity value "
"of zero defines isotropic "
"scattering while positive "
"values lead to scattering in "
"the direction of the light and "
"negative values lead to "
"scattering in the opposite "
"direction of the light. Larger "
"values of e (or smaller values "
"in the negative case) increase "
"the directional property of the"
" scattering.")),
default='1')
media_diffusion_scale = FloatProperty(
name="Scale", description="Scale factor of Media Diffusion Color",
precision=12, step=0.00000001, min=0.000000001, max=1.0,
default=(1.0))
media_diffusion_color = FloatVectorProperty(
name="Media Diffusion 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
media_absorption_scale = FloatProperty(
name="Scale", description="Scale factor of Media Absorption Color. "
Loading
Loading full blame...