Results 1 to 5 of 5

Thread: Surface Editor Load and Save in the SDK

  1. #1

    Surface Editor Load and Save in the SDK

    Does anyone know or have any suggestions for finding out how to save and load a surface onto a mesh via the SDK/Python?

  2. #2
    Super Member LightFreeze's Avatar
    Join Date
    Feb 2003
    Sunny Scotland
    this seems to work at copying surface libraries in Layout, maybe it will help.

    LWSurfaceFuncs has a save and load lib you could use
    Attached Files Attached Files
    core2duo E6500
    GTX 260

  3. #3
    Thanks, I think that does help. I see loadLib in the 11.6 python docs with a "!! NOT DOCUMENTED !!" note and it's also in the header file of the sdk without any mention of it in the sdk docs.

  4. #4
    Just wanted to say thanks again. I got it to save and load surfaces.

    lwsdk.LWSurfaceFuncs().copyLib(LWSurfLibID to, LWSurfLibID from) - copies first surface to first surface ignoring names, second to second etc.

    lwsdk.LWSurfaceFuncs().copyLibByName(LWSurfLibID to, LWSurfLibID from) - copies by matching the surface name, if surface name does not exist in the destination it is added.

    Then for saving and loading just give the full path for the file name

    lwsdk.LWSurfaceFuncs().saveLib(LWSurfLibID lib, char name)

    lwsdk.LWSurfaceFuncs().loadLib(char name)

  5. #5
    It looks like I was wrong about the loading of surfaces from files. I get nothing but crashes when I try to use them. The good news is that the surface copy does work.


Posting Permissions

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