Commit 845a4397 authored by Sebastien Barre's avatar Sebastien Barre
Browse files

ENH: add a few events to monitor when a camera is created or activated by a vtkRenderer.

parent f3a076c4
......@@ -48,6 +48,8 @@ static const char *vtkCommandEventStrings[] = {
"MouseMoveEvent",
"MouseWheelForwardEvent",
"MouseWheelBackwardEvent",
"ActiveCameraEvent",
"CreateCameraEvent",
"ResetCameraEvent",
"ResetCameraClippingRangeEvent",
"ModifiedEvent",
......
......@@ -286,6 +286,8 @@ public:
MouseMoveEvent,
MouseWheelForwardEvent,
MouseWheelBackwardEvent,
ActiveCameraEvent,
CreateCameraEvent,
ResetCameraEvent,
ResetCameraClippingRangeEvent,
ModifiedEvent,
......
......@@ -37,7 +37,7 @@
#include "vtkTimerLog.h"
#include "vtkVolume.h"
vtkCxxRevisionMacro(vtkRenderer, "1.240");
vtkCxxRevisionMacro(vtkRenderer, "1.240.2.1");
vtkCxxSetObjectMacro(vtkRenderer, IdentPainter, vtkIdentColoredPainter);
......@@ -655,12 +655,15 @@ void vtkRenderer::SetActiveCamera(vtkCamera *cam)
this->ActiveCamera = cam;
this->Modified();
this->InvokeEvent(vtkCommand::ActiveCameraEvent, cam);
}
//----------------------------------------------------------------------------
vtkCamera* vtkRenderer::MakeCamera()
{
return vtkCamera::New();
vtkCamera *cam = vtkCamera::New();
this->InvokeEvent(vtkCommand::CreateCameraEvent, cam);
return cam;
}
//----------------------------------------------------------------------------
......
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