maxon::nodes::PREVIEWIMAGEREQUEST Namespace Reference

Functions

 MAXON_ATTRIBUTE (IntVector2d, TEXTURESIZE, "net.maxon.nodes.previewimagerequest.texturesize")
 
 MAXON_ATTRIBUTE (Bool, FLIPVERTICALLY, "net.maxon.nodes.previewimagerequest.flipvertically")
 
 MAXON_ATTRIBUTE (Int, PROGRESSIONTHRESHOLD, "net.maxon.nodes.previewimagerequest.progressionthreshold")
 
 MAXON_ATTRIBUTE (Range< Float >, URANGE, "net.maxon.nodes.previewimagerequest.urange")
 
 MAXON_ATTRIBUTE (Range< Float >, VRANGE, "net.maxon.nodes.previewimagerequest.vrange")
 
 MAXON_ATTRIBUTE (PREVIEW::SCENETYPE, SCENETYPE, "net.maxon.nodes.previewimagerequest.scenetype")
 
 MAXON_ATTRIBUTE (GraphNode, SUBJECT, "net.maxon.nodes.previewimagerequest.subject")
 
 MAXON_ATTRIBUTE (Array< Id >, TEXTUREIDS, "net.maxon.nodes.previewimagerequest.textureids")
 
 MAXON_ATTRIBUTE (Class< PreviewImageProviderRef >, PROVIDER, "net.maxon.nodes.previewimagerequest.provider")
 
 MAXON_ATTRIBUTE (maxon::InternedId, INTENT, "net.maxon.nodes.previewimagerequest.intent")
 
 MAXON_ATTRIBUTE (void, INTENT_NODE2D, "net.maxon.nodes.previewimagerequest.intent_node2d")
 
 MAXON_ATTRIBUTE (void, INTENT_MATERIALEXCHANGE, "net.maxon.nodes.previewimagerequest.intent_materialexchange")
 
 MAXON_ATTRIBUTE (void, INTENT_GRADIENTBAR, "net.maxon.nodes.previewimagerequest.intent_gradientbar")
 
 MAXON_ATTRIBUTE (void, INTENT_GRADIENTAVERAGE, "net.maxon.nodes.previewimagerequest.intent_gradientaverage")
 

Function Documentation

◆ MAXON_ATTRIBUTE() [1/14]

maxon::nodes::PREVIEWIMAGEREQUEST::MAXON_ATTRIBUTE ( IntVector2d  ,
TEXTURESIZE  ,
"net.maxon.nodes.previewimagerequest.texturesize"   
)

Defines the requested preview size in pixels.

◆ MAXON_ATTRIBUTE() [2/14]

maxon::nodes::PREVIEWIMAGEREQUEST::MAXON_ATTRIBUTE ( Bool  ,
FLIPVERTICALLY  ,
"net.maxon.nodes.previewimagerequest.flipvertically"   
)

Defines whether a request was made for a flipped version.

Note that this attribute is managed internally and the flip is performed automatically on the provided SamplesFloat32ConstRef buffer.

◆ MAXON_ATTRIBUTE() [3/14]

maxon::nodes::PREVIEWIMAGEREQUEST::MAXON_ATTRIBUTE ( Int  ,
PROGRESSIONTHRESHOLD  ,
"net.maxon.nodes.previewimagerequest.progressionthreshold"   
)

Constraints the iterative refinement from 1*1 to w*h sized results. 0: only one iteration with size w*h is performed 1: iterations from 1*1 to w*h are performed. The progression is effectively doubling with each iteration. Taken samples are re-used during refinement n: the first iteration has at least size a*b, where a,b = [1,n]. It is guaranteed that the lowest iteration has at most n samples in the largest dimension. Note it may have only 1 sample in the other dimension.

In order to query whether a provider should provide progressive results, or not (because the requester is waiting for the final results), it is sufficient to check this:

const maxon::Bool renderProgressively = request.Get<maxon::UInt32>(maxon::nodes::PREVIEWIMAGEREQUEST::PROGRESSIONTHRESHOLD, maxon::UInt32(1)) != maxon::UInt32(0);
uint32_t UInt32
32 bit unsigned integer datatype.
Definition: apibase.h:177
bool Bool
boolean type, possible values are only false/true, 8 bit
Definition: apibase.h:181

Please note that a provider does not have to follow the above-outlined range handling. The progression can be freely defined.

◆ MAXON_ATTRIBUTE() [4/14]

maxon::nodes::PREVIEWIMAGEREQUEST::MAXON_ATTRIBUTE ( Range< Float ,
URANGE  ,
"net.maxon.nodes.previewimagerequest.urange"   
)

For 2D previews defines the horizontal range to be sampled. A full range is defined by URANGE = [0.0, 1.0]. Currently, this is only used by the gradient bar preview. All other previews are expected to be previewed in full.

◆ MAXON_ATTRIBUTE() [5/14]

maxon::nodes::PREVIEWIMAGEREQUEST::MAXON_ATTRIBUTE ( Range< Float ,
VRANGE  ,
"net.maxon.nodes.previewimagerequest.vrange"   
)

For 2D previews defines the vertical range to be sampled. A full range is defined by VRANGE = [0.0, 1.0]. Currently, this is only used by the gradient bar preview. All other previews are expected to be previewed in full.

◆ MAXON_ATTRIBUTE() [6/14]

maxon::nodes::PREVIEWIMAGEREQUEST::MAXON_ATTRIBUTE ( PREVIEW::SCENETYPE  ,
SCENETYPE  ,
"net.maxon.nodes.previewimagerequest.scenetype"   
)

The type of the 3D scene.

It is only defined for 3d previews, i.e. when the SUBJECT has a maxon::Id that was added to maxon::nodes::NODESPACE::MATERIALPREVIEWIDS .

◆ MAXON_ATTRIBUTE() [7/14]

maxon::nodes::PREVIEWIMAGEREQUEST::MAXON_ATTRIBUTE ( GraphNode  ,
SUBJECT  ,
"net.maxon.nodes.previewimagerequest.subject"   
)

SUBJECT points to the node requested for preview. Specifically, it may either directly point to the output (sampling) port of the node, or it may point to the node itself, accompanied with a set of TEXTUREIDS.

◆ MAXON_ATTRIBUTE() [8/14]

maxon::nodes::PREVIEWIMAGEREQUEST::MAXON_ATTRIBUTE ( Array< Id ,
TEXTUREIDS  ,
"net.maxon.nodes.previewimagerequest.textureids"   
)

The set of attributes requested for preview, e.g. by the viewport. The expected result is a stack of textures. For example, one entry may hold the value maxon::NODESPACE::EXCHANGE::BUNDLE::VIEWPORTMATERIAL::SPECULAR_COLOR to indicate a request to bake specular color.

◆ MAXON_ATTRIBUTE() [9/14]

maxon::nodes::PREVIEWIMAGEREQUEST::MAXON_ATTRIBUTE ( Class< PreviewImageProviderRef >  ,
PROVIDER  ,
"net.maxon.nodes.previewimagerequest.provider"   
)

Defines the instance of a PreviewImageProviderRef that is used to compute the preview. Generally, it is expected to be populated in calls to MaterialExchangeInterface::ConfigureTextureProviderRequest(), and NodeSpaceDataInterface::ConfigurePreviewImageRequestFunc()

This attribute effectively defines a instantiation factory for your preview baker.

◆ MAXON_ATTRIBUTE() [10/14]

maxon::nodes::PREVIEWIMAGEREQUEST::MAXON_ATTRIBUTE ( maxon::InternedId  ,
INTENT  ,
"net.maxon.nodes.previewimagerequest.intent"   
)

INTENT gives and indication of the intention for preview query of a particular subject. Most previews are used by the viewport in form of a texture stack or by 2D GUI components in form of (shared) thumbnail images.

◆ MAXON_ATTRIBUTE() [11/14]

maxon::nodes::PREVIEWIMAGEREQUEST::MAXON_ATTRIBUTE ( void  ,
INTENT_NODE2D  ,
"net.maxon.nodes.previewimagerequest.intent_node2d"   
)

Used for previews in node editor, attribute manager, material manager.

◆ MAXON_ATTRIBUTE() [12/14]

maxon::nodes::PREVIEWIMAGEREQUEST::MAXON_ATTRIBUTE ( void  ,
INTENT_MATERIALEXCHANGE  ,
"net.maxon.nodes.previewimagerequest.intent_materialexchange"   
)

Used for material preview in viewport and material export.

◆ MAXON_ATTRIBUTE() [13/14]

maxon::nodes::PREVIEWIMAGEREQUEST::MAXON_ATTRIBUTE ( void  ,
INTENT_GRADIENTBAR  ,
"net.maxon.nodes.previewimagerequest.intent_gradientbar"   
)

Used for gradient preview bar in attribute manager (overlayed by knots and other gizmos).

◆ MAXON_ATTRIBUTE() [14/14]

maxon::nodes::PREVIEWIMAGEREQUEST::MAXON_ATTRIBUTE ( void  ,
INTENT_GRADIENTAVERAGE  ,
"net.maxon.nodes.previewimagerequest.intent_gradientaverage"   
)

Used for gradient knot creation to determine knot color.