-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathprops.py
More file actions
76 lines (63 loc) · 2.01 KB
/
props.py
File metadata and controls
76 lines (63 loc) · 2.01 KB
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
import bpy
class DroneShowSettings(bpy.types.PropertyGroup):
drone_count: bpy.props.IntProperty(
name="Number of Drones",
default = 100,
min = 1,
max=1000,
description = "Total number of drones in the show"
)
rows_count: bpy.props.IntProperty(
name="Rows",
default = 10,
min = 1,
max=1000,
description = "Total number of rows in the takeoff grid"
)
cols_count: bpy.props.IntProperty(
name="Columns",
default = 10,
min = 1,
max=1000,
description = "Total number of columns in the takeoff grid"
)
horizontal_spacing: bpy.props.FloatProperty(
name="Horizontal Spacing (m)",
default = 3,
min = 0.5,
max=20,
description = "Spacing between the columns in meters"
)
vertical_spacing: bpy.props.FloatProperty(
name="Vertical Spacing (m)",
default = 3,
min = 0.5,
max=20,
description = "Spacing between the rows in meters"
)
drone_color: bpy.props.FloatVectorProperty(
name="Color",
description="LED color to apply on selected drones",
subtype='COLOR',
default=(1,1,1),
min=0.0,
max=1.0,
)
apply_to_all_drones: bpy.props.BoolProperty(
name = "Apply to All Drones",
description="Selected configurations will be applied to all existing drones",
default=False
)
glow_strength: bpy.props.FloatProperty(
name = "Glow Strength",
description="Defines how strong are LEDs of selected drones",
default=5.0,
min=0.0,
max = 100.0
)
def register():
bpy.utils.register_class(DroneShowSettings)
bpy.types.Scene.my_props = bpy.props.PointerProperty(type=DroneShowSettings)
def unregister():
del bpy.types.Scene.my_props
bpy.utils.unregister_class(DroneShowSettings)