Katana Plug-in APIs 0.1
Public Member Functions

Foundry::Katana::ViewerAPI::ViewerDelegatePluginBase Class Reference

Main data source for a Viewer that feeds the different Viewports. More...

#include <FnViewerDelegate.h>

Inheritance diagram for Foundry::Katana::ViewerAPI::ViewerDelegatePluginBase:
Foundry::Katana::ViewerAPI::ViewerDelegate Foundry::Katana::ViewerAPI::ViewerDelegateWrapper ExampleViewerDelegate

List of all members.

Public Member Functions

 ViewerDelegatePluginBase ()
 Constructor.
virtual ~ViewerDelegatePluginBase ()
 Destructor.
FnAttribute::GroupAttribute getAttributes (const std::string &locationPath, FnViewerDelegateSceneView sceneView=kFnViewerDelegatePrimary)
 Gets cooked attributes for a location.
Matrix44d getLocalXform (const std::string &locationPath, bool &isAbsolute, FnViewerDelegateSceneView sceneView=kFnViewerDelegatePrimary)
 Gets the location's local space transform.
Matrix44d getWorldXform (const std::string &locationPath, FnViewerDelegateSceneView sceneView=kFnViewerDelegatePrimary)
 Gets the location's world space transform.
Matrix44d getParentXform (const std::string &locationPath, FnViewerDelegateSceneView sceneView=kFnViewerDelegatePrimary)
 Gets the location parent's world space transform.
Matrix44d getPartialXform (const std::string &locationPath, const std::string &groupName, const std::string &componentName, bool includeComponent, FnViewerDelegateSceneView sceneView=kFnViewerDelegatePrimary, bool includeParentXform=true, bool includeBeforeGroup=true, bool includeAfterGroup=false)
 Transform from rotate/scale/translate space to world space.
void openLocation (const std::string &locationPath)
 Opens a location.
void openLocations (const std::vector< std::string > &locationPaths)
 Opens a list of locations.
void closeLocation (const std::string &locationPath)
 Closes a location.
void closeLocations (const std::vector< std::string > &locationPaths)
 Closes a list of locations.
void activateSourceLocation (const std::string &locationPath)
 Activate the source tree rooted at the given location.
void activateSourceLocations (const std::vector< std::string > &locationPaths)
 Activate the source trees rooted at the given locations.
void deactivateSourceLocation (const std::string &locationPath)
 Deactivate the source tree rooted at the given location.
void deactivateSourceLocations (const std::vector< std::string > &locationPaths)
 Deactivate the source trees rooted at the given locations.
void selectLocation (const std::string &locationPath)
 Selects a location in Katana.
void selectLocations (const std::vector< std::string > &locationPaths)
 Selects a list of location in Katana.
void getSelectedLocations (std::vector< std::string > &locationPaths)
 Get the list of selected locations.
ViewerDelegateComponentWrapperPtr addComponent (const std::string &pluginName, const std::string &name)
 Adds a ViewerDelegateComponent.
ViewerDelegateComponentWrapperPtr insertComponent (const std::string &pluginName, const std::string &name, unsigned int index)
 Inserts a ViewerDelegateComponent.
ViewerDelegateComponentWrapperPtr getComponent (const std::string &name) const
 Gets a ViewerDelegateComponent by name.
ViewerDelegateComponentWrapperPtr getComponent (unsigned int index) const
 Gets a ViewerDelegateComponent by index.
void removeComponent (const std::string &name)
 Removes a ViewerDelegateComponent by name.
void removeComponent (unsigned int index)
 Removes a ViewerDelegateComponent by name.
unsigned int getNumberOfComponents () const
 Gets the number of ViewerDelegateComponents.
std::string getComponentName (unsigned int index)
 Gets the name of the ViewerDelegateComponent on a given index.
int getComponentIndex (const std::string &name)
 Gets the index of the ViewerDelegateComponent with a given name.
ViewportWrapperPtr getViewport (const std::string &name)
 Gets a Viewport by name.
ViewportWrapperPtr getViewport (unsigned int index)
 Gets a Viewport by index.
unsigned int getNumberOfViewports ()
 Gets the number of Viewports.
std::string getViewportName (unsigned int index)
 Gets the Viewport name for a given index.
FnAttribute::GroupAttribute getCompatibleManipulatorsInfo (const std::vector< std::string > &locationPaths)
 Gets the Manipulators compatible with a list of locations.
FnAttribute::Attribute callPythonCallback (const std::string &name, FnAttribute::Attribute message)
 Calls a Python callback.
FnAttribute::GroupAttribute getLiveAttributes (const std::string &locationPath, FnViewerDelegateSceneView sceneView=kFnViewerDelegatePrimary)
 Gets the live attributes for a location.
FnAttribute::GroupAttribute getCookedAttributes (const std::string &locationPath, FnViewerDelegateSceneView sceneView=kFnViewerDelegatePrimary)
 Gets the cooked attributes for a location.
bool setManipulatedAttribute (const std::string &locationPath, const std::string &attrName, FnAttribute::Attribute valueAttr, bool isFinal)
 Sets a manipulated attribute back into Katana.
void openManipulationGroup (const std::string &locationPath)
 Marks the beginning of a batch of manipulations.
void closeManipulationGroup (const std::string &locationPath)
 Marks the end of a batch of manipulations.
void setBoundingBoxesEnabled (bool enabled)
 Turns the display of bounding boxes on or off.
void setProxyGeometryEnabled (bool enabled)
 Turns the display of proxy geometries on or off.
FnAttribute::StringAttribute getDescendantLocations (const std::string &location)
 Returns all descendant locations from the specified location.
FnAttribute::DoubleAttribute computeMergedExtent (const std::vector< std::string > &locations, const std::string &excludeLocation)
 Computes the merged extent of the given locations in world space.

Detailed Description

Main data source for a Viewer that feeds the different Viewports.

A ViewerDelegate can serve several Viewports with data from location cooking, deletion, opening and closing events that are delegated to it. It uses a Geolib3 client that listens to a given Op-Tree (see setViewOp()). It can access all the attributes of all the locations cooked so far via getAttributes().

Scene graph locations are made available through one of the following scene views:

Scene graph query methods such as ViewerDelegate::getAttributes() and ViewerDelegate::getWorldXform() query the primary scene view unless the 'sceneView' parameter stipulates otherwise.

Any data structure that is shared between different Viewports should be maintained by the ViewerDelegate. It can access all of its Viewports by name or by index (see getViewport()).

Since it has access to the cooked attributes for each location it can also get the Manipulators that are compatible with a location (i.e. that can manipulate that location) by looking at its attributes and matching each Manipulator's requirements (see getCompatibleManipulatorsInfo()).

It can also communicate with the Python layer via callPythonCallback().

An already compiled ViewerDelegate can be extended by the plugin type ViewerDelegateComponent. Several of these can be added to allow new location types and attributes to be processed. ViewerDelegateComponents can inform other ViewerDelegateComponents and the ViewerDelegate that they are handling a location by return 'true' from their locationEvent() callback. This may allow existing functionality in the ViewerDelegate to be removed/ignored.

This is a virtual base class to be extended in your plug-in. In addition to implementing all the pure virtual functions in this class, you must also implement this static method in your derived class:

 // Returns a new instance of your derived class.
 static ViewerDelegate* create();

To indicate an error to the caller, your implementation may throw an exception derived from std::exception.

ViewerDelegate is the class that plugins should extend and implement.

ViewerDelegateWrapper is the class that allows other plugin types to access the ViewerDelegate plugin.

ViewerDelegatePluginBase is the base class that provides the common methods between ViewerDelegate and ViewerDelegateWrapper.


Member Function Documentation

void Foundry::Katana::ViewerAPI::ViewerDelegatePluginBase::activateSourceLocation ( const std::string &  locationPath)

Activate the source tree rooted at the given location.

While a source location is active, that location and all of its descendants and ancestors are included in the 'sources' scene view.

Parameters:
locationPathThe source tree root location path.
void Foundry::Katana::ViewerAPI::ViewerDelegatePluginBase::activateSourceLocations ( const std::vector< std::string > &  locationPaths)

Activate the source trees rooted at the given locations.

While a source location is active, that location and all of its descendants and ancestors are included in the 'sources' scene view.

Parameters:
locationPathsThe source tree root location paths.
ViewerDelegateComponentWrapperPtr Foundry::Katana::ViewerAPI::ViewerDelegatePluginBase::addComponent ( const std::string &  pluginName,
const std::string &  name 
)

Adds a ViewerDelegateComponent.

Instantiates a ViewerDelegateComponent and adds it to the end of the list of components on this ViewerDelegate.

Parameters:
pluginNameThe ViewerDelegateComponent plugin name.
nameThe name for the new ViewerDelegateComponent.
Returns:
The newly created ViewerDelegateComponent.
FnAttribute::Attribute Foundry::Katana::ViewerAPI::ViewerDelegatePluginBase::callPythonCallback ( const std::string &  name,
FnAttribute::Attribute  message 
)

Calls a Python callback.

Calls a Python callback that has been registered in Python via the method ViewerDelegate.registerCallback() (see also the Python function ViewerDelegate.registerCallback()). This allows the ViewerDelegate to communicate with the Viewer tab and Katana via Python. Both the arguments and return value of the callback are in the form of an Attribute.

Parameters:
nameThe name with which the callaback was registered.
messageThe message to pass to the Python callback.
Returns:
The Attribute returned by the callback, or an invalid Attribute if there is no such callback registered.
void Foundry::Katana::ViewerAPI::ViewerDelegatePluginBase::closeLocation ( const std::string &  locationPath)

Closes a location.

Closes a location, meaning that its child locations will cease to be cooked, and a deleted event (see locationDeleted()) will be issued for these children.

Parameters:
locationPathThe location path.
void Foundry::Katana::ViewerAPI::ViewerDelegatePluginBase::closeLocations ( const std::vector< std::string > &  locationPaths)

Closes a list of locations.

Closes a list of location, meaning that their child locations will cease to be cooked, and a deleted event (see locationDeleted()) will be issued for these children.

This function is exposed in the ViewerDelegate Python class.

Parameters:
locationPathsThe location paths.
void Foundry::Katana::ViewerAPI::ViewerDelegatePluginBase::closeManipulationGroup ( const std::string &  locationPath)

Marks the end of a batch of manipulations.

Parameters:
locationPathThe scene graph location that this group is for. Multiple groups can be created for different locations.
FnAttribute::DoubleAttribute Foundry::Katana::ViewerAPI::ViewerDelegatePluginBase::computeMergedExtent ( const std::vector< std::string > &  locations,
const std::string &  excludeLocation 
)

Computes the merged extent of the given locations in world space.

The bounds of every location will be merged. If the location does not have defined bounds, its extent will be computed based on its geometry, as well as the bounds or extent of its descendants.

Parameters:
locationsLocations whose bounds (or extent) need to be merged.
excludeLocationLocation that must be excluded from the merged bounds (typically the viewport's look-through location).
Returns:
The merged bounds of all the locations in world space, or an invalid attribute if it could not be computed.
void Foundry::Katana::ViewerAPI::ViewerDelegatePluginBase::deactivateSourceLocation ( const std::string &  locationPath)

Deactivate the source tree rooted at the given location.

Parameters:
locationPathThe source tree root location path.
void Foundry::Katana::ViewerAPI::ViewerDelegatePluginBase::deactivateSourceLocations ( const std::vector< std::string > &  locationPaths)

Deactivate the source trees rooted at the given locations.

Parameters:
locationPathsThe source tree root location paths.
FnAttribute::GroupAttribute Foundry::Katana::ViewerAPI::ViewerDelegatePluginBase::getAttributes ( const std::string &  locationPath,
FnViewerDelegateSceneView  sceneView = kFnViewerDelegatePrimary 
)

Gets cooked attributes for a location.

Gets the cached cooked attributes for the location. Returns an invalid group attribute if the location hasn't been cooked.

During the manipulation of an attribute by a Manipulator, the last value set by it will be returned instead of the cached cooked attribute. This allows faster interactive representation of the scene graph during the manipulation, since the cooking might not be fast enough to provide an interactive speed.

This function is exposed in the ViewerDelegate Python class.

Parameters:
locationPathThe location path.
sceneViewScene view to query.
Returns:
The attributes of the location.
FnAttribute::GroupAttribute Foundry::Katana::ViewerAPI::ViewerDelegatePluginBase::getCompatibleManipulatorsInfo ( const std::vector< std::string > &  locationPaths)

Gets the Manipulators compatible with a list of locations.

Returns the information about the Manipulator plugins that are compatible with a given list of locations. This is done by calling Manipulator::match() for the cooked attributes of each of these locations. The Manipulators have to match ALL of the given locations. The information is returned as a GroupAttribute that contains other GroupAttributes with each manipulator's tags (see Manipulator::getTags()) indexed by the Manipulator plugin name:

GroupAttribute { "manipName1": GroupAttribute { "tagName1": "tagValue1", "tagName2": "tagValue2", ... }, "manipName2": GroupAttribute { ... }, ... }

This function is exposed in the ViewerDelegate Python class.

Parameters:
locationPathsThe location paths.
Returns:
A GroupAttribute with the tags of the compatible manipulators.
ViewerDelegateComponentWrapperPtr Foundry::Katana::ViewerAPI::ViewerDelegatePluginBase::getComponent ( const std::string &  name) const

Gets a ViewerDelegateComponent by name.

This function is exposed in the ViewerDelegate Python class.

Parameters:
nameThe name of the ViewerDelegateComponent.
Returns:
The ViewerDelegateComponent in this ViewerDelegate with the given name or 0 if no such component exists.
ViewerDelegateComponentWrapperPtr Foundry::Katana::ViewerAPI::ViewerDelegatePluginBase::getComponent ( unsigned int  index) const

Gets a ViewerDelegateComponent by index.

This function is exposed in the ViewerDelegate Python class as ViewerDelegate.getComponentByIndex().

Parameters:
indexThe position in the list of ViewerDelegateComponents on this ViewerDelegate.
Returns:
The ViewerDelegateComponent in this ViewerDelegate with the given index or 0 if no such component exists.
int Foundry::Katana::ViewerAPI::ViewerDelegatePluginBase::getComponentIndex ( const std::string &  name)

Gets the index of the ViewerDelegateComponent with a given name.

Parameters:
nameThe name of the ViewerDelegateComponent.
Returns:
The position in the list of ViewerDelegateComponents on this ViewerDelegate or -1 if it doesn't exist.
std::string Foundry::Katana::ViewerAPI::ViewerDelegatePluginBase::getComponentName ( unsigned int  index)

Gets the name of the ViewerDelegateComponent on a given index.

Parameters:
indexThe position in the list of ViewerDelegateComponents on this ViewerDelegate.
Returns:
The name of the ViewerDelegateComponent on the given index or empty string if it doesn't exist.
FnAttribute::GroupAttribute Foundry::Katana::ViewerAPI::ViewerDelegatePluginBase::getCookedAttributes ( const std::string &  locationPath,
FnViewerDelegateSceneView  sceneView = kFnViewerDelegatePrimary 
)

Gets the cooked attributes for a location.

Gets the cooked attributes from the runtime. Unlike getAttributes(), this function does not apply the manipulated attributes on top.

This function is exposed in the ViewerDelegate Python class.

Parameters:
locationPathThe location path.
sceneViewScene view to query.
Returns:
The original attributes of the location.
FnAttribute::StringAttribute Foundry::Katana::ViewerAPI::ViewerDelegatePluginBase::getDescendantLocations ( const std::string &  location)

Returns all descendant locations from the specified location.

The descendant locations are those that the viewer delegate has opened. Full scene-graph expansion is not performed by this function.

Parameters:
locationParent of all returned locations.
Returns:
StringAttribute containing zero or more descendant locations.
FnAttribute::GroupAttribute Foundry::Katana::ViewerAPI::ViewerDelegatePluginBase::getLiveAttributes ( const std::string &  locationPath,
FnViewerDelegateSceneView  sceneView = kFnViewerDelegatePrimary 
)

Gets the live attributes for a location.

Gets the cached, manipulated attributes for the location. Returns an invalid group attribute if the location is not being manipulated. Only attributes that are being manipulated will be present in the group.

This function is exposed in the ViewerDelegate Python class.

Parameters:
locationPathThe location path.
sceneViewScene view to query.
Returns:
The live attributes of the location.
Matrix44d Foundry::Katana::ViewerAPI::ViewerDelegatePluginBase::getLocalXform ( const std::string &  locationPath,
bool &  isAbsolute,
FnViewerDelegateSceneView  sceneView = kFnViewerDelegatePrimary 
)

Gets the location's local space transform.

Parameters:
[in]locationPathThe location.
[out]isAbsoluteSet to true if the local transform is reset to identity using the 'origin' attribute convention. If true, the location's ancestors' transforms do not contribute to the global transform of this location and its descendants.
sceneViewScene view to query.
Returns:
Gets the location's local space transform as a matrix.
unsigned int Foundry::Katana::ViewerAPI::ViewerDelegatePluginBase::getNumberOfComponents ( ) const

Gets the number of ViewerDelegateComponents.

This function is exposed in the ViewerDelegate Python class.

Returns:
The number of ViewerDelegateComponents added to this ViewerDelegate.
unsigned int Foundry::Katana::ViewerAPI::ViewerDelegatePluginBase::getNumberOfViewports ( )

Gets the number of Viewports.

Gets the number of Viewports associated with this ViewerDelegate. The Vieweports must have been created via Python using the ViewerDelegate.addViewport() call.

This function is exposed in the ViewerDelegate Python class.

Returns:
The number of Viewports.
Matrix44d Foundry::Katana::ViewerAPI::ViewerDelegatePluginBase::getParentXform ( const std::string &  locationPath,
FnViewerDelegateSceneView  sceneView = kFnViewerDelegatePrimary 
)

Gets the location parent's world space transform.

Parameters:
locationPathThe location.
sceneViewScene view to query.
Returns:
Gets the location parent's world space transform as a matrix.
Matrix44d Foundry::Katana::ViewerAPI::ViewerDelegatePluginBase::getPartialXform ( const std::string &  locationPath,
const std::string &  groupName,
const std::string &  componentName,
bool  includeComponent,
FnViewerDelegateSceneView  sceneView = kFnViewerDelegatePrimary,
bool  includeParentXform = true,
bool  includeBeforeGroup = true,
bool  includeAfterGroup = false 
)

Transform from rotate/scale/translate space to world space.

NOTE: in this case a "component" refers to a transformation component (scale, rotate, translate), rather than a ViewerDelegateComponent.

This defines the transformation from a transform component space (scale, translate, rotate) to world space. It is defined by the transform of all the components that are applied before the one specified by componentName concatenated by the location's parent transform. This transform will be affected by the transform order.

The includeComponent flag defines if the component transformation should be included in the result or not. For example, for a TRS transform order in a Rotate manipulator and the flag includeComponent set to false, this will return the following matrix: Translate * XformGroupBefore * ParentLocation And if includeComponent is set to true, then this is the result: Rotate * Translate * XformGroupBefore * ParentLocation

The componentName argument defines name of the xform component attribute. For example: "translate" for xform.interactive.translate". In the case of a rotation, in which there are several attributes suffixed with the axis letter, a "?" should be added instead of the axis name (example: "xform.interactive.rotate?") This way the whole component, with all its 3 attributes, will be considered. The includeComponent will also define if the components that match this wildcard will all be included or all excluded from the result.

If the location has no xform attribute or if no component attribute is found then an identity matrix is returned.

Parameters:
locationPathThe location with the transform.
groupNameThe name of the parent GroupAttribute that contains the transform attributes. Example: "xform.interactive"
componentNameThe name of the attribute of the transform component. The wildcard "?" at the end of this string will match all the transform components prefixed by componentName that are followed by an axis letter at the end. Examples: "transform", "rotateX" or "rotate?".
includeComponentSpecifies if the component specified by componentName should be included in the resulting matrix.
sceneViewScene view to query.
includeParentXformSpecifies parent locations xform should be included in the resulting matrix.
includeBeforeGroupSpecifies if the transform groups before the one specified by componentName (example: "xform.group1" before "xform.interactive") should also be included in the resulting transform.
includeAfterGroupSpecifies if the transform groups after the one specified by componentName (example: "xform.group1" after "xform.interactive") should also be included in the resulting transform.
Returns:
A matrix representing the transform component-to-world transform. It is given by the multiplication of all the components that are applied before the specified component.
void Foundry::Katana::ViewerAPI::ViewerDelegatePluginBase::getSelectedLocations ( std::vector< std::string > &  locationPaths)

Get the list of selected locations.

Parameters:
locationPathsWill be filled with the selected location paths.
ViewportWrapperPtr Foundry::Katana::ViewerAPI::ViewerDelegatePluginBase::getViewport ( unsigned int  index)

Gets a Viewport by index.

Gets a Viewport associated with this ViewerDelegate by its index. The Vieweport must have been created via Python using the ViewerDelegate.addViewport() call.

This function is exposed in the ViewerDelegate Python class as ViewerDelegate.getViewportByIndex().

Parameters:
indexThe index of the Viewport.
Returns:
A pointer to the Viewport, or 0 if the index does not refer to any Viewport.
ViewportWrapperPtr Foundry::Katana::ViewerAPI::ViewerDelegatePluginBase::getViewport ( const std::string &  name)

Gets a Viewport by name.

Gets a Viewport associated with this ViewerDelegate by its name. The Vieweport must have been created via Python using the ViewerDelegate.addViewport() call.

Parameters:
nameThe name of the Viewport.
Returns:
A pointer to the Viewport, or 0 if it doesn't exist.
std::string Foundry::Katana::ViewerAPI::ViewerDelegatePluginBase::getViewportName ( unsigned int  index)

Gets the Viewport name for a given index.

Gets the name of the Viewport associated with this ViewerDelegate with the given index. The Vieweports must have been created via Python using the ViewerDelegate.addViewport() call.

Returns:
The name of the Viewport or empty string "" if the index does not refer to any Viewport.
Matrix44d Foundry::Katana::ViewerAPI::ViewerDelegatePluginBase::getWorldXform ( const std::string &  locationPath,
FnViewerDelegateSceneView  sceneView = kFnViewerDelegatePrimary 
)

Gets the location's world space transform.

Parameters:
locationPathThe location.
sceneViewScene view to query.
Returns:
Gets the location's world space transform as a matrix.
ViewerDelegateComponentWrapperPtr Foundry::Katana::ViewerAPI::ViewerDelegatePluginBase::insertComponent ( const std::string &  pluginName,
const std::string &  name,
unsigned int  index 
)

Inserts a ViewerDelegateComponent.

Instantiates a ViewerDelegateComponent and inserts it into the specified index of the list of components on this ViewerDelegate.

Parameters:
pluginNameThe ViewerDelegateComponent plugin name.
nameThe name for the new ViewerDelegateComponent.
indexThe position for the new ViewerDelegateComponent to be inserted into.
Returns:
The newly created ViewerDelegateComponent.
void Foundry::Katana::ViewerAPI::ViewerDelegatePluginBase::openLocation ( const std::string &  locationPath)

Opens a location.

Opens a location, meaning that its potential child locations will be cooked.

Parameters:
locationPathThe location path.
void Foundry::Katana::ViewerAPI::ViewerDelegatePluginBase::openLocations ( const std::vector< std::string > &  locationPaths)

Opens a list of locations.

Opens a list of locations, meaning that their potential child locations will be cooked.

This function is exposed in the ViewerDelegate Python class.

Parameters:
locationPathsThe location paths.
void Foundry::Katana::ViewerAPI::ViewerDelegatePluginBase::openManipulationGroup ( const std::string &  locationPath)

Marks the beginning of a batch of manipulations.

Multiple manipulations can be batched into a group, allowing them to be processed at the same time. Once called any subsequent calls to setManipulatedAttribute() will be deferred until closeManipulationGroup() is called.

Parameters:
locationPathThe scene graph location that this group is for. Multiple groups can be created for different locations.
void Foundry::Katana::ViewerAPI::ViewerDelegatePluginBase::removeComponent ( const std::string &  name)

Removes a ViewerDelegateComponent by name.

This function is exposed in the ViewerDelegate Python class.

Parameters:
nameThe name of the ViewerDelegateComponent to be removed.
void Foundry::Katana::ViewerAPI::ViewerDelegatePluginBase::removeComponent ( unsigned int  index)

Removes a ViewerDelegateComponent by name.

This function is exposed in the ViewerDelegate Python class as ViewerDelegate.removeLayerByIndex().

Parameters:
indexThe position in the list of ViewerDelegateComponents on this ViewerDelegate
void Foundry::Katana::ViewerAPI::ViewerDelegatePluginBase::selectLocation ( const std::string &  locationPath)

Selects a location in Katana.

Parameters:
locationPathThe location path to be selected.
void Foundry::Katana::ViewerAPI::ViewerDelegatePluginBase::selectLocations ( const std::vector< std::string > &  locationPaths)

Selects a list of location in Katana.

Parameters:
locationPathsThe location paths to be selected.
void Foundry::Katana::ViewerAPI::ViewerDelegatePluginBase::setBoundingBoxesEnabled ( bool  enabled)

Turns the display of bounding boxes on or off.

Parameters:
enabledFlag that controls whether to turn the display of bounding boxes on or off.
bool Foundry::Katana::ViewerAPI::ViewerDelegatePluginBase::setManipulatedAttribute ( const std::string &  locationPath,
const std::string &  attrName,
FnAttribute::Attribute  valueAttr,
bool  isFinal 
)

Sets a manipulated attribute back into Katana.

When the user interacts with a an editable attribute some values will have to be sent back to Katana. Setting these values will typically end up setting some node parameters in Katana. Parameters will not be set explicitly by the Manipulators because the same Manipulator might be able to serve different nodes with different parameters.

Katana will know what parameters to change via the protocol defined by discovering the node via the "attributeEditor.exclusiveTo" attribute convention and then via the setOverride() function on that node. This function will return false if no parameter capable of editing the given attribute is found.

For example in order to change the X position of an object setValue() would be called for the location of that object on its attribute 'xform.interactive.translate.x'.

Once a value is set the cooked result might take some time to arrive back. During that time, attributes provided by Viewer Location Events and returned by ViewerDelegate::getAttributes() contain the manipulated value, rather than the cooked one, for those attributes.

While a user is scrubbing a UI element that manipulates the attribute, the values might not end up being committed immediately into Geolib3 to be cooked, as this might not perform at an interactive speed (depending on the project complexity). For this the concept of 'final' value is used. While the user is scrubbing a Manipulator handle the value will not be sent back to Katana as the final one. That will happen only once the user releases it, which, at that point, Katana will, guaranteedly, be informed that the new scene can be cooked.

Parameters:
locationPathThe location of the object being manipulated.
attrNameThe attribute name for the value being manipulated.
valueAttrThe value being set.
isFinalTrue if this is a final value.
Returns:
True if a parameter capable of editing the given attribute was found and was successfully set, false otherwise.
void Foundry::Katana::ViewerAPI::ViewerDelegatePluginBase::setProxyGeometryEnabled ( bool  enabled)

Turns the display of proxy geometries on or off.

Parameters:
enabledFlag that controls whether to turn the display of proxy geometries on or off.

The documentation for this class was generated from the following file:
 All Classes Functions Variables Typedefs Enumerations Enumerator