Jump to content

From syncker view name to IG view ID?


photo

Recommended Posts

Hello,

In ig_config.xml I can specify the CIGI view ID for a specific Syncker name. How do I retrieve the view ID from the name in C++?

<syncker_channels>
    <channel syncker_name="main"   view_id="0" use_syncker_projection="0"/>
    <channel syncker_name="sphere" view_id="1" use_syncker_projection="0"/>
    <channel syncker_name="pano"   view_id="2" use_syncker_projection="0"/>
    <channel syncker_name="ext"    view_id="3" use_syncker_projection="0"/>
</syncker_channels>
// I'm looking for something like this
IG::Manager::get()->getViewID("ext");

Thanks!

Link to comment
18 hours ago, Amerio.Stephane said:

In ig_config.xml I can specify the CIGI view ID for a specific Syncker name. How do I retrieve the view ID from the name in C++?

Since 2.13 there is a method get getSynckerChannels and getViewTypes

const auto & syncker_channels = ig_manager->getConfig()->getSynckerChannels();
const auto & view_types = ig_manager->getConfig()->getViewTypes();

where you can change and save this blocks of ig_config.xml.

 

It looks like you are right, we need to add a method like 

IG::Manager::get()->getViewID("ext");

UPD: this is already exist getSlaveView("ext") since 2.13


Before 2.13 there is no way to get it. (except for manually reading the xml file).

Link to comment
4 hours ago, cash-metall said:

UPD: this is already exist getSlaveView("ext") since 2.13

The name suggests it works for Slave. Will it work if the view is actually assigned to the master?

Thanks!

Link to comment
×
×
  • Create New...