pipeline
containerise(name, namespace, nodes, context, loader, suffix='_CON')
Bundle nodes
into an assembly and imprint it with metadata
Containerisation enables a tracking of version, author and origin for loaded assets.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name | str | Name of resulting assembly | required |
namespace | str | Namespace under which to host container | required |
nodes | list | Long names of nodes to containerise | required |
context | dict | Asset information | required |
loader | str | Name of loader used to produce this container. | required |
suffix | str | Suffix of container, defaults to | '_CON' |
Returns:
Name | Type | Description |
---|---|---|
container | BaseObject | OSelection BaseObject container |
Source code in client/ayon_cinema4d/api/pipeline.py
191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 |
|
get_containers_layer(doc=None)
Get the layer that holds all container objects.
To make the scene less cluttered the containers (selection objects) are put in a layer 'AYON_CONTAINERS'. This layer is hidden in the outliner.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
doc | optional c4d.documents.BaseDocument | The document to work on. If it is None it uses the active document. | None |
Source code in client/ayon_cinema4d/api/pipeline.py
160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 |
|
imprint_container(container, name, namespace, context, loader)
Imprints an object with container metadata and hides it from the user by adding it into a hidden layer. Arguments: container (c4d.BaseObject): The object to imprint. name (str): Name of resulting assembly namespace (str): Namespace under which to host container context (dict): Asset information loader (str): Name of loader used to produce this container.
Source code in client/ayon_cinema4d/api/pipeline.py
248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 |
|
iter_containers(doc=None)
Yield all objects in the active document that have 'id' attribute set matching an AYON container ID
Source code in client/ayon_cinema4d/api/pipeline.py
147 148 149 150 151 152 153 154 155 156 157 |
|
parse_container(container)
Return the container node's full container data.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
container | str | A container node name. | required |
Returns:
Type | Description |
---|---|
dict[str, Any]: The container schema data for this container node. |
Source code in client/ayon_cinema4d/api/pipeline.py
125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 |
|