Skip to content
Snippets Groups Projects
__init__.py 86.7 KiB
Newer Older
# ##### BEGIN GPL LICENSE BLOCK #####
Luca Bonavita's avatar
Luca Bonavita committed
#
#  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 #####

    "name": "POVRAY-3.7",
    "author": "Campbell Barton, Silvio Falcinelli, Maurice Raybaud, "
              "Constantin Rahn, Bastien Montagne, Leonid Desyatkov",
    "blender": (2, 75, 0),
    "location": "Render > Engine > POV-Ray 3.7",
    "description": "Basic POV-Ray 3.7 integration for blender",
    "warning": "this script is RC",
    "wiki_url": "http://wiki.blender.org/index.php/Extensions:2.6/Py/"
                "Scripts/Render/POV-Ray",
Luca Bonavita's avatar
Luca Bonavita committed

if "bpy" in locals():
    import importlib
    importlib.reload(ui)
    importlib.reload(render)
    importlib.reload(update_files)

else:
    import bpy
    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,
            )
def string_strip_hyphen(name):
    return name.replace("-", "")
Luca Bonavita's avatar
Luca Bonavita committed

###############################################################################
# Scene POV properties.
###############################################################################
class RenderPovSettingsScene(PropertyGroup):
    # File Options
            name="Enable Tempfiles",
            description="Enable the OS-Tempfiles. Otherwise set the path where"
                        " to save the files",
            default=True)
    pov_editor = BoolProperty(
            name="POV-Ray editor",
            description="Don't Close POV-Ray editor after rendering (Overriden"
                        " by /EXIT command)",
            name="Delete files",
            description="Delete files after rendering. "
                        "Doesn't work with the image",
            default=True)
            name="Scene Name",
            description="Name of POV-Ray scene to create. Empty name will use "
                        "the name of the blend file",
            name="Export scene path",
            # Bug in POV-Ray RC3
            # description="Path to directory where the exported scene "
                        # "(POV and INI) is created",
            description="Path to directory where the files are created",
            maxlen=1024, subtype="DIR_PATH")
            name="Rendered image path",
            description="Full path to directory where the rendered image is "
                        "saved",
            maxlen=1024, subtype="DIR_PATH")
            name="LF in lists",
            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
            name="Enable Radiosity",
            description="Enable POV-Rays radiosity calculation",
            default=False)
            name="Advanced Options",
            description="Show advanced options",
            default=False)
            name="Enable Media",
            description="Enable POV-Rays atmospheric media",
            default=False)
            description="Number of samples taken from camera to first object "
                        "encountered along ray path for media calculation",
            min=1, max=100, default=35)
            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'},
Maurice Raybaud's avatar
Maurice Raybaud committed
            name="Enable Baking",
            description="Enable POV-Rays texture baking",
Maurice Raybaud's avatar
Maurice Raybaud committed
            default=False)
Maurice Raybaud's avatar
Maurice Raybaud committed
            name="Indentation",
            description="Select the indentation type",
            items=(('NONE', "None", "No indentation"),
                   ('TAB', "Tabs", "Indentation with tabs"),
                   ('SPACE', "Spaces", "Indentation with spaces")),
            default='SPACE')
Maurice Raybaud's avatar
Maurice Raybaud committed
            name="Quantity of spaces",
            description="The number of spaces for indentation",
            min=1, max=10, default=4)
Maurice Raybaud's avatar
Maurice Raybaud committed
            name="Enable Comments",
            description="Add comments to pov file",
Maurice Raybaud's avatar
Maurice Raybaud committed
            default=True)

    # Real pov options
    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",
            name="Anti-Alias", description="Enable Anti-Aliasing",
            default=True)
            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. 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")),
            default="1")
    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)
            name="Antialias Depth", description="Depth of pixel for sampling",
            min=1, max=9, default=3)
            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)
Loading
Loading full blame...