View Full Version : Surface Editor Load and Save in the SDK

10-21-2013, 10:36 PM
Does anyone know or have any suggestions for finding out how to save and load a surface onto a mesh via the SDK/Python?

10-24-2013, 01:53 PM
this seems to work at copying surface libraries in Layout, maybe it will help.

LWSurfaceFuncs has a save and load lib you could use

10-24-2013, 09:05 PM
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.

10-25-2013, 12:35 AM
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)

10-27-2013, 12:17 AM
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.