This repository has been archived by the owner on Jul 21, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ui.py
82 lines (64 loc) · 2.86 KB
/
ui.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
# ------------------------------------------------------------------------------------------
# Copyright (c) Natsuneko. All rights reserved.
# Licensed under the MIT License. See LICENSE in the project root for license information.
# ------------------------------------------------------------------------------------------
from bpy.types import Panel
from .operator import TextMeshCreatorOperation
from .properties import TextMeshCreatorProperties
class TextMeshCreatorUI(Panel):
bl_idname = "UI_PT_TextMeshCreator"
bl_label = "TextMesh Creator Properties"
bl_space_type = "VIEW_3D"
bl_region_type = "UI"
bl_category = "TestMesh Creator"
def draw(self, context):
layout = self.layout
column = layout.column()
column.use_property_split = True
props: TextMeshCreatorProperties = context.scene.TextMeshCreatorProperties
column.label(text="Generic")
column.prop(props, "strings")
column.prop(props, "rotation_x")
column.prop(props, "rotation_y")
column.prop(props, "rotation_z")
column.prop(props, "scale_x")
column.prop(props, "scale_y")
column.prop(props, "scale_z")
column.prop(props, "font_path")
column.prop(props, "separate_by")
column.separator()
column.label(text="Text Layout")
column.prop(props, "size")
column.prop(props, "thickness")
column.prop(props, "horizontal_alignment")
column.prop(props, "vertical_alignment")
column.prop(props, "character_spacing")
column.prop(props, "word_spacing")
column.separator()
column.label(text="Blendshape")
column.prop(props, "use_blendshape")
# col_blendshape = column.column()
# col_blendshape.enabled = props.use_blendshape
# col_blendshape.prop(props, "blendshape_min_x")
# col_blendshape.prop(props, "blendshape_max_x")
# col_blendshape.prop(props, "blendshape_min_y")
# col_blendshape.prop(props, "blendshape_max_y")
# col_blendshape.prop(props, "blendshape_min_z")
# col_blendshape.prop(props, "blendshape_max_z")
column.separator()
column.label(text="Mesh")
column.prop(props, "use_decimate")
col_decimate = column.column()
col_decimate.enabled = props.use_decimate
col_decimate.prop(props, "decimate_ratio")
column.prop(props, "separate_by_loose_parts")
column.prop(props, "center_to_origin")
column.separator()
column.label(text="Export")
column.prop(props, "is_preview")
col_preview = column.column()
col_preview.enabled = props.is_preview
col_preview.prop(props, "is_legacy_mode")
column.prop(props, "increment_from")
column.prop(props, "export_path")
layout.operator(TextMeshCreatorOperation.bl_idname, text="Generate")