1 # SPDX-License-Identifier: GPL-2.0-or-later
3 """Declare pov native file syntax properties controllable in UI hooks and text blocks"""
6 from bpy
.utils
import register_class
, unregister_class
7 from bpy
.types
import PropertyGroup
8 from bpy
.props
import EnumProperty
, PointerProperty
10 # ---------------------------------------------------------------- #
11 # Text POV properties.
12 # ---------------------------------------------------------------- #
15 class RenderPovSettingsText(PropertyGroup
):
17 """Declare text properties to use UI as an IDE or render text snippets to POV."""
19 custom_code
: EnumProperty(
21 description
="rendered source: Both adds text at the " "top of the exported POV file",
22 items
=(("3dview", "View", ""), ("text", "Text", ""), ("both", "Both", "")),
27 classes
= (RenderPovSettingsText
,)
33 bpy
.types
.Text
.pov
= PointerProperty(type=RenderPovSettingsText
)
37 del bpy
.types
.Text
.pov
38 for cls
in reversed(classes
):