PDA

View Full Version : Modeler mesh



ernpchan
06-02-2014, 01:17 PM
What's the equivalent for:

mesh = Mesh(); // get objects

in python?

iain_r
06-03-2014, 02:17 PM
Check out pcore.LWStateQueryFuncs(*args) and modstate.html in the SDK, the vidscape save.c file uses the State Query to get info about the object.

Regards

Iain

ernpchan
06-03-2014, 02:41 PM
Thanks, I think I'm seeing what I need to use. Just unclear as to how to use that in Python.



query = global( LWSTATEQUERYFUNCS_GLOBAL, GFUSE_TRANSIENT );
if ( !query ) return AFUNC_BADGLOBAL;

nlayers = query->numLayers();
npoints = query->bbox( OPLYR_PRIMARY, box );
surfname = query->surface();
objname = query->object();
layers = query->layerList( OPLYR_FG, objname );


Turned out it wasn't that hard.


import lwsdk
query = lwsdk.LWStateQueryFuncs()

temp = query.object()

print temp