|
1 | 1 | from typing import List |
| 2 | +from cadwork.api_types import * |
2 | 3 |
|
3 | 4 | def add_scene(name: str) -> bool: |
4 | | - """Adds a new scene |
| 5 | + """Adds a new scene. |
5 | 6 |
|
6 | 7 | Parameters: |
7 | | - name: name |
| 8 | + name: The scene name. |
8 | 9 |
|
9 | 10 | Returns: |
10 | | - did operation succeed |
| 11 | + True if the operation succeeded, false otherwise. |
11 | 12 | """ |
12 | 13 |
|
13 | 14 | def rename_scene(old_name: str, new_name: str) -> bool: |
14 | | - """Renames a scene |
| 15 | + """Renames a scene. |
15 | 16 |
|
16 | 17 | Parameters: |
17 | | - old_name: old_name |
18 | | - new_name: new_name |
| 18 | + old_name: The old scene name. |
| 19 | + new_name: The new scene name. |
19 | 20 |
|
20 | 21 | Returns: |
21 | | - did operation succeed |
| 22 | + True if the operation succeeded, false otherwise. |
22 | 23 | """ |
23 | 24 |
|
24 | 25 | def delete_scene(name: str) -> bool: |
25 | | - """Deletes a scene |
| 26 | + """Deletes a scene. |
26 | 27 |
|
27 | 28 | Parameters: |
28 | | - name: name |
| 29 | + name: The scene name. |
29 | 30 |
|
30 | 31 | Returns: |
31 | | - did operation succeed |
| 32 | + True if the operation succeeded, false otherwise. |
32 | 33 | """ |
33 | 34 |
|
34 | | -def add_elements_to_scene(name: str, element_i_ds: List[int]) -> bool: |
35 | | - """Adds elements to a scene |
| 35 | +def add_elements_to_scene(name: str, element_id_list: List[ElementId]) -> bool: |
| 36 | + """Adds elements to a scene. |
36 | 37 |
|
37 | 38 | Parameters: |
38 | | - name: name |
39 | | - element_i_ds: element_i_ds |
| 39 | + name: The scene name. |
| 40 | + element_id_list:: The element id list. |
40 | 41 |
|
41 | 42 | Returns: |
42 | | - did operation succeed |
| 43 | + True if the operation succeeded, false otherwise. |
43 | 44 | """ |
44 | 45 |
|
45 | | -def remove_elements_from_scene(name: str, element_i_ds: List[int]) -> bool: |
46 | | - """Removes elements from a scene |
| 46 | +def remove_elements_from_scene(name: str, element_id_list: List[ElementId]) -> bool: |
| 47 | + """Removes elements from a scene. |
47 | 48 |
|
48 | 49 | Parameters: |
49 | | - name: name |
50 | | - element_i_ds: element_i_ds |
| 50 | + name: The scene name. |
| 51 | + element_id_list:: The element id list. |
51 | 52 |
|
52 | 53 | Returns: |
53 | | - did operation succeed |
| 54 | + True if the operation succeeded, false otherwise. |
54 | 55 | """ |
55 | 56 |
|
56 | | -def get_elements_from_scene(name: str) -> List[int]: |
57 | | - """Gets the elements from a scene |
| 57 | +def get_elements_from_scene(name: str) -> List[ElementId]: |
| 58 | + """Gets the elements from a scene. |
58 | 59 |
|
59 | 60 | Parameters: |
60 | | - name: name |
| 61 | + name: The scene name. |
61 | 62 |
|
62 | 63 | Returns: |
63 | | - element ID list |
| 64 | + The element id list. |
64 | 65 | """ |
65 | 66 |
|
66 | 67 | def activate_scene(name: str) -> bool: |
67 | | - """Activates a scene |
| 68 | + """Activates a scene. |
68 | 69 |
|
69 | 70 | Parameters: |
70 | | - name: name |
| 71 | + name: The scene name. |
71 | 72 |
|
72 | 73 | Returns: |
73 | | - did operation succeed |
| 74 | + True if the operation succeeded, false otherwise. |
74 | 75 | """ |
75 | 76 |
|
76 | 77 | def clear_errors() -> None: |
77 | | - """clear errors |
78 | | -
|
79 | | - Returns: |
80 | | - None |
| 78 | + """Clears all errors. |
81 | 79 | """ |
82 | 80 |
|
83 | 81 | def get_scene_list() -> List[str]: |
84 | | - """get scene list |
| 82 | + """Gets the list of scenes. |
85 | 83 |
|
86 | 84 | Returns: |
87 | | - List[str] |
| 85 | + The list of scene names. |
88 | 86 | """ |
89 | 87 |
|
90 | | - |
91 | | -def group_scences(scene_names: List[str]) -> int: |
92 | | - """group scences |
| 88 | +def group_scences(scene_names: List[str]) -> UnsignedInt: |
| 89 | + """Groups the scenes to a scene group. |
93 | 90 |
|
94 | 91 | Parameters: |
95 | | - scene_names: scene_names |
| 92 | + scene_names: The scene names. |
96 | 93 |
|
97 | 94 | Returns: |
98 | | - int |
| 95 | + The index of the new group. |
99 | 96 | """ |
100 | 97 |
|
101 | | - |
102 | | -def ungroup_scences(group_index: int) -> None: |
103 | | - """ungroup scences |
| 98 | +def ungroup_scences(group_index: UnsignedInt) -> None: |
| 99 | + """Deletes the group of scenes. |
104 | 100 |
|
105 | 101 | Parameters: |
106 | | - group_index: group_index |
107 | | -
|
108 | | - Returns: |
109 | | - None |
| 102 | + group_index: The index of the group. |
110 | 103 | """ |
111 | 104 |
|
112 | 105 | def is_scene_present(name: str) -> bool: |
113 | | - """Queries of scene with name is present |
| 106 | + """Checks if a scene is present. |
114 | 107 |
|
115 | 108 | Parameters: |
116 | | - name: name |
| 109 | + name: The name of the scene to check. |
117 | 110 |
|
118 | 111 | Returns: |
119 | | - presence of scene |
| 112 | + True if the scene is present, false otherwise. |
120 | 113 | """ |
121 | 114 |
|
122 | 115 | def set_group_tab_color(scene_group_name: str, red: int, green: int, blue: int) -> None: |
123 | | - """set group tab color |
| 116 | + # TODO : Missing alpha parameter |
| 117 | + """Sets the group tab color. |
124 | 118 |
|
125 | 119 | Parameters: |
126 | | - scene_group_name: scene_group_name |
127 | | - red: red |
128 | | - green: green |
129 | | - blue: blue |
130 | | -
|
131 | | - Returns: |
132 | | - None |
| 120 | + scene_group_name: The name of the scene group. |
| 121 | + red: Red component. |
| 122 | + green: Green component. |
| 123 | + blue: Blue component. |
133 | 124 | """ |
134 | 125 |
|
135 | 126 | def rename_scene_group(old_name: str, new_name: str) -> None: |
136 | | - """rename scene group |
| 127 | + """Renames a scene group. |
137 | 128 |
|
138 | 129 | Parameters: |
139 | | - old_name: old_name |
140 | | - new_name: new_name |
141 | | -
|
142 | | - Returns: |
143 | | - None |
| 130 | + old_name: The old scene group name. |
| 131 | + new_name: The new scene group name. |
144 | 132 | """ |
145 | 133 |
|
146 | | -def get_group_index_by_name(scene_group_name: str) -> int: |
147 | | - """get group index by name |
| 134 | +def get_group_index_by_name(scene_group_name: str) -> UnsignedInt: |
| 135 | + """Gets the index of a scene group by its name. |
148 | 136 |
|
149 | 137 | Parameters: |
150 | | - scene_group_name: scene_group_name |
| 138 | + scene_group_name: The group name. |
151 | 139 |
|
152 | 140 | Returns: |
153 | | - int |
| 141 | + The index of the group, or a maximum uint64_t if not found. |
154 | 142 | """ |
155 | 143 |
|
156 | | -def rename_scene_group_by_index(group_index: int, new_name: str) -> None: |
157 | | - """rename scene group by index |
| 144 | +def rename_scene_group_by_index(group_index: UnsignedInt, new_name: str) -> None: |
| 145 | + """Renames a scene group by its index. |
158 | 146 |
|
159 | 147 | Parameters: |
160 | | - group_index: group_index |
161 | | - new_name: new_name |
162 | | -
|
163 | | - Returns: |
164 | | - None |
| 148 | + group_index: The index of the group. |
| 149 | + new_name: The new scene group name. |
165 | 150 | """ |
166 | 151 |
|
167 | | - |
168 | | -def group_scences_with_name(scene_names: List[str], group_name: str) -> int: |
169 | | - """group scences with name |
| 152 | +def group_scences_with_name(scene_names: List[str], group_name: str) -> UnsignedInt: |
| 153 | + """Groups the scenes to a scene group and sets the name of the new group. |
170 | 154 |
|
171 | 155 | Parameters: |
172 | | - scene_names: scene_names |
173 | | - group_name: group_name |
| 156 | + scene_names: The scene names to group. |
| 157 | + group_name: The name of the new group. |
174 | 158 |
|
175 | 159 | Returns: |
176 | | - int |
| 160 | + The index of the new group. |
177 | 161 | """ |
0 commit comments