[Paraview] vtkBoxWidget2 RotationEnabledOff doesn't work

Jorge Gerardo Peña Pastor jorge.pena.pastor at gmail.com
Thu Aug 25 12:19:25 EDT 2011


Hi,

I'm getting stuck with the following piece of code:

vtkSMProxy *boxProxy =
builder->createProxy("implicit_functions","Box",pqApplicationCore::instance()->getActiveServer(),"widgets");

QList<pq3DWidget *> widgets =  pq3DWidget::createWidgets(refProxy, boxProxy);

vtkBoxWidget2 *boxwidget =
dynamic_cast<vtkBoxWidget2*>(widgets[0]->getWidgetProxy()->GetWidget());
assert(boxwidget);

boxwidgets->RotationEnabledOff();

bool rotEnabled = boxwidget->GetRotationEnabled();
if (rotEnabled == false)
    std::cout << "ROT DISABLED" << std::endl;

// Not sure if needed, but just in case...
widgets[0]->getWidgetProxy()->UpdateVTKObjects();


Well, even if I get the print message, when I run my paraview based
application, it let me rotate the box widget representation.
I  also tried disabling events using "boxwidget->ProcessEventsOff();"
and it also worked, so I think I'm using the right reference...

Am I missing something?


More information about the ParaView mailing list