Results 1 to 3 of 3

Thread: Modeler mesh

  1. #1

    Modeler mesh

    What's the equivalent for:
    Code:
    mesh = Mesh(); // get objects
    in python?
    My opinions and comments do not represent those of my employer.
    www.ernestpchan.com
    www.zazzle.com/gopuggo

  2. #2
    Member
    Join Date
    Oct 2003
    Location
    Near Edinburgh
    Posts
    246
    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

  3. #3
    Thanks, I think I'm seeing what I need to use. Just unclear as to how to use that in Python.

    Code:
       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.

    Code:
    import lwsdk
    query = lwsdk.LWStateQueryFuncs()
    
    temp = query.object()
    
    print temp
    Last edited by ernpchan; 06-03-2014 at 01:46 PM.
    My opinions and comments do not represent those of my employer.
    www.ernestpchan.com
    www.zazzle.com/gopuggo

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •