2016 Dec 31 5:53 AM - edited 2024 Feb 03 7:20 PM
I am writing (what I thought would be) a simple 3D tool for 3D Visual Enterprise Author 8.0 that would collapse all nodes that have _prt_ in the name. The tool appears to run as expected except that it gives a "[Fatal]:Invalid index[385] in access to collection" error after my code has finished and then crashes the program. I am able to read debug messages I sent to the message log while the error dialogue is being displayed but am unsure whether the code has actually worked as the program crashes when I dismiss the dialogue.
My code is:
bool _E3_CALLTYPE E3_CONVERT::ProcessObject(rh::e3::Node* node,rh::Context* context,UINT32 flags)
{
char name[256] = {0};
node->GetName(name,_countof(name));
if (strstr(name, "_prt_"))
{
items = api->CreateCollection();
e3_MESH * mesh = (e3_MESH *)scene->CreateObject("e3_mesh");
MATRIX3D m;
node->GetWorldMatrix(&m, E3_GM_OBJECT);
scene->Collapse(mesh, &m, items, E3_COLLAPSE_OPTIMIZE);
items->Release();
while (node->childs) node->RemoveChild(node->childs);
node->SetObject(mesh);
mesh->Release();
}
return TRUE;
}
Hi Russel,
It is not easy to tell, are you calling ProcessObject for all objects like list_all?
Vlad
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
3 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.