About
An implementation of maxon::nodes::PreviewImageProviderInterface provides preview images of a node.
Methods
- Note
 - Initialize() should not take long since it blocks the UI. One should create a clone of the given node graph and access that clone in ComputeIteration().
 
For accessing and searching for nodes in the node graph, see GraphNodes Manual.
Settings provided in Initialize() are:
- maxon::nodes::PREVIEWIMAGEREQUEST::TEXTURESIZE: Defines the requested preview size in pixels.
 
- maxon::nodes::PREVIEWIMAGEREQUEST::SUBJECT: Points to the node requested for preview.
 
- maxon::nodes::PREVIEWIMAGEREQUEST::PROGRESSIONTHRESHOLD: Constraints the iterative refinement.
 
- maxon::nodes::PREVIEWIMAGEREQUEST::URANGE: For 2D previews defines the horizontal range to be sampled.
 
- maxon::nodes::PREVIEWIMAGEREQUEST::VRANGE: For 2D previews defines the vertical range to be sampled.
 
- maxon::nodes::PREVIEWIMAGEREQUEST::SCENETYPE: The type of the 3D scene. See also maxon::nodes::NODESPACE::MATERIALPREVIEWIDS.
 
- maxon::nodes::PREVIEWIMAGEREQUEST::FLIPVERTICALLY: Defines whether a request was made for a flipped version
 
- maxon::nodes::PREVIEWIMAGEREQUEST::TEXTUREIDS: The set of attributes requested for preview.
 
- maxon::nodes::PREVIEWIMAGEREQUEST::PROVIDER: Defines the instance of a PreviewImageProviderRef that is used to compute the preview.
 
  
  
 
  {
 
    
    _imageSize = request.Get(maxon::nodes::PREVIEWIMAGEREQUEST::TEXTURESIZE, 
maxon::IntVector2d());
 
 
    
 
    if (
node.IsValid() == 
false)
 
    {
    }
 
    
    maxon::nodes::NodesGraphModelRef graph = maxon::Cast<maxon::nodes::NodesGraphModelRef>(
node.GetGraph());
 
    _graph = graph.GetManager().GetMainView().Clone() 
iferr_return;
 
 
    
    _nodePath = 
node.GetPath();
 
 
    
    UseVariable(sceneType);
 
  }
Int64 Int
signed 32/64 bit int, size depends on the platform
Definition: apibase.h:187
 
return OK
Definition: apibase.h:2740
 
#define MAXON_SOURCE_LOCATION
Definition: memoryallocationbase.h:69
 
#define MAXON_METHOD
Definition: interfacebase.h:1020
 
SCENETYPE
Definition: previewimageprovider.h:89
 
@ MatPreviewDefault
Default (may be a user preference).
 
#define iferr_scope
Definition: resultbase.h:1396
 
#define iferr_return
Definition: resultbase.h:1531
 
    
  
 
  {
 
    
 
    
 
    
 
    
 
 
    
    {
      {
      }
    }
 
    _final = true;
 
  }
 
  {
 
    
    output._currentIterationIndex = 1;
 
 
    
 
 
  }
 
private:
  maxon::NodePath                  _nodePath;
  maxon::nodes::NodesGraphModelRef _graph;
Definition: basearray.h:415
 
Reference to a job (JobInterface).
Definition: job.h:1241
 
PyObject PyObject * result
Definition: abstract.h:43
 
PyObject * x
Definition: bytesobject.h:38
 
Py_ssize_t char * output
Definition: unicodeobject.h:985
 
bool Bool
boolean type, possible values are only false/true, 8 bit
Definition: apibase.h:180
 
Vec4< Float32 > SampleFloat32
Convenience definitions for the immutable preview image.
Definition: previewimageprovider.h:134
 
#define NewObj(T,...)
Definition: newobj.h:108
 
A vector consisting of three components X, Y and Z.
Definition: vec.h:21
 
A vector consisting of four components X, Y, Z and W.
Definition: vec4.h:21
 
Definition: previewimageprovider.h:281
 
Definition: previewimageprovider.h:246
 
Bool _isFinal
Definition: previewimageprovider.h:265
 
SamplesFloat32ConstRef _samplesFloat32Linear
Definition: previewimageprovider.h:258
 
IntVector2d _imageSize
Definition: previewimageprovider.h:251