Commit 23a2f0ad authored by Jan Möbius's avatar Jan Möbius
Browse files

New function to set per objects draw mode

git-svn-id: 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 6b260e00
......@@ -1105,6 +1105,22 @@ ViewControlPlugin::setDrawMode(QString _mode, int _viewer)
ViewControlPlugin::setObjectDrawMode(QString _mode, int _objectID, bool _force)
BaseObjectData* object = 0;
PluginFunctions::getObject( _objectID, object );
// Set draw Modes for this object ( force it when we do not set the global draw mode, to override global draw mode and force the modes on the nodes )
ACG::SceneGraph::SetDrawModesAction actionActive( activeDrawModes_ , _force );
if ( object )
ACG::SceneGraph::traverse( object->primaryNode() , actionActive);
PluginFunctions::setDrawMode( activeDrawModes_ , PluginFunctions::activeExaminer() );
Vector ViewControlPlugin::viewingDirection( int _viewer ) {
return PluginFunctions::viewingDirection(_viewer);
......@@ -1188,8 +1204,13 @@ void ViewControlPlugin::setDescriptions() {
QString("the drawMode ( ; separated list ),Viewer id (default is all)").split(","));
emit setSlotDescription("setDrawMode(QString)", "Set the drawMode for all viewers",
QStringList("DrawMode"), QStringList("the drawMode ( ; separated list )"));
emit setSlotDescription("setObjectDrawMode(QString,int,bool)", "Set the drawMode for an object",
QString("the drawMode ( ; separated list ),Object id,Apply without checking support(default is true)").split(","));
emit setSlotDescription("viewAll()", "Change View on all viewers to view whole scene",
QStringList(), QStringList());
emit setSlotDescription("viewAll(int)", "Change View on given viewer to view whole scene",
......@@ -222,6 +222,16 @@ class ViewControlPlugin : public QObject, BaseInterface , PickingInterface, Logg
/// Set the draw mode for a viewer
void setDrawMode(QString _mode, int _viewer = PluginFunctions::ALL_VIEWERS );
/** \brief Set the draw mode for an object
* This function can be used to set the drawmode for an object.
* @param _mode DrawMode as String ( can be a list of drawmodes which will be combined to a new mode )
* @param _objectid Id of the object to set the draw mode
* @param _force Set the draw mode even if its not directly supported by the objects nodes
void setObjectDrawMode(QString _mode, int _objectID , bool _force = true );
/// Get a viewers viewing direction
Vector viewingDirection( int _viewer = PluginFunctions::ACTIVE_VIEWER );
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment