4#if !defined(_M_AMD64) && !defined(__amd64__) && !defined(_M_ARM64) && !defined(__aarch64__)
5 #error "V-Ray supports only 64-bit architectures"
9 #include "vraythrow.hpp"
28#include "_vraysdk_utils.hpp"
30#define VRAY_MINIMUM2(a, b) ((a) < (b) ? (a) : (b))
31#define VRAY_MAXIMUM2(a, b) ((a) > (b) ? (a) : (b))
32#define VRAY_MAXIMUM3(a, b, c) VRAY_MAXIMUM2(VRAY_MAXIMUM2(a, b), c)
33#define VRAY_MAXIMUM4(a, b, c, d) VRAY_MAXIMUM2(VRAY_MAXIMUM3(a, b, c), d)
36#if defined(VRAY_ALLOW_UNSAFE_NATIVE_HANDLE) || (!defined(_WIN32) && !defined(__APPLE__))
37 typedef void* NativeWindowHandle;
38 typedef void* NativeWidgetHandle;
42 typedef struct HWND__ *HWND;
44 typedef HWND NativeWindowHandle;
45 typedef HWND NativeWidgetHandle;
48 #define VRAY_FORWARD_DECLARE_OBJC_CLASS(classname) @class classname
50 #define VRAY_FORWARD_DECLARE_OBJC_CLASS(classname) typedef struct objc_object classname
52 VRAY_FORWARD_DECLARE_OBJC_CLASS(NSWindow);
53 typedef NSWindow *NativeWindowHandle;
54 VRAY_FORWARD_DECLARE_OBJC_CLASS(NSView);
55 typedef NSView *NativeWidgetHandle;
62 inline float linear_to_srgb(
float x) {
63 if (x <= 0.0031308f) {
66 x = 1.055f*powf(x, 1.0f/2.4f)-0.055f;
70 inline float srgb_to_linear(
float x) {
74 x = powf((x+0.055f)/1.055f, 2.4f);
79 inline float interpolate(
float x,
float a,
float b)
noexcept {
80 return (b - a) * x + a;
86# pragma warning(disable: 4201)
90# define VRAY_DEPRECATED(msg) __declspec(deprecated(msg))
93# if defined(__clang__) || COMPILER_VERSION >= 450
94# define VRAY_DEPRECATED(msg) __attribute__((deprecated(msg)))
96# define VRAY_DEPRECATED(msg) __attribute__((deprecated))
100#ifdef VRAY_SDK_INTEROPERABILITY
106 struct TraceTransform;
129 RENDERING_AWAITING_CHANGES,
132 enum AddHostsResult {
133 FAILED_TO_RESOLVE = -2,
135 FAILED_TO_CONNECT = 0,
136 SUCCESSFULLY_ADDED = 1,
137 SUCCESS_BUT_NO_WORK = 2,
157 TYPE_TEXTUREFLOAT = 13,
158 TYPE_TEXTUREINT = 14,
159 TYPE_TEXTUREVECTOR = 15,
160 TYPE_TEXTUREMATRIX = 16,
161 TYPE_TEXTURETRANSFORM = 17,
164 TYPE_GENERAL_LIST = TYPE_LIST,
167 TYPE_TYPED_LIST_BASE = 100,
168 TYPE_INT_LIST = TYPE_TYPED_LIST_BASE + TYPE_INT,
169 TYPE_FLOAT_LIST = TYPE_TYPED_LIST_BASE + TYPE_FLOAT,
170 TYPE_DOUBLE_LIST = TYPE_TYPED_LIST_BASE + TYPE_DOUBLE,
171 TYPE_BOOL_LIST = TYPE_TYPED_LIST_BASE + TYPE_BOOL,
172 TYPE_VECTOR_LIST = TYPE_TYPED_LIST_BASE + TYPE_VECTOR,
173 TYPE_COLOR_LIST = TYPE_TYPED_LIST_BASE + TYPE_COLOR,
174 TYPE_ACOLOR_LIST = TYPE_TYPED_LIST_BASE + TYPE_ACOLOR,
175 TYPE_MATRIX_LIST = TYPE_TYPED_LIST_BASE + TYPE_MATRIX,
176 TYPE_TRANSFORM_LIST = TYPE_TYPED_LIST_BASE + TYPE_TRANSFORM,
177 TYPE_STRING_LIST = TYPE_TYPED_LIST_BASE + TYPE_STRING,
178 TYPE_PLUGIN_LIST = TYPE_TYPED_LIST_BASE + TYPE_PLUGIN,
179 TYPE_TEXTURE_LIST = TYPE_TYPED_LIST_BASE + TYPE_TEXTURE,
180 TYPE_TEXTUREFLOAT_LIST = TYPE_TYPED_LIST_BASE + TYPE_TEXTUREFLOAT,
181 TYPE_TEXTUREINT_LIST = TYPE_TYPED_LIST_BASE + TYPE_TEXTUREINT,
182 TYPE_TEXTUREVECTOR_LIST = TYPE_TYPED_LIST_BASE + TYPE_TEXTUREVECTOR,
183 TYPE_TEXTUREMATRIX_LIST = TYPE_TYPED_LIST_BASE + TYPE_TEXTUREMATRIX,
184 TYPE_TEXTURETRANSFORM_LIST = TYPE_TYPED_LIST_BASE + TYPE_TEXTURETRANSFORM,
187 TYPE_OUTPUTTEXTURE = 1000,
188 TYPE_OUTPUTTEXTUREFLOAT = 1001,
189 TYPE_OUTPUTTEXTUREINT = 1002,
190 TYPE_OUTPUTTEXTUREVECTOR = 1003,
191 TYPE_OUTPUTTEXTUREMATRIX = 1004,
192 TYPE_OUTPUTTEXTURETRANSFORM = 1005,
194 TYPE_UNSPECIFIED = 10000,
207 enum LicenseUserStatus :
int {
211 ActiveUserPresent = 3,
217 ImagePass_LightCache = 1,
218 ImagePass_IrradianceMap = 2,
222 enum DefaultsPreset {
231 enum VFBRenderElementType {
232 renderElementType_lightMix=0,
233 renderElementType_denoiser,
235 renderElementType_last
243 ImageRegion(
int x = 0,
int y = 0,
int w = 0,
int h = 0) {
247 void set(
int x,
int y,
int w,
int h) {
262 void setWidth(
int width) {
266 void setHeight(
int height) {
278 int getWidth()
const {
282 int getHeight()
const {
287 typedef unsigned long long InstanceId;
288 typedef unsigned long long PluginTypeId;
289 constexpr InstanceId NO_ID = InstanceId(-1);
290 constexpr PluginTypeId NO_TYPE_ID = PluginTypeId(-1);
293 static_assert(
sizeof(InstanceId) == 8,
"InstanceId should be 8 bytes long");
294 static_assert(
sizeof(PluginTypeId) == 8,
"PluginTypeId should be 8 bytes long");
296 constexpr int INSTANCE_ID_BITS = 48;
300 inline InstanceId combineInstanceIdAndTypeIndex(InstanceId
id,
int typeIdIdx) {
301 return (
id & ((InstanceId(1) << INSTANCE_ID_BITS) - 1)) | (InstanceId(typeIdIdx) << INSTANCE_ID_BITS);
305 typedef int LayerUID;
306 const LayerUID NO_LAYER_ID = -1;
309 namespace VFBLayerProperty {
447 typedef unsigned char byte;
448 typedef signed char sbyte;
460 typedef std::vector<int> IntList;
461 typedef std::vector<float> FloatList;
462 typedef std::vector<Color> ColorList;
463 typedef std::vector<Vector> VectorList;
464 typedef std::vector<Transform> TransformList;
465 typedef std::vector<Value> ValueList;
466 typedef std::vector<std::string> StringList;
467 typedef std::vector<Plugin> PluginList;
477 const void* getData()
const {
478 return static_cast<const void*
>(
this);
481 return static_cast<void*
>(
this);
483 void operator delete(
void* ptr);
493 #pragma pack(push, 1)
497 unsigned short bfType;
508 unsigned short biPlanes;
509 unsigned short biBitCount;
510 unsigned biCompression;
511 unsigned biSizeImage;
515 unsigned biClrImportant;
520 void* getPixels()
const {
524 unsigned getRowStride()
const {
525 return (getWidth()*(biBitCount/8) + 3) & ~3;
528 int getWidth()
const {
532 int getHeight()
const {
533 return abs(biHeight);
536 int getBitsPerPixel()
const {
549 static VRayImage* create(
int width,
int height);
550 void operator delete (
void *bmp);
553 int getWidth()
const;
554 int getHeight()
const;
555 bool getSize(
int& width,
int& height)
const;
620 static void loadSize(
const char* fileName,
int& width,
int& height);
622 static void loadSize(
const std::string& fileName,
int& width,
int& height);
648 enum WhiteBalanceMode {
650 WHITE_BALANCE_AVERAGE,
651 WHITE_BALANCE_WEIGHTED_AVERAGE,
652 WHITE_BALANCE_HIGHLIGHTS
667 bool addColor(
const Color& color);
668 bool addColor(
const AColor& color);
669 bool mulColor(
const AColor& color);
670 bool changeExposure(
float ev);
671 bool changeContrast(
float contrast);
674 bool saveToBmp(
const char* fileName,
bool preserveAlpha =
false,
bool swapChannels =
false)
const;
675 bool saveToBmp(
const char* fileName,
const VRayRenderer& renderer,
bool preserveAlpha =
false,
bool swapChannels =
false)
const;
676 bool saveToBmp(
const std::string& fileName,
bool preserveAlpha =
false,
bool swapChannels =
false)
const;
677 bool saveToBmp(
const std::string& fileName,
const VRayRenderer& renderer,
bool preserveAlpha =
false,
bool swapChannels =
false)
const;
679 bool saveToPng(
const char* fileName,
bool preserveAlpha =
false,
int bitsPerChannel = 8)
const;
680 bool saveToPng(
const char* fileName,
const VRayRenderer& renderer,
bool preserveAlpha =
false,
int bitsPerChannel = 8)
const;
681 bool saveToPng(
const std::string& fileName,
bool preserveAlpha =
false,
int bitsPerChannel = 8)
const;
682 bool saveToPng(
const std::string& fileName,
const VRayRenderer& renderer,
bool preserveAlpha =
false,
int bitsPerChannel = 8)
const;
684 bool saveToJpeg(
const char* fileName,
int quality = 0)
const;
685 bool saveToJpeg(
const char* fileName,
const VRayRenderer& renderer,
int quality = 0)
const;
686 bool saveToJpeg(
const std::string& fileName,
int quality = 0)
const;
687 bool saveToJpeg(
const std::string& fileName,
const VRayRenderer& renderer,
int quality = 0)
const;
689 bool saveToTiff(
const char* fileName,
int bitsPerChannel = 16)
const;
690 bool saveToTiff(
const char* fileName,
const VRayRenderer& renderer,
int bitsPerChannel = 16)
const;
691 bool saveToTiff(
const std::string& fileName,
int bitsPerChannel = 16)
const;
692 bool saveToTiff(
const std::string& fileName,
const VRayRenderer& renderer,
int bitsPerChannel = 16)
const;
694 bool saveToExr(
const char* fileName)
const;
695 bool saveToExr(
const char* fileName,
const VRayRenderer& renderer)
const;
696 bool saveToExr(
const std::string& fileName)
const;
697 bool saveToExr(
const std::string& fileName,
const VRayRenderer& renderer)
const;
702 Bmp*
compressToBmp(
size_t& size,
bool preserveAlpha =
false,
bool swapChannels =
false)
const;
739 MemoryBuffer*
toBitmapData(
size_t& size,
bool preserveAlpha =
false,
bool swapChannels =
false,
bool reverseY =
false,
int stride = 0,
int alphaValue = -1)
const;
811 enum CompressionType {
833 struct {
float x, y, z; };
842 Vector() noexcept : x(), y(), z() {}
844 template <
typename T1,
typename T2,
typename T3>
845 Vector(T1 x, T2 y, T3 z) noexcept : x(
float(x)), y(
float(y)), z(
float(z)) {}
847 template <
typename T>
848 explicit Vector(T value) noexcept : x(
float(value)), y(
float(value)), z(
float(value)) {}
850 std::string toString()
const;
853 template <
typename T1,
typename T2,
typename T3>
855 x = float(x_), y = float(y_), z = float(z_);
867 x += other.x, y += other.y, z += other.z;
873 x -= other.x, y -= other.y, z -= other.z;
879 x *= float(factor), y *= float(factor), z *= float(factor);
885 x *= factor, y *= factor, z *= factor;
891 x *= float(factor), y *= float(factor), z*=float(factor);
897 x/=float(divisor); y/=float(divisor); z/=float(divisor);
903 x/=divisor; y/=divisor; z/=divisor;
909 x/=float(divisor); y/=float(divisor); z/=float(divisor);
915 return Vector(-x, -y, -z);
930 return sqrtf(x*x + y*y + z*z);
935 return x*x + y*y + z*z;
1017 return double(a.x)*double(b.x) + double(a.y)*double(b.y) + double(a.z)*double(b.z);
1039 return Vector(a.x/b.x, a.y/b.y, a.z/b.z);
1045 return Vector(a.x*b.x, a.y*b.y, a.z*b.z);
1051 return a.x != b.x || a.y != b.y || a.z != b.z;
1058 return a.x == b.x && a.y == b.y && a.z == b.z;
1065 double(a.y)*
double(b.z) -
double(b.y)*
double(a.z),
1066 double(a.z)*
double(b.x) -
double(b.z)*
double(a.x),
1067 double(a.x)*
double(b.y) -
double(b.x)*
double(a.y)
1075 (
double(a.y)*
double(b.z) -
double(b.y)*
double(a.z))*double(c.x)+
1076 (double(a.z)*double(b.x) - double(b.z)*double(a.x))*
double(c.y)+
1077 (double(a.x)*double(b.y) - double(b.x)*double(a.y))*
double(c.z);
1095 return a.lengthSqr();
1101 float oldLen = length();
1103 Vector d = axis ^ (*this);
1106 float newLen = d.
length();
1108 (*this) = d*oldLen/newLen;
1119 inline std::ostream& operator <<(std::ostream& stream,
const Vector& vector) {
1120 stream <<
"Vector(" << vector.x <<
", " << vector.y <<
", " << vector.z <<
")";
1124 inline std::string Vector::toString()
const {
1125 std::ostringstream stream;
1127 return stream.str();
1134 struct {
float r, g, b; };
1140 Color& operator=(
const Color&)
noexcept =
default;
1141 Color& operator=(
Color&&)
noexcept =
default;
1143 Color() noexcept : r(), g(), b() {}
1145 template <
typename T1,
typename T2,
typename T3>
1146 Color(T1 r, T2 g, T3 b) noexcept : r(
float(r)), g(
float(g)), b(
float(b)) {}
1148 template <
typename T>
1149 explicit Color(
const T& value) noexcept : r(
float(value)), g(
float(value)), b(
float(value)) {}
1174 return (r + g + b) * (1.0f / 3.0f);
1179 const float RED_LUMINANCE_COMPONENT = 0.3f;
1180 const float GREEN_LUMINANCE_COMPONENT = 0.59f;
1181 const float BLUE_LUMINANCE_COMPONENT = 0.11f;
1182 return RED_LUMINANCE_COMPONENT * r + GREEN_LUMINANCE_COMPONENT * g + BLUE_LUMINANCE_COMPONENT * b;
1187 return r * r + g * g + b * b;
1192 return sqrtf(r * r + g * g + b * b);
1203 if (k == 1.0f)
return;
1204 float grey = (r + g + b) / 3.0f;
1205 r = Internal::interpolate(k, grey, r);
1206 g = Internal::interpolate(k, grey, g);
1207 b = Internal::interpolate(k, grey, b);
1214 if (k == 1.0f)
return;
1215 r = (r - middle) * k + middle;
1216 g = (g - middle) * k + middle;
1217 b = (b - middle) * k + middle;
1222 return Color(std::fmaxf(0.0f, 1.0f - r), std::fmaxf(0.0f, 1.0f - g), std::fmaxf(0.0f, 1.0f - b));
1228 r = std::fmaxf(0.0f, 1.0f - r);
1229 g = std::fmaxf(0.0f, 1.0f - g);
1230 b = std::fmaxf(0.0f, 1.0f - b);
1233 std::string toString()
const;
1262 float f =
static_cast<float>(factor);
1279 float f =
static_cast<float>(factor);
1296 float f =
static_cast<float>(factor);
1313 float f =
static_cast<float>(factor);
1321 const float rg = r > g ? r : g;
1322 return rg > b ? rg : b;
1328 color2.r = Internal::srgb_to_linear(color2.r);
1329 color2.g = Internal::srgb_to_linear(color2.g);
1330 color2.b = Internal::srgb_to_linear(color2.b);
1337 color2.r = Internal::linear_to_srgb(color2.r);
1338 color2.g = Internal::linear_to_srgb(color2.g);
1339 color2.b = Internal::linear_to_srgb(color2.b);
1345 std::ostream& operator <<(std::ostream& stream,
const Color& color);
1348 inline Color operator +(
const Color& a,
const Color& b)
noexcept {
1357 inline Color operator -(
const Color& a,
const Color& b)
noexcept {
1366 inline Color operator *(
const Color& a,
const Color& b)
noexcept {
1377 inline Color operator *(
const Color& a,
int factor)
noexcept {
1378 float f =
static_cast<float>(factor);
1379 return Color(a.r * f, a.g * f, a.b * f);
1385 inline Color operator *(
const Color& a,
float factor)
noexcept {
1386 return Color(a.r * factor, a.g * factor, a.b * factor);
1392 inline Color operator *(
const Color& a,
double factor)
noexcept {
1393 float f =
static_cast<float>(factor);
1394 return Color(a.r * f, a.g * f, a.b * f);
1400 inline Color operator *(
int factor,
const Color& a)
noexcept {
1401 return a * float(factor);
1407 inline Color operator *(
float factor,
const Color& a)
noexcept {
1414 inline Color operator *(
double factor,
const Color& a)
noexcept {
1415 return a * float(factor);
1419 inline Color operator /(
const Color& a,
const Color& b)
noexcept {
1420 return Color(a.r / b.r, a.g / b.g, a.b / b.b);
1426 inline Color operator /(
const Color& a,
int factor)
noexcept {
1427 float f =
static_cast<float>(factor);
1428 return Color(a.r / f, a.g / f, a.b / f);
1434 inline Color operator /(
const Color& a,
float factor)
noexcept {
1435 return Color(a.r / factor, a.g / factor, a.b / factor);
1441 inline Color operator /(
const Color& a,
double factor)
noexcept {
1442 float f =
static_cast<float>(factor);
1443 return Color(a.r / f, a.g / f, a.b / f);
1448 inline bool operator !=(
const Color& a,
const Color& b)
noexcept {
1449 return a.r != b.r || a.g != b.g || a.b != b.b;
1455 inline bool operator ==(
const Color& a,
const Color& b)
noexcept {
1456 return a.r == b.r && a.g == b.g && a.b == b.b;
1469 AColor() noexcept : color(), alpha() {}
1471 template <
typename T>
1472 AColor(
Color c, T a) noexcept : color(c), alpha(
float(a)) {}
1474 template <
typename T1,
typename T2,
typename T3>
1475 AColor(T1 r, T2 g, T3 b) noexcept : color(r, g, b), alpha(1.0f) {}
1477 template <
typename T1,
typename T2,
typename T3,
typename T4>
1478 AColor(T1 r, T2 g, T3 b, T4 a) noexcept : color(r, g, b), alpha(
float(a)) {}
1480 template <
typename T>
1481 explicit AColor(
const T& value) noexcept : color(value), alpha(1) {}
1483 std::string toString()
const ;
1509 color *= float(factor);
1510 alpha *= float(factor);
1523 color *= float(factor);
1524 alpha *= float(factor);
1537 color /= float(factor);
1538 alpha /= float(factor);
1551 color /= float(factor);
1552 alpha /= float(factor);
1574 alpha = std::fmaxf(0.0f, 1.0f - alpha);
1585 Internal::srgb_to_linear(color.r),
1586 Internal::srgb_to_linear(color.g),
1587 Internal::srgb_to_linear(color.b),
1595 Internal::linear_to_srgb(color.r),
1596 Internal::linear_to_srgb(color.g),
1597 Internal::linear_to_srgb(color.b),
1604 inline std::ostream& operator <<(std::ostream& stream,
const AColor& acolor) {
1605 stream <<
"AColor(" << acolor.color.r <<
", " << acolor.color.g <<
", " << acolor.color.b <<
", " << acolor.alpha <<
")";
1609 inline std::string AColor::toString()
const {
1610 std::ostringstream stream;
1612 return stream.str();
1616 inline AColor operator +(
const AColor& a,
const AColor& b)
noexcept {
1624 inline AColor operator -(
const AColor& a,
const AColor& b)
noexcept {
1632 inline AColor operator *(
const AColor& a,
const AColor& b)
noexcept {
1642 inline AColor operator *(
const AColor& a,
int factor)
noexcept {
1644 a.color *
float(factor),
1645 a.alpha *
float(factor)
1652 inline AColor operator *(
const AColor& a,
float factor)
noexcept {
1662 inline AColor operator *(
const AColor& a,
double factor)
noexcept {
1664 a.color *
float(factor),
1665 a.alpha *
float(factor)
1672 inline AColor operator *(
int factor,
const AColor& a)
noexcept {
1673 return a * float(factor);
1679 inline AColor operator *(
float factor,
const AColor& a)
noexcept {
1686 inline AColor operator *(
double factor,
const AColor& a)
noexcept {
1687 return a * float(factor);
1691 inline AColor operator /(
const AColor& a,
const AColor& b)
noexcept {
1701 inline AColor operator /(
const AColor& a,
int factor)
noexcept {
1703 a.color /
float(factor),
1704 a.alpha /
float(factor)
1711 inline AColor operator /(
const AColor& a,
float factor)
noexcept {
1721 inline AColor operator /(
const AColor& a,
double factor)
noexcept {
1723 a.color /
float(factor),
1724 a.alpha /
float(factor)
1731 return a.color != b.color || a.alpha != b.alpha;
1738 return a.color == b.color && a.alpha == b.alpha;
1745 std::string toString()
const;
1749 return (&v0)[index];
1754 return (&v0)[index];
1766 explicit
Matrix(
float value) noexcept : v0(value, 0, 0), v1(0 ,value, 0), v2(0, 0, value) {}
1769 explicit Matrix(
Vector diagonal) noexcept : v0(diagonal.x, 0, 0), v1(0, diagonal.y, 0), v2(0, 0, diagonal.z) {}
1786 v0 = a, v1 = b, v2 = c;
1790 void set(
float value)
noexcept {
1791 v0.
set(value, 0, 0);
1792 v1.
set(0, value, 0);
1793 v2.
set(0, 0, value);
1815 (*this)[0][i] = a.x, (*this)[1][i] = a.y, (*this)[2][i]=a.z;
1827 v0.
set(1.0f, 0.0f, 0.0f);
1828 v1.
set(0.0f, 1.0f, 0.0f);
1829 v2.
set(0.0f, 0.0f, 1.0f);
1835 v0.
set(a.x, 0.0f, 0.0f);
1836 v1.
set(0.0f, a.y, 0.0f);
1837 v2.
set(0.0f, 0.0f, a.z);
1840 void makeOuterProduct(
const Vector &a,
const Vector &b)
noexcept {
1849 t = v0[1], v0[1] = v1[0], v1[0] = t;
1850 t = v0[2], v0[2] = v2[0], v2[0] = t;
1851 t = v1[2], v1[2] = v2[1], v2[1] = t;
1859 double d = mixed(v0, v1, v2);
1873 void addDiagonal(
const Vector &a)
noexcept {
1879 void addTranspose(
const Matrix &b)
noexcept {
1895 v0 *= x, v1 *= x, v2 *= x;
1900 v0 /= x, v1 /= x, v2 /= x;
1926 void makeOrthogonal(
void)
noexcept {
1931 v0 = length(v0) * t.v0;
1932 v1 = length(v1) * t.v1;
1933 v2 = length(v2) * t.v2;
1936 void makeOrthonormal(
void)
noexcept {
1947 double d = m.v0*(m.v1^m.v2);
1948 r.
setRow(0, (m.v1^m.v2)/d);
1949 r.
setRow(1, (m.v2^m.v0)/d);
1950 r.
setRow(2, (m.v0^m.v1)/d);
1957 return Vector(a*m.v0, a*m.v1, a*m.v2);
1963 return a.x*m.v0 + a.y*m.v1 + a.z*m.v2;
1969 return Matrix(m.v0^a, m.v1^a, m.v2^a);
1975 return Matrix(a^m.v0, a^m.v1, a^m.v2);
1981 return Matrix(m.v0*x, m.v1*x, m.v2*x);
1987 return Matrix(x*m.v0, x*m.v1, x*m.v2);
1993 return Matrix(m.v0/x, m.v1/x, m.v2/x);
1998 inline float operator /(
float x,
const Matrix &m)
noexcept {
1999 return x / float(m.v0*(m.v1^m.v2));
2005 return Matrix(a.v0 + b.v0, a.v1 + b.v1, a.v2 + b.v2);
2011 return Matrix(a.v0 - b.v0, a.v1 - b.v1, a.v2 - b.v2);
2019 a.v0[0]*b.v0[0]+a.v1[0]*b.v0[1]+a.v2[0]*b.v0[2],
2020 a.v0[1]*b.v0[0]+a.v1[1]*b.v0[1]+a.v2[1]*b.v0[2],
2021 a.v0[2]*b.v0[0]+a.v1[2]*b.v0[1]+a.v2[2]*b.v0[2]),
2023 a.v0[0]*b.v1[0]+a.v1[0]*b.v1[1]+a.v2[0]*b.v1[2],
2024 a.v0[1]*b.v1[0]+a.v1[1]*b.v1[1]+a.v2[1]*b.v1[2],
2025 a.v0[2]*b.v1[0]+a.v1[2]*b.v1[1]+a.v2[2]*b.v1[2]),
2027 a.v0[0]*b.v2[0]+a.v1[0]*b.v2[1]+a.v2[0]*b.v2[2],
2028 a.v0[1]*b.v2[0]+a.v1[1]*b.v2[1]+a.v2[1]*b.v2[2],
2029 a.v0[2]*b.v2[0]+a.v1[2]*b.v2[1]+a.v2[2]*b.v2[2])
2037 return a.v0 != b.v0 || a.v1 != b.v1 || a.v2 != b.v2;
2044 return a.v0 == b.v0 && a.v1 == b.v1 && a.v2 == b.v2;
2050 return Matrix(-a.v0, -a.v1, -a.v2);
2054 return Matrix(a.x*b, a.y*b, a.z*b);
2058 inline Matrix transpose(
const Matrix &m)
noexcept {
2060 Vector(m.v0[0], m.v1[0], m.v2[0]),
2061 Vector(m.v0[1], m.v1[1], m.v2[1]),
2062 Vector(m.v0[2], m.v1[2], m.v2[2]));
2068 return Matrix(rotate(m.v0, axis), rotate(m.v1, axis), rotate(m.v2, axis));
2074 Vector v0 = normalize(m.v0);
2075 Vector v1 = normalize(m.v2^m.v0);
2076 return Matrix(v0, v1, v0^v1);
2082 return Matrix(normalize(m.v0), normalize(m.v1), normalize(m.v2));
2088 return Vector(m[0].length(), m[1].length(), m[2].length());
2094 const Matrix mns = noScale(m);
2110 atan2(-mns[2][1], mns[2][2]),
2112 atan2(-mns[1][0], mns[0][0])
2120 const float s = sin(xrot);
2121 const float c = cos(xrot);
2129 const float s = sin(yrot);
2130 const float c = cos(yrot);
2138 const float s = sin(zrot);
2139 const float c = cos(zrot);
2144 inline Matrix normalTransformMatrix(
const Matrix &m)
noexcept {
2145 return Matrix(m[1]^m[2], m[2]^m[0], m[0]^m[1]);
2149 inline Matrix normalTransformMatrixX(
const Matrix &m,
bool &DlessThanZero )
noexcept {
2150 if((m[0]^m[1])*m[2] < 0){
2151 DlessThanZero =
true;
2152 return Matrix(m[2]^m[1], m[0]^m[2], m[1]^m[0]);
2154 DlessThanZero =
false;
2155 return Matrix(m[1]^m[2], m[2]^m[0], m[0]^m[1]);
2158 inline std::ostream& operator <<(std::ostream& stream,
const Matrix& matrix) {
2159 stream <<
"Matrix(" << matrix.v0 <<
", " << matrix.v1 <<
", " << matrix.v2 <<
")";
2163 inline std::string Matrix::toString()
const {
2164 std::ostringstream stream;
2166 return stream.str();
2215 matrix += tm.matrix;
2216 offset += tm.offset;
2221 matrix -= tm.matrix;
2222 offset -= tm.offset;
2234 offset = -matrix * offset;
2237 std::string toString()
const;
2243 return a.matrix != b.matrix || a.offset != b.offset;
2250 return a.matrix == b.matrix && a.offset == b.offset;
2256 return Transform(-tm.matrix, -tm.offset);
2262 return Transform(tm.matrix * x, tm.offset * x);
2268 return Transform(x * tm.matrix, x * tm.offset);
2274 return Transform(tm.matrix / x, tm.offset / x);
2280 return Transform(a.matrix + b.matrix, a.offset + b.offset);
2286 return Transform(a.matrix - b.matrix, a.offset - b.offset);
2292 return Transform(a.matrix * b.matrix, a.matrix * b.offset + a.offset);
2298 return tm.matrix * a + tm.offset;
2304 return (a - tm.offset) * tm.matrix;
2307 inline std::ostream& operator <<(std::ostream& stream,
const Transform& transform) {
2308 stream <<
"Transform(" << transform.matrix <<
", " << transform.offset <<
")";
2312 inline std::string Transform::toString()
const {
2313 std::ostringstream stream;
2315 return stream.str();
2337 struct RendererOptions;
2340 class PropertyRuntimeMeta;
2343 struct RenderSizeParams;
2346 const float DEFAULT_FPS = 24.0f;
2347 const float DEFAULT_POINT_SIZE = 2.2f;
2348 const long long READ_DATA_STRUCT_VERSION = 5;
2349 const long long READ_PARAMS_STRUCT_VERSION = 2;
2350 const long long CREATE_PARAMS_STRUCT_VERSION = 7;
2351 const long long GEOM_MESH_DATA_STRUCT_VERSION = 2;
2352 const long long ENABLE_DRCLIENT_PARAMS_STRUCT_VERSION = 0;
2353 const long long LIVE_LINK_CLIENT_PARAMS_STRUCT_VERSION = 0;
2354 const long long SCATTER_READ_PARAMS_STRUCT_VERSION = 0;
2355 class VRayRendererNative;
2356 class BinaryValueParser;
2357 class BinaryValueBuilder;
2358 struct MeshFileDataParser;
2524 InstanceId pluginID;
2533 size_t getData_internal(
int layer, InstanceId alphaPluginID,
void** data,
PixelFormat format = PF_DEFAULT,
bool rgbOrder =
false,
const ImageRegion* rgn = NULL)
const;
2554 return binaryFormat;
2559 return defaultPixelFormat;
2579 bool flipImage =
false;
2620 operator bool ()
const {
2621 return pluginID != NO_ID;
2660 int start, end, step;
2706 std::vector<ComputeDeviceInfo> getComputeDevicesMetal();
2711 std::vector<ComputeDeviceInfo> getComputeDevicesOptix();
2719 std::vector<ComputeDeviceInfo> getComputeDevicesCUDA();
2724 std::vector<ComputeDeviceInfo> getComputeDevicesDenoiser();
2729 bool setComputeDevicesMetal(
const std::vector<int>& indices);
2734 bool setComputeDevicesOptix(
const std::vector<int>& indices);
2739 bool setComputeDevicesCUDA(
const std::vector<int>& indices);
2744 bool setComputeDevicesDenoiser(
const std::vector<int>& indices);
2749 bool setComputeDevicesEnvironmentVariable();
2758 float currentProgress;
2777 typedef std::vector<int> IntList;
2778 typedef std::vector<float> FloatList;
2779 typedef std::vector<Color> ColorList;
2780 typedef std::vector<Vector> VectorList;
2781 typedef std::vector<Value> ValueList;
2782 typedef std::vector<std::string> StringList;
2808 VRAY_MINIMUM2(
pmin.x, point.x),
2809 VRAY_MINIMUM2(
pmin.y, point.y),
2810 VRAY_MINIMUM2(
pmin.z, point.z)
2813 VRAY_MAXIMUM2(
pmax.x, point.x),
2814 VRAY_MAXIMUM2(
pmax.y, point.y),
2815 VRAY_MAXIMUM2(
pmax.z, point.z)
2834 std::string toString()
const;
2837 inline std::ostream& operator <<(std::ostream& stream,
const Box& box) {
2838 stream <<
"Box(min: " << box.pmin <<
", max: " << box.pmax <<
")";
2842 inline std::string Box::toString()
const {
2843 std::ostringstream stream;
2845 return stream.str();
2887 MESH_VERTICES = (1 << 4),
2888 MESH_NORMALS = (1 << 5),
2889 MESH_MTLIDS = (1 << 6),
2890 MESH_VELOCITIES = (1 << 7),
2891 MESH_UVS = (1 << 8),
2892 MESH_SHADERS = (1 << 9),
2893 MESH_OBJECTINFOS = (1 << 10),
2894 MESH_HAIROBJECTINFOS = (1 << 11),
2895 MESH_PARTICLEOBJECTINFOS = (1 << 12),
2896 MESH_HAIRGEOMETRY = (1 << 13),
2897 MESH_PARTICLESGEOMETRY = (1 << 14),
2898 MESH_GEOMETRYMESHESBBOXES = (1 << 15),
2899 MESH_HAIROBJECTBBOXES = (1 << 16),
2900 MESH_PARTICLEOBJECTBBOXES = (1 << 17),
2901 MESH_ALL = MESH_VERTICES | MESH_NORMALS | MESH_VELOCITIES | MESH_MTLIDS | MESH_UVS | MESH_SHADERS |
2902 MESH_OBJECTINFOS | MESH_HAIROBJECTINFOS | MESH_PARTICLEOBJECTINFOS | MESH_HAIRGEOMETRY | MESH_PARTICLESGEOMETRY |
2903 MESH_GEOMETRYMESHESBBOXES | MESH_HAIROBJECTBBOXES | MESH_PARTICLEOBJECTBBOXES,
2919 const std::vector<Vector> &
getNormals()
const {
return normals; }
3126 std::vector<int>
getArrayOfLengths(
const int* startIndices,
int elementsCount,
int objectCount)
const;
3133 std::vector<int>
getArrayOfLengths(
const int* startIndices,
int elementsCount,
int objectCount,
int uvSetsCount)
const;
3149 int getLengthFromStartIndex(
int objectIndex,
int setIndex,
const int* startIndices,
int elementsCount,
int objectCount,
int uvSetsCount)
const;
3184 void allocateArrays();
3185 std::vector<Vector> getArrayElement (
int objectIndex,
const int* startIndices,
const VectorList& list,
int elementsCount,
size_t objectCount)
const;
3186 std::vector<int> getArrayElement (
int objectIndex,
const int* startIndices,
const int* primaryStartIndices,
const IntList& list,
int elementsCount,
size_t objectCount)
const;
3187 std::vector<int> getArrayElement (
int objectIndex,
const int* startIndices,
const IntList& list,
int elementsCount,
size_t objectCount)
const;
3188 std::vector<float> getArrayElement (
int objectIndex,
const int* startIndices,
const FloatList& list,
int elementsCount,
size_t objectCount)
const;
3189 std::vector<Vector> getArrayElement (
int objectIndex,
int setIndex,
const int* startIndices,
const VectorList& list,
int elementsCount,
size_t objectCount,
size_t uvSetsCount)
const;
3190 std::vector<int> getArrayElement (
int objectIndex,
int setIndex,
const int* startIndices,
const int* primaryStartIndices,
const IntList& list,
int elementsCount,
int primaryElementsCount,
size_t objectCount,
size_t uvSetsCount)
const;
3195 long long int flags;
3197 bool maxToMayaTM : 1;
3198 bool mayaToMaxTM : 1;
3199 bool reserved_bit2 : 1;
3200 bool reserved_bit3 : 1;
3201 bool use_vertices : 1;
3202 bool use_normals : 1;
3203 bool use_mtlIDs : 1;
3204 bool use_velocities : 1;
3206 bool use_shaders : 1;
3207 bool use_objectInfos : 1;
3208 bool use_hairObjectInfos : 1;
3209 bool use_particleObjectInfos : 1;
3211 bool use_particles : 1;
3212 bool use_geometryVoxelsBBoxes : 1;
3213 bool use_hairVoxelsBBoxes : 1;
3214 bool use_particleVoxelsBBoxes : 1;
3219 size_t vertices_count;
3221 size_t indices_count;
3223 size_t normals_count;
3225 size_t normalIndices_count;
3227 size_t materialIDs_count;
3229 size_t velocities_count;
3233 int* uvValueIndices;
3234 size_t uvSets_count;
3235 size_t uvSetNames_length;
3236 int uvSetIndices[100];
3237 size_t uvValues_counts[100];
3238 size_t uvValueIndices_counts[100];
3242 size_t shaders_count;
3243 size_t shaderNames_length;
3245 char* objectInfoNames;
3247 int* objectInfoVBegins;
3248 int* objectInfoVEnds;
3249 size_t objectInfos_count;
3250 size_t objectInfoNames_length;
3252 char* hairObjectInfoNames;
3253 int* hairObjectInfoIds;
3254 int* hairObjectInfoVBegins;
3255 int* hairObjectInfoVEnds;
3256 size_t hairObjectInfos_count;
3257 size_t hairObjectInfoNames_length;
3259 char* particleObjectInfoNames;
3260 int* particleObjectInfoIds;
3261 int* particleObjectInfoVBegins;
3262 int* particleObjectInfoVEnds;
3263 size_t particleObjectInfos_count;
3264 size_t particleObjectInfoNames_length;
3266 float* hairVertices;
3267 size_t hairVertices_count;
3268 int* hairVerticesPerStrand;
3269 size_t hairVerticesPerStrand_count;
3270 float* particleVertices;
3271 size_t particlesVertices_count;
3273 int* voxelVerticesStartIndices;
3274 int* voxelVertexIndicesStartIndices;
3275 int* voxelNormalsStartIndices;
3276 int* voxelNormalIndicesStartIndices;
3277 int* voxelMaterialIDsStartIndices;
3278 int* voxelVelocitiesStartIndices;
3279 int* voxelUVValuesStartIndices;
3280 int* voxelUVValueIndicesStartIndices;
3282 float* geometryVoxelsBBoxes;
3283 float* hairVoxelsBBoxes;
3284 float* particleVoxelsBBoxes;
3286 int* hairVerticesStartIndices;
3287 int* hairVerticesPerStrandStartIndices;
3288 int* particleVerticesStartIndices;
3290 size_t geometryVoxels_count;
3291 size_t hairVoxels_count;
3292 size_t particleVoxels_count;
3294 size_t totalUVvalues;
3295 size_t totalUVindices;
3297 int* edgeVisibility;
3299 Color* voxelInfoWireColor;
3300 int* voxelInfoSmoothed;
3301 int* voxelInfoFlipNormals;
3302 size_t voxelInfoObjects_count;
3305 size_t hairWidths_count;
3306 int* hairWidthsStartIndices;
3307 float* particleWidths;
3308 size_t particleWidths_count;
3309 int* particleWidthsStartIndices;
3312 Bool hasVelocityChannel;
3314 float* hairVelocities;
3315 size_t hairVelocities_count;
3316 int* hairVelocitiesStartIndices;
3317 float* particleVelocities;
3318 size_t particleVelocities_count;
3319 int* particleVelocitiesStartIndices;
3322 std::vector<Vector> vertices;
3323 std::vector<int> indices;
3324 std::vector<Vector> normals;
3325 std::vector<int> normalIndices;
3326 std::vector<int> materialIDs;
3327 std::vector<Vector> velocities;
3328 std::vector<char> uvSetNames;
3329 std::vector<Vector> uvValues;
3330 std::vector<int> uvValueIndices;
3331 std::vector<char> shaderNames;
3332 std::vector<int> shaderIds;
3333 std::vector<char> objectInfoNames;
3334 std::vector<int> objectInfoIds;
3335 std::vector<int> objectInfoVBegins;
3336 std::vector<int> objectInfoVEnds;
3337 std::vector<char> hairObjectInfoNames;
3338 std::vector<int> hairObjectInfoIds;
3339 std::vector<int> hairObjectInfoVBegins;
3340 std::vector<int> hairObjectInfoVEnds;
3341 std::vector<char> particleObjectInfoNames;
3342 std::vector<int> particleObjectInfoIds;
3343 std::vector<int> particleObjectInfoVBegins;
3344 std::vector<int> particleObjectInfoVEnds;
3345 std::vector<Vector> hairVertices;
3346 std::vector<int> hairVerticesPerStrand;
3347 std::vector<Vector> particleVertices;
3348 std::vector<int> voxelVerticesStartIndices;
3349 std::vector<int> voxelVertexIndicesStartIndices;
3350 std::vector<int> voxelNormalsStartIndices;
3351 std::vector<int> voxelNormalIndicesStartIndices;
3352 std::vector<int> voxelMaterialIDsStartIndices;
3353 std::vector<int> voxelVelocitiesStartIndices;
3354 std::vector<int> voxelUVValuesStartIndices;
3355 std::vector<int> voxelUVValueIndicesStartIndices;
3356 std::vector<Box> geometryVoxelsBBoxes;
3357 std::vector<Box> hairVoxelsBBoxes;
3358 std::vector<Box> particleVoxelsBBoxes;
3359 std::vector<int> hairVerticesStartIndices;
3360 std::vector<int> hairVerticesPerStrandStartIndices;
3361 std::vector<int> particleVerticesStartIndices;
3362 std::vector<int> edgeVisibility;
3363 std::vector<Color> voxelInfoWireColor;
3364 std::vector<Bool> voxelInfoSmoothed;
3365 std::vector<Bool> voxelInfoFlipNormals;
3366 std::vector<float> hairWidths;
3367 std::vector<int> hairWidthsStartIndices;
3368 std::vector<float> particleWidths;
3369 std::vector<int> particleWidthsStartIndices;
3370 std::vector<Vector> hairVelocities;
3371 std::vector<int> hairVelocitiesStartIndices;
3372 std::vector<Vector> particleVelocities;
3373 std::vector<int> particleVelocitiesStartIndices;
3382 explicit TiMe(int64_t time) : asInt(time) {}
3387 explicit TiMe(
double time) : asDouble(time) {}
3389 operator double() {
return asDouble; }
3397 static double None() {
return TiMe(int64_t(-2)).asDouble; }
3521 void* luminaireFieldHandle;
3526 unsigned char revision;
3527 unsigned char minor;
3528 unsigned short major;
3533 #pragma warning(disable : 4996)
3535 std::string toString()
const {
3538 int n = std::snprintf(&str[0], str.size() - 1,
"%u.%02u.%02u", major, minor, revision);
3543 #pragma warning(default : 4996)
3549 inline std::ostream& operator <<(std::ostream& stream,
const VRayVersion& version) {
3550 stream << version.toString();
3556 static const int useParentTimes = (1 << 0);
3557 static const int useObjectID = (1 << 1);
3558 static const int usePrimaryVisibility = (1 << 2);
3559 static const int useUserAttributes = (1 << 3);
3584#include "_vraysdk_import.hpp"
3587 namespace Language {
3588 constexpr const char* EN_US =
"en-US";
3589 constexpr const char* ZH_CN =
"zh-CN";
3598 ThemeStyleStandalone,
3632 void* parentWindowHandle;
3641 , parentWindowHandle()
3669 bool immediatelyForwardReadySplitBucketSubunits : 1;
3688 std::string vantageFile;
3722#if !defined(VRAY_RUNTIME_LOAD_PRIMARY) && !defined(VRAY_RUNTIME_LOAD_SECONDARY)
3730 Internal::VRay_incrementModuleReferenceCounter();
3735 Internal::VRay_incrementModuleReferenceCounter();
3736 Internal::VRay_enableFrameBuffer(enableFrameBuffer);
3742 void setUseParentEventLoop() {
3743 Internal::VRay_blendFrameBuffer();
3751 Internal::VRay_GUIMessageProcessing(enableMessageProcessing);
3755 Internal::VRay_LicenseManager_releaseLicense();
3759#elif defined(VRAY_RUNTIME_LOAD_PRIMARY)
3763 VRayInit(VRayInit&);
3769 explicit VRayInit(
const char*
const libraryFileName) {
3770 initialize(libraryFileName);
3771 if (Internal::VRay_incrementModuleReferenceCounter) Internal::VRay_incrementModuleReferenceCounter();
3778 VRayInit(
const char*
const libraryFileName,
bool enableFrameBuffer) {
3779 initialize(libraryFileName);
3780 if (Internal::VRay_incrementModuleReferenceCounter) Internal::VRay_incrementModuleReferenceCounter();
3781 if (Internal::VRay_enableFrameBuffer) Internal::VRay_enableFrameBuffer(enableFrameBuffer);
3787 void setUseParentEventLoop() {
3788 Internal::VRay_blendFrameBuffer();
3796 Internal::VRay_GUIMessageProcessing(enableMessageProcessing);
3800 if (Internal::VRay_LicenseManager_releaseLicense)
3801 Internal::VRay_LicenseManager_releaseLicense();
3805 operator bool ()
const {
3810 std::string getSDKLibraryErrorString()
const {
3817 Internal::HModule hLib;
3818 std::string errString;
3821 void makeError(
const std::string &errMsg) {
3827 void initialize(
const char* libraryFileName);
3828 void importFunctions();
3833 Internal::FreeLibrary(hLib);
3835 Internal::dlclose(hLib);
3843 inline bool isDR2() {
3844 return !!Internal::VRay_isDR2();
3848 inline APIVersion getAPIVersion() {
3850 ver.allFields = Internal::VRay_getSDKVersion();
3855 inline VRayVersion getVRayVersion() {
3857 ver.allFields = Internal::VRay_getVRayVersion();
3862 inline const char* getVRayVersionDetails() {
3863 return Internal::VRay_getVRayVersionDetails();
3868 inline const char* getMaterialLibraryPath() {
3869 return Internal::VRay_getMaterialLibraryPath();
3903 inline int setLicenseServers(
const LicenseServerSettings& settings);
3908 inline void setUSDProvider(
const char* usdProvider);
3913 ErrorCode errorCode;
3916 Error(
int errorCode = SUCCESS) : errorCode(
static_cast<ErrorCode
>(errorCode)) {
3919 Error(ErrorCode errorCode) : errorCode(errorCode) {
3922 bool error()
const {
3923 return errorCode != SUCCESS;
3926 ErrorCode getCode()
const {
3930 const char* toString()
const {
3931 return Internal::VRay_getErrorTextStringFromErrorCode(errorCode);
3934 friend inline bool operator==(
const Error& err0,
const Error& err1) {
3935 return err0.errorCode == err1.errorCode;
3938 friend inline bool operator!=(
const Error& err0,
const Error& err1) {
3939 return err0.errorCode != err1.errorCode;
3942 friend inline bool operator==(
const Error& err, ErrorCode errCode) {
3943 return err.errorCode == errCode;
3946 friend inline bool operator==(ErrorCode errCode,
const Error& err) {
3947 return errCode == err.errorCode;
3950 friend inline bool operator!=(
const Error& err, ErrorCode errCode) {
3951 return err.errorCode != errCode;
3954 friend inline bool operator!=(ErrorCode errCode,
const Error& err) {
3955 return errCode != err.errorCode;
3960 inline std::ostream& operator <<(std::ostream& stream,
const Error& err) {
3961 stream << err.toString();
3967 std::string fileName;
3968 std::string errorText;
3974 LicenseError::VRLAuthError errorCode;
3977 : errorCode(errorCode) {}
3979 bool error()
const {
3980 return errorCode != LicenseError::vrlauth_noError;
3983 const char* toString()
const;
4004 CH_PAINT_MASK = 1 << VRSM_PAINT,
4083 unsigned getScannedMaterialUILicense();
4094 unsigned releaseScannedMaterialUILicense();
4147 void createThis(
const char* pluginLibPath);
4152 BAD_LIBRARY_FILE = 1,
4168 operator bool()
const;
4178 bool getInfo(
const char* filename, std::string& info)
const;
4181 bool getInfo(
const std::string& filename, std::string& info)
const;
4197 namespace Internal {
4199 class BinaryValueParser;
4202 enum PluginCategory {
4203 category_bitmap = 0,
4205 category_geometric_object,
4206 category_geometry_source,
4209 category_render_channel,
4210 category_render_view,
4213 category_texture_float,
4214 category_texture_int,
4215 category_texture_matrix,
4216 category_texture_transform,
4217 category_texture_vector,
4219 category_volumetric,
4231 VRAY_DEPRECATED(
"Do not use! Use the accessor methods instead!")
bool isBitmap : 1;
4232 VRAY_DEPRECATED(
"Do not use! Use the accessor methods instead!")
bool isBsdf : 1;
4233 VRAY_DEPRECATED(
"Do not use! Use the accessor methods instead!")
bool isGeometric_object : 1;
4234 VRAY_DEPRECATED(
"Do not use! Use the accessor methods instead!")
bool isGeometry_source : 1;
4235 VRAY_DEPRECATED(
"Do not use! Use the accessor methods instead!")
bool isLight : 1;
4236 VRAY_DEPRECATED(
"Do not use! Use the accessor methods instead!")
bool isMaterial : 1;
4237 VRAY_DEPRECATED(
"Do not use! Use the accessor methods instead!")
bool isRender_channel : 1;
4238 VRAY_DEPRECATED(
"Do not use! Use the accessor methods instead!")
bool isRender_view : 1;
4239 VRAY_DEPRECATED(
"Do not use! Use the accessor methods instead!")
bool isSettings : 1;
4240 VRAY_DEPRECATED(
"Do not use! Use the accessor methods instead!")
bool isTexture : 1;
4241 VRAY_DEPRECATED(
"Do not use! Use the accessor methods instead!")
bool isTexture_float : 1;
4242 VRAY_DEPRECATED(
"Do not use! Use the accessor methods instead!")
bool isTexture_int : 1;
4243 VRAY_DEPRECATED(
"Do not use! Use the accessor methods instead!")
bool isTexture_matrix : 1;
4244 VRAY_DEPRECATED(
"Do not use! Use the accessor methods instead!")
bool isTexture_transform : 1;
4245 VRAY_DEPRECATED(
"Do not use! Use the accessor methods instead!")
bool isTexture_vector : 1;
4246 VRAY_DEPRECATED(
"Do not use! Use the accessor methods instead!")
bool isUvwgen : 1;
4247 VRAY_DEPRECATED(
"Do not use! Use the accessor methods instead!")
bool isVolumetric : 1;
4256 bool operator!=(
const PluginCategories& categories)
const noexcept {
4272 void setGeometricObjectCategory() {
pluginCategoryField |= 1ull << category_geometric_object; }
4273 void resetGeometricObjectCategory() {
pluginCategoryField &= ~(1ull << category_geometric_object); }
4277 void setGeometrySourceCategory() {
pluginCategoryField |= 1ull << category_geometry_source; }
4278 void resetGeometrySourceCategory() {
pluginCategoryField &= ~(1ull << category_geometry_source); }
4292 void setRenderChannelCategory() {
pluginCategoryField |= 1ull << category_render_channel; }
4293 void resetRenderChannelCategory() {
pluginCategoryField &= ~(1ull << category_render_channel); }
4298 void resetRenderViewCategory() {
pluginCategoryField &= ~(1ull << category_render_view); }
4313 void resetTextureFloatCategory() {
pluginCategoryField &= ~(1ull << category_texture_float); }
4318 void resetTextureIntCategory() {
pluginCategoryField &= ~(1ull << category_texture_int); }
4322 void setTextureMatrixCategory() {
pluginCategoryField |= 1ull << category_texture_matrix; }
4323 void resetTextureMatrixCategory() {
pluginCategoryField &= ~(1ull << category_texture_matrix); }
4327 void setTextureTransformCategory() {
pluginCategoryField |= 1ull << category_texture_transform; }
4328 void resetTextureTransformCategory() {
pluginCategoryField &= ~(1ull << category_texture_transform); }
4332 void setTextureVectorCategory() {
pluginCategoryField |= 1ull << category_texture_vector; }
4333 void resetTextureVectorCategory() {
pluginCategoryField &= ~(1ull << category_texture_vector); }
4345 PluginCategories() { clear(); }
4349 bool hasCategory(PluginCategory category)
const {
4353 void setCategory(PluginCategory category,
bool value) {
4354 const long long msk = 1ll << category;
4355 const long long val = -
static_cast<long long>(value);
4372 friend class VUtils::Value;
4373 friend class Internal::Access;
4374 friend class Internal::BinaryValueParser;
4375 friend class Internal::BinaryValueBuilder;
4379 InstanceId internalId;
4380 InstanceId id()
const {
4381 constexpr int shift =
sizeof(InstanceId) * 8 - Internal::INSTANCE_ID_BITS;
4382 return static_cast<signed long long>(internalId << shift) >> shift;
4390 template<
typename T,
int TYPE>
4391 bool setValueAtTimeTemplate(
const char* propertyName,
const T& value,
double time);
4393 template<
typename T,
int TYPE>
4394 bool setArrayAtTimeTemplate(
const char* propertyName,
size_t count,
const T& value,
double time);
4396 template<
typename LengthFn,
typename Po
interFn>
4397 bool setStringArrayTemplate(
const char *propertyName,
size_t count, LengthFn lengthAt, PointerFn pointerAt,
double time);
4401 Plugin() noexcept : pRenderer(), internalId(NO_ID) {}
4501 bool getBool(const
char* propertyName,
double time =
TiMe::Default()) const;
4503 bool getBool(const std::
string& propertyName,
double time =
TiMe::Default()) const;
4508 bool getBool(const
char* propertyName,
bool& ok,
double time =
TiMe::Default()) const;
4510 bool getBool(const std::
string& propertyName,
bool& ok,
double time =
TiMe::Default()) const;
4514 int getInt(const
char* propertyName,
double time =
TiMe::Default()) const;
4516 int getInt(const std::
string& propertyName,
double time =
TiMe::Default()) const;
4521 int getInt(const
char* propertyName,
bool& ok,
double time =
TiMe::Default()) const;
4523 int getInt(const std::
string& propertyName,
bool& ok,
double time =
TiMe::Default()) const;
4526 float getFloat(const
char* propertyName,
double time =
TiMe::Default()) const;
4528 float getFloat(const std::
string& propertyName,
double time =
TiMe::Default()) const;
4533 float getFloat(const
char* propertyName,
bool& ok,
double time =
TiMe::Default()) const;
4535 float getFloat(const std::
string& propertyName,
bool& ok,
double time =
TiMe::Default()) const;
4538 double getDouble(const
char* propertyName,
double time =
TiMe::Default()) const;
4540 double getDouble(const std::
string& propertyName,
double time =
TiMe::Default()) const;
4545 double getDouble(const
char* propertyName,
bool& ok,
double time =
TiMe::Default()) const;
4547 double getDouble(const std::
string& propertyName,
bool& ok,
double time =
TiMe::Default()) const;
4622 std::
string getString(const
char* propertyName,
double time =
TiMe::Default()) const;
4624 std::
string getString(const std::
string& propertyName,
double time =
TiMe::Default()) const;
4629 std::
string getString(const
char* propertyName,
bool& ok,
double time =
TiMe::Default()) const;
4631 std::
string getString(const std::
string& propertyName,
bool& ok,
double time =
TiMe::Default()) const;
4636 IntList
getIntList(const std::
string& propertyName,
double time =
TiMe::Default()) const;
4641 IntList
getIntList(const
char* propertyName,
bool& ok,
double time =
TiMe::Default()) const;
4643 IntList
getIntList(const std::
string& propertyName,
bool& ok,
double time =
TiMe::Default()) const;
4653 FloatList
getFloatList(const
char* propertyName,
bool& ok,
double time =
TiMe::Default()) const;
4655 FloatList
getFloatList(const std::
string& propertyName,
bool& ok,
double time =
TiMe::Default()) const;
4665 ColorList
getColorList(const
char* propertyName,
bool& ok,
double time =
TiMe::Default()) const;
4667 ColorList
getColorList(const std::
string& propertyName,
bool& ok,
double time =
TiMe::Default()) const;
4679 VectorList
getVectorList(const std::
string& propertyName,
bool& ok,
double time =
TiMe::Default()) const;
4701 ValueList
getValueList(const
char* propertyName,
bool& ok,
double time =
TiMe::Default()) const;
4703 ValueList
getValueList(const std::
string& propertyName,
bool& ok,
double time =
TiMe::Default()) const;
4715 StringList
getStringList(const std::
string& propertyName,
bool& ok,
double time =
TiMe::Default()) const;
4727 PluginList
getPluginList(const std::
string& propertyName,
bool& ok,
double time =
TiMe::Default()) const;
4764 bool setValue(const
char* propertyName, const
bool value,
double time =
TiMe::Default());
4766 bool setValue(const std::
string& propertyName, const
bool value,
double time =
TiMe::Default());
4770 bool setValue(const
char* propertyName, const
int value,
double time =
TiMe::Default());
4772 bool setValue(const std::
string& propertyName, const
int value,
double time =
TiMe::Default());
4776 bool setValue(const
char* propertyName, const
float value,
double time =
TiMe::Default());
4778 bool setValue(const std::
string& propertyName, const
float value,
double time =
TiMe::Default());
4782 bool setValue(const
char* propertyName, const
double value,
double time =
TiMe::Default());
4784 bool setValue(const std::
string& propertyName, const
double value,
double time =
TiMe::Default());
4824 bool setValue(const
char* propertyName, const
char* str,
double time =
TiMe::Default());
4826 bool setValue(const std::
string& propertyName, const
char* str,
double time =
TiMe::Default());
4830 bool setValue(const
char* propertyName, const std::
string& str,
double time =
TiMe::Default());
4832 bool setValue(const std::
string& propertyName, const std::
string& str,
double time =
TiMe::Default());
4846 bool setValue(const
char* propertyName, const ValueList& value,
double time =
TiMe::Default());
4848 bool setValue(const std::
string& propertyName, const ValueList& value,
double time =
TiMe::Default());
4850 bool setValue(const
char* propertyName, ValueList&& value,
double time =
TiMe::Default());
4852 bool setValue(const std::
string& propertyName, ValueList&& value,
double time =
TiMe::Default());
4854 template<
size_t count>
bool setValue(const
char* propertyName, const
Value(&arr)[count],
double time =
TiMe::Default());
4856 template<
size_t count>
bool setValue(const std::
string& propertyName, const
Value(&arr)[count],
double time =
TiMe::Default());
4858 template<
size_t count>
bool setValue(const
char* propertyName,
Value(&&arr)[count],
double time =
TiMe::Default());
4860 template<
size_t count>
bool setValue(const std::
string& propertyName,
Value(&&arr)[count],
double time =
TiMe::Default());
4864 bool setValue(const
char* propertyName, const IntList& value,
double time =
TiMe::Default());
4866 bool setValue(const std::
string& propertyName, const IntList& value,
double time =
TiMe::Default());
4868 bool setValue(const
char* propertyName, IntList&& value,
double time =
TiMe::Default());
4870 bool setValue(const std::
string& propertyName, IntList&& value,
double time =
TiMe::Default());
4874 bool setValue(const
char* propertyName, const FloatList& value,
double time =
TiMe::Default());
4876 bool setValue(const std::
string& propertyName, const FloatList& value,
double time =
TiMe::Default());
4878 bool setValue(const
char* propertyName, FloatList&& value,
double time =
TiMe::Default());
4880 bool setValue(const std::
string& propertyName, FloatList&& value,
double time =
TiMe::Default());
4884 bool setValue(const
char* propertyName, const VectorList& value,
double time =
TiMe::Default());
4886 bool setValue(const std::
string& propertyName, const VectorList& value,
double time =
TiMe::Default());
4888 bool setValue(const
char* propertyName, VectorList&& value,
double time =
TiMe::Default());
4890 bool setValue(const std::
string& propertyName, VectorList&& value,
double time =
TiMe::Default());
4894 bool setValue(const
char* propertyName, const ColorList& value,
double time =
TiMe::Default());
4896 bool setValue(const std::
string& propertyName, const ColorList& value,
double time =
TiMe::Default());
4898 bool setValue(const
char* propertyName, ColorList&& value,
double time =
TiMe::Default());
4900 bool setValue(const std::
string& propertyName, ColorList&& value,
double time =
TiMe::Default());
4904 bool setValue(const
char* propertyName, const TransformList& value,
double time =
TiMe::Default());
4906 bool setValue(const std::
string& propertyName, const TransformList& value,
double time =
TiMe::Default());
4910 bool setValue(const
char* propertyName, const StringList& value,
double time =
TiMe::Default());
4912 bool setValue(const std::
string& propertyName, const StringList& value,
double time =
TiMe::Default());
4916 bool setValue(const
char* propertyName, const PluginList& value,
double time =
TiMe::Default());
4918 bool setValue(const std::
string& propertyName, const PluginList& value,
double time =
TiMe::Default());
4922 bool setArray(const
char* propertyName, const
int data[],
size_t count,
double time =
TiMe::Default());
4924 bool setArray(const std::
string& propertyName, const
int data[],
size_t count,
double time =
TiMe::Default());
4929 bool setArray(const
char* propertyName, const
float data[],
size_t count,
double time =
TiMe::Default());
4931 bool setArray(const std::
string& propertyName, const
float data[],
size_t count,
double time =
TiMe::Default());
4937 bool setArray(const
char* propertyName, const
double data[],
size_t count,
double time =
TiMe::Default());
4939 bool setArray(const std::
string& propertyName, const
double data[],
size_t count,
double time =
TiMe::Default());
4943 bool setArray(const
char* propertyName, const
Vector data[],
size_t count,
double time =
TiMe::Default());
4945 bool setArray(const std::
string& propertyName, const
Vector data[],
size_t count,
double time =
TiMe::Default());
4949 bool setArray(const
char* propertyName, const
Color data[],
size_t count,
double time =
TiMe::Default());
4951 bool setArray(const std::
string& propertyName, const
Color data[],
size_t count,
double time =
TiMe::Default());
4961 bool setArray(const
char* propertyName, const std::
string data[],
size_t count,
double time =
TiMe::Default());
4963 bool setArray(const std::
string& propertyName, const std::
string data[],
size_t count,
double time =
TiMe::Default());
4965 bool setArray(const
char* propertyName, const
char* const data[],
size_t count,
double time =
TiMe::Default());
4967 bool setArray(const std::
string& propertyName, const
char* const data[],
size_t count,
double time =
TiMe::Default());
4971 bool setArray(const
char* propertyName, const
Plugin plugins[],
size_t count,
double time =
TiMe::Default());
4973 bool setArray(const std::
string& propertyName, const
Plugin plugins[],
size_t count,
double time =
TiMe::Default());
4977 bool setArray(const
char* propertyName, const
Value values[],
size_t count,
double time =
TiMe::Default());
4979 bool setArray(const std::
string& propertyName, const
Value values[],
size_t count,
double time =
TiMe::Default());
4984 bool setArray(const
char* propertyName,
Value valuesToMove[],
size_t count,
double time =
TiMe::Default());
4986 bool setArray(const std::
string& propertyName,
Value valuesToMove[],
size_t count,
double time =
TiMe::Default());
4991 bool setValue(const
char* propertyName, const
void* data,
size_t size,
double time =
TiMe::Default());
4993 bool setValue(const std::
string& propertyName, const
void* data,
size_t size,
double time =
TiMe::Default());
4995 friend std::ostream& operator <<(std::ostream& stream, const
Plugin& plugin);
4997#ifdef VRAY_SDK_INTEROPERABILITY
4998 bool setValueAsStringAtTime(
const char* propertyName,
const char* value,
double time);
4999 bool setValueAsStringAtTime(
const char* propertyName,
const std::string& value,
double time);
5000 bool setValueAsStringAtTime(
const std::string& propertyName,
const char* value,
double time);
5001 bool setValueAsStringAtTime(
const std::string& propertyName,
const std::string& value,
double time);
5002 bool setValueAtTime(
const char* propertyName,
const bool value,
double time);
5003 bool setValueAtTime(
const std::string& propertyName,
const bool value,
double time);
5004 bool setValueAtTime(
const char* propertyName,
const int value,
double time);
5005 bool setValueAtTime(
const std::string& propertyName,
const int value,
double time);
5006 bool setValueAtTime(
const char* propertyName,
const float value,
double time);
5007 bool setValueAtTime(
const std::string& propertyName,
const float value,
double time);
5008 bool setValueAtTime(
const char* propertyName,
const double value,
double time);
5009 bool setValueAtTime(
const std::string& propertyName,
const double value,
double time);
5010 bool setValueAtTime(
const char* propertyName,
const Color& value,
double time);
5011 bool setValueAtTime(
const std::string& propertyName,
const Color& value,
double time);
5012 bool setValueAtTime(
const char* propertyName,
const AColor& value,
double time);
5013 bool setValueAtTime(
const std::string& propertyName,
const AColor& value,
double time);
5014 bool setValueAtTime(
const char* propertyName,
const Vector& value,
double time);
5015 bool setValueAtTime(
const std::string& propertyName,
const Vector& value,
double time);
5016 bool setValueAtTime(
const char* propertyName,
const Matrix& value,
double time);
5017 bool setValueAtTime(
const std::string& propertyName,
const Matrix& value,
double time);
5018 bool setValueAtTime(
const char* propertyName,
const Transform& transform,
double time);
5019 bool setValueAtTime(
const std::string& propertyName,
const Transform& transform,
double time);
5020 bool setValueAtTime(
const char* propertyName,
const PluginRefT<Plugin>& pluginRef,
double time);
5021 bool setValueAtTime(
const std::string& propertyName,
const PluginRefT<Plugin>& pluginRef,
double time);
5022 bool setValueAtTime(
const char* propertyName,
const char* str,
double time);
5023 bool setValueAtTime(
const std::string& propertyName,
const char* str,
double time);
5024 bool setValueAtTime(
const char* propertyName,
const std::string& str,
double time);
5025 bool setValueAtTime(
const std::string& propertyName,
const std::string& str,
double time);
5026 bool setValueAtTime(
const char* propertyName,
const Value& value,
double time);
5027 bool setValueAtTime(
const std::string& propertyName,
const Value& value,
double time);
5028 bool setValueAtTime(
const char* propertyName,
const ValueList& value,
double time);
5029 bool setValueAtTime(
const std::string& propertyName,
const ValueList& value,
double time);
5030 bool setValueAtTime(
const char* propertyName,
const IntList& value,
double time);
5031 bool setValueAtTime(
const std::string& propertyName,
const IntList& value,
double time);
5032 bool setValueAtTime(
const char* propertyName,
const FloatList& value,
double time);
5033 bool setValueAtTime(
const std::string& propertyName,
const FloatList& value,
double time);
5034 bool setValueAtTime(
const char* propertyName,
const VectorList& value,
double time);
5035 bool setValueAtTime(
const std::string& propertyName,
const VectorList& value,
double time);
5036 bool setValueAtTime(
const char* propertyName,
const ColorList& value,
double time);
5037 bool setValueAtTime(
const std::string& propertyName,
const ColorList& value,
double time);
5038 bool setValueAtTime(
const char* propertyName,
const PluginList& value,
double time);
5039 bool setValueAtTime(
const std::string& propertyName,
const PluginList& value,
double time);
5040 bool setValueAtTime(
const char* propertyName,
const StringList& value,
double time);
5041 bool setValueAtTime(
const std::string& propertyName,
const StringList& value,
double time);
5042 bool setArrayAtTime(
const char* propertyName,
const int data[],
size_t count,
double time);
5043 bool setArrayAtTime(
const std::string& propertyName,
const int data[],
size_t count,
double time);
5044 bool setArrayAtTime(
const char* propertyName,
const float data[],
size_t count,
double time);
5045 bool setArrayAtTime(
const std::string& propertyName,
const float data[],
size_t count,
double time);
5046 bool setArrayAtTime(
const char* propertyName,
const double data[],
size_t count,
double time);
5047 bool setArrayAtTime(
const std::string& propertyName,
const double data[],
size_t count,
double time);
5048 bool setArrayAtTime(
const char* propertyName,
const Vector data[],
size_t count,
double time);
5049 bool setArrayAtTime(
const std::string& propertyName,
const Vector data[],
size_t count,
double time);
5050 bool setArrayAtTime(
const char* propertyName,
const Color data[],
size_t count,
double time);
5051 bool setArrayAtTime(
const std::string& propertyName,
const Color data[],
size_t count,
double time);
5052 bool setArrayAtTime(
const char* propertyName,
const Plugin data[],
size_t count,
double time);
5053 bool setArrayAtTime(
const std::string& propertyName,
const Plugin data[],
size_t count,
double time);
5054 bool setArrayAtTime(
const char* propertyName,
const std::string data[],
size_t count,
double time);
5055 bool setArrayAtTime(
const std::string& propertyName,
const std::string data[],
size_t count,
double time);
5056 bool setValueAtTime(
const char* propertyName,
const void* data,
size_t size,
double time);
5057 bool setValueAtTime(
const std::string& propertyName,
const void* data,
size_t size,
double time);
5063 VUtils::IntRefList getIntRefListAtTime(
const char* propertyName,
double time,
bool& ok);
5066 VUtils::IntRefList getIntRefListAtTime(
const std::string& propertyName,
double time);
5067 VUtils::IntRefList getIntRefListAtTime(
const std::string& propertyName,
double time,
bool& ok);
5076 VUtils::FloatRefList getFloatRefListAtTime(
const std::string& propertyName,
double time,
bool& ok);
5085 VUtils::VectorRefList getVectorRefListAtTime(
const std::string& propertyName,
double time,
bool& ok);
5094 VUtils::ColorRefList getColorRefListAtTime(
const std::string& propertyName,
double time,
bool& ok);
5103 VUtils::ValueRefList getValueRefListAtTime(
const std::string& propertyName,
double time,
bool& ok);
5114 VUtils::CharString getCharString(
const char* propertyName);
5115 VUtils::CharString getCharString(
const char* propertyName,
bool& ok);
5116 VUtils::CharString getCharStringAtTime(
const char* propertyName,
double time);
5117 VUtils::CharString getCharStringAtTime(
const char* propertyName,
double time,
bool& ok);
5118 VUtils::CharString getCharString(
const std::string& propertyName);
5119 VUtils::CharString getCharString(
const std::string& propertyName,
bool& ok);
5120 VUtils::CharString getCharStringAtTime(
const std::string& propertyName,
double time);
5121 VUtils::CharString getCharStringAtTime(
const std::string& propertyName,
double time,
bool& ok);
5124 bool setValueAtTime(
const char* propertyName,
const VUtils::IntRefList& intList,
double time);
5126 bool setValueAtTime(
const std::string& propertyName,
const VUtils::IntRefList& intList,
double time);
5129 bool setValueAtTime(
const char* propertyName,
const VUtils::FloatRefList& floatList,
double time);
5131 bool setValueAtTime(
const std::string& propertyName,
const VUtils::FloatRefList& floatList,
double time);
5134 bool setValueAtTime(
const char* propertyName,
const VUtils::VectorRefList& vectorList,
double time);
5136 bool setValueAtTime(
const std::string& propertyName,
const VUtils::VectorRefList& vectorList,
double time);
5139 bool setValueAtTime(
const char* propertyName,
const VUtils::ColorRefList& colorList,
double time);
5141 bool setValueAtTime(
const std::string& propertyName,
const VUtils::ColorRefList& colorList,
double time);
5154 bool setValueAtTime(
const char* propertyName,
const VUtils::ValueRefList& valueList,
double time);
5156 bool setValueAtTime(
const std::string& propertyName,
const VUtils::ValueRefList& valueList,
double time);
5158 bool setValue(
const char* propertyName,
const VUtils::CharString& str);
5159 bool setValueAtTime(
const char* propertyName,
const VUtils::CharString& str,
double time);
5160 bool setValue(
const std::string& propertyName,
const VUtils::CharString& str);
5161 bool setValueAtTime(
const std::string& propertyName,
const VUtils::CharString& str,
double time);
5172 friend class Internal::BinaryValueBuilder;
5181 int getOutputIndex()
const noexcept {
return outPropIdx; }
5216 return outPropIdx >= 0;
5226 friend std::ostream& operator <<(std::ostream& stream,
const PluginRefT& pluginRef);
5254 PluginRefT(
const T &plugin) noexcept : T(plugin), outPropIdx(0) {}
5266 PluginRefT(
const X &plugin) noexcept : T(
static_cast<X
>(plugin)), outPropIdx(0) {}
5285 return outPropIdx >= 0;
5296 friend std::ostream& operator <<(std::ostream& stream,
const PluginRefT<U>& pluginRef);
5301 friend class Internal::BinaryValueParser;
5302 friend class Internal::BinaryValueBuilder;
5303 friend struct Internal::MeshFileDataParser;
5304 friend std::ostream& operator<<(std::ostream& stream,
const Value& value);
5308 char val[VRAY_MAXIMUM4(
sizeof(
Transform),
sizeof(std::string),
sizeof(ValueList),
sizeof(
PluginRef))];
5313 explicit Value(Type type)
noexcept;
5315 void copyValue(
const Value& value);
5316 void moveValue(
Value&& value)
noexcept;
5317 void swapValue(
Value& value)
noexcept;
5318 void destroyValue()
noexcept;
5319 template<
typename T, Type TYPE>
void constructOnly_()
noexcept;
5320 template<
typename T, Type TYPE>
void constructListWithIterators_(
const T* first,
const T* last);
5321 template<
typename T, Type TYPE,
bool noExcept>
void constructWithValue_(T&& value)
noexcept(noExcept);
5322 template<
typename T, Type TYPE>
void setToValue_(T&& value);
5323 template<
typename T> T& interpretAs_();
5324 template<
typename T>
const T& interpretAs_()
const;
5325 template<
typename T, Type TYPE> T& viewAs_();
5326 template<
typename T, Type TYPE>
const T& viewAs_()
const;
5327 template<
typename T, Type TYPE> T getValue_()
const;
5337 explicit
Value(
int value) noexcept;
5338 explicit
Value(
float value) noexcept;
5339 explicit
Value(
double value) noexcept;
5340 explicit
Value(
bool value) noexcept;
5346 explicit
Value(const IntList& value);
5347 explicit
Value(IntList&& value) noexcept;
5348 explicit
Value(const FloatList& value);
5349 explicit
Value(FloatList&& value) noexcept;
5350 explicit
Value(const VectorList& value);
5351 explicit
Value(VectorList&& value) noexcept;
5352 explicit
Value(const ColorList& value);
5353 explicit
Value(ColorList&& value) noexcept;
5354 explicit
Value(TransformList&& value) noexcept;
5355 explicit
Value(const TransformList& value);
5356 explicit
Value(const ValueList& value);
5357 explicit
Value(ValueList&& value) noexcept;
5358 explicit
Value(const StringList& value);
5359 explicit
Value(StringList&& value) noexcept;
5360 explicit
Value(const PluginList& value);
5361 explicit
Value(PluginList&& value) noexcept;
5362 explicit
Value(const
char* value);
5363 explicit
Value(const std::
string& value);
5364 explicit
Value(std::
string&& value) noexcept;
5366 Value(const
int* values,
size_t count);
5367 Value(const
float* values,
size_t count);
5373 template<
size_t count> explicit
Value(const
int(&arr)[count]);
5374 template<
size_t count> explicit
Value(const
float(&arr)[count]);
5375 template<
size_t count> explicit
Value(const
Vector(&arr)[count]);
5376 template<
size_t count> explicit
Value(const
Color(&arr)[count]);
5377 template<
size_t count> explicit
Value(const
Transform(&arr)[count]);
5378 template<
size_t count> explicit
Value(const
Plugin(&arr)[count]);
5379 template<
size_t count> explicit
Value(const
Value(&arr)[count]);
5380 template<
size_t count> explicit
Value(
Value(&&arr)[count]);
5387 void swap(
Value& value) noexcept;
5391 bool operator==(const
Value& value) const noexcept;
5392 bool operator!=(const
Value& value) const noexcept;
5440 void set(const std::
string& value);
5443 void set(std::
string&& value);
5446 void set(const IntList& value);
5452 void set(const FloatList& value);
5458 void set(const ColorList& value);
5464 void set(const VectorList& value);
5470 void set(const TransformList& value);
5473 void set(TransformList&& value);
5476 void set(const ValueList& value);
5482 void set(const StringList& value);
5488 void set(const PluginList& value);
5494 void set(const
int* values,
size_t count);
5497 void set(const
float* values,
size_t count);
5509 void set(const std::
string* values,
size_t count);
5513 template<typename T> T&
as();
5517 template<typename T> const T&
as() const;
5522 template<typename T> T
get() const;
5614 std::ostream&
toString(std::ostream& stream) const;
5617 std::ostream& operator <<(std::ostream& stream, const IntList& list);
5618 std::ostream& operator <<(std::ostream& stream, const FloatList& list);
5619 std::ostream& operator <<(std::ostream& stream, const VectorList& list);
5620 std::ostream& operator <<(std::ostream& stream, const ColorList& list);
5621 std::ostream& operator <<(std::ostream& stream, const TransformList& list);
5622 std::ostream& operator <<(std::ostream& stream, const ValueList& list);
5623 std::ostream& operator <<(std::ostream& stream, const StringList& list);
5624 std::ostream& operator <<(std::ostream& stream, const PluginList& list);
5625 std::ostream& operator <<(std::ostream& stream, const
Value& value);
5677 , hexTransforms(false)
5678 , renderElementsSeparateFolders(false)
5680 , currentFrameOnly(false)
5681 , incremental(false)
5682 , appendFrameSuffix(false)
5685 , rightInterval(0.0)
5686 , vrdataExport(false)
5687 , vrdataSmallBufferSizeLimit(2048)
5688 , vrdataFileSizeLimitMiB(0)
5689 , vrfilesExport(false)
5690 , vrfilesComputeHashes(false)
5720 enum VFBMenuItemType {
5753 enum RenderSizesBitmask {
5755 RS_IMG_SIZE = 1 << 0,
5756 RS_RENDER_RGN = 1 << 1,
5757 RS_CROP_RGN = 1 << 2
5771 enum ReasonsForAutoRename {
5776 NO_OVERWRITE_NO_EXISTING_PLUGIN_BUT_INVALID_PLUGIN_NAME,
5779 NO_OVERWRITE_BUT_EXISTING_PLUGIN_WITH_NAME,
5782 OVERWRITE_EXISTING_PLUGIN_WITH_NAME_BUT_DIFFERENT_TYPE
5808 this->skipOnlyCurrentPlugin =
false;
5809 this->skipAllSuccessorsOfCurrentPlugin =
false;
5810 this->overwriteExistingPlugin =
false;
5813 PreCreateCallbackOptions(
const char* name,
const bool skipOnlyCurrentPlugin =
false,
const bool skipAllSuccessorsOfCurrentPlugin =
false,
const bool overwriteExistingPlugin =
false) {
5817 this->skipOnlyCurrentPlugin = skipOnlyCurrentPlugin;
5818 this->skipAllSuccessorsOfCurrentPlugin = skipAllSuccessorsOfCurrentPlugin;
5819 this->overwriteExistingPlugin = overwriteExistingPlugin;
5822 PreCreateCallbackOptions(
const std::string& name,
const bool skipOnlyCurrentPlugin =
false,
const bool skipAllSuccessorsOfCurrentPlugin =
false,
const bool overwriteExistingPlugin =
false) {
5823 if (!name.empty()) {
5826 this->skipOnlyCurrentPlugin = skipOnlyCurrentPlugin;
5827 this->skipAllSuccessorsOfCurrentPlugin = skipAllSuccessorsOfCurrentPlugin;
5828 this->overwriteExistingPlugin = overwriteExistingPlugin;
5865 VRayRenderer& srcRenderer, VRayRenderer& dstRenderer,
5866 const std::vector<Plugin>& includeListOfPlugins,
const std::vector<Plugin>& excludeListOfPlugins,
5867 Util::PreCreateCallbackOptions(*preCreateCallback)(VRayRenderer& dstRenderer, Plugin& srcPlugin,
void*),
5868 void(*postCreateCallback)(Plugin& dstPlugin,
const char* srcPluginName, Util::ReasonsForAutoRename autoRenamedResult,
const char* preCreateCallbackReturnedName,
void*),
5869 const void* userData =
nullptr);
5902 template<
class T, Util::PreCreateCallbackOptions(T::* TMethod)(VRayRenderer& dstRenderer, Plugin& srcPlugin,
void*),
5903 void(T::* TMethod1)(Plugin& dstPlugin,
const char* srcPluginName, Util::ReasonsForAutoRename autoRenamedResult,
const char* preCreateCallbackReturnedName,
void*)>
5905 VRayRenderer& srcRenderer, VRayRenderer& dstRenderer,
5906 const std::vector<Plugin>& includeListOfPlugins,
const std::vector<Plugin>& excludeListOfPlugins,
5908 const void* userData =
nullptr);
5936 VRayRenderer& srcRenderer, VRayRenderer& dstRenderer,
5937 const char* pluginType,
5938 Util::PreCreateCallbackOptions(*preCreateCallback)(VRayRenderer& dstRenderer, Plugin& srcPlugin,
void*),
5939 void(*postCreateCallback)(Plugin& dstPlugin,
const char* srcPluginName, Util::ReasonsForAutoRename autoRenamedResult,
const char* preCreateCallbackReturnedName,
void*),
5940 const void* userData =
nullptr);
5944 VRayRenderer& srcRenderer, VRayRenderer& dstRenderer,
5945 const std::string& pluginType,
5946 Util::PreCreateCallbackOptions(*preCreateCallback)(VRayRenderer& dstRenderer, Plugin& srcPlugin,
void*),
5947 void(*postCreateCallback)(Plugin& dstPlugin,
const char* srcPluginName, Util::ReasonsForAutoRename autoRenamedResult,
const char* preCreateCallbackReturnedName,
void*),
5948 const void* userData =
nullptr);
5952 VRayRenderer& srcRenderer, VRayRenderer& dstRenderer,
5953 const PluginTypeId& pluginTypeId,
5954 Util::PreCreateCallbackOptions(*preCreateCallback)(VRayRenderer& dstRenderer, Plugin& srcPlugin,
void*),
5955 void(*postCreateCallback)(Plugin& dstPlugin,
const char* srcPluginName, Util::ReasonsForAutoRename autoRenamedResult,
const char* preCreateCallbackReturnedName,
void*),
5956 const void* userData =
nullptr);
5959 template<
class PluginType>
5961 VRayRenderer& srcRenderer, VRayRenderer& dstRenderer,
5962 Util::PreCreateCallbackOptions(*preCreateCallback)(VRayRenderer& dstRenderer, Plugin& srcPlugin,
void*),
5963 void(*postCreateCallback)(Plugin& dstPlugin,
const char* srcPluginName, Util::ReasonsForAutoRename autoRenamedResult,
const char* preCreateCallbackReturnedName,
void*),
5964 const void* userData =
nullptr);
5989 template<
class T, Util::PreCreateCallbackOptions(T::* TMethod)(VRayRenderer& dstRenderer, Plugin& srcPlugin,
void*),
5990 void(T::* TMethod1)(Plugin& dstPlugin,
const char* srcPluginName, Util::ReasonsForAutoRename autoRenamedResult,
const char* preCreateCallbackReturnedName,
void*)>
5992 VRayRenderer& srcRenderer, VRayRenderer& dstRenderer,
5993 const char* pluginType,
5995 const void* userData =
nullptr);
5998 template<
class T, Util::PreCreateCallbackOptions(T::* TMethod)(VRayRenderer& dstRenderer, Plugin& srcPlugin,
void*),
5999 void(T::* TMethod1)(Plugin& dstPlugin,
const char* srcPluginName, Util::ReasonsForAutoRename autoRenamedResult,
const char* preCreateCallbackReturnedName,
void*)>
6001 VRayRenderer& srcRenderer, VRayRenderer& dstRenderer,
6002 const std::string& pluginType,
6004 const void* userData =
nullptr);
6007 template<
class T, Util::PreCreateCallbackOptions(T::* TMethod)(VRayRenderer& dstRenderer, Plugin& srcPlugin,
void*),
6008 void(T::* TMethod1)(Plugin& dstPlugin,
const char* srcPluginName, Util::ReasonsForAutoRename autoRenamedResult,
const char* preCreateCallbackReturnedName,
void*)>
6010 VRayRenderer& srcRenderer, VRayRenderer& dstRenderer,
6011 const PluginTypeId& pluginTypeId,
6013 const void* userData =
nullptr);
6016 template<
class T, Util::PreCreateCallbackOptions(T::* TMethod)(VRayRenderer& dstRenderer, Plugin& srcPlugin,
void*),
6017 void(T::* TMethod1)(Plugin& dstPlugin,
const char* srcPluginName, Util::ReasonsForAutoRename autoRenamedResult,
const char* preCreateCallbackReturnedName,
void*),
6020 VRayRenderer& srcRenderer, VRayRenderer& dstRenderer,
6022 const void* userData =
nullptr);
6047 friend class Internal::Access;
6049 friend int Util::copyPlugins(
6051 const std::vector<Plugin>& includeListOfPlugins,
const std::vector<Plugin>& excludeListOfPlugins,
6053 void(*postCreateCallback)(
Plugin& dstPlugin,
const char* srcPluginName, Util::ReasonsForAutoRename autoRenamedResult,
const char* preCreateCallbackReturnedName,
void*),
6054 const void* userData);
6057 void(T::* TMethod1)(
Plugin& dstPlugin,
const char* srcPluginName, Util::ReasonsForAutoRename autoRenamedResult,
const char* preCreateCallbackReturnedName,
void*)>
6058 friend int Util::copyPlugins(
6060 const std::vector<Plugin>& includeListOfPlugins,
const std::vector<Plugin>& excludeListOfPlugins,
6062 const void* userData);
6064 friend int Util::copyPlugins(
6066 const char* pluginType,
6068 void(*postCreateCallback)(
Plugin& dstPlugin,
const char* srcPluginName, Util::ReasonsForAutoRename autoRenamedResult,
const char* preCreateCallbackReturnedName,
void*),
6069 const void* userData);
6071 friend int Util::copyPlugins(
6073 const std::string& pluginType,
6075 void(*postCreateCallback)(
Plugin& dstPlugin,
const char* srcPluginName, Util::ReasonsForAutoRename autoRenamedResult,
const char* preCreateCallbackReturnedName,
void*),
6076 const void* userData);
6078 friend int Util::copyPlugins(
6080 const PluginTypeId& pluginTypeId,
6082 void(*postCreateCallback)(
Plugin& dstPlugin,
const char* srcPluginName, Util::ReasonsForAutoRename autoRenamedResult,
const char* preCreateCallbackReturnedName,
void*),
6083 const void* userData);
6085 template<
class PluginType>
6086 friend int Util::copyPlugins(
6089 void(*postCreateCallback)(
Plugin& dstPlugin,
const char* srcPluginName, Util::ReasonsForAutoRename autoRenamedResult,
const char* preCreateCallbackReturnedName,
void*),
6090 const void* userData);
6093 void(T::* TMethod1)(
Plugin& dstPlugin,
const char* srcPluginName, Util::ReasonsForAutoRename autoRenamedResult,
const char* preCreateCallbackReturnedName,
void*)>
6094 friend int Util::copyPlugins(
6096 const char* pluginType,
6098 const void* userData);
6101 void(T::* TMethod1)(
Plugin& dstPlugin,
const char* srcPluginName, Util::ReasonsForAutoRename autoRenamedResult,
const char* preCreateCallbackReturnedName,
void*)>
6102 friend int Util::copyPlugins(
6104 const std::string& pluginType,
6106 const void* userData);
6109 void(T::* TMethod1)(
Plugin& dstPlugin,
const char* srcPluginName, Util::ReasonsForAutoRename autoRenamedResult,
const char* preCreateCallbackReturnedName,
void*)>
6110 friend int Util::copyPlugins(
6112 const PluginTypeId& pluginTypeId,
6114 const void* userData);
6117 void(T::* TMethod1)(
Plugin& dstPlugin,
const char* srcPluginName, Util::ReasonsForAutoRename autoRenamedResult,
const char* preCreateCallbackReturnedName,
void*),
6119 friend int Util::copyPlugins(
6122 const void* userData);
6125 static void pluginCopyParamsPreCreateCallback(
const InstanceId srcPluginID, Internal::PreCreateCallbackOptions* opts,
void* info);
6126 static void pluginCopyParamsPostCreateCallback(
6127 const InstanceId dstPluginID,
const char* srcPluginName,
6128 Util::ReasonsForAutoRename autoRenamedResult,
const char* preCreateCallbackReturnedName,
6131 class PluginCopyParamsCreateDelegate {
6135 typedef void (*tstubPost)(
void* pobject,
Plugin& dstPlugin,
const char* srcPluginName, Util::ReasonsForAutoRename autoRenamedResult,
const char* preCreateCallbackReturnedName,
void* userObj);
6136 typedef void (*tfuncPost)(
Plugin& dstPlugin,
const char* srcPluginName, Util::ReasonsForAutoRename autoRenamedResult,
const char* preCreateCallbackReturnedName,
void* userObj);
6142 tmethodPre() : pstubPre() {}
6143 tmethodPre(tstubPre pstubPre) : pstubPre(pstubPre) {}
6144 tmethodPre(tfuncPre pfuncPre) : pfuncPre(pfuncPre) {}
6148 tstubPost pstubPost;
6149 tfuncPost pfuncPost;
6150 tmethodPost() : pstubPost() {}
6151 tmethodPost(tstubPost pstubPost) : pstubPost(pstubPost) {}
6152 tmethodPost(tfuncPost pfuncPost) : pfuncPost(pfuncPost) {}
6159 template <
class T, Util::PreCreateCallbackOptions(T::* PreCreateTMethod)(VRayRenderer& dstRenderer, Plugin& srcPlugin,
void* puserObj)>
6161 T* p =
static_cast<T*
>(pobject);
6162 return (p->*PreCreateTMethod)(dstRenderer, srcPlugin, puserObj);
6165 template <
class T,
void(T::* PostCreateTMethod)(Plugin& dstPlugin, const
char* srcPluginName, Util::ReasonsForAutoRename autoRenamedResult, const
char* preCreateCallbackReturnedName,
void* puserObj)>
6166 static void method_stubPost(
void* pobject,
Plugin& dstPlugin,
const char* srcPluginName, Util::ReasonsForAutoRename autoRenamedResult,
const char* preCreateCallbackReturnedName,
void* puserObj) {
6167 T* p =
static_cast<T*
>(pobject);
6168 (p->*PostCreateTMethod)(dstPlugin, srcPluginName, autoRenamedResult, preCreateCallbackReturnedName, puserObj);
6171 PluginCopyParamsCreateDelegate(tfuncPre pfuncPre, tfuncPost pfuncPost,
void* puserObj,
VRayRenderer* srcRenderer,
VRayRenderer* dstRenderer) :
6172 pobject(), pmethodPre(pfuncPre), pmethodPost(pfuncPost), puserObj(puserObj), srcRenderer(srcRenderer), dstRenderer(dstRenderer) {}
6173 PluginCopyParamsCreateDelegate(
void* pobject, tstubPre pstubPre, tstubPost pstubPost,
void* puserObj,
VRayRenderer* srcRenderer,
VRayRenderer* dstRenderer) :
6174 pobject(pobject), pmethodPre(pstubPre), pmethodPost(pstubPost), puserObj(puserObj), srcRenderer(srcRenderer), dstRenderer(dstRenderer) {}
6178 void(T::* PostCreateTMethod)(
Plugin& dstPlugin,
const char* srcPluginName, Util::ReasonsForAutoRename autoRenamedResult,
const char* preCreateCallbackReturnedName,
void*)>
6179 static PluginCopyParamsCreateDelegate from_method(T* pobject,
void* puserObj,
VRayRenderer* srcRenderer,
VRayRenderer* dstRenderer) {
6180 return PluginCopyParamsCreateDelegate(pobject, &method_stubPre<T, PreCreateTMethod>, &method_stubPost<T, PostCreateTMethod>, puserObj, srcRenderer, dstRenderer);
6183 static PluginCopyParamsCreateDelegate from_function(tfuncPre pfuncPre, tfuncPost pfuncPost,
void* puserObj,
VRayRenderer* srcRenderer,
VRayRenderer* dstRenderer) {
6184 return PluginCopyParamsCreateDelegate(pfuncPre, pfuncPost, puserObj, srcRenderer, dstRenderer);
6188 Plugin srcPlugin = srcRenderer->getPlugin_internal(srcPluginID);
6189 return pobject ? (*pmethodPre.pstubPre)(pobject, *dstRenderer, srcPlugin, puserObj) : (*pmethodPre.pfuncPre)(*dstRenderer, srcPlugin, puserObj);
6192 void operator()(
const InstanceId& dstPluginID,
const char* srcPluginName, Util::ReasonsForAutoRename autoRenamedResult,
const char* preCreateCallbackReturnedName)
const {
6193 Plugin dstPlugin = dstRenderer->getPlugin_internal(dstPluginID);
6194 pobject ? (*pmethodPost.pstubPost)(pobject, dstPlugin, srcPluginName, autoRenamedResult, preCreateCallbackReturnedName, puserObj) :
6195 (*pmethodPost.pfuncPost)(dstPlugin, srcPluginName, autoRenamedResult, preCreateCallbackReturnedName, puserObj);
6205 class PluginFilterDelegate {
6206 typedef bool (*tstub)(
void* pobject,
VRayRenderer& renderer,
const char* type, std::string& name,
void* userObj);
6207 typedef bool (*tfunc)(
VRayRenderer& renderer,
const char* type, std::string& name,
void* userObj);
6213 tmethod() : pstub() {}
6214 tmethod(tstub pstub) : pstub(pstub) {}
6215 tmethod(tfunc pfunc) : pfunc(pfunc) {}
6220 template <
class T,
bool (T::*TMethod)(VRayRenderer&, const
char* type, std::
string& name,
void* puserObj)>
6221 static bool method_stub(
void* pobject,
VRayRenderer& renderer,
const char* type, std::string& name,
void *puserObj) {
6222 T* p =
static_cast<T*
>(pobject);
6223 return (p->*TMethod)(renderer, type, name, puserObj);
6226 PluginFilterDelegate(tfunc pfunc,
void *puserObj,
VRayRenderer& renderer) : pobject(), pmethod(pfunc), puserObj(puserObj), renderer(renderer) {}
6227 PluginFilterDelegate(
void *pobject, tstub pstub,
void *puserObj,
VRayRenderer& renderer) : pobject(pobject), pmethod(pstub), puserObj(puserObj), renderer(renderer) {}
6230 template <
class T,
bool (T::*TMethod)(VRayRenderer&, const
char*, std::
string&,
void*)>
6231 static PluginFilterDelegate from_method(T* pobject,
void *puserObj,
VRayRenderer& renderer) {
6232 return PluginFilterDelegate(pobject, &method_stub<T, TMethod>, puserObj, renderer);
6235 static PluginFilterDelegate from_function(tfunc pfunc,
void *puserObj,
VRayRenderer& renderer) {
6236 return PluginFilterDelegate(pfunc, puserObj, renderer);
6239 bool operator()(
const char* type, std::string& name)
const {
6240 return pobject ? (*pmethod.pstub)(pobject, renderer, type, name, puserObj) : (*pmethod.pfunc)(renderer, type, name, puserObj);
6244 template<
class T,
void (T::*TMethod)(VRayRenderer&, RendererState oldState, RendererState newState,
double instant,
void* userData)>
6245 static void stateChangedCallbackT(
const Internal::StateChangedParams* params);
6246 static void stateChangedCallback(
const Internal::StateChangedParams* params);
6248 template<
class T,
void (T::*TMethod)(VRayRenderer&,
double instant,
void* userData)>
6249 static void rendererCloseCallbackT(
const Internal::CallbackParamsBase* params);
6250 static void rendererCloseCallback(
const Internal::CallbackParamsBase* params);
6252 template<
class T,
void (T::*TMethod)(VRayRenderer&, VRayImage* img,
unsigned long long changeIndex, ImagePassType pass,
double instant,
void* userData)>
6253 static void progressiveImageUpdatedCallbackT(
const Internal::ImageUpdatedParams* params);
6254 static void progressiveImageUpdatedCallback(
const Internal::ImageUpdatedParams* params);
6256 template<
class T,
void (T::*TMethod)(VRayRenderer& renderer, const
char* msg, MessageLevel level,
double instant,
void* userData)>
6257 static void logMessageCallbackT(
const Internal::LogMessageParams* params);
6258 static void logMessageCallback(
const Internal::LogMessageParams* params);
6260 template<
class T,
void (T::*TMethod)(VRayRenderer& renderer, const
char* msg,
int errorCode, LicenseUserStatus userStatus,
double instant,
void* userData)>
6261 static void licenseErrorCallbackT(
const Internal::LicenseErrorParams* params);
6262 static void licenseErrorCallback(
const Internal::LicenseErrorParams* params);
6264 template<
class T,
void (T::*TMethod)(VRayRenderer& renderer,
int x,
int y,
int w
idth,
int height, const
char* host, ImagePassType pass,
double instant,
void* userData)>
6265 static void bucketInitCallbackT(
const Internal::BucketInitParams* params);
6266 static void bucketInitCallback(
const Internal::BucketInitParams* params);
6268 template<
class T,
void (T::*TMethod)(VRayRenderer& renderer,
int x,
int y, const
char* host, VRayImage* image, ImagePassType pass,
double instant,
void* userData)>
6269 static void bucketReadyCallbackT(
const Internal::BucketReadyParams* params);
6270 template<
class T,
void (T::*TMethod)(VRayRenderer& renderer,
int x,
int y,
int w
idth,
int height, const
char* host, ImagePassType pass,
double instant,
void* userData)>
6271 static void bucketReadyCallback1T(
const Internal::BucketReadyParams* params);
6272 static void bucketReadyCallback(
const Internal::BucketReadyParams* params);
6273 static void bucketReadyCallback1(
const Internal::BucketReadyParams* params);
6275 template<
class T,
void (T::*TMethod)(VRayRenderer&, const
char* msg,
int elementNumber,
int elementsCount,
double instant,
void* userData)>
6276 static void progressCallbackT(
const Internal::ProgressParams* params);
6277 static void progressCallback(
const Internal::ProgressParams* params);
6279 template<
class T,
void (T::*TMethod)(VRayRenderer&, const
char* propName,
double instant,
void* userData)>
6280 static void renderViewChangedCallbackT(
const Internal::RenderViewChangedParams* params);
6281 static void renderViewChangedCallback(
const Internal::RenderViewChangedParams* params);
6283 template<
class T,
void (T::*TMethod)(VRayRenderer&,
bool isRendering,
double instant,
void* userData)>
6284 static void vfbRenderLastCallbackT(
const Internal::RenderLastParams* params);
6285 static void vfbRenderLastCallback(
const Internal::RenderLastParams* params);
6287 template<
class T,
void (T::*TMethod)(VRayRenderer&, const
char* hostName,
double instant,
void* userData)>
6288 static void drHostConnectedCallbackT(
const Internal::ConnectParams* params);
6289 static void drHostConnectedCallback(
const Internal::ConnectParams* params);
6291 template<
class T,
void(T::*TMethod)(VRayRenderer&,
int commandId,
int x,
int y,
void* userData)>
6292 static void vfbContextMenuSelectedCallbackT(
const Internal::VFBContextMenuSelectedParams* params);
6293 static void vfbContextMenuSelectedCallback(
const Internal::VFBContextMenuSelectedParams* params);
6295 static char* pluginFilterCallback(
const char* pluginType,
const char* pluginName,
void* userObject);
6296 static void deleteTempStringCallback(
char*,
size_t, std::string* str);
6299 template<
class T,
void(T::*TMethod)(VRayRenderer&, VRayImage* img,
void* userData)>
6300 static void manualDenoiseCallbackT(
VRayImage* img,
void* info);
6301 static void manualDenoiseCallback(
VRayImage* img,
void* info);
6303 template<
class T,
int(T::*TMethod)(VRayRenderer&, const std::vector<LightMixChange>& lightMixChanges,
double instant,
void* userData)>
6304 static int lightMixTransferToSceneCallbackT(Internal::LightMixCallbackParams* params);
6305 static int lightMixTransferToSceneCallback(Internal::LightMixCallbackParams* params);
6306 void transferToScenePreCallback(std::vector<LightMixChange>& changes,
const Internal::LightMixCallbackParams* params);
6307 void transferToScenePostCallback(
const std::vector<LightMixChange>& changes, Internal::LightMixCallbackParams* params);
6309 template<
class T,
int(T::*TMethod)(VRayRenderer&, const std::vector<std::
string>& fileList,
double instant,
void* userData)>
6310 static int uploadToCollaborationCallbackT(Internal::UploadToCollaborationParams* params);
6311 static int uploadToCollaborationCallback(Internal::UploadToCollaborationParams* params);
6312 void uploadToCollaborationPreCallback(std::vector<std::string>& fileList,
const Internal::UploadToCollaborationParams* params);
6314 template<
class T,
void (T::* TMethod)(VRayRenderer&,
int enabled,
int mode,
int selectionLocked,
double instant,
void* userData)>
6315 static void debugShadingCallbackT(
const Internal::DebugShadingCallbackParams* params);
6316 static void debugShadingCallback(
const Internal::DebugShadingCallbackParams* params);
6318 template<
class T,
void(T::*TMethod)(VRayRenderer&, const std::
string &outputFile,
int fileType,
double instant,
void* userData)>
6319 static void vrayProfilerWriteCallbackT(
const Internal::VRayProfilerWriteParams* params);
6320 static void vrayProfilerWriteCallback(
const Internal::VRayProfilerWriteParams* params);
6322 template<
class T,
bool (T::*TMethod)(VRayRenderer&, VFBRenderElementType type,
double instant,
void* userData)>
6323 static int vfbAddRenderElementToSceneT(
const Internal::AddRenderElementToSceneParams* params);
6324 static int vfbAddRenderElementToScene(
const Internal::AddRenderElementToSceneParams* params);
6327 typedef void* InstanceHandleType;
6333 Internal::VRayRendererNative *rendererNative;
6337 VFB() : autoCommit(
true), layerManager(*
this) {}
6339 VFB& operator=(
const VFB&);
6344 void show(
bool show,
bool setFocus =
true);
6380 VFBState*
getState(
size_t& dataSize,
bool includeMain =
true,
bool includeHistory =
true)
const;
6389 void setState(
const void* vfbStateData,
size_t dataSize,
bool setMain =
true,
bool setHistory =
true);
6740 if (&myLayerManager == &rhs.myLayerManager) {
6741 layerUID = rhs.layerUID;
6747 bool operator==(
const Layer& rhs)
const {
6748 return layerUID == rhs.layerUID && &myLayerManager == &rhs.myLayerManager;
6751 Layer(
const int& layerUID,
const LayerManager& layerManager) :
6752 layerUID(layerUID), myLayerManager(layerManager){
6755 void invalidateLayer()
const {
6756 layerUID = NO_LAYER_ID;
6759 const LayerManager& myLayerManager;
6760 mutable LayerUID layerUID;
6946 void* original = errMsgHandle.exchange(
nullptr);
6948 Internal::releaseCharString(&original);
6954 void* original = (
void*)errMsgHandle;
6955 return Internal::getCharStringContent(&original);
6960 Internal::VRayRendererNative* getNativeRenderer()
const {
6961 return myVfb.rendererNative;
6965 void handleError(
void*& errorMsgHandlePtr,
const bool throwException =
true)
const {
6966 const char* errstr =
nullptr;
6967 if (throwException) {
6968 errstr = Internal::getCharStringContent(&errorMsgHandlePtr);
6970 void* oldErr = errMsgHandle.exchange(errorMsgHandlePtr);
6971 Internal::releaseCharString(&oldErr);
6972 if (throwException) {
6973 throw VFBLayerErr(errstr);
6977 void handleError(
void*& errorMsgHandlePtr,
const bool throwException =
false)
const {
6978 void* oldErr = errMsgHandle.exchange(errorMsgHandlePtr);
6979 Internal::releaseCharString(&oldErr);
6983 void getLayerListAndReleaseIDs(std::vector<Layer>& layers, LayerUID*& layerIDs,
const int len)
const {
6984 layers.reserve(len);
6985 for (
int i = 0; i < len; i++) {
6986 layers.push_back(Layer(layerIDs[i], *
this));
6988 Internal::C_memory_free(layerIDs);
6991 static void getStringListAndReleaseCharStars(std::vector<std::string>& words,
char*& cStyleWords,
const int len) {
6993 const char* curr = cStyleWords;
6994 for (
int i = 0; i < len; i++) {
6995 words.emplace_back(curr);
6996 curr += words[i].size() + 1;
6998 Internal::C_memory_free(cStyleWords);
7001 Layer getCommonLayer(
int (*layerLoader)(Internal::VRayRendererNative* renderer, LayerUID* layerID,
void** errorMsgHandlePtr))
const {
7002 LayerUID layerID = NO_LAYER_ID;
7003 void* errorMsgHandlePtr =
nullptr;
7004 int err = layerLoader(myVfb.rendererNative, &layerID, &errorMsgHandlePtr);
7006 handleError(errorMsgHandlePtr);
7007 return Layer(NO_LAYER_ID, *
this);
7009 return Layer(layerID, *
this);
7013 const VRayRenderer::VFB& myVfb;
7014 mutable std::atomic<void*> errMsgHandle;
7040 VRAY_DEPRECATED(
"getWindowHandle in unsafe and deprecated - use getNativeHandle or getQWidget instead")
7041 void* getWindowHandle() const;
7048 NativeWidgetHandle getNativeHandle() const;
7051 QWidget* getQWidget() const;
7057 VRAY_DEPRECATED("setParentWindow in unsafe and deprecated - use setNativeParentWindow or setQWidgetParent instead")
7058 void setParentWindow(
void* hWnd);
7065 void setNativeParentWindow(NativeWindowHandle handle);
7069 void setQWidgetParent(QWidget* parentWidget);
7075 bool getMinimumSize(
int& w,
int& h) const;
7080 bool loadColorCorrectionsPreset(const
char* filename);
7083 bool loadColorCorrectionsPreset(const std::
string& filename);
7088 bool saveColorCorrectionsPreset(const
char* filename) const;
7091 bool saveColorCorrectionsPreset(const std::
string& filename) const;
7096 bool setTitlePrefix(const
char* prefix);
7099 bool setTitlePrefix(const std::
string& prefix);
7104 bool setProjectPath(const
char *projectPath);
7107 bool setProjectPath(const std::
string& projectPath);
7111 void enableProgressBar(
bool enable = true);
7116 void setProgressText(const
char *text);
7119 void setProgressText(const std::
string& text);
7124 void setProgressValue(
float value = -1.0f);
7130 void setProgressTextAndValue(const
char *text,
float value);
7133 void setProgressTextAndValue(const std::
string& text,
float value);
7139 bool fillSettingsVFB(const
char* instanceName = NULL);
7142 bool fillSettingsVFB(const std::
string& instanceName);
7147 bool applySettingsVFB();
7152 bool loadImage(const
char* filename);
7155 bool loadImage(const std::
string& filename);
7159 bool saveImage(const
char* fileName) const;
7162 bool saveImage(const std::
string& fileName) const;
7177 void setUpdateAvailable(
bool available);
7182 void logMessage(MessageLevel level, const
char* message);
7185 void logMessage(MessageLevel level, const std::
string& message);
7192 void appendAdditionalStyleSheet(const
char *styleSheet);
7197 RENDER_MODE_PRODUCTION = -1,
7198 RENDER_MODE_INTERACTIVE = 0,
7199 RENDER_MODE_INTERACTIVE_CUDA = 4,
7200 RENDER_MODE_INTERACTIVE_OPTIX = 7,
7201 RENDER_MODE_INTERACTIVE_METAL = 8,
7202 RENDER_MODE_PRODUCTION_CUDA = 104,
7203 RENDER_MODE_PRODUCTION_OPTIX = 107,
7204 RENDER_MODE_PRODUCTION_METAL = 108,
7211 static bool isActiveState(RendererState value) {
return !isInactiveState(value); }
7216 return Internal::VRay_VRayRenderer_halfResolutionMode
7217 (getNativeRenderer());
7220 LicenseError licErr;
7221 PluginTypeId* pluginTypeIds;
7222 int pluginTypeIdsCount;
7224 void createInstance(
const Internal::RendererOptions_internal* options);
7225 int findPluginIdIndex(PluginTypeId typeId)
const;
7252 operator bool()
const;
7378 const char* propName;
7385 const char* vstring;
7395 const char* camName;
7405 const char* lightName;
7410 enum UserSceneManipType { USMType_Transform_Set = 0, USMType_Show = 1, USMType_Hide = 2 };
7412 enum UserSceneNodeObjectType { USNOType_Node = 0, USNOType_Camera = 1, USNOType_Light = 2 };
7419 const char* objName;
7421 UserSceneManipType umt;
7423 UserSceneNodeObjectType objType;
7540 bool setImageSize(
int width,
int height,
bool resetCropRegion =
true,
bool resetRenderRegion =
true);
7554 bool getCropRegion(
int& srcWidth,
int& srcHeight,
float& rgnLeft,
float& rgnTop,
float& rgnWidth,
float& rgnHeight)
const;
7568 bool setCropRegion(
int srcWidth,
int srcHeight,
float rgnLeft,
float rgnTop,
float rgnWidth,
float rgnHeight);
7587 int load(
const std::string& fileName);
7609 template<
typename T =
void>
7610 int loadAsText(
const char* text,
size_t length,
void(*freeFn)(
char* text,
size_t size, T* holderObject) = NULL, T* holderObject = NULL);
7616 int append(
const char* fileName,
bool drSendNameOnly =
false);
7619 int append(
const std::string& fileName,
bool drSendNameOnly =
false);
7626 int append(
const std::vector<const char*> &fileNames);
7629 int append(
const std::vector<std::string> &fileNames);
7659 template<
typename T =
void>
7660 int appendAsText(
const char* text,
size_t length,
void(*freeFn)(
char* text,
size_t size, T* holderObject) = NULL, T* holderObject = NULL);
7671 int loadFiltered(
const char* fileName,
bool (*callback)(
VRayRenderer&,
const char* pluginType, std::string& pluginName,
void*),
const void* userData = NULL);
7674 int loadFiltered(
const std::string& fileName,
bool(*callback)(
VRayRenderer&,
const char* pluginType, std::string& pluginName,
void*),
const void* userData = NULL);
7687 template<
class T,
bool (T::*TMethod)(VRayRenderer&, const
char* pluginType, std::
string& pluginName,
void*)>
7688 int loadFiltered(
const char* fileName, T& obj,
const void* userData = NULL);
7691 template<
class T,
bool (T::*TMethod)(VRayRenderer&, const
char* pluginType, std::
string& pluginName,
void*)>
7692 int loadFiltered(
const std::string& fileName, T& obj,
const void* userData = NULL);
7703 int appendFiltered(
const char* fileName,
bool(*callback)(
VRayRenderer&,
const char* pluginType, std::string& pluginName,
void*),
const void* userData = NULL);
7706 int appendFiltered(
const std::string& fileName,
bool(*callback)(
VRayRenderer&,
const char* pluginType, std::string& pluginName,
void*),
const void* userData = NULL);
7719 template<
class T,
bool (T::*TMethod)(VRayRenderer&, const
char* pluginType, std::
string& pluginName,
void*)>
7723 template<
class T,
bool (T::*TMethod)(VRayRenderer&, const
char* pluginType, std::
string& pluginName,
void*)>
7724 int appendFiltered(
const std::string& fileName, T& obj,
const void* userData = NULL);
7738 template<
class T,
bool (T::*TMethod)(VRayRenderer&, const
char* pluginType, std::
string& pluginName,
void*)>
7739 int appendFiltered(
const std::vector<const char*> &fileNames, T& obj,
const void* userData = NULL);
7742 template<
class T,
bool (T::*TMethod)(VRayRenderer&, const
char* pluginType, std::
string& pluginName,
void*)>
7743 int appendFiltered(
const std::vector<std::string> &fileNames, T& obj,
const void* userData = NULL);
7755 int appendFiltered(
const std::vector<const char*> &fileNames,
bool(*callback)(
VRayRenderer&,
const char* pluginType, std::string& pluginName,
void*),
const void* userData = NULL);
7758 int appendFiltered(
const std::vector<std::string> &fileNames,
bool(*callback)(
VRayRenderer&,
const char* pluginType, std::string& pluginName,
void*),
const void* userData = NULL);
7766 int loadAsTextFiltered(
const std::string& fileName,
bool(*callback)(
VRayRenderer&,
const char* pluginType, std::string& pluginName,
void*),
const void* userData = NULL);
7770 template<
class T,
bool (T::*TMethod)(VRayRenderer&, const
char* pluginType, std::
string& pluginName,
void*)>
7774 template<
class T,
bool (T::*TMethod)(VRayRenderer&, const
char* pluginType, std::
string& pluginName,
void*)>
7786 template<
class T,
bool (T::*TMethod)(VRayRenderer&, const
char* pluginType, std::
string& pluginName,
void*)>
7790 template<
class T,
bool (T::*TMethod)(VRayRenderer&, const
char* pluginType, std::
string& pluginName,
void*)>
7805 template<
class T,
bool (T::*TMethod)(VRayRenderer&, const
char* pluginType, std::
string& pluginName,
void*)>
7809 template<
class T,
bool (T::*TMethod)(VRayRenderer&, const
char* pluginType, std::
string& pluginName,
void*)>
7822 int appendAsTextFiltered(
const std::vector<const char*> &sceneTexts,
bool(*callback)(
VRayRenderer&,
const char* pluginType, std::string& pluginName,
void*),
const void* userData = NULL);
7825 int appendAsTextFiltered(
const std::vector<std::string> &sceneTexts,
bool(*callback)(
VRayRenderer&,
const char* pluginType, std::string& pluginName,
void*),
const void* userData = NULL);
7897 AddHostsResult
addHosts(
const std::string& hosts)
const;
7998 AwaitingOrIdle = -1,
8042 template <
class T,
class RetT = T> std::vector<RetT>
getPlugins()
const;
8045 std::vector<Plugin>
getPlugins(
const char* pluginClassName)
const;
8048 std::vector<Plugin>
getPlugins(
const std::string& pluginClassName)
const;
8146 template<
class T,
void (T::*TMethod)(VRayRenderer&, RendererState oldState, RendererState newState,
double instant,
void* userData)>
8155 template<
class T,
void (T::*TMethod)(VRayRenderer&,
double instant,
void* userData)>
8167 template<
class T,
void (T::*TMethod)(VRayRenderer&, VRayImage* img,
unsigned long long changeIndex, ImagePassType pass,
double instant,
void* userData)>
8176 void setOnLogMessage(
void(*callback)(
VRayRenderer&,
const char* msg, MessageLevel level,
double instant,
void* userData), MessageLevel minLevel=MessageInfo,
const void* userData = NULL);
8178 template<
class T,
void (T::*TMethod)(VRayRenderer& renderer, const
char* msg, MessageLevel level,
double instant,
void* userData)>
8179 void setOnLogMessage(T&
object, MessageLevel minLevel = MessageInfo,
const void* userData = NULL);
8188 void setOnLicenseError(
void(*callback)(
VRayRenderer&,
const char* msg,
int errorCode, LicenseUserStatus userStatus,
double instant,
void* userData),
const void* userData = NULL);
8190 template<
class T,
void (T::*TMethod)(VRayRenderer& renderer, const
char* msg,
int errorCode, LicenseUserStatus userStatus,
double instant,
void* userData)>
8203 void setOnBucketInit(
void(*callback)(
VRayRenderer&,
int x,
int y,
int width,
int height,
const char* host, ImagePassType pass,
double instant,
void* userData),
const void* userData = NULL);
8205 template<
class T,
void (T::*TMethod)(VRayRenderer&,
int x,
int y,
int w
idth,
int height, const
char* host, ImagePassType pass,
double instant,
void* userData)>
8219 template<
class T,
void (T::*TMethod)(VRayRenderer&,
int x,
int y, const
char* host, VRayImage* img, ImagePassType pass,
double instant,
void* userData)>
8232 void setOnBucketReady(
void(&callback)(
VRayRenderer&,
int x,
int y,
int width,
int height,
const char* host, ImagePassType pass,
double instant,
void* userData),
const void* userData = NULL);
8234 template<
class T,
void (T::* TMethod)(VRayRenderer&,
int x,
int y,
int w
idth,
int height, const
char* host, ImagePassType pass,
double instant,
void* userData)>
8249 void setOnBucketFailed(
void(*callback)(
VRayRenderer&,
int x,
int y,
int width,
int height,
const char* host, ImagePassType pass,
double instant,
void* userData),
const void* userData = NULL);
8251 template<
class T,
void (T::*TMethod)(VRayRenderer&,
int x,
int y,
int w
idth,
int height, const
char* host, ImagePassType pass,
double instant,
void* userData)>
8262 void setOnProgress(
void(*callback)(
VRayRenderer&,
const char* msg,
int elementNumber,
int elementsCount,
double instant,
void* userData),
const void* userData = NULL);
8264 template<
class T,
void (T::*TMethod)(VRayRenderer&, const
char* msg,
int elementNumber,
int elementsCount,
double instant,
void* userData)>
8274 template<
class T,
void (T::*TMethod)(VRayRenderer&, const
char* propName,
double instant,
void* userData)>
8284 template<
class T,
void (T::*TMethod)(VRayRenderer&,
bool isRendering,
double,
void* userData)>
8294 template<
class T,
void (T::*TMethod)(VRayRenderer&,
bool isRendering,
double instant,
void* userData)>
8303 template<
class T,
void (T::*TMethod)(VRayRenderer&,
double instant,
void* userData)>
8312 template<
class T,
void (T::*TMethod)(VRayRenderer&,
double instant,
void* userData)>
8322 template<
class T,
void (T::*TMethod)(VRayRenderer&,
double instant,
void* userData)>
8331 template<
class T,
void (T::*TMethod)(VRayRenderer&,
double instant,
void* userData)>
8341 template<
class T,
void (T::*TMethod)(VRayRenderer&, const
char* hostName,
double instant,
void* userData)>
8351 template<
class T,
void (T::*TMethod)(VRayRenderer&, const
char* hostName,
double instant,
void* userData)>
8360 template<
class T,
void (T::*TMethod)(VRayRenderer&,
double instant,
void* userData)>
8368 template<
class T,
void (T::*TMethod)(VRayRenderer&,
double instant,
void* userData)>
8391 template<
class T,
void (T::*TMethod)(VRayRenderer&,
int enabled,
int mode,
int selectionLocked,
double instant,
void* userData)>
8402 template<
class T,
void(T::*TMethod)(VRayRenderer&,
int commandId,
int x,
int y,
void* userData)>
8410 template<
class T,
void (T::*TMethod)(VRayRenderer&,
double instant,
void* userData)>
8421 template<
class T,
int(T::*TMethod)(VRayRenderer&, const std::vector<LightMixChange>& lightMixChanges,
double instant,
void* userData)>
8432 template<
class T,
int(T::*TMethod)(VRayRenderer&, const std::vector<std::
string>& fileList,
double instant,
void* userData)>
8443 template<
class T,
void (T::*TMethod)(VRayRenderer&,
bool isRendering,
double instant,
void* userData)>
8454 template<
class T,
void (T::*TMethod)(VRayRenderer&,
bool isRendering,
double instant,
void* userData)>
8466 template<
class T,
bool (T::*TMethod)(VRayRenderer&, VFBRenderElementType type,
double instant,
void* userData)>
8526 template<
class T> T
getPlugin(
const char *pluginName)
const;
8529 template<
class T> T
getPlugin(
const std::string &pluginName)
const;
8562 template<
class T> T
newPlugin(
const std::string& pluginName);
8626 std::vector<PickedPluginInfo>
pickPlugins(
double x,
double y,
int maxcount = 0,
int timeout = -1)
const;
8791 template<
class T,
void (T::*TMethod)(VRayRenderer&, VRayImage*,
void*)>
8792 bool denoiseNow(T&
object,
bool shouldPassImage =
true,
const void* userData = NULL);
8851 } profiler{ *
this };
8879 template<
class T,
void(T::*TMethod)(VRayRenderer&, const std::
string &outputFile,
int fileType,
double instant,
void* userData)>
8887 Internal::VRayRendererNative* getNativeRenderer()
const;
8888 static VRayRenderer* getVRayRenderer(
void* rendererNative);
8890 InstanceId getPluginId_internal(
const char* pluginName, PluginTypeId& outTypeId)
const;
8891 PluginTypeId getPluginTypeId_internal(
const char* pluginType)
const;
8892 PluginTypeId getPluginTypeId_internal(InstanceId pluginID)
const;
8893 const char* getPluginTypeString(PluginTypeId pluginTypeId)
const;
8894 Plugin getPlugin_internal(InstanceId pluginID)
const;
8895 template<
class T> T getPlugin_internal(InstanceId pluginID)
const;
8896 const char* getPluginName_internal(InstanceId pluginID)
const;
8897 bool pluginExists_internal(InstanceId pluginID)
const;
8899 int getPropertyIndexFromName(InstanceId pluginID,
const char* propertyName)
const;
8900 const char* getPropertyNameFromIndex(InstanceId pluginID,
int idx)
const;
8901 template<
class T>
static std::vector<T> getPluginsOfType(
VRayRenderer& renderer,
const char* pluginType);
8902 template<
class T>
static std::vector<T> getPluginsOfTypeId(
VRayRenderer& renderer, PluginTypeId typeId);
8903 static std::vector<std::string> getStringVector(
void *pvector);
8904 static std::vector<const char*> getCharPtrVector(
const std::vector<std::string> &strVector);
8905 std::vector<std::string> getPluginPropertyNames(
const char* pluginClassName)
const;
8906 const char* getPluginType(
const char* name)
const;
8907 const char* getPluginType(InstanceId pluginID)
const;
8908 bool setPluginName(InstanceId pluginID,
const char* name)
const;
8909 Type getPluginPropertyRuntimeType(
const char* pluginName,
const char* propertyName)
const;
8910 Type getPluginPropertyRuntimeType(InstanceId pluginID,
const char* propertyName)
const;
8911 int getPluginPropertyElementsCount(InstanceId pluginID,
const char* propertyName)
const;
8912 const void* getPluginPropertyDefinition(
const char* pluginName,
const char* propertyName)
const;
8913 const void* getPluginPropertyDefinition(InstanceId pluginID,
const char* propertyName)
const;
8914 const void* getPluginPropertyDefinitionFromClass(
const char* pluginClassName,
const char* propertyName)
const;
8915 std::string getPluginPropertyValueAsString(
const char* pluginName,
const char* propertyName,
double time)
const;
8916 std::string getPluginPropertyValueAsString(InstanceId pluginID,
const char* propertyName,
bool& ok,
double time)
const;
8917 bool setPluginPropertyValueAsString(InstanceId pluginID,
const char* propertyName,
const char* value)
const;
8918 bool setPluginPropertyValueAsStringAtTime(InstanceId pluginID,
const char* propertyName,
const char* value,
double time)
const;
8919 bool getPluginPropertyBool(
const char* pluginName,
const char* propertyName,
bool& ok,
double time)
const;
8920 bool getPluginPropertyBool(InstanceId pluginID,
const char* propertyName,
bool& ok,
double time)
const;
8921 int getPluginPropertyInt(
const char* pluginName,
const char* propertyName,
bool& ok,
double time)
const;
8922 int getPluginPropertyInt(InstanceId pluginID,
const char* propertyName,
bool& ok,
double time)
const;
8923 float getPluginPropertyFloat(
const char* pluginName,
const char* propertyName,
bool& ok,
double time)
const;
8924 float getPluginPropertyFloat(InstanceId pluginID,
const char* propertyName,
bool& ok,
double time)
const;
8925 double getPluginPropertyDouble(InstanceId pluginID,
const char* propertyName,
bool& ok,
double time)
const;
8926 Color getPluginPropertyColor(
const char* pluginName,
const char* propertyName,
bool& ok,
double time)
const;
8927 Color getPluginPropertyColor(InstanceId pluginID,
const char* propertyName,
bool& ok,
double time)
const;
8928 AColor getPluginPropertyAColor(
const char* pluginName,
const char* propertyName,
bool& ok,
double time)
const;
8929 AColor getPluginPropertyAColor(InstanceId pluginID,
const char* propertyName,
bool& ok,
double time)
const;
8930 Vector getPluginPropertyVector(
const char* pluginName,
const char* propertyName,
bool& ok,
double time)
const;
8931 Vector getPluginPropertyVector(InstanceId pluginID,
const char* propertyName,
bool& ok,
double time)
const;
8932 Matrix getPluginPropertyMatrix(
const char* pluginName,
const char* propertyName,
bool& ok,
double time)
const;
8933 Matrix getPluginPropertyMatrix(InstanceId pluginID,
const char* propertyName,
bool& ok,
double time)
const;
8934 Transform getPluginPropertyTransform(
const char* pluginName,
const char* propertyName,
bool& ok,
double time)
const;
8935 Transform getPluginPropertyTransform(InstanceId pluginID,
const char* propertyName,
bool& ok,
double time)
const;
8936 PluginRef getPluginPropertyPluginRef(InstanceId pluginID,
const char* propertyName,
bool& ok,
double time)
const;
8937 Value getPluginPropertyValue(InstanceId pluginID,
const char* propertyName,
bool& ok,
double time)
const;
8938 template<
typename T> T getPluginPropertyTyped(InstanceId pluginID,
const char* propertyName,
bool& ok,
double time)
const;
8939 bool isPropertyAnimated(InstanceId pluginID,
const char* propertyName)
const;
8940 int getKeyframeTimes(InstanceId pluginID,
const char* propertyName,
double* ×)
const;
8941 bool setPluginPropertyValueAtTime(InstanceId pluginID,
const char* propertyName,
const void *pval,
double time)
const;
8942 bool setPluginPropertyValueRawAtTime(InstanceId pluginID,
const char* propertyName,
const void *pval,
size_t count,
double time)
const;
8944#ifdef VRAY_SDK_INTEROPERABILITY
8945 bool getPluginPropertyValueSDKInterop(InstanceId pluginID,
const char* propertyName,
void *pval,
int type)
const;
8946 bool getPluginPropertyValueAtTimeSDKInterop(InstanceId pluginID,
const char* propertyName,
void *pval,
int type,
double time)
const;
8947 bool setPluginPropertyValueSDKInterop(InstanceId pluginID,
const char* propertyName,
const void* pval,
int type)
const;
8948 bool setPluginPropertyValueAtTimeSDKInterop(InstanceId pluginID,
const char* propertyName,
const void* pval,
int type,
double time)
const;
8951 Plugin newRenderElementPlugin(
int type,
const char *instanceName,
const char *displayName);
8952 Plugin getRenderElementPlugin(
int type)
const;
8953 std::vector<Plugin> getRenderElementPluginsList(
int type)
const;
8954 bool getRenderElementInfo(InstanceId pluginID,
int type,
RenderElement::Info& chInfo)
const;
8955 size_t getRenderElementData(InstanceId pluginID, InstanceId alphaPluginID,
int type,
int layer,
RenderElement::PixelFormat format,
bool rgbOrder,
const ImageRegion* rgn,
void** buf)
const;
8956 size_t getRenderElementDataIntoBuffer(
8957 InstanceId pluginID,
8958 InstanceId alphaPluginID,
8967 VRayImage* getRenderElementAsImage(InstanceId pluginID,
int type,
int layer,
const ImageRegion* rgn,
int corrected)
const;
8968 std::string getRenderElementMetadata(InstanceId pluginID,
int type)
const;
8977 eventName(eventName),
8978 threadIndex(threadIndex) {
8979 if (renderer.profiler.isManual()) {
8980 renderer.profiler.startDurationEvent(eventName.c_str(), threadIndex);
8985 if (renderer.profiler.isManual()) {
8986 renderer.profiler.endDurationEvent(eventName.c_str(), threadIndex);
8992 std::string eventName;
9009 template<
class T, Plugin(T::* TMethod)(VRayRenderer&, const
char* assetId, Vector importPosition,
void* userData)>
9010 static InstanceId importScatterPresetCallbackT(
const char* assetId,
Vector* importPosition,
void* info);
9011 static InstanceId importScatterPresetCallback(
const char* assetId,
Vector* importPosition,
void* info);
9040 template<
class T, Plugin(T::* TMethod)(VRayRenderer&, const
char* assetId, Vector importPosition,
void* userData)>
9187 enum GPUParamSupport {
9188 GPUParamSupport_Full,
9189 GPUParamSupport_Partial,
9190 GPUParamSupport_None,
9191 GPUParamSupport_Unknown,
9194 inline std::ostream& operator <<(std::ostream& stream,
const GPUParamSupport val) {
9196 case GPUParamSupport_Full:
9199 case GPUParamSupport_Partial:
9200 stream <<
"Partial";
9202 case GPUParamSupport_None:
9206 stream <<
"Unknown";
9215 const void* pParamDef;
9218 UIGuides(
const void* pParamDef) : pParamDef(pParamDef) {}
9220 const void* getParamDef()
const {
9358 PartOf3dsMaxTriple = 8,
9379 UIGuides& operator=(
const UIGuides& uiGuides) {
9380 pParamDef = uiGuides.pParamDef;
9507 const Internal::VRayRendererNative* renderer;
9510 RuntimeUIGuides(
const void* pParamDef,
const Internal::VRayRendererNative* renderer, InstanceId
id) :
9511 UIGuides(pParamDef), renderer(renderer), id(
id) {}
9528 const void* pParamDef;
9529 GPUParamSupport gpuSupport;
9533 pParamDef = pRenderer->getPluginPropertyDefinitionFromClass(pluginClassName, propertyName);
9534 gpuSupport = (GPUParamSupport)Internal::VRay_PluginUtils_getPropertyGpuSupport(pRenderer->getNativeRenderer(), pluginClassName, pParamDef);
9539 : pParamDef(propertyMeta.pParamDef), gpuSupport(propertyMeta.gpuSupport) {}
9542 pParamDef = propertyMeta.pParamDef;
9543 gpuSupport = propertyMeta.gpuSupport;
9548 std::swap(pParamDef, propertyMeta.pParamDef);
9549 std::swap(gpuSupport, propertyMeta.gpuSupport);
9553 operator bool ()
const {
9559 return Internal::VRay_PluginUtils_getPropertyElementsCount(pParamDef);
9564 return Internal::VRay_PluginUtils_getPropertyName(pParamDef);
9573 return Internal::VRay_PluginUtils_getPropertyType(pParamDef);
9578 return Internal::VRay_PluginUtils_getPropertyElementType(pParamDef);
9588 const char*
const description = Internal::VRay_PluginUtils_getPropertyDescription(pParamDef);
9589 return description ? description :
"";
9594 return Internal::VRay_PluginUtils_getPropertyDeprecation(pParamDef);
9600 const char*
const uiGuides = Internal::VRay_PluginUtils_getPropertyUIGuides(pParamDef);
9601 return uiGuides ? uiGuides :
"";
9609 static const char* typeToString(
const Type type);
9611 const char* getTypeAsString()
const {
9612 return typeToString(
getType());
9630 :
PropertyMeta(plugin.pRenderer, plugin.
getType(), propertyName), renderer(plugin.pRenderer), id(plugin.id()) {
9635 :
PropertyMeta(propertyRuntimeMeta), renderer(propertyRuntimeMeta.renderer), id(propertyRuntimeMeta.id) {
9639 PropertyMeta::operator=(propertyRuntimeMeta);
9640 renderer = propertyRuntimeMeta.renderer;
9641 id = propertyRuntimeMeta.id;
9647 return renderer->getPluginPropertyElementsCount(
id, getName());
9652 return renderer->getPluginPropertyRuntimeType(
id, getName());
9655 const char* getRuntimeTypeAsString()
const {
9656 return typeToString(getRuntimeType());
9659 void swap(PropertyRuntimeMeta &propertyRuntimeMeta) {
9660 PropertyMeta::swap(propertyRuntimeMeta);
9661 std::swap(renderer, propertyRuntimeMeta.renderer);
9672 enum GPUPluginSupport {
9673 GPUPluginSupport_Full,
9674 GPUPluginSupport_Partial,
9675 GPUPluginSupport_Bake,
9676 GPUPluginSupport_None,
9677 GPUPluginSupport_Unknown,
9680 inline std::ostream& operator <<(std::ostream& stream,
const GPUPluginSupport val) {
9682 case GPUPluginSupport_Full:
9685 case GPUPluginSupport_Partial:
9686 stream <<
"Partial";
9688 case GPUPluginSupport_Bake:
9691 case GPUPluginSupport_None:
9695 stream <<
"Unknown";
9705 PluginTypeId typeId;
9717 typeId = renderer->getPluginTypeId_internal(typeStr);
9718 type = renderer->getPluginTypeString(typeId);
9719 pRenderer = renderer;
9723 typeId = pluginTypeId;
9724 type = renderer->getPluginTypeString(pluginTypeId);
9725 pRenderer = renderer;
9732 bool operator==(
const PluginMeta& pluginMeta)
const {
9733 return typeId == pluginMeta.typeId && pRenderer == pluginMeta.pRenderer;
9737 std::swap(typeId, pluginMeta.typeId);
9738 std::swap(type, pluginMeta.type);
9739 std::swap(pRenderer, pluginMeta.pRenderer);
9759 return pRenderer->getPluginPropertyNames(type);
9775 return PropertyMeta(pRenderer, type, propertyName.c_str());
9793 namespace Internal {
9821 operator size_t ()
const {
9840 return saveToFile(fileName.c_str());
9845 Internal::C_memory_free(bufAddr);
9857 bufSize = Internal::VRayImage_compressToJpeg(img, quality, &bufAddr,
nullptr);
9862 bufSize = Internal::VRayImage_compressToJpeg(img, quality, &bufAddr, renderer.getNativeRenderer());
9873 bufSize = Internal::VRayImage_compressToPng(img, preserveAlpha, &bufAddr,
nullptr);
9878 bufSize = Internal::VRayImage_compressToPng(img, preserveAlpha, &bufAddr, renderer.getNativeRenderer());
9890 bufSize = Internal::VRayImage_convertToBmp(img, preserveAlpha, &bufAddr, NULL, swapChannels ? 1 : 0);
9895 bufSize = Internal::VRayImage_convertToBmp(img, preserveAlpha, &bufAddr, renderer.getNativeRenderer(), swapChannels ? 1 : 0);
9901 T plugin_cast(Plugin plugin) {
9902 return *
static_cast<T*
>(&plugin);
9907 PluginRefT<T> plugin_cast(PluginRef pluginRef) {
9909 return *
static_cast<PluginRefT<T>*
>(
static_cast<T*
>(
static_cast<Plugin*
>(&pluginRef)));
9915 T plugin_checked_cast(Plugin plugin) {
9916 return plugin_cast<T>(plugin.getTypeId() != T::getTypeId() ? Plugin() : plugin);
9922 PluginRefT<T> plugin_checked_cast(PluginRef pluginRef) {
9923 return plugin_cast<T>(pluginRef.getTypeId() != T::getTypeId() ? PluginRef() : pluginRef);
9927 template<
typename PluginType>
9928 inline bool _isPluginOfTypes(PluginTypeId typeId) {
9929 return typeId == PluginType::getTypeId();
9932 template<
typename PluginType0,
typename PluginType1,
typename... RemainingTypes>
9933 inline bool _isPluginOfTypes(PluginTypeId typeId) {
9934 return typeId == PluginType0::getTypeId() || _isPluginOfTypes<PluginType1, RemainingTypes...>(typeId);
9943 template<
typename PluginType>
9944 inline bool isPluginOfType(
const Plugin& plugin) {
9945 return plugin.getTypeId() == PluginType::getTypeId();
9953 template<
typename PluginType,
typename... Types>
9954 inline bool isPluginOfTypes(
const Plugin& plugin) {
9955 return Internal::_isPluginOfTypes<PluginType, Types...>(plugin.getTypeId());
9963 inline bool isPluginOfType(
const Plugin& plugin,
const char* type) {
9964 return plugin.isNotEmpty() && strcmp(plugin.getType(), type) == 0;
9975 inline bool isPluginOfTypes(
const Plugin& plugin,
const char*
const (&types)[N]) {
9976 if (plugin.isNotEmpty()) {
9977 const char* type = plugin.getType();
9978 for (
size_t i = 0; i < N; ++i) {
9979 if (strcmp(type, types[i]) == 0)
9994 inline bool isPluginOfTypes(
const Plugin& plugin,
const PluginTypeId (&types)[N]) {
9995 PluginTypeId typeId = plugin.getTypeId();
9996 for (
size_t i = 0; i < N; ++i) {
9997 if (typeId == types[i])
10005 enum SourceMode :
int {
10040 : errorCode(OCIOResult::Result_OK) {
10042 Internal::OCIOData internalOCIOData;
10043 errorCode = (OCIOResult)Internal::VRay_OCIO_initData(&internalOCIOData, fileName, (
int)vraySourceType);
10044 if (errorCode != OCIOResult::Result_OK) {
10045 const char* ending = internalOCIOData.status ? internalOCIOData.status :
"<unknown>";
10046 errorString = std::string(
"Failed initializing OCIO configuration: ") + ending;
10047 Internal::VRay_OCIO_freeData(&internalOCIOData);
10048#ifndef VRAY_NOTHROW
10054 familySeparator = char(internalOCIOData.familySeparator);
10056 convertRawData(colorSpaces, internalOCIOData.colorSpaces, internalOCIOData.colorSpacesCount);
10057 if (internalOCIOData.colorSpaceFamilies) {
10058 convertRawData(colorSpaceFamilies, internalOCIOData.colorSpaceFamilies, internalOCIOData.colorSpacesCount);
10060 convertRawData(roles, internalOCIOData.roles, internalOCIOData.rolesCount);
10061 convertRawData(roleColorSpaces, internalOCIOData.roleColorSpaces, internalOCIOData.rolesCount);
10063 convertRawData(looks, internalOCIOData.looks, internalOCIOData.looksCount);
10064 convertRawData(devices, internalOCIOData.devices, internalOCIOData.devicesCount);
10065 convertRawData(viewTransforms, internalOCIOData.viewTransforms, internalOCIOData.viewTransformsCount);
10067 Internal::VRay_OCIO_freeData(&internalOCIOData);
10072 return errorString;
10077 enum OCIOResult :
int {
10079 Result_FileNotFound,
10080 Result_OCIOException,
10081 Result_EmptyConfiguration,
10082 Result_InternalException = -1
10086 std::string errorString;
10088 void convertRawData(std::vector<std::string>& output,
char const*
const* input,
const int inputCount) {
10090 output.reserve(inputCount);
10091 for (
int i = 0; i < inputCount; ++i) {
10092 output.emplace_back(input[i]);
10102 bool setEnvVar(
const char* name,
const char* value);
10107 const char* getEnvVar(
const char* name);
10109 enum OSLParameterType {
10110 OSL_TYPE_UNSUPPORTED,
10118 OSL_TYPE_OUTPUT_CLOSURE,
10119 OSL_TYPE_OUTPUT_COLOR,
10120 OSL_TYPE_OUTPUT_FLOAT,
10145 enum OSLSourceType {
10146 OSL_SOURCE_TYPE_OSL = 1,
10147 OSL_SOURCE_TYPE_OSO = 2,
10150 enum OSLSourceEncoding {
10151 OSL_SOURCE_ENC_TXT,
10152 OSL_SOURCE_ENC_BASE64,
10160 Error getOSLParameters(
const char* src, OSLSourceType type, OSLSourceEncoding encoding, OSLParameters& params);
10163 Error getOSLParameters(
const std::string& src, OSLSourceType type, OSLSourceEncoding encoding, OSLParameters& params);
10167 void createThis(
const char* filename,
const void* settings);
10178 ObjectTypeNodeParticle,
10180 ObjectTypeInstancer,
10182 ObjectTypeVRayScene,
10183 ObjectTypeMaterial,
10190 DataTypeNoData = 0,
10191 DataTypeMesh = (1 << 0),
10192 DataTypeHair = (1 << 1),
10193 DataTypeParticles = (1 << 2),
10194 DataTypeVolume = (1 << 3),
10195 DataTypeInfinitePlane = (1 << 4),
10196 DataTypeInstancer2 = (1 << 5),
10197 DataTypeVRayProxy = (1 << 6),
10198 DataTypeRayserverInstancer = (1 << 7),
10199 DataTypeStaticMesh = (1 << 8),
10200 DataTypePerfectSphere = (1 << 9),
10201 DataTypeGeomInstancer = (1 << 10),
10203 DataTypeHasInstances = DataTypeInstancer2 | DataTypeRayserverInstancer | DataTypeGeomInstancer,
10205 ObjectDataTypeAll = DataTypeAll,
10206 ObjectDataTypeNoData = DataTypeNoData,
10207 ObjectDataTypeMesh = DataTypeMesh,
10208 ObjectDataTypeHair = DataTypeHair,
10209 ObjectDataTypeParticles = DataTypeParticles,
10210 ObjectDataTypeVolume = DataTypeVolume,
10211 ObjectDataTypeInfinitePlane = DataTypeInfinitePlane,
10212 ObjectDataTypeInstancer2 = DataTypeInstancer2,
10213 ObjectDataTypeVRayProxy = DataTypeVRayProxy,
10214 ObjectDataTypeRayserverInstancer = DataTypeRayserverInstancer,
10215 ObjectDataTypeStaticMesh = DataTypeStaticMesh,
10216 ObjectDataTypePerfectSphere = DataTypePerfectSphere,
10217 ObjectDataTypeGeomInstancer = DataTypeGeomInstancer,
10219 ObjectDataTypeHasInstances = DataTypeHasInstances,
10223 LightTypeUnsupported = 0,
10225 LightTypeRectangle,
10236 UpAxisUnknown = -1,
10271 std::vector<Object>
getObjects(ObjectType objectType = ObjectTypeAll, DataType dataType = DataTypeAll)
const;
10280 operator bool()
const {
10281 return !!vrsceneDesc;
10287 return !vrsceneDesc;
10333 CoordinateSystemRightHanded=0,
10335 CoordinateSystemLeftHanded=1
10340 previewFacesCount(100000),
10341 minPreviewFaces(64),
10342 maxPreviewFaces(10000),
10343 cacheType(CacheType::CacheTypeSingle),
10344 coordinateSystem(CoordinateSystem::CoordinateSystemRightHanded) {
10348 int previewFacesCount;
10349 int minPreviewFaces;
10350 int maxPreviewFaces;
10351 CacheType cacheType;
10352 CoordinateSystem coordinateSystem;
10360 static void addDataTypeStringHelperPrivate(std::string& currentString, DataType types, DataType dataType,
const char* typeString);
10362 explicit Object(
void* objectBase) : objectBase(objectBase) {}
10363 Object(
void* vrsceneDesc,
const char* name);
10366 Object() : objectBase() {}
10375 return !!objectBase;
10419#ifndef VRAY_SDK_INTEROPERABILITY
10423 VectorList getMeshVertices(
double time = 0);
10428 IntList getMeshFaces(
double time = 0);
10434 VectorList getHairVertices(
double time = 0);
10440 IntList getHairNumVertices(
double time = 0);
10447 int getMeshVerticesFast(
const Vector* &vertices,
double time = 0);
10454 int getMeshFacesFast(
const int* &faces,
double time = 0);
10462 int getHairVerticesFast(
const Vector* &vertices,
double time = 0);
10470 int getHairNumVerticesFast(
const int* &lengths,
double time = 0);
10495 std::vector<Particle> getInstancerParticles(
double time = 0);
10497 Sizes3D getDecalSize(
double time = 0);
10498 Sizes2D getClipperSize(
double time = 0);
10515 bool isValid()
const {
10529 void *internalTextureSampler;
10598 IntList
sampleAreaInt(
const PluginRef &pluginRef,
float u_start,
float u_end,
float v_start,
float v_end,
int width,
int height);
10602 template<
typename ListType,
typename SampleFunction>
10603 static std::vector<ListType> sampleAreaAsListResult(
int width,
int height, SampleFunction &&sampleArea);
10620 std::vector<PluginLink> getChildPlugins(
Plugin root,
bool recursive);
10624 std::vector<PluginLink> getParentPlugins(
Plugin child);
10628 float getIESPrescribedIntensity(
const char *iesLightFileName);
10697 binUserAttributeType_int = 0,
10698 binUserAttributeType_float,
10699 binUserAttributeType_vector,
10700 binUserAttributeType_acolor,
10701 binUserAttributeType_string,
10702 binUserAttributeType_last,
10708 binUserAttributeFlag_small = 1 << 3,
10711 binUserAttributeFlag_smallY = 1 << 2,
10714 binUserAttributeFlag_smallZ = 1 << 1,
10717 binUserAttributeFlag_smallA = 1 << 0,
10723 template<
size_t count>
10724 void add(
const char(&name)[count],
int value) {
10725 add(name, count - 1, value);
10731 template<
size_t count>
10732 void add(
const char(&name)[count],
float value) {
10733 add(name, count - 1, value);
10739 template<
size_t count>
10741 add(name, count - 1, value);
10747 template<
size_t count>
10749 add(name, count - 1, value);
10756 template<
size_t nameLen>
10757 void add(
const char(&name)[nameLen],
const char* value,
size_t valueLen) {
10758 add(name, nameLen - 1, value, valueLen);
10764 template<
size_t nameLen,
size_t valueLen>
10765 void add(
const char(&name)[nameLen],
const char(&value)[valueLen]) {
10766 add(name, nameLen - 1, value, valueLen - 1);
10772 template<
size_t nameLen>
10773 void add(
const char(&name)[nameLen],
const std::string& value) {
10774 add(name, nameLen - 1, value.c_str(), value.length());
10780 void add(
const std::string& name,
int value) {
10781 add(name.c_str(), name.length(), value);
10787 void add(
const std::string& name,
float value) {
10788 add(name.c_str(), name.length(), value);
10795 add(name.c_str(), name.length(), value);
10802 add(name.c_str(), name.length(), value);
10809 void add(
const std::string& name,
const char* value,
size_t valueLen) {
10810 add(name.c_str(), name.length(), value, valueLen);
10816 template<
size_t valueLen>
10817 void add(
const std::string& name,
const char(&value)[valueLen]) {
10818 add(name.c_str(), name.length(), value, valueLen - 1);
10824 void add(
const std::string& name,
const std::string& value) {
10825 add(name.c_str(), name.length(), value.c_str(), value.length());
10832 void add(
const char* name,
size_t nameLen,
int value) {
10833 appendString(name, nameLen);
10835 if (value >= -128 && value <= 127) {
10836 const byte attrType = binUserAttributeType_int | (binUserAttributeFlag_small << 4);
10839 write(sbyte(value));
10841 resize(1 +
sizeof(
int));
10842 write(binUserAttributeType_int);
10851 void add(
const char* name,
size_t nameLen,
float value) {
10852 appendString(name, nameLen);
10854 byte attrType = binUserAttributeType_float;
10855 byte writeSize = 1;
10857 const SmallFloat smallValue(value, attrType, binUserAttributeFlag_small, writeSize);
10860 smallValue.write(*
this);
10867 void add(
const char* name,
size_t nameLen,
const Vector& value) {
10868 appendString(name, nameLen);
10870 byte attrType = binUserAttributeType_vector;
10871 byte writeSize =
sizeof(byte);
10873 const SmallFloat smallX(value.x, attrType, binUserAttributeFlag_small, writeSize);
10874 const SmallFloat smallY(value.y, attrType, binUserAttributeFlag_smallY, writeSize);
10875 const SmallFloat smallZ(value.z, attrType, binUserAttributeFlag_smallZ, writeSize);
10880 smallX.write(*
this);
10881 smallY.write(*
this);
10882 smallZ.write(*
this);
10889 void add(
const char* name,
size_t nameLen,
const AColor& value) {
10890 appendString(name, nameLen);
10892 byte attrType = binUserAttributeType_acolor;
10893 byte writeSize =
sizeof(byte);
10895 const SmallFloat smallR(value.color.r, attrType, binUserAttributeFlag_small, writeSize);
10896 const SmallFloat smallG(value.color.g, attrType, binUserAttributeFlag_smallY, writeSize);
10897 const SmallFloat smallB(value.color.b, attrType, binUserAttributeFlag_smallZ, writeSize);
10898 const SmallFloat smallA(value.alpha, attrType, binUserAttributeFlag_smallA, writeSize);
10904 smallR.write(*
this);
10905 smallG.write(*
this);
10906 smallB.write(*
this);
10907 smallA.write(*
this);
10915 void add(
const char* name,
size_t nameLen,
const char* value,
size_t valueLen) {
10916 appendString(name, nameLen);
10919 write(binUserAttributeType_string);
10921 appendString(value, valueLen);
10958 const byte* bytes =
reinterpret_cast<const byte*
>(data.data());
10959 size_t count = getNumBytes();
10960 std::string chars(count * 3 + 2,
'\0');
10962 for (
size_t i = 0; i < count; ++i) {
10964 chars[3 * i + 0] = getHexChar(b >> 4);
10965 chars[3 * i + 1] = getHexChar(b & 0xf);
10966 chars[3 * i + 2] =
' ';
10968 chars[3 * count + 0] =
'0';
10969 chars[3 * count + 1] =
'0';
10978 struct SmallFloat {
10979 SmallFloat(
float value,
byte& attrType,
byte smallFlag,
byte& writeSize)
10984 const float roundValue = round(value);
10985 const bool almostInt = std::abs(value - roundValue) < 1e-6f;
10986 isSmall = almostInt && roundValue >= -128 && roundValue <= 127;
10988 writeSize +=
sizeof(float);
10991 smallFloat = sbyte(roundValue);
10992 attrType |= (smallFlag << 4);
10993 writeSize +=
sizeof(sbyte);
10998 float getFloat()
const {
return value; }
11001 sbyte getSmallFloat()
const {
return smallFloat; }
11004 bool getIsSmall()
const {
return isSmall; }
11007 void write(BinUserAttributesWriter& buf)
const {
11009 buf.write(smallFloat);
11020 inline static char getHexChar(
byte b) {
11021 return b < 10 ? b +
'0' : b - 10 +
'A';
11027 void appendString(
const char* name,
size_t nameLen) {
11029 resize(nameLen + 1);
11030 memcpy(ptr(), name, nameLen);
11037 void append(
const void* bytes,
size_t bytes_count) {
11038 resize(bytes_count);
11039 memcpy(ptr(), bytes, bytes_count);
11040 index += bytes_count;
11044 template<
typename T>
11045 void append(
const T& value) {
11051 template<
typename T>
11052 void write(
const T& value) {
11053 *
reinterpret_cast<T*
>(ptr()) = value;
11054 index +=
sizeof(T);
11059 void resize(
size_t bytesToAdd) {
11060 size_t newSize = index + bytesToAdd;
11061 if (newSize > data.size() *
sizeof(
int)) {
11062 data.resize((newSize +
sizeof(
int) - 1) /
sizeof(
int));
11068 return reinterpret_cast<byte*
>(data.data()) + index;
11072 std::vector<int> data;
11078 inline std::ostream& operator <<(std::ostream& stream,
const BinUserAttributesWriter& writer) {
11079 stream << writer.toString();
11084#ifdef VRAY_SDK_INTEROPERABILITY
11085#include "vrayinterop.hpp"
11088#include "_vraysdk_implementation.hpp"
11091# pragma warning(pop)
The raw memory contents of a BMP image.
Definition: vraysdk.hpp:542
Base class for LocalJpeg, LocalPng, LocalBmp. Can't be instantiated.
Definition: vraysdk.hpp:9808
bool saveToFile(const char *fileName) const
Write the data to disk.
size_t getLen() const
Returns size of image data in bytes.
Definition: vraysdk.hpp:9831
bool saveToFile(const std::string &fileName) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
Definition: vraysdk.hpp:9839
void * getBuf() const
Returns a pointer to the image data.
Definition: vraysdk.hpp:9826
Definition: vraysdk.hpp:3910
Definition: vraysdk.hpp:2851
unsigned getGaussianPrimitivesCount() const
Get the number of Gaussian primitives - this is the unit Gaussian (mean [0,0,0], sd [1,...
Color getAverageColor(unsigned index) const
Get the average Color of the Gaussian primitive with the given index.
Vector getPosition(unsigned index) const
Get the position of the Gaussian primitive with the given index.
const Box & getPreviewBoundingBox() const
Get the preview bounding box of the model, calculated using the Gaussian primitive positions only.
Definition: vraysdk.hpp:2869
A group of utility methods related to variuos geometry source plugins.
Definition: vraysdk.hpp:9007
static bool readGaussianData(const Plugin &gaussianPlugin, GaussianReadData &readData)
static bool readScatterPreset(const ScatterReadParams ¶ms, T &object, const void *userData=nullptr)
This is an overloaded member function, provided for convenience. It differs from the above function o...
static bool readScatterData(const Plugin &scatterPlugin, std::vector< Transform > &transforms, IntList &topo)
static bool readGaussianData(const std::string &fileName, GaussianReadData &readData)
static bool readScatterPreset(const ScatterReadParams ¶ms, Plugin(*callback)(VRayRenderer &, const char *assetId, Vector importPosition, void *userData)=0, const void *userData=nullptr)
Definition: vraysdk.hpp:9794
The raw memory contents of a JPEG image.
Definition: vraysdk.hpp:489
A group of utility methods related to variuos light source plugins.
Definition: vraysdk.hpp:9046
static bool readLuminaireFieldPreviewData(const Plugin &luminairePlugin, LuminaireFieldReadPreviewData &readData)
static bool readLuminaireFieldPreviewData(const std::string &fileName, LuminaireFieldReadPreviewData &readData)
Definition: vraysdk.hpp:9882
LocalBmp(const VRayImage *img, bool preserveAlpha=false, bool swapChannels=false)
Definition: vraysdk.hpp:9889
LocalBmp(const VRayImage *img, const VRayRenderer &renderer, bool preserveAlpha=false, bool swapChannels=false)
Same as the other constructor. The renderer is used to log error messages.
Definition: vraysdk.hpp:9894
A wrapper around JPEG data in memory. It's meant to be stack allocated to free the data when done.
Definition: vraysdk.hpp:9850
LocalJpeg(const VRayImage *img, const VRayRenderer &renderer, int quality=0)
Same as the other constructor. The renderer is used to log error messages.
Definition: vraysdk.hpp:9861
LocalJpeg(const VRayImage *img, int quality=0)
Definition: vraysdk.hpp:9856
Definition: vraysdk.hpp:9866
LocalPng(const VRayImage *img, bool preserveAlpha=false)
Definition: vraysdk.hpp:9872
LocalPng(const VRayImage *img, const VRayRenderer &renderer, bool preserveAlpha=false)
Same as the other constructor. The renderer is used to log error messages.
Definition: vraysdk.hpp:9877
A variation of VRayImage to be created on the stack so that the image gets auto-deleted.
Definition: vraysdk.hpp:759
Definition: vraysdk.hpp:3503
std::vector< int > getConvexHullTriangles() const
Get the full array of the vertex indices of the convex hull in consecutive triplets.
std::vector< Vector > getConvexHullVertices() const
Get the full array of the vertices of light's convex hull.
bool useConvexHull() const
Box getBoundingBox() const
Get the bounding box of the luminaire.
bool isValid() const
Checks if the object is valid.
Wrapper around a piece of heap memory. Takes care of calling the proper deallocating function.
Definition: vraysdk.hpp:470
Definition: vraysdk.hpp:4369
bool setArray(const char *propertyName, const int data[], size_t count, double time=TiMe::Default())
void swap(Plugin &plugin) noexcept
Swaps the underlying scene object instance reference and associated renderer reference.
Transform getTransform(const char *propertyName, double time=TiMe::Default()) const
Returns the value of a property as Transform.
AColor getAColor(const char *propertyName, double time=TiMe::Default()) const
Returns the value of a property as AColor.
double getDouble(const char *propertyName, double time=TiMe::Default()) const
Returns the value of a property as double.
const char * getName() const
VectorList getVectorList(const char *propertyName, double time=TiMe::Default()) const
Returns the value of a property as VectorList.
bool isEmpty() const noexcept
Color getColor(const char *propertyName, double time=TiMe::Default()) const
Returns the value of a property as Color.
Matrix getMatrix(const char *propertyName, double time=TiMe::Default()) const
Returns the value of a property as Matrix.
Value getValue(const char *propertyName, double time=TiMe::Default()) const
PluginRefT< Plugin > getPlugin(const char *propertyName, double time=TiMe::Default()) const
Returns the value of a property as a Plugin reference.
std::string getValueAsString(const char *propertyName, double time=TiMe::Default()) const
PluginMeta getMeta() const
unsigned long long getIntegerID() const noexcept
Returns the ID of the plugin instance. The ID is unique per scene contained in a VRayRenderer instanc...
std::string toString() const
Returns a string representation of the plugin which currently is the name of the plugin.
PluginCategories getCategories() const
TransformList getTransformList(const char *propertyName, double time=TiMe::Default()) const
Returns the value of a property as TransformList.
bool setValue(const char *propertyName, const bool value, double time=TiMe::Default())
FloatList getFloatList(const char *propertyName, double time=TiMe::Default()) const
Returns the value of a property as FloatList.
bool operator==(const Plugin &plugin) const noexcept
Returns true if both Plugins belong to the same renderer and point to the same scene object instance.
bool isNotEmpty() const noexcept
PluginTypeId getTypeId() const noexcept
Returns the type id of this plugin as long.
const char * getType() const
Returns the type of this plugin as string.
bool getBool(const char *propertyName, double time=TiMe::Default()) const
Returns the value of a property as bool.
StringList getStringList(const char *propertyName, double time=TiMe::Default()) const
Returns the value of a property as StringList.
bool operator!=(const Plugin &plugin) const noexcept
Returns false if both Plugins belong to the same renderer and point to the same scene object instance...
PropertyRuntimeMeta getPropertyRuntimeMeta(const char *propertyName) const
std::string getString(const char *propertyName, double time=TiMe::Default()) const
Returns the value of a property as string.
Vector getVector(const char *propertyName, double time=TiMe::Default()) const
Returns the value of a property as Vector.
ValueList getValueList(const char *propertyName, double time=TiMe::Default()) const
Returns the value of a property as ValueList. Works only if it really is a generic list.
int getInt(const char *propertyName, double time=TiMe::Default()) const
PluginList getPluginList(const char *propertyName, double time=TiMe::Default()) const
Returns the value of a property as PluginList.
bool isPropertyAnimated(const char *propertyName) const
Plugin() noexcept
Default construct an invalid Plugin - not referencing a V-Ray scene object.
Definition: vraysdk.hpp:4401
ColorList getColorList(const char *propertyName, double time=TiMe::Default()) const
Returns the value of a property as ColorList.
std::vector< double > getKeyframeTimes(const char *propertyName) const
IntList getIntList(const char *propertyName, double time=TiMe::Default()) const
Returns the value of a property as IntList.
bool setName(const char *newName)
Plugin & operator=(const Plugin &plugin) noexcept
Assign from another Plugin. They both point to the same underlying object. This is like having T& a=x...
VRayRenderer * getRenderer() const noexcept
Return the renderer this Plugin is associated with, can be null on empty plugins.
float getFloat(const char *propertyName, double time=TiMe::Default()) const
Returns the value of a property as float.
Plugin(const Plugin &plugin) noexcept
Copy construct from another Plugin. They both point to the same underlying object....
bool setValueAsString(const char *propertyName, const char *value)
Definition: vraysdk.hpp:5168
bool operator==(const Plugin &plugin) const noexcept
Returns true if both Plugins point to the same scene object instance.
PluginRefT(const PluginRefT< T > &plugin) noexcept
Copy construct from another PluginRef type.
Definition: vraysdk.hpp:5195
PluginRefT(const PluginRefT &plugin) noexcept
Copy construct from another PluginRef.
Definition: vraysdk.hpp:5191
PluginRefT() noexcept
Default construct an invalid PluginRef - not referencing a V-Ray scene object.
Definition: vraysdk.hpp:5185
bool isOutputValid() const noexcept
Returns true if this PluginRef references a valid Plugin output (including the default one).
Definition: vraysdk.hpp:5215
PluginRefT(const Plugin &plugin, const char *outPropertyName)
Construct from Plugin and output property.
PluginRefT(const Plugin &plugin) noexcept
Construct from another Plugin.
Definition: vraysdk.hpp:5188
void swap(PluginRefT &plugin) noexcept
Swaps the underlying scene object instance reference along with its output and associated renderer re...
PluginRefT & operator=(const PluginRefT< T > &plugin) noexcept
Assign from another PluginRef type. They both point to the same underlying object....
const char * getOutputName() const
std::string toString() const
Returns a string representation of the plugin reference of the form "pluginName::outputPropertyName".
bool operator==(const PluginRefT< T > &plugin) const noexcept
Returns true if both PluginRefs point to the same scene object instance and reference the same output...
Definition: vraysdk.hpp:5241
PluginRefT(const T &plugin, const char *outPropertyName)
Construct from Plugin and output property.
bool operator==(const PluginRefT< Plugin > &plugin) const noexcept
Returns true if both PluginRefTs point to the same scene object instance and reference the same outpu...
std::string toString() const
Returns a string representation of the plugin reference of the form "pluginName::outputPropertyName".
bool isOutputValid() const noexcept
Returns true if this PluginRef references a valid Plugin output (including the default one).
Definition: vraysdk.hpp:5284
PluginRefT & operator=(const PluginRefT &plugin) noexcept
Assign from another PluginRefT. They both point to the same underlying object. This is like having T&...
PluginRefT(const T &plugin) noexcept
Construct from another Plugin.
Definition: vraysdk.hpp:5254
bool operator==(const PluginRefT &plugin) const noexcept
Returns true if both PluginRefTs point to the same scene object instance and reference the same outpu...
const char * getOutputName() const
PluginRefT() noexcept
Default construct an invalid PluginRef - not referencing a V-Ray scene object.
Definition: vraysdk.hpp:5251
bool operator==(const Plugin &plugin) const noexcept
Returns true if both Plugins point to the same scene object instance.
PluginRefT(const PluginRefT &plugin) noexcept
Copy construct from another PluginRef.
Definition: vraysdk.hpp:5257
void swap(PluginRefT &plugin) noexcept
Swaps the underlying scene object instance reference along with its output and associated renderer re...
The raw memory contents of a PNG image.
Definition: vraysdk.hpp:487
Definition: vraysdk.hpp:8973
A group of methods for reading data and creating V-Ray geometry proxies.
Definition: vraysdk.hpp:9063
static bool createMeshFile(const Plugin &geomMeshPlugin, const AnimatedTransform &animTransform, const ProxyCreateParams ¶ms)
static bool readPreviewGeometry(const Plugin &proxyPlugin, VectorList &vertices, IntList &indices, int countHint=0)
static bool readPreviewHair(const Plugin &proxyPlugin, VectorList &vertices, IntList &lengths, int countHint=0)
static bool createMeshFile(const MeshFileData &data, const AnimatedTransform &animTransform, const ProxyCreateParams ¶ms)
static bool readPreviewParticles(const Plugin &proxyPlugin, VectorList &positions, int countHint=0)
static bool readFullData(const ProxyReadParams ¶ms, ProxyReadData &readData)
static bool createCombinedMeshFile(const std::vector< MeshFileData > &data, const std::vector< Transform > *transforms, const ProxyCreateParams ¶ms)
static bool createCombinedMeshFile(const std::vector< MeshFileData > &data, const std::vector< AnimatedTransform > &animTransforms, const ProxyCreateParams ¶ms)
static bool readPreviewData(const Plugin &proxyPlugin, ProxyReadData &readData)
static bool createMeshFile(const Plugin &geomMeshPlugin, const Transform *transform, const ProxyCreateParams ¶ms)
static bool readPreviewParticles(const ProxyReadParams ¶ms, VectorList &positions, int countHint=0)
static bool readPreviewGeometry(const ProxyReadParams ¶ms, VectorList &vertices, IntList &indices, int countHint=0)
static bool readFullData(const Plugin &proxyPlugin, ProxyReadData &readData)
static bool createCombinedMeshFile(const std::vector< Plugin > &geomMeshPlugins, const std::vector< AnimatedTransform > &animTransforms, const ProxyCreateParams ¶ms)
static bool readPreviewData(const ProxyReadParams ¶ms, ProxyReadData &readData)
static bool createMeshFile(const MeshFileData &data, const Transform *transform, const ProxyCreateParams ¶ms)
static bool createCombinedMeshFile(const std::vector< Plugin > &geomMeshPlugins, const std::vector< Transform > *transforms, const ProxyCreateParams ¶ms)
static bool readPreviewHair(const ProxyReadParams ¶ms, VectorList &vertices, IntList &lengths, int countHint=0)
Definition: vraysdk.hpp:2884
const std::vector< int > & getMaterialIDs() const
Get material IDs for each consecutive triangle in the full mesh.
Definition: vraysdk.hpp:2925
const std::vector< int > & getParticleVerticesStartIndices() const
Get the array of indices, where the particle vertices data starts - the i-th particle voxel starts at...
Definition: vraysdk.hpp:3093
std::vector< Vector > getHairVoxelVelocities(int hairVoxelIndex) const
Get velocities array of the voxel with the given index.
const std::vector< int > & getVoxelUVValueIndicesStartIndices() const
Get the array of indices, where the voxel UV value indices data starts - the j-th set of the i-th vox...
Definition: vraysdk.hpp:3066
ObjectInfo getMeshObjectInfo(int meshIndex) const
Get the object info of the geometry object with the given index.
int getParticleObjectInfosCount() const
Get the number of particle objects with object info. A particle object contains 1 or more particle vo...
const int * getUVValueIndices(int setIndex) const
Get an index array for the coordinates returned by getUVValues(). The data is owned and freed by this...
std::vector< int > getArrayOfLengths(const int *startIndices, int elementsCount, int objectCount, int uvSetsCount) const
const std::vector< Box > & getParticleVoxelsBBoxes() const
Get the array of bounding boxes of all particle voxels.
Definition: vraysdk.hpp:3158
Box getHairVoxelBBox(int hairVoxelIndex) const
Get bounding box of the hair voxel with the given index.
int getShadersCount() const
Get the number of available shader (material) name/ID pairs.
int getHairObjectInfosCount() const
Get the number of hair objects with object info. A hair object contains 1 or more hair voxels.
const std::vector< Box > & getGeometryVoxelsBBoxes() const
Get the array of bounding boxes of all geometry voxels.
Definition: vraysdk.hpp:3152
const std::vector< int > & getVoxelVerticesStartIndices() const
Get the array of indices, where the voxel vertices data starts - the i-th voxel starts at vertices[vo...
Definition: vraysdk.hpp:3024
const std::vector< Vector > & getUVValues() const
Get the full array of UVW 3-tuples.
Definition: vraysdk.hpp:3069
const std::vector< float > & getHairWidths() const
Get the full array of the hair geometry widths.
Definition: vraysdk.hpp:2997
std::vector< int > getVoxelMaterialIDs(int voxelIndex) const
Get materialIDs array of the voxel with the given index.
int getVoxelInfoObjectsCount() const
Get the number of geometry + hair + particle objects, which have voxel info.
const std::vector< Bool > & getVoxelInfoFlipNormals() const
Get an array of flipNormals flags (1 flag per mesh object - true if the geometric normals should be f...
Definition: vraysdk.hpp:3176
VoxelInfo getParticleVoxelInfo(int meshIndex) const
Get the voxel info of the particle object with the given index.
const std::vector< Box > & getHairVoxelsBBoxes() const
Get the array of bounding boxes of all hair voxels.
Definition: vraysdk.hpp:3155
std::vector< Vector > getVoxelVelocities(int voxelIndex) const
Get velocities array of the voxel with the given index.
VoxelInfo getMeshVoxelInfo(int meshIndex) const
Get the voxel info of the geometry object with the given index.
int getGeometryVoxelsCount() const
Get the number of all geometry voxels. A geometry object contains 1 or more geometry voxels.
const std::vector< int > & getHairVerticesPerStrand() const
Get the full array of the hair strands length data (The i-th strand has hairVerticesPerStrand[i] cons...
Definition: vraysdk.hpp:2994
const std::vector< Vector > & getNormals() const
Get full mesh normal vectors array.
Definition: vraysdk.hpp:2919
const std::vector< Color > & getVoxelInfoWireColor() const
Get an array of diffuse (wire) colors - 1 Color per mesh object.
Definition: vraysdk.hpp:3170
const std::vector< int > & getHairVelocitiesStartIndices() const
Get the array of indices, where the hair velocities data starts - the i-th hair voxel starts at hairV...
Definition: vraysdk.hpp:3090
const std::vector< Vector > & getVelocities() const
Get velocity vectors for each vertex in the vertex array.
Definition: vraysdk.hpp:2931
const std::vector< int > & getVoxelUVValuesStartIndices() const
Get the array of indices, where the voxel UV values data starts - the j-th set of the i-th voxel star...
Definition: vraysdk.hpp:3063
int getLengthFromStartIndex(int objectIndex, int setIndex, const int *startIndices, int elementsCount, int objectCount, int uvSetsCount) const
const std::vector< int > & getParticleWidthsStartIndices() const
Get the array of indices, where the particle widths data starts - the i-th particle voxel starts at p...
Definition: vraysdk.hpp:3096
std::vector< float > getParticleVoxelWidths(int particleVoxelIndex) const
Get widths array of the particle voxel with the given index.
std::string getUVSetName(int setIndex) const
Get the name of the UV set with the given index.
std::vector< int > getVoxelUVValueIndices(int voxelIndex, int setIndex) const
Get UV value indices in the UV values array of the voxel with the given index and of the set with the...
const std::vector< int > & getHairVerticesStartIndices() const
Get the array of indices, where the hair vertices data starts - the i-th hair voxel starts at hairVer...
Definition: vraysdk.hpp:3081
VoxelInfo getHairVoxelInfo(int meshIndex) const
Get the voxel info of the hair object with the given index.
size_t getUVValuesCount(int setIndex) const
Get the length of the array returned by getUVValues().
int getHairVoxelsCount() const
Get the number of all hair voxels. A hair object contains 1 or more hair voxels.
const std::vector< int > & getVoxelVertexIndicesStartIndices() const
Get the array of indices, where the voxel vertex indices data starts - the i-th voxel starts at indic...
Definition: vraysdk.hpp:3027
std::vector< int > getUVOriginalIndices() const
Get an array with the original proxy file indices of the UV sets. They may not equal their index in t...
std::vector< int > getVoxelNormalIndices(int voxelIndex) const
Get normal indices array of the voxel with the given index.
const std::vector< int > & getNormalIndices() const
Get indices in the normal for each triangle (every 3 consecutive ints are one triangle).
Definition: vraysdk.hpp:2922
size_t getUVValueIndicesCount(int setIndex) const
Get the length of the array returned by getUVValueIndices().
std::vector< int > getVoxelEdgeVisibility(int voxelIndex) const
Get an array of edge visibility flags of the voxel with the given index. Each integer in the array ha...
int getMeshObjectInfosCount() const
Get the number of geometry objects with object info. A geometry object contains 1 or more geometry vo...
ObjectInfo getHairObjectInfo(int meshIndex) const
Get the object info of the hair object with the given index.
std::string getShaderName(int shaderIndex) const
Get the name of the shader (material) with the given index.
int getShaderID(int shaderIndex) const
Get the ID of the shader (material) with the given index. Returns -1 if unavailable.
std::vector< Vector > getVoxelUVValues(int voxelIndex, int setIndex) const
Get UV values array of the voxel with the given index and of the set with the given index.
const std::vector< int > & getHairVerticesPerStrandStartIndices() const
Get the array of indices, where the hair strands data starts - the strands data of the i-th hair voxe...
Definition: vraysdk.hpp:3084
ObjectInfo getParticleObjectInfo(int meshIndex) const
Get the object info of the particle object with the given index.
Box getGeometryVoxelBBox(int voxelIndex) const
Get bounding box of the geometry voxel with the given index.
int getParticleVoxelsCount() const
Get the number of all particle voxels. A particle object contains 1 or more particle voxels.
const std::vector< int > & getVoxelNormalsStartIndices() const
Get the array of indices, where the voxel normals data starts - the i-th voxel starts at normals[voxe...
Definition: vraysdk.hpp:3036
std::vector< Vector > getVoxelNormals(int voxelIndex) const
Get normals array of the voxel with the given index.
const std::vector< int > & getUVValueIndices() const
Get the full array of UVW per-vertex indices.
Definition: vraysdk.hpp:3072
std::vector< Vector > getHairVoxelVertices(int hairVoxelIndex) const
Get vertex array of the hair voxel with the given index.
int getLengthFromStartIndex(int objectIndex, const int *startIndices, int elementsCount, int objectCount) const
const std::vector< float > & getParticleWidths() const
Get the full array of the particle geometry widths.
Definition: vraysdk.hpp:3003
const std::vector< Bool > & getVoxelInfoSmoothed() const
Get an array of smoothed flags (1 flag per mesh object - true if the voxel should be rendered with sm...
Definition: vraysdk.hpp:3173
int getAllVoxelsCount() const
Get the number of all voxels (geometry + hair + particle). Useful when the proxy file contains voxels...
const std::vector< int > & getParticleVelocitiesStartIndices() const
Get the array of indices, where the particle velocities data starts - the i-th particle voxel starts ...
Definition: vraysdk.hpp:3099
std::vector< Vector > getVoxelVertices(int voxelIndex) const
Get the vertex array of the voxel with the given index.
const std::vector< int > & getVoxelNormalIndicesStartIndices() const
Get the array of indices, where the voxel normalIndices data starts - the i-th voxel starts at normal...
Definition: vraysdk.hpp:3039
const std::vector< int > & getHairWidthsStartIndices() const
Get the array of indices, where the hair widths data starts - the i-th hair voxel starts at hairWidth...
Definition: vraysdk.hpp:3087
std::vector< int > getVoxelVertexIndices(int voxelIndex) const
Get the vertex indices array of the voxel with the given index.
const std::vector< Vector > & getParticleVertices() const
Get the full array of the particle geometry vertices.
Definition: vraysdk.hpp:3000
const std::vector< int > & getVoxelVelocitiesStartIndices() const
Get the array of indices, where the voxel velocities data starts - the i-th voxel starts at velocitie...
Definition: vraysdk.hpp:3054
std::vector< Vector > getParticleVoxelVertices(int particleVoxelIndex) const
Get vertex array of the particle voxel with the given index.
std::vector< Vector > getParticleVoxelVelocities(int particleVoxelIndex) const
Get velocities array of the particle voxel with the given index.
const std::vector< int > & getVertexIndices() const
Get indices in the vertex array for each triangle (every 3 consecutive ints are one triangle).
Definition: vraysdk.hpp:2916
Box getParticleVoxelBBox(int particleVoxelIndex) const
Get bounding box of the particle voxel with the given index.
ProxyReadData(int flags=MESH_ALL)
Pass different flags (or call setFlags later) if you want to limit the read data.
void setFlags(int flags)
Pass a combination of ReadFlags for the parts of the proxy data you need to read.
Definition: vraysdk.hpp:2910
const std::vector< Vector > & getVertices() const
Get full mesh vertex positions array.
Definition: vraysdk.hpp:2913
const std::vector< int > & getVoxelMaterialIDsStartIndices() const
Get the array of indices, where the voxel materialIDs data starts - the i-th voxel starts at material...
Definition: vraysdk.hpp:3045
std::vector< int > getHairVoxelVerticesPerStrand(int hairVoxelIndex) const
Get the hair strands length data of the hair voxel with the given index.
const Vector * getUVValues(int setIndex) const
Get an array of UVW mapping coordinates for the given mapping channel index. The data is owned and fr...
std::vector< int > getArrayOfLengths(const int *startIndices, int elementsCount, int objectCount) const
const std::vector< int > & getEdgeVisibility() const
Get an array of edge visibility flags, each integer in the array has edge visibility information for ...
Definition: vraysdk.hpp:2928
const std::vector< Vector > & getHairVertices() const
Get the full array of the hair geometry vertices.
Definition: vraysdk.hpp:2991
int getUVSetsCount() const
Get the number of available UV data sets (mapping channels).
int getNumFrames() const
Get the number of all frames in the proxy file. Useful when checking whether the proxy file contains ...
Bool hasVelocityChannel() const
True, in case the currently read frame contains at least one of geometry/hair/particle velocity data....
std::vector< float > getHairVoxelWidths(int hairVoxelIndex) const
Get widths array of the hair voxel with the given index.
Helper class that wraps a plugin instance enabling a certain render element.
Definition: vraysdk.hpp:2376
PixelFormat
This describes the desired data format for getData().
Definition: vraysdk.hpp:2496
@ PF_RGBA_BIT16
4x2 bytes RGBA.
Definition: vraysdk.hpp:2510
@ PF_BW_BIT8
1-byte greyscale/integer.
Definition: vraysdk.hpp:2498
@ PF_RGBA_FLOAT
4x4 bytes float RGBA.
Definition: vraysdk.hpp:2512
@ PF_RGB_FLOAT
3x4 bytes float RGB.
Definition: vraysdk.hpp:2507
@ PF_BW_BIT16
2-byte greyscale/integer.
Definition: vraysdk.hpp:2499
@ PF_RGBA_HALF
4x2 bytes half-float RGBA (currently not supported).
Definition: vraysdk.hpp:2511
@ PF_RGB_BIT16
3x2 bytes RGB.
Definition: vraysdk.hpp:2505
@ PF_BW_BIT32
4-byte greyscale/integer.
Definition: vraysdk.hpp:2500
@ PF_BW_FLOAT
4-byte float greyscale.
Definition: vraysdk.hpp:2502
@ PF_RGB_BIT8
3x1 bytes RGB.
Definition: vraysdk.hpp:2504
@ PF_RGBA_BIT8
4x1 bytes RGBA.
Definition: vraysdk.hpp:2509
@ PF_RGB_HALF
3x2 bytes half-float RGB (currently not supported).
Definition: vraysdk.hpp:2506
@ PF_BW_HALF
2-byte half-float greyscale (currently not supported).
Definition: vraysdk.hpp:2501
Plugin getPlugin() const
Get the plugin instance in the scene that enables this render element. Might be invalid for special c...
VRayImage * getImage(const ImageRegion *rgn=NULL, int layerIndex=0) const
RenderElement()
Default construct an invalid object.
Definition: vraysdk.hpp:2537
size_t getDataIntoBuffer(const GetDataOptions &options, void *data) const
static void releaseData(void *data)
Call this to release data allocated by the getData method.
BinaryFormat
Render channel binary format / storage data type.
Definition: vraysdk.hpp:2486
@ BF_FLOAT
A single float number (e.g. z-depth).
Definition: vraysdk.hpp:2487
@ BF_3FLOAT_SIGNED
3 signed float numbers (e.g. surface normals).
Definition: vraysdk.hpp:2491
@ BF_4FLOAT
4 float numbers (e.g. RGBA color).
Definition: vraysdk.hpp:2492
@ BF_3FLOAT
3 float numbers (e.g. RGB color).
Definition: vraysdk.hpp:2488
@ BF_2FLOAT
2 signed float numbers (e.g. uv coordinates or pixel screen velocity).
Definition: vraysdk.hpp:2489
@ BF_INT
A single integer number (e.g. render ID, material ID etc).
Definition: vraysdk.hpp:2490
PixelFormat getDefaultPixelFormat() const
Get the default format used by the getData method for this render element.
Definition: vraysdk.hpp:2558
size_t getData(void **data, const GetDataOptions &options) const
std::string getMetadata() const
Get render element metadata. Currently works only for Cryptomatte render element and returns manifest...
VRayImage * getImage(const GetImageOptions &options, int layerIndex=0) const
std::string getName() const
Get the display name of this render element.
Definition: vraysdk.hpp:2543
BinaryFormat getBinaryFormat() const
Get the binary format of pixels in this render element.
Definition: vraysdk.hpp:2553
Type
The render channal types/aliases are used to identify some common channels.
Definition: vraysdk.hpp:2381
@ REFLECT_ALPHA
Used by matte materials to store the alpha of the reflections.
Definition: vraysdk.hpp:2436
@ VRMTL_SHEEN_GLOSSINESS
VRayMtl sheen glossiness parameter.
Definition: vraysdk.hpp:2463
@ REALCOLOR
Real color VFB channel.
Definition: vraysdk.hpp:2410
@ COLOR
RGB VFB channel. This is always created by V-Ray and there can't be multiple instances....
Definition: vraysdk.hpp:2415
@ CRYPTOMATTE
Used for Cryptomatte render channel output.
Definition: vraysdk.hpp:2451
@ NODEID
Node ID VFB channel. This channel is generated by V-Ray.
Definition: vraysdk.hpp:2401
@ RAW_COAT_REFLECTION
Raw coat indirect reflection VFB channel.
Definition: vraysdk.hpp:2467
@ REFLECT
Reflection VFB channel. This channel must be generated by shaders.
Definition: vraysdk.hpp:2386
@ VRMTL_COAT_COLOR
VRayMtl coat highlight color (coat filter uninfluenced by Fresnel weight, reflection and refraction c...
Definition: vraysdk.hpp:2466
@ EXTRA_TEX_FLOAT
A single texture override is applied to the whole scene (e.g. Dirt)
Definition: vraysdk.hpp:2482
@ LAST
not a type, just a delimiter
Definition: vraysdk.hpp:2471
@ RENDERTIME
Per-pixel render time.
Definition: vraysdk.hpp:2450
@ DRBUCKET
A channel that keeps track of which DR server rendered a particular bucket (it is a Color buffer that...
Definition: vraysdk.hpp:2429
@ NOISE_LEVEL
The noise level as estimated by the Adaptive and Progressive image samplers. Used for denoising purpo...
Definition: vraysdk.hpp:2441
@ RAW_REFLECTION
Raw reflection VFB channel. This channel must be generated by shaders.
Definition: vraysdk.hpp:2405
@ BACKGROUND
Background VFB channel. This channel is generated by V-Ray.
Definition: vraysdk.hpp:2412
@ VRMTL_REFRACTGLOSS
A VRayMtl reflection glossiness VFB channel. This channel is generated by V-Ray.
Definition: vraysdk.hpp:2433
@ ZDEPTH
Z-Depth VFB channel. This channel is generated by V-Ray.
Definition: vraysdk.hpp:2402
@ SHEEN_FILTER
Sheen filter VFB channel.
Definition: vraysdk.hpp:2462
@ COAT_FILTER
Coat filter VFB channel.
Definition: vraysdk.hpp:2468
@ TOON
Toon effect channel.
Definition: vraysdk.hpp:2448
@ MTLRENDERID
Mtl render ID VFB channel. This channel is generated by V-Ray.
Definition: vraysdk.hpp:2439
@ DENOISED
A denoised version of the image. Adding this render element enables denoising.
Definition: vraysdk.hpp:2443
@ MATERIAL_SELECT
Material select.
Definition: vraysdk.hpp:2476
@ REFRACTION_FILTER
Refraction filter VFB channel. This channel must be generated by shaders.
Definition: vraysdk.hpp:2407
@ COAT_REFL_ALPHA
Used by matte materials to store the alpha of the coat reflections.
Definition: vraysdk.hpp:2465
@ NONE
Unspecified channel.
Definition: vraysdk.hpp:2382
@ NORMALS
Normals VFB channel. This channel is generated by V-Ray.
Definition: vraysdk.hpp:2411
@ LIGHT_SELECT
Link this in the channels parameters of your lights.
Definition: vraysdk.hpp:2453
@ SAMPLERATE
The sample rate for the image samplers.
Definition: vraysdk.hpp:2425
@ RAWGI
Raw GI VFB channel. This channel is generated by V-Ray.
Definition: vraysdk.hpp:2394
@ COVERAGE
Pixel coverage.
Definition: vraysdk.hpp:2475
@ RAW_REFRACTION
Raw refraction VFB channel. This channel must be generated by shaders.
Definition: vraysdk.hpp:2408
@ OBJECT_SELECT
Selects by object/material ID.
Definition: vraysdk.hpp:2479
@ LIGHTING_ANALYSIS
The lighting analysis overlay.
Definition: vraysdk.hpp:2452
@ BUMPNORMALS
The normals modified with bump map. This channel must be generated by shaders.
Definition: vraysdk.hpp:2423
@ MULTIMATTE_ID
RGB matte using material IDs.
Definition: vraysdk.hpp:2478
@ SHADEMAP_EXPORT
A channel that keeps the fragment coordinates in camera space.
Definition: vraysdk.hpp:2435
@ VRMTL_METALNESS
VRayMtl metalness parameter.
Definition: vraysdk.hpp:2455
@ SHADOW
Shadow VFB channel. This channel is generated by V-Ray.
Definition: vraysdk.hpp:2389
@ REFLECTION_FILTER
Reflection filter VFB channel. This channel must be generated by shaders.
Definition: vraysdk.hpp:2404
@ SPECULAR
Specular VFB channel. This channel is generated by V-Ray.
Definition: vraysdk.hpp:2390
@ MATTESHADOW
Matte shadow channel where full shadows are white and areas not in shadow are black; essentially this...
Definition: vraysdk.hpp:2418
@ ALPHA
Alpha VFB channel. This is always created by V-Ray and there can't be multiple instances....
Definition: vraysdk.hpp:2414
@ EXTRA_TEX_INT
A single texture override is applied to the whole scene (e.g. Dirt)
Definition: vraysdk.hpp:2481
@ CAUSTICS
Caustics VFB channel. This channel is generated by V-Ray.
Definition: vraysdk.hpp:2393
@ SHEEN_REFL_ALPHA
Used by matte materials to store the alpha of the sheen reflections.
Definition: vraysdk.hpp:2464
@ VRMTL_REFLECTHIGLOSS
A VRayMtl reflection hilight glossiness VFB channel. This channel is generated by V-Ray.
Definition: vraysdk.hpp:2432
@ GI
GI VFB channel. This channel is generated by V-Ray.
Definition: vraysdk.hpp:2392
@ RAWTOTALLIGHT
The raw total diffuse lighting (direct+indirect) falling on a surface. This channel is generated by V...
Definition: vraysdk.hpp:2421
@ VRMTL_REFLECTGLOSS
A VRayMtl reflection glossiness VFB channel. This channel is generated by V-Ray.
Definition: vraysdk.hpp:2431
@ VELOCITY
Velocity VFB channel. This channel is generated by V-Ray.
Definition: vraysdk.hpp:2398
@ WORLD_POSITION
The position in world space. Used for denoising purposes.
Definition: vraysdk.hpp:2442
@ RENDERID
Render ID VFB channel. This channel is generated by V-Ray.
Definition: vraysdk.hpp:2399
@ TOON_LIGHTING
Direct toon diffuse lighting.
Definition: vraysdk.hpp:2457
@ EXTRA_TEX
A single texture override is applied to the whole scene (e.g. Dirt)
Definition: vraysdk.hpp:2480
@ USER
User defined channel indices start from here.
Definition: vraysdk.hpp:2473
@ TOTALLIGHT
The total diffuse lighting (direct+indirect) falling on a surface. This channel is generated by V-Ray...
Definition: vraysdk.hpp:2420
@ MTLID
Mtl ID VFB channel. This channel is generated by V-Ray.
Definition: vraysdk.hpp:2400
@ TOON_SPECULAR
Direct toon specular lighting.
Definition: vraysdk.hpp:2458
@ DIFFUSE
Diffuse filter VFB channel. This channel is generated by V-Ray.
Definition: vraysdk.hpp:2385
@ WIRECOLOR
Wire color channel where each object appears with a solid color. This channel is generated by V-Ray.
Definition: vraysdk.hpp:2417
@ VRMTL_COAT_GLOSSINESS
VRayMtl coat glossiness parameter.
Definition: vraysdk.hpp:2469
@ RAW_SHEEN_REFLECTION
Raw sheen indirect reflection VFB channel.
Definition: vraysdk.hpp:2461
@ SELFILLUM
Self-illumination VFB channel. This channel must be generated by shaders.
Definition: vraysdk.hpp:2388
@ DEFOCUS_AMOUNT
Pixel blur, combination of DOF and moblur. Used for denoising purposes.
Definition: vraysdk.hpp:2445
@ MULTIMATTE
RGB matte for up to 3 objects.
Definition: vraysdk.hpp:2477
@ VRMTL_SHEEN_COLOR
VRayMtl sheen color parameter (sheen filter uninfluenced by Fresnel weight, reflection and refraction...
Definition: vraysdk.hpp:2460
@ LIGHTING
Lighting VFB channel. This channel is generated by V-Ray.
Definition: vraysdk.hpp:2391
@ RAWLIGHT
Raw light VFB channel. This channel is generated by V-Ray.
Definition: vraysdk.hpp:2395
@ EFFECTS_RESULT
Channel for all post effects.
Definition: vraysdk.hpp:2447
@ REFRACT
Refraction VFB channel. This channel must be generated by shaders.
Definition: vraysdk.hpp:2387
@ RAWSHADOW
Raw shadow VFB channel. This channel is generated by V-Ray.
Definition: vraysdk.hpp:2396
@ ATMOSPHERE
Atmospheric effects channel.
Definition: vraysdk.hpp:2384
@ VRMTL_REFLECTIOR
A VRayMtl reflection IOR VFB channel. This channel is generated by V-Ray.
Definition: vraysdk.hpp:2438
@ SSS
A channel used for VRayFastSSS2 material sub-surface portion.
Definition: vraysdk.hpp:2427
@ WORLD_BUMPNORMAL
Normal with bump mapping in world space.
Definition: vraysdk.hpp:2444
Type getType() const
Get the type of the render element.
Definition: vraysdk.hpp:2548
This class groups methods related to management of render elements in the scene.
Definition: vraysdk.hpp:2626
RenderElement add(RenderElement::Type type, const char *displayName, const char *instanceName)
RenderElement get(RenderElement::Type type) const
std::vector< RenderElement > getAll(RenderElement::Type type) const
Definition: vraysdk.hpp:9504
Definition: vraysdk.hpp:4141
bool getPreset(const char *filename, ScannedMaterialPreset &result) const
bool getInfo(const std::string &filename, std::string &info) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
bool getPreset(const std::string &filename, ScannedMaterialPreset &result) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
bool getInfo(const char *filename, std::string &info) const
Definition: vraysdk.hpp:10355
VUtils::VectorRefList getMeshVertices(double time=0)
DataType getDataType() const
bool isValid() const
Definition: vraysdk.hpp:10374
VRay::Box getMeshBoundingBox(double time=0)
VUtils::IntRefList getHairNumVertices(double time=0)
Transform getTransform(double time=0) const
bool getVisibility(double time=0) const
VUtils::VectorRefList getHairVertices(double time=0)
std::string getDataTypeAsString() const
VRay::Box getWorldBoundingBox(double time=0)
const char * getTypeAsString() const
const char * getName() const
ObjectType getType() const
const char * getNodeDataName() const
VUtils::IntRefList getMeshFaces(double time=0)
Definition: vraysdk.hpp:10165
float getMetersScale() const
Returns scene meters scale.
ScenePreview(const char *filename)
int getFrameEnd() const
Returns animation end frame.
UpAxis getUpAxis() const
Returns scene up axis.
bool operator!() const
Definition: vraysdk.hpp:10286
int getFrameStart() const
Returns animation start frame.
size_t getTotalFaces() const
Returns the total number of faces.
float getFramesScale() const
Returns scene frames scale.
int getFPS() const
Returns FPS.
float getPhotometricScale() const
Returns scene photometric scale.
float getSecondsScale() const
Returns scene seconds scale.
Object getObject(const char *name) const
ScenePreview(const char *filename, const Settings &settings)
std::vector< Object > getObjects(ObjectType objectType=ObjectTypeAll, DataType dataType=DataTypeAll) const
Definition: vraysdk.hpp:9211
bool hasOverriddenBy() const
bool hasAttribute(const AttributesType attributeType) const
UnitsType
Definition: vraysdk.hpp:9326
QuantityTypeEnum
Defines the quantity type that the parameter represents.
Definition: vraysdk.hpp:9306
@ Angle
Definition: vraysdk.hpp:9318
@ Distance
Definition: vraysdk.hpp:9313
std::string getValueOfOverriddenBy() const
bool isStringEnum() const
std::vector< std::string > getFileAssetNames() const
std::string getValueOfOverride(const int index) const
std::vector< std::string > getEnableDepends() const
std::vector< std::string > getStringEnumStrings() const
bool hasEnabledCondition() const
std::vector< EnumItem > getEnumStrings() const
std::string getRolloutName() const
GuideType
UIGuides supported property types.
Definition: vraysdk.hpp:9226
@ StartRollout
Definition: vraysdk.hpp:9262
@ Tier
Definition: vraysdk.hpp:9291
@ Hide
Indicates when the control should be hidden (not shown at all), depending on other plugin parameter v...
Definition: vraysdk.hpp:9293
@ GPUSupport
To what extent the property is supported by V-Ray GPU.
Definition: vraysdk.hpp:9288
@ QuantityType
Definition: vraysdk.hpp:9272
@ Enum
Definition: vraysdk.hpp:9229
@ Overrides
Definition: vraysdk.hpp:9286
@ MinValue
Limits the min value of the control.
Definition: vraysdk.hpp:9236
@ StringEnum
Definition: vraysdk.hpp:9252
@ SoftMinValue
Limits the max value of the control initially (the user can override it).
Definition: vraysdk.hpp:9267
@ StartTab
Definition: vraysdk.hpp:9265
@ Enable
Indicates when the control should be active (not grayed out), depending on other plugin parameter val...
Definition: vraysdk.hpp:9231
@ FileAssetNames
Definition: vraysdk.hpp:9255
@ SoftMaxValue
Limits the min value of the control initially (the user can override it).
Definition: vraysdk.hpp:9269
@ FileAssetOp
It is used to specify whether the file asset is going to be loaded or saved (or both) by V-Ray.
Definition: vraysdk.hpp:9257
@ Attributes
Definition: vraysdk.hpp:9249
@ Units
Definition: vraysdk.hpp:9243
@ FileAsset
Definition: vraysdk.hpp:9246
@ OverridenBy
Definition: vraysdk.hpp:9279
@ DisplayName
Definition: vraysdk.hpp:9234
@ SpinStep
Add a step hint to a slider.
Definition: vraysdk.hpp:9240
@ MaxValue
Limits the max value of the control.
Definition: vraysdk.hpp:9238
@ DefaultValue
Definition: vraysdk.hpp:9300
FileAssetOpType
Definition: vraysdk.hpp:9340
std::string getDisplayName() const
FileAssetOpType getFileAssetOp() const
bool hasHiddenCondition() const
std::vector< std::string > getHideDepends() const
std::vector< float > getFloats(const GuideType type) const
int getCountOfOverrides() const
std::string getTabName() const
QuantityTypeEnum getQuantityType() const
float getFloat(const GuideType type) const
bool hasType(const GuideType type) const
UnitsType getUnits() const
std::vector< std::string > getFileAssetExts() const
GPUParamSupport getGPUSupportStatus() const
AttributesType
Used to specify some additional attributes for the parameter.
Definition: vraysdk.hpp:9347
TierType
Definition: vraysdk.hpp:9371
Definition: vraysdk.hpp:10528
bool sample(const PluginRef &pluginRef, float u, float v, float &result)
This method is an overload of sample(). It should be used with plugins whose output is a floating poi...
bool setupRenderer(VRayRenderer &renderer)
IntList sampleAreaInt(const PluginRef &pluginRef, float u_start, float u_end, float v_start, float v_end, int width, int height)
bool releaseRenderer(VRayRenderer &renderer)
bool sample(const PluginRef &pluginRef, float u, float v, AColor &result)
FloatList sampleAreaFloat(const PluginRef &pluginRef, float u_start, float u_end, float v_start, float v_end, int width, int height)
VRayImage * sampleArea(const PluginRef &pluginRef, float u_start, float u_end, float v_start, float v_end, int width, int height)
bool sample(const PluginRef &pluginRef, float u, float v, int &result)
This method is an overload of sample(). It should be used with plugins whose output is an integer(int...
The raw memory contents of a serialized VFB state.
Definition: vraysdk.hpp:491
Definition: vraythrow.hpp:9
Definition: vraysdk.hpp:3725
void setGUIMessageProcessing(bool enableMessageProcessing)
Definition: vraysdk.hpp:3750
VRayInit(bool enableFrameBuffer)
Definition: vraysdk.hpp:3734
This class encapsulates all VFB per-layer related methods.
Definition: vraysdk.hpp:6413
int setUserName(const std::string &layerName)
This is an overloaded member function, provided for convenience. It differs from the above function o...
int getLayerPropertyNames(std::vector< std::string > &propNames) const
int canDelete(bool &isDeletable) const
int setLayerPropertyBoolValue(const char *propName, const bool value)
int getUserName(std::string &layerName) const
int setLayerPropertyIntValue(const char *propName, const int value)
int setBlendMode(const VFBLayerProperty::BlendMode blendMode) const
LayerManager & getLayerManager() const
Return the layer manager this layer is associated with.
int setLayerPropertyColorValue(const char *propName, const Color &value)
int resetLayerPropertyToDefault(const char *propName)
int getLayerPropertyDisplayName(const char *propName, std::string &displayName) const
int getLayerPropertyDisplayName(const std::string &propName, std::string &displayName) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
int setLayerPropertyIntByEnumLabel(const char *propName, const char *label)
int getLayerPropertyStampRawStringValue(const std::string &propName, std::string &value) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
int setLayerPropertyFloatValue(const std::string &propName, const float value)
This is an overloaded member function, provided for convenience. It differs from the above function o...
int setLayerPropertyStampRawStringValue(const char *propName, const char *value)
int isLayerPropertyReadOnly(const std::string &propName, bool &isReadOnly) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
int getLayerPropertyFloatValue(const char *propName, float &value) const
Other type properties ------------------------------------—.
int getLayerPropertyStampFontDescValue(const char *propName, VFBLayerProperty::StampFontDesc &value) const
int setLayerPropertyIntByEnumLabel(const std::string &propName, const std::string &label)
This is an overloaded member function, provided for convenience. It differs from the above function o...
int setLayerPropertyIntByEnumIndex(const std::string &propName, const int enumIndex)
This is an overloaded member function, provided for convenience. It differs from the above function o...
int setLayerPropertyStringValue(const std::string &propName, const char *value)
This is an overloaded member function, provided for convenience. It differs from the above function o...
int getLayerPropertyFlags(const std::string &propName, int &flags) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
int getEnabled(bool &isEnabled) const
int setLayerPropertyStampRawStringValue(const std::string &propName, const char *value)
This is an overloaded member function, provided for convenience. It differs from the above function o...
int setOpacity(const float opacity) const
int setLayerPropertyIntByEnumLabel(const std::string &propName, const char *label)
This is an overloaded member function, provided for convenience. It differs from the above function o...
int getLayerPropertyColorValue(const std::string &propName, Color &value) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
int setLayerPropertyBoolValue(const std::string &propName, const bool value)
This is an overloaded member function, provided for convenience. It differs from the above function o...
int getLayerPropertyStringValue(const std::string &propName, std::string &value) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
int getLayerPropertyFloatValue(const std::string &propName, float &value) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
int setLayerPropertyStringValue(const char *propName, const char *value)
int getLayerPropertyType(const std::string &propName, VFBLayerProperty::Type &type) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
int setUserName(const char *layerName)
int getLayerPropertyBoolValue(const std::string &propName, bool &value) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
int setLayerPropertyFloatValue(const char *propName, const float value)
int getLayerPropertiesOfType(const VFBLayerProperty::Type type, std::vector< std::string > &values) const
int getLayerPropertyIntValue(const char *propName, int &value) const
int getLayerPropertyIntValue(const std::string &propName, int &value) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
int getLayerPropertyColorValue(const char *propName, Color &value) const
int getLayerPropertyFlags(const char *propName, int &flags) const
Methods for manipulating the flags of a property ------------------------------------—.
int getClass(std::string &layerClass) const
int getLayerPropertyStampFontDescValue(const std::string &propName, VFBLayerProperty::StampFontDesc &value) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
int getLayerPropertyIntEnumValues(const std::string &propName, std::vector< std::string > &values) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
int getChildrenCount(int &childrenCount) const
int getLayerPropertyBoolValue(const char *propName, bool &value) const
Integer properties ------------------------------------—.
int resetLayerPropertyToDefault(const std::string &propName)
This is an overloaded member function, provided for convenience. It differs from the above function o...
int getBlendMode(VFBLayerProperty::BlendMode &blendMode) const
int getLayerPropertiesCount(int &propsCount) const
int isLayerPropertyReadOnly(const char *propName, bool &isReadOnly) const
int setLayerPropertyIntByEnumLabel(const char *propName, const std::string &label)
This is an overloaded member function, provided for convenience. It differs from the above function o...
int getLayerPropertyStringValue(const char *propName, std::string &value) const
int getLayerPropertiesReadOnly(std::vector< std::string > &values) const
int getLayerPropertyIntEnumLabel(const std::string &propName, std::string &valueLabel) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
int setLayerPropertyStampFontDescValue(const std::string &propName, const VFBLayerProperty::StampFontDesc &value)
This is an overloaded member function, provided for convenience. It differs from the above function o...
int setLayerPropertyStampRawStringValue(const std::string &propName, const std::string &value)
This is an overloaded member function, provided for convenience. It differs from the above function o...
int getLayerPropertyIntEnumIndex(const std::string &propName, int &enumIndex) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
int getLayerPropertyStampRawStringValue(const char *propName, std::string &value) const
int setLayerPropertyStampRawStringValue(const char *propName, const std::string &value)
This is an overloaded member function, provided for convenience. It differs from the above function o...
Layer getChild(const int childIndex) const
int setEnabled(const bool enabled)
int getLayerEnumProperties(std::vector< std::string > &values) const
Some methods for Enum integer properties ------------------------------------—.
int setLayerPropertyColorValue(const std::string &propName, const Color &value)
This is an overloaded member function, provided for convenience. It differs from the above function o...
int getLayerPropertyIntEnumValues(const char *propName, std::vector< std::string > &values) const
int getLayerPropertyIntEnumIndex(const char *propName, int &enumIndex) const
int setLayerPropertyIntValue(const std::string &propName, const int value)
This is an overloaded member function, provided for convenience. It differs from the above function o...
int getOpacity(float &opacity) const
int setLayerPropertyIntByEnumIndex(const char *propName, const int enumIndex)
int canBlend(bool &isBlendable) const
int getUniqueTreePathID(std::string &treePathUID) const
int getLayerPropertyIntEnumLabel(const char *propName, std::string &valueLabel) const
std::vector< Layer > getChildren() const
int setLayerPropertyStampFontDescValue(const char *propName, const VFBLayerProperty::StampFontDesc &value)
int getLayerPropertyType(const char *propName, VFBLayerProperty::Type &type) const
Definition: vraysdk.hpp:6777
void lockLayers()
Synchronized batch manipulations on layers ------------------------------------—.
Layer getLightMixLayer() const
int setAllLayers(const char *json)
int loadAllLayers(const char *filename)
std::vector< Layer > findAllLayersWithUserName(const std::string &userName) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
Layer createLayer(const std::string &layerClass, const Layer &parent)
This is an overloaded member function, provided for convenience. It differs from the above function o...
std::vector< Layer > findAllLayersWithUserName(const char *userName) const
Layer getStampLayer() const
std::vector< Layer > findAllLayersWithLayerClass(const std::string &layerClass) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
Layer getRootLayer() const
Common layers access ------------------------------------—.
int bakeLayersToLUT(const std::string &filename) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
std::string getAllLayers() const
std::vector< Layer > findAllLayersWithLayerClass(const char *layerClass) const
Accumulation of layers ----------------------------------—.
int saveAllLayers(const std::string &filename) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
int deleteLayer(Layer &layer)
Layer getSharpenBlurLayer() const
int bakeLayersToLUT(const char *filename) const
Layer getSourceLayer() const
int setAllLayers(const std::string &json)
This is an overloaded member function, provided for convenience. It differs from the above function o...
std::vector< Layer > getAllLayersAsLayerObjects() const
void unlockLayers()
Unlock the layers critical section.
Layer getLensEffectsLayer() const
VFB & getVFB() const
Tree management -----------------------------—.
int loadAllLayers(const std::string &filename)
This is an overloaded member function, provided for convenience. It differs from the above function o...
std::vector< std::string > getCreatableLayerClasses() const
std::vector< Layer > getAllBlendableLayers() const
int getLayersCount() const
int saveAllLayers(const char *filename) const
Layer getDisplayCorrectionLayer() const
std::vector< Layer > getAllEnabledLayers() const
Layer getDenoiserLayer() const
std::string getLastError() const
Returns the last error that occurred when a method of layerManager or Layer was called....
Definition: vraysdk.hpp:6953
Layer createLayer(const char *layerClass, const Layer &parent)
This class groups all VFB related methods.
Definition: vraysdk.hpp:6330
void setState(const void *vfbStateData, size_t dataSize, bool setMain=true, bool setHistory=true)
void setAlwaysOnTop(bool set)
Toggles the always-on-top behavior of the VFB window (disabled by default)
bool isInteractivityEnabled() const
Check if camera control from the VFB is enabled.
void setPosition(int x, int y)
Set the top-left coordinate of the VFB window in screen coordinates.
bool isShown() const
Check if the VFB window is currently shown.
std::string getLayers() const
void setPersistentState(const void *vfbPersistentStateData, size_t dataSize)
void show(bool show, bool setFocus=true)
VFBState * getState(size_t &dataSize, bool includeMain=true, bool includeHistory=true) const
void enableConfirmation(bool enable=true)
Enables the confirmation dialog when the VFB "Clear image" button is pressed.
VFBState * getPersistentState(size_t &dataSize) const
int setLayers(const char *json)
void setPositionAndSize(int x, int y, int w, int h)
Set the top-left coordinate and size of the VFB window in screen coordinates.
int setSettings(const char *json)
bool getPositionAndSize(int &x, int &y, int &w, int &h) const
Get the top-left coordinate of the VFB window in screen coordinates.
bool isConfirmationEnabled() const
Check if the confirmation dialog when clearing an image is enabled.
void enableInteractivity(bool enable=true)
Enables camera control using mouse and keyboard from the VFB image area.
std::string getSettings() const
Definition: vraysdk.hpp:6035
static bool isActiveState(RendererState value)
Convenience function for checking if a state value is in the rendering subset (including preparing).
Definition: vraysdk.hpp:7211
bool isRenderEnded() const
Box getBoundingBox(bool &ok) const
Returns the current bounding box of the scene.
void setOnVFBSaveSettingsNotify(void(*callback)(VRayRenderer &, double instant, void *userData), const void *userData=NULL)
InstanceHandleType getInstanceHandle() const
void setOnBucketFailed(void(*callback)(VRayRenderer &, int x, int y, int width, int height, const char *host, ImagePassType pass, double instant, void *userData), const void *userData=NULL)
int loadAsTextFiltered(const char *fileName, T &obj, const void *userData=NULL)
void setOnVFBShowMessagesWindow(T &object, const void *userData=NULL)
This is an overloaded member function, provided for convenience. It differs from the above function o...
T getOrCreatePlugin(const std::string &pluginName)
This is an overloaded member function, provided for convenience. It differs from the above function o...
Plugin getInstanceOf(const std::string &pluginType) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
void setCameraName(const char *name)
Camera name override. Current camera is selected internally using the scene_name property of the came...
int resetHosts(const std::string &hosts) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
void setOnRenderViewChanged(T &object, const void *userData=NULL)
This is an overloaded member function, provided for convenience. It differs from the above function o...
void setOnHostConnected(void(*callback)(VRayRenderer &, const char *hostName, double instant, void *userData), const void *userData=NULL)
void setOnVRayProfilerWrite(T &object, const void *userData=nullptr)
This is an overloaded member function, provided for convenience. It differs from the above function o...
bool setRenderMode(RenderMode mode)
void setOnUploadToCollaboration(int(*callback)(VRayRenderer &, const std::vector< std::string > &fileList, double instant, void *), const void *userData=NULL)
void setBucketReadyHasBuffer(bool hasBuffer)
Sets if an image passed in the BucketReady event parameters is needed. If not, no unnecessary copies ...
bool setInteractiveNoiseThreshold(float threshold)
void setOnHostDisconnected(T &object, const void *userData=NULL)
This is an overloaded member function, provided for convenience. It differs from the above function o...
T getOrCreatePlugin(const char *pluginName)
This is an overloaded member function, provided for convenience. It differs from the above function o...
bool getUseAnimatedValuesState() const
Returns true if setting parameter values adds keyframes and false if it overwrites.
void setOnVFBInteractiveStart(void(*callback)(VRayRenderer &, bool isRendering, double instant, void *userData), const void *userData=NULL)
int getNumThreads() const
Return the number of threads that will be used for rendering. 0 means all CPU logical threads.
void setOnVFBShowMessagesWindow(void(*callback)(VRayRenderer &, double instant, void *userData), const void *userData=NULL)
bool setCurrentTime(double time)
void setOnVFBOpenUpdateNotify(T &object, const void *userData=NULL)
This is an overloaded member function, provided for convenience. It differs from the above function o...
T getInstanceOrCreate(const std::string &pluginName)
This is an overloaded member function, provided for convenience. It differs from the above function o...
bool savePhotonMapFile(const char *fileName)
This is an overloaded member function, provided for convenience. It differs from the above function o...
int appendAsTextFiltered(const std::string &fileName, bool(*callback)(VRayRenderer &, const char *pluginType, std::string &pluginName, void *), const void *userData=NULL)
This is an overloaded member function, provided for convenience. It differs from the above function o...
std::string getAllHosts() const
void setOnVFBClosed(T &object, const void *userData=NULL)
This is an overloaded member function, provided for convenience. It differs from the above function o...
bool setInProcess(bool inProcess)
std::string exportSceneToBuffer() const
void setOnProgressiveImageUpdated(void(*callback)(VRayRenderer &, VRayImage *img, unsigned long long changeIndex, ImagePassType pass, double instant, void *userData), const void *userData=NULL)
int loadAsTextFiltered(const char *fileName, bool(*callback)(VRayRenderer &, const char *pluginType, std::string &pluginName, void *), const void *userData=NULL)
bool getDREnabled() const
void setOnVFBCopyToHostFrameBufferNotify(T &object, const void *userData=NULL)
This is an overloaded member function, provided for convenience. It differs from the above function o...
std::string getActiveHosts() const
Plugin getInstanceOrCreate(const char *pluginName, const char *pluginType)
bool setComputeDevicesMetal(const std::vector< int > &indices)
std::vector< PickedPluginInfo > pickPlugins(double x, double y, int maxcount=0, int timeout=-1) const
void setOnRendererClose(T &object, const void *userData=NULL)
This is an overloaded member function, provided for convenience. It differs from the above function o...
Plugin getInstanceOf(const char *pluginType) const
int appendFiltered(const char *fileName, bool(*callback)(VRayRenderer &, const char *pluginType, std::string &pluginName, void *), const void *userData=NULL)
bool clearAllPropertyValuesUpToTime(double time)
Removes all keyframe values at times less than 'time'.
void setOnVFBInteractiveStart(T &object, const void *userData=NULL)
This is an overloaded member function, provided for convenience. It differs from the above function o...
bool deletePlugin(const Plugin &plugin)
RenderElements getRenderElements()
Returns an object that groups render element management methods.
bool deletePlugin(const char *pluginName)
void setOnVFBPauseIPR(void(*callback)(VRayRenderer &, bool isRendering, double instant, void *userData), const void *userData=NULL)
bool getInProcess() const
Plugin pickPlugin(int x, int y, int timeout) const
int appendFiltered(const std::vector< std::string > &fileNames, T &obj, const void *userData=NULL)
This is an overloaded member function, provided for convenience. It differs from the above function o...
T getInstanceOf() const
This is an overloaded member function, provided for convenience. It differs from the above function o...
WaitTime
Used with waitForRenderEnd()
Definition: vraysdk.hpp:7995
bool enableDRClient(const EnableDRClientParams &enableParams)
int appendAsTextFiltered(const char *fileName, T &obj, const void *userData=NULL)
AddHostsResult addHosts(const char *hosts) const
Plugin newPlugin(const char *pluginType)
bool setRenderSizes(const RenderSizeParams &sizes, bool regionButtonState)
bool waitForSequenceEnd() const
std::vector< Plugin > getPlugins() const
Returns all plugin instances in the current scene.
void setOnStateChanged(void(*callback)(VRayRenderer &, RendererState oldState, RendererState newState, double instant, void *), const void *userData=NULL)
void setOnVFBDebugShadingNotify(void(*callback)(VRayRenderer &, int enabled, DebugShadingMode mode, int selectionLocked, double instant, void *userData), const void *userData=NULL)
Plugin newPlugin(const char *pluginName, const char *pluginType)
bool saveCausticsFile(const char *fileName)
This is an overloaded member function, provided for convenience. It differs from the above function o...
int load(const std::string &fileName)
This is an overloaded member function, provided for convenience. It differs from the above function o...
bool waitForVFBClosed(const int timeout) const
unsigned long long commit()
T getInstanceOrCreate(const char *pluginName)
This is an overloaded member function, provided for convenience. It differs from the above function o...
int loadAsTextFiltered(const std::string &fileName, T &obj, const void *userData=NULL)
This is an overloaded member function, provided for convenience. It differs from the above function o...
int setBitmapCache(bool onOff)
float getIESPrescribedIntensity(const std::string &iesLightFileName) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
ParserError getLastParserError() const
Returns the parser error that occurred when a scene was last loaded or appended.
bool addVRayProfilerMetadata(const std::string &category, const std::string &key, const std::string &value)
This is an overloaded member function, provided for convenience. It differs from the above function o...
Plugin getOrCreatePlugin(const char *pluginName, const char *pluginType)
AutoExposureResult getAutoExposureResult() const
Returns the auto-exposure and auto-white balance values computed during the last light cache calculat...
void setUserCameraChangedCB(void(*cb)(const UserCameraChanged *info, void *userData), void *userData)
void setKeepInteractiveRunning(bool keepRunning)
bool isFrameSkipped() const
bool clearPropertyValuesUpToTime(double time, PluginCategories categories)
Removes all keyframe values at times less than 'time' only from plugins of given categories.
int appendAsText(std::string &&text)
This is an overloaded member function, provided for convenience. It differs from the above function o...
bool setComputeDevicesDenoiser(const std::vector< int > &indices)
const RendererOptions getOptions() const
Return the options used to construct this renderer.
void setOnVFBUpdateIPR(void(*callback)(VRayRenderer &, bool isRendering, double instant, void *userData), const void *userData=NULL)
int append(const std::vector< std::string > &fileNames)
This is an overloaded member function, provided for convenience. It differs from the above function o...
bool saveCausticsFile(const std::string &fileName)
int appendAsText(const std::string &text)
This is an overloaded member function, provided for convenience. It differs from the above function o...
void setOnBucketFailed(T &object, const void *userData=NULL)
This is an overloaded member function, provided for convenience. It differs from the above function o...
void setOnLogMessage(void(*callback)(VRayRenderer &, const char *msg, MessageLevel level, double instant, void *userData), MessageLevel minLevel=MessageInfo, const void *userData=NULL)
int loadAsTextFiltered(const std::string &fileName, bool(*callback)(VRayRenderer &, const char *pluginType, std::string &pluginName, void *), const void *userData=NULL)
This is an overloaded member function, provided for convenience. It differs from the above function o...
size_t getIrradianceMapSize() const
VRayRenderer(InstanceHandleType handle)
int appendAsTextFiltered(const std::vector< const char * > &sceneTexts, bool(*callback)(VRayRenderer &, const char *pluginType, std::string &pluginName, void *), const void *userData=NULL)
bool getImageSize(int &width, int &height) const
Returns the frame buffer width and height.
bool updateLightingAnalysis()
void setOnProgressiveImageUpdated(T &object, const void *userData=NULL)
This is an overloaded member function, provided for convenience. It differs from the above function o...
void setProgresiveImageUpdatedHasBuffer(bool hasBuffer)
Sets if an image passed in the ProgressiveImageUpdated event parameters is needed....
bool saveLightCacheFile(const std::string &fileName)
static bool isInactiveState(RendererState value)
Convenience function for checking if a state value is in the idle subset (including IDLE_FRAME_DONE a...
Definition: vraysdk.hpp:7208
int append(const std::string &fileName, bool drSendNameOnly=false)
This is an overloaded member function, provided for convenience. It differs from the above function o...
int resetHosts(const char *hosts=NULL) const
void setDebugShadingSelection(const std::vector< Plugin > &selection)
void setOnBucketInit(T &object, const void *userData=NULL)
This is an overloaded member function, provided for convenience. It differs from the above function o...
void setOnProgress(T &object, const void *userData=NULL)
This is an overloaded member function, provided for convenience. It differs from the above function o...
~VRayRenderer()
Destructor.
Plugin getPlugin(const char *pluginName) const
void setOnBucketReady(T &object, const void *userData=NULL)
This is an overloaded member function, provided for convenience. It differs from the above function o...
T newPlugin(const char *pluginName)
This is an overloaded member function, provided for convenience. It differs from the above function o...
AddHostsResult addHosts(const std::string &hosts) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
T getPlugin(const char *pluginName) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
bool getCropRegion(int &srcWidth, int &srcHeight, float &rgnLeft, float &rgnTop, float &rgnWidth, float &rgnHeight) const
Gets the virtual crop region (RgnLeft, RgnTop, RgnWidth, RgnHeigt) within a virtual source image spac...
bool denoiseNow(T &object, bool shouldPassImage=true, const void *userData=NULL)
This is an overloaded member function, provided for convenience. It differs from the above function o...
void setOnVFBPauseIPR(T &object, const void *userData=NULL)
This is an overloaded member function, provided for convenience. It differs from the above function o...
bool isRenderingInHalfResolution() const
Definition: vraysdk.hpp:7215
void renderSequence() const
Begins rendering an animation sequence in a separate thread. A non-blocking call.
int appendFiltered(const std::vector< std::string > &fileNames, bool(*callback)(VRayRenderer &, const char *pluginType, std::string &pluginName, void *), const void *userData=NULL)
This is an overloaded member function, provided for convenience. It differs from the above function o...
int loadAsText(const char *text)
std::vector< Plugin > getPluginsOfCategories(const std::vector< PluginCategories > &categories) const
Plugin getCamera() const
Gets the current camera plugin. Don't use this unless you need to use setCamera() - see the comments ...
int loadAsText(const char *text, size_t length, void(*freeFn)(char *text, size_t size, T *holderObject)=NULL, T *holderObject=NULL)
Plugin getInstanceOrCreate(const char *pluginType)
Plugin getInstanceOrCreate(const char *pluginName, PluginTypeId pluginTypeId)
This is an overloaded member function, provided for convenience. It differs from the above function o...
Box getBoundingBox() const
Returns the current bounding box of the scene.
int appendAsText(const char *text, size_t length, void(*freeFn)(char *text, size_t size, T *holderObject)=NULL, T *holderObject=NULL)
void setVFBContextMenuItems(const std::vector< VFBContextMenuItem > &items)
Set menu items for the VFB's context menu.
void setOnHostConnected(T &object, const void *userData=NULL)
This is an overloaded member function, provided for convenience. It differs from the above function o...
void setOnLogMessage(T &object, MessageLevel minLevel=MessageInfo, const void *userData=NULL)
This is an overloaded member function, provided for convenience. It differs from the above function o...
bool waitForSequenceEnd(const int timeout) const
void setIncludePaths(const char *includePaths, bool overwrite=true)
Plugin newPlugin(const std::string &pluginType)
This is an overloaded member function, provided for convenience. It differs from the above function o...
double getCurrentTime() const
VRayImage * getImage(const GetImageOptions &options) const
int load(const char *fileName)
std::vector< std::string > getAllPluginTypes() const
Returns the class names of all available V-Ray plugin classes loaded from dynamic libraries.
bool setInteractiveSampleLevel(int samplesPerPixel)
int appendFiltered(const std::string &fileName, T &obj, const void *userData=NULL)
This is an overloaded member function, provided for convenience. It differs from the above function o...
Plugin getOrCreatePlugin(const std::string &pluginName, PluginTypeId pluginTypeId)
This is an overloaded member function, provided for convenience. It differs from the above function o...
bool getVisualDebuggerEnabled() const
Returns whether the Visual Debugger is enabled.
Plugin getInstanceOrCreate(const std::string &pluginName, const std::string &pluginType)
This is an overloaded member function, provided for convenience. It differs from the above function o...
int appendFiltered(const std::vector< const char * > &fileNames, T &obj, const void *userData=NULL)
std::vector< ComputeDeviceInfo > getComputeDevicesCurrentEngine() const
void setOnPostEffectsUpdated(T &object, const void *userData=NULL)
This is an overloaded member function, provided for convenience. It differs from the above function o...
void setOnLightMixTransferToScene(T &object, const void *userData=NULL)
This is an overloaded member function, provided for convenience. It differs from the above function o...
void bucketRenderNearest(int x, int y) const
void setOnVFBLayersChanged(void(*callback)(VRayRenderer &, double instant, void *userData), const void *userData=NULL)
void setOnLicenseError(T &object, const void *userData=NULL)
This is an overloaded member function, provided for convenience. It differs from the above function o...
void clearLastError()
Clears the last error code.
size_t getLightCacheSize() const
void setOnVFBRenderLast(T &object, const void *userData=NULL)
This is an overloaded member function, provided for convenience. It differs from the above function o...
Plugin getInstanceOrCreate(const char *pluginName, const std::string &pluginType)
This is an overloaded member function, provided for convenience. It differs from the above function o...
bool getAutoCommit() const
Get the current state of the autoCommit flag.
Plugin newPlugin(PluginTypeId pluginTypeId)
This is an overloaded member function, provided for convenience. It differs from the above function o...
bool clearScene()
Wipes the scene contents (all plugin instances). This implicitly calls stop() if necessary.
bool enableLiveLinkClient(const LiveLinkClientParameters ¶ms)
void setVFBContextMenuSelectedCallback(void(*callback)(VRayRenderer &, int commandId, int x, int y, void *userData), const void *userData=NULL)
size_t getCausticsSize() const
std::vector< RetT > getPlugins() const
bool setImageSize(int width, int height, bool resetCropRegion=true, bool resetRenderRegion=true)
int loadAsText(const std::string &text)
This is an overloaded member function, provided for convenience. It differs from the above function o...
bool deletePlugins(const char *names[], size_t namesCount)
void setUserLightChangedCB(void(*cb)(const UserLightChanged *info, void *userData), void *userData)
bool getKeepInteractiveRunning() const
Get the current state of the keepInteractiveRunning flag.
PluginMeta getPluginMeta(const char *pluginClassName) const
Return static meta information about a given plugin type.
RenderMode getRenderMode() const
Get the current render mode.
int appendAsTextFiltered(const std::vector< std::string > &sceneTexts, bool(*callback)(VRayRenderer &, const char *pluginType, std::string &pluginName, void *), const void *userData=NULL)
This is an overloaded member function, provided for convenience. It differs from the above function o...
InteractiveStatistics getInteractiveStatistics() const
Returns some performance statistics from the Interactive (RT) engine.
bool denoiseNow(void(*userCb)(VRayRenderer &, VRayImage *, void *)=0, bool shouldPassImage=true, const void *userData=NULL)
bool setInteractiveTimeout(int timeoutMsec)
void setOnVFBLayersChanged(T &object, const void *userData=NULL)
This is an overloaded member function, provided for convenience. It differs from the above function o...
bool addVRayProfilerMetadata(const char *category, const char *key, const char *value)
bool waitForRenderEnd(const int timeout) const
VRayImage * getImage() const
unsigned long setProgressiveImageUpdateTimeout(unsigned long timeout)
std::vector< std::string > getPluginTypesOfCategory(PluginCategory category) const
Plugin getInstanceOrCreate(const std::string &pluginName, const char *pluginType)
This is an overloaded member function, provided for convenience. It differs from the above function o...
bool setDREnabled(bool drEnabled, bool enableBroadcastListener=true)
std::vector< ComputeDeviceInfo > getComputeDevicesOptix() const
float getIESPrescribedIntensity(const char *iesLightFileName) const
void setUserNodeChangedCB(void(*cb)(const UserNodeChanged *info, void *userData), void *userData)
void setIncludePaths(const std::string &includePaths, bool overwrite=true)
This is an overloaded member function, provided for convenience. It differs from the above function o...
int loadFiltered(const char *fileName, bool(*callback)(VRayRenderer &, const char *pluginType, std::string &pluginName, void *), const void *userData=NULL)
int append(const std::vector< const char * > &fileNames)
void setOnVFBOpenUpdateNotify(void(*callback)(VRayRenderer &, double instant, void *userData), const void *userData=NULL)
bool setCropRegion(int srcWidth, int srcHeight, float rgnLeft, float rgnTop, float rgnWidth, float rgnHeight)
void setVRayProfiler(const VRayProfilerSettings &settings)
bool savePhotonMapFile(const std::string &fileName)
bool setNumThreads(int numThreads)
void setOnBucketReady(void(&callback)(VRayRenderer &, int x, int y, const char *host, VRayImage *img, ImagePassType pass, double instant, void *userData), const void *userData=NULL)
std::vector< Plugin > getPlugins(const std::string &pluginClassName) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
void setOnLicenseError(void(*callback)(VRayRenderer &, const char *msg, int errorCode, LicenseUserStatus userStatus, double instant, void *userData), const void *userData=NULL)
void setOnStateChanged(T &object, const void *userData=NULL)
This is an overloaded member function, provided for convenience. It differs from the above function o...
void setOnBucketReady(std::nullptr_t null)
This is an overloaded member function, provided for convenience. It differs from the above function o...
bool replacePlugin(const Plugin &oldPlugin, const Plugin &newPlugin)
int appendAsTextFiltered(const char *fileName, bool(*callback)(VRayRenderer &, const char *pluginType, std::string &pluginName, void *), const void *userData=NULL)
std::vector< ComputeDeviceInfo > getComputeDevicesMetal() const
T getPlugin(const std::string &pluginName) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
bool saveLightCacheFile(const char *fileName)
This is an overloaded member function, provided for convenience. It differs from the above function o...
void setOnVFBCopyToHostFrameBufferNotify(void(*callback)(VRayRenderer &, double instant, void *userData), const void *userData=NULL)
Plugin getOrCreatePlugin(const std::string &pluginName, const std::string &pluginType)
This is an overloaded member function, provided for convenience. It differs from the above function o...
int loadAsText(std::string &&text)
This is an overloaded member function, provided for convenience. It differs from the above function o...
VRayRenderer(const RendererOptions &rendererOptions)
int appendAsTextFiltered(const std::vector< std::string > &sceneTexts, T &obj, const void *userData=NULL)
This is an overloaded member function, provided for convenience. It differs from the above function o...
bool setComputeDevicesCurrentEngine(const std::vector< int > &indices)
void abort() const
Flags the image rendering thread to abort and returns immediately (without waiting for it to join)
int appendFiltered(const std::string &fileName, bool(*callback)(VRayRenderer &, const char *pluginType, std::string &pluginName, void *), const void *userData=NULL)
This is an overloaded member function, provided for convenience. It differs from the above function o...
Plugin newPlugin(const std::string &pluginName, const std::string &pluginType)
This is an overloaded member function, provided for convenience. It differs from the above function o...
Plugin newPlugin(const std::string &pluginName, const char *pluginType)
This is an overloaded member function, provided for convenience. It differs from the above function o...
bool waitForRenderEnd(const WaitTime time=WaitTime::AwaitingOrIdle) const
int loadFiltered(const std::string &fileName, bool(*callback)(VRayRenderer &, const char *pluginType, std::string &pluginName, void *), const void *userData=NULL)
This is an overloaded member function, provided for convenience. It differs from the above function o...
int appendAsTextFiltered(const std::vector< const char * > &sceneTexts, T &obj, const void *userData=NULL)
int appendFiltered(const std::vector< const char * > &fileNames, bool(*callback)(VRayRenderer &, const char *pluginType, std::string &pluginName, void *), const void *userData=NULL)
int exportScene(const char *filePath, const VRayExportSettings &settings) const
void continueSequence() const
When rendering a sequence this starts the next frame after the previous one has completed....
void setOnUploadToCollaboration(T &object, const void *userData=NULL)
This is an overloaded member function, provided for convenience. It differs from the above function o...
int exportScene(const std::string &filePath, const VRayExportSettings &settings) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
Plugin getInstanceOrCreate(PluginTypeId pluginTypeId)
bool setCurrentFrame(int frame)
bool deletePlugins(const std::vector< std::string > &names)
bool getRenderSizes(RenderSizeParams &sizes, bool ®ionButtonState) const
int appendAsTextFiltered(const std::string &fileName, T &obj, const void *userData=NULL)
This is an overloaded member function, provided for convenience. It differs from the above function o...
UserPropertyType
Property types for UserPropertyChanged.
Definition: vraysdk.hpp:7366
bool saveIrradianceMapFile(const std::string &fileName)
int exportScene(const char *filePath) const
void setOnVFBClosed(void(*callback)(VRayRenderer &, double instant, void *userData), const void *userData=NULL)
T getInstanceOrCreate()
This is an overloaded member function, provided for convenience. It differs from the above function o...
std::vector< ComputeDeviceInfo > getComputeDevicesCUDA() const
void setOnVFBAddRenderElementToScene(T &object, const void *userData=NULL)
This is an overloaded member function, provided for convenience. It differs from the above function o...
void setOnVFBAddRenderElementToScene(bool(*callback)(VRayRenderer &, VFBRenderElementType type, double instant, void *userData), const void *userData=NULL)
void setAutoCommit(bool autoCommit)
Plugin newPlugin(const char *pluginName, PluginTypeId pluginTypeId)
This is an overloaded member function, provided for convenience. It differs from the above function o...
PluginMeta getPluginMeta(const std::string &pluginClassName) const
Return static meta information about a given plugin type.
bool isSequenceEnded() const
Error getLastError() const
Returns the last error that occurred when a method was called. Use this to understand why a method re...
std::string getInactiveHosts() const
float setProgressiveImageUpdateDifference(float difference)
int removeHosts(const std::string &hosts) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
Plugin getInstanceOf(PluginTypeId pluginTypeId) const
void setOnRendererClose(void(*callback)(VRayRenderer &, double instant, void *userData), const void *userData=NULL)
void setOnLightMixTransferToScene(int(*callback)(VRayRenderer &, const std::vector< LightMixChange > &changes, double instant, void *), const void *userData=NULL)
Plugin getOrCreatePlugin(const char *pluginName, const std::string &pluginType)
This is an overloaded member function, provided for convenience. It differs from the above function o...
int loadFiltered(const char *fileName, T &obj, const void *userData=NULL)
T newPlugin()
This is an overloaded member function, provided for convenience. It differs from the above function o...
void setOnProgress(void(*callback)(VRayRenderer &, const char *msg, int elementNumber, int elementsCount, double instant, void *userData), const void *userData=NULL)
bool deletePlugin(const std::string &pluginName)
bool deletePlugins(const std::vector< VRay::Plugin > &plugins)
void setKeepBucketsInCallback(bool keep)
This method allows you to change the default behavior of keeping an image copy in a BucketReady callb...
std::string exportSceneToBuffer(const VRayExportSettings &settings) const
void stop() const
Flags the image rendering thread to stop and waits for it to join.
std::vector< Plugin > getPluginsOfCategories(const PluginCategories &categories) const
Returns all plugin instances that belong to all passed categories.
double getCurrentEventTime() const
Get the current value (in seconds) of the relative time used in event callbacks.
bool saveIrradianceMapFile(const char *fileName)
This is an overloaded member function, provided for convenience. It differs from the above function o...
Plugin getInstanceOrCreate(const std::string &pluginName, PluginTypeId pluginTypeId)
This is an overloaded member function, provided for convenience. It differs from the above function o...
void setOnVFBUpdateIPR(T &object, const void *userData=NULL)
This is an overloaded member function, provided for convenience. It differs from the above function o...
bool setImprovedDefaultSettings(DefaultsPreset preset=quality_medium)
bool setRenderRegion(int rgnLeft, int rgnTop, int rgnWidth, int rgnHeight)
bool waitForVFBClosed() const
int append(const char *fileName, bool drSendNameOnly=false)
const char * getCameraName() const
Gets the camera name override previously set by setCameraName().
bool getVFBContextMenuItemValue(int commandId, int &value) const
bool setVFBContextMenuItemValue(int commandId, int value)
Plugin newPlugin(const char *pluginName, const std::string &pluginType)
This is an overloaded member function, provided for convenience. It differs from the above function o...
bool getProgresiveImageUpdatedHasBuffer() const
Gets if an image will be passed in the ProgressiveImageUpdated callback parameters.
int appendAsText(const std::vector< std::string > &sceneTexts)
This is an overloaded member function, provided for convenience. It differs from the above function o...
bool setComputeDevicesEnvironmentVariable()
void setOnHostDisconnected(void(*callback)(VRayRenderer &, const char *hostName, double instant, void *userData), const void *userData=NULL)
void setVFBContextMenuSelectedCallback(T &object, const void *userData=NULL)
This is an overloaded member function, provided for convenience. It differs from the above function o...
Plugin getInstanceOrCreate(const std::string &pluginType)
This is an overloaded member function, provided for convenience. It differs from the above function o...
int appendFiltered(const char *fileName, T &obj, const void *userData=NULL)
void setOnBucketReady(void(&callback)(VRayRenderer &, int x, int y, int width, int height, const char *host, ImagePassType pass, double instant, void *userData), const void *userData=NULL)
void setOnPostEffectsUpdated(void(*callback)(VRayRenderer &, double instant, void *userData), const void *userData=NULL)
Plugin getOrCreatePlugin(const std::string &pluginName, const char *pluginType)
This is an overloaded member function, provided for convenience. It differs from the above function o...
bool optimizeMaterialGraph(const Plugin &topPlugin)
LicenseError getLicenseError() const
Returns the license error (if any) that occurred when the renderer was constructed or when rendering ...
void setVisualDebuggerEnabled(bool enable)
Enables/Disables the Visual Debugger functionality.
T newPlugin(const std::string &pluginName)
This is an overloaded member function, provided for convenience. It differs from the above function o...
Plugin getPlugin(const std::string &pluginName) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
void setOnVFBDebugShadingNotify(T &object, const void *userData=NULL)
This is an overloaded member function, provided for convenience. It differs from the above function o...
void setOnBucketInit(void(*callback)(VRayRenderer &, int x, int y, int width, int height, const char *host, ImagePassType pass, double instant, void *userData), const void *userData=NULL)
Plugin pickPlugin(int x, int y) const
std::vector< ComputeDeviceInfo > getComputeDevicesDenoiser() const
bool getRenderRegion(int &rgnLeft, int &rgnTop, int &rgnWidth, int &rgnHeight) const
int exportScene(const std::string &filePath) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
bool setComputeDevicesCUDA(const std::vector< int > &indices)
int removeHosts(const char *hosts) const
bool setCamera(const Plugin &plugin)
void setOnVFBSaveSettingsNotify(T &object, const void *userData=NULL)
This is an overloaded member function, provided for convenience. It differs from the above function o...
void setKeepProgressiveFramesInCallback(bool keep)
This method allows you to change the default behavior of keeping an image copy in a progressiveImageU...
size_t getImageIntoBuffer(const GetImageOptions &options, void *buf) const
void setOnRenderViewChanged(void(*callback)(VRayRenderer &, const char *propName, double instant, void *userData), const void *userData=NULL)
bool setComputeDevicesOptix(const std::vector< int > &indices)
bool isDRClientEnabled() const
void setOnVRayProfilerWrite(void(*callback)(VRayRenderer &, const std::string &outputFile, int fileType, double instant, void *), const void *userData=nullptr)
unsigned long long getChangeIndex() const
int getCurrentFrame() const
int loadFiltered(const std::string &fileName, T &obj, const void *userData=NULL)
This is an overloaded member function, provided for convenience. It differs from the above function o...
RendererState getState() const
void setOnVFBRenderLast(void(*callback)(VRayRenderer &, bool isRendering, double instant, void *userData), const void *userData=NULL)
int appendAsText(const char *text)
bool setCropRegion(int srcWidth, int srcHeight, float rgnLeft, float rgnTop)
void renderSequence(SubSequenceDesc descriptions[], size_t count) const
void useAnimatedValues(bool on)
bool setResumableRendering(bool enable, const ResumableRenderingOptions *options)
int appendAsText(const std::vector< const char * > &sceneTexts)
bool getBucketReadyHasBuffer() const
Gets if an image will be passed in the BucketReady callback parameters.
Plugin getOrCreatePlugin(const char *pluginName, PluginTypeId pluginTypeId)
This is an overloaded member function, provided for convenience. It differs from the above function o...
DebugShadingMode
Enum with the different debug shading modes.
Definition: vraysdk.hpp:8373
std::vector< Plugin > getPlugins(const char *pluginClassName) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
PluginMeta getPluginMeta(const PluginTypeId pluginTypeId) const
Return static meta information about a given plugin type.
size_t getPhotonMapSize() const
A generic value holder used by Plugin parameters.
Definition: vraysdk.hpp:5300
PluginRef getPluginRef() const
Returns invalid PluginRef if the value is not Plugin. Keep in mind the value can be a Plugin and stil...
PluginList getPluginList() const
std::string toString() const
Returns the value as string.
Matrix getMatrix() const
Returns default constructed (uninitialized) Matrix if the value is not Matrix.
ValueList getValueList() const
int getInt() const
Works if the value is int, float, double or boolean. Otherwise returns 0.
bool isOK() const
True if the value can be used. Checks against TYPE_ERROR and TYPE_UNSPECIFIED.
void set(int value)
Stores the passed value and sets the appropriate type.
bool getBool() const
Works if the value is int, float, double or boolean. Otherwise returns false.
VectorList getVectorList() const
size_t getCount() const
Returns number of list elements if the value is a list type.
Transform getTransform() const
Returns default constructed (uninitialized) Transform if the value is not Transform.
bool isBad() const
True if there was an error and the value can't be used. Checks against TYPE_ERROR.
std::string getString() const
Returns empty string if the value is not string. Keep in mind the value can be a string and still be ...
AColor getAColor() const
Returns zero AColor if the value is not AColor. Keep in mind the value can be an AColor and still be ...
IntList getIntList() const
bool isList() const
False if this holds a single value.
float getFloat() const
Works if the value is int, float, double or boolean. Otherwise returns 0.0f.
Value() noexcept
Default constructor initializes Value to TYPE_ERROR.
FloatList getFloatList() const
TransformList getTransformList() const
Color getColor() const
Works if the value is Color or AColor. Otherwise returns zero color.
Type getType() const noexcept
Get the actual type of the stored value.
double getDouble() const
Works if the value is int, float, double or boolean. Otherwise returns 0.0.
Vector getVector() const
Returns zero Vector if the value is not Vector. Keep in mind the value can be a Vector and still be z...
const char * getStringType() const
Returns a string representation of the type.
Plugin getPlugin() const
Returns invalid Plugin if the value is not Plugin. Keep in mind the value can be a Plugin and still b...
StringList getStringList() const
ColorList getColorList() const
static Value Unspecified() noexcept
Static constructor initializes Value to TYPE_UNSPECIFIED.
StampFontWeight
Describes the weight of a UI font.
Definition: vraysdk.hpp:389
@ stampFontWeight_light
Light font.
Definition: vraysdk.hpp:391
@ stampFontWeight_bold
Bold font.
Definition: vraysdk.hpp:392
@ stampFontWeight_normal
Normal weight.
Definition: vraysdk.hpp:390
StampFontStyle
Describes the style of a UI font.
Definition: vraysdk.hpp:383
@ stampFontStyle_italic
Italic style.
Definition: vraysdk.hpp:385
@ stampFontStyle_normal
Normal style.
Definition: vraysdk.hpp:384
BlendMode
Definition: vraysdk.hpp:408
@ BlendMode_Saturation
Uses the saturation from the FG, while the value and hue are taken from the BG.
Definition: vraysdk.hpp:431
@ BlendMode_LinearBurn
Same as Color Burn but with less contrast.
Definition: vraysdk.hpp:416
@ BlendMode_Last
Last element.
Definition: vraysdk.hpp:443
@ BlendMode_SplotlightBlend
Also known as 'Spotlight Blend (8bit)'. Same as Spotlight, but additionally brightens the BG.
Definition: vraysdk.hpp:422
@ BlendMode_FgWhiteMask
Definition: vraysdk.hpp:441
@ BlendMode_Add
Adds the FG to the BG.
Definition: vraysdk.hpp:411
@ BlendMode_Subtract
Subtracts the FG from the BG. Does not affect completely black areas.
Definition: vraysdk.hpp:412
@ BlendMode_Hardlight
Also known as 'Hard Light (8bit)'. Spotlight is applied to pixels where the FG is dark and Screen is ...
Definition: vraysdk.hpp:425
@ BlendMode_Hardmix
Also known as 'Hard Mix (8bit)'. Adds the FG to the BG and for each color component returns a value o...
Definition: vraysdk.hpp:427
@ BlendMode_Exclusion
Same as Difference but with less contrast.
Definition: vraysdk.hpp:429
@ BlendMode_ColorDodge
Also known as 'Color Dodge (8bit)'. The color of the FG is applied to lighter pixels in the BG.
Definition: vraysdk.hpp:419
@ BlendMode_Background
Use as background.
Definition: vraysdk.hpp:436
@ BlendMode_Lighten
Compares the FG to the BG and takes the lighter of the two.
Definition: vraysdk.hpp:417
@ BlendMode_Overlay
Also known as 'Overlay (8bit)'. Darker pixels become darker where the BG is dark and brighter pixels ...
Definition: vraysdk.hpp:423
@ BlendMode_Multiply
Multiplies the FG by the BG.
Definition: vraysdk.hpp:414
@ BlendMode_Spotlight
Also known as 'Spotlight (8bit)'. Same as Multiply, but with twice the brightness.
Definition: vraysdk.hpp:421
@ BlendMode_Hue
Uses the hue from the FG , while the value and saturation are taken from the BG.
Definition: vraysdk.hpp:430
@ BlendMode_ColorBurn
The color of the FG is applied to darker pixels in the BG.
Definition: vraysdk.hpp:415
@ BlendMode_Average
The average of the current layer (FG) and the result from the layers below it (BG).
Definition: vraysdk.hpp:410
@ BlendMode_Darken
Compares the FG to the BG and takes the darker pixel values of the two.
Definition: vraysdk.hpp:413
@ BlendMode_Difference
Compares the pixels in the BG and FG and subtracts the darker pixels from the brighter ones.
Definition: vraysdk.hpp:428
@ BlendMode_Value
Uses the value from the FG, while the hue and saturation are taken from the BG.
Definition: vraysdk.hpp:433
@ BlendMode_Softlight
Also known as 'Soft Light (8bit)'. Darker pixels become darker where the FG is dark and brighter pixe...
Definition: vraysdk.hpp:424
@ BlendMode_LinearDodge
Also known as 'Linear Dodge (8bit)'. Same as Color Dodge but with less contrast.
Definition: vraysdk.hpp:420
@ BlendMode_Pinlight
Replaces the BG colors depending on the brightness of the FG color. If the FG color is lighter than m...
Definition: vraysdk.hpp:426
@ BlendMode_Screen
Makes both light and dark areas lighter.
Definition: vraysdk.hpp:418
@ BlendMode_Color
Uses the hue and saturation from the FG, while the value is taken from the BG.
Definition: vraysdk.hpp:432
@ BlendMode_Foreground
Use as foreground.
Definition: vraysdk.hpp:437
@ BlendMode_Divide
Subtracts the BG from the FG. Dark areas of the render are brightened, while bright areas of the rend...
Definition: vraysdk.hpp:434
@ BlendMode_Overwrite
Displays the current layer (FG) on top of all layers (BG) without blending. This is the default.
Definition: vraysdk.hpp:409
@ BlendMode_Normal
Blends the alpha of the VRayMtlSelect render element's material and other layers.
Definition: vraysdk.hpp:435
Flags
Definition: vraysdk.hpp:334
@ EnumRadioButtons
Specific to Int properties, the UI should use radio buttons.
Definition: vraysdk.hpp:338
@ Stretched
Specifies that when a widget is added it has to be stretched.
Definition: vraysdk.hpp:368
@ NonResettable
Properties with this flag won't be reset by calls to resetPropsToDefaults (e.g. Layer name).
Definition: vraysdk.hpp:354
@ WithoutLineEdit
Definition: vraysdk.hpp:365
@ HorizontalRolloutControls
Definition: vraysdk.hpp:347
@ Hidden
If this flag is raised the property should be temporarily hidden from its "Properties" UI.
Definition: vraysdk.hpp:337
@ Advanced
Indicate a property only visible when toggling advanced properties visibility/export mode or whatever...
Definition: vraysdk.hpp:356
@ ReadOnly
Properties with this flag should be shown with a read only UI.
Definition: vraysdk.hpp:350
@ EnumComboBox
Specific to Int properties, the UI should use a combo box.
Definition: vraysdk.hpp:339
@ Command
Definition: vraysdk.hpp:343
@ ScrollableVerticalRollout
Scrollable rollouts will have their contents in a scroll area.
Definition: vraysdk.hpp:352
@ CollapsibleVerticalRollout
Collapsible rollouts have buttons to collapse/expand them.
Definition: vraysdk.hpp:351
@ NoCustomStyleTag
Properties with this flag will not have Q_PROPERTY for custom styling (e.g. horizontal_rollout_groupb...
Definition: vraysdk.hpp:353
@ HasPipetteTool
Specific to Color property, add an additional pipette tool next to the color swatch button.
Definition: vraysdk.hpp:358
@ Transient
Parameter that is not stored in files.
Definition: vraysdk.hpp:349
@ Internal
No UI should be created in its "Properties" UI.
Definition: vraysdk.hpp:336
@ NoUndo
Properties with this flag don't need undo on changes. Example calculated images, curves for now.
Definition: vraysdk.hpp:355
@ Const
Properties marked as "Const" cannot have their internal value modified (i.e. const).
Definition: vraysdk.hpp:361
StampFontFamily
Describes the family of a UI font.
Definition: vraysdk.hpp:372
@ stampFontFamily_monospaced
Monospaced font.
Definition: vraysdk.hpp:379
@ stampFontFamily_sansSerif
A sans serif font.
Definition: vraysdk.hpp:377
@ stampFontFamily_default
Default family.
Definition: vraysdk.hpp:373
@ stampFontFamily_script
Script font (handwriting).
Definition: vraysdk.hpp:376
@ stampFontFamily_modern
Modern font.
Definition: vraysdk.hpp:378
@ stampFontFamily_roman
Roman (serif) font.
Definition: vraysdk.hpp:375
@ stampFontFamily_decorated
Decorated font.
Definition: vraysdk.hpp:374
Type
Definition: vraysdk.hpp:312
@ Rollout
Not in use!
Definition: vraysdk.hpp:322
@ Double
Not in use!
Definition: vraysdk.hpp:323
@ StampString
Holds two strings - raw string with user entered text and one string with fields replaced.
Definition: vraysdk.hpp:330
@ Image
Not in use!
Definition: vraysdk.hpp:326
@ Stream
Not in use! Binary stream holder.
Definition: vraysdk.hpp:331
@ IntEnum
It is an Int with a fixed number of values.
Definition: vraysdk.hpp:313
@ Curve
Not in use!
Definition: vraysdk.hpp:325
@ CustomPopup
Not in use! Holds a pointer to a CustomPopupMenuCallback, can be nullptr.
Definition: vraysdk.hpp:327
@ UInt32
Not in use!
Definition: vraysdk.hpp:324
@ MaskItemList
Not in use! Holds a list of items used for masking - each item is represented with some id,...
Definition: vraysdk.hpp:328
@ StampFont
Holds a StampFontDesc structure describing a font.
Definition: vraysdk.hpp:329
RGBA color, float32.
Definition: vraysdk.hpp:1460
AColor toSRGB() const noexcept
Creates the copy of this AColor with the values converted from linear to sRGB.
Definition: vraysdk.hpp:1593
void operator-=(const AColor &c) noexcept
Definition: vraysdk.hpp:1494
void operator*=(const AColor &c) noexcept
Definition: vraysdk.hpp:1501
void operator/=(const AColor &c) noexcept
Definition: vraysdk.hpp:1529
void makeWhiteComplement() noexcept
Definition: vraysdk.hpp:1572
void operator+=(const AColor &c) noexcept
Definition: vraysdk.hpp:1487
AColor getWhiteComplement() const noexcept
Returns the white complement of the AColor.
Definition: vraysdk.hpp:1566
float getLength() const noexcept
Returns the length of the RGBA components.
Definition: vraysdk.hpp:1556
float getLengthSquared() const noexcept
Returns the squared sum of the RGBA components.
Definition: vraysdk.hpp:1561
float maxComponentValue() const noexcept
Calculates the magnitude of the greatest color component (the alpha is not taken into account)
Definition: vraysdk.hpp:1578
AColor fromSRGB() const noexcept
Creates the copy of this AColor with the values converted from sRGB to linear.
Definition: vraysdk.hpp:1583
Contains the auto-exposure and auto-white balance values computed during the last light cache calcula...
Definition: vraysdk.hpp:3575
float autoWhiteBalance
The auto-white balance (in Kelvin). 0 means that autoWhiteBalance calculations are not enabled.
Definition: vraysdk.hpp:3577
float ISO
Definition: vraysdk.hpp:3578
float autoExposure
The auto-exposure multiplier. 0 means that autoExposure calculations are not enabled.
Definition: vraysdk.hpp:3576
Attributes storage format: [attrName\0|type{uint8}|value{some_bytes}][...][...]\0.
Definition: vraysdk.hpp:10683
void add(const char(&name)[nameLen], const std::string &value)
Definition: vraysdk.hpp:10773
void add(const std::string &name, const AColor &value)
Definition: vraysdk.hpp:10801
void add(const char *name, size_t nameLen, float value)
Definition: vraysdk.hpp:10851
void add(const std::string &name, const char(&value)[valueLen])
Definition: vraysdk.hpp:10817
void add(const std::string &name, const std::string &value)
Definition: vraysdk.hpp:10824
void add(const char(&name)[count], const AColor &value)
Definition: vraysdk.hpp:10748
BinUserAttributeTypeFlags
Definition: vraysdk.hpp:10705
bool hasData() const
Checks if we've written any attributes.
Definition: vraysdk.hpp:10937
void close()
Definition: vraysdk.hpp:10926
void add(const std::string &name, const Vector &value)
Definition: vraysdk.hpp:10794
IntList toIntList()
Definition: vraysdk.hpp:10945
void add(const char *name, size_t nameLen, const AColor &value)
Definition: vraysdk.hpp:10889
void add(const char *name, size_t nameLen, const char *value, size_t valueLen)
Definition: vraysdk.hpp:10915
void add(const std::string &name, float value)
Definition: vraysdk.hpp:10787
void add(const std::string &name, const char *value, size_t valueLen)
Definition: vraysdk.hpp:10809
std::string toString() const
Definition: vraysdk.hpp:10957
BinUserAttributeType
Definition: vraysdk.hpp:10696
void add(const char *name, size_t nameLen, int value)
Definition: vraysdk.hpp:10832
void add(const char(&name)[nameLen], const char *value, size_t valueLen)
Definition: vraysdk.hpp:10757
void add(const char(&name)[count], float value)
Definition: vraysdk.hpp:10732
void add(const char *name, size_t nameLen, const Vector &value)
Definition: vraysdk.hpp:10867
void add(const char(&name)[nameLen], const char(&value)[valueLen])
Definition: vraysdk.hpp:10765
void add(const char(&name)[count], const Vector &value)
Definition: vraysdk.hpp:10740
void add(const std::string &name, int value)
Definition: vraysdk.hpp:10780
size_t getNumBytes() const
Get number of written bytes.
Definition: vraysdk.hpp:10932
void add(const char(&name)[count], int value)
Definition: vraysdk.hpp:10724
Axis-aligned bounding box.
Definition: vraysdk.hpp:2800
Vector pmax
The upper bounds for the box along the three axes.
Definition: vraysdk.hpp:2802
void expand(const Box &box)
Definition: vraysdk.hpp:2821
void expand(const Vector &point)
Definition: vraysdk.hpp:2806
Vector pmin
The lower bounds for the box along the three axes.
Definition: vraysdk.hpp:2801
Definition: vraysdk.hpp:10631
int cpuCount
Only ServerReady means no error.
Definition: vraysdk.hpp:10659
int vrayVersion
Server V-Ray version number.
Definition: vraysdk.hpp:10662
Status
Definition: vraysdk.hpp:10632
std::string hostConnectedTo
Server is busy connected to ip. Valid only when status is ServerReady.
Definition: vraysdk.hpp:10668
std::string hostResolved
hostName:port translated to ip:port.
Definition: vraysdk.hpp:10665
std::string revisionTime
The time the server revision is built.
Definition: vraysdk.hpp:10671
RGB color, float32.
Definition: vraysdk.hpp:1132
Color getWhiteComplement() const noexcept
Returns the white complement of the Color.
Definition: vraysdk.hpp:1221
float getIntensity() const noexcept
Returns the intensity of the color (also called chroma or saturation) which is the brightness or dull...
Definition: vraysdk.hpp:1173
void makeWhiteComplement() noexcept
Definition: vraysdk.hpp:1227
float getClosestTemperatureAndColor(Color &closestColor, RGBColorSpace colorSpace=sRGB) const
Find the black body color that is closest to the given color and returns it and its temperature in Ke...
float maxComponentValue() const noexcept
Calculates the magnitude of the greatest component.
Definition: vraysdk.hpp:1320
static Color fromTemperature(float temperature, RGBColorSpace colorSpace=sRGB)
Return the normalized RGB color of a black body with the given temperature in Kelvin.
float getLength() const noexcept
Returns the length of the color.
Definition: vraysdk.hpp:1191
static Matrix getRGBtoRGBmatrix(RGBColorSpace srcColorSpace, RGBColorSpace dstColorSpace)
void operator*=(const Color &c) noexcept
Definition: vraysdk.hpp:1253
Color fromSRGB()
Creates the copy of this Color with the values converted from sRGB to linear.
Definition: vraysdk.hpp:1326
float getLuminance() const noexcept
Returns the luminance of the color which is a measure of the intensity of light that reaches the eye.
Definition: vraysdk.hpp:1178
RGBColorSpace
These color space do not include their corresponding gamma corrections!
Definition: vraysdk.hpp:1152
float getLengthSquared() const noexcept
Returns the squared length of the color.
Definition: vraysdk.hpp:1186
void operator/=(const Color &c) noexcept
Definition: vraysdk.hpp:1287
Color toSRGB()
Creates the copy of this Color with the values converted from linear to sRGB.
Definition: vraysdk.hpp:1335
void operator-=(const Color &c) noexcept
Definition: vraysdk.hpp:1245
void operator+=(const Color &c) noexcept
Definition: vraysdk.hpp:1237
void setContrast(float k, float middle=0.5f) noexcept
Definition: vraysdk.hpp:1213
void setSaturation(float k) noexcept
Definition: vraysdk.hpp:1202
float getPower() const
Returns the sum of all color components.
Definition: vraysdk.hpp:1196
float getClosestTemperature(RGBColorSpace colorSpace=sRGB) const
Find the black body color that is closest to the given color and returns its temperature in Kelvin.
Used for GPU device selection by VRayRenderer::getComputeDevicesCurrentEngine() & co.
Definition: vraysdk.hpp:2664
long long deviceHandle
Device handle.
Definition: vraysdk.hpp:2665
int ccMajor
CUDA Compute Capability Major version number.
Definition: vraysdk.hpp:2690
int rtCoreVersion
The version of the raytracing cores (if supported). 0 if the GPU does not support RT Cores.
Definition: vraysdk.hpp:2692
int numConnectedDisplays
Number of displays (monitors) attached to this device. -1 if this information is unavailable.
Definition: vraysdk.hpp:2687
Type
Definition: vraysdk.hpp:2678
@ deviceType_CPU
CPU device.
Definition: vraysdk.hpp:2680
@ deviceType_GPU
GPU device.
Definition: vraysdk.hpp:2681
@ deviceType_default
Default.
Definition: vraysdk.hpp:2679
@ deviceType_ACCEL
Accelerated device.
Definition: vraysdk.hpp:2682
int isCpuEmulation
Is device CPU emulated.
Definition: vraysdk.hpp:2700
std::string name
Non-unique displayable name. Device index is its unique identifier.
Definition: vraysdk.hpp:2668
int cudaOrdinalIndex
Cuda ordinal index.
Definition: vraysdk.hpp:2697
int useForRendering
Device is used for rendering.
Definition: vraysdk.hpp:2672
int tccMode
TCC mode.
Definition: vraysdk.hpp:2698
Type deviceType
Device type.
Definition: vraysdk.hpp:2685
int busId
Bus ID.
Definition: vraysdk.hpp:2695
int totalMemoryMB
MegaBytes.
Definition: vraysdk.hpp:2686
int localIndex
Local index.
Definition: vraysdk.hpp:2696
long long platform
Platform.
Definition: vraysdk.hpp:2666
int ccMinor
CUDA Compute Capability Minor version number.
Definition: vraysdk.hpp:2691
int shaderProcessorsCount
Shader processors count.
Definition: vraysdk.hpp:2694
int useForDenoising
Device is used for denoising.
Definition: vraysdk.hpp:2673
int frequencyMHz
Base clock frequency or -1 if not available.
Definition: vraysdk.hpp:2688
int isSupported
Is device supported.
Definition: vraysdk.hpp:2674
int gFlops
Theoretical GFLOPS. 0 or -1 if not available.
Definition: vraysdk.hpp:2689
The necessary parameters passed to the VRayRenderer::enableDRClient interface.
Definition: vraysdk.hpp:3659
bool withBroadcastListener
True if a broadcast listener socket was created.
Definition: vraysdk.hpp:3666
std::string httpProxy
server:port connection parameter for http connections via proxy
Definition: vraysdk.hpp:3661
int connectTimeout
Initial connection timeout in seconds.
Definition: vraysdk.hpp:3672
std::string dispatcher
can either be an empty string or host[:port]
Definition: vraysdk.hpp:3660
int verboseLevel
Numeric progress verbosity level from 0 (none) to 4 (all, incl. debug)
Definition: vraysdk.hpp:3674
bool enableAssigningWUsAsBackups
TransferrableDrOptions.
Definition: vraysdk.hpp:3668
bool localRendering
True if, when local dispatcher selected, it's configured to spawn a local render server.
Definition: vraysdk.hpp:3665
int upstreamChannels
Number of upstream connections, which the client side will use, when pipelining is not enabled.
Definition: vraysdk.hpp:3673
bool pipelinedUpstream
Whether to use pipelining. Note pipelining will be disabled internally (even if requested),...
Definition: vraysdk.hpp:3667
Used by VRayRenderer::getImage() and RenderElement::getImage()
Definition: vraysdk.hpp:2362
ImageRegion region
Optional crop rectangle.
Definition: vraysdk.hpp:2363
bool flipImage
Flip image top-bottom.
Definition: vraysdk.hpp:2366
bool doColorCorrect
Whether to apply VFB color corrections.
Definition: vraysdk.hpp:2364
bool stripAlpha
Set alpha to 1.
Definition: vraysdk.hpp:2365
A rectangle defined by top-left and bottom-right frame coordinates.
Definition: vraysdk.hpp:240
Options passed to VRayRenderer::saveImage.
Definition: vraysdk.hpp:791
enum VRay::ImageWriterOptions::CompressionType compressionType
for EXR format only
int bitsPerChannel
for EXR format only - either 16 or 32
Definition: vraysdk.hpp:825
Additional parameter flags for Instancer and Instancer2 plugins.
Definition: vraysdk.hpp:3555
static const int useUserAttributesBin
Use binary user attributes.
Definition: vraysdk.hpp:3567
static const int useObjectProperties
Use object properties.
Definition: vraysdk.hpp:3568
static const int useParentTimesAtleastForGeometry
Definition: vraysdk.hpp:3560
static const int useSkipCryptomatte
Skip registering Node for the Cryptomatte.
Definition: vraysdk.hpp:3565
static const int useMaterial
Use material override.
Definition: vraysdk.hpp:3562
static const int useGeometry
Use geometry override.
Definition: vraysdk.hpp:3563
static const int useMapChannels
Use additional map channels.
Definition: vraysdk.hpp:3564
static const int useRenderIDOverride
Use renderIDOverride.
Definition: vraysdk.hpp:3566
Definition: vraysdk.hpp:2769
unsigned long long usage
The name of the memory type category.
Definition: vraysdk.hpp:2771
Current rendering progress.
Definition: vraysdk.hpp:2760
std::string name
name of the device
Definition: vraysdk.hpp:2761
float totalMem
total mem in mega bytes
Definition: vraysdk.hpp:2764
float utilization
usage (from 0.0f to 100.0f)
Definition: vraysdk.hpp:2762
float freeMem
free mem in mega bytes
Definition: vraysdk.hpp:2763
Returned by VRayRenderer::getInteractiveStatistics when rendering in interactive mode.
Definition: vraysdk.hpp:2752
float currentNoiseThreshold
Current noise threshold. Useful when dynamic noise threshold is enabled.
Definition: vraysdk.hpp:2757
unsigned elapsedTicks
Time since start.
Definition: vraysdk.hpp:2754
std::vector< ComputeDeviceStatistics > computeDevices
array of statistics for each device with valid data
Definition: vraysdk.hpp:2767
std::vector< ComputeDeviceMemoryType > computeDevicesMemUsage
Memory usage by memory type.
Definition: vraysdk.hpp:2774
double pathsPerSecond
Number of camera rays traced per second.
Definition: vraysdk.hpp:2753
int sampleLevel
Number of samples per pixel accumulated.
Definition: vraysdk.hpp:2755
int numPasses
Number of sampling passes done.
Definition: vraysdk.hpp:2756
Parameters for setLicenseServer(). Only serverName is obligatory.
Definition: vraysdk.hpp:3873
std::string proxyUserName
Optional http proxy server.
Definition: vraysdk.hpp:3887
std::string serverName1
Optional alternative server if the primary doesn't work.
Definition: vraysdk.hpp:3881
std::string serverName2
Optional second alternative server.
Definition: vraysdk.hpp:3884
int serverPort
default port is 30304
Definition: vraysdk.hpp:3875
std::string proxyName
Optional http proxy server.
Definition: vraysdk.hpp:3876
std::string username
Optional login.
Definition: vraysdk.hpp:3878
std::string serverName
Primary license server - hostname or IP address.
Definition: vraysdk.hpp:3874
std::string proxyPassword
Login for the optional proxy server.
Definition: vraysdk.hpp:3888
std::string password
For the optional login.
Definition: vraysdk.hpp:3879
Definition: vraysdk.hpp:5762
bool isApplied
[In] Is the channel enabled.
Definition: vraysdk.hpp:5767
Color colorMult
[In] Can be empty for the rest channel.
Definition: vraysdk.hpp:5764
float intensityMult
[In] Color multiplier.
Definition: vraysdk.hpp:5765
bool enabled
[In] Intensity multiplier.
Definition: vraysdk.hpp:5766
Definition: vraysdk.hpp:3686
3x3 column-major matrix, float32
Definition: vraysdk.hpp:1742
void setRow(const int i, const Vector &a) noexcept
Definition: vraysdk.hpp:1814
void makeTranspose(void) noexcept
Make the matrix to be the transpose of its currrent value.
Definition: vraysdk.hpp:1847
Vector & operator[](const int index) noexcept
Return the i-th column of the matrix (i=0,1,2).
Definition: vraysdk.hpp:1748
void operator+=(const Matrix &m) noexcept
Definition: vraysdk.hpp:1905
Matrix inverse(const Matrix &m) noexcept
Definition: vraysdk.hpp:1945
Matrix makeRotationMatrixX(float xrot) noexcept
Definition: vraysdk.hpp:2119
Matrix makeRotationMatrixY(float yrot) noexcept
Definition: vraysdk.hpp:2128
Matrix noScale(const Matrix &m) noexcept
Definition: vraysdk.hpp:2081
void makeIdentity(void) noexcept
Make the matrix the identity matrix.
Definition: vraysdk.hpp:1826
bool makeInverse(void) noexcept
Definition: vraysdk.hpp:1857
void makeDiagonal(const Vector &a) noexcept
Definition: vraysdk.hpp:1834
Matrix() noexcept=default
Constructor - initializes all components to zero.
void setCol(const int i, const Vector &a) noexcept
Definition: vraysdk.hpp:1807
Matrix makeRotationMatrixZ(float zrot) noexcept
Definition: vraysdk.hpp:2137
void rotate(const Vector &axis) noexcept
Applies a rotation along the given axis. The length of the axis is the tangent of the angle of rotati...
Definition: vraysdk.hpp:1920
void operator/=(float x) noexcept
Divide all elements in the matrix by the given number. Does not perform a check for divide by zero.
Definition: vraysdk.hpp:1899
Matrix(Vector diagonal) noexcept
Constructor to diagonal matrix.
Definition: vraysdk.hpp:1769
void makeZero(void) noexcept
Make the matrix the zero matrix (all elements are zeroes).
Definition: vraysdk.hpp:1819
void set(float value) noexcept
Make diagonal matrix.
Definition: vraysdk.hpp:1790
Matrix normalize(const Matrix &m) noexcept
Definition: vraysdk.hpp:2073
void operator-=(const Matrix &m) noexcept
Definition: vraysdk.hpp:1913
Vector rotationAngles(const Matrix &m) noexcept
Definition: vraysdk.hpp:2093
void set(const Matrix &other) noexcept
Definition: vraysdk.hpp:1798
Vector scale(const Matrix &m) noexcept
Definition: vraysdk.hpp:2087
Matrix(const Vector &a, const Vector &b, const Vector &c) noexcept
Definition: vraysdk.hpp:1775
void operator*=(float x) noexcept
Multiply all elements in the matrix by the given number.
Definition: vraysdk.hpp:1894
Matrix rotate(const Matrix &m, const Vector &axis) noexcept
Definition: vraysdk.hpp:2067
void set(const Vector &a, const Vector &b, const Vector &c) noexcept
Definition: vraysdk.hpp:1785
A container for the data necessary to a export vrmesh with geometry, hair or particles....
Definition: vraysdk.hpp:5695
ValueList hairVertices
ValueList( VectorList ) (single frame) OR ValueList( ValueList(int, VectorList) ) (multiple frames - ...
Definition: vraysdk.hpp:5706
ValueList vertices
ValueList( VectorList ) (single frame) OR ValueList( ValueList(int, VectorList) ) (multiple frames - ...
Definition: vraysdk.hpp:5696
ValueList mapChannels
ValueList( ValueList(int, VectorList, IntList) )
Definition: vraysdk.hpp:5702
ValueList hairWidths
ValueList( FloatList ) (single frame) OR ValueList( ValueList(int, FloatList ) ) (multiple frames - ...
Definition: vraysdk.hpp:5708
ValueList hairVerticesPerStrand
ValueList( IntList ) (single frame) OR ValueList( ValueList(int, IntList ) ) (multiple frames - ...
Definition: vraysdk.hpp:5707
ValueList particleWidths
ValueList( FloatList ) (single frame) OR ValueList( ValueList(int, FloatList ) ) (multiple frames - ...
Definition: vraysdk.hpp:5710
ValueList faces
ValueList( IntList ) (single frame) OR ValueList( ValueList(int, IntList ) ) (multiple frames - ...
Definition: vraysdk.hpp:5697
ValueList mapChNames
ValueList( StringList )
Definition: vraysdk.hpp:5703
ValueList shaderNames
ValueList( ValueList(int, string) )
Definition: vraysdk.hpp:5704
ValueList faceNormals
ValueList( IntList ) (single frame) OR ValueList( ValueList(int, IntList ) ) (multiple frames - ...
Definition: vraysdk.hpp:5699
ValueList normals
ValueList( VectorList ) (single frame) OR ValueList( ValueList(int, VectorList) ) (multiple frames - ...
Definition: vraysdk.hpp:5698
ValueList velocities
ValueList( VectorList ) (single frame) OR ValueList( ValueList(int, VectorList) ) (multiple frames - ...
Definition: vraysdk.hpp:5700
ValueList faceMtlIDs
ValueList( IntList ) (single frame) OR ValueList( ValueList(int, IntList ) ) (multiple frames - ...
Definition: vraysdk.hpp:5701
ValueList edgeVisibility
ValueList( IntList ) (single frame) OR ValueList( ValueList(int, IntList ) ) (multiple frames - ...
Definition: vraysdk.hpp:5705
ValueList particleVertices
ValueList( VectorList ) (single frame) OR ValueList( ValueList(int, VectorList) ) (multiple frames - ...
Definition: vraysdk.hpp:5709
Helper structure storing the relevant configuration entries as they were read from the configuration ...
Definition: vraysdk.hpp:10017
char familySeparator
The separator that is used to distinguish different families for UI separation.
Definition: vraysdk.hpp:10033
std::string getErrorString() const
Get whether there was any error with the loading of the OCIO configuration.
Definition: vraysdk.hpp:10071
std::vector< std::string > roles
List of the stored roles in the configuration.
Definition: vraysdk.hpp:10023
std::vector< std::string > looks
List of the looks in the configuration.
Definition: vraysdk.hpp:10027
std::vector< std::string > viewTransforms
List of unique view transformations from the configuration.
Definition: vraysdk.hpp:10031
std::vector< std::string > colorSpaces
List of the stored color spaces in the configuration.
Definition: vraysdk.hpp:10019
OCIOConfigurationData(const char *fileName=NULL, SourceMode vraySourceType=SourceMode::Automatic)
Definition: vraysdk.hpp:10039
std::vector< std::string > devices
List of devices as read from the configuration.
Definition: vraysdk.hpp:10029
std::vector< std::string > roleColorSpaces
List of corresponding color spaces for each role. Size will match the roles size.
Definition: vraysdk.hpp:10025
std::vector< std::string > colorSpaceFamilies
List of stored color space families for the configuration. May be empty.
Definition: vraysdk.hpp:10021
Definition: vraysdk.hpp:10130
std::vector< OSLInputParameter > inputParams
Input parameters defined in the shader file.
Definition: vraysdk.hpp:10134
std::vector< std::string > outputColorParams
Output color parameters defined in the shader file.
Definition: vraysdk.hpp:10131
std::vector< std::string > outputFloatParams
Output float parameters defined in the shader file.
Definition: vraysdk.hpp:10132
std::vector< std::string > outputClosureParams
Output closure parameters defined in the shader file.
Definition: vraysdk.hpp:10133
The info contained in geometry, hair or particle objects.
Definition: vraysdk.hpp:2785
std::string name
the name of the object
Definition: vraysdk.hpp:2786
int id
the id of the object
Definition: vraysdk.hpp:2787
int vEnd
the end of the voxel range of the object (vEnd is excluded from the range)
Definition: vraysdk.hpp:2789
int vBegin
the begin of the voxel range of the object (vBegin is included in the range)
Definition: vraysdk.hpp:2788
Returned by VRayRenderer::getLastParserError. Use to diagnose problems when loading vrscene files.
Definition: vraysdk.hpp:3966
See VRayRenderer::pickPlugins.
Definition: vraysdk.hpp:5714
This struct is used to determine if a plugin type is of certain category.
Definition: vraysdk.hpp:4225
bool hasTextureIntCategory() const
Is the plugin of category_texture_int.
Definition: vraysdk.hpp:4316
unsigned long long pluginCategoryField
bitfield of the plugin categories
Definition: vraysdk.hpp:4249
bool hasBsdfCategory() const
Is the plugin of category_bsdf.
Definition: vraysdk.hpp:4266
bool hasMaterialCategory() const
Is the plugin of category_material.
Definition: vraysdk.hpp:4286
bool hasLightCategory() const
Is the plugin of category_light.
Definition: vraysdk.hpp:4281
bool hasGeometricObjectCategory() const
Is the plugin of category_geometric_object.
Definition: vraysdk.hpp:4271
bool hasTextureMatrixCategory() const
Is the plugin of category_texture_matrix.
Definition: vraysdk.hpp:4321
bool hasRenderChannelCategory() const
Is the plugin of category_render_channel.
Definition: vraysdk.hpp:4291
bool hasTextureFloatCategory() const
Is the plugin of category_texture_float.
Definition: vraysdk.hpp:4311
bool hasTextureCategory() const
Is the plugin of category_texture.
Definition: vraysdk.hpp:4306
bool hasGeometrySourceCategory() const
Is the plugin of category_geometry_source.
Definition: vraysdk.hpp:4276
bool hasUvwgenCategory() const
Is the plugin of category_uvwgen.
Definition: vraysdk.hpp:4336
bool hasBitmapCategory() const
Is the plugin of category_bitmap.
Definition: vraysdk.hpp:4261
std::vector< PluginCategory > getAll() const
Returns the bitfield as vector of enum values.
bool hasRenderViewCategory() const
Is the plugin of category_render_view.
Definition: vraysdk.hpp:4296
bool hasTextureTransformCategory() const
Is the plugin of category_texture_transform.
Definition: vraysdk.hpp:4326
bool hasSettingsCategory() const
Is the plugin of category_settings.
Definition: vraysdk.hpp:4301
bool hasTextureVectorCategory() const
Is the plugin of category_texture_vector.
Definition: vraysdk.hpp:4331
bool hasVolumetricCategory() const
Is the plugin of category_volumetric.
Definition: vraysdk.hpp:4341
Used by VRay::Proxy::createMeshFile()
Definition: vraysdk.hpp:3401
std::string customPreviewFile
file name to read and use its vertices and faces for the preview voxel
Definition: vraysdk.hpp:3437
int previewType
Definition: vraysdk.hpp:3429
std::string destination
destination file name
Definition: vraysdk.hpp:3426
int startFrame
used if animOn is true
Definition: vraysdk.hpp:3431
std::vector< std::string > objectNames
array of names to associate with respective meshes. This can be used to identify the pieces when read...
Definition: vraysdk.hpp:3435
PreviewTypes
Definition: vraysdk.hpp:3402
@ SIMPLIFY_FACE_SAMPLING
Definition: vraysdk.hpp:3406
@ SIMPLIFY_COMBINED
Definition: vraysdk.hpp:3421
@ SIMPLIFY_CLUSTERING
Definition: vraysdk.hpp:3410
@ SIMPLIFY_EDGE_COLLAPSE
Definition: vraysdk.hpp:3414
int endFrame
used if animOn is true
Definition: vraysdk.hpp:3432
Bool exportPointCloud
when enabled, adds a point cloud representation of the mesh separated into different levels of detail...
Definition: vraysdk.hpp:3442
float pointSize
determines the size of point cloud disks at the most detailed level. If this value is small,...
Definition: vraysdk.hpp:3443
int previewParticles
number of preview particles (default 20000)
Definition: vraysdk.hpp:3445
std::vector< Color > voxelInfoWireColor
array of diffuse (wire) colors - 1 Color per mesh object
Definition: vraysdk.hpp:3438
std::vector< int > objectIDs
array of unique IDs for the respective meshes. This should usually match Node.objectID values.
Definition: vraysdk.hpp:3436
int previewFaces
approximate number of preview triangles (default 10000; set to 0 to disable preview)
Definition: vraysdk.hpp:3428
int mergeVoxels
merge all voxels of the same type, before subdivision
Definition: vraysdk.hpp:3433
std::vector< Bool > voxelInfoFlipNormals
array of flipNormals flags (1 flag per mesh object - true if the geometric normals should be flipped)
Definition: vraysdk.hpp:3440
int previewHairs
number of preview hairs (default 1000)
Definition: vraysdk.hpp:3444
std::vector< Bool > voxelInfoSmoothed
array of smoothed flags (1 flag per mesh object - true if the voxel should be rendered with smoothed ...
Definition: vraysdk.hpp:3439
Bool bakeTransforms
when enabled (default), applies the input Transform(s) to the geometry data, otherwise writes the Tra...
Definition: vraysdk.hpp:3446
int elementsPerVoxel
number of triangles in each voxel
Definition: vraysdk.hpp:3427
int animOn
enables saving multiple animated frames in the proxy
Definition: vraysdk.hpp:3430
The necessary parameters for reading data in a proxy file.
Definition: vraysdk.hpp:3450
int flip_axis
0 do not rotate; 1 transform from Maya to 3dsMax coordinate system (90 deg. rotation around x axis); ...
Definition: vraysdk.hpp:3454
float particle_width_multiplier
a multiplier to the particle width data
Definition: vraysdk.hpp:3471
float smooth_angle
smooth angle in degrees
Definition: vraysdk.hpp:3459
int compute_normals
true to calculate smooth normals
Definition: vraysdk.hpp:3453
int num_preview_faces
number of faces in preview
Definition: vraysdk.hpp:3458
bool use_full_names
read the full path instead of only the name
Definition: vraysdk.hpp:3463
float hair_width_multiplier
a multiplier to the hair width data
Definition: vraysdk.hpp:3470
bool compute_bbox
true to compute the bounding box, false to read it from the file
Definition: vraysdk.hpp:3464
std::string file
file name to read
Definition: vraysdk.hpp:3451
bool subdiv_uvs
subdivide or skip mapping channels
Definition: vraysdk.hpp:3466
int subdiv_level
the subdivision level
Definition: vraysdk.hpp:3455
std::string object_path
starting object path in Alembic hierarchy
Definition: vraysdk.hpp:3452
bool use_alembic_offset
true to use Alembic animation frame offset
Definition: vraysdk.hpp:3469
float fps
frames per second for calculation of current time and frame
Definition: vraysdk.hpp:3462
bool instancing
turns on/off the instancing of Alembic duplicated objects
Definition: vraysdk.hpp:3468
bool subdiv_preserve_geom_borders
if true, the borders won't be subdivided
Definition: vraysdk.hpp:3467
int anim_type
animated proxy playback type(0 - loop; 1 - once; 2 - ping - pong; 3 - still)
Definition: vraysdk.hpp:3457
float anim_speed
animated proxy playback speed
Definition: vraysdk.hpp:3460
int subdiv_preserve_map_borders
determines the smoothing mode of the mapping channels' borders. 0-None, 1-Internal and 2-All
Definition: vraysdk.hpp:3456
bool subdiv_all_meshes
true to subdivide Alembic PolyMesh and SubD objects; false to subdivide only SubD objects
Definition: vraysdk.hpp:3465
float anim_offset
animated proxy initial frame offset
Definition: vraysdk.hpp:3461
Controls what the buffer returned by getData() contains.
Definition: vraysdk.hpp:2563
Plugin * alphaChannelPlugin
The plugin describing the alpha channel render element. Can be NULL.
Definition: vraysdk.hpp:2573
bool rgbOrder
true - RGB order, false - BGR order
Definition: vraysdk.hpp:2576
bool useDefaultAlpha
Use any existing alpha render channel.
Definition: vraysdk.hpp:2574
PixelFormat format
The desired pixel format.
Definition: vraysdk.hpp:2575
int layerIndex
For multi-layer elements only. The Cryptomatte layer index (between 0 and num_level/2)....
Definition: vraysdk.hpp:2578
ImageRegion * region
An optional image region rectange; NULL means the whole image.
Definition: vraysdk.hpp:2577
This structure is used to return information about a particular channel in the VFB.
Definition: vraysdk.hpp:2516
BinaryFormat binaryFormat
The channel binary format.
Definition: vraysdk.hpp:2518
Type type
The channel type/alias.
Definition: vraysdk.hpp:2519
const char * name
The name of the channel as it appears in the VFB.
Definition: vraysdk.hpp:2517
Definition: vraysdk.hpp:5734
int rgnLeft
Render region left.
Definition: vraysdk.hpp:5748
int rgnTop
Render region top.
Definition: vraysdk.hpp:5749
float cropRgnHeight
Crop region height.
Definition: vraysdk.hpp:5741
int bmpHeight
Output bitmap height. This is the sampling resolution, not the file resolution.
Definition: vraysdk.hpp:5737
int imgHeight
Output image height.
Definition: vraysdk.hpp:5745
float cropRgnLeft
Crop region left.
Definition: vraysdk.hpp:5738
int rgnHeight
Render region height.
Definition: vraysdk.hpp:5751
float cropRgnTop
Crop region top.
Definition: vraysdk.hpp:5739
int bmpWidth
Output bitmap width. This is the sampling resolution, not the file resolution.
Definition: vraysdk.hpp:5736
int imgWidth
Output image width.
Definition: vraysdk.hpp:5744
int rgnWidth
Render region width.
Definition: vraysdk.hpp:5750
int bitmask
Bitmask which indicates which part to be set or has been set.
Definition: vraysdk.hpp:5759
float cropRgnWidth
Crop region width.
Definition: vraysdk.hpp:5740
Combines various options required for the rendering process.
Definition: vraysdk.hpp:3593
bool showVfbButtonCopyToHostFrameBuffer
show "Duplicate to host frame buffer" button
Definition: vraysdk.hpp:3624
bool showVfbButtonIPRUpdate
show "Update IPR" button
Definition: vraysdk.hpp:3623
bool showVfbAddDenoiserREToSceneButton
show "Add Denoiser to the scene" button
Definition: vraysdk.hpp:3626
std::string vfbLanguage
[OPTIONAL] A language code string telling the VFB which builtin language to load (from VRay::Language...
Definition: vraysdk.hpp:3636
bool showVfbAddLightMixREToSceneButton
show "Add LightMix to the scene" button
Definition: vraysdk.hpp:3625
ThemeStyle vfbDrawStyle
specifies VFB drawing style
Definition: vraysdk.hpp:3604
bool useVfbLog
use built-in VFB log
Definition: vraysdk.hpp:3618
bool noRenderLicensePreCheck
if set appsdk will not check for render node license before rendering is started
Definition: vraysdk.hpp:3611
bool showVfbButtonTestResolution
show "Test Resolution" button
Definition: vraysdk.hpp:3621
bool enableVfbPlugins
Allow the VFB to load plugins.
Definition: vraysdk.hpp:3619
bool showVfbButtonIPRPause
show "Pause IPR" button
Definition: vraysdk.hpp:3622
ThemeStyle
Specifies the drawing style of the VFB widgets.
Definition: vraysdk.hpp:3596
bool hideToSceneButton
hide Light Mix To Scene button
Definition: vraysdk.hpp:3617
bool useDefaultVfbTheme
enabled by default. If set to false the parent application theme is inherited
Definition: vraysdk.hpp:3612
bool enableFrameBuffer
true to enable the frame buffer
Definition: vraysdk.hpp:3609
bool showVfbButtonDebugShading
show "IPR Debug Shading" button
Definition: vraysdk.hpp:3620
bool dockFrameBuffer
dock V-Ray Frame Buffer window
Definition: vraysdk.hpp:3616
bool allowInvalidCharactersInPluginNames
allow invalid characters in plugin names
Definition: vraysdk.hpp:3615
std::string pluginLibraryPath
[OPTIONAL] specifies additional, non-default plugin library paths to load vray_*.dll (libvray_*....
Definition: vraysdk.hpp:3634
bool showFrameBuffer
true to initially show the frame buffer
Definition: vraysdk.hpp:3610
bool previewRenderer
optimize the renderer for small preview purposes
Definition: vraysdk.hpp:3614
bool showVfbButtonInteractiveStart
show "Start IPR" button
Definition: vraysdk.hpp:3613
Definition: vraysdk.hpp:3476
std::string outputFileName
Definition: vraysdk.hpp:3479
bool compressProgressiveFiles
Set to false to disable compression. (These files can get quite large)
Definition: vraysdk.hpp:3482
int progressiveAutoSaveSeconds
Definition: vraysdk.hpp:3492
bool deleteResumableFileOnSuccess
Definition: vraysdk.hpp:3487
See encodeScannedMaterialParams() and getScannedMaterialUILicense()
Definition: vraysdk.hpp:3973
This structure contains the parameters used in the rendering of the scanned materials.
Definition: vraysdk.hpp:3988
int dome
the mapping channel
Definition: vraysdk.hpp:4034
int triplanar
Clear coat multiplier.
Definition: vraysdk.hpp:4056
float ccmul
This parameter modifies the clear coat reflection to metalic behavior, i.e., it modulates the reflect...
Definition: vraysdk.hpp:4055
float cutoff
the reflection rays count, the UI contains subdivision parameter, this must be seto to the square val...
Definition: vraysdk.hpp:4032
int noTransp
the minimal path length of a reflected ray that allows to use GI, if the path is shorter "fear" ray t...
Definition: vraysdk.hpp:4047
float sceneScale
used when the plain option is set to PL_SCRAMBLE, determines the size of the pieces that are continuo...
Definition: vraysdk.hpp:4038
Bool noCachedGI
the output color space (Not used anymore, replaced by the vray color space)
Definition: vraysdk.hpp:4053
ColorSpace
Definition: vraysdk.hpp:4009
@ CS_PP
adobe rgb
Definition: vraysdk.hpp:4012
@ CS_ADOBE
sRGB - linear
Definition: vraysdk.hpp:4011
float saturation
inverse gamma
Definition: vraysdk.hpp:4023
Transform uvtrans
general result multiplier (tint)
Definition: vraysdk.hpp:4027
int noPrimGI
edge displacement, used to prevent the flat appearance of the edges
Definition: vraysdk.hpp:4045
MapChannelsMask mapChBitmask
multiplies the transparency (only the transparency, the translucency remains!) (Not used anymore)
Definition: vraysdk.hpp:4049
float fltStrength
strength of the replace paint effect
Definition: vraysdk.hpp:4051
int disablewmap
displacement/paralax multiplier
Definition: vraysdk.hpp:4025
float sssmul
Clear coat glossiness variation, the measured value is kept in presets.scratchdens.
Definition: vraysdk.hpp:4061
Triplanar
Definition: vraysdk.hpp:4015
@ TP_RNDOFFS
Enable triplanar.
Definition: vraysdk.hpp:4017
@ TP_RNDROT
Enable random offset.
Definition: vraysdk.hpp:4018
float retrace
the primary rays are rendered without using the GI engine (better acuracity, lower speed) (Not used a...
Definition: vraysdk.hpp:4046
ColorSpace clrSpace
strength of the filter
Definition: vraysdk.hpp:4052
int twoside
uniform reflections distribution, when nonzero the importance sampling is not used
Definition: vraysdk.hpp:4043
int displace
same as two side in the standard material
Definition: vraysdk.hpp:4044
int fasttrans
Controls the triplanar mapping, combination of enum Triplanar flags.
Definition: vraysdk.hpp:4057
int nsamples
the z value of the view vector below which bump is gradualy applied
Definition: vraysdk.hpp:4031
MapChannels
Definition: vraysdk.hpp:3996
@ VRSM_FILTER
the color of the material
Definition: vraysdk.hpp:3998
@ VRSM_CCMULT
general color multiplier
Definition: vraysdk.hpp:3999
float paintStrength
bitmask for the maps used in the rendering
Definition: vraysdk.hpp:4050
MapChannelsMask
These values can be combined. Each bit enables the corresponding feature.
Definition: vraysdk.hpp:4003
float transpMul
force opaque rendering even if backside lighting is present.
Definition: vraysdk.hpp:4048
Plain
Definition: vraysdk.hpp:3989
@ PL_HMGSYM
the material is homogenous and potentially anisotropic, an averaged brdf is used instead texture,...
Definition: vraysdk.hpp:3992
@ PL_TRIPLANAR
the material is homogenous and isotropic , no uv mapping is needed
Definition: vraysdk.hpp:3993
@ PL_HMG
no plain strategy
Definition: vraysdk.hpp:3991
int mapChannel
stop of the indirect ray if the total weight is below this value
Definition: vraysdk.hpp:4033
float multdirect
prevent double lighting by direct and reflection rays (not used anymore)
Definition: vraysdk.hpp:4035
float bumpstart
bump multiplier for the inclined views
Definition: vraysdk.hpp:4030
float scrambleSize
limit for the tracing recursion
Definition: vraysdk.hpp:4037
float ccglossyvar
Clear coat glossiness, the measured value is kept in presets.specbell.
Definition: vraysdk.hpp:4060
int usemap
uv mapping transformation matrix
Definition: vraysdk.hpp:4028
float ccbump
clear coat highlights
Definition: vraysdk.hpp:4041
float bumpmul
not used
Definition: vraysdk.hpp:4029
int traceDepth
multipliers for different parts of the light (not used anymore)
Definition: vraysdk.hpp:4036
ScannedMaterialParams()
sss thickness multiplier
int cchlight
the clear coat ior, used for carpaints and other materials with thin refractive layer
Definition: vraysdk.hpp:4040
Color filter
disable use of the enlargement, directly the original small sample is used for rendering (Not used an...
Definition: vraysdk.hpp:4026
float ccmetalrefl
rendering without using the GI engine at all (but most scenes have low scanned materials in count)
Definition: vraysdk.hpp:4054
int BWforGI
Used in volumetric translucency calculation, switches between two models of calculation,...
Definition: vraysdk.hpp:4058
float ccior
the size of one scene unit in cm
Definition: vraysdk.hpp:4039
int unfRefl
used to make the clear coat not perfect
Definition: vraysdk.hpp:4042
float invgamma
this option modifies the rendering in order to improve the result for materials without large details
Definition: vraysdk.hpp:4022
float ccglossy
The material is represented as non colored for the GI rays, used to prevent the color bleeding when t...
Definition: vraysdk.hpp:4059
Definition: vraysdk.hpp:4102
float specbell
Controls how to use the smooth brdf model.
Definition: vraysdk.hpp:4123
int plain
ClearCoat index of reflection.
Definition: vraysdk.hpp:4109
float shdmul
Height multiplier for self shadowing.
Definition: vraysdk.hpp:4120
float fuzzy
Controls the pure reflective behavior for inclined angles, a feature typical for brushed metal.
Definition: vraysdk.hpp:4127
float bumpstart
Bump multiplier for the inclined views.
Definition: vraysdk.hpp:4111
float topvLs_A
Used mostly with top view fabrics, modifies the rendering of the inclined views making them blurred a...
Definition: vraysdk.hpp:4128
float bumpmul
Plain materials strategy.
Definition: vraysdk.hpp:4110
float lfsizecm
value used to control the function converting translucency to transparency
Definition: vraysdk.hpp:4136
float free7
CC specular multiplier (Not used anymore)
Definition: vraysdk.hpp:4125
float orgglvar
the clear coat glossiness the inverse angle deviation width (60 is one degree), since 20....
Definition: vraysdk.hpp:4115
float specmul
CC specular highlights, inverse bell width (60 is one degree)
Definition: vraysdk.hpp:4124
float ccmetalrefl
Multiplier of the indirect light, used to handle the fluorescent materials by putting value below 1 i...
Definition: vraysdk.hpp:4132
ScannedMaterialPreset()
The large feature map physical size.
float orggls
Clear coat noise-like bump amount (there is separate hmap bump)
Definition: vraysdk.hpp:4114
int forcebrdf
Used to render materials with sharp sparks, a procedural map with relative size this param is used to...
Definition: vraysdk.hpp:4122
float indmul
When flakes is nonzero (spark mode) this parameter specifies to not scramble the uv coordinates.
Definition: vraysdk.hpp:4131
int triplanar
The sample thickness in mm, used to introduce alpha/translucency correction of thick materials.
Definition: vraysdk.hpp:4134
int keepflakesuv
Not used anymore (set to 1)
Definition: vraysdk.hpp:4130
float topvLs_B
Used in top view materials to control the light direction correction.
Definition: vraysdk.hpp:4129
int flakes
Brightness multiplier for self shadowing.
Definition: vraysdk.hpp:4121
float depthmul
The z-value of the view vector below which bump is gradualy applied.
Definition: vraysdk.hpp:4112
float transpf
used to force triplanar mapping when certain customer has old vray (luxottica)
Definition: vraysdk.hpp:4135
SmoothModelFlags
Definition: vraysdk.hpp:4103
@ SMF_PS
when set, the BRDF is "forced"
Definition: vraysdk.hpp:4105
@ SMF_FORCE
used in forcebrdf
Definition: vraysdk.hpp:4104
float shdhmul
Clear coat effect multiplier.
Definition: vraysdk.hpp:4119
float ccbump
Displacement multiplier.
Definition: vraysdk.hpp:4113
float free4
the material thumnail relative offset - this is kind of a hack, using the place of an old obsolete pa...
Definition: vraysdk.hpp:4117
int thumbpos
the clearcoat glossiness variation (0-none 1-the shallow anglesare glossy), since 20....
Definition: vraysdk.hpp:4116
The necessary parameters for reading the data in the preset config file (.mbc)
Definition: vraysdk.hpp:8997
std::string fileName
Scatter preset config file (.mbc)
Definition: vraysdk.hpp:8998
float unitRescale
Rescale to specific callers units setup, e.g. the default Cosmos asset units are centimeters,...
Definition: vraysdk.hpp:9000
Plugin scatterPlugin
A GeomScatter plugin instance to be filled by the Scatter preset config.
Definition: vraysdk.hpp:8999
bool isYAxisUp
If true - process as if Y is up axis and otherwise default to Z.
Definition: vraysdk.hpp:9001
Definition: vraysdk.hpp:10501
Object material
Material used for the particle, can be empty/invalid if no material override present.
Definition: vraysdk.hpp:10511
Transform transform
Particle transform.
Definition: vraysdk.hpp:10508
Object node
Particle object, always valid (unless the Particle is invalid).
Definition: vraysdk.hpp:10505
Definition: vraysdk.hpp:10318
CoordinateSystem
The coordinate system in which the preview will be loaded.
Definition: vraysdk.hpp:10331
CacheType
Definition: vraysdk.hpp:10319
Definition: vraysdk.hpp:10241
Definition: vraysdk.hpp:10246
A helper struct with info regarding file exports for plugins of a specified type.
Definition: vraysdk.hpp:2651
std::string fileNameSuffix
Substring to append at the end of the common part of the filename passed to the export function.
Definition: vraysdk.hpp:2655
std::string pluginType
Allowed types: "view", "lights", "geometry", "nodes", "materials", "textures", "bitmaps",...
Definition: vraysdk.hpp:2653
Describes a sub-sequence of an animation range at regular steps (usually step=1)
Definition: vraysdk.hpp:2659
Structure representing an enumerated item with a value and a name.
Definition: vraysdk.hpp:9408
int value
The integer value of the enum item.
Definition: vraysdk.hpp:9409
std::string name
The string name of the enum item.
Definition: vraysdk.hpp:9410
Describes a dependency between two plugin instances.
Definition: vraysdk.hpp:10609
PluginRef toPlugin
This plugin is used by the 'fromPlugin'.
Definition: vraysdk.hpp:10612
std::string fromProperty
The 'fromPlugin' property which uses 'toPlugin'.
Definition: vraysdk.hpp:10611
Plugin fromPlugin
This plugin uses the other plugin, 'toPlugin'.
Definition: vraysdk.hpp:10610
Definition: vraysdk.hpp:5785
bool skipAllSuccessorsOfCurrentPlugin
Definition: vraysdk.hpp:5798
bool overwriteExistingPlugin
Definition: vraysdk.hpp:5805
bool skipOnlyCurrentPlugin
Definition: vraysdk.hpp:5794
std::string name
Definition: vraysdk.hpp:5789
Describes a UI font.
Definition: vraysdk.hpp:396
StampFontFamily fontFamily
Font family.
Definition: vraysdk.hpp:398
char fontFace[100]
Name of the font face ("Arial" etc).
Definition: vraysdk.hpp:401
StampFontWeight fontWeight
Font weight.
Definition: vraysdk.hpp:400
int pointSize
Size of text, in points.
Definition: vraysdk.hpp:397
StampFontStyle fontStyle
Font style.
Definition: vraysdk.hpp:399
A struct that encapsulates the export scene options.
Definition: vraysdk.hpp:5628
bool appendFrameSuffix
valid only when currentFrameOnly=true - appends a %04d frame number to the file name
Definition: vraysdk.hpp:5636
std::string sceneBasePath
Optional absolute scene base path that can be used for resolving relative paths for the ....
Definition: vraysdk.hpp:5670
bool renderElementsSeparateFolders
controls the default value of SettingsOutput.relements_separateFolders
Definition: vraysdk.hpp:5632
bool compressed
enables zlib compression of large data arrays; requires hexArrays==true
Definition: vraysdk.hpp:5629
bool stripPaths
If enabled, the paths for bitmap textures and other external files are stripped from the file so that...
Definition: vraysdk.hpp:5637
bool printHeader
whether to write the comment section with version and time info
Definition: vraysdk.hpp:5633
std::vector< std::string > additionalIncludeFiles
Optional list of files to #include at the end of the main vrscene.
Definition: vraysdk.hpp:5655
bool hexTransforms
transforms will be encoded in hex (mainly useful with large instancers)
Definition: vraysdk.hpp:5631
std::vector< Plugin > pluginExportList
If this is not empty, only these plugins will be exported instead of all plugins in the scene.
Definition: vraysdk.hpp:5652
double rightInterval
Definition: vraysdk.hpp:5646
bool incremental
valid only when currentFrameOnly=true && appendFrameSuffix=false - set to true to incrementally appen...
Definition: vraysdk.hpp:5635
double leftInterval
Definition: vraysdk.hpp:5642
std::vector< SubFileInfo > subFileInfos
A list of files to split the scene into, based on plugin type. See SubFileInfo struct comments.
Definition: vraysdk.hpp:5649
bool hexArrays
data arrays will be encoded in hex
Definition: vraysdk.hpp:5630
int vrfilesComputeHashes
True if MD5 and SHA256 hashes should be computed and written in the .vrfiles file for each resolved a...
Definition: vraysdk.hpp:5672
int vrfilesExport
Enable or disable vrfiles file writing.
Definition: vraysdk.hpp:5668
std::string hostAppString
An optional string identifying the host application, version, etc.
Definition: vraysdk.hpp:5658
int vrdataSmallBufferSizeLimit
Set a limit for the min size of the buffer. If the buffer is smaller it is not written to the vrdata ...
Definition: vraysdk.hpp:5663
bool currentFrameOnly
if true only the current keyframe is exported, otherwise the whole timeline
Definition: vraysdk.hpp:5634
bool vrdataExport
Enable or disable vrdata file writing.
Definition: vraysdk.hpp:5661
int vrdataFileSizeLimitMiB
Limit the size of the vrdata file. If this limit is reached another file is started.
Definition: vraysdk.hpp:5665
Definition: vraysdk.hpp:548
static VRayImage * createFromPng(const void *buffer, size_t size)
Takes raw PNG contents including header to create a copy of the data in a new VRayImage.
VRayImage * getFitOut(int width, int height) const
static VRayImage * createFromBmp(const VRayRenderer &renderer, const void *buffer, size_t size=0)
This is an overloaded member function, provided for convenience. It differs from the above function o...
Png * compressToPng(size_t &size, bool preserveAlpha=false) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
AColor * getPixelData()
Returns a direct pointer to the image contents for in-place modification.
Jpeg * compressToJpeg(size_t &size, int quality=0) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
Bmp * compressToBmp(bool preserveAlpha=false, bool swapChannels=false) const
Returns a new BMP object with a copy of this image's contents. Caller has to delete it.
VRayImage * getResizedCropped(int srcX, int srcY, int srcWidth, int srcHeight, int dstWidth, int dstHeight) const
Returns a new cropped and then resized/rescaled image. Caller has to delete it.
Bmp * compressToBmp(size_t &size, bool preserveAlpha=false, bool swapChannels=false) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
static VRayImage * createFromJpeg(const VRayRenderer &renderer, const void *buffer, size_t size)
This is an overloaded member function, provided for convenience. It differs from the above function o...
VRayImage * getCropped(int x, int y, int width, int height) const
Returns a new cropped image. Caller has to delete it.
VRayImage * getResized(int width, int height) const
Returns a new resized/rescaled image. Caller has to delete it.
VRayImage * getDownscaled(int width, int height) const
AColor calculateWhiteBalanceMultiplier(WhiteBalanceMode mode) const
Returns a color multiplier to pass to mulColor function.
static void loadSize(const char *fileName, int &width, int &height)
VRayImage * getDownscaledCropped(int srcX, int srcY, int srcWidth, int srcHeight, int dstWidth, int dstHeight) const
IntList_DataType
These correspond to (some of) the values of RawBitmapBuffer::pixels_type.
Definition: vraysdk.hpp:602
@ rgba_float
8-bit int BGRA
Definition: vraysdk.hpp:604
@ bgr_byte
16-bit unsigned int RGBA
Definition: vraysdk.hpp:606
@ rgba_16bit
32-bit float RGBA (sRGB or gamma won't be applied automatically)
Definition: vraysdk.hpp:605
bool setGamma(float gamma)
DrawMode
Definition: vraysdk.hpp:658
@ DRAW_MODE_BLEND_FAST
Alpha-blend using only the source image alpha but keep the original destination image alpha unchanged...
Definition: vraysdk.hpp:660
@ DRAW_MODE_COPY
Overwrite destination image pixels with the source image pixels.
Definition: vraysdk.hpp:659
VRayImage * getFitIn(int width, int height) const
const AColor * getPixelData(size_t &count) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
static VRayImage * load(const std::string &fileName)
This is an overloaded member function, provided for convenience. It differs from the above function o...
static VRayImage * createFromBmp(const void *buffer, size_t size=0)
Takes raw BMP contents including header to create a copy of the data in a new VRayImage.
Bmp * compressToBmp(size_t &size, const VRayRenderer &renderer, bool preserveAlpha=false, bool swapChannels=false) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
Jpeg * compressToJpeg(size_t &size, const VRayRenderer &renderer, int quality=0) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
bool changeGamma(float gamma)
static VRayImage * createFromJpeg(const void *buffer, size_t size)
Takes raw JPEG contents including header to create a copy of the data in a new VRayImage.
static void loadSize(const std::string &fileName, int &width, int &height)
This is an overloaded member function, provided for convenience. It differs from the above function o...
Png * compressToPng(size_t &size, const VRayRenderer &renderer, bool preserveAlpha=false) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
Png * compressToPng(bool preserveAlpha=false) const
Returns a new PNG object with a compressed copy of this image's contents. Caller has to delete it.
AColor * getPixelData(size_t &count)
This is an overloaded member function, provided for convenience. It differs from the above function o...
Png * compressToPng(const VRayRenderer &renderer, bool preserveAlpha=false) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
Bmp * compressToBmp(const VRayRenderer &renderer, bool preserveAlpha=false, bool swapChannels=false) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
Jpeg * compressToJpeg(const VRayRenderer &renderer, int quality=0) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
bool draw(const VRayImage *image, int x, int y, DrawMode mode=DRAW_MODE_COPY)
VRayImage * getCutIn(int width, int height) const
const AColor * getPixelData() const
Returns a direct pointer to the image contents for reading.
static VRayImage * load(const char *fileName)
bool changeSRGB(bool apply=true)
static VRayImage * createFromPng(const VRayRenderer &renderer, const void *buffer, size_t size)
This is an overloaded member function, provided for convenience. It differs from the above function o...
Jpeg * compressToJpeg(int quality=0) const
Returns a new JPEG object with a compressed copy of this image's contents. Caller has to delete it.
static VRayImage * createFromRawData(const void *buffer, size_t size, IntList_DataType dataType, int width, int height)
Takes raw pixel contents to create a copy of the data in a new VRayImage.
MemoryBuffer * toBitmapData(size_t &size, bool preserveAlpha=false, bool swapChannels=false, bool reverseY=false, int stride=0, int alphaValue=-1) const
The settings passed to the VRayRenderer::setVRayProfiler() interface.
Definition: vraysdk.hpp:3692
std::string outputDirectory
The directory where the profiler reports will be created. If nullptr is passed, temp directory is use...
Definition: vraysdk.hpp:3709
std::string productName
Name of the host product.
Definition: vraysdk.hpp:3711
FileType
Definition: vraysdk.hpp:3702
@ FileType_JSON
This is the raw profiler output, which is passed when an HTML file could not be generated.
Definition: vraysdk.hpp:3704
@ FileType_HTML
An html output file. Needs a valid htmlTemplatePath or valid installation of the default path.
Definition: vraysdk.hpp:3703
int maxDepth
The maximum ray bounces that will be profiled. Range [1, 8].
Definition: vraysdk.hpp:3708
Mode
Definition: vraysdk.hpp:3693
@ Simple
Do not use, this mode will be mapped to Full mode.
@ Process
Only profile the PREPARING state (e.g., plugin initialization, geometry compilation,...
@ Full
Profile the whole rendering process.
std::string htmlTemplatePath
The full path to the profiler html template. If this is left empty, the default location will be sear...
Definition: vraysdk.hpp:3710
Mode mode
Specifies the operational mode of the Profiler.
Definition: vraysdk.hpp:3707
std::string productVersion
Version of the host product.
Definition: vraysdk.hpp:3712
std::string sceneName
Name of the scene that will be profiled. Used as a suffix to the generated filename.
Definition: vraysdk.hpp:3713
Definition: vraysdk.hpp:7391
Definition: vraysdk.hpp:7401
Definition: vraysdk.hpp:7415
Definition of one changed property for LiveLink scene updates.
Definition: vraysdk.hpp:7377
Definition: vraysdk.hpp:8821
void endDurationEvent(const char *name, int threadIndex=0)
void startDurationEvent(const char *name, int threadIndex=0)
void writeAndFreeData()
Explicitly writes the profiler data, if not already written and deinitializes the profiler.
bool isManual()
Returns true if the profiler was initialized manually (through profiler.initializeManually,...
void initializeManually(const VRayProfilerSettings &settings)
Definition: vraysdk.hpp:107
General purpose vector in 3D space using float32.
Definition: vraysdk.hpp:831
float lengthSqr(const Vector &a) noexcept
Definition: vraysdk.hpp:1094
Vector & makeZero(void) noexcept
Sets the components of the vector.
Definition: vraysdk.hpp:860
float length(const Vector &a) noexcept
Definition: vraysdk.hpp:1088
Vector & set(T1 x_, T2 y_, T3 z_) noexcept
Sets the components of the vector.
Definition: vraysdk.hpp:854
Vector rotate(const Vector &v, const Vector &axis) noexcept
Definition: vraysdk.hpp:1113
float length(void) const noexcept
Returns the length of the vector.
Definition: vraysdk.hpp:929
float & operator[](const int index) noexcept
Returns the i-th component (0 for x, 1 for y, 2 for z)
Definition: vraysdk.hpp:919
Vector & operator-=(const Vector &other) noexcept
Subtracts the components of the given vector.
Definition: vraysdk.hpp:872
double mixed(const Vector &a, const Vector &b, const Vector &c) noexcept
Definition: vraysdk.hpp:1073
Vector mul(const Vector &a, const Vector &b) noexcept
Definition: vraysdk.hpp:1044
Vector & operator*=(int factor) noexcept
Multiplies all components by the given number.
Definition: vraysdk.hpp:878
Vector normalize(const Vector &a) noexcept
Definition: vraysdk.hpp:1082
Vector & operator/=(int divisor) noexcept
Divides all components by the given number.
Definition: vraysdk.hpp:896
void rotate(const Vector &axis) noexcept
Rotates the vector along the given axis. The length of the axis is the tangent of the angle of rotati...
Vector operator-(void) const noexcept
Reverses the sign of all components.
Definition: vraysdk.hpp:914
float lengthSqr(void) const noexcept
Returns the squared length of the vector.
Definition: vraysdk.hpp:934
Vector & operator+=(const Vector &other) noexcept
Adds the components of the given vector.
Definition: vraysdk.hpp:866
The information about a voxel.
Definition: vraysdk.hpp:2793
Color wireColor
the diffuse (wire) color of the voxel
Definition: vraysdk.hpp:2794
Bool smoothed
true, if the voxel should be rendered with smoothed normals
Definition: vraysdk.hpp:2795
Bool flipNormals
true, if the geometric normals should be flipped
Definition: vraysdk.hpp:2796
Definition: vraysdk.hpp:792
bool multipleFiles
unused
Definition: vraysdk.hpp:796
bool multiChannel
create a single multi-channel file if the file format supports it
Definition: vraysdk.hpp:804
bool velocityZeroBased
unused
Definition: vraysdk.hpp:803
bool skipRGB
do not write the RGB channel into a separate file
Definition: vraysdk.hpp:801
bool frameNumber
the current frame number will be appended to the file name(s)
Definition: vraysdk.hpp:798
bool applyColorCorrections
bake the VFB corrections to the output file
Definition: vraysdk.hpp:805
bool noAlpha
do not write the alpha channel together with the color data
Definition: vraysdk.hpp:799
bool singleChannel
only a single channel is written to the file (the current one in vfb)
Definition: vraysdk.hpp:800
bool skipAlpha
do not write the alpha channel into a separate file
Definition: vraysdk.hpp:797
bool writeIntegerIDs
write to EXR as integer data
Definition: vraysdk.hpp:802
Definition: vraysdk.hpp:3378
static double None()
The None value (double) of the TiMe union In case used in Plugin::setValue(), the given plugin proper...
Definition: vraysdk.hpp:3397
TiMe(double time)
Constructs a TiMe object from a given time (double)
Definition: vraysdk.hpp:3387
static double Default()
Definition: vraysdk.hpp:3393
TiMe()
Default constructor.
Definition: vraysdk.hpp:3385
Definition: vraysdk.hpp:3524