maxon::nodes::PREVIEW Namespace Reference

Namespaces

 IMAGESIZE_PIX
 

Enumerations

enum class  STAGE {
  CALCULATING ,
  ERROR ,
  FINISHED ,
  THREADCANCELLED
}
 
enum class  IMAGESIZE {
  DEFAULT ,
  SMALL ,
  MEDIUM ,
  BIG ,
  LARGE
}
 
enum class  SCENETYPE {
  MatPreviewDefault ,
  MatPreviewFlat2D ,
  MatPreviewCube ,
  MatPreviewPlane ,
  MatPreviewCylinder ,
  MatPreviewTorus ,
  MatPreviewPlaneBack ,
  MatPreviewSphere ,
  MatPreview2Torus ,
  MatPreviewRoundedCube ,
  MatPreviewKnot ,
  MatPreviewMultipleObjects ,
  MatPreviewCandle ,
  MatPreviewCloth ,
  MatPreviewGem ,
  MatPreviewObjectAnim ,
  MatPreviewObject ,
  MatPreviewUser
}
 

Functions

enum maxon::nodes::PREVIEW::STAGE MAXON_ENUM_LIST (STAGE)
 
enum maxon::nodes::PREVIEW::IMAGESIZE MAXON_ENUM_LIST (IMAGESIZE)
 
enum maxon::nodes::PREVIEW::SCENETYPE MAXON_ENUM_LIST (SCENETYPE)
 
 MAXON_ATTRIBUTE (IMAGESIZE, ImageSize, "imagesize")
 
 MAXON_ATTRIBUTE (SCENETYPE, SceneType, "scenetype")
 
 MAXON_ATTRIBUTE (Int, Timestamp, "timestamp")
 

Enumeration Type Documentation

◆ STAGE

enum STAGE
strong

STAGE defines the state of a preview image result.

Enumerator
CALCULATING 

Indicates that the preview computation is still in progress. The result is not final.

ERROR 

Indicates that the preview computation was terminated with an error.

FINISHED 

Indicates that the preview computation finished successfully.

THREADCANCELLED 

Indicates that the preview computation was interrupted.

◆ IMAGESIZE

enum IMAGESIZE
strong

IMAGESIZE defines the size of the node preview in the GUI.

Enumerator
DEFAULT 

Use system default.

SMALL 

Small.

MEDIUM 

Medium.

BIG 

Big.

LARGE 

Large.

◆ SCENETYPE

enum SCENETYPE
strong

SCENETYPE defines the choice for the 3D scene to be used in a node preview. This property only applies to nodes of an Id that as been assigned to maxon::nodes::NODESPACE::MATERIALPREVIEWIDS .

The files used by the Standard Space are located in the resource folder '$C4D/resource/modules/xtensions/preview_scenes/'. Note that this list should be kept in sync with MatPreviewType defined in customgui_matpreview.h .

Enumerator
MatPreviewDefault 

Default (may be a user preference).

MatPreviewFlat2D 

Flat 2D.

MatPreviewCube 

Cube.

MatPreviewPlane 

Plane.

MatPreviewCylinder 

Cylinder.

MatPreviewTorus 

Torus.

MatPreviewPlaneBack 

Plane Backlight.

MatPreviewSphere 

Sphere.

MatPreview2Torus 

Double Torus.

MatPreviewRoundedCube 

Rounded Cube.

MatPreviewKnot 

Knot.

MatPreviewMultipleObjects 

Multiple Objects.

MatPreviewCandle 

Candle.

MatPreviewCloth 

Cloth.

MatPreviewGem 

Gem.

MatPreviewObjectAnim 

Animated Object.

MatPreviewObject 

Object.

MatPreviewUser 

User.

Function Documentation

◆ MAXON_ENUM_LIST() [1/3]

enum maxon::nodes::PREVIEW::STAGE maxon::nodes::PREVIEW::MAXON_ENUM_LIST ( STAGE  )

◆ MAXON_ENUM_LIST() [2/3]

enum maxon::nodes::PREVIEW::IMAGESIZE maxon::nodes::PREVIEW::MAXON_ENUM_LIST ( IMAGESIZE  )

◆ MAXON_ENUM_LIST() [3/3]

enum maxon::nodes::PREVIEW::SCENETYPE maxon::nodes::PREVIEW::MAXON_ENUM_LIST ( SCENETYPE  )

◆ MAXON_ATTRIBUTE() [1/3]

maxon::nodes::PREVIEW::MAXON_ATTRIBUTE ( IMAGESIZE  ,
ImageSize  ,
"imagesize"   
)

Node preview type and size.

◆ MAXON_ATTRIBUTE() [2/3]

maxon::nodes::PREVIEW::MAXON_ATTRIBUTE ( SCENETYPE  ,
SceneType  ,
"scenetype"   
)

◆ MAXON_ATTRIBUTE() [3/3]

maxon::nodes::PREVIEW::MAXON_ATTRIBUTE ( Int  ,
Timestamp  ,
"timestamp"   
)

The timestamp allows manual control over triggering a preview request on value change.

The preview thumbnails of a particular node can be forced to update as following:

maxon::GraphTransaction transaction = graph.BeginTransaction() iferr_return;
const Int currentTimestamp = node.GetValue(maxon::nodes::PREVIEW::Timestamp).GetValueOrNull() iferr_return;
node.SetValue(maxon::nodes::PREVIEW::Timestamp, currentTimestamp + 1) iferr_return;
transaction.Commit() iferr_return;
Definition: graph.h:966
Result< void > Commit(const DataDictionary &userData=GetPtrSizedZeroRef< DataDictionary >(), Bool validate=true)
maxon::Int Int
Definition: ge_sys_math.h:64
#define iferr_return
Definition: resultbase.h:1465
Definition: node.h:10