Amerio.Stephane Posted November 19, 2020 Share Posted November 19, 2020 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
Amerio.Stephane Posted November 19, 2020 Author Share Posted November 19, 2020 Bonus question: How can I enumerate all listed syncker names and view_id in ig_config.xml (2.12)? Link to comment
cash-metall Posted November 20, 2020 Share Posted November 20, 2020 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
Amerio.Stephane Posted November 20, 2020 Author Share Posted November 20, 2020 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
cash-metall Posted November 20, 2020 Share Posted November 20, 2020 8 minutes ago, Amerio.Stephane said: Will it work if the view is actually assigned to the master? yes it will. return -1 if not found Link to comment
Recommended Posts