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, Maurice Raybaud, Leonid Desyatkov, "
"Bastien Montagne, Constantin Rahn, Silvio Falcinelli",
Jonathan Smith
committed
"location": "Render > Engine > POV-Ray 3.7",
"description": "POV-Ray 3.7 integration for blender",
"wiki_url": "https://archive.blender.org/wiki/index.php/"
"Extensions:2.6/Py/Scripts/Render/POV-Ray/",
"category": "Render",
}
import importlib
importlib.reload(ui)
importlib.reload(render)
importlib.reload(update_files)
from bpy.utils import register_class, unregister_class
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 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):
name="Enable SDL window",
description="Enable the SDL window in Linux OS",
default=True)
Maurice Raybaud
committed
name="Text Scene Name",
description="Name of POV-Ray scene to use. "
"Set when clicking Run to render current text only",
maxlen=1024)
description="Enable the OS-Tempfiles. Otherwise set the path where"
" to save the files",
name="POV-Ray editor",
description="Don't Close POV-Ray editor after rendering (Overridden"
description="Delete files after rendering. "
"Doesn't work with the image",
description="Name of POV-Ray scene to create. Empty name will use "
"the name of the blend file",
# 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")
renderimage_path: StringProperty(
description="Full path to directory where the rendered image is "
"saved",
maxlen=1024, subtype="DIR_PATH")
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
description="Enable POV-Rays radiosity calculation",
radio_display_advanced: BoolProperty(
name="Advanced Options",
description="Show advanced options",
default=False)
name="Enable Media",
description="Enable POV-Rays atmospheric media",
default=False)
Bastien Montagne
committed
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)
media_scattering_type: EnumProperty(
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
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"
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(
Loading
Loading full blame...