Drawover (lx-drawover.hpp)

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

Drawing Overrides

This module allows packages to engage in several types of drawing overrides.

Override Interface

The DrawingOverride interface is an optional interface on package servers. This allows the package, when present in a scene, to override the default drawing of the scene in the interactive viewports,

 #define LXu_DRAWINGOVERRIDE     "52429702-1D97-4B00-8154-6510D34EE8CA"

The flags on the interface determine the overrides that it supports.

(2) SDK: DrawingOverride::Flags
         LXxMETHOD( int,
 Flags) (
         LXtObjectID              self);

(3) SDK: LXfDRAWOVER_ITEM_STYLES, etc. defines

Alternate Styles

Get a collection of the affected items

(4) SDK: DrawingOverride::AffectedItems
         LXxMETHOD( LxResult,
 AffectedItems) (
         LXtObjectID              self,
         LXtObjectID              scene,
         LXtObjectID              collection);

Set a specific item and read the style bits for override.

(5) SDK: DrawingOverride::SetItem
         LXxMETHOD( LxResult,
 SetItem) (
         LXtObjectID              self,
         LXtObjectID              item,
         unsigned                *styles);


Read the color for a specific style bit.

(7) SDK: DrawingOverride::GetColor
         LXxMETHOD( LxResult,
 GetColor) (
         LXtObjectID              self,
         unsigned                 style,
         LXtVector4               rgba);

Pass Drawing

Initialize pass drawing with the GL context pointer.

(8) SDK: DrawingOverride::InitContext
         LXxMETHOD( LxResult,
 InitContext) (
         LXtObjectID              self);

Cleanup any state in the GL context.

(9) SDK: DrawingOverride::CleanupContext
         LXxMETHOD( void,
 CleanupContext) (
         LXtObjectID              self);

Allocate a draw visitor. This is an object specific to a scene and a view, and it draws itself when the Visitor::Evaluate() method is called.

(10) SDK: DrawingOverride::DrawVisitor
         LXxMETHOD( LxResult,
 DrawVisitor) (
         LXtObjectID              self,
         LXtObjectID              scene,
         LXtObjectID              view,
         void                   **ppvObj);