Rumba C++ SDK
maquina Namespace Reference

This version of the SDK is unstable, i-e, it may change with no warning. More...

Classes

class  AddCurveAction
 
class  AngleAxis
 
class  AnimCurve
 An animation curve abstraction, can animate any type of value, bool, int, float or other values. More...
 
class  AnimCurveFloat
 An animation curve for floating point values. That type of curves contains tangents. More...
 
class  AnimLayer
 
class  Array
 An array of values. More...
 
class  AttributeDescriptor
 An AttributeDescriptor. More...
 
class  AudioEditing
 
class  BaseLayer
 
class  BrushID
 
class  BrushPlugin
 
class  BrushSculpt
 
class  BrushSculptPlugin
 Base class for the sculpt brush plug-ins. More...
 
class  BrushUserData
 
class  Buffer
 A writable buffer for basic types like floats, integers, Imath::V3f, Imath::M44f.. More...
 
class  BufferAllocator
 Allocator to use with std::vector. Allocates memory first in the user provided buffer and then using the standard allocator. More...
 
class  BufferConst
 A readonly buffer for basic types like floats, integers, Imath::V3f, Imath::M44f.. More...
 
class  BVH3
 A bounding volume hierarchy to quickly select 3d shapes. More...
 
class  BVHTriangle
 A bounding volume hierarchy to quickly intersect 3d triangles. More...
 
class  Camera
 The camera node. More...
 
class  CameraContext
 This class provides viewport space conversion services. More...
 
class  CameraShape
 The camera shape. More...
 
class  Channel
 Node's plugs and node delegate's attributes may be modified by animation layers through channels. More...
 
class  ChannelBool
 A boolean value with a default value. More...
 
class  ChannelFloat
 A float value with a default value. More...
 
class  ChannelInt
 An integer value with a default value. More...
 
class  Cmd
 Base class for command nodes. More...
 
class  ColorProcessor
 This class holds the color processor used by application to do color space conversion. More...
 
class  ConditionalEvalContext
 
class  Curves
 A mesh value. More...
 
class  CustomAction
 
class  DeformLayer
 
class  DelaunayTriangulation2D
 A 2D Delaunay triangulation. More...
 
class  DescBuild
 
class  Dict
 A dictionnary to associate strings to values. More...
 
class  Document
 The Document node plugin. More...
 
class  EvalContext
 This class holds the evaluation context passed to the evaluation handler during a plug evaluation. More...
 
class  EvaluationEngine
 An evaluation engine to compute plug values. More...
 
class  ExportHelper
 Helper class to export animations. More...
 
class  Expr
 
class  ExprCall
 
class  FileFilters
 
struct  GeometryComponentSelection
 
class  GraphProperties
 The graph properties of a node, its graph position, its radius, its graph flags. More...
 
class  Image
 An Image. More...
 
class  IndexedBuffer
 A writable IndexedBuffer. More...
 
class  IndexedBufferConst
 A read only buffer of indexed values. It is composed of a buffer of indexes of the size of the component. Those indexes point in the value buffer. More...
 
class  InteractionContext
 This interface is passed to the events and is implemented by the application. */. More...
 
class  KeySet
 A set of keyframes. More...
 
struct  LastSelectedComponent
 The last selected components. Hold the two last selected component of the same geometry. More...
 
class  Lattice
 A lattice cage. More...
 
struct  LazySceneChildResult
 
class  ManipulatorPlugin
 Derive this class to create your own Manipulator type. More...
 
class  MatrixCurve
 A Matrix curve value. More...
 
class  Mesh
 A mesh value. More...
 
class  MeshBuilder
 
class  MeshEdit
 MeshEdit provide tools to modify a mesh topology. More...
 
class  ModificationContext
 
class  Node
 Base class of all Rumba nodes. More...
 
class  NodeDelegate
 This interface gives a high level access to the document structure. More...
 
class  NodeDelegateGroup
 A node delegate group, not related to any data, which contains other node delegates. More...
 
class  NodeDelegateManipulator
 
class  NodeDelegateMaquinaAttributeDelegate
 Implementation of the attribute for the Rumba nodes. More...
 
class  NodeDelegateRumba
 
class  NodeDelegateSimpleList
 
class  NodeDelegateWrapper
 That class wraps existing node delegate and their children to override some of their behaviors. More...
 
class  NodeLoaderPlugin
 A node loader plug-in interface. More...
 
class  NodePlugin
 Derive this class to create your own Node type. More...
 
class  NodeSet
 
class  NurbsCurve
 A nurbs curve value. More...
 
class  NurbsCurveParamFromLengthCache
 
class  NurbsSurface
 A nurbs surface value. More...
 
class  NurbsSurfaceClosestCache
 
class  Optimizer
 
class  PartialInvalidation
 A plug's partial invalidation descriptor. More...
 
struct  PickingResult
 
class  Plug
 A node plug. More...
 
class  PlugDescriptor
 A plug descriptor to pass to the Registry::register_node() function. More...
 
class  PlugList
 A value containing a list of plugs. More...
 
class  PlugListener
 
class  PlugModificationTracker
 
class  Points
 A set of 3d points. More...
 
class  ProcAnimLayer
 Base of procedural animation layer nodes like constraint, noise, dynamic on controllers. More...
 
class  QueryContext
 
class  RedirectStd
 
class  Registry
 Registry class used to declare and register a plug-in node. More...
 
class  RemoveCurveAction
 
class  RenderablePlugin
 
struct  RenderParameters
 
struct  RenderTargets
 
class  Scene
 A mutable scene node value. More...
 
class  SceneConst
 An immutable scene node value. More...
 
class  Shader
 Gather shading parameters. More...
 
class  ShaderParam
 A shader parameter descriptor. More...
 
struct  ShaderProgram
 A shader texture slot descriptor. More...
 
struct  ShaderTexture
 A shader texture slot descriptor. More...
 
struct  ShadingNetworkSimpleDep
 
class  Shape
 A value with geometrical attributes. Base of all shape values. More...
 
class  SpanSpan
 A view on a "vector of sub-vectors of values" container. More...
 
class  SparseBuffer
 A writable SparseBuffer. More...
 
class  SparseBufferConst
 A read only buffer of sparse values. It is composed of a buffer of values and a buffer of the index in the whole buffer. More...
 
struct  string_view_less
 
class  StringSet
 A string set. More...
 
class  StringViewBase
 
struct  StringViewHasherBase
 
class  TagsIteration
 
class  Token
 A token is a shared, constant and unique string. More...
 
class  ToolPlugin
 A Tool node plug-in. More...
 
class  UserData
 
class  UserProperty
 
class  Value
 Base class of all Rumba values. More...
 
class  ViewportContext
 
struct  VirtualAttribute
 Virtual Attributes are shown in a node's UI, but may not be backed by an actual plug. The plug is created when the value is set (plug is considered overwritten). More...
 
class  VirtualAttributeNodeDelegate
 A node delegate for nodes with virtual attributes. More...
 
class  VirtualAttributesStore
 
class  VirtualPlugAttributeDelegate
 An attribute delegate for a virtual attribute. More...
 
class  Waveform
 An Audio waveform, always 16 bits stereo 44.1 khz. More...
 
class  WeightedComponent
 This class is a helper to iterate over a geometry component, with an weight per component element. More...
 
class  Workspace
 
struct  WrapSlice
 A monotone slice of time wrapping. More...
 

Typedefs

using AngleAxisf = AngleAxis< float >
 
using AngleAxisd = AngleAxis< double >
 
typedef BufferConst< int32_t > BufferConstInt32
 
typedef BufferConst< uint8_t > BufferConstUInt8
 
typedef BufferConst< uint32_t > BufferConstUInt32
 
typedef BufferConst< float > BufferConstFloat
 
typedef BufferConst< double > BufferConstDouble
 
typedef BufferConst< Imath::V2fBufferConstV2f
 
typedef BufferConst< Imath::V3fBufferConstV3f
 
typedef BufferConst< Imath::V4fBufferConstV4f
 
typedef BufferConst< Imath::V2iBufferConstV2i
 
typedef BufferConst< Imath::V3iBufferConstV3i
 
typedef BufferConst< Imath::V4iBufferConstV4i
 
typedef BufferConst< Imath::M33fBufferConstM33f
 
typedef BufferConst< Imath::M44fBufferConstM44f
 
typedef BufferConst< Imath::M44dBufferConstM44d
 
typedef BufferConst< Imath::Box3fBufferConstBox3f
 
typedef Buffer< int32_t > BufferInt32
 
typedef Buffer< uint8_t > BufferUInt8
 
typedef Buffer< uint32_t > BufferUInt32
 
typedef Buffer< float > BufferFloat
 
typedef Buffer< double > BufferDouble
 
typedef Buffer< Imath::V2fBufferV2f
 
typedef Buffer< Imath::V3fBufferV3f
 
typedef Buffer< Imath::V4fBufferV4f
 
typedef Buffer< Imath::V2iBufferV2i
 
typedef Buffer< Imath::V3iBufferV3i
 
typedef Buffer< Imath::V4iBufferV4i
 
typedef Buffer< Imath::M33fBufferM33f
 
typedef Buffer< Imath::M44fBufferM44f
 
typedef Buffer< Imath::M44dBufferM44d
 
typedef Buffer< Imath::Box3fBufferBox3f
 
using PartialInvalidationPtr = Ptr< const PartialInvalidation >
 
typedef IndexedBufferConst< int32_t > IndexedBufferConstInt32
 
typedef IndexedBufferConst< uint8_t > IndexedBufferConstUInt8
 
typedef IndexedBufferConst< uint32_t > IndexedBufferConstUInt32
 
typedef IndexedBufferConst< float > IndexedBufferConstFloat
 
typedef IndexedBufferConst< double > IndexedBufferConstDouble
 
typedef IndexedBufferConst< Imath::V2fIndexedBufferConstV2f
 
typedef IndexedBufferConst< Imath::V3fIndexedBufferConstV3f
 
typedef IndexedBufferConst< Imath::V4fIndexedBufferConstV4f
 
typedef IndexedBufferConst< Imath::V2iIndexedBufferConstV2i
 
typedef IndexedBufferConst< Imath::V3iIndexedBufferConstV3i
 
typedef IndexedBufferConst< Imath::V4iIndexedBufferConstV4i
 
typedef IndexedBufferConst< Imath::M44fIndexedBufferConstM44f
 
typedef IndexedBufferConst< Imath::Box3fIndexedBufferConstBox3f
 
typedef IndexedBuffer< int32_t > IndexedBufferInt32
 
typedef IndexedBuffer< uint8_t > IndexedBufferUInt8
 
typedef IndexedBuffer< uint32_t > IndexedBufferUInt32
 
typedef IndexedBuffer< float > IndexedBufferFloat
 
typedef IndexedBuffer< double > IndexedBufferDouble
 
typedef IndexedBuffer< Imath::V2fIndexedBufferV2f
 
typedef IndexedBuffer< Imath::V3fIndexedBufferV3f
 
typedef IndexedBuffer< Imath::V4fIndexedBufferV4f
 
typedef IndexedBuffer< Imath::V2iIndexedBufferV2i
 
typedef IndexedBuffer< Imath::V3iIndexedBufferV3i
 
typedef IndexedBuffer< Imath::V4iIndexedBufferV4i
 
typedef IndexedBuffer< Imath::M44fIndexedBufferM44f
 
typedef IndexedBuffer< Imath::Box3fIndexedBufferBox3f
 
using verbosity_level = spdlog::level::level_enum
 
using ProgressCallback = std::function< bool(float, const char *)>
 
template<class T >
using Ptr = std::shared_ptr< T >
 
typedef SparseBufferConst< int32_t > SparseBufferConstInt32
 
typedef SparseBufferConst< uint8_t > SparseBufferConstUInt8
 
typedef SparseBufferConst< uint32_t > SparseBufferConstUInt32
 
typedef SparseBufferConst< float > SparseBufferConstFloat
 
typedef SparseBufferConst< double > SparseBufferConstDouble
 
typedef SparseBufferConst< Imath::V2fSparseBufferConstV2f
 
typedef SparseBufferConst< Imath::V3fSparseBufferConstV3f
 
typedef SparseBufferConst< Imath::V4fSparseBufferConstV4f
 
typedef SparseBufferConst< Imath::V2iSparseBufferConstV2i
 
typedef SparseBufferConst< Imath::V3iSparseBufferConstV3i
 
typedef SparseBufferConst< Imath::V4iSparseBufferConstV4i
 
typedef SparseBufferConst< Imath::M44fSparseBufferConstM44f
 
typedef SparseBufferConst< Imath::Box3fSparseBufferConstBox3f
 
typedef SparseBuffer< int32_t > SparseBufferInt32
 
typedef SparseBuffer< uint8_t > SparseBufferUInt8
 
typedef SparseBuffer< uint32_t > SparseBufferUInt32
 
typedef SparseBuffer< float > SparseBufferFloat
 
typedef SparseBuffer< double > SparseBufferDouble
 
typedef SparseBuffer< Imath::V2fSparseBufferV2f
 
typedef SparseBuffer< Imath::V3fSparseBufferV3f
 
typedef SparseBuffer< Imath::V4fSparseBufferV4f
 
typedef SparseBuffer< Imath::V2iSparseBufferV2i
 
typedef SparseBuffer< Imath::V3iSparseBufferV3i
 
typedef SparseBuffer< Imath::V4iSparseBufferV4i
 
typedef SparseBuffer< Imath::M44fSparseBufferM44f
 
typedef SparseBuffer< Imath::Box3fSparseBufferBox3f
 
typedef StringViewBase< char, std::string > StringView
 
typedef StringViewHasherBase< char, std::string > StringViewHasher
 
typedef StringViewBase< wchar_t, std::wstring > WStringView
 
typedef StringViewHasherBase< wchar_t, std::wstring > WStringViewHasher
 

Enumerations

enum  CycleMode { CycleMode::cycle_mode_constant = 0, CycleMode::cycle_mode_repeat, CycleMode::cycle_mode_repeat_continuous, CycleMode::cycle_mode_linear }
 
enum  ChannelMode {
  ChannelMode::keyable = 0, ChannelMode::animated = 1, ChannelMode::constant = 2, ChannelMode::locked = 3,
  ChannelMode::hidden = 4
}
 The channel modes. More...
 
enum  ChannelType {
  ChannelType::generic = 0, ChannelType::x, ChannelType::y, ChannelType::z,
  ChannelType::w, ChannelType::sx, ChannelType::sy, ChannelType::sz,
  ChannelType::rx, ChannelType::ry, ChannelType::rz, ChannelType::tx,
  ChannelType::ty, ChannelType::tz, ChannelType::ro
}
 Predefined channel types. More...
 
enum  RotateOrder {
  RotateOrder::xyz = 0, RotateOrder::yzx, RotateOrder::zxy, RotateOrder::xzy,
  RotateOrder::yxz, RotateOrder::zyx
}
 Euler Rotation Order. More...
 
enum  ShaderParamType {
  ShaderParamType::Bool = 0, ShaderParamType::Int, ShaderParamType::Float, ShaderParamType::V2i,
  ShaderParamType::V3i, ShaderParamType::V4i, ShaderParamType::V2f, ShaderParamType::V3f,
  ShaderParamType::V4f, ShaderParamType::M44f, ShaderParamType::_LastPOD = M44f, ShaderParamType::Texture,
  ShaderParamType::Token, ShaderParamType::InternalExpression, ShaderParamType::Ignore
}
 The shader parameter types. More...
 
enum  SelectionMode { SelectionMode::Replace, SelectionMode::Add, SelectionMode::Remove, SelectionMode::Invert }
 Specify a way to alter the active selection. More...
 
enum  PasteMode { PasteMode::Clear, PasteMode::Merge, PasteMode::Replace, PasteMode::Insert }
 Specify a way to paste the clipboard. More...
 
enum  MatchMirrorMode { MatchMirrorMode::automatic, MatchMirrorMode::mirror, MatchMirrorMode::no_mirror }
 Mirror mode used in match_to_channels. More...
 
enum  PasteType { PasteType::Null, PasteType::Soft, PasteType::Hard }
 
enum  FlattenMode { FlattenMode::In_Dest_Key, FlattenMode::Union_Keys, FlattenMode::All_Frames }
 Specify a way to flatten a layer into another. More...
 

Functions

MAQUINA_EXPORT std::string value_to_json_string (const maquina::Value &value)
 
template<typename T >
Buffer< T > duplicate (const BufferConst< T > &a)
 
MAQUINA_EXPORT std::string channel_plug_to_channel_path (const Plug &channel_plug)
 Get the channel path on a channel plug. More...
 
MAQUINA_EXPORT std::optional< std::pair< Plug, std::string > > channel_plug_to_controller_plug (const Plug &channel_plug)
 Get the channel path on a channel plug. More...
 
MAQUINA_EXPORT Plug channel_path_to_channel_plug (const StringView &channel_path, const Node &document, Node *layer=nullptr)
 Get the channel plug using a channel path. More...
 
MAQUINA_EXPORT bool extract_channel_path (const std::string &channel_path, std::string &asset_path, std::string &ctrl_path, std::string &plug, std::string &subchannel)
 Parse the channel path and extract the asset, controller, plug and subchannel strings. More...
 
MAQUINA_EXPORT bool add_plugs_to_layer (const std::vector< Plug > &plugs, Node &layer, bool check_editable=true, bool selection_mask=true)
 Update the animation graph so that these plug channels are animated in the layer. More...
 
MAQUINA_EXPORT void layer_animated_plugs (const Node &layer, std::unordered_set< Plug > &animated_plugs, bool only_curve=true, bool recursive=true)
 Return the list of animated plugs in the layer. More...
 
MAQUINA_EXPORT std::vector< Plugchannels_in_layer (const Node &layer)
 Return the list of channels that are animated in the layer. More...
 
MAQUINA_EXPORT void remove_channels_from_layer (const std::vector< Plug > &channels, Node &layer, bool undo_stack)
 Update the animation graph so that these plug channels are not animated anymore in the layer. More...
 
MAQUINA_EXPORT bool anim_curve_keys_selected ()
 Return true if the curve editor is open and keys are selected in it. More...
 
MAQUINA_EXPORT Plug controller_plug (const Plug &channel_plug)
 Return the controller plug driven by channel_plug. More...
 
MAQUINA_EXPORT const char * channel_type_name (ChannelType channel_type)
 Return the ChannelType as a string. More...
 
void cmd_run (const Plug &trigger)
 Run the commands connected to that plug. More...
 
MAQUINA_EXPORT void add_points_colormap (Points &points, Colormap type, const gsl::span< const uint32_t > &indices, const gsl::span< const float > &values, float max_value=-std::numeric_limits< float >::infinity())
 Add a heat map channel to the Points object. More...
 
MAQUINA_EXPORT std::vector< maquina::Valuescene_geometries (const std::vector< maquina::Value > &scene_values)
 
MAQUINA_EXPORT std::vector< maquina::Valuescene_child (const std::vector< maquina::Value > &scene_values, const std::string &child_name)
 
MAQUINA_EXPORT std::vector< maquina::Valuescene_matrices (const std::vector< maquina::Value > &scene_values)
 
MAQUINA_EXPORT std::vector< maquina::Valuescene_visibility (const std::vector< maquina::Value > &scene_values)
 
MAQUINA_EXPORT std::vector< UserPropertyscene_user_properties (const std::vector< maquina::Value > &scene_values)
 
MAQUINA_EXPORT maquina::Array scene_shaders (const std::vector< maquina::Value > &scene_values)
 
MAQUINA_EXPORT void register_file_type (const std::string_view &name, FileFilters file_filters)
 Register a new file type name with a collection of file filters. More...
 
MAQUINA_EXPORT const FileFiltersfile_filter (const std::string &name)
 Get the file filters using a file type name. More...
 
MAQUINA_EXPORT std::string active_document_directory ()
 Get the directory of the active document. More...
 
MAQUINA_EXPORT std::string file_default_directory (const std::string_view &file_type)
 Get the directory associated to the file type. More...
 
MAQUINA_EXPORT void save_default_directory (const std::string_view &file_type, const std::string_view &chosen_file_path)
 Save the last directory used with this file type. More...
 
MAQUINA_EXPORT void save_recent_file (std::string file_path, const std::string_view &setting)
 Save the file path in a recent file list hold in a setting. More...
 
MAQUINA_EXPORT void grow_component_selection (bool grow)
 Grow or shrink the current component selection. More...
 
MAQUINA_EXPORT void grow_edge_loop (bool grow)
 Grow or shrink the current edge loop selection. More...
 
MAQUINA_EXPORT void select_edge_loop ()
 Select an edge loop. More...
 
MAQUINA_EXPORT void smooth_component_selection ()
 Smooth the component selection. More...
 
MAQUINA_EXPORT bool has_component_selection ()
 Return true if there is an active component selection. More...
 
int hash_24 (const uint8_t *key, size_t length)
 
int hash_24 (const std::string &str)
 
MAQUINA_EXPORT std::vector< float > heat_geodesic (const maquina::Mesh &mesh, const Imath::M44f &local_to_ellipsoid, const Imath::V3f &source, const float max_dist=1.f, const float dt_multiplier=1.f, const float bound_blend=0.5f)
 Approximate geodesic distance through the heat method (cf https://www.cs.cmu.edu/~kmcrane/Projects/HeatMethod/index.html). More...
 
MAQUINA_EXPORT void initialize ()
 When the Rumba Engine is embedded in an application, this function should be called before any Rumba API calls. More...
 
MAQUINA_EXPORT void release ()
 When the Rumba Engine is embedded in an application, this function should be called before to leave the application. More...
 
MAQUINA_EXPORT void load_plugins (const std::vector< std::wstring > &plugin_directories)
 Load all the Rumba plug-ins from directories. More...
 
MAQUINA_EXPORT bool has_python ()
 Return true if Python is available. More...
 
MAQUINA_EXPORT bool tty_colors ()
 Return true if colors should be used on the tty. More...
 
MAQUINA_EXPORT void configure_tty ()
 Configure the process console to accept utf-8 and ANSI colors. More...
 
MAQUINA_EXPORT void export_plug_values (const std::vector< Plug > &plugs, const std::wstring &filepath, const std::string_view &comments="", const std::string_view &tags="")
 Save the plugs values in a file. More...
 
MAQUINA_EXPORT void export_plug_animation (const std::vector< Plug > &plugs, const std::wstring &filepath, bool single_layer=false, const std::function< bool(float, const char *)> &progress=nullptr, const std::string_view &comments="", const std::string_view &tags="", float first_frame_clip=0, float last_frame_clip=0)
 Save the layer setup and plugs animation in a file. More...
 
MAQUINA_EXPORT void export_settings (const std::wstring &filepath)
 Save workspace settings to a file. More...
 
MAQUINA_EXPORT Dict load_pose (const std::wstring &filename)
 Import the plugs values from a file. More...
 
MAQUINA_EXPORT void apply_pose (const Dict &pose, float frame)
 Apply a pose. More...
 
MAQUINA_EXPORT Dict load_animation_pose (const std::wstring &filename)
 Import the animation pose from a file, in this case the value of the pose is not relevant. More...
 
MAQUINA_EXPORT bool import_plug_animation (const std::vector< Plug > &plugs, const std::wstring &filename, const std::vector< std::string > &layers_to_import)
 Import an animation from a file. More...
 
MAQUINA_EXPORT void import_settings (const std::wstring &filepath)
 Import workspace settings from a file. More...
 
MAQUINA_EXPORT std::string serialize_nodes (const std::vector< Node > &nodes, bool serialize_external_input_connections=false)
 Serialize the nodes in a string. More...
 
MAQUINA_EXPORT std::vector< Nodedeserialize_nodes (std::string buffer, Node *parent=nullptr, const std::string &valid_types="")
 Deserialize the nodes from a string. More...
 
MAQUINA_EXPORT Value read_value (const std::wstring &file, const Dict &options)
 Load an object value from a file. More...
 
MAQUINA_EXPORT std::string serialize_pose (const Dict &pose)
 Serialize the pose in a string. More...
 
MAQUINA_EXPORT Dict deserialize_pose (std::string buffer)
 Deserialize the pose from a string. More...
 
MAQUINA_EXPORT Dict document_info (const std::wstring &file)
 
template<typename... Args>
void debug (const char *format, const Args &... args)
 Log a debug message using the Rumba logger. More...
 
template<typename... Args>
void info (const char *format, const Args &... args)
 Log an informative message using the Rumba logger. More...
 
template<typename... Args>
void warn (const char *format, const Args &... args)
 Log a warning message using the Rumba logger. More...
 
template<typename... Args>
void error (const char *format, const Args &... args)
 Log an error message using the Rumba logger. More...
 
template<typename... Args>
void critical (const char *filename, int line, const char *function, const char *format, const Args &... args)
 Log a critical error message using the Rumba logger. More...
 
MAQUINA_EXPORT maquina::Node media_root (maquina::Node &document, bool undo_stack)
 Return the document media root node. More...
 
MAQUINA_EXPORT maquina::Node add_media_layer (std::optional< maquina::Node > parent={}, const std::string_view &name="", bool undo_stack=true)
 Create a media layer. More...
 
MAQUINA_EXPORT Node plug_node (const Plug &plug)
 Get a plug node. More...
 
template<class To , class From >
Ptr< To > static_assert_cast (const Ptr< From > &p)
 
MAQUINA_EXPORT Value default_value (const maquina::StringView &type_name)
 Return the default value of a type. More...
 
Imath::Eulerd::Order imath_rotate_order (RotateOrder ro)
 Convert a RotateOrder in Imath::Eulerd::Order. More...
 
MAQUINA_EXPORT Scene duplicate (const SceneConst &scene, bool recursive)
 Duplicate a scene object. More...
 
MAQUINA_EXPORT void register_shader (std::string name, bool stream, std::vector< ShaderParam > parameters, std::vector< ShaderProgram > programs)
 Register a new hardware shader. More...
 
MAQUINA_EXPORT void register_shading_node (std::string name, std::vector< ShaderParam > parameters, ShaderParamType output_type, std::string post_fix="")
 
MAQUINA_EXPORT void register_shading_token (const std::string &s, int token)
 
MAQUINA_EXPORT void add_shader_glsl (const std::string_view &code)
 
MAQUINA_EXPORT std::string preprocess_shader_code (std::string code)
 
MAQUINA_EXTERN_TEMPLATE MAQUINA_EXPORT Buffer< Imath::V2fShape::write_attribute< Buffer< Imath::V2f > > (const char *attribute_name, Topology topology)
 
MAQUINA_EXTERN_TEMPLATE MAQUINA_EXPORT Buffer< Imath::V3fShape::write_attribute< Buffer< Imath::V3f > > (const char *attribute_name, Topology topology)
 
MAQUINA_EXTERN_TEMPLATE MAQUINA_EXPORT Buffer< Imath::V4fShape::write_attribute< Buffer< Imath::V4f > > (const char *attribute_name, Topology topology)
 
MAQUINA_EXTERN_TEMPLATE MAQUINA_EXPORT IndexedBuffer< Imath::V2fShape::write_attribute< IndexedBuffer< Imath::V2f > > (const char *attribute_name, Topology topology)
 
MAQUINA_EXTERN_TEMPLATE MAQUINA_EXPORT IndexedBuffer< Imath::V3fShape::write_attribute< IndexedBuffer< Imath::V3f > > (const char *attribute_name, Topology topology)
 
MAQUINA_EXTERN_TEMPLATE MAQUINA_EXPORT IndexedBuffer< Imath::V4fShape::write_attribute< IndexedBuffer< Imath::V4f > > (const char *attribute_name, Topology topology)
 
MAQUINA_EXTERN_TEMPLATE MAQUINA_EXPORT SparseBuffer< Imath::V2fShape::write_attribute< SparseBuffer< Imath::V2f > > (const char *attribute_name, Topology topology)
 
MAQUINA_EXTERN_TEMPLATE MAQUINA_EXPORT SparseBuffer< Imath::V3fShape::write_attribute< SparseBuffer< Imath::V3f > > (const char *attribute_name, Topology topology)
 
MAQUINA_EXTERN_TEMPLATE MAQUINA_EXPORT SparseBuffer< Imath::V4fShape::write_attribute< SparseBuffer< Imath::V4f > > (const char *attribute_name, Topology topology)
 
template<typename T >
SparseBuffer< T > duplicate (const SparseBufferConst< T > &a)
 
template<class C , class STDS >
bool operator== (const C *str, const StringViewBase< C, STDS > &sv) noexcept
 
template<class C , class STDS >
bool operator== (const StringViewBase< C, STDS > &sv, const C *str) noexcept
 
template<class C , class STDS >
bool operator== (const StringViewBase< C, STDS > &sv, const STDS &s) noexcept
 
template<class C , class STDS >
bool operator== (const STDS &s, const StringViewBase< C, STDS > &sv) noexcept
 
template<class C , class STDS >
bool operator!= (const C *str, const StringViewBase< C, STDS > &sv) noexcept
 
template<class C , class STDS >
bool operator!= (const StringViewBase< C, STDS > &sv, const C *str) noexcept
 
template<class C , class STDS >
bool operator!= (const StringViewBase< C, STDS > &sv, const STDS &s) noexcept
 
template<class C , class STDS >
bool operator!= (const STDS &s, const StringViewBase< C, STDS > &sv) noexcept
 
template<class C , class STDS >
bool operator< (const StringViewBase< C, STDS > &a, const StringViewBase< C, STDS > &b) noexcept
 
template<class _CharT , class _Traits , class C , class STDS >
std::basic_ostream< _CharT, _Traits > & operator<< (std::basic_ostream< _CharT, _Traits > &os, const StringViewBase< C, STDS > &sv)
 
bool _check_nan (const maquina::Value &v)
 
void check_nan (maquina::EvalContext &ctx, const std::string &msg, const maquina::Value &v)
 
template<class V , class M >
mul_pos (const V &src, const M &m)
 A faster alternative to multiply a position by a 4x4 matrix, ignoring the homogeneous normalization. More...
 
template<class V , class M >
mul_dir (const V &src, const M &m)
 A faster alternative to multiply a direction by a 4x4 matrix, ignoring the homogeneous normalization. More...
 
template<class T >
bool is_identity (const Imath::Matrix44< T > &m)
 Returns true if the matrix is the identity. More...
 
MAQUINA_EXPORT Imath::V3f closest_point_on_triangle (const Imath::V3f *triangle, const Imath::V3f &p, float *s_out=nullptr, float *t_out=nullptr)
 
MAQUINA_EXPORT int intersect_ray_sphere (const Imath::V3d &o, const Imath::V3d &d, const Imath::V3d &c, float r, float &t0, float &t1)
 Compute the intersections between an infinit ray and a sphere. More...
 
MAQUINA_EXPORT Imath::V3f closest_point_segment_to_segment (const Imath::V3f *s1, const Imath::V3f *s2)
 
MAQUINA_EXPORT Imath::V3d closest_point_segment_to_segment (const Imath::V3d *s1, const Imath::V3d *s2)
 
MAQUINA_EXPORT Imath::V3d closest_point_to_line (const Imath::V3d &o, const Imath::V3d &d, const Imath::V3d &p)
 Compute the closest point to p on a line. More...
 
MAQUINA_EXPORT void closest_point_between_lines (const Imath::V3f &o0, const Imath::V3f &d0, const Imath::V3f &o1, const Imath::V3f &d1, float &t0, float &t1)
 Compute the closest point between two lines. More...
 
MAQUINA_EXPORT void get_orthogonal_vectors (const Imath::V3d &fx, Imath::V3d &fy, Imath::V3d &fz)
 
MAQUINA_EXPORT Imath::M44f blend_to_identity (const Imath::M44f &a, float w)
 Blend a matrix to identity. More...
 
MAQUINA_EXPORT Imath::M44d blend_to_identity (const Imath::M44d &a, double w)
 
MAQUINA_EXPORT Imath::M44f lerp (const Imath::M44f &a, const Imath::M44f &b, float w)
 Interplate two matrices. More...
 
MAQUINA_EXPORT Imath::M44d lerp (const Imath::M44d &a, const Imath::M44d &b, double w)
 
MAQUINA_EXPORT void ik_3_joints (const Imath::V3d &p0, const Imath::V3d &p1, const Imath::V3d &p2, const Imath::V3d &goal, const Imath::V3d &normal, Imath::Quatd &r0, double &a1, Imath::V3d &axis1, bool negate_normal=false)
 
MAQUINA_EXPORT int solve_cubic (float a, float b, float c, float d, float *roots)
 Solve a cubic equation. More...
 
MAQUINA_EXPORT int solve_cubic (double a, double b, double c, double d, double *roots)
 Solve a cubic equation. More...
 
MAQUINA_EXPORT std::vector< uint8_t > deflate (const uint8_t *data, size_t size)
 Compress a bunch of binary data with zlib. More...
 
MAQUINA_EXPORT std::vector< uint8_t > inflate (const uint8_t *data, size_t size)
 Uncompress a bunch of binary data with zlib. More...
 
MAQUINA_EXPORT std::string base64_encode (const uint8_t *data, size_t size)
 Encode a bunch of binary data in a base64 text. More...
 
MAQUINA_EXPORT std::vector< uint8_t > base64_decode (const char *text, size_t size)
 Decode a bunch of binary data from a base64 text. More...
 
MAQUINA_EXPORT std::wstring expand_string (const wchar_t *path)
 Expand a string containing More...
 
MAQUINA_EXPORT std::wstring system_path (const wchar_t *path)
 Expand a document file path in a file system path. More...
 
MAQUINA_EXPORT std::string system_path (const std::string_view &path)
 Expand a document file path in a file system path. More...
 
MAQUINA_EXPORT std::wstring project_path (const wchar_t *system_path)
 Converts a file system path to a project-relative path. More...
 
MAQUINA_EXPORT std::string system_path_local (const wchar_t *path)
 Expand a document file path in a file system path. More...
 
MAQUINA_EXPORT std::string comparable_path (std::string s)
 Normalize and return a path in order to be comparaded to another comparable path. More...
 
MAQUINA_EXPORT bool same_file (std::string a, std::string b)
 Return true if the two document paths are pointing the same filesystem file. More...
 
MAQUINA_EXPORT const std::vector< std::pair< std::string, std::wstring > > & path_variables ()
 Return the currently registered path variables. More...
 
MAQUINA_EXPORT void set_path_variables (const std::vector< std::pair< std::string, std::wstring >> &path_vars)
 Register the path variables. More...
 
MAQUINA_EXPORT std::wstring utf8_to_wstring (const char *uft8)
 Convert an utf-8 string into a std::wstring. More...
 
MAQUINA_EXPORT std::string wstring_to_utf8 (const wchar_t *str)
 Convert a std::wstring into an utf-8 string. More...
 
MAQUINA_EXPORT std::wstring local_to_wstring (const char *str)
 Convert a string in the default system charset into a std::wstring. More...
 
MAQUINA_EXPORT std::string wstring_to_local (const wchar_t *str)
 Convert a std::wstring into a string in the default system charset. More...
 
MAQUINA_EXPORT std::string to_log (const std::wstring &s)
 Convert a wide string in string to use in the logger functions. More...
 
MAQUINA_EXPORT std::wstring getenv_w (const char *name)
 Return the content of an environment variable. More...
 
MAQUINA_EXPORT bool list_directory_files (const wchar_t *directory, std::vector< std::wstring > &files, bool relative=false)
 
MAQUINA_EXPORT bool file_exists (const wchar_t *file)
 Return true if a file exist. More...
 
MAQUINA_EXPORT std::string file_extension (const wchar_t *file)
 Return a file extension. More...
 
MAQUINA_EXPORT std::wstring file_name (const wchar_t *file)
 Return a file name. More...
 
MAQUINA_EXPORT std::wstring parent_path (const wchar_t *file)
 Return a file parent path. More...
 
MAQUINA_EXPORT std::wstring project_directory ()
 Return the project directory. More...
 
MAQUINA_EXPORT void set_project_directory (const wchar_t *path)
 Set the project directory. More...
 
MAQUINA_EXPORT void drm_init (const std::string &software_name, const std::wstring &license_file_path, const std::string &license_server)
 Initialize the drm. More...
 
MAQUINA_EXPORT void drm_release ()
 Release the drm. More...
 
MAQUINA_EXPORT std::pair< bool, std::string > drm_status ()
 Return the drm status. More...
 
MAQUINA_EXPORT std::string drm_hostid ()
 Return the system host id. More...
 
MAQUINA_EXPORT bool has_tag (const std::string &tags, const char *tag)
 Check a tag exist in a comma separate tag list. More...
 
MAQUINA_EXPORT std::string add_tag (const std::string &tags, const char *tag)
 Add a tag to a tag string. More...
 
MAQUINA_EXPORT bool has_tag (const Node &node, const char *tag)
 Check a tag exist in a TransformNode. More...
 
TagsIteration tags (const std::string_view &tags_list)
 Return a tag iteration from a string with comma, semi-column or space separated tokens. More...
 
MAQUINA_EXPORT void parallel_for (uint32_t first, uint32_t last, uint32_t batch_size, const std::function< void(uint32_t first, uint32_t last)> &function)
 Perform a for loop using threads. More...
 
MAQUINA_EXPORT Imath::Box3f compute_aabb (const gsl::span< const Imath::V3f > &points)
 Compute a bounding box. More...
 
MAQUINA_EXPORT Imath::V3f compute_average (const gsl::span< const Imath::V3f > &points, const gsl::span< const uint32_t > &indices)
 Compute the average of indexed points. More...
 
MAQUINA_EXPORT Value setting (const char *path)
 Get a setting value. More...
 
MAQUINA_EXPORT Plug setting_plug (const std::string_view &path)
 Get a setting plug. More...
 
MAQUINA_EXPORT void set_setting (const char *path, const Value &value)
 Set a setting value. More...
 
MAQUINA_EXPORT Plug add_setting (const std::string_view &path, const Value &value, std::string description="")
 Creates a new setting. More...
 
MAQUINA_EXPORT Scene remap_attribute (const SceneConst &new_scene, const SceneConst &old_scene, const SceneConst &old_attribute, const std::string &attribute_name, const Shape::Topology &attribute_topology, bool interpolate_vertex)
 Remaps an attribute from a deprecated Scene version to a new one. More...
 
MAQUINA_EXPORT std::vector< std::string > split (const StringView &s, const StringView &sep)
 Return a list of the words in the string, using the sep string as delimiter. More...
 
MAQUINA_EXPORT std::string join (const std::vector< std::string > &strings, const StringView &sep)
 Return the concatenation of the strings separated by the optional sep string. More...
 
MAQUINA_EXPORT std::shared_ptr< LazySceneChildResultlazy_scene_child (const SceneConst &scene, const std::string &path, bool shapes_only=false)
 Return the child scene node matching the path or if not found the only one matching the final path name. More...
 
MAQUINA_EXPORT maquina::BufferM33f compute_vertex_space (const Mesh &deformed, const Mesh &reference)
 
MAQUINA_EXPORT Imath::M33f compute_vertex_space (int p, const gsl::span< const Imath::V3f > &deform_p, const Imath::V3f &deform_n, const gsl::span< const Imath::V3f > &ref_p, const Imath::V3f &ref_n, const maquina::SpanSpan< const uint32_t, const uint32_t > &vertex_to_vertex, std::vector< Imath::V3f, tbb::scalable_allocator< Imath::V3f > > &a, std::vector< Imath::V3f, tbb::scalable_allocator< Imath::V3f > > &b)
 
MAQUINA_EXPORT Imath::M33f compute_weighted_vertex_space (int p, const gsl::span< const Imath::V3f > &deform_p, const Imath::V3f &deform_n, const gsl::span< const Imath::V3f > &ref_p, const Imath::V3f &ref_n, const std::vector< float > &weights, const maquina::SpanSpan< const uint32_t, const uint32_t > &vertex_to_vertex, std::vector< Imath::V3f, tbb::scalable_allocator< Imath::V3f > > &a, std::vector< Imath::V3f, tbb::scalable_allocator< Imath::V3f > > &b)
 
MAQUINA_EXPORT Imath::M44f compute_average_m44 (const gsl::span< const Imath::V3f > &deform_p, const gsl::span< const Imath::V3f > &ref_p, const gsl::span< const uint32_t > &indices, bool orthonormal)
 
MAQUINA_EXPORT Node workspace ()
 Return the workspace node. More...
 
MAQUINA_EXPORT Node active_document ()
 Return the active Document node. More...
 
MAQUINA_EXPORT void set_active_document (Node &document)
 Set the active Document node. More...
 
MAQUINA_EXPORT bool has_active_document ()
 Return true if there is an active Document node. More...
 
MAQUINA_EXPORT void set_document_factory (const std::function< maquina::Node()> &factory)
 Set a factory to create document plugin. More...
 
MAQUINA_EXPORT Plug background_progress ()
 Use this plug to be notified on background engine progress. More...
 
MAQUINA_EXPORT std::string active_document_filename ()
 Return the active document filename. More...
 
MAQUINA_EXPORT void undo ()
 Make a undo step. More...
 
MAQUINA_EXPORT void redo ()
 Make a redo step. More...
 
MAQUINA_EXPORT bool is_modifying ()
 Return true if modify_begin has been called but not modify_end yet. More...
 
MAQUINA_EXPORT void modify_begin (const char *modification_name, const gsl::span< const float > &interactive_frames={})
 Begin a modification of the current document. More...
 
MAQUINA_EXPORT void modify_curve_begin (const char *modification_name)
 Begin a modification of the current document. More...
 
MAQUINA_EXPORT bool modify_end ()
 End a modification of the current document. More...
 
MAQUINA_EXPORT bool modify_abort ()
 Cancel and rollback current modification. More...
 
MAQUINA_EXPORT void add_modify_action (const std::shared_ptr< maquina::CustomAction > &custom_action)
 Add a custom action to the current modifier. More...
 
MAQUINA_EXPORT bool delete_animation_graph (Node &node_to_delete, bool undo_stack=true)
 Delete properly the node animation graph. More...
 
MAQUINA_EXPORT float current_frame ()
 Shortcut for the active document current frame. More...
 
MAQUINA_EXPORT void set_current_frame (float frame)
 set the current frame More...
 
MAQUINA_EXPORT bool can_undo_blend ()
 Check if it's possible to undo blend. More...
 
MAQUINA_EXPORT void undo_blend (float undo_blend)
 Set the undo blend factor of the last modification. More...
 
MAQUINA_EXPORT Node duplicate_layer (Node &layer)
 Duplicate the layer and its animation. More...
 
MAQUINA_EXPORT void set_animated_plug_value (Plug &plug, const Value &value, float frame, bool create_curve, bool layer_value=false, int tangent_mode=-1)
 Set a value to plug, regarding the target layer and the current plug animation. More...
 
MAQUINA_EXPORT bool has_animated_plug (const Plug &plug)
 Check if the plug has an animated plug. More...
 
MAQUINA_EXPORT bool has_animated_plug_in_layer (const Plug &plug, Node &layer)
 Check if the plug has an animated plug in the layer. More...
 
MAQUINA_EXPORT std::vector< Nodein_animated_layers (const Plug &plug, bool skip_disabled=true)
 Return the animation layers that are modifying this plug. More...
 
MAQUINA_EXPORT bool has_target_layer (const Plug &plug)
 Check if the plug has a layer that can receive the plug animation. More...
 
MAQUINA_EXPORT Node target_layer (const Plug &plug)
 Return the layer receiving the plug animation. More...
 
MAQUINA_EXPORT Plug animated_plug (const Plug &plug)
 Return the animated plug, regarding the current layer. More...
 
MAQUINA_EXPORT Plug animated_plug_in_layer (const Plug &plug, Node &layer)
 Return the animated plug in the specific layer. More...
 
MAQUINA_EXPORT Value animated_plug_value_in_layer (const Plug &plug, const Node &layer, float frame)
 Return the animated plug value in the specific layer. More...
 
MAQUINA_EXPORT bool has_animated_channel (Plug &animated_plug)
 Check if the animated plug has an animated channel. More...
 
MAQUINA_EXPORT Plug animated_channel (Plug &animated_plug)
 Return the animated channel connected to a layer. More...
 
MAQUINA_EXPORT Value default_rig_value (Plug &plug)
 Return the default value if available. More...
 
MAQUINA_EXPORT void delete_channels_animation (std::vector< Plug > channels, bool all_layers=false)
 Reset the channels value in their target layer without removing the channel from the layer. More...
 
MAQUINA_EXPORT bool rig_matrix (Plug &plug, const std::string_view &srt_class_name="SRTToTransformNode")
 Rig a matrix plug. More...
 
MAQUINA_EXPORT void constrain_node (Node &constraint, Node &node)
 Constrain the node to the constraint. More...
 
MAQUINA_EXPORT void key_layer (Node &layer, float frame, bool default_value=false)
 Add a key frame on a layer. More...
 
MAQUINA_EXPORT std::vector< Nodeselection ()
 Return the active selected maquina::Node objects. More...
 
MAQUINA_EXPORT std::vector< std::shared_ptr< NodeDelegate > > delegate_selection ()
 Return the active node delegate selection. More...
 
MAQUINA_EXPORT const std::vector< GeometryComponentSelection > & sub_component_selection ()
 Return the selected geometry components. More...
 
MAQUINA_EXPORT LastSelectedComponent last_selected_components ()
 Return the last selected components. More...
 
MAQUINA_EXPORT std::vector< std::string > selection_paths ()
 Return the paths of the active node delegate selection. More...
 
MAQUINA_EXPORT std::vector< std::shared_ptr< NodeDelegate > > tool_selection ()
 Return the active tool delegate selection. More...
 
MAQUINA_EXPORT void select (const std::vector< Node > &nodes, SelectionMode mode=SelectionMode::Replace)
 Update the active selection with a list of nodes according to the selection mode. More...
 
MAQUINA_EXPORT void select_delegate (std::vector< std::string > paths, SelectionMode mode=SelectionMode::Replace)
 Update the active selection with a list of node paths according to the selection mode. More...
 
MAQUINA_EXPORT void select_sub_component (std::vector< GeometryComponentSelection > &&selection, SelectionMode mode=SelectionMode::Replace, bool keep_sub_components=true)
 Update the active sub component selection with a node paths associated to selection weights. More...
 
MAQUINA_EXPORT std::unordered_set< std::string > selected_keys_channels (Node &anim_layer)
 Return the channels associated with the active key selection in a layer. More...
 
MAQUINA_EXPORT std::vector< Channelchannel_selection (ChannelMode channel_mode_filter)
 Return the selected channels. Selected channels are the selected nodes channels, filtered by the ChannelBox selection. More...
 
MAQUINA_EXPORT Value copy_keys (Node &anim_layer)
 Return a copy of the active key selection in a layer. More...
 
MAQUINA_EXPORT std::vector< std::pair< std::string, std::string > > match_channels (const Value &to_match)
 Return the best match between the channels to be pasted and the active selection. More...
 
MAQUINA_EXPORT std::pair< std::vector< std::pair< std::string, std::string > >, bool > match_to_channels (const std::unordered_set< std::string > &channels_to_match, const std::unordered_set< std::string > &selected_channels, MatchMirrorMode mirror_mode)
 Return the best match between the channels to be pasted and the active selection. More...
 
MAQUINA_EXPORT PasteType is_paste_valid (const Value &to_paste, const std::vector< std::pair< std::string, std::string > > &matched_channels, Node &dest_layer)
 Test if the targeted channels are open to be modified by the clipboard in a layer. More...
 
MAQUINA_EXPORT void paste_keys (const Value &to_paste, const std::vector< std::pair< std::string, std::string > > &matched_channels, Node &dest_layer, float frame_in, float frame_out, float to_frame, PasteMode mode=PasteMode::Merge, PasteType type=PasteType::Hard)
 Paste values onto matching channels in a targeted layer. More...
 
MAQUINA_EXPORT void paste_keys_on_curve (Node &anim_curve_node, const AnimCurve &curve, float frame_in, float frame_out, float to_frame, PasteMode mode=PasteMode::Merge)
 Paste the curve keys into an animation curve node. More...
 
MAQUINA_EXPORT void remove_keys (Node &anim_layer, bool normalize=true)
 Remove the active key selection in a layer. More...
 
MAQUINA_EXPORT void remove_key (Plug &plug, const float frame)
 Remove the key at frame in the active layer. More...
 
MAQUINA_EXPORT void transform_keys (Node &anim_layer)
 Transform the active key selection using the selection rubberband. More...
 
MAQUINA_EXPORT void transform_curve_keys (const Plug &plug, std::unordered_map< float, float > &original_to_transformed_keys)
 
MAQUINA_EXPORT int insert_key (const Plug &plug, float t, float v)
 
MAQUINA_EXPORT void time_warp_keys (Node &anim_layer)
 Time warp the active key selection using the selection rubberband. More...
 
MAQUINA_EXPORT void move_layer (Node &layer, int dest_id)
 Re-order layers. More...
 
MAQUINA_EXPORT void reparent_layers (Node &parent, const std::vector< Node > &layers)
 Move layers. More...
 
MAQUINA_EXPORT void ungroup_layer (Node &layer_group)
 Ungroup layer. More...
 
MAQUINA_EXPORT bool can_be_flatten (Node &layer)
 
MAQUINA_EXPORT void group_child_layers (Node &layer_group, std::vector< Node > &layers, const char *layer_type, bool recursive=false)
 
MAQUINA_EXPORT Node flatten_group (Node &layer_group, FlattenMode mode=FlattenMode::Union_Keys, int all_frames_interval=1, int all_frames_offset=0, int all_frames_tangents_mode=1)
 Flatten a group layer. More...
 
MAQUINA_EXPORT void flatten_layer (Node &layer, Node &dest_layer, FlattenMode mode=FlattenMode::Union_Keys, int all_frames_interval=1, int all_frames_offset=0, int all_frames_tangents_mode=1)
 Flatten a layer into the previous one. More...
 
MAQUINA_EXPORT void bake_layer (Node &layer, int interval=1, int offset=0, int tangents_mode=1)
 Bake the layer. More...
 
MAQUINA_EXPORT void bake_curve (Node &curve, const Plug &value_plug, int interval=1, int offset=0, int tangents_mode=1)
 Bake curve. More...
 
MAQUINA_EXPORT Node reference (Node &root, const std::wstring &filepath, const std::string &reference_root_name="", const ProgressCallback &progress={})
 Reference the content of a file into the project. More...
 
MAQUINA_EXPORT bool has_loader (const std::wstring &filepath)
 Is there a loader for this file type ? More...
 
MAQUINA_EXPORT Node load_node (Node &root, const std::wstring &filepath, const std::string &root_name="", const ProgressCallback &progress={})
 Load the content of a file into the project. More...
 
MAQUINA_EXPORT Dict extract_pose (const std::vector< std::string > &channels, float frame)
 Extract a pose from a selection of plugs. More...
 
MAQUINA_EXPORT Dict blend_poses (const Dict &from_pose, const Dict &to_pose, float weight)
 Blend from pose to pose using weight factor. More...
 
MAQUINA_EXPORT Dict matching_pose (const Dict &pose, const std::vector< std::string > &channels, MatchMirrorMode mirror_mode)
 Match a pose to a set of channels. More...
 
MAQUINA_EXPORT bool has_controller (const Plug &plug)
 Test if a controller is associated to a plug. More...
 
MAQUINA_EXPORT Node controller (const Plug &plug)
 Return the controller associated to a plug. More...
 
MAQUINA_EXPORT void init_crash_handler (const std::string &message, bool send_report, const std::wstring &app_name, const std::wstring &app_version, const std::string &recovery_file_extension, const std::string &post_dump_url)
 Init the crash handler with the message to attach to the crash reports. More...
 
MAQUINA_EXPORT Plug animation_node_channel_plug (Node &node)
 Get the channel plug (input of the rig) from an animation node (like an AnimCurveFloat node) More...
 
MAQUINA_EXPORT bool is_right (Node &asset, const std::string &name)
 Return true if the name is right using the asset mirroring rules. More...
 
MAQUINA_EXPORT bool is_left (Node &asset, const std::string &name)
 Return true if the name is left using the asset mirroring rules. More...
 
MAQUINA_EXPORT std::string asset_mirror (Node &asset, const std::string &name)
 Return the mirrored name using the asset mirroring rules. More...
 
MAQUINA_EXPORT std::string asset_mirror_path (Node &asset, const std::string &path)
 Return the mirrored path using the asset mirroring rules. More...
 
MAQUINA_EXPORT Node asset_mirror_node (Node &asset, const Node &node)
 Return the mirrored node using the asset mirroring rules. More...
 
MAQUINA_EXPORT bool asset_has_manipulator (Node &asset, const std::string &manipulator_name)
 Return true if the asset contain the manipulator. More...
 
MAQUINA_EXPORT Node asset_manipulator (Node &asset, const std::string &manipulator_name)
 Get the manipulator with the name manipulator name from this asset. More...
 
MAQUINA_EXPORT std::optional< Nodeasset_controller (Node &asset, const std::string_view &controller_name)
 Get an asset controller if it exists, else return null. More...
 
MAQUINA_EXPORT bool asset_has_child (Node &asset, const std::string &name)
 Return true if the asset contain a child named name. More...
 
MAQUINA_EXPORT Node asset_child (Node &asset, const std::string &name)
 Get the first child node named name of this asset. More...
 
MAQUINA_EXPORT bool asset_child_has_manipulator (Node &asset, const Node &child)
 Return true if the asset child has a manipulator. More...
 
MAQUINA_EXPORT Node asset_child_manipulator (Node &asset, const Node &child)
 Get the manipulator associated to the asset child. More...
 
MAQUINA_EXPORT Node manipulator_controller (Node &manipulator)
 Get the controller related to this manipulator. More...
 
MAQUINA_EXPORT std::vector< Nodeasset_controllers (Node &asset)
 Get the asset controllers. More...
 
MAQUINA_EXPORT void start_profiling ()
 Start an interactive profiling session. More...
 
MAQUINA_EXPORT void clear_profiling ()
 Clear the profiling session data. More...
 
MAQUINA_EXPORT std::vector< std::pair< std::string, Imath::V2f > > end_profiling ()
 Stop the interactive profiling session. More...
 
MAQUINA_EXPORT void load_document (const std::string_view &path, const ProgressCallback &progress={})
 Open a new Rumba/Guerilla project. More...
 
MAQUINA_EXPORT std::optional< Nodeadd_document (const std::string &path, const ProgressCallback &progress={})
 Add a new document in the current project and return it. Do not close any opened document. More...
 
MAQUINA_EXPORT Node add_new_document ()
 Add a new, empty document in the current project and return it. Do not close any opened document. More...
 
MAQUINA_EXPORT std::optional< Nodedocument (const std::string &path, bool comparable=false)
 Return the document node associated to that file path. More...
 
MAQUINA_EXPORT void new_document ()
 Close the current documents and create a new document. More...
 
MAQUINA_EXPORT bool is_demo_mode ()
 Test if Rumba/Guerilla is in demo mode. More...
 
MAQUINA_EXPORT void flush_observers ()
 Make sure all the observers have been called. More...
 
MAQUINA_EXPORT Node create_tool_geometry (const char *name, Node &parent)
 Create a geometry node for tools, i-e, not in a document. More...
 
MAQUINA_EXPORT void background_start ()
 Start the background evaluation engine. More...
 
MAQUINA_EXPORT void background_wait ()
 Wait for the baground evaluation engine. More...
 
MAQUINA_EXPORT Node asset_display (const Node &asset)
 
MAQUINA_EXPORT Value weighted_sum (const gsl::span< const Value > &values, const gsl::span< const double > &weights, int quat_iter=15, double quat_eps=1e-12)
 Computes the weighted sum of a set of values. More...
 
MAQUINA_EXPORT bool is_rig_mode_on ()
 Returns true if the rig mode is active, false otherwise. More...
 
MAQUINA_EXPORT void frame_camera (maquina::NodeDelegate &camera, const std::vector< std::shared_ptr< maquina::NodeDelegate >> &selection)
 Move a camera to contain a node selection. More...
 
MAQUINA_EXPORT std::vector< std::shared_ptr< maquina::NodeDelegate > > cameras ()
 Return the available cameras. More...
 
MAQUINA_EXPORT std::string beautify (const std::string &s)
 Format the label to a nice string. More...
 
MAQUINA_EXPORT std::optional< Nodenode_asset (const Node &node)
 Return the asset node associated with another node. More...
 
MAQUINA_EXPORT void pick (const std::function< void(const std::optional< std::string_view > &path)> &picking_callback)
 Start the picking process: register a function to call the next time a node delegate is selected or the picking process aborted. More...
 
MAQUINA_EXPORT bool is_picking ()
 Return true if the picking is started. More...
 
MAQUINA_EXPORT void stop_picking ()
 End the picking process, unregister the callback and call it with an empty value to signal the abort. More...
 
MAQUINA_EXPORT void notify_picking (const std::string_view &node_delegate_path)
 Call the picking callback. More...
 
MAQUINA_EXPORT Array trigger_event (const std::string_view &event_type, const Value &value=Value::default_value)
 Trigger an event, return an Array value with the triggered event returned values. More...
 
MAQUINA_EXPORT int register_event_callback (const std::string_view &event_type, std::function< Value(const Value &)> callback)
 Register an event callback, returns its ID for unregistering. More...
 
MAQUINA_EXPORT void unregister_event_callback (int callback_id)
 Unregister an event callback. More...
 
MAQUINA_EXPORT void enable_plug_listener (bool enable)
 If enable is false, stop flushing the plug listener handlers. More...
 
MAQUINA_EXPORT void create_type_alias (const std::string &previous_type_name, std::string new_type_name)
 Create a type alias. When reading an object of type 'previous_type_name', creates an object of type 'new_class_name'. More...
 
MAQUINA_EXPORT maquina::Plug widget_setting_plug (const std::string &setting_name, const std::string &widget_name, const maquina::Value &default_value)
 

Variables

MAQUINA_EXTERN_TEMPLATE class MAQUINA_EXPORT BufferConst< int32_t >
 
MAQUINA_EXTERN_TEMPLATE class MAQUINA_EXPORT BufferConst< uint8_t >
 
MAQUINA_EXTERN_TEMPLATE class MAQUINA_EXPORT BufferConst< uint32_t >
 
MAQUINA_EXTERN_TEMPLATE class MAQUINA_EXPORT BufferConst< float >
 
MAQUINA_EXTERN_TEMPLATE class MAQUINA_EXPORT BufferConst< double >
 
MAQUINA_EXTERN_TEMPLATE class MAQUINA_EXPORT Buffer< int32_t >
 
MAQUINA_EXTERN_TEMPLATE class MAQUINA_EXPORT Buffer< uint8_t >
 
MAQUINA_EXTERN_TEMPLATE class MAQUINA_EXPORT Buffer< uint32_t >
 
MAQUINA_EXTERN_TEMPLATE class MAQUINA_EXPORT Buffer< float >
 
MAQUINA_EXTERN_TEMPLATE class MAQUINA_EXPORT Buffer< double >
 
MAQUINA_EXTERN_TEMPLATE class MAQUINA_EXPORT IndexedBufferConst< int32_t >
 
MAQUINA_EXTERN_TEMPLATE class MAQUINA_EXPORT IndexedBufferConst< uint8_t >
 
MAQUINA_EXTERN_TEMPLATE class MAQUINA_EXPORT IndexedBufferConst< uint32_t >
 
MAQUINA_EXTERN_TEMPLATE class MAQUINA_EXPORT IndexedBufferConst< float >
 
MAQUINA_EXTERN_TEMPLATE class MAQUINA_EXPORT IndexedBufferConst< double >
 
MAQUINA_EXTERN_TEMPLATE class MAQUINA_EXPORT IndexedBuffer< int32_t >
 
MAQUINA_EXTERN_TEMPLATE class MAQUINA_EXPORT IndexedBuffer< uint8_t >
 
MAQUINA_EXTERN_TEMPLATE class MAQUINA_EXPORT IndexedBuffer< uint32_t >
 
MAQUINA_EXTERN_TEMPLATE class MAQUINA_EXPORT IndexedBuffer< float >
 
MAQUINA_EXTERN_TEMPLATE class MAQUINA_EXPORT IndexedBuffer< double >
 
MAQUINA_EXTERN_TEMPLATE class MAQUINA_EXPORT SparseBufferConst< int32_t >
 
MAQUINA_EXTERN_TEMPLATE class MAQUINA_EXPORT SparseBufferConst< uint8_t >
 
MAQUINA_EXTERN_TEMPLATE class MAQUINA_EXPORT SparseBufferConst< uint32_t >
 
MAQUINA_EXTERN_TEMPLATE class MAQUINA_EXPORT SparseBufferConst< float >
 
MAQUINA_EXTERN_TEMPLATE class MAQUINA_EXPORT SparseBufferConst< double >
 
MAQUINA_EXTERN_TEMPLATE class MAQUINA_EXPORT SparseBuffer< int32_t >
 
MAQUINA_EXTERN_TEMPLATE class MAQUINA_EXPORT SparseBuffer< uint8_t >
 
MAQUINA_EXTERN_TEMPLATE class MAQUINA_EXPORT SparseBuffer< uint32_t >
 
MAQUINA_EXTERN_TEMPLATE class MAQUINA_EXPORT SparseBuffer< float >
 
MAQUINA_EXTERN_TEMPLATE class MAQUINA_EXPORT SparseBuffer< double >
 

Detailed Description

This version of the SDK is unstable, i-e, it may change with no warning.

Using this version you may have to recompile your plugins when you update Rumba. If you need a binary stable API, consider to use a stable version.The Rumba C++ API

Typedef Documentation

◆ AngleAxisd

using maquina::AngleAxisd = typedef AngleAxis<double>

◆ AngleAxisf

using maquina::AngleAxisf = typedef AngleAxis<float>

◆ BufferBox3f

◆ BufferConstBox3f

◆ BufferConstDouble

◆ BufferConstFloat

◆ BufferConstInt32

A readonly integer buffer

◆ BufferConstM33f

◆ BufferConstM44d

◆ BufferConstM44f

◆ BufferConstUInt32

◆ BufferConstUInt8

◆ BufferConstV2f

◆ BufferConstV2i

◆ BufferConstV3f

◆ BufferConstV3i

◆ BufferConstV4f

◆ BufferConstV4i

◆ BufferDouble

typedef Buffer<double> maquina::BufferDouble

◆ BufferFloat

typedef Buffer<float> maquina::BufferFloat

◆ BufferInt32

typedef Buffer<int32_t> maquina::BufferInt32

◆ BufferM33f

◆ BufferM44d

◆ BufferM44f

◆ BufferUInt32

typedef Buffer<uint32_t> maquina::BufferUInt32

◆ BufferUInt8

typedef Buffer<uint8_t> maquina::BufferUInt8

◆ BufferV2f

◆ BufferV2i

◆ BufferV3f

◆ BufferV3i

◆ BufferV4f

◆ BufferV4i

◆ IndexedBufferBox3f

◆ IndexedBufferConstBox3f

◆ IndexedBufferConstDouble

◆ IndexedBufferConstFloat

◆ IndexedBufferConstInt32

◆ IndexedBufferConstM44f

◆ IndexedBufferConstUInt32

◆ IndexedBufferConstUInt8

◆ IndexedBufferConstV2f

◆ IndexedBufferConstV2i

◆ IndexedBufferConstV3f

◆ IndexedBufferConstV3i

◆ IndexedBufferConstV4f

◆ IndexedBufferConstV4i

◆ IndexedBufferDouble

◆ IndexedBufferFloat

◆ IndexedBufferInt32

◆ IndexedBufferM44f

◆ IndexedBufferUInt32

◆ IndexedBufferUInt8

◆ IndexedBufferV2f

◆ IndexedBufferV2i

◆ IndexedBufferV3f

◆ IndexedBufferV3i

◆ IndexedBufferV4f

◆ IndexedBufferV4i

◆ PartialInvalidationPtr

◆ ProgressCallback

using maquina::ProgressCallback = typedef std::function<bool(float, const char*)>

◆ Ptr

template<class T >
using maquina::Ptr = typedef std::shared_ptr<T>

◆ SparseBufferBox3f

◆ SparseBufferConstBox3f

◆ SparseBufferConstDouble

◆ SparseBufferConstFloat

◆ SparseBufferConstInt32

◆ SparseBufferConstM44f

◆ SparseBufferConstUInt32

◆ SparseBufferConstUInt8

◆ SparseBufferConstV2f

◆ SparseBufferConstV2i

◆ SparseBufferConstV3f

◆ SparseBufferConstV3i

◆ SparseBufferConstV4f

◆ SparseBufferConstV4i

◆ SparseBufferDouble

◆ SparseBufferFloat

◆ SparseBufferInt32

◆ SparseBufferM44f

◆ SparseBufferUInt32

◆ SparseBufferUInt8

◆ SparseBufferV2f

◆ SparseBufferV2i

◆ SparseBufferV3f

◆ SparseBufferV3i

◆ SparseBufferV4f

◆ SparseBufferV4i

◆ StringView

typedef StringViewBase<char, std::string> maquina::StringView

◆ StringViewHasher

typedef StringViewHasherBase<char, std::string> maquina::StringViewHasher

◆ verbosity_level

using maquina::verbosity_level = typedef spdlog::level::level_enum

◆ WStringView

typedef StringViewBase<wchar_t, std::wstring> maquina::WStringView

◆ WStringViewHasher

typedef StringViewHasherBase<wchar_t, std::wstring> maquina::WStringViewHasher

Enumeration Type Documentation

◆ ChannelMode

enum maquina::ChannelMode
strong

The channel modes.

Enumerator
keyable 

The channel is keyed by default when its node is keyed. This is the default mode.

animated 

The channel is animable but not keyed by default. It has to be explicitly keyed.

constant 

The channel is not animable.

locked 

The channel can't be modified.

hidden 

The channel exists but is not visible in the user interface.

◆ ChannelType

enum maquina::ChannelType
strong

Predefined channel types.

Enumerator
generic 

No specific channel type.

The x component of a vector value.

The y component of a vector value.

The z component of a vector value.

The w component of a vector value.

sx 

The x component of the scale of a matrix.

sy 

The y component of the scale of a matrix.

sz 

The z component of the scale of a matrix.

rx 

The x component of the rotate of a matrix.

ry 

The y component of the rotate of a matrix.

rz 

The z component of the rotate of a matrix.

tx 

The x component of the translation of a matrix.

ty 

The y component of the translation of a matrix.

tz 

The z component of the translation of a matrix.

ro 

The rotate order used to compose the rotation.

◆ CycleMode

enum maquina::CycleMode
strong
Enumerator
cycle_mode_constant 
cycle_mode_repeat 
cycle_mode_repeat_continuous 
cycle_mode_linear 

◆ FlattenMode

enum maquina::FlattenMode
strong

Specify a way to flatten a layer into another.

Enumerator
In_Dest_Key 

Only keep the destination layers key to perform the merge.

Union_Keys 

Keep both destination and origin layers key to perform the merge.

All_Frames 

Create a key at all frame to bake the whole animation of two layers into a single layer.

◆ MatchMirrorMode

Mirror mode used in match_to_channels.

Enumerator
automatic 

If no match found, try to match the selection controller's mirrored channels.

mirror 

Force to match the selection controller's mirrored channels.

no_mirror 

Do not try to match the selection controller's mirrored channels.

◆ PasteMode

enum maquina::PasteMode
strong

Specify a way to paste the clipboard.

Enumerator
Clear 

Clear destination before paste.

Merge 

Merge the clipboard with the destination.

Replace 

Replace the destination with the clipboard value.

Insert 

Insert the clipboard at the destination frame.

◆ PasteType

enum maquina::PasteType
strong
Enumerator
Null 

No paste match.

Soft 

Soft paste match.

Hard 

Hard paste match.

◆ RotateOrder

enum maquina::RotateOrder
strong

Euler Rotation Order.

Enumerator
xyz 
yzx 
zxy 
xzy 
yxz 
zyx 

◆ SelectionMode

Specify a way to alter the active selection.

Enumerator
Replace 

Replace the active selection.

Add 

Add to the active selection.

Remove 

Remove from the active selection.

Invert 

Invert the active selection.

◆ ShaderParamType

The shader parameter types.

Enumerator
Bool 
Int 
Float 
V2i 
V3i 
V4i 
V2f 
V3f 
V4f 
M44f 
_LastPOD 
Texture 
Token 
InternalExpression 
Ignore 

Function Documentation

◆ _check_nan()

bool maquina::_check_nan ( const maquina::Value v)
inline

◆ active_document()

MAQUINA_EXPORT Node maquina::active_document ( )

Return the active Document node.

◆ active_document_directory()

MAQUINA_EXPORT std::string maquina::active_document_directory ( )

Get the directory of the active document.

◆ active_document_filename()

MAQUINA_EXPORT std::string maquina::active_document_filename ( )

Return the active document filename.

◆ add_document()

MAQUINA_EXPORT std::optional<Node> maquina::add_document ( const std::string &  path,
const ProgressCallback progress = {} 
)

Add a new document in the current project and return it. Do not close any opened document.

Exceptions
std::runtime_errorif the file can't be loaded.
Parameters
pathThe document path to add to the project. This path is also used to retrieve the document node.
progressThe optional progress object to track the loading progression

◆ add_media_layer()

MAQUINA_EXPORT maquina::Node maquina::add_media_layer ( std::optional< maquina::Node parent = {},
const std::string_view &  name = "",
bool  undo_stack = true 
)

Create a media layer.

Parameters
parentThe optional parent layer. If empty, create a root layer in the active document.
nameThe new layer name
undo_stackIf true, this action is undoable

◆ add_modify_action()

MAQUINA_EXPORT void maquina::add_modify_action ( const std::shared_ptr< maquina::CustomAction > &  custom_action)

Add a custom action to the current modifier.

◆ add_new_document()

MAQUINA_EXPORT Node maquina::add_new_document ( )

Add a new, empty document in the current project and return it. Do not close any opened document.

◆ add_plugs_to_layer()

MAQUINA_EXPORT bool maquina::add_plugs_to_layer ( const std::vector< Plug > &  plugs,
Node layer,
bool  check_editable = true,
bool  selection_mask = true 
)

Update the animation graph so that these plug channels are animated in the layer.

If any channel's value is composed of different sub-channels, e.g. M44d, the value will be rigged and the sub-channels will be animated in the layer. Returns false if this channel can't be assigned to the layer.

Parameters
plugsThe plugs
layerThe layer
check_editableDo we force plug addition (defaults to no)
selection_maskShould the channel selection limit which plugs get added

◆ add_points_colormap()

MAQUINA_EXPORT void maquina::add_points_colormap ( Points points,
Colormap  type,
const gsl::span< const uint32_t > &  indices,
const gsl::span< const float > &  values,
float  max_value = -std::numeric_limits< float >::infinity() 
)

Add a heat map channel to the Points object.

is max_value is not provided, normalize the heat map with the max value of values.

◆ add_setting()

MAQUINA_EXPORT Plug maquina::add_setting ( const std::string_view &  path,
const Value value,
std::string  description = "" 
)

Creates a new setting.

This function adds a new setting to the application. Each setting is identified by a unique path and can have a default value along with an optional description.

Parameters
pathThe path to the setting, formatted as "category/widget.option".
valueThe default setting value of type Value.
descriptionAn optional descriptor for the setting. Defaults to an empty string.
Returns
A Plug object representing the newly created setting.

◆ add_shader_glsl()

MAQUINA_EXPORT void maquina::add_shader_glsl ( const std::string_view &  code)

◆ add_tag()

MAQUINA_EXPORT std::string maquina::add_tag ( const std::string &  tags,
const char *  tag 
)

Add a tag to a tag string.

◆ anim_curve_keys_selected()

MAQUINA_EXPORT bool maquina::anim_curve_keys_selected ( )

Return true if the curve editor is open and keys are selected in it.

◆ animated_channel()

MAQUINA_EXPORT Plug maquina::animated_channel ( Plug animated_plug)

Return the animated channel connected to a layer.

Returns the related channel that is connected to the animation graph.

Parameters
animated_plugThe animated plug from the layer

◆ animated_plug()

MAQUINA_EXPORT Plug maquina::animated_plug ( const Plug plug)

Return the animated plug, regarding the current layer.

Returns the related plug from the animation graph.

Parameters
plugThe asset plug

◆ animated_plug_in_layer()

MAQUINA_EXPORT Plug maquina::animated_plug_in_layer ( const Plug plug,
Node layer 
)

Return the animated plug in the specific layer.

Returns the related plug from the animation graph.

Parameters
plugThe asset plug
layerThe layer

◆ animated_plug_value_in_layer()

MAQUINA_EXPORT Value maquina::animated_plug_value_in_layer ( const Plug plug,
const Node layer,
float  frame 
)

Return the animated plug value in the specific layer.

Returns the related plug value from the animation graph if no animated value in the layer, returns the equivalent value in the layer as if plug was override in the layer.

Exceptions
std::runtime_errorif no value can't be found.
Parameters
plugThe asset plug
layerThe layer
frameThe frame

◆ animation_node_channel_plug()

MAQUINA_EXPORT Plug maquina::animation_node_channel_plug ( Node node)

Get the channel plug (input of the rig) from an animation node (like an AnimCurveFloat node)

◆ apply_pose()

MAQUINA_EXPORT void maquina::apply_pose ( const Dict pose,
float  frame 
)

Apply a pose.

Parameters
poseThe pose to apply
frameThe frame to apply pose

◆ asset_child()

MAQUINA_EXPORT Node maquina::asset_child ( Node asset,
const std::string &  name 
)

Get the first child node named name of this asset.

◆ asset_child_has_manipulator()

MAQUINA_EXPORT bool maquina::asset_child_has_manipulator ( Node asset,
const Node child 
)

Return true if the asset child has a manipulator.

◆ asset_child_manipulator()

MAQUINA_EXPORT Node maquina::asset_child_manipulator ( Node asset,
const Node child 
)

Get the manipulator associated to the asset child.

◆ asset_controller()

MAQUINA_EXPORT std::optional<Node> maquina::asset_controller ( Node asset,
const std::string_view &  controller_name 
)

Get an asset controller if it exists, else return null.

◆ asset_controllers()

MAQUINA_EXPORT std::vector<Node> maquina::asset_controllers ( Node asset)

Get the asset controllers.

◆ asset_display()

MAQUINA_EXPORT Node maquina::asset_display ( const Node asset)

◆ asset_has_child()

MAQUINA_EXPORT bool maquina::asset_has_child ( Node asset,
const std::string &  name 
)

Return true if the asset contain a child named name.

◆ asset_has_manipulator()

MAQUINA_EXPORT bool maquina::asset_has_manipulator ( Node asset,
const std::string &  manipulator_name 
)

Return true if the asset contain the manipulator.

◆ asset_manipulator()

MAQUINA_EXPORT Node maquina::asset_manipulator ( Node asset,
const std::string &  manipulator_name 
)

Get the manipulator with the name manipulator name from this asset.

◆ asset_mirror()

MAQUINA_EXPORT std::string maquina::asset_mirror ( Node asset,
const std::string &  name 
)

Return the mirrored name using the asset mirroring rules.

◆ asset_mirror_node()

MAQUINA_EXPORT Node maquina::asset_mirror_node ( Node asset,
const Node node 
)

Return the mirrored node using the asset mirroring rules.

◆ asset_mirror_path()

MAQUINA_EXPORT std::string maquina::asset_mirror_path ( Node asset,
const std::string &  path 
)

Return the mirrored path using the asset mirroring rules.

◆ background_progress()

MAQUINA_EXPORT Plug maquina::background_progress ( )

Use this plug to be notified on background engine progress.

◆ background_start()

MAQUINA_EXPORT void maquina::background_start ( )

Start the background evaluation engine.

◆ background_wait()

MAQUINA_EXPORT void maquina::background_wait ( )

Wait for the baground evaluation engine.

◆ bake_curve()

MAQUINA_EXPORT void maquina::bake_curve ( Node curve,
const Plug value_plug,
int  interval = 1,
int  offset = 0,
int  tangents_mode = 1 
)

Bake curve.

Parameters
curveThe curve to bake
value_plugThe plug with the value
intervalbakes frames every interval.
offsetbakes every frames matching (frameinterval) == offset.
tangents_modeThe tangent mode to set on keys, 0 for linear, 1 for auto, 3 for spline, 4 for flat, 5 for step

◆ bake_layer()

MAQUINA_EXPORT void maquina::bake_layer ( Node layer,
int  interval = 1,
int  offset = 0,
int  tangents_mode = 1 
)

Bake the layer.

Parameters
layerThe layer to bake
intervalbakes frames every interval.
offsetbakes every frames matching (frameinterval) == offset.
tangents_modeThe tangent mode to set on keys, 0 for linear, 1 for auto, 3 for spline, 4 for flat, 5 for step

◆ base64_decode()

MAQUINA_EXPORT std::vector<uint8_t> maquina::base64_decode ( const char *  text,
size_t  size 
)

Decode a bunch of binary data from a base64 text.

◆ base64_encode()

MAQUINA_EXPORT std::string maquina::base64_encode ( const uint8_t *  data,
size_t  size 
)

Encode a bunch of binary data in a base64 text.

◆ beautify()

MAQUINA_EXPORT std::string maquina::beautify ( const std::string &  s)

Format the label to a nice string.

◆ blend_poses()

MAQUINA_EXPORT Dict maquina::blend_poses ( const Dict from_pose,
const Dict to_pose,
float  weight 
)

Blend from pose to pose using weight factor.

Returns a new pose result of the blend

Parameters
from_poseThe starting pose
to_poseThe destination pose
weightThe weight factor

◆ blend_to_identity() [1/2]

MAQUINA_EXPORT Imath::M44f maquina::blend_to_identity ( const Imath::M44f a,
float  w 
)

Blend a matrix to identity.

w is the blend weight. If w is 0, the identity matrix is returned, if 1, a is returned, otherwise a blending is computed. The scale, shear and translation components are linearly interpolated. The rotation is interpolated using the shortest quaternion linear interpolation.

◆ blend_to_identity() [2/2]

MAQUINA_EXPORT Imath::M44d maquina::blend_to_identity ( const Imath::M44d a,
double  w 
)

◆ cameras()

MAQUINA_EXPORT std::vector<std::shared_ptr<maquina::NodeDelegate> > maquina::cameras ( )

Return the available cameras.

◆ can_be_flatten()

MAQUINA_EXPORT bool maquina::can_be_flatten ( Node layer)
Parameters
layerThe layer to be flatten

◆ can_undo_blend()

MAQUINA_EXPORT bool maquina::can_undo_blend ( )

Check if it's possible to undo blend.

◆ channel_path_to_channel_plug()

MAQUINA_EXPORT Plug maquina::channel_path_to_channel_plug ( const StringView channel_path,
const Node document,
Node layer = nullptr 
)

Get the channel plug using a channel path.

{std::runtime_error,RuntimeError} if the plug is not found or an error occured.

◆ channel_plug_to_channel_path()

MAQUINA_EXPORT std::string maquina::channel_plug_to_channel_path ( const Plug channel_plug)

Get the channel path on a channel plug.

◆ channel_plug_to_controller_plug()

MAQUINA_EXPORT std::optional<std::pair<Plug, std::string> > maquina::channel_plug_to_controller_plug ( const Plug channel_plug)

Get the channel path on a channel plug.

◆ channel_selection()

MAQUINA_EXPORT std::vector<Channel> maquina::channel_selection ( ChannelMode  channel_mode_filter)

Return the selected channels. Selected channels are the selected nodes channels, filtered by the ChannelBox selection.

If no channel plug selection is done in the ChannelBox, returns the channel with channel mode smaller or equal to channel_mode_filter

◆ channel_type_name()

MAQUINA_EXPORT const char* maquina::channel_type_name ( ChannelType  channel_type)

Return the ChannelType as a string.

Return an empty string for ChannelType::generic or undefined types

◆ channels_in_layer()

MAQUINA_EXPORT std::vector<Plug> maquina::channels_in_layer ( const Node layer)

Return the list of channels that are animated in the layer.

◆ check_nan()

void maquina::check_nan ( maquina::EvalContext ctx,
const std::string &  msg,
const maquina::Value v 
)
inline

◆ clear_profiling()

MAQUINA_EXPORT void maquina::clear_profiling ( )

Clear the profiling session data.

◆ closest_point_between_lines()

MAQUINA_EXPORT void maquina::closest_point_between_lines ( const Imath::V3f o0,
const Imath::V3f d0,
const Imath::V3f o1,
const Imath::V3f d1,
float &  t0,
float &  t1 
)

Compute the closest point between two lines.

◆ closest_point_on_triangle()

MAQUINA_EXPORT Imath::V3f maquina::closest_point_on_triangle ( const Imath::V3f triangle,
const Imath::V3f p,
float *  s_out = nullptr,
float *  t_out = nullptr 
)

triangle points on an array of 3 Imath::V3f, which are the triangle vertices. p is the lookup position. if s_out/t_out are specified, they are filled with the barycentric coordinate of the closest point on the triangle.

◆ closest_point_segment_to_segment() [1/2]

MAQUINA_EXPORT Imath::V3f maquina::closest_point_segment_to_segment ( const Imath::V3f s1,
const Imath::V3f s2 
)

◆ closest_point_segment_to_segment() [2/2]

MAQUINA_EXPORT Imath::V3d maquina::closest_point_segment_to_segment ( const Imath::V3d s1,
const Imath::V3d s2 
)

◆ closest_point_to_line()

MAQUINA_EXPORT Imath::V3d maquina::closest_point_to_line ( const Imath::V3d o,
const Imath::V3d d,
const Imath::V3d p 
)

Compute the closest point to p on a line.

line_o is any position on the line line_d is the NORMALIZED line direction p is the point position

◆ cmd_run()

void maquina::cmd_run ( const Plug trigger)

Run the commands connected to that plug.

◆ comparable_path()

MAQUINA_EXPORT std::string maquina::comparable_path ( std::string  s)

Normalize and return a path in order to be comparaded to another comparable path.

The path s is expanded using system_path() and is normalized without any filesystem calls. It is ok to normalize a non exisiting file path. Symlinks are not followed.

◆ compute_aabb()

MAQUINA_EXPORT Imath::Box3f maquina::compute_aabb ( const gsl::span< const Imath::V3f > &  points)

Compute a bounding box.

◆ compute_average()

MAQUINA_EXPORT Imath::V3f maquina::compute_average ( const gsl::span< const Imath::V3f > &  points,
const gsl::span< const uint32_t > &  indices 
)

Compute the average of indexed points.

◆ compute_average_m44()

MAQUINA_EXPORT Imath::M44f maquina::compute_average_m44 ( const gsl::span< const Imath::V3f > &  deform_p,
const gsl::span< const Imath::V3f > &  ref_p,
const gsl::span< const uint32_t > &  indices,
bool  orthonormal 
)

◆ compute_vertex_space() [1/2]

MAQUINA_EXPORT maquina::BufferM33f maquina::compute_vertex_space ( const Mesh deformed,
const Mesh reference 
)

◆ compute_vertex_space() [2/2]

MAQUINA_EXPORT Imath::M33f maquina::compute_vertex_space ( int  p,
const gsl::span< const Imath::V3f > &  deform_p,
const Imath::V3f deform_n,
const gsl::span< const Imath::V3f > &  ref_p,
const Imath::V3f ref_n,
const maquina::SpanSpan< const uint32_t, const uint32_t > &  vertex_to_vertex,
std::vector< Imath::V3f, tbb::scalable_allocator< Imath::V3f > > &  a,
std::vector< Imath::V3f, tbb::scalable_allocator< Imath::V3f > > &  b 
)

◆ compute_weighted_vertex_space()

MAQUINA_EXPORT Imath::M33f maquina::compute_weighted_vertex_space ( int  p,
const gsl::span< const Imath::V3f > &  deform_p,
const Imath::V3f deform_n,
const gsl::span< const Imath::V3f > &  ref_p,
const Imath::V3f ref_n,
const std::vector< float > &  weights,
const maquina::SpanSpan< const uint32_t, const uint32_t > &  vertex_to_vertex,
std::vector< Imath::V3f, tbb::scalable_allocator< Imath::V3f > > &  a,
std::vector< Imath::V3f, tbb::scalable_allocator< Imath::V3f > > &  b 
)

◆ configure_tty()

MAQUINA_EXPORT void maquina::configure_tty ( )

Configure the process console to accept utf-8 and ANSI colors.

◆ constrain_node()

MAQUINA_EXPORT void maquina::constrain_node ( Node constraint,
Node node 
)

Constrain the node to the constraint.

Returns true if the constraint has been setted.

Parameters
constraintThe constraint layer
nodeThe node to be constrain

◆ controller()

MAQUINA_EXPORT Node maquina::controller ( const Plug plug)

Return the controller associated to a plug.

◆ controller_plug()

MAQUINA_EXPORT Plug maquina::controller_plug ( const Plug channel_plug)

Return the controller plug driven by channel_plug.

{std::runtime_error,RuntimeError} if no controller plug found.

◆ copy_keys()

MAQUINA_EXPORT Value maquina::copy_keys ( Node anim_layer)

Return a copy of the active key selection in a layer.

Parameters
anim_layerThe working layer

◆ create_tool_geometry()

MAQUINA_EXPORT Node maquina::create_tool_geometry ( const char *  name,
Node parent 
)

Create a geometry node for tools, i-e, not in a document.

◆ create_type_alias()

MAQUINA_EXPORT void maquina::create_type_alias ( const std::string &  previous_type_name,
std::string  new_type_name 
)

Create a type alias. When reading an object of type 'previous_type_name', creates an object of type 'new_class_name'.

◆ critical()

template<typename... Args>
void maquina::critical ( const char *  filename,
int  line,
const char *  function,
const char *  format,
const Args &...  args 
)

Log a critical error message using the Rumba logger.

One could use the convenient RUMBA_LOG_CRITICAL macro.

◆ current_frame()

MAQUINA_EXPORT float maquina::current_frame ( )

Shortcut for the active document current frame.

◆ debug()

template<typename... Args>
void maquina::debug ( const char *  format,
const Args &...  args 
)

Log a debug message using the Rumba logger.

◆ default_rig_value()

MAQUINA_EXPORT Value maquina::default_rig_value ( Plug plug)

Return the default value if available.

Parameters
plugThe plug to get the default rig value

◆ default_value()

MAQUINA_EXPORT Value maquina::default_value ( const maquina::StringView type_name)

Return the default value of a type.

◆ deflate()

MAQUINA_EXPORT std::vector<uint8_t> maquina::deflate ( const uint8_t *  data,
size_t  size 
)

Compress a bunch of binary data with zlib.

◆ delegate_selection()

MAQUINA_EXPORT std::vector<std::shared_ptr<NodeDelegate> > maquina::delegate_selection ( )

Return the active node delegate selection.

That selection includes virtual nodes

◆ delete_animation_graph()

MAQUINA_EXPORT bool maquina::delete_animation_graph ( Node node_to_delete,
bool  undo_stack = true 
)

Delete properly the node animation graph.

Returns true if success or false if the deletion failed.

◆ delete_channels_animation()

MAQUINA_EXPORT void maquina::delete_channels_animation ( std::vector< Plug channels,
bool  all_layers = false 
)

Reset the channels value in their target layer without removing the channel from the layer.

Parameters
channelsThe channels to be deleted
all_layersDelete the animation for all layers

◆ deserialize_nodes()

MAQUINA_EXPORT std::vector<Node> maquina::deserialize_nodes ( std::string  buffer,
Node parent = nullptr,
const std::string &  valid_types = "" 
)

Deserialize the nodes from a string.

Returns the vector of nodes deserialized if the deserialization has succeed.

Parameters
bufferThe buffer to be deserialized
parentIf non null, deserialize nodes with parent has parent
valid_typesIf non empty, use it to check if nodes in the buffer are valid types, if not skip the node

◆ deserialize_pose()

MAQUINA_EXPORT Dict maquina::deserialize_pose ( std::string  buffer)

Deserialize the pose from a string.

Parameters
bufferThe buffer to be deserialized

◆ document()

MAQUINA_EXPORT std::optional<Node> maquina::document ( const std::string &  path,
bool  comparable = false 
)

Return the document node associated to that file path.

true if the filename has been normalized using maquina::comparable_path, false for a regular path.

Parameters
pathThe filename of the document to retrieve

◆ document_info()

MAQUINA_EXPORT Dict maquina::document_info ( const std::wstring &  file)

◆ drm_hostid()

MAQUINA_EXPORT std::string maquina::drm_hostid ( )

Return the system host id.

◆ drm_init()

MAQUINA_EXPORT void maquina::drm_init ( const std::string &  software_name,
const std::wstring &  license_file_path,
const std::string &  license_server 
)

Initialize the drm.

◆ drm_release()

MAQUINA_EXPORT void maquina::drm_release ( )

Release the drm.

◆ drm_status()

MAQUINA_EXPORT std::pair<bool, std::string> maquina::drm_status ( )

Return the drm status.

◆ duplicate() [1/3]

template<typename T >
SparseBuffer<T> maquina::duplicate ( const SparseBufferConst< T > &  a)

◆ duplicate() [2/3]

template<typename T >
Buffer<T> maquina::duplicate ( const BufferConst< T > &  a)

◆ duplicate() [3/3]

MAQUINA_EXPORT Scene maquina::duplicate ( const SceneConst scene,
bool  recursive 
)

Duplicate a scene object.

If false, duplicate the root node and keep the same children nodes. If true, duplicate the root node and the children nodes recursively. The geometries and attributes are never duplicated.

Parameters
sceneThe scene to duplicate

◆ duplicate_layer()

MAQUINA_EXPORT Node maquina::duplicate_layer ( Node layer)

Duplicate the layer and its animation.

Exceptions
std::runtime_errorif the duplication failed.
Parameters
layerThe layer

◆ enable_plug_listener()

MAQUINA_EXPORT void maquina::enable_plug_listener ( bool  enable)

If enable is false, stop flushing the plug listener handlers.

◆ end_profiling()

MAQUINA_EXPORT std::vector<std::pair<std::string, Imath::V2f> > maquina::end_profiling ( )

Stop the interactive profiling session.

Returns a plug full path and the time in milliseconds spent in each evaluated plugs. The list is not sorted.

◆ error()

template<typename... Args>
void maquina::error ( const char *  format,
const Args &...  args 
)

Log an error message using the Rumba logger.

One could use the convinent RUMBA_LOG_ERROR macro.

◆ expand_string()

MAQUINA_EXPORT std::wstring maquina::expand_string ( const wchar_t *  path)

Expand a string containing

◆ export_plug_animation()

MAQUINA_EXPORT void maquina::export_plug_animation ( const std::vector< Plug > &  plugs,
const std::wstring &  filepath,
bool  single_layer = false,
const std::function< bool(float, const char *)> &  progress = nullptr,
const std::string_view &  comments = "",
const std::string_view &  tags = "",
float  first_frame_clip = 0,
float  last_frame_clip = 0 
)

Save the layer setup and plugs animation in a file.

Exceptions
std::runtime_errorin case of writing errors.
Parameters
plugsThe plugs with the values or the animation to save
filepathThe file path, the extension should be ".rumbaanim"
single_layerExport the animation in a single layer, bake the plugs animation if needed
progressProgress callback
commentsThe commentaries (utf-8)
tagsThe tags, coma separated (utf-8)
first_frame_clipIf first_frame_clip<last_frame_clip, export only the [first_frame_clip, last_frame_clip] interval.

◆ export_plug_values()

MAQUINA_EXPORT void maquina::export_plug_values ( const std::vector< Plug > &  plugs,
const std::wstring &  filepath,
const std::string_view &  comments = "",
const std::string_view &  tags = "" 
)

Save the plugs values in a file.

Exceptions
std::runtime_errorin case of writing errors.
Parameters
plugsThe plugs with the values or the animation to save
filepathThe file path, the extension should be ".rumbapose"
commentsThe commentaries (utf-8)
tagsThe tags, coma separated (utf-8)

◆ export_settings()

MAQUINA_EXPORT void maquina::export_settings ( const std::wstring &  filepath)

Save workspace settings to a file.

Exceptions
std::runtime_errorin case of writing errors.
Parameters
filepathPath to the output file.

◆ extract_channel_path()

MAQUINA_EXPORT bool maquina::extract_channel_path ( const std::string &  channel_path,
std::string &  asset_path,
std::string &  ctrl_path,
std::string &  plug,
std::string &  subchannel 
)

Parse the channel path and extract the asset, controller, plug and subchannel strings.

Returns false if the channel path is invalid.

◆ extract_pose()

MAQUINA_EXPORT Dict maquina::extract_pose ( const std::vector< std::string > &  channels,
float  frame 
)

Extract a pose from a selection of plugs.

Returns the extracted pose

Parameters
channelsThe channels to extract the pose from
frameThe frame to extract the pose

◆ file_default_directory()

MAQUINA_EXPORT std::string maquina::file_default_directory ( const std::string_view &  file_type)

Get the directory associated to the file type.

◆ file_exists()

MAQUINA_EXPORT bool maquina::file_exists ( const wchar_t *  file)

Return true if a file exist.

◆ file_extension()

MAQUINA_EXPORT std::string maquina::file_extension ( const wchar_t *  file)

Return a file extension.

◆ file_filter()

MAQUINA_EXPORT const FileFilters& maquina::file_filter ( const std::string &  name)

Get the file filters using a file type name.

◆ file_name()

MAQUINA_EXPORT std::wstring maquina::file_name ( const wchar_t *  file)

Return a file name.

◆ flatten_group()

MAQUINA_EXPORT Node maquina::flatten_group ( Node layer_group,
FlattenMode  mode = FlattenMode::Union_Keys,
int  all_frames_interval = 1,
int  all_frames_offset = 0,
int  all_frames_tangents_mode = 1 
)

Flatten a group layer.

Parameters
layer_groupThe layer group to be flatten
modeThe flatten mode, unifying the keys by default
all_frames_intervalIn All_Frames mode, bakes frames every all_frames_interval.
all_frames_offsetIn All_Frames mode, bakes every frames matching (frameall_frames_interval) == all_frames_offset.
all_frames_tangents_modeThe tangent mode to set on keys, 0 for linear, 1 for auto, 3 for spline, 4 for flat, 5 for step

◆ flatten_layer()

MAQUINA_EXPORT void maquina::flatten_layer ( Node layer,
Node dest_layer,
FlattenMode  mode = FlattenMode::Union_Keys,
int  all_frames_interval = 1,
int  all_frames_offset = 0,
int  all_frames_tangents_mode = 1 
)

Flatten a layer into the previous one.

Parameters
layerThe layer to be flatten
dest_layerThe destination layer
modeThe flatten mode, unifying the keys by default
all_frames_intervalIn All_Frames mode, bakes frames every all_frames_interval.
all_frames_offsetIn All_Frames mode, bakes every frames matching (frameall_frames_interval) == all_frames_offset.
all_frames_tangents_modeThe tangent mode to set on keys, 0 for linear, 1 for auto, 3 for spline, 4 for flat, 5 for step

◆ flush_observers()

MAQUINA_EXPORT void maquina::flush_observers ( )

Make sure all the observers have been called.

◆ frame_camera()

MAQUINA_EXPORT void maquina::frame_camera ( maquina::NodeDelegate camera,
const std::vector< std::shared_ptr< maquina::NodeDelegate >> &  selection 
)

Move a camera to contain a node selection.

◆ get_orthogonal_vectors()

MAQUINA_EXPORT void maquina::get_orthogonal_vectors ( const Imath::V3d fx,
Imath::V3d fy,
Imath::V3d fz 
)

◆ getenv_w()

MAQUINA_EXPORT std::wstring maquina::getenv_w ( const char *  name)

Return the content of an environment variable.

◆ group_child_layers()

MAQUINA_EXPORT void maquina::group_child_layers ( Node layer_group,
std::vector< Node > &  layers,
const char *  layer_type,
bool  recursive = false 
)

◆ grow_component_selection()

MAQUINA_EXPORT void maquina::grow_component_selection ( bool  grow)

Grow or shrink the current component selection.

◆ grow_edge_loop()

MAQUINA_EXPORT void maquina::grow_edge_loop ( bool  grow)

Grow or shrink the current edge loop selection.

◆ has_active_document()

MAQUINA_EXPORT bool maquina::has_active_document ( )

Return true if there is an active Document node.

◆ has_animated_channel()

MAQUINA_EXPORT bool maquina::has_animated_channel ( Plug animated_plug)

Check if the animated plug has an animated channel.

Returns True if the plug has an animated channel.

Parameters
animated_plugThe asset plug

◆ has_animated_plug()

MAQUINA_EXPORT bool maquina::has_animated_plug ( const Plug plug)

Check if the plug has an animated plug.

Returns True if the plug has an animated plug.

Parameters
plugThe asset plug

◆ has_animated_plug_in_layer()

MAQUINA_EXPORT bool maquina::has_animated_plug_in_layer ( const Plug plug,
Node layer 
)

Check if the plug has an animated plug in the layer.

Returns True if the plug has an animated plug in the layer.

Parameters
plugThe asset plug
layerThe layer

◆ has_component_selection()

MAQUINA_EXPORT bool maquina::has_component_selection ( )

Return true if there is an active component selection.

◆ has_controller()

MAQUINA_EXPORT bool maquina::has_controller ( const Plug plug)

Test if a controller is associated to a plug.

◆ has_loader()

MAQUINA_EXPORT bool maquina::has_loader ( const std::wstring &  filepath)

Is there a loader for this file type ?

returns whether this file's extension can be loaded

Parameters
filepathThe file path

◆ has_python()

MAQUINA_EXPORT bool maquina::has_python ( )

Return true if Python is available.

◆ has_tag() [1/2]

MAQUINA_EXPORT bool maquina::has_tag ( const std::string &  tags,
const char *  tag 
)

Check a tag exist in a comma separate tag list.

◆ has_tag() [2/2]

MAQUINA_EXPORT bool maquina::has_tag ( const Node node,
const char *  tag 
)

Check a tag exist in a TransformNode.

◆ has_target_layer()

MAQUINA_EXPORT bool maquina::has_target_layer ( const Plug plug)

Check if the plug has a layer that can receive the plug animation.

Parameters
plugThe asset plug

◆ hash_24() [1/2]

int maquina::hash_24 ( const uint8_t *  key,
size_t  length 
)
inline

◆ hash_24() [2/2]

int maquina::hash_24 ( const std::string &  str)
inline

◆ heat_geodesic()

MAQUINA_EXPORT std::vector<float> maquina::heat_geodesic ( const maquina::Mesh mesh,
const Imath::M44f local_to_ellipsoid,
const Imath::V3f source,
const float  max_dist = 1.f,
const float  dt_multiplier = 1.f,
const float  bound_blend = 0.5f 
)

Approximate geodesic distance through the heat method (cf https://www.cs.cmu.edu/~kmcrane/Projects/HeatMethod/index.html).

Use the Heat method on the given mesh to approximate the geodesic distance to the given source point (in deformed world space). By giving the deformed_space_inv transform, one can specify the deformed world space in which the distance has to be computed. Returns the geodesic distance in ellipsoid space, capped to max_dist. Additional Heat method parameters can also specified: the time factor for heat diffusion solving, as well as the interpolation factor between Neumann and Dirichlet boundary conditions.

◆ ik_3_joints()

MAQUINA_EXPORT void maquina::ik_3_joints ( const Imath::V3d p0,
const Imath::V3d p1,
const Imath::V3d p2,
const Imath::V3d goal,
const Imath::V3d normal,
Imath::Quatd r0,
double &  a1,
Imath::V3d axis1,
bool  negate_normal = false 
)
Parameters
p0The first ik chain position
p1The second ik chain position
p2The third ik chain position
goalThe third ik chain goal position
normalThe ik plan normal, normal_original.dot((p0-p1).cross(p2-p1)) must be >= 0. Must be normalized.
a1The rotation to apply to the first joint matrix
axis1The delta angle in radian to apply to the second joint around axis1
negate_normalThe second joint rotation axis expressed in the same space than p0, p1, p2

◆ imath_rotate_order()

Imath::Eulerd::Order maquina::imath_rotate_order ( RotateOrder  ro)
inline

Convert a RotateOrder in Imath::Eulerd::Order.

◆ import_plug_animation()

MAQUINA_EXPORT bool maquina::import_plug_animation ( const std::vector< Plug > &  plugs,
const std::wstring &  filename,
const std::vector< std::string > &  layers_to_import 
)

Import an animation from a file.

Returns true if at least one channel has been imported. Make sure to call modify_begin() before to call this function. The layer structure is added to the active document layers. The animation is then loaded in the new layers. The first new layer is set in 'blend' mode in order to override the old animation.

Exceptions
std::runtime_errorin case of reading errors.
Parameters
plugsThe channels to import from the file. If empty, imports everything.
filenameThe file path, the extension should be ".rumbaanim"
layers_to_importThe layers to import path list. Paths are '/' separated layer names. If empty, import all the layers.

◆ import_settings()

MAQUINA_EXPORT void maquina::import_settings ( const std::wstring &  filepath)

Import workspace settings from a file.

Exceptions
std::runtime_errorin case of readin errors.
Parameters
filepathPath to the input file.

◆ in_animated_layers()

MAQUINA_EXPORT std::vector<Node> maquina::in_animated_layers ( const Plug plug,
bool  skip_disabled = true 
)

Return the animation layers that are modifying this plug.

Returns the animation layers modifying this plug.

Parameters
plugThe asset plug
skip_disabledIf true skip the disabled layers

◆ inflate()

MAQUINA_EXPORT std::vector<uint8_t> maquina::inflate ( const uint8_t *  data,
size_t  size 
)

Uncompress a bunch of binary data with zlib.

◆ info()

template<typename... Args>
void maquina::info ( const char *  format,
const Args &...  args 
)

Log an informative message using the Rumba logger.

◆ init_crash_handler()

MAQUINA_EXPORT void maquina::init_crash_handler ( const std::string &  message,
bool  send_report,
const std::wstring &  app_name,
const std::wstring &  app_version,
const std::string &  recovery_file_extension,
const std::string &  post_dump_url 
)

Init the crash handler with the message to attach to the crash reports.

◆ initialize()

MAQUINA_EXPORT void maquina::initialize ( )

When the Rumba Engine is embedded in an application, this function should be called before any Rumba API calls.

◆ insert_key()

MAQUINA_EXPORT int maquina::insert_key ( const Plug plug,
float  t,
float  v 
)

◆ intersect_ray_sphere()

MAQUINA_EXPORT int maquina::intersect_ray_sphere ( const Imath::V3d o,
const Imath::V3d d,
const Imath::V3d c,
float  r,
float &  t0,
float &  t1 
)

Compute the intersections between an infinit ray and a sphere.

Returns the number of intersections (0, 1 or 2) ray_o is any position on the ray ray_d is any ray vector (doesn't have to be normalized) sphere_c is the sphere center sphere_r is the sphere radius

First intersection position is : p0 = ray_o + ray_d*t0 Second intersection position is : p1 = ray_o + ray_d*t1

◆ is_demo_mode()

MAQUINA_EXPORT bool maquina::is_demo_mode ( )

Test if Rumba/Guerilla is in demo mode.

Returns true if Rumba/Guerilla is running in demo mode.

◆ is_identity()

template<class T >
bool maquina::is_identity ( const Imath::Matrix44< T > &  m)
inline

Returns true if the matrix is the identity.

◆ is_left()

MAQUINA_EXPORT bool maquina::is_left ( Node asset,
const std::string &  name 
)

Return true if the name is left using the asset mirroring rules.

◆ is_modifying()

MAQUINA_EXPORT bool maquina::is_modifying ( )

Return true if modify_begin has been called but not modify_end yet.

◆ is_paste_valid()

MAQUINA_EXPORT PasteType maquina::is_paste_valid ( const Value to_paste,
const std::vector< std::pair< std::string, std::string > > &  matched_channels,
Node dest_layer 
)

Test if the targeted channels are open to be modified by the clipboard in a layer.

Parameters
to_pasteThe values to be pasted
matched_channelsThe matching channels
dest_layerThe destination layer

◆ is_picking()

MAQUINA_EXPORT bool maquina::is_picking ( )

Return true if the picking is started.

◆ is_rig_mode_on()

MAQUINA_EXPORT bool maquina::is_rig_mode_on ( )

Returns true if the rig mode is active, false otherwise.

◆ is_right()

MAQUINA_EXPORT bool maquina::is_right ( Node asset,
const std::string &  name 
)

Return true if the name is right using the asset mirroring rules.

◆ join()

MAQUINA_EXPORT std::string maquina::join ( const std::vector< std::string > &  strings,
const StringView sep 
)

Return the concatenation of the strings separated by the optional sep string.

◆ key_layer()

MAQUINA_EXPORT void maquina::key_layer ( Node layer,
float  frame,
bool  default_value = false 
)

Add a key frame on a layer.

Parameters
layerThe layer to key
frameThe frame to key
default_valueSet the default value

◆ last_selected_components()

MAQUINA_EXPORT LastSelectedComponent maquina::last_selected_components ( )

Return the last selected components.

◆ layer_animated_plugs()

MAQUINA_EXPORT void maquina::layer_animated_plugs ( const Node layer,
std::unordered_set< Plug > &  animated_plugs,
bool  only_curve = true,
bool  recursive = true 
)

Return the list of animated plugs in the layer.

Note
It is possible to ask only for plugs connected to an animation curve, or to ask a recursion on children layers.

◆ lazy_scene_child()

MAQUINA_EXPORT std::shared_ptr<LazySceneChildResult> maquina::lazy_scene_child ( const SceneConst scene,
const std::string &  path,
bool  shapes_only = false 
)

Return the child scene node matching the path or if not found the only one matching the final path name.

If no child is found or no child match the path but multiple chidren are named with the final path name, return nullptr

◆ lerp() [1/2]

MAQUINA_EXPORT Imath::M44f maquina::lerp ( const Imath::M44f a,
const Imath::M44f b,
float  w 
)

Interplate two matrices.

w is the blend weight. If w is 0, a is returned, if 1, b is returned, otherwise a linear interpolation is computed. The scale, shear and translation components are linearly interpolated. The rotation is interpolated using the shortest quaternion linear interpolation.

◆ lerp() [2/2]

MAQUINA_EXPORT Imath::M44d maquina::lerp ( const Imath::M44d a,
const Imath::M44d b,
double  w 
)

◆ list_directory_files()

MAQUINA_EXPORT bool maquina::list_directory_files ( const wchar_t *  directory,
std::vector< std::wstring > &  files,
bool  relative = false 
)

◆ load_animation_pose()

MAQUINA_EXPORT Dict maquina::load_animation_pose ( const std::wstring &  filename)

Import the animation pose from a file, in this case the value of the pose is not relevant.

Returns the animation pose.

Parameters
filenameThe file path, the extension should be ".rumbaanim"

◆ load_document()

MAQUINA_EXPORT void maquina::load_document ( const std::string_view &  path,
const ProgressCallback progress = {} 
)

Open a new Rumba/Guerilla project.

Exceptions
std::runtime_errorif the file can't be loaded.
Parameters
pathThe file path of the document to load
progressThe optional progress object to track the loading progression

◆ load_node()

MAQUINA_EXPORT Node maquina::load_node ( Node root,
const std::wstring &  filepath,
const std::string &  root_name = "",
const ProgressCallback progress = {} 
)

Load the content of a file into the project.

Load the file content inside the root node. Any supported file format (.rumbanode/.guerillanode and .abc right now) can be loaded.

Exceptions
std::runtime_errorif the file can't be loaded.
Parameters
rootThe document node where to add the file content
filepathThe file path
root_nameSome file format (like alembic) have to gather the file content into a single node. In that case, root_name is the root node name of the file content. If root_name is empty, the filename is used.
progressThe optional progress object to track the loading progression

◆ load_plugins()

MAQUINA_EXPORT void maquina::load_plugins ( const std::vector< std::wstring > &  plugin_directories)

Load all the Rumba plug-ins from directories.

◆ load_pose()

MAQUINA_EXPORT Dict maquina::load_pose ( const std::wstring &  filename)

Import the plugs values from a file.

Returns the pose.

Parameters
filenameThe file path, the extension should be ".rumbapose"

◆ local_to_wstring()

MAQUINA_EXPORT std::wstring maquina::local_to_wstring ( const char *  str)

Convert a string in the default system charset into a std::wstring.

◆ manipulator_controller()

MAQUINA_EXPORT Node maquina::manipulator_controller ( Node manipulator)

Get the controller related to this manipulator.

◆ match_channels()

MAQUINA_EXPORT std::vector< std::pair<std::string, std::string> > maquina::match_channels ( const Value to_match)

Return the best match between the channels to be pasted and the active selection.

Parameters
to_matchThe channels to match

◆ match_to_channels()

MAQUINA_EXPORT std::pair<std::vector< std::pair<std::string, std::string> >, bool> maquina::match_to_channels ( const std::unordered_set< std::string > &  channels_to_match,
const std::unordered_set< std::string > &  selected_channels,
MatchMirrorMode  mirror_mode 
)

Return the best match between the channels to be pasted and the active selection.

Parameters
channels_to_matchThe channels to match
selected_channelsSelected channels
mirror_modeThe mirror mode to use

◆ matching_pose()

MAQUINA_EXPORT Dict maquina::matching_pose ( const Dict pose,
const std::vector< std::string > &  channels,
MatchMirrorMode  mirror_mode 
)

Match a pose to a set of channels.

Returns a new pose that match to the set of channels

Parameters
poseThe pose to match
channelsThe channels to be matched
mirror_modeThe mirror mode to use

◆ media_root()

MAQUINA_EXPORT maquina::Node maquina::media_root ( maquina::Node document,
bool  undo_stack 
)

Return the document media root node.

◆ modify_abort()

MAQUINA_EXPORT bool maquina::modify_abort ( )

Cancel and rollback current modification.

Returns true if success or false if there is no active modification or the modification stack is empty.

◆ modify_begin()

MAQUINA_EXPORT void maquina::modify_begin ( const char *  modification_name,
const gsl::span< const float > &  interactive_frames = {} 
)

Begin a modification of the current document.

Parameters
modification_nameThe name to display in the UI for this modification.
interactive_framesIf the modification is interactive, precise which frame of the animation to update during the intteraction. By default, only the current frame is updated.

◆ modify_curve_begin()

MAQUINA_EXPORT void maquina::modify_curve_begin ( const char *  modification_name)

Begin a modification of the current document.

◆ modify_end()

MAQUINA_EXPORT bool maquina::modify_end ( )

End a modification of the current document.

Returns true if success or false if there is no active modification or the modification stack is empty.

◆ move_layer()

MAQUINA_EXPORT void maquina::move_layer ( Node layer,
int  dest_id 
)

Re-order layers.

Parameters
layerThe layer to move
dest_idThe destination id

◆ mul_dir()

template<class V , class M >
V maquina::mul_dir ( const V &  src,
const M &  m 
)
inline

A faster alternative to multiply a direction by a 4x4 matrix, ignoring the homogeneous normalization.

◆ mul_pos()

template<class V , class M >
V maquina::mul_pos ( const V &  src,
const M &  m 
)
inline

A faster alternative to multiply a position by a 4x4 matrix, ignoring the homogeneous normalization.

◆ new_document()

MAQUINA_EXPORT void maquina::new_document ( )

Close the current documents and create a new document.

◆ node_asset()

MAQUINA_EXPORT std::optional<Node> maquina::node_asset ( const Node node)

Return the asset node associated with another node.

The function checks first the node itself and its parent for a node of type "Asset", then, if the node is in a DeformLayer, returns the asset associated to that layer.

◆ notify_picking()

MAQUINA_EXPORT void maquina::notify_picking ( const std::string_view &  node_delegate_path)

Call the picking callback.

◆ operator!=() [1/4]

template<class C , class STDS >
bool maquina::operator!= ( const C *  str,
const StringViewBase< C, STDS > &  sv 
)
inlinenoexcept

◆ operator!=() [2/4]

template<class C , class STDS >
bool maquina::operator!= ( const StringViewBase< C, STDS > &  sv,
const C *  str 
)
inlinenoexcept

◆ operator!=() [3/4]

template<class C , class STDS >
bool maquina::operator!= ( const StringViewBase< C, STDS > &  sv,
const STDS &  s 
)
inlinenoexcept

◆ operator!=() [4/4]

template<class C , class STDS >
bool maquina::operator!= ( const STDS &  s,
const StringViewBase< C, STDS > &  sv 
)
inlinenoexcept

◆ operator<()

template<class C , class STDS >
bool maquina::operator< ( const StringViewBase< C, STDS > &  a,
const StringViewBase< C, STDS > &  b 
)
inlinenoexcept

◆ operator<<()

template<class _CharT , class _Traits , class C , class STDS >
std::basic_ostream<_CharT, _Traits>& maquina::operator<< ( std::basic_ostream< _CharT, _Traits > &  os,
const StringViewBase< C, STDS > &  sv 
)

◆ operator==() [1/4]

template<class C , class STDS >
bool maquina::operator== ( const C *  str,
const StringViewBase< C, STDS > &  sv 
)
inlinenoexcept

◆ operator==() [2/4]

template<class C , class STDS >
bool maquina::operator== ( const StringViewBase< C, STDS > &  sv,
const C *  str 
)
inlinenoexcept

◆ operator==() [3/4]

template<class C , class STDS >
bool maquina::operator== ( const StringViewBase< C, STDS > &  sv,
const STDS &  s 
)
inlinenoexcept

◆ operator==() [4/4]

template<class C , class STDS >
bool maquina::operator== ( const STDS &  s,
const StringViewBase< C, STDS > &  sv 
)
inlinenoexcept

◆ parallel_for()

MAQUINA_EXPORT void maquina::parallel_for ( uint32_t  first,
uint32_t  last,
uint32_t  batch_size,
const std::function< void(uint32_t first, uint32_t last)> &  function 
)

Perform a for loop using threads.

Parameters
firstThe first index of the loop
lastThe last index of the loop (exclusive)
batch_sizeAn indicative size of the indices batch a thread should compute at each call
functionThe compute function to call in parallel, with its first and last (exclusive) indices to compute

◆ parent_path()

MAQUINA_EXPORT std::wstring maquina::parent_path ( const wchar_t *  file)

Return a file parent path.

◆ paste_keys()

MAQUINA_EXPORT void maquina::paste_keys ( const Value to_paste,
const std::vector< std::pair< std::string, std::string > > &  matched_channels,
Node dest_layer,
float  frame_in,
float  frame_out,
float  to_frame,
PasteMode  mode = PasteMode::Merge,
PasteType  type = PasteType::Hard 
)

Paste values onto matching channels in a targeted layer.

frame_in and frame_out are used in Replace and Insert modes only. frame_in and frame_out define a range in the input curve time space. In Replace mode, the keys of the destination curve in the interval [frame_in+delta, frame_out+delta] will be erased before the paste operation. In Insert mode, an empty interval will be inserted in [frame_in+delta, frame_out+delta] before the paste operation.

Parameters
to_pasteThe values to be pasted
dest_layerThe destination layer
frame_inStarting frame of the pasted values
frame_outEnding frame of the pasted values
to_frameDestination frame in the destination layer
modePaste mode, merge by default
typePaste type, hard by default

◆ paste_keys_on_curve()

MAQUINA_EXPORT void maquina::paste_keys_on_curve ( Node anim_curve_node,
const AnimCurve curve,
float  frame_in,
float  frame_out,
float  to_frame,
PasteMode  mode = PasteMode::Merge 
)

Paste the curve keys into an animation curve node.

frame_in and frame_out are used in Replace and Insert modes only. frame_in and frame_out define a range in the input curve time space. In Replace mode, the keys of the destination curve in the interval [frame_in+delta, frame_out+delta] will be erased before the paste operation. In Insert mode, an empty interval will be inserted in [frame_in+delta, frame_out+delta] before the paste operation.

Parameters
anim_curve_nodeThe destination animation curve node
curveThe input curve with the keys to paste
frame_inStarting frame of the input range, in the input curve's time space
frame_outEnding frame of the input range, in the input curve's time space
to_frameDestination frame in the destination curve
modePaste mode, merge by default

◆ path_variables()

MAQUINA_EXPORT const std::vector<std::pair<std::string, std::wstring> >& maquina::path_variables ( )

Return the currently registered path variables.

Path variables are pairs (VARIABLE,path). Variables can be used inside document path like this : "$(VARIABLE)/local_path/file.ext"

◆ pick()

MAQUINA_EXPORT void maquina::pick ( const std::function< void(const std::optional< std::string_view > &path)> &  picking_callback)

Start the picking process: register a function to call the next time a node delegate is selected or the picking process aborted.

The next selected node won't be selected. When the callback is called, nd_path is empty if the picking has been aborted or it is the path of the selected node delegate. Once a node is picked, the picking process is stopped. The picking process is also stopped if a modification ends.

◆ plug_node()

MAQUINA_EXPORT Node maquina::plug_node ( const Plug plug)

Get a plug node.

◆ preprocess_shader_code()

MAQUINA_EXPORT std::string maquina::preprocess_shader_code ( std::string  code)

◆ project_directory()

MAQUINA_EXPORT std::wstring maquina::project_directory ( )

Return the project directory.

This directory is set by the user to a local filesystem path. It is used to prefix a relative file path and turn it into a local filesystem path.

◆ project_path()

MAQUINA_EXPORT std::wstring maquina::project_path ( const wchar_t *  system_path)

Converts a file system path to a project-relative path.

This function serves as the inverse of system_path(). It attempts to make the provided path relative to the project's directory, simplifying it to its most basic form. If the path cannot be made relative to the current project directory, the function will instead try to make it relative to the longest registered path variable.

Parameters
system_pathThe file system path to be converted, provided as a wide character string.
Returns
A simplified, project-relative path as a wide character string.
Note
It is recommended to use project_path for converting all file system paths that are added to the document to ensure consistency.

◆ read_value()

MAQUINA_EXPORT Value maquina::read_value ( const std::wstring &  file,
const Dict options 
)

Load an object value from a file.

The value can be any kind of Value loaded by a Reader plug-in.

◆ redo()

MAQUINA_EXPORT void maquina::redo ( )

Make a redo step.

◆ reference()

MAQUINA_EXPORT Node maquina::reference ( Node root,
const std::wstring &  filepath,
const std::string &  reference_root_name = "",
const ProgressCallback progress = {} 
)

Reference the content of a file into the project.

Load and reference the file content inside the root node. The content will be read-only, only the root node attributes are mutable. Any supported file format (.rumbanode/.guerillanode and .abc right now) can be referenced.

Exceptions
std::runtime_errorif the file can't be loaded.
Parameters
rootThe document node where to add the file content
filepathThe file path
reference_root_nameSome file format (like alembic) have to gather the file content into a single node. In that case, reference_root_name is the root node name of the file content. If reference_root_name is empty, the filename is used.
progressThe optional progress object to track the loading progression

◆ register_event_callback()

MAQUINA_EXPORT int maquina::register_event_callback ( const std::string_view &  event_type,
std::function< Value(const Value &)>  callback 
)

Register an event callback, returns its ID for unregistering.

Here are the available callbacks:

"document_loaded": triggered once the document has been loaded and set as the active document. "save_prerequisite": triggered before a document is saved. The value is an Array with [filename, doc_path], where filename if the destination file, doc_path, the maquina path of the document node to save. If the event callback returns false, the save operation is canceled. "document_renamed": triggered after a document has been renamed. The value is the maquina path to the renamed document node. The event result is ignored.

◆ register_file_type()

MAQUINA_EXPORT void maquina::register_file_type ( const std::string_view &  name,
FileFilters  file_filters 
)

Register a new file type name with a collection of file filters.

◆ register_shader()

MAQUINA_EXPORT void maquina::register_shader ( std::string  name,
bool  stream,
std::vector< ShaderParam parameters,
std::vector< ShaderProgram programs 
)

Register a new hardware shader.

Hardware shader parameters are passed by a static hardware buffer. The shader must be registered with the description of those parameters. The shader can use up to 4 texture files. The textures are registered in the order of the different binding slots, starting at the binding slot 7. OpenGL Programs are passed in the programs argument. Programs can be raw OpenGL programs or a simplified surface fragment program. In that case, a geometry and vertex programs are provided by the system, the first texture slot, named "normalmap", is automatically reserved for a normalmap.

Parameters
streamThe shader's name
parameterstrue if the shader's parameter buffer is updated many times.
programsThe shader's parameter list The shader's program list

◆ register_shading_node()

MAQUINA_EXPORT void maquina::register_shading_node ( std::string  name,
std::vector< ShaderParam parameters,
ShaderParamType  output_type,
std::string  post_fix = "" 
)
Parameters
parametersThe shader's name
output_typeThe shader's parameter list
post_fixThe type returned by the shading node Post fix of the GLSL function variation

◆ register_shading_token()

MAQUINA_EXPORT void maquina::register_shading_token ( const std::string &  s,
int  token 
)

◆ release()

MAQUINA_EXPORT void maquina::release ( )

When the Rumba Engine is embedded in an application, this function should be called before to leave the application.

◆ remap_attribute()

MAQUINA_EXPORT Scene maquina::remap_attribute ( const SceneConst new_scene,
const SceneConst old_scene,
const SceneConst old_attribute,
const std::string &  attribute_name,
const Shape::Topology attribute_topology,
bool  interpolate_vertex 
)

Remaps an attribute from a deprecated Scene version to a new one.

Note
Only SparseBufferFloat and SparseBufferInt32 attributes, with Shape::vertex and Shape::face topology, are available for now.

◆ remove_channels_from_layer()

MAQUINA_EXPORT void maquina::remove_channels_from_layer ( const std::vector< Plug > &  channels,
Node layer,
bool  undo_stack 
)

Update the animation graph so that these plug channels are not animated anymore in the layer.

If any channel is actually a sub-channel of a value, and the last one to be animated in the layer, then the value will be un-rigged.

Parameters
channelsThe channel
layerThe layer

◆ remove_key()

MAQUINA_EXPORT void maquina::remove_key ( Plug plug,
const float  frame 
)

Remove the key at frame in the active layer.

Parameters
plugThe Plug to remove keys
frameThe frame to remove the key

◆ remove_keys()

MAQUINA_EXPORT void maquina::remove_keys ( Node anim_layer,
bool  normalize = true 
)

Remove the active key selection in a layer.

Parameters
anim_layerThe working layer
normalizeNormalize the resulting curves, true by default

◆ reparent_layers()

MAQUINA_EXPORT void maquina::reparent_layers ( Node parent,
const std::vector< Node > &  layers 
)

Move layers.

Parameters
parentThe new parent
layersLayers to be moved

◆ rig_matrix()

MAQUINA_EXPORT bool maquina::rig_matrix ( Plug plug,
const std::string_view &  srt_class_name = "SRTToTransformNode" 
)

Rig a matrix plug.

Return true if the matrix has been rigged

Parameters
plugThe plug to be rigged
srt_class_nameThe matrix decompositon node class to use, default is "SRTToTransformNode"

◆ same_file()

MAQUINA_EXPORT bool maquina::same_file ( std::string  a,
std::string  b 
)

Return true if the two document paths are pointing the same filesystem file.

Files do not have to exist for the test to succeed. Path are expended, converted in an absolute, normalized form before to be compared. Testing two different paths resolved in the same file through symbolic links will return false. same_file("/a", "\\a") == true same_file("/a", "/a/") == true same_file("/a", "//a") == true same_file("/a/b/../c", "/a/c") == true same_file("/a/b/../c", "/a/c") == true same_file("/A", "/a") == true // on Windows same_file("/A", "/a") == false // on Linux same_file("/a", "/b") == false // With "a" pointing to "b" through a symbolic link

◆ save_default_directory()

MAQUINA_EXPORT void maquina::save_default_directory ( const std::string_view &  file_type,
const std::string_view &  chosen_file_path 
)

Save the last directory used with this file type.

◆ save_recent_file()

MAQUINA_EXPORT void maquina::save_recent_file ( std::string  file_path,
const std::string_view &  setting 
)

Save the file path in a recent file list hold in a setting.

◆ scene_child()

MAQUINA_EXPORT std::vector<maquina::Value> maquina::scene_child ( const std::vector< maquina::Value > &  scene_values,
const std::string &  child_name 
)

◆ scene_geometries()

MAQUINA_EXPORT std::vector<maquina::Value> maquina::scene_geometries ( const std::vector< maquina::Value > &  scene_values)

◆ scene_matrices()

MAQUINA_EXPORT std::vector<maquina::Value> maquina::scene_matrices ( const std::vector< maquina::Value > &  scene_values)

◆ scene_shaders()

MAQUINA_EXPORT maquina::Array maquina::scene_shaders ( const std::vector< maquina::Value > &  scene_values)

◆ scene_user_properties()

MAQUINA_EXPORT std::vector<UserProperty> maquina::scene_user_properties ( const std::vector< maquina::Value > &  scene_values)

◆ scene_visibility()

MAQUINA_EXPORT std::vector<maquina::Value> maquina::scene_visibility ( const std::vector< maquina::Value > &  scene_values)

◆ select()

MAQUINA_EXPORT void maquina::select ( const std::vector< Node > &  nodes,
SelectionMode  mode = SelectionMode::Replace 
)

Update the active selection with a list of nodes according to the selection mode.

Parameters
nodesList of nodes to modify the active selection
modeSelection mode, replace by default

◆ select_delegate()

MAQUINA_EXPORT void maquina::select_delegate ( std::vector< std::string >  paths,
SelectionMode  mode = SelectionMode::Replace 
)

Update the active selection with a list of node paths according to the selection mode.

Parameters
pathsList of node paths to modify the active selection
modeSelection mode, replace by default

◆ select_edge_loop()

MAQUINA_EXPORT void maquina::select_edge_loop ( )

Select an edge loop.

◆ select_sub_component()

MAQUINA_EXPORT void maquina::select_sub_component ( std::vector< GeometryComponentSelection > &&  selection,
SelectionMode  mode = SelectionMode::Replace,
bool  keep_sub_components = true 
)

Update the active sub component selection with a node paths associated to selection weights.

This method modifies the sub component selection of node delegates. The nodes and the selection weights (floats) are passed with a Dict value where the key is the node delegate path and the value is a SparseBufferConstFloat. 0.0 weights means not selected, 1.0 means fully selected.

Parameters
selectionThe list of the node path and the sub component weights
modeSelection mode, replace by default
keep_sub_componentsIf true, keep the current sub component state, if false, clear the sub component of node not present in selection

◆ selected_keys_channels()

MAQUINA_EXPORT std::unordered_set<std::string> maquina::selected_keys_channels ( Node anim_layer)

Return the channels associated with the active key selection in a layer.

◆ selection()

MAQUINA_EXPORT std::vector<Node> maquina::selection ( )

Return the active selected maquina::Node objects.

That selection does not include virtual nodes, see delegate_selection()

◆ selection_paths()

MAQUINA_EXPORT std::vector<std::string> maquina::selection_paths ( )

Return the paths of the active node delegate selection.

◆ serialize_nodes()

MAQUINA_EXPORT std::string maquina::serialize_nodes ( const std::vector< Node > &  nodes,
bool  serialize_external_input_connections = false 
)

Serialize the nodes in a string.

Parameters
nodesNodes to be serialized
serialize_external_input_connectionstrue if the input nodes connections on external plugs must be serialized

◆ serialize_pose()

MAQUINA_EXPORT std::string maquina::serialize_pose ( const Dict pose)

Serialize the pose in a string.

Parameters
poseThe pose with the values to serialize

◆ set_active_document()

MAQUINA_EXPORT void maquina::set_active_document ( Node document)

Set the active Document node.

{std::runtime_error,RuntimeError} if the node is not a Document.

◆ set_animated_plug_value()

MAQUINA_EXPORT void maquina::set_animated_plug_value ( Plug plug,
const Value value,
float  frame,
bool  create_curve,
bool  layer_value = false,
int  tangent_mode = -1 
)

Set a value to plug, regarding the target layer and the current plug animation.

value can be the plug value or an animation curve value to use to animate this plug.

Parameters
plugThe plug to set
valueThe value to set in the plug
frameIf the plug is animated or if create_curve is true, this is the frame where to insert the value in the animation curve.
create_curveIf true, create an animation curve on the plug if no curve already exist.
layer_valueIf true, value is directly stored in the layer curve with no modification. If false, value is expressed as a final channel value, being automatically modified and stored in the curve layer as an intermediate value so the evaluated channel value will be equal to asked value.
tangent_modeThe tangent mode to use fot the new keyframe, or -1 for the tangent mode choosen in the settings

◆ set_current_frame()

MAQUINA_EXPORT void maquina::set_current_frame ( float  frame)

set the current frame

◆ set_document_factory()

MAQUINA_EXPORT void maquina::set_document_factory ( const std::function< maquina::Node()> &  factory)

Set a factory to create document plugin.

◆ set_path_variables()

MAQUINA_EXPORT void maquina::set_path_variables ( const std::vector< std::pair< std::string, std::wstring >> &  path_vars)

Register the path variables.

Path variables are pairs (VARIABLE,path). Variables can be used inside document path like this : "$(VARIABLE)/local_path/file.ext"

◆ set_project_directory()

MAQUINA_EXPORT void maquina::set_project_directory ( const wchar_t *  path)

Set the project directory.

This directory is set by the user to a local filesystem path. It is used to prefix a relative file path and turn it into a local filesystem path.

◆ set_setting()

MAQUINA_EXPORT void maquina::set_setting ( const char *  path,
const Value value 
)

Set a setting value.

Set the setting value using the setting path.

Exceptions
std::runtime_errorWhen the setting is not found.

◆ setting()

MAQUINA_EXPORT Value maquina::setting ( const char *  path)

Get a setting value.

Returns the setting value using the setting path.

Exceptions
std::runtime_errorWhen the setting is not found.

◆ setting_plug()

MAQUINA_EXPORT Plug maquina::setting_plug ( const std::string_view &  path)

Get a setting plug.

Returns the setting plug using the setting path.

Exceptions
std::runtime_errorWhen the setting is not found.

◆ Shape::write_attribute< Buffer< Imath::V2f > >()

MAQUINA_EXTERN_TEMPLATE MAQUINA_EXPORT Buffer<Imath::V2f> maquina::Shape::write_attribute< Buffer< Imath::V2f > > ( const char *  attribute_name,
Topology  topology 
)

◆ Shape::write_attribute< Buffer< Imath::V3f > >()

MAQUINA_EXTERN_TEMPLATE MAQUINA_EXPORT Buffer<Imath::V3f> maquina::Shape::write_attribute< Buffer< Imath::V3f > > ( const char *  attribute_name,
Topology  topology 
)

◆ Shape::write_attribute< Buffer< Imath::V4f > >()

MAQUINA_EXTERN_TEMPLATE MAQUINA_EXPORT Buffer<Imath::V4f> maquina::Shape::write_attribute< Buffer< Imath::V4f > > ( const char *  attribute_name,
Topology  topology 
)

◆ Shape::write_attribute< IndexedBuffer< Imath::V2f > >()

◆ Shape::write_attribute< IndexedBuffer< Imath::V3f > >()

◆ Shape::write_attribute< IndexedBuffer< Imath::V4f > >()

◆ Shape::write_attribute< SparseBuffer< Imath::V2f > >()

◆ Shape::write_attribute< SparseBuffer< Imath::V3f > >()

◆ Shape::write_attribute< SparseBuffer< Imath::V4f > >()

◆ smooth_component_selection()

MAQUINA_EXPORT void maquina::smooth_component_selection ( )

Smooth the component selection.

◆ solve_cubic() [1/2]

MAQUINA_EXPORT int maquina::solve_cubic ( float  a,
float  b,
float  c,
float  d,
float *  roots 
)

Solve a cubic equation.

◆ solve_cubic() [2/2]

MAQUINA_EXPORT int maquina::solve_cubic ( double  a,
double  b,
double  c,
double  d,
double *  roots 
)

Solve a cubic equation.

◆ split()

MAQUINA_EXPORT std::vector<std::string> maquina::split ( const StringView s,
const StringView sep 
)

Return a list of the words in the string, using the sep string as delimiter.

◆ start_profiling()

MAQUINA_EXPORT void maquina::start_profiling ( )

Start an interactive profiling session.

◆ static_assert_cast()

template<class To , class From >
Ptr<To> maquina::static_assert_cast ( const Ptr< From > &  p)
inline

◆ stop_picking()

MAQUINA_EXPORT void maquina::stop_picking ( )

End the picking process, unregister the callback and call it with an empty value to signal the abort.

◆ sub_component_selection()

MAQUINA_EXPORT const std::vector<GeometryComponentSelection>& maquina::sub_component_selection ( )

Return the selected geometry components.

◆ system_path() [1/2]

MAQUINA_EXPORT std::wstring maquina::system_path ( const wchar_t *  path)

Expand a document file path in a file system path.

system_path should be used just before using a document string path against the system API

◆ system_path() [2/2]

MAQUINA_EXPORT std::string maquina::system_path ( const std::string_view &  path)

Expand a document file path in a file system path.

system_path should be used just before using a document string path against the system API

◆ system_path_local()

MAQUINA_EXPORT std::string maquina::system_path_local ( const wchar_t *  path)

Expand a document file path in a file system path.

Use this only with an API which does not support wchar_t.

◆ tags()

TagsIteration maquina::tags ( const std::string_view &  tags_list)

Return a tag iteration from a string with comma, semi-column or space separated tokens.

◆ target_layer()

MAQUINA_EXPORT Node maquina::target_layer ( const Plug plug)

Return the layer receiving the plug animation.

Returns the layer that will receive the animation for this plug.

Parameters
plugThe asset plug

◆ time_warp_keys()

MAQUINA_EXPORT void maquina::time_warp_keys ( Node anim_layer)

Time warp the active key selection using the selection rubberband.

◆ to_log()

MAQUINA_EXPORT std::string maquina::to_log ( const std::wstring &  s)

Convert a wide string in string to use in the logger functions.

◆ tool_selection()

MAQUINA_EXPORT std::vector<std::shared_ptr<NodeDelegate> > maquina::tool_selection ( )

Return the active tool delegate selection.

◆ transform_curve_keys()

MAQUINA_EXPORT void maquina::transform_curve_keys ( const Plug plug,
std::unordered_map< float, float > &  original_to_transformed_keys 
)

◆ transform_keys()

MAQUINA_EXPORT void maquina::transform_keys ( Node anim_layer)

Transform the active key selection using the selection rubberband.

◆ trigger_event()

MAQUINA_EXPORT Array maquina::trigger_event ( const std::string_view &  event_type,
const Value value = Value::default_value 
)

Trigger an event, return an Array value with the triggered event returned values.

◆ tty_colors()

MAQUINA_EXPORT bool maquina::tty_colors ( )

Return true if colors should be used on the tty.

◆ undo()

MAQUINA_EXPORT void maquina::undo ( )

Make a undo step.

◆ undo_blend()

MAQUINA_EXPORT void maquina::undo_blend ( float  undo_blend)

Set the undo blend factor of the last modification.

◆ ungroup_layer()

MAQUINA_EXPORT void maquina::ungroup_layer ( Node layer_group)

Ungroup layer.

Parameters
layer_groupThe group layer

◆ unregister_event_callback()

MAQUINA_EXPORT void maquina::unregister_event_callback ( int  callback_id)

Unregister an event callback.

◆ utf8_to_wstring()

MAQUINA_EXPORT std::wstring maquina::utf8_to_wstring ( const char *  uft8)

Convert an utf-8 string into a std::wstring.

◆ value_to_json_string()

MAQUINA_EXPORT std::string maquina::value_to_json_string ( const maquina::Value value)

◆ warn()

template<typename... Args>
void maquina::warn ( const char *  format,
const Args &...  args 
)

Log a warning message using the Rumba logger.

◆ weighted_sum()

MAQUINA_EXPORT Value maquina::weighted_sum ( const gsl::span< const Value > &  values,
const gsl::span< const double > &  weights,
int  quat_iter = 15,
double  quat_eps = 1e-12 
)

Computes the weighted sum of a set of values.

This function takes a collection of values and their corresponding weights to compute a weighted sum. Both spans must have the same size. If no values are provided, the function returns Value::default_value. If the first value is not interpolable, the function returns the value with the highest weight. The optional parameters control the number of iterations and the convergence criteria for quaternion calculations, if applicable.

Parameters
valuesA span of values to be combined. Must have the same size as weights.
weightsA span of weights corresponding to the values. Must have the same size as values.
quat_iterThe number of iterations for quaternion processing (default is 15).
quat_epsThe convergence threshold for quaternion processing (default is 1e-12).
Returns
The computed weighted sum of the input values, Value::default_value if no values are provided, or the value with the highest weight if the value is not interpolable.
Precondition
values.size() == weights.size()

◆ widget_setting_plug()

MAQUINA_EXPORT maquina::Plug maquina::widget_setting_plug ( const std::string &  setting_name,
const std::string &  widget_name,
const maquina::Value default_value 
)

◆ workspace()

MAQUINA_EXPORT Node maquina::workspace ( )

Return the workspace node.

◆ wstring_to_local()

MAQUINA_EXPORT std::string maquina::wstring_to_local ( const wchar_t *  str)

Convert a std::wstring into a string in the default system charset.

◆ wstring_to_utf8()

MAQUINA_EXPORT std::string maquina::wstring_to_utf8 ( const wchar_t *  str)

Convert a std::wstring into an utf-8 string.

Variable Documentation

◆ Buffer< double >

◆ Buffer< float >

◆ Buffer< int32_t >

◆ Buffer< uint32_t >

◆ Buffer< uint8_t >

◆ BufferConst< double >

◆ BufferConst< float >

◆ BufferConst< int32_t >

◆ BufferConst< uint32_t >

◆ BufferConst< uint8_t >

◆ IndexedBuffer< double >

◆ IndexedBuffer< float >

◆ IndexedBuffer< int32_t >

◆ IndexedBuffer< uint32_t >

◆ IndexedBuffer< uint8_t >

◆ IndexedBufferConst< double >

◆ IndexedBufferConst< float >

◆ IndexedBufferConst< int32_t >

◆ IndexedBufferConst< uint32_t >

◆ IndexedBufferConst< uint8_t >

◆ SparseBuffer< double >

◆ SparseBuffer< float >

◆ SparseBuffer< int32_t >

◆ SparseBuffer< uint32_t >

◆ SparseBuffer< uint8_t >

◆ SparseBufferConst< double >

◆ SparseBufferConst< float >

◆ SparseBufferConst< int32_t >

◆ SparseBufferConst< uint32_t >

◆ SparseBufferConst< uint8_t >