This global provides access to a user interface for editing textures. If you use XPanels with vparms that can be textured, the interaction with the texture editor is handled for you, and you don’t need this global. But if your interface is built with classic Panels or OS-specific elements, you can use this global to provide your users with the standard texture interface.
Bases: object
Proxy of C++ PCore::LWTxtrEdFuncs class
Close the texture editor window.
Returns the texture layer currently being edited.
True if the editor window is currently open.
Open the texture editor window.
Redraw the editor window.
Add the texture txtr_id
to a multi-selection.
Clear the selection list.
Enumerate the selected textures. Returns the first texture.
Enumerate the selected textures. Returns the texture that follows txtr_id
.
Remove the texture txtr_id
from a multi-selection.
Set a callback for autosize requests from gradient texture layers.
NOTE: For reasons of internal mapping, the self
argument should be your class instance. This differs from the SDK function.
Move the editor window. The coordinates are for the upper left corner of the window.
Initialize the texture editor with the texture to be edited.
Returns an identifier that plug-ins use in later calls to the texture editor functions. The callbacks are optional (pass None
if you do not wish to define one) and are called when the user removes or autosizes a texture, or does anything with it in the editor. The data
argument is passed to these callbacks; for reasons of internal mapping, this needs to be your self
instance.
The flags
determine what the user can do in the editor and can be one or more of the following:
lwsdk.TEF_USEBTN
Add use/remove buttons at the bottom of the pane.
lwsdk.TEF_OPACITY
Add layer opacity settings.
lwsdk.TEF_BLEND
Add blend options to the layer global settings.
lwsdk.TEF_TYPE
Add layer type control on the top of the pane.
lwsdk.TEF_LAYERS
Add layer list pane on the left side of the pane.
lwsdk.TEF_ALL
All of the above flags. This is the standard configuration for the texture editor.
Free resources allocated by LWTxtrEdFuncs.subscribe()
. This call invalidates the client ID. You'll need to call LWTxtrEdFuncs.subscribe()
again before calling the texture editor functions.