lib
get_node_by_name(node_name)
Get instance node/container node by name
Parameters:
Name | Type | Description | Default |
---|---|---|---|
node_name | str | node name | required |
Source code in client/ayon_motionbuilder/api/lib.py
164 165 166 167 168 169 170 171 172 173 |
|
get_selected_hierarchies(node, selection_data)
Get the hierarchies/children from the top group
Parameters:
Name | Type | Description | Default |
---|---|---|---|
node | FBObject | FBSystem().Scene.RootModel.Children | required |
selection_data | dict | data which stores the node selection | required |
Source code in client/ayon_motionbuilder/api/lib.py
176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 |
|
load_data_from_parameter(target_param)
Load the ayon data from parameter
Parameters:
Name | Type | Description | Default |
---|---|---|---|
target_param | FBListPropertyObject | parameter to store ayon data | required |
Returns:
Name | Type | Description |
---|---|---|
dict | ayon-related data |
Source code in client/ayon_motionbuilder/api/lib.py
232 233 234 235 236 237 238 239 240 241 242 243 |
|
lsattr(attr, value=None, root=None)
List nodes having attribute with specified value.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
attr | str | Attribute name to match. | required |
value | (str, Optional) | Value to match, of omitted, all nodes with specified attribute are returned no matter of value. | None |
root | (str, Optional) | Root node name. If omitted, scene root is used. | None |
Returns:
Type | Description |
---|---|
list | list of nodes. |
Source code in client/ayon_motionbuilder/api/lib.py
81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 |
|
maintain_selection(selected_nodes)
Maintain selection during context
Parameters:
Name | Type | Description | Default |
---|---|---|---|
selected_nodes | FBObject | selected nodes | required |
Source code in client/ayon_motionbuilder/api/lib.py
211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 |
|
parsed_selected_hierarchies(node)
Parse the data to find the selected hierarchies Args: node (FBObject): FBSystem().Scene.RootModel.Children
Source code in client/ayon_motionbuilder/api/lib.py
196 197 198 199 200 201 202 203 204 205 206 207 208 |
|
unique_namespace(namespace, format='%02d', prefix='', suffix='')
Return unique namespace
Parameters:
Name | Type | Description | Default |
---|---|---|---|
namespace | str | Name of namespace to consider | required |
format | str | Formatting of the given iteration number | '%02d' |
suffix | str | Only consider namespaces with this suffix. | '' |
con_suffix | max only, for finding the name of the master container | required |
unique_namespace("bar")
bar01
unique_namespace(":hello")
:hello01
unique_namespace("bar:", suffix="_NS")
bar01_NS:
Source code in client/ayon_motionbuilder/api/lib.py
109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 |
|