export_nodes
- export_nodes(filename, nodes=[], first_frame=0, frame_count=0, samples=[], cyclic=True, progress=<function _progress>, get_name=<function _get_name>, export_parents=True, export_cameras=True, export_geometries=True, exclude_tags='intermediate, controller')
Export the deformed geometries to an Alembic file.
This file can be used to import the deformed geometry back in any Alembic compatible software.
- Parameters
filename (unicode) – the alembic file path
nodes (list rumba.Node) – the nodes to export or an empty list to export everything.
first_frame (int) – the first frame to export. Ignored if frame_count is 0.
frame_count (int) – the number of frame to export. If 0, export the current animation range.
samples (a list of floats) – If empty, export a single sample per frame. See the details below.
cyclic (bool) – If True, the samples are samples relative to each frame, else they are absolute frame samples.
export_parents (bool) – If True, exports also the parent nodes of the selected nodes.
export_cameras (bool) – If True, exports the camera nodes. Default is True.
export_geometries (bool) – If True, exports the geometry nodes (mesh and curves). Default is True.
exclude_tags (str) – A coma separated list of tags. Geometry nodes matching those tags won’t be exported. The default value is “intermediate,controller”, which excludes the export of the intermediate geometries and the controller nodes.
progress (function progress(float ratio, str msg) -> bool) – an optional progression function. Same prototype than the
rumbapy.Progress.updatemethod.get_name – an optional callback to override the nodes name in the alembic archive.
The default implementation returns the node’s name. One can use this callback to add a prefix. The callback receives the node object and must return a name for this node. :type get_name: function get_name(Node node) -> str
If samples is not empty and cyclic is True, the samples are the sub-sample to export, relative to each frame. Those values should be between [-1.0, 1.0]. In that case, frame_count*len(samples) samples will be exported. For example, with first_frame=1, frame_count=3 and samples=[0.0, 0.4], this will export those samples : [1.0, 1.4, 2.0, 2.4, 3.0, 3.4].
If cyclic is False, the samples values are the absolute frame samples to export. This last mode can be used to export non-uniform sub-frame sampling. In that case, first_frame and frame_count are ignored.