Notifications
Clear all
[Closed] Get all viewports using Max SDK
Jul 01, 2009 12:37 pm
Hi all,
I am trying to get all the viewports using 3ds max sdk.
I am able to get the active viewport using
i->GetActiveViewport(); //from interface
Please provide some pointers to get the other viewports using max sdk.
P.S.: Came across the function i->GetViewport(hwnd)
But don’t know how to get the viewports window handle.
2 Replies
Jul 01, 2009 12:37 pm
hi augustine,
you need methods of Interface7
int getActiveViewportIndex();
BOOL setActiveViewport(int index);
int getNumViewports();
ViewExp *getViewport(int i);
ViewExp* pView = NULL;
int nViewports = GetCOREInterface7()->getNumViewports();
for(int i=0; i<nViewports; i++)
{
pView = GetCOREInterface7()->getViewport(i);
if(pView != NULL)
{
int viewType = pView->GetViewType();
switch(viewType)
{
case VIEW_LEFT: ...; break;
case VIEW_RIGHT: ...; break;
case VIEW_TOP: ...; break;
case VIEW_BOTTOM: ...; break;
....
default:
break;
}
}
}
ahh, india…
guruware