Cleanup: quiet float argument to in type warning
[blender-addons.git] / render_povray / scripting_properties.py
blobbd6a7ff5b3e8b2659cb6606970b34c48cbe2b904
1 # SPDX-License-Identifier: GPL-2.0-or-later
3 """Declare pov native file syntax properties controllable in UI hooks and text blocks"""
5 import bpy
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(
20 name="Custom Code",
21 description="rendered source: Both adds text at the " "top of the exported POV file",
22 items=(("3dview", "View", ""), ("text", "Text", ""), ("both", "Both", "")),
23 default="3dview",
27 classes = (RenderPovSettingsText,)
30 def register():
31 for cls in classes:
32 register_class(cls)
33 bpy.types.Text.pov = PointerProperty(type=RenderPovSettingsText)
36 def unregister():
37 del bpy.types.Text.pov
38 for cls in reversed(classes):
39 unregister_class(cls)