PDA

View Full Version : fastest way to get active int obj in modeler?



Jabba
04-26-2007, 01:11 AM
Hi there

I'm just courious if there's something that I missed in the SDK.

I've got a MeshDataEdit plugin and among others I need st_LWObjectFuncs to get some information about the object loaded in the modeler. Problem is, that lots of structure function pointers needs int obj as a parameter.
It's a index into the array of modelers loaded object (ie: the active one from all loaded). Only one structure that points to modeler's active object is LWStateQueryFuncs, but there's just a filename but not an index.

I'm not able to find the function to get this index stright. I wrote function which compares filenames of all loaded object (provided by LWObjectFunc) and active one (from LWStateQueryFuncs). It quite works but I'm simply courious if there's a clean way to get stright the index...

Thanks.

Sensei
04-26-2007, 01:48 AM
H
I'm not able to find the function to get this index stright. I wrote function which compares filenames of all loaded object (provided by LWObjectFunc) and active one (from LWStateQueryFuncs). It quite works but I'm simply courious if there's a clean way to get stright the index...


That's the only way AFAIK..