26 #include <unordered_set> 33 class NodeDelegateRumba;
37 template class MAQUINA_EXPORT std::weak_ptr< maquina::NodeDelegate >;
38 template class MAQUINA_EXPORT std::enable_shared_from_this< maquina::NodeDelegate >;
84 virtual std::shared_ptr<NodeDelegate> parent()
const = 0;
94 virtual std::string path()
const = 0;
97 virtual std::string document_path()
const;
103 virtual bool is_node()
const;
106 virtual std::shared_ptr<class AttributeDescriptor> description()
const;
111 virtual Node node()
const;
126 virtual std::shared_ptr<NodeDelegate> find(
const StringView& path);
135 virtual int child_count()
const;
139 virtual std::shared_ptr<NodeDelegate> child(
const StringView& name);
146 virtual std::shared_ptr<NodeDelegate>
operator*()
const = 0;
147 virtual std::shared_ptr<NodeDelegate> operator->()
const = 0;
157 ChildIterator(
const std::shared_ptr<ChildIteratorDelegate>& impl);
158 std::shared_ptr<NodeDelegate>
operator*()
const;
159 std::shared_ptr<NodeDelegate> operator->()
const;
164 std::shared_ptr<ChildIteratorDelegate> _impl;
170 virtual std::shared_ptr<ChildIteratorDelegate> _children_begin();
172 virtual std::shared_ptr<ChildIteratorDelegate> _children_end();
182 Children(
const std::shared_ptr<NodeDelegate>& node);
188 const std::shared_ptr<NodeDelegate> _node;
212 virtual std::shared_ptr<AttributeDelegate> attribute() = 0;
223 virtual std::shared_ptr<NodeDelegate> owner() = 0;
226 virtual std::string name()
const = 0;
231 virtual bool is_mutable()
const;
236 virtual bool is_visible()
const;
241 virtual bool is_animable()
const;
246 virtual bool accepts_overrides()
const;
251 virtual bool is_overridden()
const;
256 virtual void add_override();
261 virtual void remove_override();
264 virtual Value value(
const QueryContext& qc=QueryContext::at_current_frame)
const = 0;
270 virtual bool is_plug()
const;
275 virtual Plug plug()
const;
278 virtual std::shared_ptr<AttributeDescriptor> description()
const;
282 virtual bool has_node_delegate()
const;
287 virtual std::shared_ptr<NodeDelegate> node_delegate();
300 virtual std::shared_ptr<Observer> create_observer(
const std::function<
void()>& func,
bool in_interactive=
true);
304 virtual std::shared_ptr<Channel> channel();
308 virtual std::shared_ptr<Channel> channel(
const ChannelType sc);
311 virtual std::vector<Channel> channels();
315 virtual int attribute_count()
const;
319 virtual std::shared_ptr<AttributeDelegate> attribute(
const StringView& name);
325 virtual bool add_attribute(
const StringView& name,
const Value& value);
330 virtual std::shared_ptr<Channel> channel(
const ChannelType sc);
333 virtual std::vector<Channel> channels();
336 virtual void channel_plugs( std::unordered_set<Plug>&
set )
const;
346 virtual void animate();
353 virtual std::shared_ptr<AttributeDelegate>
operator*()
const = 0;
354 virtual std::shared_ptr<AttributeDelegate> operator->()
const = 0;
365 std::shared_ptr<AttributeDelegate>
operator*()
const;
366 std::shared_ptr<AttributeDelegate> operator->()
const;
371 std::shared_ptr<AttributeIteratorDelegate> _impl;
377 virtual std::shared_ptr<AttributeIteratorDelegate> _attributes_begin();
379 virtual std::shared_ptr<AttributeIteratorDelegate> _attributes_end();
385 Attributes(
const std::shared_ptr<NodeDelegate>& node ) : node{ node }{}
388 std::shared_ptr<NodeDelegate>
node;
402 virtual bool has_transform()
const;
423 Scale = ScaleX|ScaleY|ScaleZ,
427 Rotate = RotateX|RotateY|RotateZ,
431 Translate = TranslateX|TranslateY|TranslateZ,
432 AllComponents = Scale|Rotate|Translate
437 virtual int mutable_flags()
const;
449 virtual std::unique_ptr<TransformUserData> start_transform(
const QueryContext& qc=QueryContext::at_current_frame);
453 virtual void end_transform(
const ModificationContext& mc=ModificationContext::default_mc(), TransformUserData* user_data =
nullptr);
457 virtual void set_matrix(
const Imath::M44d& matrix,
const ModificationContext& mc = ModificationContext::default_mc(), TransformUserData* user_data =
nullptr);
464 virtual void set_scale(
const Imath::V3d& scale,
const ModificationContext& mc=ModificationContext::default_mc(), TransformUserData* user_data =
nullptr);
476 virtual void set_rotation(
const Imath::V3d& rotation,
const ModificationContext& mc=ModificationContext::default_mc(), TransformUserData* user_data =
nullptr);
484 virtual void set_translation(
const Imath::V3d& translation,
const ModificationContext& mc=ModificationContext::default_mc(), TransformUserData* user_data =
nullptr);
493 virtual std::shared_ptr<Observer> create_transform_observer(
const std::function<
void()>& func,
bool in_interactive=
true);
501 virtual bool is_camera()
const;
505 virtual bool is_locked()
const;
508 virtual void set_locked(
bool locked,
const ModificationContext& mc=ModificationContext::default_mc());
511 virtual bool is_orthographic(
const QueryContext& qc=QueryContext::at_current_frame)
const;
514 virtual float orthographic_width(
const QueryContext& qc=QueryContext::at_current_frame)
const;
517 virtual void set_orthographic_width(
float width,
const ModificationContext& mc=ModificationContext::default_mc());
520 virtual float center_of_interest(
const QueryContext& qc=QueryContext::at_current_frame)
const;
523 virtual void set_center_of_interest(
float coi,
const ModificationContext& mc=ModificationContext::default_mc());
526 virtual float near_clipping_plane(
const QueryContext& qc=QueryContext::at_current_frame)
const;
529 virtual void set_near_clipping_plane(
float near_clipping_plane,
const ModificationContext& mc=ModificationContext::default_mc());
532 virtual float far_clipping_plane(
const QueryContext& qc=QueryContext::at_current_frame)
const;
535 virtual void set_far_clipping_plane(
float far_clipping_plane,
const ModificationContext& mc=ModificationContext::default_mc());
541 virtual float aspect_ratio()
const;
544 virtual std::shared_ptr<NodeDelegate> aim()
const;
547 virtual std::shared_ptr<NodeDelegate> up()
const;
550 virtual std::shared_ptr<Observer> create_camera_observer(
const std::function<
void()>& func,
bool in_interactive=
true);
558 virtual bool has_geometry()
const;
563 virtual Shape geometry()
const;
571 virtual bool is_sculpt()
const;
584 virtual std::shared_ptr<maquina::NodeDelegate::Observer> create_sculpt_observer(
const std::function<
void()>& func,
bool in_interactive);
589 inline NodeDelegate::Children::Children(
const std::shared_ptr<NodeDelegate>& node) : _node(node)
594 return _node->_children_begin();
599 return _node->_children_end();
612 return (*_impl).operator->();
618 return (!_impl || !other._impl) ? _impl == other._impl : (*_impl).operator==(*other._impl);
623 return (!_impl || !other._impl) ? _impl != other._impl : (*_impl).operator!=(*other._impl);
642 return (*_impl).operator->();
648 return (!_impl || !other._impl) ? _impl == other._impl : (*_impl).operator==(*other._impl);
653 return (!_impl || !other._impl) ? _impl != other._impl : (*_impl).operator!=(*other._impl);
std::shared_ptr< AttributeDelegate > operator->() const
Definition: NodeDelegate.h:640
A node attributes iteration.
Definition: NodeDelegate.h:384
Definition: ImathBox.h:71
AttributeIterator(const std::shared_ptr< AttributeIteratorDelegate > &impl)
Definition: NodeDelegate.h:632
AttributeIterator begin() const
Definition: NodeDelegate.h:386
Order
Definition: ImathEuler.h:151
Definition: ImathFrame.h:42
AttributeIterator & operator++()
Definition: NodeDelegate.h:656
Definition: ImathFrame.h:43
ChannelType
Predefined channel types.
Definition: ChannelType.h:23
A node attribute iterator delegate to implement a child iterator in the plugin.
Definition: NodeDelegate.h:142
ChildIterator end() const
Return the end iterator of the children.
Definition: NodeDelegate.h:597
std::shared_ptr< NodeDelegate > operator*() const
Definition: NodeDelegate.h:605
AttributeIterator end() const
Definition: NodeDelegate.h:387
Attributes attributes()
Definition: NodeDelegate.h:391
ChildIterator(const std::shared_ptr< ChildIteratorDelegate > &impl)
Definition: NodeDelegate.h:602
A value with geometrical attributes. Base of all shape values.
Definition: Shape.h:25
std::shared_ptr< NodeDelegate > operator->() const
Definition: NodeDelegate.h:610
This version of the SDK is unstable, i-e, it may change with no warning.
Definition: AddCurveAction.h:20
virtual ~Observer()
Definition: NodeDelegate.h:207
Definition: ModificationContext.h:21
virtual ~NodeDelegate()
Definition: NodeDelegate.h:77
bool operator==(const ChildIterator &other) const
Definition: NodeDelegate.h:615
ChildIterator & operator++()
Definition: NodeDelegate.h:626
bool operator==(const AttributeIterator &other) const
Definition: NodeDelegate.h:645
ChildIterator begin() const
Return the begin iterator of the children.
Definition: NodeDelegate.h:592
bool operator!=(const AttributeIterator &other) const
Definition: NodeDelegate.h:651
An object to keep an observer alive.
Definition: NodeDelegate.h:204
#define MAQUINA_EXPORT
Definition: Export.h:31
A node attribute delegate.
Definition: NodeDelegate.h:216
std::shared_ptr< NodeDelegate > node
Definition: NodeDelegate.h:388
A node plug.
Definition: Plug.h:59
std::shared_ptr< AttributeDelegate > operator*() const
Definition: NodeDelegate.h:635
A node children iteration.
Definition: NodeDelegate.h:177
bool operator!=(const C *str, const StringViewBase< C, STDS > &sv) noexcept
Definition: StringView.h:306
virtual ~AttributeIteratorDelegate()
Definition: NodeDelegate.h:352
bool operator==(const C *str, const StringViewBase< C, STDS > &sv) noexcept
Definition: StringView.h:274
bool operator!=(const ChildIterator &other) const
Definition: NodeDelegate.h:621
A node attribute iterator.
Definition: NodeDelegate.h:154
virtual ~ChildIteratorDelegate()
Definition: NodeDelegate.h:145
Attributes(const std::shared_ptr< NodeDelegate > &node)
Definition: NodeDelegate.h:385
This interface gives a high level access to the document structure.
Definition: NodeDelegate.h:72
A node attribute iterator.
Definition: NodeDelegate.h:361
Color4< T > operator*(S a, const Color4< T > &v)
Definition: ImathColor.h:727
friend class NodeDelegateWrapper
Definition: NodeDelegate.h:75
Definition: QueryContext.h:22
friend class NodeDelegate
Definition: NodeDelegate.h:179
A node attribute iterator delegate to implement in the plugin.
Definition: NodeDelegate.h:349
virtual ~AttributeDelegate()
Definition: NodeDelegate.h:219
Base class of all Rumba nodes.
Definition: Node.h:37
Base class of all Rumba values.
Definition: Value.h:34