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"""
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(
23 description
="rendered source: Both adds text at the " "top of the exported POV file",
24 items
=(("3dview", "View", ""), ("text", "Text", ""), ("both", "Both", "")),
29 classes
= (RenderPovSettingsText
,)
35 bpy
.types
.Text
.pov
= PointerProperty(type=RenderPovSettingsText
)
39 del bpy
.types
.Text
.pov
40 for cls
in reversed(classes
):