Customview (lx-customview.hpp)

From The Foundry MODO SDK wiki
(Redirected from ILxCustomPaneID (index))
Jump to: navigation, search
There are security restrictions on this page


This interface is what is passed to the plugin and used to obtain the parent's pointer. Could be extended to return other useful bits of information, but at the moment just contains the window handle to parent with

(1) SDK: LXu_CUSTOMPANE, etc. defines
 #define LXu_CUSTOMPANE                  "7412C685-3ED9-4622-915F-253105012BC4"
 #define LXa_CUSTOMPANE                  "custompane"

Returns the parent window handle for the custom pane, which can be used to parent any user generated UI. In Python this will be returned as an int representing a pointer, and will need to be converted into a proper PyObject.

(2) SDK: CustomPane::GetParent
         LXxMETHOD(  LxResult,
 GetParent) (
         LXtObjectID              self,
         LXtPaneHandleID         *handle );

Returns the unique identifier for the instance of the CustomPane. This is useful for storing state for the particular instance of the pane in the config, for example.

(3) SDK: CustomPane::GetIdentifier
         LXxMETHOD( LxResult,
 GetIdentifier) (
         LXtObjectID              self,
         const char**             ident );

Empty CustomPane Python user class.

(4) PY: empty CustomPane user class


This interace defines a CustomView client, which is able to use Python calls (or whatever) to populate a Custom-based interface

(5) SDK: LXtPaneHandleID typedef (types)
 typedef void*    LXtPaneHandleID;

(6) SDK: LXu_CUSTOMVIEW, etc. defines
 #define LXu_CUSTOMVIEW                  "b427f640-821a-48ee-b7ec-f4aafe799695"
 #define LXa_CUSTOMVIEW                  "customview"

Servers are expected to expose tags that define their viewport type. These allow them to show up as first-class viewports. If the TYPE tag is not present, then they can still be instanced from a Custom Viewport view's viewport options.

(7) SDK: LXsCUSTOMVIEW_TYPE, etc. defines
 #define LXsCUSTOMVIEW_TYPE              "CustomViewType"
 #define LXsCUSTOMVIEW_EMBEDABILITY      "CustomViewEmbedability"
 #define LXsCUSTOMVIEW_OPTIONS_FORM      "CustomViewOptionsForm"

TYPE This tag consists of four space-delimited strings: - The class of the viewport, mostly for organizational purposes. Options include: vp3dEdit, vptoolbars, vpproperties, vpdataLists, vpinfo, vpeditors, vputility, and vpapplication. - Exactly four characters representing the viewport's type as an LXtID4. - An internal string representing the viewport's type as a name. - A message table lookup in the form of "@table@message@"

For example: "vpapplication MYVP myViewportTypeName @myViewportTypeTable@myViewportTypeUsername@"

EMBEDABILITY Determines how the viewport can be embedded into a Form View. Thre are three options: - "normal", which is the default mode if this tag isn't set, indicates that the viewport doesn't specifically support embedding. These can still be embedded via viewport presets, but they may not display properly. - "embedAware", meaning that the viewport knows how to handle embedding. - "embedOnly", meaning the viewport can only be embedded and cannot be used in normal layouts.
OPTIONS_FORM A string representing the hash of a form to display when the user clicks the gear widget for the viewport.

This is called to tell the server to set up as part of the widget with the name provided.

(8) SDK: CustomView::Init
         LXxMETHOD(  LxResult,
 Init) (
         LXtObjectID              self,
         LXtObjectID              pane );

This is called to clean up the widget just before the view is torn down.

(9) SDK: CustomView::Cleanup
         LXxMETHOD(  LxResult,
 Cleanup) (
         LXtObjectID             self,
         LXtObjectID             pane);

These methods are called to load or save any per-instance state for the pane provided.

(10) SDK: CustomView::StoreState, etc.
         LXxMETHOD(  LxResult,
 StoreState) (
         LXtObjectID              self,
         LXtObjectID              pane );
         LXxMETHOD(  LxResult,
 RestoreState) (
         LXtObjectID              self,
         LXtObjectID              pane );

Empty CustomView Python user class.

(11) PY: empty CustomView user class