Rumba C++ SDK
maquina::Plug Class Reference

A node plug. More...

#include <Plug.h>

Classes

class  Flags
 
struct  Key
 
class  Outputs
 A Plug accessor to the outputs. More...
 

Public Types

enum  DependencyFlags { Automatic = -2 }
 Dependency flags to pass to add_value_dependency. More...
 
enum  TypeEvaluationMode { TypeEvaluationMode::Default = 0, TypeEvaluationMode::Exact = 1, TypeEvaluationMode::Approximation = 2 }
 The plug's type evaluation modes. More...
 
enum  EvaluationMode { EvaluationMode::Interactive = 0, EvaluationMode::Exact = 1, EvaluationMode::NoEvaluation = 2, EvaluationMode::Rest = 3 }
 The value evaluation modes. More...
 
enum  Status { Status::Default, Status::Overridden, Status::Animated }
 Status of the plug. More...
 

Public Member Functions

 Plug (const char *name, const Value &value, uint32_t flags=0)
 Create a free plug (i.e. not attached to a Node). More...
 
std::string name () const
 Return the plug name. More...
 
std::string full_name () const
 Return the plug full name starting at the workspace node. More...
 
std::string document_path () const
 Returns the path of this plug starting at the document node. More...
 
std::string nice_name () const
 Returns the name of this plug to be displayed in UI (extracted from the 'nice_name' property of the description). More...
 
std::string type_name (TypeEvaluationMode mode=TypeEvaluationMode::Default) const
 Returns the name of the type the plug. More...
 
std::shared_ptr< AttributeDescriptordescription () const
 Returns the plug's description. More...
 
void set_description (const std::string &description, bool undo_stack=false)
 Set the description of this plug. More...
 
void set_default_value (const Value &value)
 Set the default value of this plug. More...
 
Value default_value () const
 Return the default plug value. More...
 
Value rest_value () const
 Return the rest plug value. More...
 
void force_varying (bool force)
 
Value value (const QueryContext &qc=QueryContext::at_current_frame, EvaluationMode mode=EvaluationMode::Interactive) const
 Get the plug value. More...
 
bool as_bool () const
 Returns the plug value as a bool. More...
 
int as_int () const
 Returns the plug value as an integer. More...
 
float as_float () const
 Returns the plug value as a float. More...
 
double as_double () const
 Returns the plug value as a double. More...
 
const std::string & as_string () const
 Returns the plug value as a string. More...
 
std::wstring as_wstring () const
 
const Imath::V2das_V2d () const
 Returns the plug value as a V2d. More...
 
const Imath::V3das_V3d () const
 Returns the plug value as a V3d. More...
 
const Imath::V4das_V4d () const
 Returns the plug value as a V4d. More...
 
const Imath::V2ias_V2i () const
 Returns the plug value as a V2i. More...
 
const Imath::V3ias_V3i () const
 Returns the plug value as a V3i. More...
 
const Imath::V4ias_V4i () const
 Returns the plug value as a V4i. More...
 
const Imath::M44das_M44d () const
 Returns the plug value as a M44d. More...
 
const Imath::Box3fas_Box3f () const
 Returns the plug value as a Box3f. More...
 
const Imath::Color4fas_Color4f () const
 Returns the plug value as a Color4f. More...
 
const Imath::Quatdas_Quatd () const
 Returns the plug value as a Quatd. More...
 
std::shared_ptr< const class UserDataas_user_data () const
 Returns the plug value as a user data. More...
 
void set_value (const Value &value, bool undo_stack=false)
 Set a value. More...
 
void set_value (const Value &value, const PartialInvalidationPtr pi, bool undo_stack=false)
 Set a value along with PartialInvalidation data. More...
 
void set_value (const Value &value, const ModificationContext &mc)
 Set a value. More...
 
void set_value (const Value &value, const ModificationContext &mc, int32_t start, int32_t end)
 Set a value with a custom invalidation range. More...
 
bool can_connect (const Plug &other) const
 Check if the plug can be connected. More...
 
bool depend_on (const gsl::span< const Plug > &plugs) const
 Return true if this plug depends on one of the plugs. More...
 
bool is_connected () const
 Return true if the plug has an input connection. More...
 
bool is_connection_serialized () const
 Return true if the node connection has to be serialized. More...
 
bool is_internal () const
 Return true if this plug should be ignored by users and the UI. More...
 
bool is_channel () const
 Return true if this plug is a channel. A channel is a plug visible and animatable by the animator. More...
 
void set_channel (bool channel)
 Set the channel status of this plug. More...
 
bool is_constant () const
 Return true if the plug value is constant in time. More...
 
bool is_evaluated () const
 Return true if this plug is evaluated. More...
 
bool is_output () const
 Return true if this plug is an output. More...
 
bool is_keyable () const
 Return true if this plug is keyable. More...
 
bool is_main_plug () const
 Return true if the plug is a main plug, i-e, is displayed by default. More...
 
bool is_auto_connect () const
 Return true if the plug connects when a node is dropped over a connection. More...
 
bool is_dynamic () const
 Return true if the plug is dynamic. More...
 
bool is_referenced_dynamic () const
 Return true if the plug is dynamic and comes from a referenced node. More...
 
bool is_animable () const
 Return true if this plug is animable. More...
 
bool is_mutable () const
 Return true if this plug is mutable (i.e. can be modified). More...
 
bool is_referenced_connection () const
 Return true if the input connection has been done in a referenced node. More...
 
Plug::Status status () const
 Return the plug status. More...
 
void connect (const Plug &src, bool undo_stack=false, bool serialize=false)
 Connect src to this plug. More...
 
void disconnect (bool undo_stack=false)
 Disconnect the plug connected into this. More...
 
void disconnect_outputs (bool undo_stack=false)
 Disconnect all the plugs this plug is connected into. More...
 
void add_dynamic_valued_dependency (const Plug &dependence, int32_t time_offset=0, bool undo_stack=false, bool serialize=false)
 
void add_valued_dependency (const Plug &dependence, int32_t index=-1, int32_t time_offset=0, bool undo_stack=false, bool serialize=false)
 
void remove_dynamic_valued_dependency (const Plug &dependence, bool undo_stack=true)
 
void remove_valued_dependency (const Plug &dependence, bool undo_stack=true)
 
void remove_dynamic_valued_dependency (uint32_t index, bool undo_stack=true)
 
void remove_valued_dependency (uint32_t index, bool undo_stack=true)
 
void remove_all_dynamic_valued_dependencies (bool undo_stack=true)
 
void remove_all_valued_dependencies (bool undo_stack=true)
 
std::vector< Plugnotification_dependencies ()
 
void add_notification_dependency (const Plug &dependence, bool serialize=false)
 
void remove_notification_dependency (const Plug &dependence, bool notify=true)
 
void remove_all_notification_dependencies (bool notify=true)
 
std::vector< Plugback_dependencies ()
 
size_t back_dependencies_count ()
 
std::vector< Plugvalued_dependencies ()
 
Plug valued_dependence (int dep_index) const
 
uint32_t valued_dependencies_count () const
 The number of valued dependencies for this plug. More...
 
bool has_valued_dependency (const Plug &plug) const
 
void touch ()
 
void touch (int first_frame, int last_frame, bool rest)
 
void set_to_default ()
 Reset the plug default value flag. More...
 
uint32_t flags () const
 Return the plug flags. More...
 
void set_flags (uint32_t flags)
 Set the plug flags. More...
 
Plug input () const
 Get the input plug. More...
 
Plug input_origin () const
 
Outputs outputs () const
 Return the node plugs iteration. More...
 
std::vector< Plugchannel_plugs () const
 
std::vector< Channelchannels () const
 Return all the plug's channels. More...
 
std::shared_ptr< Channelchannel () const
 If this plug has a single channel, return it, return nullptr otherwise. More...
 
std::shared_ptr< Channelchannel (ChannelType channel_type) const
 Return the specified channel if available, return nullptr otherwise. More...
 
bool has_node () const
 
Node node () const
 
std::vector< Plugwalk_down () const
 Returns the next plugs to visit to traverse the graph from inputs to outputs, stating at this plug. More...
 
bool operator== (const Plug &o) const
 
bool operator!= (const Plug &o) const
 
std::shared_ptr< NodeDelegatenode_delegate () const
 Return a node delegate for this plug. More...
 
std::unordered_map< float, Keykey_frames () const
 Get the plug keys in targeted layer. More...
 
std::unordered_map< float, Keykey_frames_in_layer (const Node &layer) const
 Get the plug keys in the layer. More...
 

Static Public Member Functions

static bool validate_name (const char *plug_name)
 Return true if the name is a valid plug name. More...
 

Public Attributes

void * _plug
 

Static Public Attributes

static const int32_t AllFrames = int32_t(0x80000000)
 

Detailed Description

A node plug.

A Plug is a node attribute. It can hold a Value object.

A Plug can be an input Plug, in that case, another plug can be connected into it and propagate its value in it.

A plug can be an output Plug, in that case, its value is evaluated using dependancies on other plugs and an evaluation function. Output Plugs can't have an input connection.

The Value of a Plug can be :

  • The Plug stored Value
  • The Value of the input connected Plug, for input Plugs.
  • The computed Value for output Plugs.

Member Enumeration Documentation

◆ DependencyFlags

Dependency flags to pass to add_value_dependency.

Enumerator
Automatic 

◆ EvaluationMode

The value evaluation modes.

Enumerator
Interactive 

The value is evaluated using an approximation method. This is fast but this may not return the correct result if the value has complex temporal dependencies.

Exact 

The value is perfectly evaluated.

NoEvaluation 

The value is not evaluated, the last evaluated value is returned.

Rest 

The value is evaluated in rest pose.

◆ Status

enum maquina::Plug::Status
strong

Status of the plug.

Enumerator
Default 

Untouched plug.

Overridden 

Plug is connected to an animation graph and is overridden by a single value.

Animated 

Plug is connected to an animation graph and is overridden by an animated value.

◆ TypeEvaluationMode

The plug's type evaluation modes.

Enumerator
Default 

The name of the default type the plug has been created with.

Exact 

The name of the value type. The value of the plug is evaluated.

Approximation 

The name of the value type. Use the cache value type, the value of the plug is not evaluated.

Constructor & Destructor Documentation

◆ Plug()

maquina::Plug::Plug ( const char *  name,
const Value value,
uint32_t  flags = 0 
)

Create a free plug (i.e. not attached to a Node).

Parameters
nameName of the plug
valueValue of the plug
flagsPlug flags

Member Function Documentation

◆ add_dynamic_valued_dependency()

void maquina::Plug::add_dynamic_valued_dependency ( const Plug dependence,
int32_t  time_offset = 0,
bool  undo_stack = false,
bool  serialize = false 
)

Add a dynamic valued dependence to this plug.

The evaluation function of this plug will receive values from the given dependence plug. The dependence is added at the end of the current dynamic depencency list. {std::runtime_error,RuntimeError} if this plug is not evaluated.

Parameters
dependencethe new dependence plug
undo_stackif true, use a modification to be able to revert this action
serializeif true and undo_stack is false, this dependency will be serialized on save.

◆ add_notification_dependency()

void maquina::Plug::add_notification_dependency ( const Plug dependence,
bool  serialize = false 
)

◆ add_valued_dependency()

void maquina::Plug::add_valued_dependency ( const Plug dependence,
int32_t  index = -1,
int32_t  time_offset = 0,
bool  undo_stack = false,
bool  serialize = false 
)

◆ as_bool()

bool maquina::Plug::as_bool ( ) const

Returns the plug value as a bool.

You must be sure the plug value is an integer, a float or a boolean or you get false.

◆ as_Box3f()

const Imath::Box3f& maquina::Plug::as_Box3f ( ) const

Returns the plug value as a Box3f.

You must be sure the plug value is a Box3f or you will have an empty box.

◆ as_Color4f()

const Imath::Color4f& maquina::Plug::as_Color4f ( ) const

Returns the plug value as a Color4f.

You must be sure the plug value is a Color4f or you will have {0,0,0,0}.

◆ as_double()

double maquina::Plug::as_double ( ) const

Returns the plug value as a double.

You must be sure the plug value is an integer, a float or a boolean or you get 0.0.

◆ as_float()

float maquina::Plug::as_float ( ) const

Returns the plug value as a float.

You must be sure the plug value is an integer, a float or a boolean or you get 0.f.

◆ as_int()

int maquina::Plug::as_int ( ) const

Returns the plug value as an integer.

You must be sure the plug value is an integer, a float or a boolean or you get 0.

◆ as_M44d()

const Imath::M44d& maquina::Plug::as_M44d ( ) const

Returns the plug value as a M44d.

You must be sure the plug value is a M44d or you will have an identity matrix.

◆ as_Quatd()

const Imath::Quatd& maquina::Plug::as_Quatd ( ) const

Returns the plug value as a Quatd.

You must be sure the plug value is a Quatd or you will have an identity quaternion.

◆ as_string()

const std::string& maquina::Plug::as_string ( ) const

Returns the plug value as a string.

You must be sure the plug value is a string or you will have an empty string.

◆ as_user_data()

std::shared_ptr<const class UserData> maquina::Plug::as_user_data ( ) const

Returns the plug value as a user data.

If the underlying time is not a used data, a nullptr is returned.

◆ as_V2d()

const Imath::V2d& maquina::Plug::as_V2d ( ) const

Returns the plug value as a V2d.

You must be sure the plug value is a V2d or you will have {0,0}.

◆ as_V2i()

const Imath::V2i& maquina::Plug::as_V2i ( ) const

Returns the plug value as a V2i.

You must be sure the plug value is a V2i or you will have {0,0}.

◆ as_V3d()

const Imath::V3d& maquina::Plug::as_V3d ( ) const

Returns the plug value as a V3d.

You must be sure the plug value is a V3d or you will have {0,0,0}.

◆ as_V3i()

const Imath::V3i& maquina::Plug::as_V3i ( ) const

Returns the plug value as a V3i.

You must be sure the plug value is a V3i or you will have {0,0,0}.

◆ as_V4d()

const Imath::V4d& maquina::Plug::as_V4d ( ) const

Returns the plug value as a V4d.

You must be sure the plug value is a V4d or you will have {0,0,0,0}.

◆ as_V4i()

const Imath::V4i& maquina::Plug::as_V4i ( ) const

Returns the plug value as a V4i.

You must be sure the plug value is a V4i or you will have {0,0,0,0}.

◆ as_wstring()

std::wstring maquina::Plug::as_wstring ( ) const

◆ back_dependencies()

std::vector<Plug> maquina::Plug::back_dependencies ( )

◆ back_dependencies_count()

size_t maquina::Plug::back_dependencies_count ( )

◆ can_connect()

bool maquina::Plug::can_connect ( const Plug other) const

Check if the plug can be connected.

Check if a loop would be created by connecting those two plugs

Parameters
otherThe plug to be connected

◆ channel() [1/2]

std::shared_ptr<Channel> maquina::Plug::channel ( ) const

If this plug has a single channel, return it, return nullptr otherwise.

◆ channel() [2/2]

std::shared_ptr<Channel> maquina::Plug::channel ( ChannelType  channel_type) const

Return the specified channel if available, return nullptr otherwise.

◆ channel_plugs()

std::vector<Plug> maquina::Plug::channel_plugs ( ) const

◆ channels()

std::vector<Channel> maquina::Plug::channels ( ) const

Return all the plug's channels.

◆ connect()

void maquina::Plug::connect ( const Plug src,
bool  undo_stack = false,
bool  serialize = false 
)

Connect src to this plug.

The value of src will be propagated to this plug.If true, the connection will be serialized in the file. If undo_stack is true, the connection is assumed to be serialized, and serialize is ignored.

Parameters
srcThe source plug
undo_stackIf true, the connection is reverted if an undo is performed. Ignored if undo_stack is true.

◆ default_value()

Value maquina::Plug::default_value ( ) const

Return the default plug value.

The default value is the value the plug has been created with. This is not the REST value (the value with no animation).

◆ depend_on()

bool maquina::Plug::depend_on ( const gsl::span< const Plug > &  plugs) const

Return true if this plug depends on one of the plugs.

Parameters
plugsA list of plug to check for dependency

◆ description()

std::shared_ptr<AttributeDescriptor> maquina::Plug::description ( ) const

Returns the plug's description.

◆ disconnect()

void maquina::Plug::disconnect ( bool  undo_stack = false)

Disconnect the plug connected into this.

If true, the connection is restored if an undo is performed. Ignored if undo_stack is false.

◆ disconnect_outputs()

void maquina::Plug::disconnect_outputs ( bool  undo_stack = false)

Disconnect all the plugs this plug is connected into.

If true, the connections are restored if an undo is performed. Ignored if undo_stack is false.

◆ document_path()

std::string maquina::Plug::document_path ( ) const

Returns the path of this plug starting at the document node.

◆ flags()

uint32_t maquina::Plug::flags ( ) const

Return the plug flags.

◆ force_varying()

void maquina::Plug::force_varying ( bool  force)

Force the value of this plug to be time varying. true if this plug should always be considered as time varying, false if the evaluation engine should determine it iself.

◆ full_name()

std::string maquina::Plug::full_name ( ) const

Return the plug full name starting at the workspace node.

◆ has_node()

bool maquina::Plug::has_node ( ) const

◆ has_valued_dependency()

bool maquina::Plug::has_valued_dependency ( const Plug plug) const

Check if this plug has a valued dependency on another plug.

Parameters
plugThe plug we want to check if is a dependence.
Returns
True if plug is a valued dependence of this plug.

◆ input()

Plug maquina::Plug::input ( ) const

Get the input plug.

Exceptions
std::runtime_errorif the plug is not connected

◆ input_origin()

Plug maquina::Plug::input_origin ( ) const

Get the connection chain origin of a plug.

If this plug has a connection, this method returns the connection chain origin, i.e. the plug without connection that propagate its value to this plug. If this plug is not connected, the real input is the plug itself.

Returns
The connection chain origin of this plug.
Note
Returns this plug if it is not connected.

◆ is_animable()

bool maquina::Plug::is_animable ( ) const

Return true if this plug is animable.

◆ is_auto_connect()

bool maquina::Plug::is_auto_connect ( ) const

Return true if the plug connects when a node is dropped over a connection.

A node should have an input and an output plug for every types the node can auto connect.

◆ is_channel()

bool maquina::Plug::is_channel ( ) const

Return true if this plug is a channel. A channel is a plug visible and animatable by the animator.

◆ is_connected()

bool maquina::Plug::is_connected ( ) const

Return true if the plug has an input connection.

◆ is_connection_serialized()

bool maquina::Plug::is_connection_serialized ( ) const

Return true if the node connection has to be serialized.

◆ is_constant()

bool maquina::Plug::is_constant ( ) const

Return true if the plug value is constant in time.

◆ is_dynamic()

bool maquina::Plug::is_dynamic ( ) const

Return true if the plug is dynamic.

A dynamic plug can be dynamically created or removed, except if it comes from a referenced node.

◆ is_evaluated()

bool maquina::Plug::is_evaluated ( ) const

Return true if this plug is evaluated.

◆ is_internal()

bool maquina::Plug::is_internal ( ) const

Return true if this plug should be ignored by users and the UI.

◆ is_keyable()

bool maquina::Plug::is_keyable ( ) const

Return true if this plug is keyable.

◆ is_main_plug()

bool maquina::Plug::is_main_plug ( ) const

Return true if the plug is a main plug, i-e, is displayed by default.

◆ is_mutable()

bool maquina::Plug::is_mutable ( ) const

Return true if this plug is mutable (i.e. can be modified).

◆ is_output()

bool maquina::Plug::is_output ( ) const

Return true if this plug is an output.

◆ is_referenced_connection()

bool maquina::Plug::is_referenced_connection ( ) const

Return true if the input connection has been done in a referenced node.

◆ is_referenced_dynamic()

bool maquina::Plug::is_referenced_dynamic ( ) const

Return true if the plug is dynamic and comes from a referenced node.

A dynamic plug can be dynamically created or removed, except if it comes from a referenced node.

◆ key_frames()

std::unordered_map<float, Key> maquina::Plug::key_frames ( ) const

Get the plug keys in targeted layer.

◆ key_frames_in_layer()

std::unordered_map<float, Key> maquina::Plug::key_frames_in_layer ( const Node layer) const

Get the plug keys in the layer.

◆ name()

std::string maquina::Plug::name ( ) const

Return the plug name.

◆ nice_name()

std::string maquina::Plug::nice_name ( ) const

Returns the name of this plug to be displayed in UI (extracted from the 'nice_name' property of the description).

◆ node()

Node maquina::Plug::node ( ) const

◆ node_delegate()

std::shared_ptr<NodeDelegate> maquina::Plug::node_delegate ( ) const

Return a node delegate for this plug.

◆ notification_dependencies()

std::vector<Plug> maquina::Plug::notification_dependencies ( )

◆ operator!=()

bool maquina::Plug::operator!= ( const Plug o) const
inline

◆ operator==()

bool maquina::Plug::operator== ( const Plug o) const
inline

◆ outputs()

Outputs maquina::Plug::outputs ( ) const

Return the node plugs iteration.

◆ remove_all_dynamic_valued_dependencies()

void maquina::Plug::remove_all_dynamic_valued_dependencies ( bool  undo_stack = true)

Remove all the dynamic valued dependencies from this plug. Internal dependencies are not removed.

Parameters
undo_stackif true, use a modification to be able to revert this action.

◆ remove_all_notification_dependencies()

void maquina::Plug::remove_all_notification_dependencies ( bool  notify = true)

◆ remove_all_valued_dependencies()

void maquina::Plug::remove_all_valued_dependencies ( bool  undo_stack = true)

◆ remove_dynamic_valued_dependency() [1/2]

void maquina::Plug::remove_dynamic_valued_dependency ( const Plug dependence,
bool  undo_stack = true 
)

Remove a dynamic valued dependence from this plug.

The dependence is identified by the given plug. If there is more than one dependence on the given plug, on the first one is removed (the one with the smallest index). (see modify_begin()).

Parameters
dependencedependence plug
undo_stackif true, use a modification to be able to revert this action. {std::runtime_error,RuntimeError} if this plug is an internal dependency and not a dynamic one.

◆ remove_dynamic_valued_dependency() [2/2]

void maquina::Plug::remove_dynamic_valued_dependency ( uint32_t  index,
bool  undo_stack = true 
)

Remove a valued dependence from this plug.

The dependence is identified by an index.

Parameters
indexindex of the dependence
undo_stackif true, use a modification to be able to revert this action. {std::runtime_error,RuntimeError} if this dependency is internal and not dynamic.

◆ remove_notification_dependency()

void maquina::Plug::remove_notification_dependency ( const Plug dependence,
bool  notify = true 
)

◆ remove_valued_dependency() [1/2]

void maquina::Plug::remove_valued_dependency ( const Plug dependence,
bool  undo_stack = true 
)

◆ remove_valued_dependency() [2/2]

void maquina::Plug::remove_valued_dependency ( uint32_t  index,
bool  undo_stack = true 
)

◆ rest_value()

Value maquina::Plug::rest_value ( ) const

Return the rest plug value.

The rest value is the value of the plug without animation (all animation layers disabled). This is not the DEFAULT value (the initial plug's value).

◆ set_channel()

void maquina::Plug::set_channel ( bool  channel)

Set the channel status of this plug.

◆ set_default_value()

void maquina::Plug::set_default_value ( const Value value)

Set the default value of this plug.

◆ set_description()

void maquina::Plug::set_description ( const std::string &  description,
bool  undo_stack = false 
)

Set the description of this plug.

◆ set_flags()

void maquina::Plug::set_flags ( uint32_t  flags)

Set the plug flags.

◆ set_to_default()

void maquina::Plug::set_to_default ( )

Reset the plug default value flag.

◆ set_value() [1/4]

void maquina::Plug::set_value ( const Value value,
bool  undo_stack = false 
)

Set a value.

◆ set_value() [2/4]

void maquina::Plug::set_value ( const Value value,
const PartialInvalidationPtr  pi,
bool  undo_stack = false 
)

Set a value along with PartialInvalidation data.

◆ set_value() [3/4]

void maquina::Plug::set_value ( const Value value,
const ModificationContext mc 
)

Set a value.

◆ set_value() [4/4]

void maquina::Plug::set_value ( const Value value,
const ModificationContext mc,
int32_t  start,
int32_t  end 
)

Set a value with a custom invalidation range.

The plug is set to the new value, but its back dependent plugs will be invalidated but only on the frame range specified by the user.

◆ status()

Plug::Status maquina::Plug::status ( ) const

Return the plug status.

Check if the plug is overriden, animated or untouched

◆ touch() [1/2]

void maquina::Plug::touch ( )

◆ touch() [2/2]

void maquina::Plug::touch ( int  first_frame,
int  last_frame,
bool  rest 
)

Invalidate a plug sub domain

Parameters
first_frameThe first frame to invalidate.
last_frameThe last frame to invalidate.
restIf true, invalidate the rest value of this plug.

◆ type_name()

std::string maquina::Plug::type_name ( TypeEvaluationMode  mode = TypeEvaluationMode::Default) const

Returns the name of the type the plug.

◆ validate_name()

static bool maquina::Plug::validate_name ( const char *  plug_name)
static

Return true if the name is a valid plug name.

◆ value()

Value maquina::Plug::value ( const QueryContext qc = QueryContext::at_current_frame,
EvaluationMode  mode = EvaluationMode::Interactive 
) const

Get the plug value.

Parameters
qcSpecifies the context of the value query (the frame or the default value)
modeSpecifies the method to use to evaluate the value

◆ valued_dependence()

Plug maquina::Plug::valued_dependence ( int  dep_index) const

The n-th valued dependence. {std::runtime_error,RuntimeError} if n is bigger than the number of dependencies.

◆ valued_dependencies()

std::vector<Plug> maquina::Plug::valued_dependencies ( )

Return all valued dependencies of this plug, ordered by their indices.

◆ valued_dependencies_count()

uint32_t maquina::Plug::valued_dependencies_count ( ) const

The number of valued dependencies for this plug.

◆ walk_down()

std::vector<Plug> maquina::Plug::walk_down ( ) const

Returns the next plugs to visit to traverse the graph from inputs to outputs, stating at this plug.

This function will returns all the output plugs which depend on this plug and all the plugs connected to this plug.

Member Data Documentation

◆ _plug

void* maquina::Plug::_plug

◆ AllFrames

const int32_t maquina::Plug::AllFrames = int32_t(0x80000000)
static

The documentation for this class was generated from the following file: