Surface Functions

class lwsdk.LWSurfaceFuncs(self)

Bases: object

Proxy of C++ PCore::LWSurfaceFuncs class

 byName(char name, char objName) → LWSurfaceID[]

Returns the IDs of the (possibly many) surfaces with a given name. Different objects can have surfaces of the same name. If objname is None, the array will contain every surface ID named surfname, regardless of which object it belongs to.

 byObject(char name) → LWSurfaceID[]

Returns the surfaces belonging to the object. The object name is the filename.

 chanGrp(LWSurfaceID surf) → LWChanGroupID

Returns the channel group for the surface. This is the parent group for envelopes associated with the surface's parameters. It can be used with the Channel Info global.

 copy(LWSurfaceID to, LWSurfaceID from) → int

!! NOT DOCUMENTED !!

 copyLib(LWSurfLibID to, LWSurfLibID from)

!! NOT DOCUMENTED !!

 copyLibByName(LWSurfLibID to, LWSurfLibID from)

!! NOT DOCUMENTED !!

 create(char objName, char surfName) → LWSurfaceID

Create a new surface. The object name is the filename, which you can get from the LWObjectInfo::filename() method and the LWStateQueryFuncs::object() method, given the object's item ID.

 createLib() → LWSurfLibID

!! NOT DOCUMENTED !!

 destroyLib(LWSurfLibID lib)

!! NOT DOCUMENTED !!

 first() → LWSurfaceID

Returns the ID of the first surface in the surfaces list.

 getColorVMap(LWSurfaceID surf) → char

Returns the name of the vertex color map for the surface.

 getEnv(LWSurfaceID surf, char channel) → LWEnvelopeID

Returns the envelope ID for the surface parameter. This can be used with the Animation Envelopes global.

 getFlt(LWSurfaceID surface, char tag) → double[]

Returns the value of the surface parameter. The return value in most cases is a one-value sequence, but for colors, it is three.

 getImg(LWSurfaceID surf, char channel) → LWImageID

Returns the image associated with the surface parameter. This function is limited to use with surface channels that refer directly to images, e.g. lwsdk.SURF_RIMG and lwsdk.SURF_TIMG (reflection and refraction maps). Images that are part of textures have to be obtained through the Texture Functions global.

 getInt(LWSurfaceID surf, char channel) → int

Returns the value of the surface parameter (evaluates the channel) at the current time. Use this function for integer parameters and LWSurfaceFuncs::getFlt() for floating-point parameters. The channel is one of the channel names listed in lwsurf.h.

 getNodeEditor(LWSurfaceID surf) → NodeEditorID

!! NOT DOCUMENTED !!

 getNormalVMap(LWSurfaceID surf) → char

!! NOT DOCUMENTED !!

 getTex(LWSurfaceID surf, char channel) → LWTextureID

Returns a texture ID for the surface parameter that can be used with the Texture Functions global.

 get_float(LWSurfaceID surface, char tag) → PyObject

This proxy method has been deprecated in LightWave 11.6. Please use the getFlt() method instead.

 loadLib(char name) → LWSurfLibID

!! NOT DOCUMENTED !!

 name(LWSurfaceID surf) → char

Returns the name of a surface.

 next(LWSurfaceID surf) → LWSurfaceID

Returns the ID of the next surface in the surfaces list (the one following surf).

 objectLib(char objname) → LWSurfLibID

!! NOT DOCUMENTED !!

 rename(LWSurfaceID surf, char name) → int

!! NOT DOCUMENTED !!

 saveLib(LWSurfLibID lib, char name) → LWError

!! NOT DOCUMENTED !!

 sceneObject(LWSurfaceID surf) → char

Returns the filename of the object to which the surface belongs.

server(self, LWSurfaceID arg1, int arg2) → char
serverFlags(self, LWSurfaceID arg1, int arg2) → unsigned int
serverInstance(self, LWSurfaceID arg1, int arg2) → LWInstance
 setColorVMap(LWSurfaceID surf, char vmapName, int type)

Set the surface's vertex color map. The type can be lwsdk.LWVMAP_RGB (the vmap has a dimension of 3 and contains red, green and blue levels) or lwsdk.LWVMAP_RGBA (dimension of 4, with RGB and alpha levels).

 setEnv(LWSurfaceID surf, char tag, LWEnvelopeID envelope) → int

!! NOT DOCUMENTED !!

 setFlt(LWSurfaceID surface, char tag, sequence data[]) → int
 setImg(LWSurfaceID surf, char tag, LWImageID image) → int

!! NOT DOCUMENTED !!

 setInt(LWSurfaceID surf, char tag, int value) → int

!! NOT DOCUMENTED !!

 setTex(LWSurfaceID surf, char tag, LWTextureID texture) → int

!! NOT DOCUMENTED !!

 set_float(LWSurfaceID surface, char tag, sequence data[]) → int

This proxy method has been deprecated in LightWave 11.6. Please use the setFlt() method instead.

 slibByIndex(LWSurfLibID lib, int idx) → LWSurfaceID

!! NOT DOCUMENTED !!

 slibCount(LWSurfLibID lib) → int

!! NOT DOCUMENTED !!

Previous topic

Server Info

Next topic

Viewport Info

This Page