Jump to content

2.19 SpiderVision multiple viewports questions


photo

Recommended Posts

Posted (edited)

Hi,

I create multiple viewports on a single instance, with side by side windows. One of them is the main window.

  • In the main window, the console can be dropped and "ig_debug 1" should enable the free camera with the F key. But the F no longer works in this mode. Is this expected?
  • The spidervision config files allows to configure the initial position and size of the window viewports. But these are enforced during the app lifetime. Is there a way to allow the user to still be able to move/resize the window viewports?
  • How can I prevent a secondary window viewport to be closed? (The user shall only quit the app through the main window)
    • Or alternatively, how to detect when a secondary window is closed so the full app can be closed
Edited by Amerio.Stephane
Posted

Hi Stephane,

Quote

The spidervision config files allows to configure the initial position and size of the window viewports. But these are enforced during the app lifetime. Is there a way to allow the user to still be able to move/resize the window viewports?

You can move/resize windows while the application is running using ViewportData::setWindowPosition()/setWindowSize() methods. Creating new windows, however, require configuration reload.

While moving window position you also need to consider that fact the projection matrix does not change with the window size (as is usually the case without using SpiderVision). To control the projection matrix, you need to change the parameters of the viewport (which can be seen in the configurator) using the ViewportData::setPosition/setRotation/setSize methods.

 

Quote

How can I prevent a secondary window viewport to be closed? (The user shall only quit the app through the main window)
Or alternatively, how to detect when a secondary window is closed so the full app can be closed

You can get EngineWindow and work with it normally:

auto sv = Plugins::SpiderVision::Manager::get();
auto window = sv->getEngineWindow(viewport_id);

<..>
window->setIgnoreSystemClose(true); // ingoring close 
window->getEventClose().connectUnsafe([]() { Engine::get()->quit();    }); // closing engine

 

Quote

In the main window, the console can be dropped and "ig_debug 1" should enable the free camera with the F key. But the F no longer works in this mode. Is this expected?

Hard to tell, need a bit more time to investigate. But since now you basically have 'manual' camera mode - it may be expected. We'll try to understand if that behavior can be somehow improved.

Thanks!

  • Thanks 1

How to submit a good bug report
---
FTP server for test scenes and user uploads:

×
×
  • Create New...