ai_imagers.h
Go to the documentation of this file.
1// Copyright 2022 Autodesk, Inc. All rights reserved.
2//
3// Use of this software is subject to the terms of the Autodesk license
4// agreement provided at the time of installation or download, or which
5// otherwise accompanies this software in either electronic or hard copy form.
6
12#pragma once
13#include "ai_nodes.h"
14#include "ai_api.h"
15#include "ai_output_iterator.h"
16#include <stdint.h> // uint32_t etc
17
18// forward declaration
19struct AtOutputIterator;
20
35{
37 {
38 schedule_bucket = false;
39 schedule_full_frame = false;
40 run_once = false;
41 }
42 uint32_t schedule_bucket : 1;
43 uint32_t schedule_full_frame : 1;
44 uint32_t run_once : 1;
48 bool schedule_is_any() const { return schedule_bucket &&
50};
51
54 void (*ImagerEvaluate)(AtRenderSession*, AtNode*, struct AtOutputIterator*, int, int, int, int, uint16_t);
55 void (*ImagerPrepare)(AtRenderSession*, AtNode*, const AtNode*, struct AtOutputIterator*, ImagerProperties&);
56};
57
59#define AI_IMAGER_NODE_EXPORT_METHODS(tag) \
60AI_INSTANCE_COMMON_METHODS \
61imager_evaluate; \
62static AtImagerNodeMethods ai_imager_mtds = { \
63 ImagerEvaluate, \
64 NULL, \
65}; \
66static AtNodeMethods ai_node_mtds = { \
67 &ai_common_mtds, \
68 &ai_imager_mtds \
69}; \
70const AtNodeMethods *tag = &ai_node_mtds;
71
91#define imager_prepare \
92static void ImagerPrepare(AtRenderSession* render_session, AtNode* node, const AtNode* driver, struct AtOutputIterator* iterator, ImagerProperties& properties); \
93AI_OPTIONAL_METHOD_INSTALL(ai_imager_mtds, ImagerPrepare) \
94static void ImagerPrepare(AtRenderSession* render_session, AtNode* node, const AtNode* driver, struct AtOutputIterator* iterator, ImagerProperties& properties)
95
114#define imager_evaluate \
115static void ImagerEvaluate(AtRenderSession* render_session, AtNode* node, struct AtOutputIterator* iterator, int bucket_xo, int bucket_yo, int bucket_size_x, int bucket_size_y, uint16_t tid)
116/* \}*/
117
122AI_API bool AiImagerAddInput(AtRenderSession* render_session, const AtNode* imager, const AtNode* driver, int aov_type, AtString aov_name, AtNode* filter);
123AI_API bool AiImagerAddOutput(AtRenderSession* render_session, const AtNode* imager, const AtNode* driver, int output_type, AtString output_name);
124/* \}*/
125
126/*\}*/
DLL export prefix for API functions (necessary for multi-platform development)
AtNode struct and methods.
AtOutputIterator type and methods.
Arnold String allows for fast string comparisons.
Definition: ai_string.h:54
AI_API bool AiImagerAddOutput(AtRenderSession *render_session, const AtNode *imager, const AtNode *driver, int output_type, AtString output_name)
Adds a new output to be written to out destination driver.
Definition: ai_imagers.cpp:70
AI_API bool AiImagerAddInput(AtRenderSession *render_session, const AtNode *imager, const AtNode *driver, int aov_type, AtString aov_name, AtNode *filter)
Some imagers may need additional information in their evaluation stage.
Definition: ai_imagers.cpp:32
uint32_t run_once
Imager runs only ONCE, at the end of the bucket, or end of the final completed frame.
Definition: ai_imagers.h:44
uint32_t schedule_full_frame
Imager can be run in full frame mode
Definition: ai_imagers.h:43
uint32_t schedule_bucket
Imager can be run in bucket mode
Definition: ai_imagers.h:42
Imager Node methods structure.
Definition: ai_imagers.h:53
This represents a node in Arnold.
This represents an iterator that is used to iterate over group of ouputs in Arnold.
Definition: ai_imagers.h:35

© 2023 Autodesk, Inc. · All rights reserved · www.arnoldrenderer.com