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)
35#ifdef APPSDK_QT_NAMESPACE
36namespace APPSDK_QT_NAMESPACE {
40#define APPSDK_QT_NAMESPACE
44#if defined(VRAY_ALLOW_UNSAFE_NATIVE_HANDLE) || (!defined(_WIN32) && !defined(__APPLE__))
45 typedef void* NativeWindowHandle;
46 typedef void* NativeWidgetHandle;
50 typedef struct HWND__ *HWND;
52 typedef HWND NativeWindowHandle;
53 typedef HWND NativeWidgetHandle;
56 #define VRAY_FORWARD_DECLARE_OBJC_CLASS(classname) @class classname
58 #define VRAY_FORWARD_DECLARE_OBJC_CLASS(classname) typedef struct objc_object classname
60 VRAY_FORWARD_DECLARE_OBJC_CLASS(NSWindow);
61 typedef NSWindow *NativeWindowHandle;
62 VRAY_FORWARD_DECLARE_OBJC_CLASS(NSView);
63 typedef NSView *NativeWidgetHandle;
70 inline float linear_to_srgb(
float x) {
71 if (x <= 0.0031308f) {
74 x = 1.055f*powf(x, 1.0f/2.4f)-0.055f;
78 inline float srgb_to_linear(
float x) {
82 x = powf((x+0.055f)/1.055f, 2.4f);
87 inline float interpolate(
float x,
float a,
float b)
noexcept {
88 return (b - a) * x + a;
94# pragma warning(disable: 4201)
98# define VRAY_DEPRECATED(msg) __declspec(deprecated(msg))
101# if defined(__clang__) || COMPILER_VERSION >= 450
102# define VRAY_DEPRECATED(msg) __attribute__((deprecated(msg)))
104# define VRAY_DEPRECATED(msg) __attribute__((deprecated))
108#ifdef VRAY_SDK_INTEROPERABILITY
114 struct TraceTransform;
115 template<
class T>
struct PtrArray;
116 typedef PtrArray<int> IntRefList;
117 typedef PtrArray<float> FloatRefList;
118 typedef PtrArray<Vector> VectorRefList;
119 typedef PtrArray<Color> ColorRefList;
120 typedef PtrArray<TraceTransform> TransformRefList;
121 typedef PtrArray<CharString> CharStringRefList;
122 typedef PtrArray<Value> ValueRefList;
137 RENDERING_AWAITING_CHANGES,
140 enum AddHostsResult {
141 FAILED_TO_RESOLVE = -2,
143 FAILED_TO_CONNECT = 0,
144 SUCCESSFULLY_ADDED = 1,
145 SUCCESS_BUT_NO_WORK = 2,
165 TYPE_TEXTUREFLOAT = 13,
166 TYPE_TEXTUREINT = 14,
167 TYPE_TEXTUREVECTOR = 15,
168 TYPE_TEXTUREMATRIX = 16,
169 TYPE_TEXTURETRANSFORM = 17,
172 TYPE_GENERAL_LIST = TYPE_LIST,
175 TYPE_TYPED_LIST_BASE = 100,
176 TYPE_INT_LIST = TYPE_TYPED_LIST_BASE + TYPE_INT,
177 TYPE_FLOAT_LIST = TYPE_TYPED_LIST_BASE + TYPE_FLOAT,
178 TYPE_DOUBLE_LIST = TYPE_TYPED_LIST_BASE + TYPE_DOUBLE,
179 TYPE_BOOL_LIST = TYPE_TYPED_LIST_BASE + TYPE_BOOL,
180 TYPE_VECTOR_LIST = TYPE_TYPED_LIST_BASE + TYPE_VECTOR,
181 TYPE_COLOR_LIST = TYPE_TYPED_LIST_BASE + TYPE_COLOR,
182 TYPE_ACOLOR_LIST = TYPE_TYPED_LIST_BASE + TYPE_ACOLOR,
183 TYPE_MATRIX_LIST = TYPE_TYPED_LIST_BASE + TYPE_MATRIX,
184 TYPE_TRANSFORM_LIST = TYPE_TYPED_LIST_BASE + TYPE_TRANSFORM,
185 TYPE_STRING_LIST = TYPE_TYPED_LIST_BASE + TYPE_STRING,
186 TYPE_PLUGIN_LIST = TYPE_TYPED_LIST_BASE + TYPE_PLUGIN,
187 TYPE_TEXTURE_LIST = TYPE_TYPED_LIST_BASE + TYPE_TEXTURE,
188 TYPE_TEXTUREFLOAT_LIST = TYPE_TYPED_LIST_BASE + TYPE_TEXTUREFLOAT,
189 TYPE_TEXTUREINT_LIST = TYPE_TYPED_LIST_BASE + TYPE_TEXTUREINT,
190 TYPE_TEXTUREVECTOR_LIST = TYPE_TYPED_LIST_BASE + TYPE_TEXTUREVECTOR,
191 TYPE_TEXTUREMATRIX_LIST = TYPE_TYPED_LIST_BASE + TYPE_TEXTUREMATRIX,
192 TYPE_TEXTURETRANSFORM_LIST = TYPE_TYPED_LIST_BASE + TYPE_TEXTURETRANSFORM,
195 TYPE_OUTPUTTEXTURE = 1000,
196 TYPE_OUTPUTTEXTUREFLOAT = 1001,
197 TYPE_OUTPUTTEXTUREINT = 1002,
198 TYPE_OUTPUTTEXTUREVECTOR = 1003,
199 TYPE_OUTPUTTEXTUREMATRIX = 1004,
200 TYPE_OUTPUTTEXTURETRANSFORM = 1005,
202 TYPE_UNSPECIFIED = 10000,
215 enum LicenseUserStatus :
int {
219 ActiveUserPresent = 3,
225 ImagePass_LightCache = 1,
226 ImagePass_IrradianceMap = 2,
230 enum DefaultsPreset {
239 enum VFBRenderElementType {
240 renderElementType_lightMix=0,
241 renderElementType_denoiser,
243 renderElementType_last
246 enum VFBMouseButton {
247 mouseButton_left = 1,
248 mouseButton_right = 2,
256 ImageRegion(
int x = 0,
int y = 0,
int w = 0,
int h = 0) {
260 void set(
int x,
int y,
int w,
int h) {
275 void setWidth(
int width) {
279 void setHeight(
int height) {
291 int getWidth()
const {
295 int getHeight()
const {
300 typedef unsigned long long InstanceId;
301 typedef unsigned long long PluginTypeId;
302 constexpr InstanceId NO_ID = InstanceId(-1);
303 constexpr PluginTypeId NO_TYPE_ID = PluginTypeId(-1);
306 static_assert(
sizeof(InstanceId) == 8,
"InstanceId should be 8 bytes long");
307 static_assert(
sizeof(PluginTypeId) == 8,
"PluginTypeId should be 8 bytes long");
309 constexpr int INSTANCE_ID_BITS = 48;
313 inline InstanceId combineInstanceIdAndTypeIndex(InstanceId
id,
int typeIdIdx) {
314 return (
id & ((InstanceId(1) << INSTANCE_ID_BITS) - 1)) | (InstanceId(typeIdIdx) << INSTANCE_ID_BITS);
318 typedef int LayerUID;
319 const LayerUID NO_LAYER_ID = -1;
322 namespace VFBLayerProperty {
460 typedef unsigned char byte;
461 typedef signed char sbyte;
473 typedef std::vector<int> IntList;
474 typedef std::vector<float> FloatList;
475 typedef std::vector<Color> ColorList;
476 typedef std::vector<Vector> VectorList;
477 typedef std::vector<Transform> TransformList;
478 typedef std::vector<Value> ValueList;
479 typedef std::vector<std::string> StringList;
480 typedef std::vector<Plugin> PluginList;
490 const void* getData()
const {
491 return static_cast<const void*
>(
this);
494 return static_cast<void*
>(
this);
496 void operator delete(
void* ptr);
506 #pragma pack(push, 1)
510 unsigned short bfType;
521 unsigned short biPlanes;
522 unsigned short biBitCount;
523 unsigned biCompression;
524 unsigned biSizeImage;
528 unsigned biClrImportant;
533 void* getPixels()
const {
537 unsigned getRowStride()
const {
538 return (getWidth()*(biBitCount/8) + 3) & ~3;
541 int getWidth()
const {
545 int getHeight()
const {
546 return abs(biHeight);
549 int getBitsPerPixel()
const {
562 static VRayImage* create(
int width,
int height);
563 void operator delete (
void *bmp);
566 int getWidth()
const;
567 int getHeight()
const;
568 bool getSize(
int& width,
int& height)
const;
633 static void loadSize(
const char* fileName,
int& width,
int& height);
635 static void loadSize(
const std::string& fileName,
int& width,
int& height);
661 enum WhiteBalanceMode {
663 WHITE_BALANCE_AVERAGE,
664 WHITE_BALANCE_WEIGHTED_AVERAGE,
665 WHITE_BALANCE_HIGHLIGHTS
685 bool addColor(
const Color& color);
686 bool addColor(
const AColor& color);
687 bool mulColor(
const AColor& color);
688 bool changeExposure(
float ev);
689 bool changeContrast(
float contrast);
692 bool saveToBmp(
const char* fileName,
bool preserveAlpha =
false,
bool swapChannels =
false)
const;
693 bool saveToBmp(
const char* fileName,
const VRayRenderer& renderer,
bool preserveAlpha =
false,
bool swapChannels =
false)
const;
694 bool saveToBmp(
const std::string& fileName,
bool preserveAlpha =
false,
bool swapChannels =
false)
const;
695 bool saveToBmp(
const std::string& fileName,
const VRayRenderer& renderer,
bool preserveAlpha =
false,
bool swapChannels =
false)
const;
697 bool saveToPng(
const char* fileName,
bool preserveAlpha =
false,
int bitsPerChannel = 8)
const;
698 bool saveToPng(
const char* fileName,
const VRayRenderer& renderer,
bool preserveAlpha =
false,
int bitsPerChannel = 8)
const;
699 bool saveToPng(
const std::string& fileName,
bool preserveAlpha =
false,
int bitsPerChannel = 8)
const;
700 bool saveToPng(
const std::string& fileName,
const VRayRenderer& renderer,
bool preserveAlpha =
false,
int bitsPerChannel = 8)
const;
702 bool saveToJpeg(
const char* fileName,
int quality = 0)
const;
703 bool saveToJpeg(
const char* fileName,
const VRayRenderer& renderer,
int quality = 0)
const;
704 bool saveToJpeg(
const std::string& fileName,
int quality = 0)
const;
705 bool saveToJpeg(
const std::string& fileName,
const VRayRenderer& renderer,
int quality = 0)
const;
707 bool saveToTiff(
const char* fileName,
int bitsPerChannel = 16)
const;
708 bool saveToTiff(
const char* fileName,
const VRayRenderer& renderer,
int bitsPerChannel = 16)
const;
709 bool saveToTiff(
const std::string& fileName,
int bitsPerChannel = 16)
const;
710 bool saveToTiff(
const std::string& fileName,
const VRayRenderer& renderer,
int bitsPerChannel = 16)
const;
712 bool saveToExr(
const char* fileName)
const;
713 bool saveToExr(
const char* fileName,
const VRayRenderer& renderer)
const;
714 bool saveToExr(
const std::string& fileName)
const;
715 bool saveToExr(
const std::string& fileName,
const VRayRenderer& renderer)
const;
720 Bmp*
compressToBmp(
size_t& size,
bool preserveAlpha =
false,
bool swapChannels =
false)
const;
757 MemoryBuffer*
toBitmapData(
size_t& size,
bool preserveAlpha =
false,
bool swapChannels =
false,
bool reverseY =
false,
int stride = 0,
int alphaValue = -1)
const;
830 enum CompressionType {
852 struct {
float x, y, z; };
861 Vector() noexcept : x(), y(), z() {}
863 template <
typename T1,
typename T2,
typename T3>
864 Vector(T1 x, T2 y, T3 z) noexcept : x(
float(x)), y(
float(y)), z(
float(z)) {}
866 template <
typename T>
867 explicit Vector(T value) noexcept : x(
float(value)), y(
float(value)), z(
float(value)) {}
869 std::string toString()
const;
872 template <
typename T1,
typename T2,
typename T3>
874 x = float(x_), y = float(y_), z = float(z_);
886 x += other.x, y += other.y, z += other.z;
892 x -= other.x, y -= other.y, z -= other.z;
898 x *= float(factor), y *= float(factor), z *= float(factor);
904 x *= factor, y *= factor, z *= factor;
910 x *= float(factor), y *= float(factor), z*=float(factor);
916 x/=float(divisor); y/=float(divisor); z/=float(divisor);
922 x/=divisor; y/=divisor; z/=divisor;
928 x/=float(divisor); y/=float(divisor); z/=float(divisor);
934 return Vector(-x, -y, -z);
949 return sqrtf(x*x + y*y + z*z);
954 return x*x + y*y + z*z;
1036 return double(a.x)*double(b.x) + double(a.y)*double(b.y) + double(a.z)*double(b.z);
1058 return Vector(a.x/b.x, a.y/b.y, a.z/b.z);
1064 return Vector(a.x*b.x, a.y*b.y, a.z*b.z);
1070 return a.x != b.x || a.y != b.y || a.z != b.z;
1077 return a.x == b.x && a.y == b.y && a.z == b.z;
1084 double(a.y)*
double(b.z) -
double(b.y)*
double(a.z),
1085 double(a.z)*
double(b.x) -
double(b.z)*
double(a.x),
1086 double(a.x)*
double(b.y) -
double(b.x)*
double(a.y)
1094 (
double(a.y)*
double(b.z) -
double(b.y)*
double(a.z))*double(c.x)+
1095 (double(a.z)*double(b.x) - double(b.z)*double(a.x))*
double(c.y)+
1096 (double(a.x)*double(b.y) - double(b.x)*double(a.y))*
double(c.z);
1114 return a.lengthSqr();
1120 float oldLen = length();
1122 Vector d = axis ^ (*this);
1125 float newLen = d.
length();
1127 (*this) = d*oldLen/newLen;
1138 inline std::ostream& operator <<(std::ostream& stream,
const Vector& vector) {
1139 stream <<
"Vector(" << vector.x <<
", " << vector.y <<
", " << vector.z <<
")";
1143 inline std::string Vector::toString()
const {
1144 std::ostringstream stream;
1146 return stream.str();
1153 struct {
float r, g, b; };
1159 Color& operator=(
const Color&)
noexcept =
default;
1160 Color& operator=(
Color&&)
noexcept =
default;
1162 Color() noexcept : r(), g(), b() {}
1164 template <
typename T1,
typename T2,
typename T3>
1165 Color(T1 r, T2 g, T3 b) noexcept : r(
float(r)), g(
float(g)), b(
float(b)) {}
1167 template <
typename T>
1168 explicit Color(
const T& value) noexcept : r(
float(value)), g(
float(value)), b(
float(value)) {}
1193 return (r + g + b) * (1.0f / 3.0f);
1198 const float RED_LUMINANCE_COMPONENT = 0.3f;
1199 const float GREEN_LUMINANCE_COMPONENT = 0.59f;
1200 const float BLUE_LUMINANCE_COMPONENT = 0.11f;
1201 return RED_LUMINANCE_COMPONENT * r + GREEN_LUMINANCE_COMPONENT * g + BLUE_LUMINANCE_COMPONENT * b;
1206 return r * r + g * g + b * b;
1211 return sqrtf(r * r + g * g + b * b);
1222 if (k == 1.0f)
return;
1223 float grey = (r + g + b) / 3.0f;
1224 r = Internal::interpolate(k, grey, r);
1225 g = Internal::interpolate(k, grey, g);
1226 b = Internal::interpolate(k, grey, b);
1233 if (k == 1.0f)
return;
1234 r = (r - middle) * k + middle;
1235 g = (g - middle) * k + middle;
1236 b = (b - middle) * k + middle;
1241 return Color(std::fmaxf(0.0f, 1.0f - r), std::fmaxf(0.0f, 1.0f - g), std::fmaxf(0.0f, 1.0f - b));
1247 r = std::fmaxf(0.0f, 1.0f - r);
1248 g = std::fmaxf(0.0f, 1.0f - g);
1249 b = std::fmaxf(0.0f, 1.0f - b);
1252 std::string toString()
const;
1281 float f =
static_cast<float>(factor);
1298 float f =
static_cast<float>(factor);
1315 float f =
static_cast<float>(factor);
1332 float f =
static_cast<float>(factor);
1340 const float rg = r > g ? r : g;
1341 return rg > b ? rg : b;
1347 color2.r = Internal::srgb_to_linear(color2.r);
1348 color2.g = Internal::srgb_to_linear(color2.g);
1349 color2.b = Internal::srgb_to_linear(color2.b);
1356 color2.r = Internal::linear_to_srgb(color2.r);
1357 color2.g = Internal::linear_to_srgb(color2.g);
1358 color2.b = Internal::linear_to_srgb(color2.b);
1364 std::ostream& operator <<(std::ostream& stream,
const Color& color);
1367 inline Color operator +(
const Color& a,
const Color& b)
noexcept {
1376 inline Color operator -(
const Color& a,
const Color& b)
noexcept {
1385 inline Color operator *(
const Color& a,
const Color& b)
noexcept {
1396 inline Color operator *(
const Color& a,
int factor)
noexcept {
1397 float f =
static_cast<float>(factor);
1398 return Color(a.r * f, a.g * f, a.b * f);
1404 inline Color operator *(
const Color& a,
float factor)
noexcept {
1405 return Color(a.r * factor, a.g * factor, a.b * factor);
1411 inline Color operator *(
const Color& a,
double factor)
noexcept {
1412 float f =
static_cast<float>(factor);
1413 return Color(a.r * f, a.g * f, a.b * f);
1419 inline Color operator *(
int factor,
const Color& a)
noexcept {
1420 return a * float(factor);
1426 inline Color operator *(
float factor,
const Color& a)
noexcept {
1433 inline Color operator *(
double factor,
const Color& a)
noexcept {
1434 return a * float(factor);
1438 inline Color operator /(
const Color& a,
const Color& b)
noexcept {
1439 return Color(a.r / b.r, a.g / b.g, a.b / b.b);
1445 inline Color operator /(
const Color& a,
int factor)
noexcept {
1446 float f =
static_cast<float>(factor);
1447 return Color(a.r / f, a.g / f, a.b / f);
1453 inline Color operator /(
const Color& a,
float factor)
noexcept {
1454 return Color(a.r / factor, a.g / factor, a.b / factor);
1460 inline Color operator /(
const Color& a,
double factor)
noexcept {
1461 float f =
static_cast<float>(factor);
1462 return Color(a.r / f, a.g / f, a.b / f);
1467 inline bool operator !=(
const Color& a,
const Color& b)
noexcept {
1468 return a.r != b.r || a.g != b.g || a.b != b.b;
1474 inline bool operator ==(
const Color& a,
const Color& b)
noexcept {
1475 return a.r == b.r && a.g == b.g && a.b == b.b;
1488 AColor() noexcept : color(), alpha() {}
1490 template <
typename T>
1491 AColor(
Color c, T a) noexcept : color(c), alpha(
float(a)) {}
1493 template <
typename T1,
typename T2,
typename T3>
1494 AColor(T1 r, T2 g, T3 b) noexcept : color(r, g, b), alpha(1.0f) {}
1496 template <
typename T1,
typename T2,
typename T3,
typename T4>
1497 AColor(T1 r, T2 g, T3 b, T4 a) noexcept : color(r, g, b), alpha(
float(a)) {}
1499 template <
typename T>
1500 explicit AColor(
const T& value) noexcept : color(value), alpha(1) {}
1502 std::string toString()
const ;
1528 color *= float(factor);
1529 alpha *= float(factor);
1542 color *= float(factor);
1543 alpha *= float(factor);
1556 color /= float(factor);
1557 alpha /= float(factor);
1570 color /= float(factor);
1571 alpha /= float(factor);
1593 alpha = std::fmaxf(0.0f, 1.0f - alpha);
1604 Internal::srgb_to_linear(color.r),
1605 Internal::srgb_to_linear(color.g),
1606 Internal::srgb_to_linear(color.b),
1614 Internal::linear_to_srgb(color.r),
1615 Internal::linear_to_srgb(color.g),
1616 Internal::linear_to_srgb(color.b),
1623 inline std::ostream& operator <<(std::ostream& stream,
const AColor& acolor) {
1624 stream <<
"AColor(" << acolor.color.r <<
", " << acolor.color.g <<
", " << acolor.color.b <<
", " << acolor.alpha <<
")";
1628 inline std::string AColor::toString()
const {
1629 std::ostringstream stream;
1631 return stream.str();
1635 inline AColor operator +(
const AColor& a,
const AColor& b)
noexcept {
1643 inline AColor operator -(
const AColor& a,
const AColor& b)
noexcept {
1651 inline AColor operator *(
const AColor& a,
const AColor& b)
noexcept {
1661 inline AColor operator *(
const AColor& a,
int factor)
noexcept {
1663 a.color *
float(factor),
1664 a.alpha *
float(factor)
1671 inline AColor operator *(
const AColor& a,
float factor)
noexcept {
1681 inline AColor operator *(
const AColor& a,
double factor)
noexcept {
1683 a.color *
float(factor),
1684 a.alpha *
float(factor)
1691 inline AColor operator *(
int factor,
const AColor& a)
noexcept {
1692 return a * float(factor);
1698 inline AColor operator *(
float factor,
const AColor& a)
noexcept {
1705 inline AColor operator *(
double factor,
const AColor& a)
noexcept {
1706 return a * float(factor);
1710 inline AColor operator /(
const AColor& a,
const AColor& b)
noexcept {
1720 inline AColor operator /(
const AColor& a,
int factor)
noexcept {
1722 a.color /
float(factor),
1723 a.alpha /
float(factor)
1730 inline AColor operator /(
const AColor& a,
float factor)
noexcept {
1740 inline AColor operator /(
const AColor& a,
double factor)
noexcept {
1742 a.color /
float(factor),
1743 a.alpha /
float(factor)
1750 return a.color != b.color || a.alpha != b.alpha;
1757 return a.color == b.color && a.alpha == b.alpha;
1764 std::string toString()
const;
1768 return (&v0)[index];
1773 return (&v0)[index];
1785 explicit
Matrix(
float value) noexcept : v0(value, 0, 0), v1(0 ,value, 0), v2(0, 0, value) {}
1788 explicit Matrix(
Vector diagonal) noexcept : v0(diagonal.x, 0, 0), v1(0, diagonal.y, 0), v2(0, 0, diagonal.z) {}
1805 v0 = a, v1 = b, v2 = c;
1809 void set(
float value)
noexcept {
1810 v0.
set(value, 0, 0);
1811 v1.
set(0, value, 0);
1812 v2.
set(0, 0, value);
1834 (*this)[0][i] = a.x, (*this)[1][i] = a.y, (*this)[2][i]=a.z;
1846 v0.
set(1.0f, 0.0f, 0.0f);
1847 v1.
set(0.0f, 1.0f, 0.0f);
1848 v2.
set(0.0f, 0.0f, 1.0f);
1854 v0.
set(a.x, 0.0f, 0.0f);
1855 v1.
set(0.0f, a.y, 0.0f);
1856 v2.
set(0.0f, 0.0f, a.z);
1859 void makeOuterProduct(
const Vector &a,
const Vector &b)
noexcept {
1868 t = v0[1], v0[1] = v1[0], v1[0] = t;
1869 t = v0[2], v0[2] = v2[0], v2[0] = t;
1870 t = v1[2], v1[2] = v2[1], v2[1] = t;
1878 double d = mixed(v0, v1, v2);
1892 void addDiagonal(
const Vector &a)
noexcept {
1898 void addTranspose(
const Matrix &b)
noexcept {
1914 v0 *= x, v1 *= x, v2 *= x;
1919 v0 /= x, v1 /= x, v2 /= x;
1945 void makeOrthogonal(
void)
noexcept {
1950 v0 = length(v0) * t.v0;
1951 v1 = length(v1) * t.v1;
1952 v2 = length(v2) * t.v2;
1955 void makeOrthonormal(
void)
noexcept {
1966 double d = m.v0*(m.v1^m.v2);
1967 r.
setRow(0, (m.v1^m.v2)/d);
1968 r.
setRow(1, (m.v2^m.v0)/d);
1969 r.
setRow(2, (m.v0^m.v1)/d);
1976 return Vector(a*m.v0, a*m.v1, a*m.v2);
1982 return a.x*m.v0 + a.y*m.v1 + a.z*m.v2;
1988 return Matrix(m.v0^a, m.v1^a, m.v2^a);
1994 return Matrix(a^m.v0, a^m.v1, a^m.v2);
2000 return Matrix(m.v0*x, m.v1*x, m.v2*x);
2006 return Matrix(x*m.v0, x*m.v1, x*m.v2);
2012 return Matrix(m.v0/x, m.v1/x, m.v2/x);
2017 inline float operator /(
float x,
const Matrix &m)
noexcept {
2018 return x / float(m.v0*(m.v1^m.v2));
2024 return Matrix(a.v0 + b.v0, a.v1 + b.v1, a.v2 + b.v2);
2030 return Matrix(a.v0 - b.v0, a.v1 - b.v1, a.v2 - b.v2);
2038 a.v0[0]*b.v0[0]+a.v1[0]*b.v0[1]+a.v2[0]*b.v0[2],
2039 a.v0[1]*b.v0[0]+a.v1[1]*b.v0[1]+a.v2[1]*b.v0[2],
2040 a.v0[2]*b.v0[0]+a.v1[2]*b.v0[1]+a.v2[2]*b.v0[2]),
2042 a.v0[0]*b.v1[0]+a.v1[0]*b.v1[1]+a.v2[0]*b.v1[2],
2043 a.v0[1]*b.v1[0]+a.v1[1]*b.v1[1]+a.v2[1]*b.v1[2],
2044 a.v0[2]*b.v1[0]+a.v1[2]*b.v1[1]+a.v2[2]*b.v1[2]),
2046 a.v0[0]*b.v2[0]+a.v1[0]*b.v2[1]+a.v2[0]*b.v2[2],
2047 a.v0[1]*b.v2[0]+a.v1[1]*b.v2[1]+a.v2[1]*b.v2[2],
2048 a.v0[2]*b.v2[0]+a.v1[2]*b.v2[1]+a.v2[2]*b.v2[2])
2056 return a.v0 != b.v0 || a.v1 != b.v1 || a.v2 != b.v2;
2063 return a.v0 == b.v0 && a.v1 == b.v1 && a.v2 == b.v2;
2069 return Matrix(-a.v0, -a.v1, -a.v2);
2073 return Matrix(a.x*b, a.y*b, a.z*b);
2077 inline Matrix transpose(
const Matrix &m)
noexcept {
2079 Vector(m.v0[0], m.v1[0], m.v2[0]),
2080 Vector(m.v0[1], m.v1[1], m.v2[1]),
2081 Vector(m.v0[2], m.v1[2], m.v2[2]));
2087 return Matrix(rotate(m.v0, axis), rotate(m.v1, axis), rotate(m.v2, axis));
2093 Vector v0 = normalize(m.v0);
2094 Vector v1 = normalize(m.v2^m.v0);
2095 return Matrix(v0, v1, v0^v1);
2101 return Matrix(normalize(m.v0), normalize(m.v1), normalize(m.v2));
2107 return Vector(m[0].length(), m[1].length(), m[2].length());
2113 const Matrix mns = noScale(m);
2129 atan2(-mns[2][1], mns[2][2]),
2131 atan2(-mns[1][0], mns[0][0])
2139 const float s = sinf(xrot);
2140 const float c = cosf(xrot);
2148 const float s = sinf(yrot);
2149 const float c = cosf(yrot);
2157 const float s = sinf(zrot);
2158 const float c = cosf(zrot);
2163 inline Matrix normalTransformMatrix(
const Matrix &m)
noexcept {
2164 return Matrix(m[1]^m[2], m[2]^m[0], m[0]^m[1]);
2168 inline Matrix normalTransformMatrixX(
const Matrix &m,
bool &DlessThanZero )
noexcept {
2169 if((m[0]^m[1])*m[2] < 0){
2170 DlessThanZero =
true;
2171 return Matrix(m[2]^m[1], m[0]^m[2], m[1]^m[0]);
2173 DlessThanZero =
false;
2174 return Matrix(m[1]^m[2], m[2]^m[0], m[0]^m[1]);
2177 inline std::ostream& operator <<(std::ostream& stream,
const Matrix& matrix) {
2178 stream <<
"Matrix(" << matrix.v0 <<
", " << matrix.v1 <<
", " << matrix.v2 <<
")";
2182 inline std::string Matrix::toString()
const {
2183 std::ostringstream stream;
2185 return stream.str();
2234 matrix += tm.matrix;
2235 offset += tm.offset;
2240 matrix -= tm.matrix;
2241 offset -= tm.offset;
2253 offset = -matrix * offset;
2256 std::string toString()
const;
2262 return a.matrix != b.matrix || a.offset != b.offset;
2269 return a.matrix == b.matrix && a.offset == b.offset;
2275 return Transform(-tm.matrix, -tm.offset);
2281 return Transform(tm.matrix * x, tm.offset * x);
2287 return Transform(x * tm.matrix, x * tm.offset);
2293 return Transform(tm.matrix / x, tm.offset / x);
2299 return Transform(a.matrix + b.matrix, a.offset + b.offset);
2305 return Transform(a.matrix - b.matrix, a.offset - b.offset);
2311 return Transform(a.matrix * b.matrix, a.matrix * b.offset + a.offset);
2317 return tm.matrix * a + tm.offset;
2323 return (a - tm.offset) * tm.matrix;
2326 inline std::ostream& operator <<(std::ostream& stream,
const Transform& transform) {
2327 stream <<
"Transform(" << transform.matrix <<
", " << transform.offset <<
")";
2331 inline std::string Transform::toString()
const {
2332 std::ostringstream stream;
2334 return stream.str();
2356 struct RendererOptions;
2359 class PropertyRuntimeMeta;
2362 struct RenderSizeParams;
2365 const float DEFAULT_FPS = 24.0f;
2366 const float DEFAULT_POINT_SIZE = 2.2f;
2367 const long long READ_DATA_STRUCT_VERSION = 5;
2368 const long long READ_PARAMS_STRUCT_VERSION = 2;
2369 const long long CREATE_PARAMS_STRUCT_VERSION = 7;
2370 const long long GEOM_MESH_DATA_STRUCT_VERSION = 2;
2371 const long long ENABLE_DRCLIENT_PARAMS_STRUCT_VERSION = 0;
2372 const long long LIVE_LINK_CLIENT_PARAMS_STRUCT_VERSION = 0;
2373 const long long SCATTER_READ_PARAMS_STRUCT_VERSION = 0;
2374 class VRayRendererNative;
2375 class BinaryValueParser;
2376 class BinaryValueBuilder;
2377 struct MeshFileDataParser;
2506 SHEEN =
USER + 5011,
2507 AMBIENT_OCCLUSION =
USER + 5012,
2573 InstanceId pluginID;
2582 size_t getData_internal(
2584 InstanceId alphaPluginID,
2588 bool rgbOrder =
false,
2611 return binaryFormat;
2616 return defaultPixelFormat;
2636 bool flipImage =
false;
2678 operator bool ()
const {
2679 return pluginID != NO_ID;
2726 int start, end, step;
2772 std::vector<ComputeDeviceInfo> getComputeDevicesMetal();
2777 std::vector<ComputeDeviceInfo> getComputeDevicesOptix();
2785 std::vector<ComputeDeviceInfo> getComputeDevicesCUDA();
2790 std::vector<ComputeDeviceInfo> getComputeDevicesDenoiser();
2795 bool setComputeDevicesMetal(
const std::vector<int>& indices);
2800 bool setComputeDevicesOptix(
const std::vector<int>& indices);
2805 bool setComputeDevicesCUDA(
const std::vector<int>& indices);
2810 bool setComputeDevicesDenoiser(
const std::vector<int>& indices);
2815 bool setComputeDevicesEnvironmentVariable();
2824 float currentProgress;
2843 typedef std::vector<int> IntList;
2844 typedef std::vector<float> FloatList;
2845 typedef std::vector<Color> ColorList;
2846 typedef std::vector<Vector> VectorList;
2847 typedef std::vector<Value> ValueList;
2848 typedef std::vector<std::string> StringList;
2874 VRAY_MINIMUM2(
pmin.x, point.x),
2875 VRAY_MINIMUM2(
pmin.y, point.y),
2876 VRAY_MINIMUM2(
pmin.z, point.z)
2879 VRAY_MAXIMUM2(
pmax.x, point.x),
2880 VRAY_MAXIMUM2(
pmax.y, point.y),
2881 VRAY_MAXIMUM2(
pmax.z, point.z)
2900 std::string toString()
const;
2903 inline std::ostream& operator <<(std::ostream& stream,
const Box& box) {
2904 stream <<
"Box(min: " << box.pmin <<
", max: " << box.pmax <<
")";
2908 inline std::string Box::toString()
const {
2909 std::ostringstream stream;
2911 return stream.str();
2953 MESH_VERTICES = (1 << 4),
2954 MESH_NORMALS = (1 << 5),
2955 MESH_MTLIDS = (1 << 6),
2956 MESH_VELOCITIES = (1 << 7),
2957 MESH_UVS = (1 << 8),
2958 MESH_SHADERS = (1 << 9),
2959 MESH_OBJECTINFOS = (1 << 10),
2960 MESH_HAIROBJECTINFOS = (1 << 11),
2961 MESH_PARTICLEOBJECTINFOS = (1 << 12),
2962 MESH_HAIRGEOMETRY = (1 << 13),
2963 MESH_PARTICLESGEOMETRY = (1 << 14),
2964 MESH_GEOMETRYMESHESBBOXES = (1 << 15),
2965 MESH_HAIROBJECTBBOXES = (1 << 16),
2966 MESH_PARTICLEOBJECTBBOXES = (1 << 17),
2967 MESH_ALL = MESH_VERTICES | MESH_NORMALS | MESH_VELOCITIES | MESH_MTLIDS | MESH_UVS | MESH_SHADERS |
2968 MESH_OBJECTINFOS | MESH_HAIROBJECTINFOS | MESH_PARTICLEOBJECTINFOS | MESH_HAIRGEOMETRY | MESH_PARTICLESGEOMETRY |
2969 MESH_GEOMETRYMESHESBBOXES | MESH_HAIROBJECTBBOXES | MESH_PARTICLEOBJECTBBOXES,
2985 const std::vector<Vector> &
getNormals()
const {
return normals; }
3192 std::vector<int>
getArrayOfLengths(
const int* startIndices,
int elementsCount,
int objectCount)
const;
3199 std::vector<int>
getArrayOfLengths(
const int* startIndices,
int elementsCount,
int objectCount,
int uvSetsCount)
const;
3215 int getLengthFromStartIndex(
int objectIndex,
int setIndex,
const int* startIndices,
int elementsCount,
int objectCount,
int uvSetsCount)
const;
3250 void allocateArrays();
3251 std::vector<Vector> getArrayElement (
int objectIndex,
const int* startIndices,
const VectorList& list,
int elementsCount,
size_t objectCount)
const;
3252 std::vector<int> getArrayElement (
int objectIndex,
const int* startIndices,
const int* primaryStartIndices,
const IntList& list,
int elementsCount,
size_t objectCount)
const;
3253 std::vector<int> getArrayElement (
int objectIndex,
const int* startIndices,
const IntList& list,
int elementsCount,
size_t objectCount)
const;
3254 std::vector<float> getArrayElement (
int objectIndex,
const int* startIndices,
const FloatList& list,
int elementsCount,
size_t objectCount)
const;
3255 std::vector<Vector> getArrayElement (
int objectIndex,
int setIndex,
const int* startIndices,
const VectorList& list,
int elementsCount,
size_t objectCount,
size_t uvSetsCount)
const;
3256 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;
3261 long long int flags;
3263 bool maxToMayaTM : 1;
3264 bool mayaToMaxTM : 1;
3265 bool reserved_bit2 : 1;
3266 bool reserved_bit3 : 1;
3267 bool use_vertices : 1;
3268 bool use_normals : 1;
3269 bool use_mtlIDs : 1;
3270 bool use_velocities : 1;
3272 bool use_shaders : 1;
3273 bool use_objectInfos : 1;
3274 bool use_hairObjectInfos : 1;
3275 bool use_particleObjectInfos : 1;
3277 bool use_particles : 1;
3278 bool use_geometryVoxelsBBoxes : 1;
3279 bool use_hairVoxelsBBoxes : 1;
3280 bool use_particleVoxelsBBoxes : 1;
3285 size_t vertices_count;
3287 size_t indices_count;
3289 size_t normals_count;
3291 size_t normalIndices_count;
3293 size_t materialIDs_count;
3295 size_t velocities_count;
3299 int* uvValueIndices;
3300 size_t uvSets_count;
3301 size_t uvSetNames_length;
3302 int uvSetIndices[100];
3303 size_t uvValues_counts[100];
3304 size_t uvValueIndices_counts[100];
3308 size_t shaders_count;
3309 size_t shaderNames_length;
3311 char* objectInfoNames;
3313 int* objectInfoVBegins;
3314 int* objectInfoVEnds;
3315 size_t objectInfos_count;
3316 size_t objectInfoNames_length;
3318 char* hairObjectInfoNames;
3319 int* hairObjectInfoIds;
3320 int* hairObjectInfoVBegins;
3321 int* hairObjectInfoVEnds;
3322 size_t hairObjectInfos_count;
3323 size_t hairObjectInfoNames_length;
3325 char* particleObjectInfoNames;
3326 int* particleObjectInfoIds;
3327 int* particleObjectInfoVBegins;
3328 int* particleObjectInfoVEnds;
3329 size_t particleObjectInfos_count;
3330 size_t particleObjectInfoNames_length;
3332 float* hairVertices;
3333 size_t hairVertices_count;
3334 int* hairVerticesPerStrand;
3335 size_t hairVerticesPerStrand_count;
3336 float* particleVertices;
3337 size_t particlesVertices_count;
3339 int* voxelVerticesStartIndices;
3340 int* voxelVertexIndicesStartIndices;
3341 int* voxelNormalsStartIndices;
3342 int* voxelNormalIndicesStartIndices;
3343 int* voxelMaterialIDsStartIndices;
3344 int* voxelVelocitiesStartIndices;
3345 int* voxelUVValuesStartIndices;
3346 int* voxelUVValueIndicesStartIndices;
3348 float* geometryVoxelsBBoxes;
3349 float* hairVoxelsBBoxes;
3350 float* particleVoxelsBBoxes;
3352 int* hairVerticesStartIndices;
3353 int* hairVerticesPerStrandStartIndices;
3354 int* particleVerticesStartIndices;
3356 size_t geometryVoxels_count;
3357 size_t hairVoxels_count;
3358 size_t particleVoxels_count;
3360 size_t totalUVvalues;
3361 size_t totalUVindices;
3363 int* edgeVisibility;
3365 Color* voxelInfoWireColor;
3366 int* voxelInfoSmoothed;
3367 int* voxelInfoFlipNormals;
3368 size_t voxelInfoObjects_count;
3371 size_t hairWidths_count;
3372 int* hairWidthsStartIndices;
3373 float* particleWidths;
3374 size_t particleWidths_count;
3375 int* particleWidthsStartIndices;
3378 Bool hasVelocityChannel;
3380 float* hairVelocities;
3381 size_t hairVelocities_count;
3382 int* hairVelocitiesStartIndices;
3383 float* particleVelocities;
3384 size_t particleVelocities_count;
3385 int* particleVelocitiesStartIndices;
3388 std::vector<Vector> vertices;
3389 std::vector<int> indices;
3390 std::vector<Vector> normals;
3391 std::vector<int> normalIndices;
3392 std::vector<int> materialIDs;
3393 std::vector<Vector> velocities;
3394 std::vector<char> uvSetNames;
3395 std::vector<Vector> uvValues;
3396 std::vector<int> uvValueIndices;
3397 std::vector<char> shaderNames;
3398 std::vector<int> shaderIds;
3399 std::vector<char> objectInfoNames;
3400 std::vector<int> objectInfoIds;
3401 std::vector<int> objectInfoVBegins;
3402 std::vector<int> objectInfoVEnds;
3403 std::vector<char> hairObjectInfoNames;
3404 std::vector<int> hairObjectInfoIds;
3405 std::vector<int> hairObjectInfoVBegins;
3406 std::vector<int> hairObjectInfoVEnds;
3407 std::vector<char> particleObjectInfoNames;
3408 std::vector<int> particleObjectInfoIds;
3409 std::vector<int> particleObjectInfoVBegins;
3410 std::vector<int> particleObjectInfoVEnds;
3411 std::vector<Vector> hairVertices;
3412 std::vector<int> hairVerticesPerStrand;
3413 std::vector<Vector> particleVertices;
3414 std::vector<int> voxelVerticesStartIndices;
3415 std::vector<int> voxelVertexIndicesStartIndices;
3416 std::vector<int> voxelNormalsStartIndices;
3417 std::vector<int> voxelNormalIndicesStartIndices;
3418 std::vector<int> voxelMaterialIDsStartIndices;
3419 std::vector<int> voxelVelocitiesStartIndices;
3420 std::vector<int> voxelUVValuesStartIndices;
3421 std::vector<int> voxelUVValueIndicesStartIndices;
3422 std::vector<Box> geometryVoxelsBBoxes;
3423 std::vector<Box> hairVoxelsBBoxes;
3424 std::vector<Box> particleVoxelsBBoxes;
3425 std::vector<int> hairVerticesStartIndices;
3426 std::vector<int> hairVerticesPerStrandStartIndices;
3427 std::vector<int> particleVerticesStartIndices;
3428 std::vector<int> edgeVisibility;
3429 std::vector<Color> voxelInfoWireColor;
3430 std::vector<Bool> voxelInfoSmoothed;
3431 std::vector<Bool> voxelInfoFlipNormals;
3432 std::vector<float> hairWidths;
3433 std::vector<int> hairWidthsStartIndices;
3434 std::vector<float> particleWidths;
3435 std::vector<int> particleWidthsStartIndices;
3436 std::vector<Vector> hairVelocities;
3437 std::vector<int> hairVelocitiesStartIndices;
3438 std::vector<Vector> particleVelocities;
3439 std::vector<int> particleVelocitiesStartIndices;
3448 explicit TiMe(int64_t time) : asInt(time) {}
3453 explicit TiMe(
double time) : asDouble(time) {}
3455 operator double() {
return asDouble; }
3463 static double None() {
return TiMe(int64_t(-2)).asDouble; }
3610 void* luminaireFieldHandle;
3615 unsigned char revision;
3616 unsigned char minor;
3617 unsigned short major;
3622 #pragma warning(disable : 4996)
3624 std::string toString()
const {
3627 int n = std::snprintf(&str[0], str.size() - 1,
"%u.%02u.%02u", major, minor, revision);
3632 #pragma warning(default : 4996)
3638 inline std::ostream& operator <<(std::ostream& stream,
const VRayVersion& version) {
3639 stream << version.toString();
3645 static const int useParentTimes = (1 << 0);
3646 static const int useObjectID = (1 << 1);
3647 static const int usePrimaryVisibility = (1 << 2);
3648 static const int useUserAttributes = (1 << 3);
3673#include "_vraysdk_import.hpp"
3676 namespace Language {
3677 constexpr const char* EN_US =
"en-US";
3678 constexpr const char* ZH_CN =
"zh-CN";
3687 ThemeStyleStandalone,
3716 bool forwardProgressToVfbProgressBar : 1;
3722 void* parentWindowHandle;
3731 , parentWindowHandle()
3759 bool immediatelyForwardReadySplitBucketSubunits : 1;
3778 std::string vantageFile;
3812#if !defined(VRAY_RUNTIME_LOAD_PRIMARY) && !defined(VRAY_RUNTIME_LOAD_SECONDARY)
3820 Internal::VRay_incrementModuleReferenceCounter();
3825 Internal::VRay_incrementModuleReferenceCounter();
3826 Internal::VRay_enableFrameBuffer(enableFrameBuffer);
3832 void setUseParentEventLoop() {
3833 Internal::VRay_blendFrameBuffer();
3841 Internal::VRay_GUIMessageProcessing(enableMessageProcessing);
3849 Internal::VRay_OSMessageDispatching(enableMessageDispatching);
3853 Internal::VRay_LicenseManager_releaseLicense();
3857#elif defined(VRAY_RUNTIME_LOAD_PRIMARY)
3861 VRayInit(VRayInit&);
3867 explicit VRayInit(
const char*
const libraryFileName) {
3868 initialize(libraryFileName);
3869 if (Internal::VRay_incrementModuleReferenceCounter) Internal::VRay_incrementModuleReferenceCounter();
3876 VRayInit(
const char*
const libraryFileName,
bool enableFrameBuffer) {
3877 initialize(libraryFileName);
3878 if (Internal::VRay_incrementModuleReferenceCounter) Internal::VRay_incrementModuleReferenceCounter();
3879 if (Internal::VRay_enableFrameBuffer) Internal::VRay_enableFrameBuffer(enableFrameBuffer);
3885 void setUseParentEventLoop() {
3886 Internal::VRay_blendFrameBuffer();
3894 Internal::VRay_GUIMessageProcessing(enableMessageProcessing);
3902 Internal::VRay_OSMessageDispatching(enableMessageDispatching);
3906 if (Internal::VRay_LicenseManager_releaseLicense)
3907 Internal::VRay_LicenseManager_releaseLicense();
3911 operator bool ()
const {
3916 std::string getSDKLibraryErrorString()
const {
3923 Internal::HModule hLib;
3924 std::string errString;
3927 void makeError(
const std::string &errMsg) {
3933 void initialize(
const char* libraryFileName);
3934 void importFunctions();
3939 Internal::FreeLibrary(hLib);
3941 Internal::dlclose(hLib);
3949 inline bool isDR2() {
3950 return !!Internal::VRay_isDR2();
3954 inline APIVersion getAPIVersion() {
3956 ver.allFields = Internal::VRay_getSDKVersion();
3961 inline VRayVersion getVRayVersion() {
3963 ver.allFields = Internal::VRay_getVRayVersion();
3968 inline const char* getVRayVersionDetails() {
3969 return Internal::VRay_getVRayVersionDetails();
3974 inline const char* getMaterialLibraryPath() {
3975 return Internal::VRay_getMaterialLibraryPath();
4009 inline int setLicenseServers(
const LicenseServerSettings& settings);
4014 inline void setUSDProvider(
const char* usdProvider);
4019 ErrorCode errorCode;
4022 Error(
int errorCode = SUCCESS) : errorCode(
static_cast<ErrorCode
>(errorCode)) {
4025 Error(ErrorCode errorCode) : errorCode(errorCode) {
4028 bool error()
const {
4029 return errorCode != SUCCESS;
4032 ErrorCode getCode()
const {
4036 const char* toString()
const {
4037 return Internal::VRay_getErrorTextStringFromErrorCode(errorCode);
4040 friend inline bool operator==(
const Error& err0,
const Error& err1) {
4041 return err0.errorCode == err1.errorCode;
4044 friend inline bool operator!=(
const Error& err0,
const Error& err1) {
4045 return err0.errorCode != err1.errorCode;
4048 friend inline bool operator==(
const Error& err, ErrorCode errCode) {
4049 return err.errorCode == errCode;
4052 friend inline bool operator==(ErrorCode errCode,
const Error& err) {
4053 return errCode == err.errorCode;
4056 friend inline bool operator!=(
const Error& err, ErrorCode errCode) {
4057 return err.errorCode != errCode;
4060 friend inline bool operator!=(ErrorCode errCode,
const Error& err) {
4061 return errCode != err.errorCode;
4066 inline std::ostream& operator <<(std::ostream& stream,
const Error& err) {
4067 stream << err.toString();
4073 std::string fileName;
4074 std::string errorText;
4080 LicenseError::VRLAuthError errorCode;
4083 : errorCode(errorCode) {}
4085 bool error()
const {
4086 return errorCode != LicenseError::vrlauth_noError;
4089 const char* toString()
const;
4110 CH_PAINT_MASK = 1 << VRSM_PAINT,
4188 unsigned getScannedMaterialUILicense();
4199 unsigned releaseScannedMaterialUILicense();
4252 void createThis(
const char* pluginLibPath);
4257 BAD_LIBRARY_FILE = 1,
4273 operator bool()
const;
4283 bool getInfo(
const char* filename, std::string& info)
const;
4286 bool getInfo(
const std::string& filename, std::string& info)
const;
4302 namespace Internal {
4304 class BinaryValueParser;
4307 enum PluginCategory {
4308 category_bitmap = 0,
4310 category_geometric_object,
4311 category_geometry_source,
4314 category_render_channel,
4315 category_render_view,
4318 category_texture_float,
4319 category_texture_int,
4320 category_texture_matrix,
4321 category_texture_transform,
4322 category_texture_vector,
4324 category_volumetric,
4344 void resetBitmapCategory() noexcept {
pluginCategoryField &= ~(1ull << category_bitmap); }
4353 void setGeometricObjectCategory() noexcept {
pluginCategoryField |= 1ull << category_geometric_object; }
4354 void resetGeometricObjectCategory() noexcept {
pluginCategoryField &= ~(1ull << category_geometric_object); }
4358 void setGeometrySourceCategory() noexcept {
pluginCategoryField |= 1ull << category_geometry_source; }
4359 void resetGeometrySourceCategory() noexcept {
pluginCategoryField &= ~(1ull << category_geometry_source); }
4369 void resetMaterialCategory() noexcept {
pluginCategoryField &= ~(1ull << category_material); }
4373 void setRenderChannelCategory() noexcept {
pluginCategoryField |= 1ull << category_render_channel; }
4374 void resetRenderChannelCategory() noexcept {
pluginCategoryField &= ~(1ull << category_render_channel); }
4378 void setRenderViewCategory() noexcept {
pluginCategoryField |= 1ull << category_render_view; }
4379 void resetRenderViewCategory() noexcept {
pluginCategoryField &= ~(1ull << category_render_view); }
4384 void resetSettingsCategory() noexcept {
pluginCategoryField &= ~(1ull << category_settings); }
4389 void resetTextureCategory() noexcept {
pluginCategoryField &= ~(1ull << category_texture); }
4393 void setTextureFloatCategory() noexcept {
pluginCategoryField |= 1ull << category_texture_float; }
4394 void resetTextureFloatCategory() noexcept {
pluginCategoryField &= ~(1ull << category_texture_float); }
4398 void setTextureIntCategory() noexcept {
pluginCategoryField |= 1ull << category_texture_int; }
4399 void resetTextureIntCategory() noexcept {
pluginCategoryField &= ~(1ull << category_texture_int); }
4403 void setTextureMatrixCategory() noexcept {
pluginCategoryField |= 1ull << category_texture_matrix; }
4404 void resetTextureMatrixCategory() noexcept {
pluginCategoryField &= ~(1ull << category_texture_matrix); }
4408 void setTextureTransformCategory() noexcept {
pluginCategoryField |= 1ull << category_texture_transform; }
4409 void resetTextureTransformCategory() noexcept {
pluginCategoryField &= ~(1ull << category_texture_transform); }
4413 void setTextureVectorCategory() noexcept {
pluginCategoryField |= 1ull << category_texture_vector; }
4414 void resetTextureVectorCategory() noexcept {
pluginCategoryField &= ~(1ull << category_texture_vector); }
4419 void resetUvwgenCategory() noexcept {
pluginCategoryField &= ~(1ull << category_uvwgen); }
4423 void setVolumetricCategory() noexcept {
pluginCategoryField |= 1ull << category_volumetric; }
4424 void resetVolumetricCategory() noexcept {
pluginCategoryField &= ~(1ull << category_volumetric); }
4428 explicit PluginCategories(PluginCategory category) noexcept
4431 PluginCategories(PluginCategory category0, PluginCategory category1) noexcept
4434 PluginCategories(PluginCategory category0, PluginCategory category1, PluginCategory category2) noexcept
4435 :
pluginCategoryField((1ull << category0) || (1ull << category1) || (1ull << category2)) {}
4437 PluginCategories(PluginCategory category0, PluginCategory category1, PluginCategory category2, PluginCategory category3) noexcept
4438 :
pluginCategoryField((1ull << category0) || (1ull << category1) || (1ull << category2) || (1ull << category3)) {}
4442 bool hasCategory(PluginCategory category)
const noexcept {
4446 void setCategory(PluginCategory category,
bool value)
noexcept {
4447 const long long msk = 1ll << category;
4448 const long long val = -
static_cast<long long>(value);
4465 friend class VUtils::Value;
4466 friend class Internal::Access;
4467 friend class Internal::BinaryValueParser;
4468 friend class Internal::BinaryValueBuilder;
4472 InstanceId internalId;
4473 InstanceId id()
const {
4474 constexpr int shift =
sizeof(InstanceId) * 8 - Internal::INSTANCE_ID_BITS;
4475 return static_cast<signed long long>(internalId << shift) >> shift;
4483 template<
typename T,
int TYPE>
4484 bool setValueAtTimeTemplate(
const char* propertyName,
const T& value,
double time);
4486 template<
typename T,
int TYPE>
4487 bool setArrayAtTimeTemplate(
const char* propertyName,
size_t count,
const T& value,
double time);
4489 template<
typename LengthFn,
typename Po
interFn>
4490 bool setStringArrayTemplate(
const char *propertyName,
size_t count, LengthFn lengthAt, PointerFn pointerAt,
double time);
4501 Plugin() noexcept : pRenderer(), internalId(NO_ID) {}
4515 bool operator<(
const Plugin& plugin)
const noexcept;
4516 bool operator<=(
const Plugin& plugin)
const noexcept;
4517 bool operator>(
const Plugin& plugin)
const noexcept;
4518 bool operator>=(
const Plugin& plugin)
const noexcept;
5036 bool setArray(const std::
string& propertyName, const
int data[],
size_t count,
double time =
TiMe::
Default());
5043 bool setArray(const std::
string& propertyName, const
float data[],
size_t count,
double time =
TiMe::
Default());
5051 bool setArray(const std::
string& propertyName, const
double data[],
size_t count,
double time =
TiMe::
Default());
5073 bool setArray(const
char* propertyName, const std::
string data[],
size_t count,
double time =
TiMe::
Default());
5075 bool setArray(const std::
string& propertyName, const std::
string data[],
size_t count,
double time =
TiMe::
Default());
5077 bool setArray(const
char* propertyName, const
char* const data[],
size_t count,
double time =
TiMe::
Default());
5079 bool setArray(const std::
string& propertyName, const
char* const data[],
size_t count,
double time =
TiMe::
Default());
5107 friend std::ostream& operator <<(std::ostream& stream, const
Plugin& plugin);
5109#ifdef VRAY_SDK_INTEROPERABILITY
5110 bool setValueAsStringAtTime(
const char* propertyName,
const char* value,
double time);
5111 bool setValueAsStringAtTime(
const char* propertyName,
const std::string& value,
double time);
5112 bool setValueAsStringAtTime(
const std::string& propertyName,
const char* value,
double time);
5113 bool setValueAsStringAtTime(
const std::string& propertyName,
const std::string& value,
double time);
5114 bool setValueAtTime(
const char* propertyName,
const bool value,
double time);
5115 bool setValueAtTime(
const std::string& propertyName,
const bool value,
double time);
5116 bool setValueAtTime(
const char* propertyName,
const int value,
double time);
5117 bool setValueAtTime(
const std::string& propertyName,
const int value,
double time);
5118 bool setValueAtTime(
const char* propertyName,
const float value,
double time);
5119 bool setValueAtTime(
const std::string& propertyName,
const float value,
double time);
5120 bool setValueAtTime(
const char* propertyName,
const double value,
double time);
5121 bool setValueAtTime(
const std::string& propertyName,
const double value,
double time);
5122 bool setValueAtTime(
const char* propertyName,
const Color& value,
double time);
5123 bool setValueAtTime(
const std::string& propertyName,
const Color& value,
double time);
5124 bool setValueAtTime(
const char* propertyName,
const AColor& value,
double time);
5125 bool setValueAtTime(
const std::string& propertyName,
const AColor& value,
double time);
5126 bool setValueAtTime(
const char* propertyName,
const Vector& value,
double time);
5127 bool setValueAtTime(
const std::string& propertyName,
const Vector& value,
double time);
5128 bool setValueAtTime(
const char* propertyName,
const Matrix& value,
double time);
5129 bool setValueAtTime(
const std::string& propertyName,
const Matrix& value,
double time);
5130 bool setValueAtTime(
const char* propertyName,
const Transform& transform,
double time);
5131 bool setValueAtTime(
const std::string& propertyName,
const Transform& transform,
double time);
5132 bool setValueAtTime(
const char* propertyName,
const PluginRefT<Plugin>& pluginRef,
double time);
5133 bool setValueAtTime(
const std::string& propertyName,
const PluginRefT<Plugin>& pluginRef,
double time);
5134 bool setValueAtTime(
const char* propertyName,
const char* str,
double time);
5135 bool setValueAtTime(
const std::string& propertyName,
const char* str,
double time);
5136 bool setValueAtTime(
const char* propertyName,
const std::string& str,
double time);
5137 bool setValueAtTime(
const std::string& propertyName,
const std::string& str,
double time);
5138 bool setValueAtTime(
const char* propertyName,
const Value& value,
double time);
5139 bool setValueAtTime(
const std::string& propertyName,
const Value& value,
double time);
5140 bool setValueAtTime(
const char* propertyName,
const ValueList& value,
double time);
5141 bool setValueAtTime(
const std::string& propertyName,
const ValueList& value,
double time);
5142 bool setValueAtTime(
const char* propertyName,
const IntList& value,
double time);
5143 bool setValueAtTime(
const std::string& propertyName,
const IntList& value,
double time);
5144 bool setValueAtTime(
const char* propertyName,
const FloatList& value,
double time);
5145 bool setValueAtTime(
const std::string& propertyName,
const FloatList& value,
double time);
5146 bool setValueAtTime(
const char* propertyName,
const VectorList& value,
double time);
5147 bool setValueAtTime(
const std::string& propertyName,
const VectorList& value,
double time);
5148 bool setValueAtTime(
const char* propertyName,
const ColorList& value,
double time);
5149 bool setValueAtTime(
const std::string& propertyName,
const ColorList& value,
double time);
5150 bool setValueAtTime(
const char* propertyName,
const PluginList& value,
double time);
5151 bool setValueAtTime(
const std::string& propertyName,
const PluginList& value,
double time);
5152 bool setValueAtTime(
const char* propertyName,
const StringList& value,
double time);
5153 bool setValueAtTime(
const std::string& propertyName,
const StringList& value,
double time);
5154 bool setArrayAtTime(
const char* propertyName,
const int data[],
size_t count,
double time);
5155 bool setArrayAtTime(
const std::string& propertyName,
const int data[],
size_t count,
double time);
5156 bool setArrayAtTime(
const char* propertyName,
const float data[],
size_t count,
double time);
5157 bool setArrayAtTime(
const std::string& propertyName,
const float data[],
size_t count,
double time);
5158 bool setArrayAtTime(
const char* propertyName,
const double data[],
size_t count,
double time);
5159 bool setArrayAtTime(
const std::string& propertyName,
const double data[],
size_t count,
double time);
5160 bool setArrayAtTime(
const char* propertyName,
const Vector data[],
size_t count,
double time);
5161 bool setArrayAtTime(
const std::string& propertyName,
const Vector data[],
size_t count,
double time);
5162 bool setArrayAtTime(
const char* propertyName,
const Color data[],
size_t count,
double time);
5163 bool setArrayAtTime(
const std::string& propertyName,
const Color data[],
size_t count,
double time);
5164 bool setArrayAtTime(
const char* propertyName,
const Plugin data[],
size_t count,
double time);
5165 bool setArrayAtTime(
const std::string& propertyName,
const Plugin data[],
size_t count,
double time);
5166 bool setArrayAtTime(
const char* propertyName,
const std::string data[],
size_t count,
double time);
5167 bool setArrayAtTime(
const std::string& propertyName,
const std::string data[],
size_t count,
double time);
5168 bool setValueAtTime(
const char* propertyName,
const void* data,
size_t size,
double time);
5169 bool setValueAtTime(
const std::string& propertyName,
const void* data,
size_t size,
double time);
5172 VUtils::IntRefList getIntRefList(
const char* propertyName);
5173 VUtils::IntRefList getIntRefList(
const char* propertyName,
bool& ok);
5174 VUtils::IntRefList getIntRefListAtTime(
const char* propertyName,
double time);
5175 VUtils::IntRefList getIntRefListAtTime(
const char* propertyName,
double time,
bool& ok);
5176 VUtils::IntRefList getIntRefList(
const std::string& propertyName);
5177 VUtils::IntRefList getIntRefList(
const std::string& propertyName,
bool& ok);
5178 VUtils::IntRefList getIntRefListAtTime(
const std::string& propertyName,
double time);
5179 VUtils::IntRefList getIntRefListAtTime(
const std::string& propertyName,
double time,
bool& ok);
5181 VUtils::FloatRefList getFloatRefList(
const char* propertyName);
5182 VUtils::FloatRefList getFloatRefList(
const char* propertyName,
bool& ok);
5183 VUtils::FloatRefList getFloatRefListAtTime(
const char* propertyName,
double time);
5184 VUtils::FloatRefList getFloatRefListAtTime(
const char* propertyName,
double time,
bool& ok);
5185 VUtils::FloatRefList getFloatRefList(
const std::string& propertyName);
5186 VUtils::FloatRefList getFloatRefList(
const std::string& propertyName,
bool& ok);
5187 VUtils::FloatRefList getFloatRefListAtTime(
const std::string& propertyName,
double time);
5188 VUtils::FloatRefList getFloatRefListAtTime(
const std::string& propertyName,
double time,
bool& ok);
5190 VUtils::VectorRefList getVectorRefList(
const char* propertyName);
5191 VUtils::VectorRefList getVectorRefList(
const char* propertyName,
bool& ok);
5192 VUtils::VectorRefList getVectorRefListAtTime(
const char* propertyName,
double time);
5193 VUtils::VectorRefList getVectorRefListAtTime(
const char* propertyName,
double time,
bool& ok);
5194 VUtils::VectorRefList getVectorRefList(
const std::string& propertyName);
5195 VUtils::VectorRefList getVectorRefList(
const std::string& propertyName,
bool& ok);
5196 VUtils::VectorRefList getVectorRefListAtTime(
const std::string& propertyName,
double time);
5197 VUtils::VectorRefList getVectorRefListAtTime(
const std::string& propertyName,
double time,
bool& ok);
5199 VUtils::ColorRefList getColorRefList(
const char* propertyName);
5200 VUtils::ColorRefList getColorRefList(
const char* propertyName,
bool& ok);
5201 VUtils::ColorRefList getColorRefListAtTime(
const char* propertyName,
double time);
5202 VUtils::ColorRefList getColorRefListAtTime(
const char* propertyName,
double time,
bool& ok);
5203 VUtils::ColorRefList getColorRefList(
const std::string& propertyName);
5204 VUtils::ColorRefList getColorRefList(
const std::string& propertyName,
bool& ok);
5205 VUtils::ColorRefList getColorRefListAtTime(
const std::string& propertyName,
double time);
5206 VUtils::ColorRefList getColorRefListAtTime(
const std::string& propertyName,
double time,
bool& ok);
5208 VUtils::ValueRefList getValueRefList(
const char* propertyName);
5209 VUtils::ValueRefList getValueRefList(
const char* propertyName,
bool& ok);
5210 VUtils::ValueRefList getValueRefListAtTime(
const char* propertyName,
double time);
5211 VUtils::ValueRefList getValueRefListAtTime(
const char* propertyName,
double time,
bool& ok);
5212 VUtils::ValueRefList getValueRefList(
const std::string& propertyName);
5213 VUtils::ValueRefList getValueRefList(
const std::string& propertyName,
bool& ok);
5214 VUtils::ValueRefList getValueRefListAtTime(
const std::string& propertyName,
double time);
5215 VUtils::ValueRefList getValueRefListAtTime(
const std::string& propertyName,
double time,
bool& ok);
5217 VUtils::CharStringRefList getStringRefList(
const char* propertyName);
5218 VUtils::CharStringRefList getStringRefList(
const char* propertyName,
bool& ok);
5219 VUtils::CharStringRefList getStringRefListAtTime(
const char* propertyName,
double time);
5220 VUtils::CharStringRefList getStringRefListAtTime(
const char* propertyName,
double time,
bool& ok);
5221 VUtils::CharStringRefList getStringRefList(
const std::string& propertyName);
5222 VUtils::CharStringRefList getStringRefList(
const std::string& propertyName,
bool& ok);
5223 VUtils::CharStringRefList getStringRefListAtTime(
const std::string& propertyName,
double time);
5224 VUtils::CharStringRefList getStringRefListAtTime(
const std::string& propertyName,
double time,
bool& ok);
5226 VUtils::CharString getCharString(
const char* propertyName);
5227 VUtils::CharString getCharString(
const char* propertyName,
bool& ok);
5228 VUtils::CharString getCharStringAtTime(
const char* propertyName,
double time);
5229 VUtils::CharString getCharStringAtTime(
const char* propertyName,
double time,
bool& ok);
5230 VUtils::CharString getCharString(
const std::string& propertyName);
5231 VUtils::CharString getCharString(
const std::string& propertyName,
bool& ok);
5232 VUtils::CharString getCharStringAtTime(
const std::string& propertyName,
double time);
5233 VUtils::CharString getCharStringAtTime(
const std::string& propertyName,
double time,
bool& ok);
5235 bool setValue(
const char* propertyName,
const VUtils::IntRefList& intList);
5236 bool setValueAtTime(
const char* propertyName,
const VUtils::IntRefList& intList,
double time);
5237 bool setValue(
const std::string& propertyName,
const VUtils::IntRefList& intList);
5238 bool setValueAtTime(
const std::string& propertyName,
const VUtils::IntRefList& intList,
double time);
5240 bool setValue(
const char* propertyName,
const VUtils::FloatRefList& floatList);
5241 bool setValueAtTime(
const char* propertyName,
const VUtils::FloatRefList& floatList,
double time);
5242 bool setValue(
const std::string& propertyName,
const VUtils::FloatRefList& floatList);
5243 bool setValueAtTime(
const std::string& propertyName,
const VUtils::FloatRefList& floatList,
double time);
5245 bool setValue(
const char* propertyName,
const VUtils::VectorRefList& vectorList);
5246 bool setValueAtTime(
const char* propertyName,
const VUtils::VectorRefList& vectorList,
double time);
5247 bool setValue(
const std::string& propertyName,
const VUtils::VectorRefList& vectorList);
5248 bool setValueAtTime(
const std::string& propertyName,
const VUtils::VectorRefList& vectorList,
double time);
5250 bool setValue(
const char* propertyName,
const VUtils::ColorRefList& colorList);
5251 bool setValueAtTime(
const char* propertyName,
const VUtils::ColorRefList& colorList,
double time);
5252 bool setValue(
const std::string& propertyName,
const VUtils::ColorRefList& colorList);
5253 bool setValueAtTime(
const std::string& propertyName,
const VUtils::ColorRefList& colorList,
double time);
5255 bool setValue(
const char* propertyName,
const VUtils::TransformRefList& transformList);
5256 bool setValueAtTime(
const char* propertyName,
const VUtils::TransformRefList& transformList,
double time);
5257 bool setValue(
const std::string& propertyName,
const VUtils::TransformRefList& transformList);
5258 bool setValueAtTime(
const std::string& propertyName,
const VUtils::TransformRefList& transformList,
double time);
5260 bool setValue(
const char* propertyName,
const VUtils::CharStringRefList& stringList);
5261 bool setValueAtTime(
const char* propertyName,
const VUtils::CharStringRefList& stringList,
double time);
5262 bool setValue(
const std::string& propertyName,
const VUtils::CharStringRefList& stringList);
5263 bool setValueAtTime(
const std::string& propertyName,
const VUtils::CharStringRefList& stringList,
double time);
5265 bool setValue(
const char* propertyName,
const VUtils::ValueRefList& valueList);
5266 bool setValueAtTime(
const char* propertyName,
const VUtils::ValueRefList& valueList,
double time);
5267 bool setValue(
const std::string& propertyName,
const VUtils::ValueRefList& valueList);
5268 bool setValueAtTime(
const std::string& propertyName,
const VUtils::ValueRefList& valueList,
double time);
5270 bool setValue(
const char* propertyName,
const VUtils::CharString& str);
5271 bool setValueAtTime(
const char* propertyName,
const VUtils::CharString& str,
double time);
5272 bool setValue(
const std::string& propertyName,
const VUtils::CharString& str);
5273 bool setValueAtTime(
const std::string& propertyName,
const VUtils::CharString& str,
double time);
5284 friend class Internal::BinaryValueBuilder;
5293 int getOutputIndex()
const noexcept {
return outPropIdx; }
5323 template<
class T>
bool operator<(
const PluginRefT<T>& plugin)
const noexcept;
5324 template<
class T>
bool operator<=(
const PluginRefT<T>& plugin)
const noexcept;
5325 template<
class T>
bool operator>(
const PluginRefT<T>& plugin)
const noexcept;
5326 template<
class T>
bool operator>=(
const PluginRefT<T>& plugin)
const noexcept;
5333 return outPropIdx >= 0;
5343 friend std::ostream& operator <<(std::ostream& stream,
const PluginRefT& pluginRef);
5371 PluginRefT(
const T &plugin) noexcept : T(plugin), outPropIdx(0) {}
5383 PluginRefT(
const X &plugin) noexcept : T(
static_cast<X
>(plugin)), outPropIdx(0) {}
5397 bool operator<(
const PluginRefT& plugin)
const noexcept;
5399 bool operator<=(
const PluginRefT& plugin)
const noexcept;
5401 bool operator>(
const PluginRefT& plugin)
const noexcept;
5403 bool operator>=(
const PluginRefT& plugin)
const noexcept;
5411 return outPropIdx >= 0;
5422 friend std::ostream& operator <<(std::ostream& stream,
const PluginRefT<U>& pluginRef);
5427 friend class Internal::BinaryValueParser;
5428 friend class Internal::BinaryValueBuilder;
5429 friend struct Internal::MeshFileDataParser;
5430 friend std::ostream& operator<<(std::ostream& stream,
const Value& value);
5434 char val[VRAY_MAXIMUM4(
sizeof(
Transform),
sizeof(std::string),
sizeof(ValueList),
sizeof(
PluginRef))];
5439 explicit Value(Type type)
noexcept;
5441 void copyValue(
const Value& value);
5442 void moveValue(
Value&& value)
noexcept;
5443 void swapValue(
Value& value)
noexcept;
5444 void destroyValue()
noexcept;
5445 template<
typename T, Type TYPE>
void constructOnly_()
noexcept;
5446 template<
typename T, Type TYPE>
void constructListWithIterators_(
const T* first,
const T* last);
5447 template<
typename T, Type TYPE,
bool noExcept>
void constructWithValue_(T&& value)
noexcept(noExcept);
5448 template<
typename T, Type TYPE>
void setToValue_(T&& value);
5449 template<
typename T> T& interpretAs_();
5450 template<
typename T>
const T& interpretAs_()
const;
5451 template<
typename T, Type TYPE> T& viewAs_();
5452 template<
typename T, Type TYPE>
const T& viewAs_()
const;
5453 template<
typename T, Type TYPE> T getValue_()
const;
5463 explicit
Value(
int value) noexcept;
5464 explicit
Value(
float value) noexcept;
5465 explicit
Value(
double value) noexcept;
5466 explicit
Value(
bool value) noexcept;
5472 explicit
Value(const IntList& value);
5473 explicit
Value(IntList&& value) noexcept;
5474 explicit
Value(const FloatList& value);
5475 explicit
Value(FloatList&& value) noexcept;
5476 explicit
Value(const VectorList& value);
5477 explicit
Value(VectorList&& value) noexcept;
5478 explicit
Value(const ColorList& value);
5479 explicit
Value(ColorList&& value) noexcept;
5480 explicit
Value(TransformList&& value) noexcept;
5481 explicit
Value(const TransformList& value);
5482 explicit
Value(const ValueList& value);
5483 explicit
Value(ValueList&& value) noexcept;
5484 explicit
Value(const StringList& value);
5485 explicit
Value(StringList&& value) noexcept;
5486 explicit
Value(const PluginList& value);
5487 explicit
Value(PluginList&& value) noexcept;
5488 explicit
Value(const
char* value);
5489 explicit
Value(const std::
string& value);
5490 explicit
Value(std::
string&& value) noexcept;
5492 Value(const
int* values,
size_t count);
5493 Value(const
float* values,
size_t count);
5499 template<
size_t count> explicit
Value(const
int(&arr)[count]);
5500 template<
size_t count> explicit
Value(const
float(&arr)[count]);
5501 template<
size_t count> explicit
Value(const
Vector(&arr)[count]);
5502 template<
size_t count> explicit
Value(const
Color(&arr)[count]);
5503 template<
size_t count> explicit
Value(const
Transform(&arr)[count]);
5504 template<
size_t count> explicit
Value(const
Plugin(&arr)[count]);
5505 template<
size_t count> explicit
Value(const
Value(&arr)[count]);
5506 template<
size_t count> explicit
Value(
Value(&&arr)[count]);
5513 void swap(
Value& value) noexcept;
5517 bool operator==(const
Value& value) const noexcept;
5518 bool operator!=(const
Value& value) const noexcept;
5566 void set(const std::
string& value);
5569 void set(std::
string&& value);
5572 void set(const IntList& value);
5578 void set(const FloatList& value);
5584 void set(const ColorList& value);
5590 void set(const VectorList& value);
5596 void set(const TransformList& value);
5599 void set(TransformList&& value);
5602 void set(const ValueList& value);
5608 void set(const StringList& value);
5614 void set(const PluginList& value);
5620 void set(const
int* values,
size_t count);
5623 void set(const
float* values,
size_t count);
5635 void set(const std::
string* values,
size_t count);
5639 template<typename T> T&
as();
5643 template<typename T> const T&
as() const;
5648 template<typename T> T
get() const;
5740 std::ostream&
toString(std::ostream& stream) const;
5743 std::ostream& operator <<(std::ostream& stream, const IntList& list);
5744 std::ostream& operator <<(std::ostream& stream, const FloatList& list);
5745 std::ostream& operator <<(std::ostream& stream, const VectorList& list);
5746 std::ostream& operator <<(std::ostream& stream, const ColorList& list);
5747 std::ostream& operator <<(std::ostream& stream, const TransformList& list);
5748 std::ostream& operator <<(std::ostream& stream, const ValueList& list);
5749 std::ostream& operator <<(std::ostream& stream, const StringList& list);
5750 std::ostream& operator <<(std::ostream& stream, const PluginList& list);
5751 std::ostream& operator <<(std::ostream& stream, const
Value& value);
5804 , hexArraysHash(false)
5805 , hexTransforms(false)
5806 , renderElementsSeparateFolders(false)
5808 , currentFrameOnly(false)
5809 , incremental(false)
5810 , appendFrameSuffix(false)
5813 , rightInterval(0.0)
5814 , vrdataExport(false)
5815 , vrdataSmallBufferSizeLimit(2048)
5816 , vrdataFileSizeLimitMiB(0)
5817 , vrfilesExport(false)
5818 , vrfilesComputeHashes(false)
5848 enum VFBMenuItemType {
5881 enum RenderSizesBitmask {
5883 RS_IMG_SIZE = 1 << 0,
5884 RS_RENDER_RGN = 1 << 1,
5885 RS_CROP_RGN = 1 << 2
5899 enum ReasonsForAutoRename {
5904 NO_OVERWRITE_NO_EXISTING_PLUGIN_BUT_INVALID_PLUGIN_NAME,
5907 NO_OVERWRITE_BUT_EXISTING_PLUGIN_WITH_NAME,
5910 OVERWRITE_EXISTING_PLUGIN_WITH_NAME_BUT_DIFFERENT_TYPE
5936 this->skipOnlyCurrentPlugin =
false;
5937 this->skipAllSuccessorsOfCurrentPlugin =
false;
5938 this->overwriteExistingPlugin =
false;
5941 PreCreateCallbackOptions(
const char* name,
const bool skipOnlyCurrentPlugin =
false,
const bool skipAllSuccessorsOfCurrentPlugin =
false,
const bool overwriteExistingPlugin =
false) {
5945 this->skipOnlyCurrentPlugin = skipOnlyCurrentPlugin;
5946 this->skipAllSuccessorsOfCurrentPlugin = skipAllSuccessorsOfCurrentPlugin;
5947 this->overwriteExistingPlugin = overwriteExistingPlugin;
5950 PreCreateCallbackOptions(
const std::string& name,
const bool skipOnlyCurrentPlugin =
false,
const bool skipAllSuccessorsOfCurrentPlugin =
false,
const bool overwriteExistingPlugin =
false) {
5951 if (!name.empty()) {
5954 this->skipOnlyCurrentPlugin = skipOnlyCurrentPlugin;
5955 this->skipAllSuccessorsOfCurrentPlugin = skipAllSuccessorsOfCurrentPlugin;
5956 this->overwriteExistingPlugin = overwriteExistingPlugin;
5993 VRayRenderer& srcRenderer, VRayRenderer& dstRenderer,
5994 const std::vector<Plugin>& includeListOfPlugins,
const std::vector<Plugin>& excludeListOfPlugins,
5995 Util::PreCreateCallbackOptions(*preCreateCallback)(VRayRenderer& dstRenderer, Plugin& srcPlugin,
void*),
5996 void(*postCreateCallback)(Plugin& dstPlugin,
const char* srcPluginName, Util::ReasonsForAutoRename autoRenamedResult,
const char* preCreateCallbackReturnedName,
void*),
5997 const void* userData =
nullptr);
6030 template<
class T, Util::PreCreateCallbackOptions(T::* TMethod)(VRayRenderer& dstRenderer, Plugin& srcPlugin,
void*),
6031 void(T::* TMethod1)(Plugin& dstPlugin,
const char* srcPluginName, Util::ReasonsForAutoRename autoRenamedResult,
const char* preCreateCallbackReturnedName,
void*)>
6033 VRayRenderer& srcRenderer, VRayRenderer& dstRenderer,
6034 const std::vector<Plugin>& includeListOfPlugins,
const std::vector<Plugin>& excludeListOfPlugins,
6036 const void* userData =
nullptr);
6064 VRayRenderer& srcRenderer, VRayRenderer& dstRenderer,
6065 const char* pluginType,
6066 Util::PreCreateCallbackOptions(*preCreateCallback)(VRayRenderer& dstRenderer, Plugin& srcPlugin,
void*),
6067 void(*postCreateCallback)(Plugin& dstPlugin,
const char* srcPluginName, Util::ReasonsForAutoRename autoRenamedResult,
const char* preCreateCallbackReturnedName,
void*),
6068 const void* userData =
nullptr);
6072 VRayRenderer& srcRenderer, VRayRenderer& dstRenderer,
6073 const std::string& pluginType,
6074 Util::PreCreateCallbackOptions(*preCreateCallback)(VRayRenderer& dstRenderer, Plugin& srcPlugin,
void*),
6075 void(*postCreateCallback)(Plugin& dstPlugin,
const char* srcPluginName, Util::ReasonsForAutoRename autoRenamedResult,
const char* preCreateCallbackReturnedName,
void*),
6076 const void* userData =
nullptr);
6080 VRayRenderer& srcRenderer, VRayRenderer& dstRenderer,
6081 const PluginTypeId& pluginTypeId,
6082 Util::PreCreateCallbackOptions(*preCreateCallback)(VRayRenderer& dstRenderer, Plugin& srcPlugin,
void*),
6083 void(*postCreateCallback)(Plugin& dstPlugin,
const char* srcPluginName, Util::ReasonsForAutoRename autoRenamedResult,
const char* preCreateCallbackReturnedName,
void*),
6084 const void* userData =
nullptr);
6087 template<
class PluginType>
6089 VRayRenderer& srcRenderer, VRayRenderer& dstRenderer,
6090 Util::PreCreateCallbackOptions(*preCreateCallback)(VRayRenderer& dstRenderer, Plugin& srcPlugin,
void*),
6091 void(*postCreateCallback)(Plugin& dstPlugin,
const char* srcPluginName, Util::ReasonsForAutoRename autoRenamedResult,
const char* preCreateCallbackReturnedName,
void*),
6092 const void* userData =
nullptr);
6117 template<
class T, Util::PreCreateCallbackOptions(T::* TMethod)(VRayRenderer& dstRenderer, Plugin& srcPlugin,
void*),
6118 void(T::* TMethod1)(Plugin& dstPlugin,
const char* srcPluginName, Util::ReasonsForAutoRename autoRenamedResult,
const char* preCreateCallbackReturnedName,
void*)>
6120 VRayRenderer& srcRenderer, VRayRenderer& dstRenderer,
6121 const char* pluginType,
6123 const void* userData =
nullptr);
6126 template<
class T, Util::PreCreateCallbackOptions(T::* TMethod)(VRayRenderer& dstRenderer, Plugin& srcPlugin,
void*),
6127 void(T::* TMethod1)(Plugin& dstPlugin,
const char* srcPluginName, Util::ReasonsForAutoRename autoRenamedResult,
const char* preCreateCallbackReturnedName,
void*)>
6129 VRayRenderer& srcRenderer, VRayRenderer& dstRenderer,
6130 const std::string& pluginType,
6132 const void* userData =
nullptr);
6135 template<
class T, Util::PreCreateCallbackOptions(T::* TMethod)(VRayRenderer& dstRenderer, Plugin& srcPlugin,
void*),
6136 void(T::* TMethod1)(Plugin& dstPlugin,
const char* srcPluginName, Util::ReasonsForAutoRename autoRenamedResult,
const char* preCreateCallbackReturnedName,
void*)>
6138 VRayRenderer& srcRenderer, VRayRenderer& dstRenderer,
6139 const PluginTypeId& pluginTypeId,
6141 const void* userData =
nullptr);
6144 template<
class T, Util::PreCreateCallbackOptions(T::* TMethod)(VRayRenderer& dstRenderer, Plugin& srcPlugin,
void*),
6145 void(T::* TMethod1)(Plugin& dstPlugin,
const char* srcPluginName, Util::ReasonsForAutoRename autoRenamedResult,
const char* preCreateCallbackReturnedName,
void*),
6148 VRayRenderer& srcRenderer, VRayRenderer& dstRenderer,
6150 const void* userData =
nullptr);
6175 friend class Internal::Access;
6177 friend int Util::copyPlugins(
6179 const std::vector<Plugin>& includeListOfPlugins,
const std::vector<Plugin>& excludeListOfPlugins,
6181 void(*postCreateCallback)(
Plugin& dstPlugin,
const char* srcPluginName, Util::ReasonsForAutoRename autoRenamedResult,
const char* preCreateCallbackReturnedName,
void*),
6182 const void* userData);
6185 void(T::* TMethod1)(
Plugin& dstPlugin,
const char* srcPluginName, Util::ReasonsForAutoRename autoRenamedResult,
const char* preCreateCallbackReturnedName,
void*)>
6186 friend int Util::copyPlugins(
6188 const std::vector<Plugin>& includeListOfPlugins,
const std::vector<Plugin>& excludeListOfPlugins,
6190 const void* userData);
6192 friend int Util::copyPlugins(
6194 const char* pluginType,
6196 void(*postCreateCallback)(
Plugin& dstPlugin,
const char* srcPluginName, Util::ReasonsForAutoRename autoRenamedResult,
const char* preCreateCallbackReturnedName,
void*),
6197 const void* userData);
6199 friend int Util::copyPlugins(
6201 const std::string& pluginType,
6203 void(*postCreateCallback)(
Plugin& dstPlugin,
const char* srcPluginName, Util::ReasonsForAutoRename autoRenamedResult,
const char* preCreateCallbackReturnedName,
void*),
6204 const void* userData);
6206 friend int Util::copyPlugins(
6208 const PluginTypeId& pluginTypeId,
6210 void(*postCreateCallback)(
Plugin& dstPlugin,
const char* srcPluginName, Util::ReasonsForAutoRename autoRenamedResult,
const char* preCreateCallbackReturnedName,
void*),
6211 const void* userData);
6213 template<
class PluginType>
6214 friend int Util::copyPlugins(
6217 void(*postCreateCallback)(
Plugin& dstPlugin,
const char* srcPluginName, Util::ReasonsForAutoRename autoRenamedResult,
const char* preCreateCallbackReturnedName,
void*),
6218 const void* userData);
6221 void(T::* TMethod1)(
Plugin& dstPlugin,
const char* srcPluginName, Util::ReasonsForAutoRename autoRenamedResult,
const char* preCreateCallbackReturnedName,
void*)>
6222 friend int Util::copyPlugins(
6224 const char* pluginType,
6226 const void* userData);
6229 void(T::* TMethod1)(
Plugin& dstPlugin,
const char* srcPluginName, Util::ReasonsForAutoRename autoRenamedResult,
const char* preCreateCallbackReturnedName,
void*)>
6230 friend int Util::copyPlugins(
6232 const std::string& pluginType,
6234 const void* userData);
6237 void(T::* TMethod1)(
Plugin& dstPlugin,
const char* srcPluginName, Util::ReasonsForAutoRename autoRenamedResult,
const char* preCreateCallbackReturnedName,
void*)>
6238 friend int Util::copyPlugins(
6240 const PluginTypeId& pluginTypeId,
6242 const void* userData);
6245 void(T::* TMethod1)(
Plugin& dstPlugin,
const char* srcPluginName, Util::ReasonsForAutoRename autoRenamedResult,
const char* preCreateCallbackReturnedName,
void*),
6247 friend int Util::copyPlugins(
6250 const void* userData);
6253 static void pluginCopyParamsPreCreateCallback(
const InstanceId srcPluginID, Internal::PreCreateCallbackOptions* opts,
void* info);
6254 static void pluginCopyParamsPostCreateCallback(
6255 const InstanceId dstPluginID,
const char* srcPluginName,
6256 Util::ReasonsForAutoRename autoRenamedResult,
const char* preCreateCallbackReturnedName,
6259 class PluginCopyParamsCreateDelegate {
6263 typedef void (*tstubPost)(
void* pobject,
Plugin& dstPlugin,
const char* srcPluginName, Util::ReasonsForAutoRename autoRenamedResult,
const char* preCreateCallbackReturnedName,
void* userObj);
6264 typedef void (*tfuncPost)(
Plugin& dstPlugin,
const char* srcPluginName, Util::ReasonsForAutoRename autoRenamedResult,
const char* preCreateCallbackReturnedName,
void* userObj);
6270 tmethodPre() : pstubPre() {}
6271 tmethodPre(tstubPre pstubPre) : pstubPre(pstubPre) {}
6272 tmethodPre(tfuncPre pfuncPre) : pfuncPre(pfuncPre) {}
6276 tstubPost pstubPost;
6277 tfuncPost pfuncPost;
6278 tmethodPost() : pstubPost() {}
6279 tmethodPost(tstubPost pstubPost) : pstubPost(pstubPost) {}
6280 tmethodPost(tfuncPost pfuncPost) : pfuncPost(pfuncPost) {}
6287 template <
class T, Util::PreCreateCallbackOptions(T::* PreCreateTMethod)(VRayRenderer& dstRenderer, Plugin& srcPlugin,
void* puserObj)>
6289 T* p =
static_cast<T*
>(pobject);
6290 return (p->*PreCreateTMethod)(dstRenderer, srcPlugin, puserObj);
6293 template <
class T,
void(T::* PostCreateTMethod)(Plugin& dstPlugin, const
char* srcPluginName, Util::ReasonsForAutoRename autoRenamedResult, const
char* preCreateCallbackReturnedName,
void* puserObj)>
6294 static void method_stubPost(
void* pobject,
Plugin& dstPlugin,
const char* srcPluginName, Util::ReasonsForAutoRename autoRenamedResult,
const char* preCreateCallbackReturnedName,
void* puserObj) {
6295 T* p =
static_cast<T*
>(pobject);
6296 (p->*PostCreateTMethod)(dstPlugin, srcPluginName, autoRenamedResult, preCreateCallbackReturnedName, puserObj);
6299 PluginCopyParamsCreateDelegate(tfuncPre pfuncPre, tfuncPost pfuncPost,
void* puserObj,
VRayRenderer* srcRenderer,
VRayRenderer* dstRenderer) :
6300 pobject(), pmethodPre(pfuncPre), pmethodPost(pfuncPost), puserObj(puserObj), srcRenderer(srcRenderer), dstRenderer(dstRenderer) {}
6301 PluginCopyParamsCreateDelegate(
void* pobject, tstubPre pstubPre, tstubPost pstubPost,
void* puserObj,
VRayRenderer* srcRenderer,
VRayRenderer* dstRenderer) :
6302 pobject(pobject), pmethodPre(pstubPre), pmethodPost(pstubPost), puserObj(puserObj), srcRenderer(srcRenderer), dstRenderer(dstRenderer) {}
6306 void(T::* PostCreateTMethod)(
Plugin& dstPlugin,
const char* srcPluginName, Util::ReasonsForAutoRename autoRenamedResult,
const char* preCreateCallbackReturnedName,
void*)>
6307 static PluginCopyParamsCreateDelegate from_method(T* pobject,
void* puserObj,
VRayRenderer* srcRenderer,
VRayRenderer* dstRenderer) {
6308 return PluginCopyParamsCreateDelegate(pobject, &method_stubPre<T, PreCreateTMethod>, &method_stubPost<T, PostCreateTMethod>, puserObj, srcRenderer, dstRenderer);
6311 static PluginCopyParamsCreateDelegate from_function(tfuncPre pfuncPre, tfuncPost pfuncPost,
void* puserObj,
VRayRenderer* srcRenderer,
VRayRenderer* dstRenderer) {
6312 return PluginCopyParamsCreateDelegate(pfuncPre, pfuncPost, puserObj, srcRenderer, dstRenderer);
6316 Plugin srcPlugin = srcRenderer->getPlugin_internal(srcPluginID);
6317 return pobject ? (*pmethodPre.pstubPre)(pobject, *dstRenderer, srcPlugin, puserObj) : (*pmethodPre.pfuncPre)(*dstRenderer, srcPlugin, puserObj);
6320 void operator()(
const InstanceId& dstPluginID,
const char* srcPluginName, Util::ReasonsForAutoRename autoRenamedResult,
const char* preCreateCallbackReturnedName)
const {
6321 Plugin dstPlugin = dstRenderer->getPlugin_internal(dstPluginID);
6322 pobject ? (*pmethodPost.pstubPost)(pobject, dstPlugin, srcPluginName, autoRenamedResult, preCreateCallbackReturnedName, puserObj) :
6323 (*pmethodPost.pfuncPost)(dstPlugin, srcPluginName, autoRenamedResult, preCreateCallbackReturnedName, puserObj);
6333 class PluginFilterDelegate {
6334 typedef bool (*tstub)(
void* pobject,
VRayRenderer& renderer,
const char* type, std::string& name,
void* userObj);
6335 typedef bool (*tfunc)(
VRayRenderer& renderer,
const char* type, std::string& name,
void* userObj);
6341 tmethod() : pstub() {}
6342 tmethod(tstub pstub) : pstub(pstub) {}
6343 tmethod(tfunc pfunc) : pfunc(pfunc) {}
6348 template <
class T,
bool (T::*TMethod)(VRayRenderer&, const
char* type, std::
string& name,
void* puserObj)>
6349 static bool method_stub(
void* pobject,
VRayRenderer& renderer,
const char* type, std::string& name,
void *puserObj) {
6350 T* p =
static_cast<T*
>(pobject);
6351 return (p->*TMethod)(renderer, type, name, puserObj);
6354 PluginFilterDelegate(tfunc pfunc,
void *puserObj,
VRayRenderer& renderer) : pobject(), pmethod(pfunc), puserObj(puserObj), renderer(renderer) {}
6355 PluginFilterDelegate(
void *pobject, tstub pstub,
void *puserObj,
VRayRenderer& renderer) : pobject(pobject), pmethod(pstub), puserObj(puserObj), renderer(renderer) {}
6358 template <
class T,
bool (T::*TMethod)(VRayRenderer&, const
char*, std::
string&,
void*)>
6359 static PluginFilterDelegate from_method(T* pobject,
void *puserObj,
VRayRenderer& renderer) {
6360 return PluginFilterDelegate(pobject, &method_stub<T, TMethod>, puserObj, renderer);
6363 static PluginFilterDelegate from_function(tfunc pfunc,
void *puserObj,
VRayRenderer& renderer) {
6364 return PluginFilterDelegate(pfunc, puserObj, renderer);
6367 bool operator()(
const char* type, std::string& name)
const {
6368 return pobject ? (*pmethod.pstub)(pobject, renderer, type, name, puserObj) : (*pmethod.pfunc)(renderer, type, name, puserObj);
6372 template<
class T,
void (T::*TMethod)(VRayRenderer&, RendererState oldState, RendererState newState,
double instant,
void* userData)>
6373 static void stateChangedCallbackT(
const Internal::StateChangedParams* params);
6374 static void stateChangedCallback(
const Internal::StateChangedParams* params);
6376 template<
class T,
void (T::*TMethod)(VRayRenderer&,
double instant,
void* userData)>
6377 static void rendererCloseCallbackT(
const Internal::CallbackParamsBase* params);
6378 static void rendererCloseCallback(
const Internal::CallbackParamsBase* params);
6380 template<
class T,
void (T::*TMethod)(VRayRenderer&, VRayImage* img,
unsigned long long changeIndex, ImagePassType pass,
double instant,
void* userData)>
6381 static void progressiveImageUpdatedCallbackT(
const Internal::ImageUpdatedParams* params);
6382 static void progressiveImageUpdatedCallback(
const Internal::ImageUpdatedParams* params);
6384 template<
class T,
void (T::*TMethod)(VRayRenderer& renderer, const
char* msg, MessageLevel level,
double instant,
void* userData)>
6385 static void logMessageCallbackT(
const Internal::LogMessageParams* params);
6386 static void logMessageCallback(
const Internal::LogMessageParams* params);
6388 template<
class T,
void (T::*TMethod)(VRayRenderer& renderer, const
char* msg,
int errorCode, LicenseUserStatus userStatus,
double instant,
void* userData)>
6389 static void licenseErrorCallbackT(
const Internal::LicenseErrorParams* params);
6390 static void licenseErrorCallback(
const Internal::LicenseErrorParams* params);
6392 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)>
6393 static void bucketInitCallbackT(
const Internal::BucketInitParams* params);
6394 static void bucketInitCallback(
const Internal::BucketInitParams* params);
6396 template<
class T,
void (T::*TMethod)(VRayRenderer& renderer,
int x,
int y, const
char* host, VRayImage* image, ImagePassType pass,
double instant,
void* userData)>
6397 static void bucketReadyCallbackT(
const Internal::BucketReadyParams* params);
6398 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)>
6399 static void bucketReadyCallback1T(
const Internal::BucketReadyParams* params);
6400 static void bucketReadyCallback(
const Internal::BucketReadyParams* params);
6401 static void bucketReadyCallback1(
const Internal::BucketReadyParams* params);
6403 template<
class T,
void (T::*TMethod)(VRayRenderer&, const
char* msg,
int elementNumber,
int elementsCount,
double instant,
void* userData)>
6404 static void progressCallbackT(
const Internal::ProgressParams* params);
6405 static void progressCallback(
const Internal::ProgressParams* params);
6407 template<
class T,
void (T::*TMethod)(VRayRenderer&, const
char* propName,
double instant,
void* userData)>
6408 static void renderViewChangedCallbackT(
const Internal::RenderViewChangedParams* params);
6409 static void renderViewChangedCallback(
const Internal::RenderViewChangedParams* params);
6411 template<
class T,
void (T::*TMethod)(VRayRenderer&,
bool isRendering,
double instant,
void* userData)>
6412 static void vfbRenderLastCallbackT(
const Internal::RenderLastParams* params);
6413 static void vfbRenderLastCallback(
const Internal::RenderLastParams* params);
6415 template<
class T,
void (T::*TMethod)(VRayRenderer&, const
char* hostName,
double instant,
void* userData)>
6416 static void drHostConnectedCallbackT(
const Internal::ConnectParams* params);
6417 static void drHostConnectedCallback(
const Internal::ConnectParams* params);
6419 template<
class T,
void(T::*TMethod)(VRayRenderer&,
int commandId,
int x,
int y,
void* userData)>
6420 static void vfbContextMenuSelectedCallbackT(
const Internal::VFBContextMenuSelectedParams* params);
6421 static void vfbContextMenuSelectedCallback(
const Internal::VFBContextMenuSelectedParams* params);
6423 static char* pluginFilterCallback(
const char* pluginType,
const char* pluginName,
void* userObject);
6424 static void deleteTempStringCallback(
char*,
size_t, std::string* str);
6427 template<
class T,
void(T::*TMethod)(VRayRenderer&, VRayImage* img,
void* userData)>
6428 static void manualDenoiseCallbackT(
VRayImage* img,
void* info);
6429 static void manualDenoiseCallback(
VRayImage* img,
void* info);
6431 template<
class T,
int(T::*TMethod)(VRayRenderer&, const std::vector<LightMixChange>& lightMixChanges,
double instant,
void* userData)>
6432 static int lightMixTransferToSceneCallbackT(Internal::LightMixCallbackParams* params);
6433 static int lightMixTransferToSceneCallback(Internal::LightMixCallbackParams* params);
6434 void transferToScenePreCallback(std::vector<LightMixChange>& changes,
const Internal::LightMixCallbackParams* params);
6435 void transferToScenePostCallback(
const std::vector<LightMixChange>& changes, Internal::LightMixCallbackParams* params);
6437 template<
class T,
int(T::*TMethod)(VRayRenderer&, const std::vector<std::
string>& fileList,
double instant,
void* userData)>
6438 static int uploadToCollaborationCallbackT(Internal::UploadToCollaborationParams* params);
6439 static int uploadToCollaborationCallback(Internal::UploadToCollaborationParams* params);
6440 void uploadToCollaborationPreCallback(std::vector<std::string>& fileList,
const Internal::UploadToCollaborationParams* params);
6442 template<
class T,
int(T::*TMethod)(VRayRenderer&, const std::vector<std::
string>& fileList,
double instant,
void* userData)>
6443 static int enhanceOnCollaborationCallbackT(Internal::UploadToCollaborationParams* params);
6444 static int enhanceOnCollaborationCallback(Internal::UploadToCollaborationParams* params);
6445 void enhanceOnCollaborationPreCallback(std::vector<std::string>& fileList,
const Internal::UploadToCollaborationParams* params);
6447 template<
class T,
void (T::* TMethod)(VRayRenderer&,
int enabled,
int mode,
int selectionLocked,
double instant,
void* userData)>
6448 static void debugShadingCallbackT(
const Internal::DebugShadingCallbackParams* params);
6449 static void debugShadingCallback(
const Internal::DebugShadingCallbackParams* params);
6451 template<
class T,
void(T::*TMethod)(VRayRenderer&, const std::
string &outputFile,
int fileType,
double instant,
void* userData)>
6452 static void vrayProfilerWriteCallbackT(
const Internal::VRayProfilerWriteParams* params);
6453 static void vrayProfilerWriteCallback(
const Internal::VRayProfilerWriteParams* params);
6455 template<
class T,
bool (T::*TMethod)(VRayRenderer&, VFBRenderElementType type,
double instant,
void* userData)>
6456 static int vfbAddRenderElementToSceneT(
const Internal::AddRenderElementToSceneParams* params);
6457 static int vfbAddRenderElementToScene(
const Internal::AddRenderElementToSceneParams* params);
6459 template<
class T,
void (T::*TMethod)(VRayRenderer&, VFBMouseButton button,
int x,
int y,
bool ctrl,
bool shift,
void* userData)>
6460 static void vfbClickT(
const Internal::VFBClickParams* params);
6461 static void vfbClick(
const Internal::VFBClickParams* params);
6464 typedef void* InstanceHandleType;
6470 Internal::VRayRendererNative *rendererNative;
6476 VFB() : autoCommit(
true),
6477 layerManager(*
this),
6478 historyManager(*
this),
6479 toolbarManager(*
this) {}
6481 VFB& operator=(
const VFB&);
6486 void show(
bool show,
bool setFocus =
true);
6522 VFBState*
getState(
size_t& dataSize,
bool includeMain =
true,
bool includeHistory =
true)
const;
6531 void setState(
const void* vfbStateData,
size_t dataSize,
bool setMain =
true,
bool setHistory =
true);
6882 if (&myLayerManager == &rhs.myLayerManager) {
6883 layerUID = rhs.layerUID;
6889 bool operator==(
const Layer& rhs)
const {
6890 return layerUID == rhs.layerUID && &myLayerManager == &rhs.myLayerManager;
6893 Layer(
const int& layerUID,
const LayerManager& layerManager) :
6894 layerUID(layerUID), myLayerManager(layerManager){
6897 void invalidateLayer()
const {
6898 layerUID = NO_LAYER_ID;
6901 const LayerManager& myLayerManager;
6902 mutable LayerUID layerUID;
7091 void* original = errMsgHandle.exchange(
nullptr);
7093 Internal::releaseCharString(&original);
7099 void* original = (
void*)errMsgHandle;
7100 return Internal::getCharStringContent(&original);
7105 Internal::VRayRendererNative* getNativeRenderer()
const {
7106 return myVfb.rendererNative;
7110 void handleError(
void*& errorMsgHandlePtr,
const bool throwException =
true)
const {
7111 const char* errstr =
nullptr;
7112 if (throwException) {
7113 errstr = Internal::getCharStringContent(&errorMsgHandlePtr);
7115 void* oldErr = errMsgHandle.exchange(errorMsgHandlePtr);
7116 Internal::releaseCharString(&oldErr);
7117 if (throwException) {
7118 throw VFBLayerErr(errstr);
7122 void handleError(
void*& errorMsgHandlePtr,
const bool throwException =
false)
const {
7123 void* oldErr = errMsgHandle.exchange(errorMsgHandlePtr);
7124 Internal::releaseCharString(&oldErr);
7128 void getLayerListAndReleaseIDs(std::vector<Layer>& layers, LayerUID*& layerIDs,
const int len)
const {
7129 layers.reserve(len);
7130 for (
int i = 0; i < len; i++) {
7131 layers.push_back(Layer(layerIDs[i], *
this));
7133 Internal::C_memory_free(layerIDs);
7136 static void getStringListAndReleaseCharStars(std::vector<std::string>& words,
char*& cStyleWords,
const int len) {
7138 const char* curr = cStyleWords;
7139 for (
int i = 0; i < len; i++) {
7140 words.emplace_back(curr);
7141 curr += words[i].size() + 1;
7143 Internal::C_memory_free(cStyleWords);
7146 Layer getCommonLayer(
int (*layerLoader)(Internal::VRayRendererNative* renderer, LayerUID* layerID,
void** errorMsgHandlePtr))
const {
7147 LayerUID layerID = NO_LAYER_ID;
7148 void* errorMsgHandlePtr =
nullptr;
7149 int err = layerLoader(myVfb.rendererNative, &layerID, &errorMsgHandlePtr);
7151 handleError(errorMsgHandlePtr);
7152 return Layer(NO_LAYER_ID, *
this);
7154 return Layer(layerID, *
this);
7158 const VRayRenderer::VFB& myVfb;
7159 mutable std::atomic<void*> errMsgHandle;
7208 Internal::VRayRendererNative* getNativeRenderer()
const {
7209 return myVfb.rendererNative;
7357 Internal::VRayRendererNative* getNativeRenderer()
const {
7358 return myVfb.rendererNative;
7386 VRAY_DEPRECATED(
"getWindowHandle in unsafe and deprecated - use getNativeHandle or getQWidget instead")
7387 void* getWindowHandle() const;
7394 NativeWidgetHandle getNativeHandle() const;
7397 APPSDK_QT_NAMESPACE::QWidget* getQWidget() const;
7403 VRAY_DEPRECATED("setParentWindow in unsafe and deprecated - use setNativeParentWindow or setQWidgetParent instead")
7404 void setParentWindow(
void* hWnd);
7411 void setNativeParentWindow(NativeWindowHandle handle);
7415 void setQWidgetParent(APPSDK_QT_NAMESPACE::QWidget* parentWidget);
7421 bool getMinimumSize(
int& w,
int& h) const;
7426 bool loadColorCorrectionsPreset(const
char* filename);
7429 bool loadColorCorrectionsPreset(const std::
string& filename);
7434 bool saveColorCorrectionsPreset(const
char* filename) const;
7437 bool saveColorCorrectionsPreset(const std::
string& filename) const;
7442 bool setTitlePrefix(const
char* prefix);
7445 bool setTitlePrefix(const std::
string& prefix);
7450 bool setProjectPath(const
char *projectPath);
7453 bool setProjectPath(const std::
string& projectPath);
7457 void enableProgressBar(
bool enable = true);
7462 void setProgressText(const
char* text);
7465 void setProgressText(const std::
string& text);
7470 void setProgressValue(
float value = -1.0f);
7476 void setProgressTextAndValue(const
char* text,
float value);
7479 void setProgressTextAndValue(const std::
string& text,
float value);
7485 bool fillSettingsVFB(const
char* instanceName = NULL);
7488 bool fillSettingsVFB(const std::
string& instanceName);
7493 bool applySettingsVFB();
7498 bool loadImage(const
char* filename);
7501 bool loadImage(const std::
string& filename);
7505 bool saveImage(const
char* fileName) const;
7508 bool saveImage(const std::
string& fileName) const;
7523 void setUpdateAvailable(
bool available);
7528 void logMessage(MessageLevel level, const
char* message);
7531 void logMessage(MessageLevel level, const std::
string& message);
7538 void appendAdditionalStyleSheet(const
char *styleSheet);
7543 RENDER_MODE_PRODUCTION = -1,
7544 RENDER_MODE_INTERACTIVE = 0,
7545 RENDER_MODE_INTERACTIVE_CUDA = 4,
7546 RENDER_MODE_INTERACTIVE_OPTIX = 7,
7547 RENDER_MODE_INTERACTIVE_METAL = 8,
7548 RENDER_MODE_PRODUCTION_CUDA = 104,
7549 RENDER_MODE_PRODUCTION_OPTIX = 107,
7550 RENDER_MODE_PRODUCTION_METAL = 108,
7557 static bool isActiveState(RendererState value) {
return !isInactiveState(value); }
7562 return Internal::VRay_VRayRenderer_halfResolutionMode
7563 (getNativeRenderer());
7566 LicenseError licErr;
7567 PluginTypeId* pluginTypeIds;
7568 int pluginTypeIdsCount;
7570 void createInstance(
const Internal::RendererOptions_internal* options);
7571 int findPluginIdIndex(PluginTypeId typeId)
const;
7598 operator bool()
const;
7724 const char* propName;
7731 const char* vstring;
7741 const char* camName;
7751 const char* lightName;
7756 enum UserSceneManipType { USMType_Transform_Set = 0, USMType_Show = 1, USMType_Hide = 2 };
7758 enum UserSceneNodeObjectType { USNOType_Node = 0, USNOType_Camera = 1, USNOType_Light = 2 };
7765 const char* objName;
7767 UserSceneManipType umt;
7769 UserSceneNodeObjectType objType;
7886 bool setImageSize(
int width,
int height,
bool resetCropRegion =
true,
bool resetRenderRegion =
true);
7900 bool getCropRegion(
int& srcWidth,
int& srcHeight,
float& rgnLeft,
float& rgnTop,
float& rgnWidth,
float& rgnHeight)
const;
7914 bool setCropRegion(
int srcWidth,
int srcHeight,
float rgnLeft,
float rgnTop,
float rgnWidth,
float rgnHeight);
7933 int load(
const std::string& fileName);
7955 template<
typename T =
void>
7956 int loadAsText(
const char* text,
size_t length,
void(*freeFn)(
char* text,
size_t size, T* holderObject) = NULL, T* holderObject = NULL);
7962 int append(
const char* fileName,
bool drSendNameOnly =
false);
7965 int append(
const std::string& fileName,
bool drSendNameOnly =
false);
7972 int append(
const std::vector<const char*> &fileNames);
7975 int append(
const std::vector<std::string> &fileNames);
8005 template<
typename T =
void>
8006 int appendAsText(
const char* text,
size_t length,
void(*freeFn)(
char* text,
size_t size, T* holderObject) = NULL, T* holderObject = NULL);
8017 int loadFiltered(
const char* fileName,
bool (*callback)(
VRayRenderer&,
const char* pluginType, std::string& pluginName,
void*),
const void* userData = NULL);
8020 int loadFiltered(
const std::string& fileName,
bool(*callback)(
VRayRenderer&,
const char* pluginType, std::string& pluginName,
void*),
const void* userData = NULL);
8033 template<
class T,
bool (T::*TMethod)(VRayRenderer&, const
char* pluginType, std::
string& pluginName,
void*)>
8034 int loadFiltered(
const char* fileName, T& obj,
const void* userData = NULL);
8037 template<
class T,
bool (T::*TMethod)(VRayRenderer&, const
char* pluginType, std::
string& pluginName,
void*)>
8038 int loadFiltered(
const std::string& fileName, T& obj,
const void* userData = NULL);
8049 int appendFiltered(
const char* fileName,
bool(*callback)(
VRayRenderer&,
const char* pluginType, std::string& pluginName,
void*),
const void* userData = NULL);
8052 int appendFiltered(
const std::string& fileName,
bool(*callback)(
VRayRenderer&,
const char* pluginType, std::string& pluginName,
void*),
const void* userData = NULL);
8065 template<
class T,
bool (T::*TMethod)(VRayRenderer&, const
char* pluginType, std::
string& pluginName,
void*)>
8069 template<
class T,
bool (T::*TMethod)(VRayRenderer&, const
char* pluginType, std::
string& pluginName,
void*)>
8070 int appendFiltered(
const std::string& fileName, T& obj,
const void* userData = NULL);
8084 template<
class T,
bool (T::*TMethod)(VRayRenderer&, const
char* pluginType, std::
string& pluginName,
void*)>
8085 int appendFiltered(
const std::vector<const char*> &fileNames, T& obj,
const void* userData = NULL);
8088 template<
class T,
bool (T::*TMethod)(VRayRenderer&, const
char* pluginType, std::
string& pluginName,
void*)>
8089 int appendFiltered(
const std::vector<std::string> &fileNames, T& obj,
const void* userData = NULL);
8101 int appendFiltered(
const std::vector<const char*> &fileNames,
bool(*callback)(
VRayRenderer&,
const char* pluginType, std::string& pluginName,
void*),
const void* userData = NULL);
8104 int appendFiltered(
const std::vector<std::string> &fileNames,
bool(*callback)(
VRayRenderer&,
const char* pluginType, std::string& pluginName,
void*),
const void* userData = NULL);
8112 int loadAsTextFiltered(
const std::string& fileName,
bool(*callback)(
VRayRenderer&,
const char* pluginType, std::string& pluginName,
void*),
const void* userData = NULL);
8116 template<
class T,
bool (T::*TMethod)(VRayRenderer&, const
char* pluginType, std::
string& pluginName,
void*)>
8120 template<
class T,
bool (T::*TMethod)(VRayRenderer&, const
char* pluginType, std::
string& pluginName,
void*)>
8132 template<
class T,
bool (T::*TMethod)(VRayRenderer&, const
char* pluginType, std::
string& pluginName,
void*)>
8136 template<
class T,
bool (T::*TMethod)(VRayRenderer&, const
char* pluginType, std::
string& pluginName,
void*)>
8151 template<
class T,
bool (T::*TMethod)(VRayRenderer&, const
char* pluginType, std::
string& pluginName,
void*)>
8155 template<
class T,
bool (T::*TMethod)(VRayRenderer&, const
char* pluginType, std::
string& pluginName,
void*)>
8168 int appendAsTextFiltered(
const std::vector<const char*> &sceneTexts,
bool(*callback)(
VRayRenderer&,
const char* pluginType, std::string& pluginName,
void*),
const void* userData = NULL);
8171 int appendAsTextFiltered(
const std::vector<std::string> &sceneTexts,
bool(*callback)(
VRayRenderer&,
const char* pluginType, std::string& pluginName,
void*),
const void* userData = NULL);
8243 AddHostsResult
addHosts(
const std::string& hosts)
const;
8344 AwaitingOrIdle = -1,
8388 template <
class T,
class RetT = T> std::vector<RetT>
getPlugins()
const;
8391 std::vector<Plugin>
getPlugins(
const char* pluginClassName)
const;
8394 std::vector<Plugin>
getPlugins(
const std::string& pluginClassName)
const;
8506 template<
class T,
void (T::*TMethod)(VRayRenderer&, RendererState oldState, RendererState newState,
double instant,
void* userData)>
8515 template<
class T,
void (T::*TMethod)(VRayRenderer&,
double instant,
void* userData)>
8527 template<
class T,
void (T::*TMethod)(VRayRenderer&, VRayImage* img,
unsigned long long changeIndex, ImagePassType pass,
double instant,
void* userData)>
8536 void setOnLogMessage(
void(*callback)(
VRayRenderer&,
const char* msg, MessageLevel level,
double instant,
void* userData), MessageLevel minLevel=MessageInfo,
const void* userData = NULL);
8538 template<
class T,
void (T::*TMethod)(VRayRenderer& renderer, const
char* msg, MessageLevel level,
double instant,
void* userData)>
8539 void setOnLogMessage(T&
object, MessageLevel minLevel = MessageInfo,
const void* userData = NULL);
8548 void setOnLicenseError(
void(*callback)(
VRayRenderer&,
const char* msg,
int errorCode, LicenseUserStatus userStatus,
double instant,
void* userData),
const void* userData = NULL);
8550 template<
class T,
void (T::*TMethod)(VRayRenderer& renderer, const
char* msg,
int errorCode, LicenseUserStatus userStatus,
double instant,
void* userData)>
8563 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);
8565 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)>
8579 template<
class T,
void (T::*TMethod)(VRayRenderer&,
int x,
int y, const
char* host, VRayImage* img, ImagePassType pass,
double instant,
void* userData)>
8592 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);
8594 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)>
8609 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);
8611 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)>
8622 void setOnProgress(
void(*callback)(
VRayRenderer&,
const char* msg,
int elementNumber,
int elementsCount,
double instant,
void* userData),
const void* userData = NULL);
8624 template<
class T,
void (T::*TMethod)(VRayRenderer&, const
char* msg,
int elementNumber,
int elementsCount,
double instant,
void* userData)>
8634 template<
class T,
void (T::*TMethod)(VRayRenderer&, const
char* propName,
double instant,
void* userData)>
8644 template<
class T,
void (T::*TMethod)(VRayRenderer&,
bool isRendering,
double,
void* userData)>
8654 template<
class T,
void (T::*TMethod)(VRayRenderer&,
bool isRendering,
double instant,
void* userData)>
8663 template<
class T,
void (T::*TMethod)(VRayRenderer&,
double instant,
void* userData)>
8672 template<
class T,
void (T::*TMethod)(VRayRenderer&,
double instant,
void* userData)>
8682 template<
class T,
void (T::*TMethod)(VRayRenderer&,
double instant,
void* userData)>
8691 template<
class T,
void (T::*TMethod)(VRayRenderer&,
double instant,
void* userData)>
8701 template<
class T,
void (T::*TMethod)(VRayRenderer&, const
char* hostName,
double instant,
void* userData)>
8711 template<
class T,
void (T::*TMethod)(VRayRenderer&, const
char* hostName,
double instant,
void* userData)>
8720 template<
class T,
void (T::*TMethod)(VRayRenderer&,
double instant,
void* userData)>
8728 template<
class T,
void (T::*TMethod)(VRayRenderer&,
double instant,
void* userData)>
8751 template<
class T,
void (T::*TMethod)(VRayRenderer&,
int enabled,
int mode,
int selectionLocked,
double instant,
void* userData)>
8762 template<
class T,
void(T::*TMethod)(VRayRenderer&,
int commandId,
int x,
int y,
void* userData)>
8770 template<
class T,
void (T::*TMethod)(VRayRenderer&,
double instant,
void* userData)>
8781 template<
class T,
int(T::*TMethod)(VRayRenderer&, const std::vector<LightMixChange>& lightMixChanges,
double instant,
void* userData)>
8792 template<
class T,
int(T::*TMethod)(VRayRenderer&, const std::vector<std::
string>& fileList,
double instant,
void* userData)>
8803 template<
class T,
int(T::*TMethod)(VRayRenderer&, const std::vector<std::
string>& fileList,
double instant,
void* userData)>
8814 template<
class T,
void (T::*TMethod)(VRayRenderer&,
bool isRendering,
double instant,
void* userData)>
8825 template<
class T,
void (T::*TMethod)(VRayRenderer&,
bool isRendering,
double instant,
void* userData)>
8837 template<
class T,
bool (T::*TMethod)(VRayRenderer&, VFBRenderElementType type,
double instant,
void* userData)>
8848 void setOnVFBClick(
void(*callback)(
VRayRenderer&, VFBMouseButton button,
int x,
int y,
bool ctrl,
bool shift,
void* userData),
const void* userData = NULL);
8850 template<
class T,
void (T::* TMethod)(VRayRenderer&, VFBMouseButton button,
int x,
int y,
bool ctrl,
bool shift,
void* userData)>
8911 template<
class T> T
getPlugin(
const char *pluginName)
const;
8914 template<
class T> T
getPlugin(
const std::string &pluginName)
const;
8947 template<
class T> T
newPlugin(
const std::string& pluginName);
9011 std::vector<PickedPluginInfo>
pickPlugins(
double x,
double y,
int maxcount = 0,
int timeout = -1)
const;
9180 template<
class T,
void (T::*TMethod)(VRayRenderer&, VRayImage*,
void*)>
9181 bool denoiseNow(T&
object,
bool shouldPassImage =
true,
const void* userData = NULL);
9240 } profiler{ *
this };
9279 template<
class T,
void(T::*TMethod)(VRayRenderer&, const std::
string &outputFile,
int fileType,
double instant,
void* userData)>
9287 Internal::VRayRendererNative* getNativeRenderer()
const;
9288 static VRayRenderer* getVRayRenderer(
void* rendererNative);
9290 InstanceId getPluginId_internal(
const char* pluginName, PluginTypeId& outTypeId)
const;
9291 PluginTypeId getPluginTypeId_internal(
const char* pluginType)
const;
9292 PluginTypeId getPluginTypeId_internal(InstanceId pluginID)
const;
9293 const char* getPluginTypeString(PluginTypeId pluginTypeId)
const;
9294 Plugin getPlugin_internal(InstanceId pluginID)
const;
9295 template<
class T> T getPlugin_internal(InstanceId pluginID)
const;
9296 const char* getPluginName_internal(InstanceId pluginID)
const;
9297 bool pluginExists_internal(InstanceId pluginID)
const;
9299 int getPropertyIndexFromName(InstanceId pluginID,
const char* propertyName)
const;
9300 const char* getPropertyNameFromIndex(InstanceId pluginID,
int idx)
const;
9301 template<
class T>
static std::vector<T> getPluginsOfType(
VRayRenderer& renderer,
const char* pluginType);
9302 template<
class T>
static std::vector<T> getPluginsOfTypeId(
VRayRenderer& renderer, PluginTypeId typeId);
9303 static std::vector<std::string> getStringVector(
void *pvector);
9304 static std::vector<const char*> getCharPtrVector(
const std::vector<std::string> &strVector);
9305 std::vector<std::string> getPluginPropertyNames(
const char* pluginClassName)
const;
9306 const char* getPluginType(
const char* name)
const;
9307 const char* getPluginType(InstanceId pluginID)
const;
9308 bool setPluginName(InstanceId pluginID,
const char* name)
const;
9309 Type getPluginPropertyRuntimeType(
const char* pluginName,
const char* propertyName)
const;
9310 Type getPluginPropertyRuntimeType(InstanceId pluginID,
const char* propertyName)
const;
9311 int getPluginPropertyElementsCount(InstanceId pluginID,
const char* propertyName)
const;
9312 const void* getPluginPropertyDefinition(
const char* pluginName,
const char* propertyName)
const;
9313 const void* getPluginPropertyDefinition(InstanceId pluginID,
const char* propertyName)
const;
9314 const void* getPluginPropertyDefinitionFromClass(
const char* pluginClassName,
const char* propertyName)
const;
9315 std::string getPluginPropertyValueAsString(
const char* pluginName,
const char* propertyName,
double time)
const;
9316 std::string getPluginPropertyValueAsString(InstanceId pluginID,
const char* propertyName,
bool& ok,
double time)
const;
9317 bool setPluginPropertyValueAsString(InstanceId pluginID,
const char* propertyName,
const char* value)
const;
9318 bool setPluginPropertyValueAsStringAtTime(InstanceId pluginID,
const char* propertyName,
const char* value,
double time)
const;
9319 bool getPluginPropertyBool(
const char* pluginName,
const char* propertyName,
bool& ok,
double time)
const;
9320 bool getPluginPropertyBool(InstanceId pluginID,
const char* propertyName,
bool& ok,
double time)
const;
9321 int getPluginPropertyInt(
const char* pluginName,
const char* propertyName,
bool& ok,
double time)
const;
9322 int getPluginPropertyInt(InstanceId pluginID,
const char* propertyName,
bool& ok,
double time)
const;
9323 float getPluginPropertyFloat(
const char* pluginName,
const char* propertyName,
bool& ok,
double time)
const;
9324 float getPluginPropertyFloat(InstanceId pluginID,
const char* propertyName,
bool& ok,
double time)
const;
9325 double getPluginPropertyDouble(InstanceId pluginID,
const char* propertyName,
bool& ok,
double time)
const;
9326 Color getPluginPropertyColor(
const char* pluginName,
const char* propertyName,
bool& ok,
double time)
const;
9327 Color getPluginPropertyColor(InstanceId pluginID,
const char* propertyName,
bool& ok,
double time)
const;
9328 AColor getPluginPropertyAColor(
const char* pluginName,
const char* propertyName,
bool& ok,
double time)
const;
9329 AColor getPluginPropertyAColor(InstanceId pluginID,
const char* propertyName,
bool& ok,
double time)
const;
9330 Vector getPluginPropertyVector(
const char* pluginName,
const char* propertyName,
bool& ok,
double time)
const;
9331 Vector getPluginPropertyVector(InstanceId pluginID,
const char* propertyName,
bool& ok,
double time)
const;
9332 Matrix getPluginPropertyMatrix(
const char* pluginName,
const char* propertyName,
bool& ok,
double time)
const;
9333 Matrix getPluginPropertyMatrix(InstanceId pluginID,
const char* propertyName,
bool& ok,
double time)
const;
9334 Transform getPluginPropertyTransform(
const char* pluginName,
const char* propertyName,
bool& ok,
double time)
const;
9335 Transform getPluginPropertyTransform(InstanceId pluginID,
const char* propertyName,
bool& ok,
double time)
const;
9336 PluginRef getPluginPropertyPluginRef(InstanceId pluginID,
const char* propertyName,
bool& ok,
double time)
const;
9337 Value getPluginPropertyValue(InstanceId pluginID,
const char* propertyName,
bool& ok,
double time)
const;
9338 template<
typename T> T getPluginPropertyTyped(InstanceId pluginID,
const char* propertyName,
bool& ok,
double time)
const;
9339 int getPropertyState(InstanceId pluginID,
const char* propertyName)
const;
9340 int getKeyframeTimes(InstanceId pluginID,
const char* propertyName,
double* ×)
const;
9341 bool setPluginPropertyValueAtTime(InstanceId pluginID,
const char* propertyName,
const void *pval,
double time)
const;
9342 bool setPluginPropertyValueRawAtTime(InstanceId pluginID,
const char* propertyName,
const void *pval,
size_t count,
double time)
const;
9344#ifdef VRAY_SDK_INTEROPERABILITY
9345 bool getPluginPropertyValueSDKInterop(InstanceId pluginID,
const char* propertyName,
void *pval,
int type)
const;
9346 bool getPluginPropertyValueAtTimeSDKInterop(InstanceId pluginID,
const char* propertyName,
void *pval,
int type,
double time)
const;
9347 bool setPluginPropertyValueSDKInterop(InstanceId pluginID,
const char* propertyName,
const void* pval,
int type)
const;
9348 bool setPluginPropertyValueAtTimeSDKInterop(InstanceId pluginID,
const char* propertyName,
const void* pval,
int type,
double time)
const;
9351 Plugin newRenderElementPlugin(
int type,
const char *instanceName,
const char *displayName);
9352 Plugin getRenderElementPlugin(
int type)
const;
9353 std::vector<Plugin> getRenderElementPluginsList(
int type)
const;
9354 bool getRenderElementInfo(InstanceId pluginID,
int type,
RenderElement::Info& chInfo)
const;
9355 size_t getRenderElementData(
9356 InstanceId pluginID,
9357 InstanceId alphaPluginID,
9366 size_t getRenderElementDataIntoBuffer(
9367 InstanceId pluginID,
9368 InstanceId alphaPluginID,
9378 VRayImage* getRenderElementAsImage(InstanceId pluginID,
int type,
int layer,
const GetImageOptions &options,
const bool isDoColorCorrectionsUSerSet =
false)
const;
9379 std::string getRenderElementMetadata(InstanceId pluginID,
int type)
const;
9388 eventName(eventName),
9389 threadIndex(threadIndex) {
9390 if (renderer.profiler.isManual()) {
9391 renderer.profiler.startDurationEvent(eventName.c_str(), threadIndex);
9396 if (renderer.profiler.isManual()) {
9397 renderer.profiler.endDurationEvent(eventName.c_str(), threadIndex);
9403 std::string eventName;
9420 template<
class T, Plugin(T::* TMethod)(VRayRenderer&, const
char* assetId, Vector importPosition,
void* userData)>
9421 static InstanceId importScatterPresetCallbackT(
const char* assetId,
Vector* importPosition,
void* info);
9422 static InstanceId importScatterPresetCallback(
const char* assetId,
Vector* importPosition,
void* info);
9451 template<
class T, Plugin(T::* TMethod)(VRayRenderer&, const
char* assetId, Vector importPosition,
void* userData)>
9617 enum GPUParamSupport {
9618 GPUParamSupport_Full,
9619 GPUParamSupport_Partial,
9620 GPUParamSupport_None,
9621 GPUParamSupport_Unknown,
9624 inline std::ostream& operator <<(std::ostream& stream,
const GPUParamSupport val) {
9626 case GPUParamSupport_Full:
9629 case GPUParamSupport_Partial:
9630 stream <<
"Partial";
9632 case GPUParamSupport_None:
9636 stream <<
"Unknown";
9645 const void* pParamDef;
9648 UIGuides(
const void* pParamDef) : pParamDef(pParamDef) {}
9650 const void* getParamDef()
const {
9788 PartOf3dsMaxTriple = 8,
9809 UIGuides& operator=(
const UIGuides& uiGuides) {
9810 pParamDef = uiGuides.pParamDef;
9937 const Internal::VRayRendererNative* renderer;
9940 RuntimeUIGuides(
const void* pParamDef,
const Internal::VRayRendererNative* renderer, InstanceId
id) :
9941 UIGuides(pParamDef), renderer(renderer), id(
id) {}
9958 const void* pParamDef;
9959 GPUParamSupport gpuSupport;
9963 pParamDef = pRenderer->getPluginPropertyDefinitionFromClass(pluginClassName, propertyName);
9964 gpuSupport = (GPUParamSupport)Internal::VRay_PluginUtils_getPropertyGpuSupport(pRenderer->getNativeRenderer(), pluginClassName, pParamDef);
9969 : pParamDef(propertyMeta.pParamDef), gpuSupport(propertyMeta.gpuSupport) {}
9972 pParamDef = propertyMeta.pParamDef;
9973 gpuSupport = propertyMeta.gpuSupport;
9978 std::swap(pParamDef, propertyMeta.pParamDef);
9979 std::swap(gpuSupport, propertyMeta.gpuSupport);
9983 operator bool ()
const {
9989 return Internal::VRay_PluginUtils_getPropertyElementsCount(pParamDef);
9994 return Internal::VRay_PluginUtils_getPropertyName(pParamDef);
10003 return Internal::VRay_PluginUtils_getPropertyType(pParamDef);
10008 return Internal::VRay_PluginUtils_getPropertyElementType(pParamDef);
10018 const char*
const description = Internal::VRay_PluginUtils_getPropertyDescription(pParamDef);
10019 return description ? description :
"";
10024 return Internal::VRay_PluginUtils_getPropertyDeprecation(pParamDef);
10030 const char*
const uiGuides = Internal::VRay_PluginUtils_getPropertyUIGuides(pParamDef);
10031 return uiGuides ? uiGuides :
"";
10039 static const char* typeToString(
const Type type);
10041 const char* getTypeAsString()
const {
10042 return typeToString(
getType());
10060 :
PropertyMeta(plugin.pRenderer, plugin.
getType(), propertyName), renderer(plugin.pRenderer), id(plugin.id()) {
10065 :
PropertyMeta(propertyRuntimeMeta), renderer(propertyRuntimeMeta.renderer), id(propertyRuntimeMeta.id) {
10069 PropertyMeta::operator=(propertyRuntimeMeta);
10070 renderer = propertyRuntimeMeta.renderer;
10071 id = propertyRuntimeMeta.id;
10077 return renderer->getPluginPropertyElementsCount(
id, getName());
10082 return renderer->getPluginPropertyRuntimeType(
id, getName());
10085 const char* getRuntimeTypeAsString()
const {
10086 return typeToString(getRuntimeType());
10089 void swap(PropertyRuntimeMeta &propertyRuntimeMeta) {
10090 PropertyMeta::swap(propertyRuntimeMeta);
10091 std::swap(renderer, propertyRuntimeMeta.renderer);
10097 return RuntimeUIGuides(pParamDef, renderer->getNativeRenderer(),
id);
10102 enum GPUPluginSupport {
10103 GPUPluginSupport_Full,
10104 GPUPluginSupport_Partial,
10105 GPUPluginSupport_Bake,
10106 GPUPluginSupport_None,
10107 GPUPluginSupport_Unknown,
10110 inline std::ostream& operator <<(std::ostream& stream,
const GPUPluginSupport val) {
10112 case GPUPluginSupport_Full:
10115 case GPUPluginSupport_Partial:
10116 stream <<
"Partial";
10118 case GPUPluginSupport_Bake:
10121 case GPUPluginSupport_None:
10125 stream <<
"Unknown";
10135 PluginTypeId typeId;
10147 typeId = renderer->getPluginTypeId_internal(typeStr);
10148 type = renderer->getPluginTypeString(typeId);
10149 pRenderer = renderer;
10153 typeId = pluginTypeId;
10154 type = renderer->getPluginTypeString(pluginTypeId);
10155 pRenderer = renderer;
10162 bool operator==(
const PluginMeta& pluginMeta)
const {
10163 return typeId == pluginMeta.typeId && pRenderer == pluginMeta.pRenderer;
10167 std::swap(typeId, pluginMeta.typeId);
10168 std::swap(type, pluginMeta.type);
10169 std::swap(pRenderer, pluginMeta.pRenderer);
10189 return pRenderer->getPluginPropertyNames(type);
10205 return PropertyMeta(pRenderer, type, propertyName.c_str());
10223 namespace Internal {
10251 operator size_t ()
const {
10270 return saveToFile(fileName.c_str());
10275 Internal::C_memory_free(bufAddr);
10287 bufSize = Internal::VRayImage_compressToJpeg(img, quality, &bufAddr,
nullptr);
10292 bufSize = Internal::VRayImage_compressToJpeg(img, quality, &bufAddr, renderer.getNativeRenderer());
10303 bufSize = Internal::VRayImage_compressToPng(img, preserveAlpha, &bufAddr,
nullptr);
10308 bufSize = Internal::VRayImage_compressToPng(img, preserveAlpha, &bufAddr, renderer.getNativeRenderer());
10320 bufSize = Internal::VRayImage_convertToBmp(img, preserveAlpha, &bufAddr, NULL, swapChannels ? 1 : 0);
10325 bufSize = Internal::VRayImage_convertToBmp(img, preserveAlpha, &bufAddr, renderer.getNativeRenderer(), swapChannels ? 1 : 0);
10331 T plugin_cast(Plugin plugin) {
10332 return *
static_cast<T*
>(&plugin);
10337 PluginRefT<T> plugin_cast(PluginRef pluginRef) {
10339 return *
static_cast<PluginRefT<T>*
>(
static_cast<T*
>(
static_cast<Plugin*
>(&pluginRef)));
10345 T plugin_checked_cast(Plugin plugin) {
10346 return plugin_cast<T>(plugin.getTypeId() != T::getTypeId() ? Plugin() : plugin);
10352 PluginRefT<T> plugin_checked_cast(PluginRef pluginRef) {
10353 return plugin_cast<T>(pluginRef.getTypeId() != T::getTypeId() ? PluginRef() : pluginRef);
10357 template<
typename PluginType>
10358 inline bool _isPluginOfTypes(PluginTypeId typeId) {
10359 return typeId == PluginType::getTypeId();
10362 template<
typename PluginType0,
typename PluginType1,
typename... RemainingTypes>
10363 inline bool _isPluginOfTypes(PluginTypeId typeId) {
10364 return typeId == PluginType0::getTypeId() || _isPluginOfTypes<PluginType1, RemainingTypes...>(typeId);
10373 template<
typename PluginType>
10374 inline bool isPluginOfType(
const Plugin& plugin) {
10375 return plugin.getTypeId() == PluginType::getTypeId();
10383 template<
typename PluginType,
typename... Types>
10384 inline bool isPluginOfTypes(
const Plugin& plugin) {
10385 return Internal::_isPluginOfTypes<PluginType, Types...>(plugin.getTypeId());
10393 inline bool isPluginOfType(
const Plugin& plugin,
const char* type) {
10394 return plugin.isNotEmpty() && strcmp(plugin.getType(), type) == 0;
10404 template <
size_t N>
10405 inline bool isPluginOfTypes(
const Plugin& plugin,
const char*
const (&types)[N]) {
10406 if (plugin.isNotEmpty()) {
10407 const char* type = plugin.getType();
10408 for (
size_t i = 0; i < N; ++i) {
10409 if (strcmp(type, types[i]) == 0)
10423 template <
size_t N>
10424 inline bool isPluginOfTypes(
const Plugin& plugin,
const PluginTypeId (&types)[N]) {
10425 PluginTypeId typeId = plugin.getTypeId();
10426 for (
size_t i = 0; i < N; ++i) {
10427 if (typeId == types[i])
10435 enum SourceMode :
int {
10470 : errorCode(OCIOResult::Result_OK) {
10472 Internal::OCIOData internalOCIOData;
10473 errorCode = (OCIOResult)Internal::VRay_OCIO_initData(&internalOCIOData, fileName, (
int)vraySourceType);
10474 if (errorCode != OCIOResult::Result_OK) {
10475 const char* ending = internalOCIOData.status ? internalOCIOData.status :
"<unknown>";
10476 errorString = std::string(
"Failed initializing OCIO configuration: ") + ending;
10477 Internal::VRay_OCIO_freeData(&internalOCIOData);
10478#ifndef VRAY_NOTHROW
10484 familySeparator = char(internalOCIOData.familySeparator);
10486 convertRawData(colorSpaces, internalOCIOData.colorSpaces, internalOCIOData.colorSpacesCount);
10487 if (internalOCIOData.colorSpaceFamilies) {
10488 convertRawData(colorSpaceFamilies, internalOCIOData.colorSpaceFamilies, internalOCIOData.colorSpacesCount);
10490 convertRawData(roles, internalOCIOData.roles, internalOCIOData.rolesCount);
10491 convertRawData(roleColorSpaces, internalOCIOData.roleColorSpaces, internalOCIOData.rolesCount);
10493 convertRawData(looks, internalOCIOData.looks, internalOCIOData.looksCount);
10494 convertRawData(devices, internalOCIOData.devices, internalOCIOData.devicesCount);
10495 convertRawData(viewTransforms, internalOCIOData.viewTransforms, internalOCIOData.viewTransformsCount);
10497 Internal::VRay_OCIO_freeData(&internalOCIOData);
10502 return errorString;
10507 enum OCIOResult :
int {
10509 Result_FileNotFound,
10510 Result_OCIOException,
10511 Result_EmptyConfiguration,
10512 Result_InternalException = -1
10516 std::string errorString;
10518 void convertRawData(std::vector<std::string>& output,
char const*
const* input,
const int inputCount) {
10520 output.reserve(inputCount);
10521 for (
int i = 0; i < inputCount; ++i) {
10522 output.emplace_back(input[i]);
10532 bool setEnvVar(
const char* name,
const char* value);
10537 const char* getEnvVar(
const char* name);
10539 enum OSLParameterType {
10540 OSL_TYPE_UNSUPPORTED,
10548 OSL_TYPE_OUTPUT_CLOSURE,
10549 OSL_TYPE_OUTPUT_COLOR,
10550 OSL_TYPE_OUTPUT_FLOAT,
10575 enum OSLSourceType {
10576 OSL_SOURCE_TYPE_OSL = 1,
10577 OSL_SOURCE_TYPE_OSO = 2,
10580 enum OSLSourceEncoding {
10581 OSL_SOURCE_ENC_TXT,
10582 OSL_SOURCE_ENC_BASE64,
10590 Error getOSLParameters(
const char* src, OSLSourceType type, OSLSourceEncoding encoding, OSLParameters& params);
10593 Error getOSLParameters(
const std::string& src, OSLSourceType type, OSLSourceEncoding encoding, OSLParameters& params);
10597 void createThis(
const char* filename,
const void* settings);
10608 ObjectTypeNodeParticle,
10610 ObjectTypeInstancer,
10612 ObjectTypeVRayScene,
10613 ObjectTypeMaterial,
10620 DataTypeNoData = 0,
10621 DataTypeMesh = (1 << 0),
10622 DataTypeHair = (1 << 1),
10623 DataTypeParticles = (1 << 2),
10624 DataTypeVolume = (1 << 3),
10625 DataTypeInfinitePlane = (1 << 4),
10626 DataTypeInstancer2 = (1 << 5),
10627 DataTypeVRayProxy = (1 << 6),
10628 DataTypeRayserverInstancer = (1 << 7),
10629 DataTypeStaticMesh = (1 << 8),
10630 DataTypePerfectSphere = (1 << 9),
10631 DataTypeGeomInstancer = (1 << 10),
10633 DataTypeHasInstances = DataTypeInstancer2 | DataTypeRayserverInstancer | DataTypeGeomInstancer,
10635 ObjectDataTypeAll = DataTypeAll,
10636 ObjectDataTypeNoData = DataTypeNoData,
10637 ObjectDataTypeMesh = DataTypeMesh,
10638 ObjectDataTypeHair = DataTypeHair,
10639 ObjectDataTypeParticles = DataTypeParticles,
10640 ObjectDataTypeVolume = DataTypeVolume,
10641 ObjectDataTypeInfinitePlane = DataTypeInfinitePlane,
10642 ObjectDataTypeInstancer2 = DataTypeInstancer2,
10643 ObjectDataTypeVRayProxy = DataTypeVRayProxy,
10644 ObjectDataTypeRayserverInstancer = DataTypeRayserverInstancer,
10645 ObjectDataTypeStaticMesh = DataTypeStaticMesh,
10646 ObjectDataTypePerfectSphere = DataTypePerfectSphere,
10647 ObjectDataTypeGeomInstancer = DataTypeGeomInstancer,
10649 ObjectDataTypeHasInstances = DataTypeHasInstances,
10653 LightTypeUnsupported = 0,
10655 LightTypeRectangle,
10666 UpAxisUnknown = -1,
10701 std::vector<Object>
getObjects(ObjectType objectType = ObjectTypeAll, DataType dataType = DataTypeAll)
const;
10710 operator bool()
const {
10711 return !!vrsceneDesc;
10717 return !vrsceneDesc;
10763 CoordinateSystemRightHanded=0,
10765 CoordinateSystemLeftHanded=1
10770 previewFacesCount(100000),
10771 minPreviewFaces(64),
10772 maxPreviewFaces(10000),
10773 cacheType(CacheType::CacheTypeSingle),
10774 coordinateSystem(CoordinateSystem::CoordinateSystemRightHanded) {
10778 int previewFacesCount;
10779 int minPreviewFaces;
10780 int maxPreviewFaces;
10781 CacheType cacheType;
10782 CoordinateSystem coordinateSystem;
10790 static void addDataTypeStringHelperPrivate(std::string& currentString, DataType types, DataType dataType,
const char* typeString);
10792 explicit Object(
void* objectBase) : objectBase(objectBase) {}
10793 Object(
void* vrsceneDesc,
const char* name);
10796 Object() : objectBase() {}
10805 return !!objectBase;
10849#ifndef VRAY_SDK_INTEROPERABILITY
10905 VUtils::VectorRefList getMeshVertices(
double time = 0);
10910 VUtils::IntRefList getMeshFaces(
double time = 0);
10916 VUtils::VectorRefList getHairVertices(
double time = 0);
10922 VUtils::IntRefList getHairNumVertices(
double time = 0);
10925 std::vector<Particle> getInstancerParticles(
double time = 0);
10927 Sizes3D getDecalSize(
double time = 0);
10928 Sizes2D getClipperSize(
double time = 0);
10945 bool isValid()
const {
10959 void *internalTextureSampler;
11028 IntList
sampleAreaInt(
const PluginRef &pluginRef,
float u_start,
float u_end,
float v_start,
float v_end,
int width,
int height);
11032 template<
typename ListType,
typename SampleFunction>
11033 static std::vector<ListType> sampleAreaAsListResult(
int width,
int height, SampleFunction &&sampleArea);
11044 bool operator==(
const PluginLink& other)
const noexcept {
11045 return fromPlugin == other.fromPlugin && fromProperty == other.fromProperty && toPlugin == other.toPlugin;
11048 bool operator!=(
const PluginLink& other)
const noexcept {
11049 return fromPlugin != other.fromPlugin || fromProperty != other.fromProperty || toPlugin != other.toPlugin;
11052 bool operator<(
const PluginLink& other)
const noexcept {
11053 if (fromPlugin != other.fromPlugin)
11054 return fromPlugin < other.fromPlugin;
11055 if (fromProperty != other.fromProperty)
11056 return fromProperty < other.fromProperty;
11057 return toPlugin < other.toPlugin;
11060 bool operator<=(
const PluginLink& other)
const noexcept {
11061 if (fromPlugin < other.fromPlugin)
return true;
11062 if (fromPlugin > other.fromPlugin)
return false;
11063 if (fromProperty < other.fromProperty)
return true;
11064 if (fromProperty > other.fromProperty)
return false;
11065 return toPlugin < other.toPlugin;
11074 std::vector<PluginLink> getChildPlugins(Plugin root,
bool recursive);
11079 std::vector<PluginLink> getParentPlugins(Plugin child,
bool recursive =
false);
11083 float getIESPrescribedIntensity(
const char* iesLightFileName);
11086 float getIESPrescribedIntensity(
const std::string& iesLightFileName);
11155 binUserAttributeType_int = 0,
11156 binUserAttributeType_float,
11157 binUserAttributeType_vector,
11158 binUserAttributeType_acolor,
11159 binUserAttributeType_string,
11160 binUserAttributeType_last,
11166 binUserAttributeFlag_small = 1 << 3,
11169 binUserAttributeFlag_smallY = 1 << 2,
11172 binUserAttributeFlag_smallZ = 1 << 1,
11175 binUserAttributeFlag_smallA = 1 << 0,
11181 template<
size_t count>
11182 void add(
const char(&name)[count],
int value) {
11183 add(name, count - 1, value);
11189 template<
size_t count>
11190 void add(
const char(&name)[count],
float value) {
11191 add(name, count - 1, value);
11197 template<
size_t count>
11199 add(name, count - 1, value);
11205 template<
size_t count>
11207 add(name, count - 1, value);
11214 template<
size_t nameLen>
11215 void add(
const char(&name)[nameLen],
const char* value,
size_t valueLen) {
11216 add(name, nameLen - 1, value, valueLen);
11222 template<
size_t nameLen,
size_t valueLen>
11223 void add(
const char(&name)[nameLen],
const char(&value)[valueLen]) {
11224 add(name, nameLen - 1, value, valueLen - 1);
11230 template<
size_t nameLen>
11231 void add(
const char(&name)[nameLen],
const std::string& value) {
11232 add(name, nameLen - 1, value.c_str(), value.length());
11238 void add(
const std::string& name,
int value) {
11239 add(name.c_str(), name.length(), value);
11245 void add(
const std::string& name,
float value) {
11246 add(name.c_str(), name.length(), value);
11253 add(name.c_str(), name.length(), value);
11260 add(name.c_str(), name.length(), value);
11267 void add(
const std::string& name,
const char* value,
size_t valueLen) {
11268 add(name.c_str(), name.length(), value, valueLen);
11274 template<
size_t valueLen>
11275 void add(
const std::string& name,
const char(&value)[valueLen]) {
11276 add(name.c_str(), name.length(), value, valueLen - 1);
11282 void add(
const std::string& name,
const std::string& value) {
11283 add(name.c_str(), name.length(), value.c_str(), value.length());
11290 void add(
const char* name,
size_t nameLen,
int value) {
11291 appendString(name, nameLen);
11293 if (value >= -128 && value <= 127) {
11294 const byte attrType = binUserAttributeType_int | (binUserAttributeFlag_small << 4);
11297 write(sbyte(value));
11299 resize(1 +
sizeof(
int));
11300 write(binUserAttributeType_int);
11309 void add(
const char* name,
size_t nameLen,
float value) {
11310 appendString(name, nameLen);
11312 byte attrType = binUserAttributeType_float;
11313 byte writeSize = 1;
11315 const SmallFloat smallValue(value, attrType, binUserAttributeFlag_small, writeSize);
11318 smallValue.write(*
this);
11325 void add(
const char* name,
size_t nameLen,
const Vector& value) {
11326 appendString(name, nameLen);
11328 byte attrType = binUserAttributeType_vector;
11329 byte writeSize =
sizeof(byte);
11331 const SmallFloat smallX(value.x, attrType, binUserAttributeFlag_small, writeSize);
11332 const SmallFloat smallY(value.y, attrType, binUserAttributeFlag_smallY, writeSize);
11333 const SmallFloat smallZ(value.z, attrType, binUserAttributeFlag_smallZ, writeSize);
11338 smallX.write(*
this);
11339 smallY.write(*
this);
11340 smallZ.write(*
this);
11347 void add(
const char* name,
size_t nameLen,
const AColor& value) {
11348 appendString(name, nameLen);
11350 byte attrType = binUserAttributeType_acolor;
11351 byte writeSize =
sizeof(byte);
11353 const SmallFloat smallR(value.color.r, attrType, binUserAttributeFlag_small, writeSize);
11354 const SmallFloat smallG(value.color.g, attrType, binUserAttributeFlag_smallY, writeSize);
11355 const SmallFloat smallB(value.color.b, attrType, binUserAttributeFlag_smallZ, writeSize);
11356 const SmallFloat smallA(value.alpha, attrType, binUserAttributeFlag_smallA, writeSize);
11362 smallR.write(*
this);
11363 smallG.write(*
this);
11364 smallB.write(*
this);
11365 smallA.write(*
this);
11373 void add(
const char* name,
size_t nameLen,
const char* value,
size_t valueLen) {
11374 appendString(name, nameLen);
11377 write(binUserAttributeType_string);
11379 appendString(value, valueLen);
11416 const byte* bytes =
reinterpret_cast<const byte*
>(data.data());
11417 size_t count = getNumBytes();
11418 std::string chars(count * 3 + 2,
'\0');
11420 for (
size_t i = 0; i < count; ++i) {
11422 chars[3 * i + 0] = getHexChar(b >> 4);
11423 chars[3 * i + 1] = getHexChar(b & 0xf);
11424 chars[3 * i + 2] =
' ';
11426 chars[3 * count + 0] =
'0';
11427 chars[3 * count + 1] =
'0';
11436 struct SmallFloat {
11437 SmallFloat(
float value,
byte& attrType,
byte smallFlag,
byte& writeSize)
11442 const float roundValue = roundf(value);
11443 const bool almostInt = std::abs(value - roundValue) < 1e-6f;
11444 isSmall = almostInt && roundValue >= -128 && roundValue <= 127;
11446 writeSize +=
sizeof(float);
11449 smallFloat = sbyte(roundValue);
11450 attrType |= (smallFlag << 4);
11451 writeSize +=
sizeof(sbyte);
11456 float getFloat()
const {
return value; }
11459 sbyte getSmallFloat()
const {
return smallFloat; }
11462 bool getIsSmall()
const {
return isSmall; }
11465 void write(BinUserAttributesWriter& buf)
const {
11467 buf.write(smallFloat);
11478 inline static char getHexChar(
byte b) {
11479 return b < 10 ? b +
'0' : b - 10 +
'A';
11485 void appendString(
const char* name,
size_t nameLen) {
11487 resize(nameLen + 1);
11488 memcpy(ptr(), name, nameLen);
11495 void append(
const void* bytes,
size_t bytes_count) {
11496 resize(bytes_count);
11497 memcpy(ptr(), bytes, bytes_count);
11498 index += bytes_count;
11502 template<
typename T>
11503 void append(
const T& value) {
11509 template<
typename T>
11510 void write(
const T& value) {
11511 *
reinterpret_cast<T*
>(ptr()) = value;
11512 index +=
sizeof(T);
11517 void resize(
size_t bytesToAdd) {
11518 size_t newSize = index + bytesToAdd;
11519 if (newSize > data.size() *
sizeof(
int)) {
11520 data.resize((newSize +
sizeof(
int) - 1) /
sizeof(
int));
11526 return reinterpret_cast<byte*
>(data.data()) + index;
11530 std::vector<int> data;
11536 inline std::ostream& operator <<(std::ostream& stream,
const BinUserAttributesWriter& writer) {
11537 stream << writer.toString();
11542#ifdef VRAY_SDK_INTEROPERABILITY
11543#include "vrayinterop.hpp"
11546#include "_vraysdk_implementation.hpp"
11549# pragma warning(pop)
The raw memory contents of a BMP image.
Definition: vraysdk.hpp:555
Base class for LocalJpeg, LocalPng, LocalBmp. Can't be instantiated.
Definition: vraysdk.hpp:10238
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:10261
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:10269
void * getBuf() const
Returns a pointer to the image data.
Definition: vraysdk.hpp:10256
Definition: vraysdk.hpp:4016
Definition: vraysdk.hpp:2917
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:2935
A group of utility methods related to variuos geometry source plugins.
Definition: vraysdk.hpp:9418
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)
static bool readGeomHairData(const Plugin &nodePlugin, VectorList &vertices, IntList &lengths, int countHint=0)
Definition: vraysdk.hpp:10224
The raw memory contents of a JPEG image.
Definition: vraysdk.hpp:502
A group of utility methods related to variuos light source plugins.
Definition: vraysdk.hpp:9464
static bool readLuminaireFieldPreviewData(const Plugin &luminairePlugin, LuminaireFieldReadPreviewData &readData)
static bool readLuminaireFieldPreviewData(const std::string &fileName, LuminaireFieldReadPreviewData &readData)
static bool readIESPreviewData(const Plugin &lightPlugin, VectorList &vertices, IntList &indices)
static bool readIESPreviewData(const std::string &fileName, VectorList &vertices, IntList &indices)
Definition: vraysdk.hpp:10312
LocalBmp(const VRayImage *img, bool preserveAlpha=false, bool swapChannels=false)
Definition: vraysdk.hpp:10319
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:10324
A wrapper around JPEG data in memory. It's meant to be stack allocated to free the data when done.
Definition: vraysdk.hpp:10280
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:10291
LocalJpeg(const VRayImage *img, int quality=0)
Definition: vraysdk.hpp:10286
Definition: vraysdk.hpp:10296
LocalPng(const VRayImage *img, bool preserveAlpha=false)
Definition: vraysdk.hpp:10302
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:10307
A variation of VRayImage to be created on the stack so that the image gets auto-deleted.
Definition: vraysdk.hpp:777
Definition: vraysdk.hpp:3590
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
float getScale() const
Get the relative scale of the luminaire geometry upon export. Should be 1.0 for cm.
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:483
Definition: vraysdk.hpp:4462
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.
PropertyState getPropertyState(const char *propertyName) const
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.
PropertyState
Definition: vraysdk.hpp:4493
@ Animated
Non-animated user value is explicitly set, even if its value coincides with the default one.
@ Default
Wrong property name or invalid plugin.
@ NotAnimated
Not set, V-Ray will use the default value.
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:4501
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:5280
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:5307
PluginRefT(const PluginRefT &plugin) noexcept
Copy construct from another PluginRef.
Definition: vraysdk.hpp:5303
PluginRefT() noexcept
Default construct an invalid PluginRef - not referencing a V-Ray scene object.
Definition: vraysdk.hpp:5297
bool isOutputValid() const noexcept
Returns true if this PluginRef references a valid Plugin output (including the default one).
Definition: vraysdk.hpp:5332
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:5300
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:5358
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:5410
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:5371
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:5368
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:5374
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:500
Definition: vraysdk.hpp:9384
A group of methods for reading data and creating V-Ray geometry proxies.
Definition: vraysdk.hpp:9493
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:2950
const std::vector< int > & getMaterialIDs() const
Get material IDs for each consecutive triangle in the full mesh.
Definition: vraysdk.hpp:2991
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:3159
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:3132
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:3224
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:3218
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:3090
const std::vector< Vector > & getUVValues() const
Get the full array of UVW 3-tuples.
Definition: vraysdk.hpp:3135
const std::vector< float > & getHairWidths() const
Get the full array of the hair geometry widths.
Definition: vraysdk.hpp:3063
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:3242
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:3221
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:3060
const std::vector< Vector > & getNormals() const
Get full mesh normal vectors array.
Definition: vraysdk.hpp:2985
const std::vector< Color > & getVoxelInfoWireColor() const
Get an array of diffuse (wire) colors - 1 Color per mesh object.
Definition: vraysdk.hpp:3236
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:3156
const std::vector< Vector > & getVelocities() const
Get velocity vectors for each vertex in the vertex array.
Definition: vraysdk.hpp:2997
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:3129
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:3162
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:3147
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:3093
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:2988
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:3150
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:3102
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:3138
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:3069
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:3239
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:3165
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:3105
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:3153
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:3066
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:3120
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:2982
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:2976
const std::vector< Vector > & getVertices() const
Get full mesh vertex positions array.
Definition: vraysdk.hpp:2979
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:3111
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:2994
const std::vector< Vector > & getHairVertices() const
Get the full array of the hair geometry vertices.
Definition: vraysdk.hpp:3057
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:2395
PixelFormat
This describes the desired data format for getData().
Definition: vraysdk.hpp:2521
@ PF_RGBA_BIT16
4x2 bytes RGBA.
Definition: vraysdk.hpp:2535
@ PF_BW_BIT8
1-byte greyscale/integer.
Definition: vraysdk.hpp:2523
@ PF_RGBA_FLOAT
4x4 bytes float RGBA.
Definition: vraysdk.hpp:2537
@ PF_RGB_FLOAT
3x4 bytes float RGB.
Definition: vraysdk.hpp:2532
@ PF_BW_BIT16
2-byte greyscale/integer.
Definition: vraysdk.hpp:2524
@ PF_RGBA_HALF
4x2 bytes half-float RGBA.
Definition: vraysdk.hpp:2536
@ PF_RGB_BIT16
3x2 bytes RGB.
Definition: vraysdk.hpp:2530
@ PF_BW_BIT32
4-byte greyscale/integer.
Definition: vraysdk.hpp:2525
@ PF_BW_FLOAT
4-byte float greyscale.
Definition: vraysdk.hpp:2527
@ PF_RGB_BIT8
3x1 bytes RGB.
Definition: vraysdk.hpp:2529
@ PF_RGBA_BIT8
4x1 bytes RGBA.
Definition: vraysdk.hpp:2534
@ PF_RGB_HALF
3x2 bytes half-float RGB.
Definition: vraysdk.hpp:2531
@ PF_BW_HALF
2-byte half-float greyscale.
Definition: vraysdk.hpp:2526
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:2594
size_t getDataIntoBuffer(const GetDataOptions &options, void *data) const
DataIntent
Definition: vraysdk.hpp:2540
@ DI_INTENT_FILE
The data will be saved in a file, so we don't want color corrections applied.
Definition: vraysdk.hpp:2545
@ DI_INTENT_VIEWPORT_IPR
Image will be displayed in viewport, color corrections should be applied with the exception of sRGB a...
Definition: vraysdk.hpp:2561
@ DI_INTENT_FILE_SRGB
Same as IntentFile, but with forced sRGB/Gamma correction.
Definition: vraysdk.hpp:2558
@ DI_INTENT_DISPLAY
The data will be shown on a display, so we want color corrections to be applied.
Definition: vraysdk.hpp:2542
@ DI_INTENT_FILE_NO_COLOR_CORRECTIONS
Definition: vraysdk.hpp:2555
@ DI_INTENT_RAW
Definition: vraysdk.hpp:2550
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:2511
@ BF_FLOAT
A single float number (e.g. z-depth).
Definition: vraysdk.hpp:2512
@ BF_3FLOAT_SIGNED
3 signed float numbers (e.g. surface normals).
Definition: vraysdk.hpp:2516
@ BF_4FLOAT
4 float numbers (e.g. RGBA color).
Definition: vraysdk.hpp:2517
@ BF_3FLOAT
3 float numbers (e.g. RGB color).
Definition: vraysdk.hpp:2513
@ BF_2FLOAT
2 signed float numbers (e.g. uv coordinates or pixel screen velocity).
Definition: vraysdk.hpp:2514
@ BF_INT
A single integer number (e.g. render ID, material ID etc).
Definition: vraysdk.hpp:2515
PixelFormat getDefaultPixelFormat() const
Get the default format used by the getData method for this render element.
Definition: vraysdk.hpp:2615
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:2600
BinaryFormat getBinaryFormat() const
Get the binary format of pixels in this render element.
Definition: vraysdk.hpp:2610
Type
The render channal types/aliases are used to identify some common channels.
Definition: vraysdk.hpp:2400
@ REFLECT_ALPHA
Used by matte materials to store the alpha of the reflections.
Definition: vraysdk.hpp:2455
@ VRMTL_SHEEN_GLOSSINESS
VRayMtl sheen glossiness parameter.
Definition: vraysdk.hpp:2483
@ REALCOLOR
Real color VFB channel.
Definition: vraysdk.hpp:2429
@ COLOR
RGB VFB channel. This is always created by V-Ray and there can't be multiple instances....
Definition: vraysdk.hpp:2434
@ CRYPTOMATTE
Used for Cryptomatte render channel output.
Definition: vraysdk.hpp:2470
@ NODEID
Node ID VFB channel. This channel is generated by V-Ray.
Definition: vraysdk.hpp:2420
@ RAW_COAT_REFLECTION
Raw coat indirect reflection VFB channel.
Definition: vraysdk.hpp:2487
@ REFLECT
Reflection VFB channel. This channel must be generated by shaders.
Definition: vraysdk.hpp:2405
@ VRMTL_COAT_COLOR
VRayMtl coat highlight color (coat filter uninfluenced by Fresnel weight, reflection and refraction c...
Definition: vraysdk.hpp:2486
@ EXTRA_TEX_FLOAT
A single texture override is applied to the whole scene (e.g. Dirt)
Definition: vraysdk.hpp:2504
@ LAST
not a type, just a delimiter
Definition: vraysdk.hpp:2493
@ RENDERTIME
Per-pixel render time.
Definition: vraysdk.hpp:2469
@ DRBUCKET
A channel that keeps track of which DR server rendered a particular bucket (it is a Color buffer that...
Definition: vraysdk.hpp:2448
@ NOISE_LEVEL
The noise level as estimated by the Adaptive and Progressive image samplers. Used for denoising purpo...
Definition: vraysdk.hpp:2460
@ RAW_REFLECTION
Raw reflection VFB channel. This channel must be generated by shaders.
Definition: vraysdk.hpp:2424
@ BACKGROUND
Background VFB channel. This channel is generated by V-Ray.
Definition: vraysdk.hpp:2431
@ VRMTL_REFRACTGLOSS
A VRayMtl reflection glossiness VFB channel. This channel is generated by V-Ray.
Definition: vraysdk.hpp:2452
@ ZDEPTH
Z-Depth VFB channel. This channel is generated by V-Ray.
Definition: vraysdk.hpp:2421
@ SHEEN_FILTER
Sheen filter VFB channel.
Definition: vraysdk.hpp:2482
@ COAT_FILTER
Coat filter VFB channel.
Definition: vraysdk.hpp:2488
@ TOON
Toon effect channel.
Definition: vraysdk.hpp:2467
@ MTLRENDERID
Mtl render ID VFB channel. This channel is generated by V-Ray.
Definition: vraysdk.hpp:2458
@ DENOISED
A denoised version of the image. Adding this render element enables denoising.
Definition: vraysdk.hpp:2462
@ MATERIAL_SELECT
Material select.
Definition: vraysdk.hpp:2498
@ REFRACTION_FILTER
Refraction filter VFB channel. This channel must be generated by shaders.
Definition: vraysdk.hpp:2426
@ COAT_REFL_ALPHA
Used by matte materials to store the alpha of the coat reflections.
Definition: vraysdk.hpp:2485
@ NONE
Unspecified channel.
Definition: vraysdk.hpp:2401
@ NORMALS
Normals VFB channel. This channel is generated by V-Ray.
Definition: vraysdk.hpp:2430
@ LIGHT_SELECT
Link this in the channels parameters of your lights.
Definition: vraysdk.hpp:2472
@ SAMPLERATE
The sample rate for the image samplers.
Definition: vraysdk.hpp:2444
@ SHEEN_REFLECTION
Sheen indirect reflection VFB channel.
Definition: vraysdk.hpp:2490
@ RAWGI
Raw GI VFB channel. This channel is generated by V-Ray.
Definition: vraysdk.hpp:2413
@ COAT_REFLECTION
Raw coat indirect reflection VFB channel.
Definition: vraysdk.hpp:2491
@ COVERAGE
Pixel coverage.
Definition: vraysdk.hpp:2497
@ RAW_REFRACTION
Raw refraction VFB channel. This channel must be generated by shaders.
Definition: vraysdk.hpp:2427
@ OBJECT_SELECT
Selects by object/material ID.
Definition: vraysdk.hpp:2501
@ LIGHTING_ANALYSIS
The lighting analysis overlay.
Definition: vraysdk.hpp:2471
@ BUMPNORMALS
The normals modified with bump map. This channel must be generated by shaders.
Definition: vraysdk.hpp:2442
@ LIGHT_MIX
Channel for Interactive Light Mix.
Definition: vraysdk.hpp:2475
@ MULTIMATTE_ID
RGB matte using material IDs.
Definition: vraysdk.hpp:2500
@ SHADEMAP_EXPORT
A channel that keeps the fragment coordinates in camera space.
Definition: vraysdk.hpp:2454
@ VRMTL_METALNESS
VRayMtl metalness parameter.
Definition: vraysdk.hpp:2474
@ SHADOW
Shadow VFB channel. This channel is generated by V-Ray.
Definition: vraysdk.hpp:2408
@ REFLECTION_FILTER
Reflection filter VFB channel. This channel must be generated by shaders.
Definition: vraysdk.hpp:2423
@ SPECULAR
Specular VFB channel. This channel is generated by V-Ray.
Definition: vraysdk.hpp:2409
@ MATTESHADOW
Matte shadow channel where full shadows are white and areas not in shadow are black; essentially this...
Definition: vraysdk.hpp:2437
@ ALPHA
Alpha VFB channel. This is always created by V-Ray and there can't be multiple instances....
Definition: vraysdk.hpp:2433
@ EXTRA_TEX_INT
A single texture override is applied to the whole scene (e.g. Dirt)
Definition: vraysdk.hpp:2503
@ CAUSTICS
Caustics VFB channel. This channel is generated by V-Ray.
Definition: vraysdk.hpp:2412
@ SHEEN_REFL_ALPHA
Used by matte materials to store the alpha of the sheen reflections.
Definition: vraysdk.hpp:2484
@ VRMTL_REFLECTHIGLOSS
A VRayMtl reflection hilight glossiness VFB channel. This channel is generated by V-Ray.
Definition: vraysdk.hpp:2451
@ GI
GI VFB channel. This channel is generated by V-Ray.
Definition: vraysdk.hpp:2411
@ RAWTOTALLIGHT
The raw total diffuse lighting (direct+indirect) falling on a surface. This channel is generated by V...
Definition: vraysdk.hpp:2440
@ VRMTL_REFLECTGLOSS
A VRayMtl reflection glossiness VFB channel. This channel is generated by V-Ray.
Definition: vraysdk.hpp:2450
@ VELOCITY
Velocity VFB channel. This channel is generated by V-Ray.
Definition: vraysdk.hpp:2417
@ WORLD_POSITION
The position in world space. Used for denoising purposes.
Definition: vraysdk.hpp:2461
@ RENDERID
Render ID VFB channel. This channel is generated by V-Ray.
Definition: vraysdk.hpp:2418
@ TOON_LIGHTING
Direct toon diffuse lighting.
Definition: vraysdk.hpp:2477
@ EXTRA_TEX
A single texture override is applied to the whole scene (e.g. Dirt)
Definition: vraysdk.hpp:2502
@ USER
User defined channel indices start from here.
Definition: vraysdk.hpp:2495
@ TOTALLIGHT
The total diffuse lighting (direct+indirect) falling on a surface. This channel is generated by V-Ray...
Definition: vraysdk.hpp:2439
@ MTLID
Mtl ID VFB channel. This channel is generated by V-Ray.
Definition: vraysdk.hpp:2419
@ TOON_SPECULAR
Direct toon specular lighting.
Definition: vraysdk.hpp:2478
@ DIFFUSE
Diffuse filter VFB channel. This channel is generated by V-Ray.
Definition: vraysdk.hpp:2404
@ WIRECOLOR
Wire color channel where each object appears with a solid color. This channel is generated by V-Ray.
Definition: vraysdk.hpp:2436
@ VRMTL_COAT_GLOSSINESS
VRayMtl coat glossiness parameter.
Definition: vraysdk.hpp:2489
@ RAW_SHEEN_REFLECTION
Raw sheen indirect reflection VFB channel.
Definition: vraysdk.hpp:2481
@ SELFILLUM
Self-illumination VFB channel. This channel must be generated by shaders.
Definition: vraysdk.hpp:2407
@ DEFOCUS_AMOUNT
Pixel blur, combination of DOF and moblur. Used for denoising purposes.
Definition: vraysdk.hpp:2464
@ MULTIMATTE
RGB matte for up to 3 objects.
Definition: vraysdk.hpp:2499
@ VRMTL_SHEEN_COLOR
VRayMtl sheen color parameter (sheen filter uninfluenced by Fresnel weight, reflection and refraction...
Definition: vraysdk.hpp:2480
@ LIGHTING
Lighting VFB channel. This channel is generated by V-Ray.
Definition: vraysdk.hpp:2410
@ RAWLIGHT
Raw light VFB channel. This channel is generated by V-Ray.
Definition: vraysdk.hpp:2414
@ EFFECTS_RESULT
Channel for all post effects.
Definition: vraysdk.hpp:2466
@ REFRACT
Refraction VFB channel. This channel must be generated by shaders.
Definition: vraysdk.hpp:2406
@ RAWSHADOW
Raw shadow VFB channel. This channel is generated by V-Ray.
Definition: vraysdk.hpp:2415
@ ATMOSPHERE
Atmospheric effects channel.
Definition: vraysdk.hpp:2403
@ VRMTL_REFLECTIOR
A VRayMtl reflection IOR VFB channel. This channel is generated by V-Ray.
Definition: vraysdk.hpp:2457
@ SSS
A channel used for VRayFastSSS2 material sub-surface portion.
Definition: vraysdk.hpp:2446
@ WORLD_BUMPNORMAL
Normal with bump mapping in world space.
Definition: vraysdk.hpp:2463
Type getType() const
Get the type of the render element.
Definition: vraysdk.hpp:2605
This class groups methods related to management of render elements in the scene.
Definition: vraysdk.hpp:2684
RenderElement add(RenderElement::Type type, const char *displayName=nullptr, const char *instanceName=nullptr)
RenderElement get(RenderElement::Type type) const
size_t get(const std::string &name, const RenderElement::GetDataOptions &options, void *buf) const
std::vector< RenderElement > getAll(RenderElement::Type type) const
Definition: vraysdk.hpp:9934
Definition: vraysdk.hpp:4246
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:10785
DataType getDataType() const
bool isValid() const
Definition: vraysdk.hpp:10804
VectorList getHairVertices(double time=0)
VRay::Box getMeshBoundingBox(double time=0)
Transform getTransform(double time=0) const
bool getVisibility(double time=0) const
int getMeshVerticesFast(const Vector *&vertices, double time=0)
std::string getDataTypeAsString() const
VRay::Box getWorldBoundingBox(double time=0)
const char * getTypeAsString() const
const char * getName() const
ObjectType getType() const
VectorList getMeshVertices(double time=0)
int getHairNumVerticesFast(const int *&lengths, double time=0)
const char * getNodeDataName() const
int getMeshFacesFast(const int *&faces, double time=0)
IntList getMeshFaces(double time=0)
int getHairVerticesFast(const Vector *&vertices, double time=0)
IntList getHairNumVertices(double time=0)
Definition: vraysdk.hpp:10595
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:10716
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:9641
bool hasOverriddenBy() const
bool hasAttribute(const AttributesType attributeType) const
UnitsType
Definition: vraysdk.hpp:9756
QuantityTypeEnum
Defines the quantity type that the parameter represents.
Definition: vraysdk.hpp:9736
@ Angle
Definition: vraysdk.hpp:9748
@ Distance
Definition: vraysdk.hpp:9743
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:9656
@ StartRollout
Definition: vraysdk.hpp:9692
@ Tier
Definition: vraysdk.hpp:9721
@ Hide
Indicates when the control should be hidden (not shown at all), depending on other plugin parameter v...
Definition: vraysdk.hpp:9723
@ GPUSupport
To what extent the property is supported by V-Ray GPU.
Definition: vraysdk.hpp:9718
@ QuantityType
Definition: vraysdk.hpp:9702
@ Enum
Definition: vraysdk.hpp:9659
@ Overrides
Definition: vraysdk.hpp:9716
@ MinValue
Limits the min value of the control.
Definition: vraysdk.hpp:9666
@ StringEnum
Definition: vraysdk.hpp:9682
@ SoftMinValue
Limits the max value of the control initially (the user can override it).
Definition: vraysdk.hpp:9697
@ StartTab
Definition: vraysdk.hpp:9695
@ Enable
Indicates when the control should be active (not grayed out), depending on other plugin parameter val...
Definition: vraysdk.hpp:9661
@ FileAssetNames
Definition: vraysdk.hpp:9685
@ SoftMaxValue
Limits the min value of the control initially (the user can override it).
Definition: vraysdk.hpp:9699
@ 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:9687
@ Attributes
Definition: vraysdk.hpp:9679
@ Units
Definition: vraysdk.hpp:9673
@ FileAsset
Definition: vraysdk.hpp:9676
@ OverridenBy
Definition: vraysdk.hpp:9709
@ DisplayName
Definition: vraysdk.hpp:9664
@ SpinStep
Add a step hint to a slider.
Definition: vraysdk.hpp:9670
@ MaxValue
Limits the max value of the control.
Definition: vraysdk.hpp:9668
@ DefaultValue
Definition: vraysdk.hpp:9730
FileAssetOpType
Definition: vraysdk.hpp:9770
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:9777
TierType
Definition: vraysdk.hpp:9801
Definition: vraysdk.hpp:10958
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:504
Definition: vraythrow.hpp:9
Definition: vraysdk.hpp:3815
void setOSMessageDispatching(bool enableMessageDispatching)
Definition: vraysdk.hpp:3848
void setGUIMessageProcessing(bool enableMessageProcessing)
Definition: vraysdk.hpp:3840
VRayInit(bool enableFrameBuffer)
Definition: vraysdk.hpp:3824
This class groups all VFB history related methods.
Definition: vraysdk.hpp:7163
void setTemporaryPath(const char *path)
void setWindowStatus(const bool status)
std::string getTemporaryPath() const
int getMaximumSize() const
bool getWindowStatus() const
void setTemporaryPath(const std::string &path)
This is an overloaded member function, provided for convenience. It differs from the above function o...
void setPanelStatus(const bool status)
bool getPanelStatus() const
void setMaximumSize(const int maxSize)
This class encapsulates all VFB per-layer related methods.
Definition: vraysdk.hpp:6555
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:6919
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
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:7098
Layer createLayer(const char *layerClass, const Layer &parent)
This class groups all VFB related methods.
Definition: vraysdk.hpp:6467
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:6163
static bool isActiveState(RendererState value)
Convenience function for checking if a state value is in the rendering subset (including preparing).
Definition: vraysdk.hpp:7557
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 setOnVFBClick(T &object, const void *userData=NULL)
This is an overloaded member function, provided for convenience. It differs from the above function o...
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
std::vector< std::string > getPluginTypesOfCategories(PluginCategories categories) 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...
void setOnVFBClick(void(*callback)(VRayRenderer &, VFBMouseButton button, int x, int y, bool ctrl, bool shift, void *userData), const void *userData=NULL)
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:8341
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...
void setUserSceneName(const std::string &sceneName)
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:7554
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:7561
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
void setOnEnhanceOnCollaboration(int(*callback)(VRayRenderer &, const std::vector< std::string > &fileList, double instant, void *), const void *userData=NULL)
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 setDenoiserOptions(const DenoiserOptions &denoiserOptions)
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...
void setUserSceneName(const char *sceneName)
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:7712
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
std::vector< Plugin > getPluginsOfCategory(PluginCategory category) const
Returns all plugin instances that belong to the passed category.
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)
std::string getUserSceneName()
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)
void setOnEnhanceOnCollaboration(T &object, const void *userData=NULL)
This is an overloaded member function, provided for convenience. It differs from the above function o...
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)
std::vector< std::string > getPluginTypesOfCategories(const std::vector< PluginCategories > &categories) const
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:8733
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:5426
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:402
@ stampFontWeight_light
Light font.
Definition: vraysdk.hpp:404
@ stampFontWeight_bold
Bold font.
Definition: vraysdk.hpp:405
@ stampFontWeight_normal
Normal weight.
Definition: vraysdk.hpp:403
StampFontStyle
Describes the style of a UI font.
Definition: vraysdk.hpp:396
@ stampFontStyle_italic
Italic style.
Definition: vraysdk.hpp:398
@ stampFontStyle_normal
Normal style.
Definition: vraysdk.hpp:397
BlendMode
Definition: vraysdk.hpp:421
@ BlendMode_Saturation
Uses the saturation from the FG, while the value and hue are taken from the BG.
Definition: vraysdk.hpp:444
@ BlendMode_LinearBurn
Same as Color Burn but with less contrast.
Definition: vraysdk.hpp:429
@ BlendMode_Last
Last element.
Definition: vraysdk.hpp:456
@ BlendMode_SplotlightBlend
Also known as 'Spotlight Blend (8bit)'. Same as Spotlight, but additionally brightens the BG.
Definition: vraysdk.hpp:435
@ BlendMode_FgWhiteMask
Definition: vraysdk.hpp:454
@ BlendMode_Add
Adds the FG to the BG.
Definition: vraysdk.hpp:424
@ BlendMode_Subtract
Subtracts the FG from the BG. Does not affect completely black areas.
Definition: vraysdk.hpp:425
@ BlendMode_Hardlight
Also known as 'Hard Light (8bit)'. Spotlight is applied to pixels where the FG is dark and Screen is ...
Definition: vraysdk.hpp:438
@ 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:440
@ BlendMode_Exclusion
Same as Difference but with less contrast.
Definition: vraysdk.hpp:442
@ BlendMode_ColorDodge
Also known as 'Color Dodge (8bit)'. The color of the FG is applied to lighter pixels in the BG.
Definition: vraysdk.hpp:432
@ BlendMode_Background
Use as background.
Definition: vraysdk.hpp:449
@ BlendMode_Lighten
Compares the FG to the BG and takes the lighter of the two.
Definition: vraysdk.hpp:430
@ BlendMode_Overlay
Also known as 'Overlay (8bit)'. Darker pixels become darker where the BG is dark and brighter pixels ...
Definition: vraysdk.hpp:436
@ BlendMode_Multiply
Multiplies the FG by the BG.
Definition: vraysdk.hpp:427
@ BlendMode_Spotlight
Also known as 'Spotlight (8bit)'. Same as Multiply, but with twice the brightness.
Definition: vraysdk.hpp:434
@ BlendMode_Hue
Uses the hue from the FG , while the value and saturation are taken from the BG.
Definition: vraysdk.hpp:443
@ BlendMode_ColorBurn
The color of the FG is applied to darker pixels in the BG.
Definition: vraysdk.hpp:428
@ BlendMode_Average
The average of the current layer (FG) and the result from the layers below it (BG).
Definition: vraysdk.hpp:423
@ BlendMode_Darken
Compares the FG to the BG and takes the darker pixel values of the two.
Definition: vraysdk.hpp:426
@ BlendMode_Difference
Compares the pixels in the BG and FG and subtracts the darker pixels from the brighter ones.
Definition: vraysdk.hpp:441
@ BlendMode_Value
Uses the value from the FG, while the hue and saturation are taken from the BG.
Definition: vraysdk.hpp:446
@ BlendMode_Softlight
Also known as 'Soft Light (8bit)'. Darker pixels become darker where the FG is dark and brighter pixe...
Definition: vraysdk.hpp:437
@ BlendMode_LinearDodge
Also known as 'Linear Dodge (8bit)'. Same as Color Dodge but with less contrast.
Definition: vraysdk.hpp:433
@ 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:439
@ BlendMode_Screen
Makes both light and dark areas lighter.
Definition: vraysdk.hpp:431
@ BlendMode_Color
Uses the hue and saturation from the FG, while the value is taken from the BG.
Definition: vraysdk.hpp:445
@ BlendMode_Foreground
Use as foreground.
Definition: vraysdk.hpp:450
@ BlendMode_Divide
Subtracts the BG from the FG. Dark areas of the render are brightened, while bright areas of the rend...
Definition: vraysdk.hpp:447
@ BlendMode_Overwrite
Displays the current layer (FG) on top of all layers (BG) without blending. This is the default.
Definition: vraysdk.hpp:422
@ BlendMode_Normal
Blends the alpha of the VRayMtlSelect render element's material and other layers.
Definition: vraysdk.hpp:448
Flags
Definition: vraysdk.hpp:347
@ EnumRadioButtons
Specific to Int properties, the UI should use radio buttons.
Definition: vraysdk.hpp:351
@ Stretched
Specifies that when a widget is added it has to be stretched.
Definition: vraysdk.hpp:381
@ NonResettable
Properties with this flag won't be reset by calls to resetPropsToDefaults (e.g. Layer name).
Definition: vraysdk.hpp:367
@ WithoutLineEdit
Definition: vraysdk.hpp:378
@ HorizontalRolloutControls
Definition: vraysdk.hpp:360
@ Hidden
If this flag is raised the property should be temporarily hidden from its "Properties" UI.
Definition: vraysdk.hpp:350
@ Advanced
Indicate a property only visible when toggling advanced properties visibility/export mode or whatever...
Definition: vraysdk.hpp:369
@ ReadOnly
Properties with this flag should be shown with a read only UI.
Definition: vraysdk.hpp:363
@ EnumComboBox
Specific to Int properties, the UI should use a combo box.
Definition: vraysdk.hpp:352
@ Command
Definition: vraysdk.hpp:356
@ ScrollableVerticalRollout
Scrollable rollouts will have their contents in a scroll area.
Definition: vraysdk.hpp:365
@ CollapsibleVerticalRollout
Collapsible rollouts have buttons to collapse/expand them.
Definition: vraysdk.hpp:364
@ NoCustomStyleTag
Properties with this flag will not have Q_PROPERTY for custom styling (e.g. horizontal_rollout_groupb...
Definition: vraysdk.hpp:366
@ HasPipetteTool
Specific to Color property, add an additional pipette tool next to the color swatch button.
Definition: vraysdk.hpp:371
@ Transient
Parameter that is not stored in files.
Definition: vraysdk.hpp:362
@ Internal
No UI should be created in its "Properties" UI.
Definition: vraysdk.hpp:349
@ NoUndo
Properties with this flag don't need undo on changes. Example calculated images, curves for now.
Definition: vraysdk.hpp:368
@ Const
Properties marked as "Const" cannot have their internal value modified (i.e. const).
Definition: vraysdk.hpp:374
StampFontFamily
Describes the family of a UI font.
Definition: vraysdk.hpp:385
@ stampFontFamily_monospaced
Monospaced font.
Definition: vraysdk.hpp:392
@ stampFontFamily_sansSerif
A sans serif font.
Definition: vraysdk.hpp:390
@ stampFontFamily_default
Default family.
Definition: vraysdk.hpp:386
@ stampFontFamily_script
Script font (handwriting).
Definition: vraysdk.hpp:389
@ stampFontFamily_modern
Modern font.
Definition: vraysdk.hpp:391
@ stampFontFamily_roman
Roman (serif) font.
Definition: vraysdk.hpp:388
@ stampFontFamily_decorated
Decorated font.
Definition: vraysdk.hpp:387
Type
Definition: vraysdk.hpp:325
@ Rollout
Not in use!
Definition: vraysdk.hpp:335
@ Double
Not in use!
Definition: vraysdk.hpp:336
@ StampString
Holds two strings - raw string with user entered text and one string with fields replaced.
Definition: vraysdk.hpp:343
@ Image
Not in use!
Definition: vraysdk.hpp:339
@ Stream
Not in use! Binary stream holder.
Definition: vraysdk.hpp:344
@ IntEnum
It is an Int with a fixed number of values.
Definition: vraysdk.hpp:326
@ Curve
Not in use!
Definition: vraysdk.hpp:338
@ CustomPopup
Not in use! Holds a pointer to a CustomPopupMenuCallback, can be nullptr.
Definition: vraysdk.hpp:340
@ UInt32
Not in use!
Definition: vraysdk.hpp:337
@ MaskItemList
Not in use! Holds a list of items used for masking - each item is represented with some id,...
Definition: vraysdk.hpp:341
@ StampFont
Holds a StampFontDesc structure describing a font.
Definition: vraysdk.hpp:342
RGBA color, float32.
Definition: vraysdk.hpp:1479
AColor toSRGB() const noexcept
Creates the copy of this AColor with the values converted from linear to sRGB.
Definition: vraysdk.hpp:1612
void operator-=(const AColor &c) noexcept
Definition: vraysdk.hpp:1513
void operator*=(const AColor &c) noexcept
Definition: vraysdk.hpp:1520
void operator/=(const AColor &c) noexcept
Definition: vraysdk.hpp:1548
void makeWhiteComplement() noexcept
Definition: vraysdk.hpp:1591
void operator+=(const AColor &c) noexcept
Definition: vraysdk.hpp:1506
AColor getWhiteComplement() const noexcept
Returns the white complement of the AColor.
Definition: vraysdk.hpp:1585
float getLength() const noexcept
Returns the length of the RGBA components.
Definition: vraysdk.hpp:1575
float getLengthSquared() const noexcept
Returns the squared sum of the RGBA components.
Definition: vraysdk.hpp:1580
float maxComponentValue() const noexcept
Calculates the magnitude of the greatest color component (the alpha is not taken into account)
Definition: vraysdk.hpp:1597
AColor fromSRGB() const noexcept
Creates the copy of this AColor with the values converted from sRGB to linear.
Definition: vraysdk.hpp:1602
Contains the auto-exposure and auto-white balance values computed during the last light cache calcula...
Definition: vraysdk.hpp:3664
float autoWhiteBalance
The auto-white balance (in Kelvin). 0 means that autoWhiteBalance calculations are not enabled.
Definition: vraysdk.hpp:3666
float ISO
Definition: vraysdk.hpp:3667
float autoExposure
The auto-exposure multiplier. 0 means that autoExposure calculations are not enabled.
Definition: vraysdk.hpp:3665
Attributes storage format: [attrName\0|type{uint8}|value{some_bytes}][...][...]\0.
Definition: vraysdk.hpp:11141
void add(const char(&name)[nameLen], const std::string &value)
Definition: vraysdk.hpp:11231
void add(const std::string &name, const AColor &value)
Definition: vraysdk.hpp:11259
void add(const char *name, size_t nameLen, float value)
Definition: vraysdk.hpp:11309
void add(const std::string &name, const char(&value)[valueLen])
Definition: vraysdk.hpp:11275
void add(const std::string &name, const std::string &value)
Definition: vraysdk.hpp:11282
void add(const char(&name)[count], const AColor &value)
Definition: vraysdk.hpp:11206
BinUserAttributeTypeFlags
Definition: vraysdk.hpp:11163
bool hasData() const
Checks if we've written any attributes.
Definition: vraysdk.hpp:11395
void close()
Definition: vraysdk.hpp:11384
void add(const std::string &name, const Vector &value)
Definition: vraysdk.hpp:11252
IntList toIntList()
Definition: vraysdk.hpp:11403
void add(const char *name, size_t nameLen, const AColor &value)
Definition: vraysdk.hpp:11347
void add(const char *name, size_t nameLen, const char *value, size_t valueLen)
Definition: vraysdk.hpp:11373
void add(const std::string &name, float value)
Definition: vraysdk.hpp:11245
void add(const std::string &name, const char *value, size_t valueLen)
Definition: vraysdk.hpp:11267
std::string toString() const
Definition: vraysdk.hpp:11415
BinUserAttributeType
Definition: vraysdk.hpp:11154
void add(const char *name, size_t nameLen, int value)
Definition: vraysdk.hpp:11290
void add(const char(&name)[nameLen], const char *value, size_t valueLen)
Definition: vraysdk.hpp:11215
void add(const char(&name)[count], float value)
Definition: vraysdk.hpp:11190
void add(const char *name, size_t nameLen, const Vector &value)
Definition: vraysdk.hpp:11325
void add(const char(&name)[nameLen], const char(&value)[valueLen])
Definition: vraysdk.hpp:11223
void add(const char(&name)[count], const Vector &value)
Definition: vraysdk.hpp:11198
void add(const std::string &name, int value)
Definition: vraysdk.hpp:11238
size_t getNumBytes() const
Get number of written bytes.
Definition: vraysdk.hpp:11390
void add(const char(&name)[count], int value)
Definition: vraysdk.hpp:11182
Axis-aligned bounding box.
Definition: vraysdk.hpp:2866
Vector pmax
The upper bounds for the box along the three axes.
Definition: vraysdk.hpp:2868
void expand(const Box &box)
Definition: vraysdk.hpp:2887
void expand(const Vector &point)
Definition: vraysdk.hpp:2872
Vector pmin
The lower bounds for the box along the three axes.
Definition: vraysdk.hpp:2867
Definition: vraysdk.hpp:11089
int cpuCount
Only ServerReady means no error.
Definition: vraysdk.hpp:11117
int vrayVersion
Server V-Ray version number.
Definition: vraysdk.hpp:11120
Status
Definition: vraysdk.hpp:11090
std::string hostConnectedTo
Server is busy connected to ip. Valid only when status is ServerReady.
Definition: vraysdk.hpp:11126
std::string hostResolved
hostName:port translated to ip:port.
Definition: vraysdk.hpp:11123
std::string revisionTime
The time the server revision is built.
Definition: vraysdk.hpp:11129
RGB color, float32.
Definition: vraysdk.hpp:1151
Color getWhiteComplement() const noexcept
Returns the white complement of the Color.
Definition: vraysdk.hpp:1240
float getIntensity() const noexcept
Returns the intensity of the color (also called chroma or saturation) which is the brightness or dull...
Definition: vraysdk.hpp:1192
void makeWhiteComplement() noexcept
Definition: vraysdk.hpp:1246
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:1339
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:1210
static Matrix getRGBtoRGBmatrix(RGBColorSpace srcColorSpace, RGBColorSpace dstColorSpace)
void operator*=(const Color &c) noexcept
Definition: vraysdk.hpp:1272
Color fromSRGB()
Creates the copy of this Color with the values converted from sRGB to linear.
Definition: vraysdk.hpp:1345
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:1197
RGBColorSpace
These color space do not include their corresponding gamma corrections!
Definition: vraysdk.hpp:1171
float getLengthSquared() const noexcept
Returns the squared length of the color.
Definition: vraysdk.hpp:1205
void operator/=(const Color &c) noexcept
Definition: vraysdk.hpp:1306
Color toSRGB()
Creates the copy of this Color with the values converted from linear to sRGB.
Definition: vraysdk.hpp:1354
void operator-=(const Color &c) noexcept
Definition: vraysdk.hpp:1264
void operator+=(const Color &c) noexcept
Definition: vraysdk.hpp:1256
void setContrast(float k, float middle=0.5f) noexcept
Definition: vraysdk.hpp:1232
void setSaturation(float k) noexcept
Definition: vraysdk.hpp:1221
float getPower() const
Returns the sum of all color components.
Definition: vraysdk.hpp:1215
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:2730
long long deviceHandle
Device handle.
Definition: vraysdk.hpp:2731
int ccMajor
CUDA Compute Capability Major version number.
Definition: vraysdk.hpp:2756
int rtCoreVersion
The version of the raytracing cores (if supported). 0 if the GPU does not support RT Cores.
Definition: vraysdk.hpp:2758
int numConnectedDisplays
Number of displays (monitors) attached to this device. -1 if this information is unavailable.
Definition: vraysdk.hpp:2753
Type
Definition: vraysdk.hpp:2744
@ deviceType_CPU
CPU device.
Definition: vraysdk.hpp:2746
@ deviceType_GPU
GPU device.
Definition: vraysdk.hpp:2747
@ deviceType_default
Default.
Definition: vraysdk.hpp:2745
@ deviceType_ACCEL
Accelerated device.
Definition: vraysdk.hpp:2748
int isCpuEmulation
Is device CPU emulated.
Definition: vraysdk.hpp:2766
std::string name
Non-unique displayable name. Device index is its unique identifier.
Definition: vraysdk.hpp:2734
int cudaOrdinalIndex
Cuda ordinal index.
Definition: vraysdk.hpp:2763
int useForRendering
Device is used for rendering.
Definition: vraysdk.hpp:2738
int tccMode
TCC mode.
Definition: vraysdk.hpp:2764
Type deviceType
Device type.
Definition: vraysdk.hpp:2751
int busId
Bus ID.
Definition: vraysdk.hpp:2761
int totalMemoryMB
MegaBytes.
Definition: vraysdk.hpp:2752
int localIndex
Local index.
Definition: vraysdk.hpp:2762
long long platform
Platform.
Definition: vraysdk.hpp:2732
int ccMinor
CUDA Compute Capability Minor version number.
Definition: vraysdk.hpp:2757
int shaderProcessorsCount
Shader processors count.
Definition: vraysdk.hpp:2760
int useForDenoising
Device is used for denoising.
Definition: vraysdk.hpp:2739
int frequencyMHz
Base clock frequency or -1 if not available.
Definition: vraysdk.hpp:2754
int isSupported
Is device supported.
Definition: vraysdk.hpp:2740
int gFlops
Theoretical GFLOPS. 0 or -1 if not available.
Definition: vraysdk.hpp:2755
Definition: vraysdk.hpp:3565
FlagVal skipAlpha
True if the alpha channel should NOT be denoised.
Definition: vraysdk.hpp:3574
FlagVal
Definition: vraysdk.hpp:3566
@ Enabled
Will reset the flag.
Definition: vraysdk.hpp:3568
@ Default
Will set the flag.
Definition: vraysdk.hpp:3569
FlagVal panorama
True if denoised image is wrapped around the left/right border.
Definition: vraysdk.hpp:3573
FlagVal hideDest
Hide destination channel in VFB.
Definition: vraysdk.hpp:3572
FlagVal optixUpscale
True if the optix denoiser should use the upscaling mode. Does nothing for other engines.
Definition: vraysdk.hpp:3575
FlagVal allowInSingleChannelFiles
True to allow writing to single channel files too. Off by default.
Definition: vraysdk.hpp:3576
FlagVal skipAuxElementsInFiles
True to skip writing the additional channels to files.
Definition: vraysdk.hpp:3577
The necessary parameters passed to the VRayRenderer::enableDRClient interface.
Definition: vraysdk.hpp:3749
bool withBroadcastListener
True if a broadcast listener socket was created.
Definition: vraysdk.hpp:3756
std::string httpProxy
server:port connection parameter for http connections via proxy
Definition: vraysdk.hpp:3751
int connectTimeout
Initial connection timeout in seconds.
Definition: vraysdk.hpp:3762
std::string dispatcher
can either be an empty string or host[:port]
Definition: vraysdk.hpp:3750
int verboseLevel
Numeric progress verbosity level from 0 (none) to 4 (all, incl. debug)
Definition: vraysdk.hpp:3764
bool enableAssigningWUsAsBackups
TransferrableDrOptions.
Definition: vraysdk.hpp:3758
bool localRendering
True if, when local dispatcher selected, it's configured to spawn a local render server.
Definition: vraysdk.hpp:3755
int upstreamChannels
Number of upstream connections, which the client side will use, when pipelining is not enabled.
Definition: vraysdk.hpp:3763
bool pipelinedUpstream
Whether to use pipelining. Note pipelining will be disabled internally (even if requested),...
Definition: vraysdk.hpp:3757
Used by VRayRenderer::getImage() and RenderElement::getImage()
Definition: vraysdk.hpp:2381
ImageRegion region
Optional crop rectangle.
Definition: vraysdk.hpp:2382
bool flipImage
Flip image top-bottom.
Definition: vraysdk.hpp:2385
bool doColorCorrect
Whether to apply VFB color corrections.
Definition: vraysdk.hpp:2383
bool stripAlpha
Set alpha to 1.
Definition: vraysdk.hpp:2384
A rectangle defined by top-left and bottom-right frame coordinates.
Definition: vraysdk.hpp:253
Options passed to VRayRenderer::saveImage.
Definition: vraysdk.hpp:809
enum VRay::ImageWriterOptions::CompressionType compressionType
for EXR format only
int bitsPerChannel
for EXR format only - either 16 or 32
Definition: vraysdk.hpp:844
Additional parameter flags for Instancer and Instancer2 plugins.
Definition: vraysdk.hpp:3644
static const int useUserAttributesBin
Use binary user attributes.
Definition: vraysdk.hpp:3656
static const int useObjectProperties
Use object properties.
Definition: vraysdk.hpp:3657
static const int useParentTimesAtleastForGeometry
Definition: vraysdk.hpp:3649
static const int useSkipCryptomatte
Skip registering Node for the Cryptomatte.
Definition: vraysdk.hpp:3654
static const int useMaterial
Use material override.
Definition: vraysdk.hpp:3651
static const int useGeometry
Use geometry override.
Definition: vraysdk.hpp:3652
static const int useMapChannels
Use additional map channels.
Definition: vraysdk.hpp:3653
static const int useRenderIDOverride
Use renderIDOverride.
Definition: vraysdk.hpp:3655
Definition: vraysdk.hpp:2835
unsigned long long usage
The name of the memory type category.
Definition: vraysdk.hpp:2837
Current rendering progress.
Definition: vraysdk.hpp:2826
std::string name
name of the device
Definition: vraysdk.hpp:2827
float totalMem
total mem in mega bytes
Definition: vraysdk.hpp:2830
float utilization
usage (from 0.0f to 100.0f)
Definition: vraysdk.hpp:2828
float freeMem
free mem in mega bytes
Definition: vraysdk.hpp:2829
Returned by VRayRenderer::getInteractiveStatistics when rendering in interactive mode.
Definition: vraysdk.hpp:2818
float currentNoiseThreshold
Current noise threshold. Useful when dynamic noise threshold is enabled.
Definition: vraysdk.hpp:2823
unsigned elapsedTicks
Time since start.
Definition: vraysdk.hpp:2820
std::vector< ComputeDeviceStatistics > computeDevices
array of statistics for each device with valid data
Definition: vraysdk.hpp:2833
std::vector< ComputeDeviceMemoryType > computeDevicesMemUsage
Memory usage by memory type.
Definition: vraysdk.hpp:2840
double pathsPerSecond
Number of camera rays traced per second.
Definition: vraysdk.hpp:2819
int sampleLevel
Number of samples per pixel accumulated.
Definition: vraysdk.hpp:2821
int numPasses
Number of sampling passes done.
Definition: vraysdk.hpp:2822
Parameters for setLicenseServer(). Only serverName is obligatory.
Definition: vraysdk.hpp:3979
std::string proxyUserName
Optional http proxy server.
Definition: vraysdk.hpp:3993
std::string serverName1
Optional alternative server if the primary doesn't work.
Definition: vraysdk.hpp:3987
std::string serverName2
Optional second alternative server.
Definition: vraysdk.hpp:3990
int serverPort
default port is 30304
Definition: vraysdk.hpp:3981
std::string proxyName
Optional http proxy server.
Definition: vraysdk.hpp:3982
std::string username
Optional login.
Definition: vraysdk.hpp:3984
std::string serverName
Primary license server - hostname or IP address.
Definition: vraysdk.hpp:3980
std::string proxyPassword
Login for the optional proxy server.
Definition: vraysdk.hpp:3994
std::string password
For the optional login.
Definition: vraysdk.hpp:3985
Definition: vraysdk.hpp:5890
bool isApplied
[In] Is the channel enabled.
Definition: vraysdk.hpp:5895
Color colorMult
[In] Can be empty for the rest channel.
Definition: vraysdk.hpp:5892
float intensityMult
[In] Color multiplier.
Definition: vraysdk.hpp:5893
bool enabled
[In] Intensity multiplier.
Definition: vraysdk.hpp:5894
Definition: vraysdk.hpp:3776
3x3 column-major matrix, float32
Definition: vraysdk.hpp:1761
void setRow(const int i, const Vector &a) noexcept
Definition: vraysdk.hpp:1833
void makeTranspose(void) noexcept
Make the matrix to be the transpose of its currrent value.
Definition: vraysdk.hpp:1866
Vector & operator[](const int index) noexcept
Return the i-th column of the matrix (i=0,1,2).
Definition: vraysdk.hpp:1767
void operator+=(const Matrix &m) noexcept
Definition: vraysdk.hpp:1924
Matrix inverse(const Matrix &m) noexcept
Definition: vraysdk.hpp:1964
Matrix makeRotationMatrixX(float xrot) noexcept
Definition: vraysdk.hpp:2138
Matrix makeRotationMatrixY(float yrot) noexcept
Definition: vraysdk.hpp:2147
Matrix noScale(const Matrix &m) noexcept
Definition: vraysdk.hpp:2100
void makeIdentity(void) noexcept
Make the matrix the identity matrix.
Definition: vraysdk.hpp:1845
bool makeInverse(void) noexcept
Definition: vraysdk.hpp:1876
void makeDiagonal(const Vector &a) noexcept
Definition: vraysdk.hpp:1853
Matrix() noexcept=default
Constructor - initializes all components to zero.
void setCol(const int i, const Vector &a) noexcept
Definition: vraysdk.hpp:1826
Matrix makeRotationMatrixZ(float zrot) noexcept
Definition: vraysdk.hpp:2156
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:1939
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:1918
Matrix(Vector diagonal) noexcept
Constructor to diagonal matrix.
Definition: vraysdk.hpp:1788
void makeZero(void) noexcept
Make the matrix the zero matrix (all elements are zeroes).
Definition: vraysdk.hpp:1838
void set(float value) noexcept
Make diagonal matrix.
Definition: vraysdk.hpp:1809
Matrix normalize(const Matrix &m) noexcept
Definition: vraysdk.hpp:2092
void operator-=(const Matrix &m) noexcept
Definition: vraysdk.hpp:1932
Vector rotationAngles(const Matrix &m) noexcept
Definition: vraysdk.hpp:2112
void set(const Matrix &other) noexcept
Definition: vraysdk.hpp:1817
Vector scale(const Matrix &m) noexcept
Definition: vraysdk.hpp:2106
Matrix(const Vector &a, const Vector &b, const Vector &c) noexcept
Definition: vraysdk.hpp:1794
void operator*=(float x) noexcept
Multiply all elements in the matrix by the given number.
Definition: vraysdk.hpp:1913
Matrix rotate(const Matrix &m, const Vector &axis) noexcept
Definition: vraysdk.hpp:2086
void set(const Vector &a, const Vector &b, const Vector &c) noexcept
Definition: vraysdk.hpp:1804
A container for the data necessary to a export vrmesh with geometry, hair or particles....
Definition: vraysdk.hpp:5823
ValueList hairVertices
ValueList( VectorList ) (single frame) OR ValueList( ValueList(int, VectorList) ) (multiple frames - ...
Definition: vraysdk.hpp:5834
ValueList vertices
ValueList( VectorList ) (single frame) OR ValueList( ValueList(int, VectorList) ) (multiple frames - ...
Definition: vraysdk.hpp:5824
ValueList mapChannels
ValueList( ValueList(int, VectorList, IntList) )
Definition: vraysdk.hpp:5830
ValueList hairWidths
ValueList( FloatList ) (single frame) OR ValueList( ValueList(int, FloatList ) ) (multiple frames - ...
Definition: vraysdk.hpp:5836
ValueList hairVerticesPerStrand
ValueList( IntList ) (single frame) OR ValueList( ValueList(int, IntList ) ) (multiple frames - ...
Definition: vraysdk.hpp:5835
ValueList particleWidths
ValueList( FloatList ) (single frame) OR ValueList( ValueList(int, FloatList ) ) (multiple frames - ...
Definition: vraysdk.hpp:5838
ValueList faces
ValueList( IntList ) (single frame) OR ValueList( ValueList(int, IntList ) ) (multiple frames - ...
Definition: vraysdk.hpp:5825
ValueList mapChNames
ValueList( StringList )
Definition: vraysdk.hpp:5831
ValueList shaderNames
ValueList( ValueList(int, string) )
Definition: vraysdk.hpp:5832
ValueList faceNormals
ValueList( IntList ) (single frame) OR ValueList( ValueList(int, IntList ) ) (multiple frames - ...
Definition: vraysdk.hpp:5827
ValueList normals
ValueList( VectorList ) (single frame) OR ValueList( ValueList(int, VectorList) ) (multiple frames - ...
Definition: vraysdk.hpp:5826
ValueList velocities
ValueList( VectorList ) (single frame) OR ValueList( ValueList(int, VectorList) ) (multiple frames - ...
Definition: vraysdk.hpp:5828
ValueList faceMtlIDs
ValueList( IntList ) (single frame) OR ValueList( ValueList(int, IntList ) ) (multiple frames - ...
Definition: vraysdk.hpp:5829
ValueList edgeVisibility
ValueList( IntList ) (single frame) OR ValueList( ValueList(int, IntList ) ) (multiple frames - ...
Definition: vraysdk.hpp:5833
ValueList particleVertices
ValueList( VectorList ) (single frame) OR ValueList( ValueList(int, VectorList) ) (multiple frames - ...
Definition: vraysdk.hpp:5837
Helper structure storing the relevant configuration entries as they were read from the configuration ...
Definition: vraysdk.hpp:10447
char familySeparator
The separator that is used to distinguish different families for UI separation.
Definition: vraysdk.hpp:10463
std::string getErrorString() const
Get whether there was any error with the loading of the OCIO configuration.
Definition: vraysdk.hpp:10501
std::vector< std::string > roles
List of the stored roles in the configuration.
Definition: vraysdk.hpp:10453
std::vector< std::string > looks
List of the looks in the configuration.
Definition: vraysdk.hpp:10457
std::vector< std::string > viewTransforms
List of unique view transformations from the configuration.
Definition: vraysdk.hpp:10461
std::vector< std::string > colorSpaces
List of the stored color spaces in the configuration.
Definition: vraysdk.hpp:10449
OCIOConfigurationData(const char *fileName=NULL, SourceMode vraySourceType=SourceMode::Automatic)
Definition: vraysdk.hpp:10469
std::vector< std::string > devices
List of devices as read from the configuration.
Definition: vraysdk.hpp:10459
std::vector< std::string > roleColorSpaces
List of corresponding color spaces for each role. Size will match the roles size.
Definition: vraysdk.hpp:10455
std::vector< std::string > colorSpaceFamilies
List of stored color space families for the configuration. May be empty.
Definition: vraysdk.hpp:10451
Definition: vraysdk.hpp:10560
std::vector< OSLInputParameter > inputParams
Input parameters defined in the shader file.
Definition: vraysdk.hpp:10564
std::vector< std::string > outputColorParams
Output color parameters defined in the shader file.
Definition: vraysdk.hpp:10561
std::vector< std::string > outputFloatParams
Output float parameters defined in the shader file.
Definition: vraysdk.hpp:10562
std::vector< std::string > outputClosureParams
Output closure parameters defined in the shader file.
Definition: vraysdk.hpp:10563
The info contained in geometry, hair or particle objects.
Definition: vraysdk.hpp:2851
std::string name
the name of the object
Definition: vraysdk.hpp:2852
int id
the id of the object
Definition: vraysdk.hpp:2853
int vEnd
the end of the voxel range of the object (vEnd is excluded from the range)
Definition: vraysdk.hpp:2855
int vBegin
the begin of the voxel range of the object (vBegin is included in the range)
Definition: vraysdk.hpp:2854
Returned by VRayRenderer::getLastParserError. Use to diagnose problems when loading vrscene files.
Definition: vraysdk.hpp:4072
See VRayRenderer::pickPlugins.
Definition: vraysdk.hpp:5842
This struct is used to determine if a plugin type is of certain category.
Definition: vraysdk.hpp:4330
bool hasGeometricObjectCategory() const noexcept
Is the plugin of category_geometric_object.
Definition: vraysdk.hpp:4352
unsigned long long pluginCategoryField
bitfield of the plugin categories
Definition: vraysdk.hpp:4331
bool hasTextureFloatCategory() const noexcept
Is the plugin of category_texture_float.
Definition: vraysdk.hpp:4392
bool hasUvwgenCategory() const noexcept
Is the plugin of category_uvwgen.
Definition: vraysdk.hpp:4417
bool hasBsdfCategory() const noexcept
Is the plugin of category_bsdf.
Definition: vraysdk.hpp:4347
bool hasRenderChannelCategory() const noexcept
Is the plugin of category_render_channel.
Definition: vraysdk.hpp:4372
bool hasSettingsCategory() const noexcept
Is the plugin of category_settings.
Definition: vraysdk.hpp:4382
bool hasMaterialCategory() const noexcept
Is the plugin of category_material.
Definition: vraysdk.hpp:4367
bool hasBitmapCategory() const noexcept
Is the plugin of category_bitmap.
Definition: vraysdk.hpp:4342
bool hasRenderViewCategory() const noexcept
Is the plugin of category_render_view.
Definition: vraysdk.hpp:4377
bool hasGeometrySourceCategory() const noexcept
Is the plugin of category_geometry_source.
Definition: vraysdk.hpp:4357
bool hasLightCategory() const noexcept
Is the plugin of category_light.
Definition: vraysdk.hpp:4362
bool hasVolumetricCategory() const noexcept
Is the plugin of category_volumetric.
Definition: vraysdk.hpp:4422
bool hasTextureIntCategory() const noexcept
Is the plugin of category_texture_int.
Definition: vraysdk.hpp:4397
std::vector< PluginCategory > getAll() const
Returns the bitfield as vector of enum values.
bool hasTextureVectorCategory() const noexcept
Is the plugin of category_texture_vector.
Definition: vraysdk.hpp:4412
bool hasTextureCategory() const noexcept
Is the plugin of category_texture.
Definition: vraysdk.hpp:4387
bool hasTextureMatrixCategory() const noexcept
Is the plugin of category_texture_matrix.
Definition: vraysdk.hpp:4402
bool hasTextureTransformCategory() const noexcept
Is the plugin of category_texture_transform.
Definition: vraysdk.hpp:4407
Used by VRay::Proxy::createMeshFile()
Definition: vraysdk.hpp:3467
std::string customPreviewFile
file name to read and use its vertices and faces for the preview voxel
Definition: vraysdk.hpp:3503
int previewType
Definition: vraysdk.hpp:3495
std::string destination
destination file name
Definition: vraysdk.hpp:3492
int startFrame
used if animOn is true
Definition: vraysdk.hpp:3497
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:3501
PreviewTypes
Definition: vraysdk.hpp:3468
@ SIMPLIFY_FACE_SAMPLING
Definition: vraysdk.hpp:3472
@ SIMPLIFY_COMBINED
Definition: vraysdk.hpp:3487
@ SIMPLIFY_CLUSTERING
Definition: vraysdk.hpp:3476
@ SIMPLIFY_EDGE_COLLAPSE
Definition: vraysdk.hpp:3480
int endFrame
used if animOn is true
Definition: vraysdk.hpp:3498
Bool exportPointCloud
when enabled, adds a point cloud representation of the mesh separated into different levels of detail...
Definition: vraysdk.hpp:3508
float pointSize
determines the size of point cloud disks at the most detailed level. If this value is small,...
Definition: vraysdk.hpp:3509
int previewParticles
number of preview particles (default 20000)
Definition: vraysdk.hpp:3511
std::vector< Color > voxelInfoWireColor
array of diffuse (wire) colors - 1 Color per mesh object
Definition: vraysdk.hpp:3504
std::vector< int > objectIDs
array of unique IDs for the respective meshes. This should usually match Node.objectID values.
Definition: vraysdk.hpp:3502
int previewFaces
approximate number of preview triangles (default 10000; set to 0 to disable preview)
Definition: vraysdk.hpp:3494
int mergeVoxels
merge all voxels of the same type, before subdivision
Definition: vraysdk.hpp:3499
std::vector< Bool > voxelInfoFlipNormals
array of flipNormals flags (1 flag per mesh object - true if the geometric normals should be flipped)
Definition: vraysdk.hpp:3506
int previewHairs
number of preview hairs (default 1000)
Definition: vraysdk.hpp:3510
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:3505
Bool bakeTransforms
when enabled (default), applies the input Transform(s) to the geometry data, otherwise writes the Tra...
Definition: vraysdk.hpp:3512
int elementsPerVoxel
number of triangles in each voxel
Definition: vraysdk.hpp:3493
int animOn
enables saving multiple animated frames in the proxy
Definition: vraysdk.hpp:3496
The necessary parameters for reading data in a proxy file.
Definition: vraysdk.hpp:3516
int flip_axis
0 do not rotate; 1 transform from Maya to 3dsMax coordinate system (90 deg. rotation around x axis); ...
Definition: vraysdk.hpp:3520
float particle_width_multiplier
a multiplier to the particle width data
Definition: vraysdk.hpp:3537
float smooth_angle
smooth angle in degrees
Definition: vraysdk.hpp:3525
int compute_normals
true to calculate smooth normals
Definition: vraysdk.hpp:3519
int num_preview_faces
number of faces in preview
Definition: vraysdk.hpp:3524
bool use_full_names
read the full path instead of only the name
Definition: vraysdk.hpp:3529
float hair_width_multiplier
a multiplier to the hair width data
Definition: vraysdk.hpp:3536
bool compute_bbox
true to compute the bounding box, false to read it from the file
Definition: vraysdk.hpp:3530
std::string file
file name to read
Definition: vraysdk.hpp:3517
bool subdiv_uvs
subdivide or skip mapping channels
Definition: vraysdk.hpp:3532
int subdiv_level
the subdivision level
Definition: vraysdk.hpp:3521
std::string object_path
starting object path in Alembic hierarchy
Definition: vraysdk.hpp:3518
bool use_alembic_offset
true to use Alembic animation frame offset
Definition: vraysdk.hpp:3535
float fps
frames per second for calculation of current time and frame
Definition: vraysdk.hpp:3528
bool instancing
turns on/off the instancing of Alembic duplicated objects
Definition: vraysdk.hpp:3534
bool subdiv_preserve_geom_borders
if true, the borders won't be subdivided
Definition: vraysdk.hpp:3533
int anim_type
animated proxy playback type(0 - loop; 1 - once; 2 - ping - pong; 3 - still)
Definition: vraysdk.hpp:3523
float anim_speed
animated proxy playback speed
Definition: vraysdk.hpp:3526
int subdiv_preserve_map_borders
determines the smoothing mode of the mapping channels' borders. 0-None, 1-Internal and 2-All
Definition: vraysdk.hpp:3522
bool subdiv_all_meshes
true to subdivide Alembic PolyMesh and SubD objects; false to subdivide only SubD objects
Definition: vraysdk.hpp:3531
float anim_offset
animated proxy initial frame offset
Definition: vraysdk.hpp:3527
Controls what the buffer returned by getData() contains.
Definition: vraysdk.hpp:2620
Plugin * alphaChannelPlugin
The plugin describing the alpha channel render element. Can be NULL.
Definition: vraysdk.hpp:2630
bool rgbOrder
true - RGB order, false - BGR order
Definition: vraysdk.hpp:2633
bool useDefaultAlpha
Use any existing alpha render channel.
Definition: vraysdk.hpp:2631
PixelFormat format
The desired pixel format.
Definition: vraysdk.hpp:2632
int layerIndex
For multi-layer elements only. The Cryptomatte layer index (between 0 and num_level/2)....
Definition: vraysdk.hpp:2635
ImageRegion * region
An optional image region rectange; NULL means the whole image.
Definition: vraysdk.hpp:2634
This structure is used to return information about a particular channel in the VFB.
Definition: vraysdk.hpp:2565
BinaryFormat binaryFormat
The channel binary format.
Definition: vraysdk.hpp:2567
Type type
The channel type/alias.
Definition: vraysdk.hpp:2568
const char * name
The name of the channel as it appears in the VFB.
Definition: vraysdk.hpp:2566
Definition: vraysdk.hpp:5862
int rgnLeft
Render region left.
Definition: vraysdk.hpp:5876
int rgnTop
Render region top.
Definition: vraysdk.hpp:5877
float cropRgnHeight
Crop region height.
Definition: vraysdk.hpp:5869
int bmpHeight
Output bitmap height. This is the sampling resolution, not the file resolution.
Definition: vraysdk.hpp:5865
int imgHeight
Output image height.
Definition: vraysdk.hpp:5873
float cropRgnLeft
Crop region left.
Definition: vraysdk.hpp:5866
int rgnHeight
Render region height.
Definition: vraysdk.hpp:5879
float cropRgnTop
Crop region top.
Definition: vraysdk.hpp:5867
int bmpWidth
Output bitmap width. This is the sampling resolution, not the file resolution.
Definition: vraysdk.hpp:5864
int imgWidth
Output image width.
Definition: vraysdk.hpp:5872
int rgnWidth
Render region width.
Definition: vraysdk.hpp:5878
int bitmask
Bitmask which indicates which part to be set or has been set.
Definition: vraysdk.hpp:5887
float cropRgnWidth
Crop region width.
Definition: vraysdk.hpp:5868
Combines various options required for the rendering process.
Definition: vraysdk.hpp:3682
bool showVfbButtonCopyToHostFrameBuffer
show "Duplicate to host frame buffer" button
Definition: vraysdk.hpp:3713
bool showVfbButtonIPRUpdate
show "Update IPR" button
Definition: vraysdk.hpp:3712
bool showVfbAddDenoiserREToSceneButton
show "Add Denoiser to the scene" button
Definition: vraysdk.hpp:3715
std::string vfbLanguage
[OPTIONAL] A language code string telling the VFB which builtin language to load (from VRay::Language...
Definition: vraysdk.hpp:3726
bool showVfbAddLightMixREToSceneButton
show "Add LightMix to the scene" button
Definition: vraysdk.hpp:3714
ThemeStyle vfbDrawStyle
specifies VFB drawing style
Definition: vraysdk.hpp:3693
bool useVfbLog
use built-in VFB log
Definition: vraysdk.hpp:3707
bool noRenderLicensePreCheck
if set appsdk will not check for render node license before rendering is started
Definition: vraysdk.hpp:3700
bool showVfbButtonTestResolution
show "Test Resolution" button
Definition: vraysdk.hpp:3710
bool enableVfbPlugins
Allow the VFB to load plugins.
Definition: vraysdk.hpp:3708
bool showVfbButtonIPRPause
show "Pause IPR" button
Definition: vraysdk.hpp:3711
ThemeStyle
Specifies the drawing style of the VFB widgets.
Definition: vraysdk.hpp:3685
bool hideToSceneButton
hide Light Mix To Scene button
Definition: vraysdk.hpp:3706
bool useDefaultVfbTheme
enabled by default. If set to false the parent application theme is inherited
Definition: vraysdk.hpp:3701
bool enableFrameBuffer
true to enable the frame buffer
Definition: vraysdk.hpp:3698
bool showVfbButtonDebugShading
show "IPR Debug Shading" button
Definition: vraysdk.hpp:3709
bool dockFrameBuffer
dock V-Ray Frame Buffer window
Definition: vraysdk.hpp:3705
bool allowInvalidCharactersInPluginNames
allow invalid characters in plugin names
Definition: vraysdk.hpp:3704
std::string pluginLibraryPath
[OPTIONAL] specifies additional, non-default plugin library paths to load vray_*.dll (libvray_*....
Definition: vraysdk.hpp:3724
bool showFrameBuffer
true to initially show the frame buffer
Definition: vraysdk.hpp:3699
bool previewRenderer
optimize the renderer for small preview purposes
Definition: vraysdk.hpp:3703
bool showVfbButtonInteractiveStart
show "Start IPR" button
Definition: vraysdk.hpp:3702
Definition: vraysdk.hpp:3542
std::string outputFileName
Definition: vraysdk.hpp:3545
bool compressProgressiveFiles
Set to false to disable compression. (These files can get quite large)
Definition: vraysdk.hpp:3548
int progressiveAutoSaveSeconds
Definition: vraysdk.hpp:3558
bool deleteResumableFileOnSuccess
Definition: vraysdk.hpp:3553
See encodeScannedMaterialParams() and getScannedMaterialUILicense()
Definition: vraysdk.hpp:4079
This structure contains the parameters used in the rendering of the scanned materials.
Definition: vraysdk.hpp:4094
int dome
the mapping channel
Definition: vraysdk.hpp:4140
int triplanar
Clear coat multiplier.
Definition: vraysdk.hpp:4162
float ccmul
This parameter modifies the clear coat reflection to metalic behavior, i.e., it modulates the reflect...
Definition: vraysdk.hpp:4161
float cutoff
the reflection rays count, the UI contains subdivision parameter, this must be seto to the square val...
Definition: vraysdk.hpp:4138
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:4153
float sceneScale
used when the plain option is set to PL_SCRAMBLE, determines the size of the pieces that are continuo...
Definition: vraysdk.hpp:4144
Bool noCachedGI
the output color space (Not used anymore, replaced by the vray color space)
Definition: vraysdk.hpp:4159
ColorSpace
Definition: vraysdk.hpp:4115
@ CS_PP
adobe rgb
Definition: vraysdk.hpp:4118
@ CS_ADOBE
sRGB - linear
Definition: vraysdk.hpp:4117
float saturation
inverse gamma
Definition: vraysdk.hpp:4129
Transform uvtrans
general result multiplier (tint)
Definition: vraysdk.hpp:4133
int noPrimGI
edge displacement, used to prevent the flat appearance of the edges
Definition: vraysdk.hpp:4151
MapChannelsMask mapChBitmask
multiplies the transparency (only the transparency, the translucency remains!) (Not used anymore)
Definition: vraysdk.hpp:4155
float fltStrength
strength of the replace paint effect
Definition: vraysdk.hpp:4157
int disablewmap
displacement/paralax multiplier
Definition: vraysdk.hpp:4131
float sssmul
Clear coat glossiness variation, the measured value is kept in presets.scratchdens.
Definition: vraysdk.hpp:4167
Triplanar
Definition: vraysdk.hpp:4121
@ TP_RNDOFFS
Enable triplanar.
Definition: vraysdk.hpp:4123
@ TP_RNDROT
Enable random offset.
Definition: vraysdk.hpp:4124
float retrace
the primary rays are rendered without using the GI engine (better acuracity, lower speed) (Not used a...
Definition: vraysdk.hpp:4152
ColorSpace clrSpace
strength of the filter
Definition: vraysdk.hpp:4158
int twoside
uniform reflections distribution, when nonzero the importance sampling is not used
Definition: vraysdk.hpp:4149
int displace
same as two side in the standard material
Definition: vraysdk.hpp:4150
int fasttrans
Controls the triplanar mapping, combination of enum Triplanar flags.
Definition: vraysdk.hpp:4163
int nsamples
the z value of the view vector below which bump is gradualy applied
Definition: vraysdk.hpp:4137
MapChannels
Definition: vraysdk.hpp:4102
@ VRSM_FILTER
the color of the material
Definition: vraysdk.hpp:4104
@ VRSM_CCMULT
general color multiplier
Definition: vraysdk.hpp:4105
float paintStrength
bitmask for the maps used in the rendering
Definition: vraysdk.hpp:4156
MapChannelsMask
These values can be combined. Each bit enables the corresponding feature.
Definition: vraysdk.hpp:4109
float transpMul
force opaque rendering even if backside lighting is present.
Definition: vraysdk.hpp:4154
Plain
Definition: vraysdk.hpp:4095
@ PL_HMGSYM
the material is homogenous and potentially anisotropic, an averaged brdf is used instead texture,...
Definition: vraysdk.hpp:4098
@ PL_TRIPLANAR
the material is homogenous and isotropic , no uv mapping is needed
Definition: vraysdk.hpp:4099
@ PL_HMG
no plain strategy
Definition: vraysdk.hpp:4097
int mapChannel
stop of the indirect ray if the total weight is below this value
Definition: vraysdk.hpp:4139
float multdirect
prevent double lighting by direct and reflection rays (not used anymore)
Definition: vraysdk.hpp:4141
float bumpstart
bump multiplier for the inclined views
Definition: vraysdk.hpp:4136
float scrambleSize
limit for the tracing recursion
Definition: vraysdk.hpp:4143
float ccglossyvar
Clear coat glossiness, the measured value is kept in presets.specbell.
Definition: vraysdk.hpp:4166
int usemap
uv mapping transformation matrix
Definition: vraysdk.hpp:4134
float ccbump
clear coat highlights
Definition: vraysdk.hpp:4147
float bumpmul
not used
Definition: vraysdk.hpp:4135
int traceDepth
multipliers for different parts of the light (not used anymore)
Definition: vraysdk.hpp:4142
ScannedMaterialParams()
sss thickness multiplier
int cchlight
the clear coat ior, used for carpaints and other materials with thin refractive layer
Definition: vraysdk.hpp:4146
Color filter
disable use of the enlargement, directly the original small sample is used for rendering (Not used an...
Definition: vraysdk.hpp:4132
float ccmetalrefl
rendering without using the GI engine at all (but most scenes have low scanned materials in count)
Definition: vraysdk.hpp:4160
int BWforGI
Used in volumetric translucency calculation, switches between two models of calculation,...
Definition: vraysdk.hpp:4164
float ccior
the size of one scene unit in cm
Definition: vraysdk.hpp:4145
int unfRefl
used to make the clear coat not perfect
Definition: vraysdk.hpp:4148
float invgamma
this option modifies the rendering in order to improve the result for materials without large details
Definition: vraysdk.hpp:4128
float ccglossy
The material is represented as non colored for the GI rays, used to prevent the color bleeding when t...
Definition: vraysdk.hpp:4165
Definition: vraysdk.hpp:4207
float specbell
Controls how to use the smooth brdf model.
Definition: vraysdk.hpp:4228
int plain
ClearCoat index of reflection.
Definition: vraysdk.hpp:4214
float shdmul
Height multiplier for self shadowing.
Definition: vraysdk.hpp:4225
float fuzzy
Controls the pure reflective behavior for inclined angles, a feature typical for brushed metal.
Definition: vraysdk.hpp:4232
float bumpstart
Bump multiplier for the inclined views.
Definition: vraysdk.hpp:4216
float topvLs_A
Used mostly with top view fabrics, modifies the rendering of the inclined views making them blurred a...
Definition: vraysdk.hpp:4233
float bumpmul
Plain materials strategy.
Definition: vraysdk.hpp:4215
float lfsizecm
value used to control the function converting translucency to transparency
Definition: vraysdk.hpp:4241
float free7
CC specular multiplier (Not used anymore)
Definition: vraysdk.hpp:4230
float orgglvar
the clear coat glossiness the inverse angle deviation width (60 is one degree), since 20....
Definition: vraysdk.hpp:4220
float specmul
CC specular highlights, inverse bell width (60 is one degree)
Definition: vraysdk.hpp:4229
float ccmetalrefl
Multiplier of the indirect light, used to handle the fluorescent materials by putting value below 1 i...
Definition: vraysdk.hpp:4237
ScannedMaterialPreset()
The large feature map physical size.
float orggls
Clear coat noise-like bump amount (there is separate hmap bump)
Definition: vraysdk.hpp:4219
int forcebrdf
Used to render materials with sharp sparks, a procedural map with relative size this param is used to...
Definition: vraysdk.hpp:4227
float indmul
When flakes is nonzero (spark mode) this parameter specifies to not scramble the uv coordinates.
Definition: vraysdk.hpp:4236
int triplanar
The sample thickness in mm, used to introduce alpha/translucency correction of thick materials.
Definition: vraysdk.hpp:4239
int keepflakesuv
Not used anymore (set to 1)
Definition: vraysdk.hpp:4235
float topvLs_B
Used in top view materials to control the light direction correction.
Definition: vraysdk.hpp:4234
int flakes
Brightness multiplier for self shadowing.
Definition: vraysdk.hpp:4226
float depthmul
The z-value of the view vector below which bump is gradualy applied.
Definition: vraysdk.hpp:4217
float transpf
used to force triplanar mapping when certain customer has old vray (luxottica)
Definition: vraysdk.hpp:4240
SmoothModelFlags
Definition: vraysdk.hpp:4208
@ SMF_PS
when set, the BRDF is "forced"
Definition: vraysdk.hpp:4210
@ SMF_FORCE
used in forcebrdf
Definition: vraysdk.hpp:4209
float shdhmul
Clear coat effect multiplier.
Definition: vraysdk.hpp:4224
float ccbump
Displacement multiplier.
Definition: vraysdk.hpp:4218
float free4
the material thumnail relative offset - this is kind of a hack, using the place of an old obsolete pa...
Definition: vraysdk.hpp:4222
int thumbpos
the clearcoat glossiness variation (0-none 1-the shallow anglesare glossy), since 20....
Definition: vraysdk.hpp:4221
The necessary parameters for reading the data in the preset config file (.mbc)
Definition: vraysdk.hpp:9408
std::string fileName
Scatter preset config file (.mbc)
Definition: vraysdk.hpp:9409
float unitRescale
Rescale to specific callers units setup, e.g. the default Cosmos asset units are centimeters,...
Definition: vraysdk.hpp:9411
Plugin scatterPlugin
A GeomScatter plugin instance to be filled by the Scatter preset config.
Definition: vraysdk.hpp:9410
bool isYAxisUp
If true - process as if Y is up axis and otherwise default to Z.
Definition: vraysdk.hpp:9412
Definition: vraysdk.hpp:10931
Object material
Material used for the particle, can be empty/invalid if no material override present.
Definition: vraysdk.hpp:10941
Transform transform
Particle transform.
Definition: vraysdk.hpp:10938
Object node
Particle object, always valid (unless the Particle is invalid).
Definition: vraysdk.hpp:10935
Definition: vraysdk.hpp:10748
CoordinateSystem
The coordinate system in which the preview will be loaded.
Definition: vraysdk.hpp:10761
CacheType
Definition: vraysdk.hpp:10749
Definition: vraysdk.hpp:10671
Definition: vraysdk.hpp:10676
A helper struct with info regarding file exports for plugins of a specified type.
Definition: vraysdk.hpp:2717
std::string fileNameSuffix
Substring to append at the end of the common part of the filename passed to the export function.
Definition: vraysdk.hpp:2721
std::string pluginType
Allowed types: "view", "lights", "geometry", "nodes", "materials", "textures", "bitmaps",...
Definition: vraysdk.hpp:2719
Describes a sub-sequence of an animation range at regular steps (usually step=1)
Definition: vraysdk.hpp:2725
Structure representing an enumerated item with a value and a name.
Definition: vraysdk.hpp:9838
int value
The integer value of the enum item.
Definition: vraysdk.hpp:9839
std::string name
The string name of the enum item.
Definition: vraysdk.hpp:9840
Describes a dependency between two plugin instances.
Definition: vraysdk.hpp:11039
PluginRef toPlugin
This plugin is used by the 'fromPlugin'.
Definition: vraysdk.hpp:11042
std::string fromProperty
The 'fromPlugin' property which uses 'toPlugin'.
Definition: vraysdk.hpp:11041
Plugin fromPlugin
This plugin uses the other plugin, 'toPlugin'.
Definition: vraysdk.hpp:11040
Definition: vraysdk.hpp:5913
bool skipAllSuccessorsOfCurrentPlugin
Definition: vraysdk.hpp:5926
bool overwriteExistingPlugin
Definition: vraysdk.hpp:5933
bool skipOnlyCurrentPlugin
Definition: vraysdk.hpp:5922
std::string name
Definition: vraysdk.hpp:5917
Describes a UI font.
Definition: vraysdk.hpp:409
StampFontFamily fontFamily
Font family.
Definition: vraysdk.hpp:411
char fontFace[100]
Name of the font face ("Arial" etc).
Definition: vraysdk.hpp:414
StampFontWeight fontWeight
Font weight.
Definition: vraysdk.hpp:413
int pointSize
Size of text, in points.
Definition: vraysdk.hpp:410
StampFontStyle fontStyle
Font style.
Definition: vraysdk.hpp:412
A struct that encapsulates the export scene options.
Definition: vraysdk.hpp:5754
bool appendFrameSuffix
valid only when currentFrameOnly=true - appends a %04d frame number to the file name
Definition: vraysdk.hpp:5763
std::string sceneBasePath
Optional absolute scene base path that can be used for resolving relative paths for the ....
Definition: vraysdk.hpp:5797
bool renderElementsSeparateFolders
controls the default value of SettingsOutput.relements_separateFolders
Definition: vraysdk.hpp:5759
bool compressed
enables zlib compression of large data arrays; requires hexArrays==true
Definition: vraysdk.hpp:5755
bool stripPaths
If enabled, the paths for bitmap textures and other external files are stripped from the file so that...
Definition: vraysdk.hpp:5764
bool hexArraysHash
data arrays hash will be computed and written for duplicate data
Definition: vraysdk.hpp:5757
bool printHeader
whether to write the comment section with version and time info
Definition: vraysdk.hpp:5760
std::vector< std::string > additionalIncludeFiles
Optional list of files to #include at the end of the main vrscene.
Definition: vraysdk.hpp:5782
bool hexTransforms
transforms will be encoded in hex (mainly useful with large instancers)
Definition: vraysdk.hpp:5758
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:5779
double rightInterval
Definition: vraysdk.hpp:5773
bool incremental
valid only when currentFrameOnly=true && appendFrameSuffix=false - set to true to incrementally appen...
Definition: vraysdk.hpp:5762
double leftInterval
Definition: vraysdk.hpp:5769
std::vector< SubFileInfo > subFileInfos
A list of files to split the scene into, based on plugin type. See SubFileInfo struct comments.
Definition: vraysdk.hpp:5776
bool hexArrays
data arrays will be encoded in hex
Definition: vraysdk.hpp:5756
int vrfilesComputeHashes
True if MD5 and SHA256 hashes should be computed and written in the .vrfiles file for each resolved a...
Definition: vraysdk.hpp:5799
int vrfilesExport
Enable or disable vrfiles file writing.
Definition: vraysdk.hpp:5795
std::string hostAppString
An optional string identifying the host application, version, etc.
Definition: vraysdk.hpp:5785
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:5790
bool currentFrameOnly
if true only the current keyframe is exported, otherwise the whole timeline
Definition: vraysdk.hpp:5761
bool vrdataExport
Enable or disable vrdata file writing.
Definition: vraysdk.hpp:5788
int vrdataFileSizeLimitMiB
Limit the size of the vrdata file. If this limit is reached another file is started.
Definition: vraysdk.hpp:5792
Definition: vraysdk.hpp:561
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:615
@ rgba_float
8-bit int BGRA
Definition: vraysdk.hpp:617
@ bgr_byte
16-bit unsigned int RGBA
Definition: vraysdk.hpp:619
@ rgba_16bit
32-bit float RGBA (sRGB or gamma won't be applied automatically)
Definition: vraysdk.hpp:618
bool setGamma(float gamma)
DrawMode
Definition: vraysdk.hpp:676
@ DRAW_MODE_BLEND_FAST
Alpha-blend using only the source image alpha but keep the original destination image alpha unchanged...
Definition: vraysdk.hpp:678
@ DRAW_MODE_COPY
Overwrite destination image pixels with the source image pixels.
Definition: vraysdk.hpp:677
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...
float calculateDifference(const VRayImage *image) const
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:3782
std::string outputDirectory
The directory where the profiler reports will be created. If nullptr is passed, temp directory is use...
Definition: vraysdk.hpp:3799
std::string productName
Name of the host product.
Definition: vraysdk.hpp:3801
FileType
Definition: vraysdk.hpp:3792
@ FileType_JSON
This is the raw profiler output, which is passed when an HTML file could not be generated.
Definition: vraysdk.hpp:3794
@ FileType_HTML
An html output file. Needs a valid htmlTemplatePath or valid installation of the default path.
Definition: vraysdk.hpp:3793
int maxDepth
The maximum ray bounces that will be profiled. Range [1, 8].
Definition: vraysdk.hpp:3798
Mode
Definition: vraysdk.hpp:3783
@ 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:3800
Mode mode
Specifies the operational mode of the Profiler.
Definition: vraysdk.hpp:3797
std::string productVersion
Version of the host product.
Definition: vraysdk.hpp:3802
std::string sceneName
Name of the scene that will be profiled. Used as a suffix to the generated filename.
Definition: vraysdk.hpp:3803
Definition: vraysdk.hpp:7737
Definition: vraysdk.hpp:7747
Definition: vraysdk.hpp:7761
Definition of one changed property for LiveLink scene updates.
Definition: vraysdk.hpp:7723
Definition: vraysdk.hpp:9210
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)
General purpose vector in 3D space using float32.
Definition: vraysdk.hpp:850
float lengthSqr(const Vector &a) noexcept
Definition: vraysdk.hpp:1113
Vector & makeZero(void) noexcept
Sets the components of the vector.
Definition: vraysdk.hpp:879
float length(const Vector &a) noexcept
Definition: vraysdk.hpp:1107
Vector & set(T1 x_, T2 y_, T3 z_) noexcept
Sets the components of the vector.
Definition: vraysdk.hpp:873
Vector rotate(const Vector &v, const Vector &axis) noexcept
Definition: vraysdk.hpp:1132
float length(void) const noexcept
Returns the length of the vector.
Definition: vraysdk.hpp:948
float & operator[](const int index) noexcept
Returns the i-th component (0 for x, 1 for y, 2 for z)
Definition: vraysdk.hpp:938
Vector & operator-=(const Vector &other) noexcept
Subtracts the components of the given vector.
Definition: vraysdk.hpp:891
double mixed(const Vector &a, const Vector &b, const Vector &c) noexcept
Definition: vraysdk.hpp:1092
Vector mul(const Vector &a, const Vector &b) noexcept
Definition: vraysdk.hpp:1063
Vector & operator*=(int factor) noexcept
Multiplies all components by the given number.
Definition: vraysdk.hpp:897
Vector normalize(const Vector &a) noexcept
Definition: vraysdk.hpp:1101
Vector & operator/=(int divisor) noexcept
Divides all components by the given number.
Definition: vraysdk.hpp:915
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:933
float lengthSqr(void) const noexcept
Returns the squared length of the vector.
Definition: vraysdk.hpp:953
Vector & operator+=(const Vector &other) noexcept
Adds the components of the given vector.
Definition: vraysdk.hpp:885
The information about a voxel.
Definition: vraysdk.hpp:2859
Color wireColor
the diffuse (wire) color of the voxel
Definition: vraysdk.hpp:2860
Bool smoothed
true, if the voxel should be rendered with smoothed normals
Definition: vraysdk.hpp:2861
Bool flipNormals
true, if the geometric normals should be flipped
Definition: vraysdk.hpp:2862
Definition: vraysdk.hpp:810
bool multipleFiles
unused
Definition: vraysdk.hpp:814
bool multiChannel
create a single multi-channel file if the file format supports it
Definition: vraysdk.hpp:822
bool velocityZeroBased
unused
Definition: vraysdk.hpp:821
bool skipRGB
do not write the RGB channel into a separate file
Definition: vraysdk.hpp:819
bool frameNumber
the current frame number will be appended to the file name(s)
Definition: vraysdk.hpp:816
bool applyColorCorrections
bake the VFB corrections to the output file
Definition: vraysdk.hpp:823
bool writeExifData
add all the available EXIF data to the written image, if the type supports it
Definition: vraysdk.hpp:824
bool noAlpha
do not write the alpha channel together with the color data
Definition: vraysdk.hpp:817
bool singleChannel
only a single channel is written to the file (the current one in vfb)
Definition: vraysdk.hpp:818
bool skipAlpha
do not write the alpha channel into a separate file
Definition: vraysdk.hpp:815
bool writeIntegerIDs
write to EXR as integer data
Definition: vraysdk.hpp:820
Definition: vraysdk.hpp:3444
static double None()
The None value (double) of the TiMe union In case used in Plugin::setValue(), the given plugin proper...
Definition: vraysdk.hpp:3463
TiMe(double time)
Constructs a TiMe object from a given time (double)
Definition: vraysdk.hpp:3453
static double Default()
Definition: vraysdk.hpp:3459
TiMe()
Default constructor.
Definition: vraysdk.hpp:3451
Definition: vraysdk.hpp:3613