Exception/Crash with ModelerAPI::Model::GetLight?
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2021-07-08
08:53 PM
- last edited on
2021-09-14
09:28 AM
by
Noemi Balogh
2021-07-08
08:53 PM
I am experiencing a problem when enumerating the lights in a model.
- Load the S-Office sample
- Call ModelerAPI::Model::GetLightCount(), returns 253 lights in the model.
- Call ModelerAPI::Model::GetLight(4, &light), and argument 4 causes exception to be thrown.
If there are 253 lights in hte model, is there a reason I can't access them from the model?
Also, are the 253 lights the same lights that belong to the elements of the model?
- Load the S-Office sample
- Call ModelerAPI::Model::GetLightCount(), returns 253 lights in the model.
- Call ModelerAPI::Model::GetLight(4, &light), and argument 4 causes exception to be thrown.
If there are 253 lights in hte model, is there a reason I can't access them from the model?
Also, are the 253 lights the same lights that belong to the elements of the model?
Labels:
- Labels:
-
Add-On (C++)
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2021-07-14 10:23 AM
2021-07-14
10:23 AM
Hi,
There are a few special lights in the project, please see the code snippet below:
There are a few special lights in the project, please see the code snippet below:
for (i = 1; i <= nLight; i++) { if (elemIndex == 0) // 3 special lights model->GetLight (i, &light); else elem.GetLight (i, &light);Hope this helps, Ákos