proxy (lx_proxy.hpp)

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


Render Proxy

A Render Proxy (more commonly Mesh Proxy) is an item that has a simple, fast and memory efficient representation in GL, while having a much richer representation during actual render. This is a type of procedural item that loads full geometry only when being sampled for rendering.

Scene Contents

ILxSceneContents stores item type, names and bounding box in the scene file.

(1) SDK: LXu_SCENECONTENTS, etc. defines
 #define LXu_SCENECONTENTS       "89448742-E996-11E1-897D-24D86188709B"
 #define LXa_SCENECONTENTS       "sceneContents"

This adds a new item container with type, internal name and user name.

(2) SDK: SceneContents::Item
         LXxMETHOD(  LxResult,
 Item) (
         LXtObjectID              self,
         unsigned int             type,
         const char              *internal_name,
         const char              *user_name);

Set the bounding box to the last item container.

(3) SDK: SceneContents::SetBBox
         LXxMETHOD(  LxResult,
 SetBBox) (
         LXtObjectID              self,
         double                   min_X,
         double                   min_Y,
         double                   min_Z,
         double                   max_X,
         double                   max_Y,
         double                   max_Z);

Set an item to link to the last item container.

(4) SDK: SceneContents::AddLink
         LXxMETHOD(  LxResult,
 AddLink) (
         LXtObjectID              self,
         unsigned int             type,
         const char              *internal_name,
         const char              *user_name);

This returns the number of values currently in the container.

(5) SDK: SceneContents::Count
         LXxMETHOD(  unsigned int,
 Count) (
         LXtObjectID               self);

These get names out of the container.

(6) SDK: SceneContents::InternalName
         LXxMETHOD(  LxResult,
 InternalName) (
         LXtObjectID               self,
         unsigned int              index,
         char                     *buf,
         unsigned                  len);

(7) SDK: SceneContents::UserName
         LXxMETHOD(  LxResult,
 UserName) (
         LXtObjectID               self,
         unsigned int              index,
         char                     *buf,
         unsigned                  len);

This gets bounding box from the container given by the index.

(8) SDK: SceneContents::BBox
         LXxMETHOD(  LxResult,
 BBox) (
         LXtObjectID               self,
         unsigned int              index,
         LXtBBox                  *box);

This gets item type from the container given by the index.

(9) SDK: SceneContents::Type
         LXxMETHOD(  LxResult,
 Type) (
         LXtObjectID               self,
         unsigned int              index,
         unsigned int             *type);

These returns the index of the first container with the given name. If there is no container with the name, it returns LXe_OK, otherwise LXe_NOTFOUND.

(10) SDK: SceneContents::ByInternalName
         LXxMETHOD(  LxResult,
 ByInternalName) (
         LXtObjectID              self,
         const char              *internal_name,
         unsigned int            *index);

(11) SDK: SceneContents::ByUserName
         LXxMETHOD(  LxResult,
 ByUserName) (
         LXtObjectID               self,
         const char              *user_name,
         unsigned int            *index);

Free all item containers.

(12) SDK: SceneContents::Reset
         LXxMETHOD(  LxResult,
 Reset) (
         LXtObjectID               self);

This returns the number of links in the item given by the index.

(13) SDK: SceneContents::LinkCount
         LXxMETHOD(  unsigned int,
 LinkCount) (
         LXtObjectID               self,
         unsigned int              index);

(14) SDK: empty SceneContents User Class

Empty SceneContents Python user class.

(15) PY: empty SceneContents user class
 pass

Proxy Options

ILxProxyOptions interface allows the mesh proxy system to load only parts of the scene. The methods would be called before loading the scene to alter how it loads.

(16) SDK: LXu_PROXYOPTIONS, etc. defines
 #define LXu_PROXYOPTIONS        "68ACA4BE-A274-4D04-A5C9-85ABFA27D2E6"
 #define LXa_PROXYOPTIONS        "proxyOptions"

Set the loader to only parses the LXO file and return a list of the item names it contains.

(17) SDK: ProxyOptions::LoadList
         LXxMETHOD(  LxResult,
 LoadList) (
         LXtObjectID              self);

Set the loader to load not items. This is a prelude to selecting the items to load.

(18) SDK: ProxyOptions::LoadNone
         LXxMETHOD(  LxResult,
 LoadNone) (
         LXtObjectID              self);

Add an item to the set of items to load

(19) SDK: ProxyOptions::AddItem
         LXxMETHOD(  LxResult,
 AddItem) (
         LXtObjectID              self,
         unsigned int             type,
         const char              *internal_name,
         const char              *user_name);

Set flags about the proxy item loading to the loader.

(20) SDK: ProxyOptions::SetFlags
         LXxMETHOD(  LxResult,
 SetFlags) (
         LXtObjectID              self,
         unsigned int             flags);

(21) SDK: LXf_PROPT_ALLOW_NONSURF define

ALLOW_NONSURF The loader allow none surface items to load into the cinema if this is set. Otherwise, it skips loading them.
(22) SDK: empty ProxyOptions User Class

Empty ProxyOptions Python user class.

(23) PY: empty ProxyOptions user class
 pass