Import_3ds: Improved distance cue node setup
[blender-addons.git] / render_povray / scripting_properties.py
blob6762cc77c48db0b23bad27349e70b4926705de41
1 # SPDX-FileCopyrightText: 2021-2022 Blender Foundation
3 # SPDX-License-Identifier: GPL-2.0-or-later
5 """Declare pov native file syntax properties controllable in UI hooks and text blocks"""
7 import bpy
8 from bpy.utils import register_class, unregister_class
9 from bpy.types import PropertyGroup
10 from bpy.props import EnumProperty, PointerProperty
12 # ---------------------------------------------------------------- #
13 # Text POV properties.
14 # ---------------------------------------------------------------- #
17 class RenderPovSettingsText(PropertyGroup):
19 """Declare text properties to use UI as an IDE or render text snippets to POV."""
21 custom_code: EnumProperty(
22 name="Custom Code",
23 description="rendered source: Both adds text at the " "top of the exported POV file",
24 items=(("3dview", "View", ""), ("text", "Text", ""), ("both", "Both", "")),
25 default="3dview",
29 classes = (RenderPovSettingsText,)
32 def register():
33 for cls in classes:
34 register_class(cls)
35 bpy.types.Text.pov = PointerProperty(type=RenderPovSettingsText)
38 def unregister():
39 del bpy.types.Text.pov
40 for cls in reversed(classes):
41 unregister_class(cls)