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"
29#include "_vraysdk_utils.hpp"
31#define VRAY_MINIMUM2(a, b) ((a) < (b) ? (a) : (b))
32#define VRAY_MAXIMUM2(a, b) ((a) > (b) ? (a) : (b))
33#define VRAY_MAXIMUM3(a, b, c) VRAY_MAXIMUM2(VRAY_MAXIMUM2(a, b), c)
34#define VRAY_MAXIMUM4(a, b, c, d) VRAY_MAXIMUM2(VRAY_MAXIMUM3(a, b, c), d)
36#ifdef APPSDK_QT_NAMESPACE
37namespace APPSDK_QT_NAMESPACE {
41#define APPSDK_QT_NAMESPACE
45#if defined(VRAY_ALLOW_UNSAFE_NATIVE_HANDLE) || (!defined(_WIN32) && !defined(__APPLE__))
46 typedef void* NativeWindowHandle;
47 typedef void* NativeWidgetHandle;
51 typedef struct HWND__ *HWND;
53 typedef HWND NativeWindowHandle;
54 typedef HWND NativeWidgetHandle;
57 #define VRAY_FORWARD_DECLARE_OBJC_CLASS(classname) @class classname
59 #define VRAY_FORWARD_DECLARE_OBJC_CLASS(classname) typedef struct objc_object classname
61 VRAY_FORWARD_DECLARE_OBJC_CLASS(NSWindow);
62 typedef NSWindow *NativeWindowHandle;
63 VRAY_FORWARD_DECLARE_OBJC_CLASS(NSView);
64 typedef NSView *NativeWidgetHandle;
71 inline float linear_to_srgb(
float x) {
72 if (x <= 0.0031308f) {
75 x = 1.055f*powf(x, 1.0f/2.4f)-0.055f;
79 inline float srgb_to_linear(
float x) {
83 x = powf((x+0.055f)/1.055f, 2.4f);
88 inline float interpolate(
float x,
float a,
float b)
noexcept {
89 return (b - a) * x + a;
95# pragma warning(disable: 4201)
99# define VRAY_DEPRECATED(msg) __declspec(deprecated(msg))
102# if defined(__clang__) || COMPILER_VERSION >= 450
103# define VRAY_DEPRECATED(msg) __attribute__((deprecated(msg)))
105# define VRAY_DEPRECATED(msg) __attribute__((deprecated))
109#ifdef VRAY_SDK_INTEROPERABILITY
115 struct TraceTransform;
116 template<
class T>
struct PtrArray;
117 typedef PtrArray<int> IntRefList;
118 typedef PtrArray<float> FloatRefList;
119 typedef PtrArray<Vector> VectorRefList;
120 typedef PtrArray<Color> ColorRefList;
121 typedef PtrArray<TraceTransform> TransformRefList;
122 typedef PtrArray<CharString> CharStringRefList;
123 typedef PtrArray<Value> ValueRefList;
138 RENDERING_AWAITING_CHANGES,
141 enum AddHostsResult {
142 FAILED_TO_RESOLVE = -2,
144 FAILED_TO_CONNECT = 0,
145 SUCCESSFULLY_ADDED = 1,
146 SUCCESS_BUT_NO_WORK = 2,
166 TYPE_TEXTUREFLOAT = 13,
167 TYPE_TEXTUREINT = 14,
168 TYPE_TEXTUREVECTOR = 15,
169 TYPE_TEXTUREMATRIX = 16,
170 TYPE_TEXTURETRANSFORM = 17,
173 TYPE_GENERAL_LIST = TYPE_LIST,
176 TYPE_TYPED_LIST_BASE = 100,
177 TYPE_INT_LIST = TYPE_TYPED_LIST_BASE + TYPE_INT,
178 TYPE_FLOAT_LIST = TYPE_TYPED_LIST_BASE + TYPE_FLOAT,
179 TYPE_DOUBLE_LIST = TYPE_TYPED_LIST_BASE + TYPE_DOUBLE,
180 TYPE_BOOL_LIST = TYPE_TYPED_LIST_BASE + TYPE_BOOL,
181 TYPE_VECTOR_LIST = TYPE_TYPED_LIST_BASE + TYPE_VECTOR,
182 TYPE_COLOR_LIST = TYPE_TYPED_LIST_BASE + TYPE_COLOR,
183 TYPE_ACOLOR_LIST = TYPE_TYPED_LIST_BASE + TYPE_ACOLOR,
184 TYPE_MATRIX_LIST = TYPE_TYPED_LIST_BASE + TYPE_MATRIX,
185 TYPE_TRANSFORM_LIST = TYPE_TYPED_LIST_BASE + TYPE_TRANSFORM,
186 TYPE_STRING_LIST = TYPE_TYPED_LIST_BASE + TYPE_STRING,
187 TYPE_PLUGIN_LIST = TYPE_TYPED_LIST_BASE + TYPE_PLUGIN,
188 TYPE_TEXTURE_LIST = TYPE_TYPED_LIST_BASE + TYPE_TEXTURE,
189 TYPE_TEXTUREFLOAT_LIST = TYPE_TYPED_LIST_BASE + TYPE_TEXTUREFLOAT,
190 TYPE_TEXTUREINT_LIST = TYPE_TYPED_LIST_BASE + TYPE_TEXTUREINT,
191 TYPE_TEXTUREVECTOR_LIST = TYPE_TYPED_LIST_BASE + TYPE_TEXTUREVECTOR,
192 TYPE_TEXTUREMATRIX_LIST = TYPE_TYPED_LIST_BASE + TYPE_TEXTUREMATRIX,
193 TYPE_TEXTURETRANSFORM_LIST = TYPE_TYPED_LIST_BASE + TYPE_TEXTURETRANSFORM,
196 TYPE_OUTPUTTEXTURE = 1000,
197 TYPE_OUTPUTTEXTUREFLOAT = 1001,
198 TYPE_OUTPUTTEXTUREINT = 1002,
199 TYPE_OUTPUTTEXTUREVECTOR = 1003,
200 TYPE_OUTPUTTEXTUREMATRIX = 1004,
201 TYPE_OUTPUTTEXTURETRANSFORM = 1005,
203 TYPE_UNSPECIFIED = 10000,
216 enum LicenseUserStatus :
int {
220 ActiveUserPresent = 3,
226 ImagePass_LightCache = 1,
227 ImagePass_IrradianceMap = 2,
231 enum DefaultsPreset {
240 enum VFBRenderElementType {
241 renderElementType_lightMix=0,
242 renderElementType_denoiser,
244 renderElementType_last
247 enum VFBMouseButton {
248 mouseButton_left = 1,
249 mouseButton_right = 2,
257 ImageRegion(
int x = 0,
int y = 0,
int w = 0,
int h = 0) {
261 void set(
int x,
int y,
int w,
int h) {
276 void setWidth(
int width) {
280 void setHeight(
int height) {
292 int getWidth()
const {
296 int getHeight()
const {
301 typedef unsigned long long InstanceId;
302 typedef unsigned long long PluginTypeId;
303 constexpr InstanceId NO_ID = InstanceId(-1);
304 constexpr PluginTypeId NO_TYPE_ID = PluginTypeId(-1);
307 static_assert(
sizeof(InstanceId) == 8,
"InstanceId should be 8 bytes long");
308 static_assert(
sizeof(PluginTypeId) == 8,
"PluginTypeId should be 8 bytes long");
310 constexpr int INSTANCE_ID_BITS = 48;
314 inline InstanceId combineInstanceIdAndTypeIndex(InstanceId
id,
int typeIdIdx) {
315 return (
id & ((InstanceId(1) << INSTANCE_ID_BITS) - 1)) | (InstanceId(typeIdIdx) << INSTANCE_ID_BITS);
319 typedef int LayerUID;
320 const LayerUID NO_LAYER_ID = -1;
323 namespace VFBLayerProperty {
461 typedef unsigned char byte;
462 typedef signed char sbyte;
474 typedef std::vector<int> IntList;
475 typedef std::vector<float> FloatList;
476 typedef std::vector<Color> ColorList;
477 typedef std::vector<Vector> VectorList;
478 typedef std::vector<Transform> TransformList;
479 typedef std::vector<Value> ValueList;
480 typedef std::vector<std::string> StringList;
481 typedef std::vector<Plugin> PluginList;
490 const void* getData()
const {
491 return static_cast<const void*
>(
this);
494 return static_cast<void*
>(
this);
496 static void*
operator new (size_t) =
delete;
497 static void*
operator new[](size_t) =
delete;
498 static void operator delete[](
void*) =
delete;
499 static void operator delete(
void* ptr);
509 #pragma pack(push, 1)
513 unsigned short bfType;
524 unsigned short biPlanes;
525 unsigned short biBitCount;
526 unsigned biCompression;
527 unsigned biSizeImage;
531 unsigned biClrImportant;
536 void* getPixels()
const {
540 unsigned getRowStride()
const {
541 return (getWidth()*(biBitCount/8) + 3) & ~3;
544 int getWidth()
const {
548 int getHeight()
const {
549 return abs(biHeight);
552 int getBitsPerPixel()
const {
565 static VRayImage* create(
int width,
int height);
566 static void*
operator new (size_t) =
delete;
567 static void*
operator new[](size_t) =
delete;
568 static void operator delete[](
void*) =
delete;
569 static void operator delete (
void *bmp);
572 int getWidth()
const;
573 int getHeight()
const;
574 bool getSize(
int& width,
int& height)
const;
647 static void loadSize(
const char* fileName,
int& width,
int& height);
649 static void loadSize(
const std::string& fileName,
int& width,
int& height);
675 enum WhiteBalanceMode {
677 WHITE_BALANCE_AVERAGE,
678 WHITE_BALANCE_WEIGHTED_AVERAGE,
679 WHITE_BALANCE_HIGHLIGHTS
699 bool addColor(
const Color& color);
700 bool addColor(
const AColor& color);
701 bool mulColor(
const AColor& color);
702 bool changeExposure(
float ev);
703 bool changeContrast(
float contrast);
706 bool saveToBmp(
const char* fileName,
bool preserveAlpha =
false,
bool swapChannels =
false)
const;
707 bool saveToBmp(
const char* fileName,
const VRayRenderer& renderer,
bool preserveAlpha =
false,
bool swapChannels =
false)
const;
708 bool saveToBmp(
const std::string& fileName,
bool preserveAlpha =
false,
bool swapChannels =
false)
const;
709 bool saveToBmp(
const std::string& fileName,
const VRayRenderer& renderer,
bool preserveAlpha =
false,
bool swapChannels =
false)
const;
711 bool saveToPng(
const char* fileName,
bool preserveAlpha =
false,
int bitsPerChannel = 8)
const;
712 bool saveToPng(
const char* fileName,
const VRayRenderer& renderer,
bool preserveAlpha =
false,
int bitsPerChannel = 8)
const;
713 bool saveToPng(
const std::string& fileName,
bool preserveAlpha =
false,
int bitsPerChannel = 8)
const;
714 bool saveToPng(
const std::string& fileName,
const VRayRenderer& renderer,
bool preserveAlpha =
false,
int bitsPerChannel = 8)
const;
716 bool saveToJpeg(
const char* fileName,
int quality = 0)
const;
717 bool saveToJpeg(
const char* fileName,
const VRayRenderer& renderer,
int quality = 0)
const;
718 bool saveToJpeg(
const std::string& fileName,
int quality = 0)
const;
719 bool saveToJpeg(
const std::string& fileName,
const VRayRenderer& renderer,
int quality = 0)
const;
721 bool saveToTiff(
const char* fileName,
int bitsPerChannel = 16)
const;
722 bool saveToTiff(
const char* fileName,
const VRayRenderer& renderer,
int bitsPerChannel = 16)
const;
723 bool saveToTiff(
const std::string& fileName,
int bitsPerChannel = 16)
const;
724 bool saveToTiff(
const std::string& fileName,
const VRayRenderer& renderer,
int bitsPerChannel = 16)
const;
726 bool saveToExr(
const char* fileName)
const;
727 bool saveToExr(
const char* fileName,
const VRayRenderer& renderer)
const;
728 bool saveToExr(
const std::string& fileName)
const;
729 bool saveToExr(
const std::string& fileName,
const VRayRenderer& renderer)
const;
734 Bmp*
compressToBmp(
size_t& size,
bool preserveAlpha =
false,
bool swapChannels =
false)
const;
773 bool preserveAlpha =
false,
774 bool swapChannels =
false,
775 bool reverseY =
false,
790 void* dstPtr =
nullptr;
835 std::swap(img, image.img);
849 operator const VRayImage* ()
const noexcept {
857 const VRayImage* operator->()
const noexcept {
898 enum CompressionType {
920 struct {
float x, y, z; };
929 Vector() noexcept : x(), y(), z() {}
931 template <
typename T1,
typename T2,
typename T3>
932 Vector(T1 x, T2 y, T3 z) noexcept : x(
float(x)), y(
float(y)), z(
float(z)) {}
934 template <
typename T>
935 explicit Vector(T value) noexcept : x(
float(value)), y(
float(value)), z(
float(value)) {}
937 std::string toString()
const;
940 template <
typename T1,
typename T2,
typename T3>
942 x = float(x_), y = float(y_), z = float(z_);
965 float maxf = fmaxf(fmaxf(fabsf(x), fabsf(y)), fabsf(z));
966 if (maxf < 1e18f*len) {
978 x += other.x, y += other.y, z += other.z;
984 x -= other.x, y -= other.y, z -= other.z;
990 x *= float(factor), y *= float(factor), z *= float(factor);
996 x *= factor, y *= factor, z *= factor;
1002 x *= float(factor), y *= float(factor), z*=float(factor);
1008 x/=float(divisor); y/=float(divisor); z/=float(divisor);
1014 x/=divisor; y/=divisor; z/=divisor;
1020 x/=float(divisor); y/=float(divisor); z/=float(divisor);
1026 return Vector(-x, -y, -z);
1041 return sqrtf(x*x + y*y + z*z);
1046 return x*x + y*y + z*z;
1128 return double(a.x)*double(b.x) + double(a.y)*double(b.y) + double(a.z)*double(b.z);
1150 return Vector(a.x/b.x, a.y/b.y, a.z/b.z);
1156 return Vector(a.x*b.x, a.y*b.y, a.z*b.z);
1162 return a.x != b.x || a.y != b.y || a.z != b.z;
1169 return a.x == b.x && a.y == b.y && a.z == b.z;
1176 double(a.y)*
double(b.z) -
double(b.y)*
double(a.z),
1177 double(a.z)*
double(b.x) -
double(b.z)*
double(a.x),
1178 double(a.x)*
double(b.y) -
double(b.x)*
double(a.y)
1186 (
double(a.y)*
double(b.z) -
double(b.y)*
double(a.z))*double(c.x)+
1187 (double(a.z)*double(b.x) - double(b.z)*double(a.x))*
double(c.y)+
1188 (double(a.x)*double(b.y) - double(b.x)*double(a.y))*
double(c.z);
1206 return a.lengthSqr();
1212 float oldLen = length();
1214 Vector d = axis ^ (*this);
1217 float newLen = d.
length();
1219 (*this) = d*oldLen/newLen;
1230 inline std::ostream& operator <<(std::ostream& stream,
const Vector& vector) {
1231 stream <<
"Vector(" << vector.x <<
", " << vector.y <<
", " << vector.z <<
")";
1235 inline std::string Vector::toString()
const {
1236 std::ostringstream stream;
1238 return stream.str();
1245 struct {
float r, g, b; };
1251 Color& operator=(
const Color&)
noexcept =
default;
1252 Color& operator=(
Color&&)
noexcept =
default;
1254 Color() noexcept : r(), g(), b() {}
1256 template <
typename T1,
typename T2,
typename T3>
1257 Color(T1 r, T2 g, T3 b) noexcept : r(
float(r)), g(
float(g)), b(
float(b)) {}
1259 template <
typename T>
1260 explicit Color(
const T& value) noexcept : r(
float(value)), g(
float(value)), b(
float(value)) {}
1285 return (r + g + b) * (1.0f / 3.0f);
1290 const float RED_LUMINANCE_COMPONENT = 0.3f;
1291 const float GREEN_LUMINANCE_COMPONENT = 0.59f;
1292 const float BLUE_LUMINANCE_COMPONENT = 0.11f;
1293 return RED_LUMINANCE_COMPONENT * r + GREEN_LUMINANCE_COMPONENT * g + BLUE_LUMINANCE_COMPONENT * b;
1298 return r * r + g * g + b * b;
1303 return sqrtf(r * r + g * g + b * b);
1314 if (k == 1.0f)
return;
1315 float grey = (r + g + b) / 3.0f;
1316 r = Internal::interpolate(k, grey, r);
1317 g = Internal::interpolate(k, grey, g);
1318 b = Internal::interpolate(k, grey, b);
1325 if (k == 1.0f)
return;
1326 r = (r - middle) * k + middle;
1327 g = (g - middle) * k + middle;
1328 b = (b - middle) * k + middle;
1333 return Color(std::fmaxf(0.0f, 1.0f - r), std::fmaxf(0.0f, 1.0f - g), std::fmaxf(0.0f, 1.0f - b));
1339 r = std::fmaxf(0.0f, 1.0f - r);
1340 g = std::fmaxf(0.0f, 1.0f - g);
1341 b = std::fmaxf(0.0f, 1.0f - b);
1344 std::string toString()
const;
1373 float f =
static_cast<float>(factor);
1390 float f =
static_cast<float>(factor);
1407 float f =
static_cast<float>(factor);
1424 float f =
static_cast<float>(factor);
1432 const float rg = r > g ? r : g;
1433 return rg > b ? rg : b;
1439 color2.r = Internal::srgb_to_linear(color2.r);
1440 color2.g = Internal::srgb_to_linear(color2.g);
1441 color2.b = Internal::srgb_to_linear(color2.b);
1448 color2.r = Internal::linear_to_srgb(color2.r);
1449 color2.g = Internal::linear_to_srgb(color2.g);
1450 color2.b = Internal::linear_to_srgb(color2.b);
1456 std::ostream& operator <<(std::ostream& stream,
const Color& color);
1459 inline Color operator +(
const Color& a,
const Color& b)
noexcept {
1468 inline Color operator -(
const Color& a,
const Color& b)
noexcept {
1477 inline Color operator *(
const Color& a,
const Color& b)
noexcept {
1488 inline Color operator *(
const Color& a,
int factor)
noexcept {
1489 float f =
static_cast<float>(factor);
1490 return Color(a.r * f, a.g * f, a.b * f);
1496 inline Color operator *(
const Color& a,
float factor)
noexcept {
1497 return Color(a.r * factor, a.g * factor, a.b * factor);
1503 inline Color operator *(
const Color& a,
double factor)
noexcept {
1504 float f =
static_cast<float>(factor);
1505 return Color(a.r * f, a.g * f, a.b * f);
1511 inline Color operator *(
int factor,
const Color& a)
noexcept {
1512 return a * float(factor);
1518 inline Color operator *(
float factor,
const Color& a)
noexcept {
1525 inline Color operator *(
double factor,
const Color& a)
noexcept {
1526 return a * float(factor);
1530 inline Color operator /(
const Color& a,
const Color& b)
noexcept {
1531 return Color(a.r / b.r, a.g / b.g, a.b / b.b);
1537 inline Color operator /(
const Color& a,
int factor)
noexcept {
1538 float f =
static_cast<float>(factor);
1539 return Color(a.r / f, a.g / f, a.b / f);
1545 inline Color operator /(
const Color& a,
float factor)
noexcept {
1546 return Color(a.r / factor, a.g / factor, a.b / factor);
1552 inline Color operator /(
const Color& a,
double factor)
noexcept {
1553 float f =
static_cast<float>(factor);
1554 return Color(a.r / f, a.g / f, a.b / f);
1559 inline bool operator !=(
const Color& a,
const Color& b)
noexcept {
1560 return a.r != b.r || a.g != b.g || a.b != b.b;
1566 inline bool operator ==(
const Color& a,
const Color& b)
noexcept {
1567 return a.r == b.r && a.g == b.g && a.b == b.b;
1580 AColor() noexcept : color(), alpha() {}
1582 template <
typename T>
1583 AColor(
Color c, T a) noexcept : color(c), alpha(
float(a)) {}
1585 template <
typename T1,
typename T2,
typename T3>
1586 AColor(T1 r, T2 g, T3 b) noexcept : color(r, g, b), alpha(1.0f) {}
1588 template <
typename T1,
typename T2,
typename T3,
typename T4>
1589 AColor(T1 r, T2 g, T3 b, T4 a) noexcept : color(r, g, b), alpha(
float(a)) {}
1591 template <
typename T>
1592 explicit AColor(
const T& value) noexcept : color(value), alpha(1) {}
1594 std::string toString()
const ;
1620 color *= float(factor);
1621 alpha *= float(factor);
1634 color *= float(factor);
1635 alpha *= float(factor);
1648 color /= float(factor);
1649 alpha /= float(factor);
1662 color /= float(factor);
1663 alpha /= float(factor);
1685 alpha = std::fmaxf(0.0f, 1.0f - alpha);
1696 Internal::srgb_to_linear(color.r),
1697 Internal::srgb_to_linear(color.g),
1698 Internal::srgb_to_linear(color.b),
1706 Internal::linear_to_srgb(color.r),
1707 Internal::linear_to_srgb(color.g),
1708 Internal::linear_to_srgb(color.b),
1715 inline std::ostream& operator <<(std::ostream& stream,
const AColor& acolor) {
1716 stream <<
"AColor(" << acolor.color.r <<
", " << acolor.color.g <<
", " << acolor.color.b <<
", " << acolor.alpha <<
")";
1720 inline std::string AColor::toString()
const {
1721 std::ostringstream stream;
1723 return stream.str();
1727 inline AColor operator +(
const AColor& a,
const AColor& b)
noexcept {
1735 inline AColor operator -(
const AColor& a,
const AColor& b)
noexcept {
1743 inline AColor operator *(
const AColor& a,
const AColor& b)
noexcept {
1753 inline AColor operator *(
const AColor& a,
int factor)
noexcept {
1755 a.color *
float(factor),
1756 a.alpha *
float(factor)
1763 inline AColor operator *(
const AColor& a,
float factor)
noexcept {
1773 inline AColor operator *(
const AColor& a,
double factor)
noexcept {
1775 a.color *
float(factor),
1776 a.alpha *
float(factor)
1783 inline AColor operator *(
int factor,
const AColor& a)
noexcept {
1784 return a * float(factor);
1790 inline AColor operator *(
float factor,
const AColor& a)
noexcept {
1797 inline AColor operator *(
double factor,
const AColor& a)
noexcept {
1798 return a * float(factor);
1802 inline AColor operator /(
const AColor& a,
const AColor& b)
noexcept {
1812 inline AColor operator /(
const AColor& a,
int factor)
noexcept {
1814 a.color /
float(factor),
1815 a.alpha /
float(factor)
1822 inline AColor operator /(
const AColor& a,
float factor)
noexcept {
1832 inline AColor operator /(
const AColor& a,
double factor)
noexcept {
1834 a.color /
float(factor),
1835 a.alpha /
float(factor)
1842 return a.color != b.color || a.alpha != b.alpha;
1849 return a.color == b.color && a.alpha == b.alpha;
1856 std::string toString()
const;
1860 return (&v0)[index];
1865 return (&v0)[index];
1877 explicit
Matrix(
float value) noexcept : v0(value, 0, 0), v1(0 ,value, 0), v2(0, 0, value) {}
1880 explicit Matrix(
Vector diagonal) noexcept : v0(diagonal.x, 0, 0), v1(0, diagonal.y, 0), v2(0, 0, diagonal.z) {}
1897 v0 = a, v1 = b, v2 = c;
1901 void set(
float value)
noexcept {
1902 v0.
set(value, 0, 0);
1903 v1.
set(0, value, 0);
1904 v2.
set(0, 0, value);
1926 (*this)[0][i] = a.x, (*this)[1][i] = a.y, (*this)[2][i]=a.z;
1938 v0.
set(1.0f, 0.0f, 0.0f);
1939 v1.
set(0.0f, 1.0f, 0.0f);
1940 v2.
set(0.0f, 0.0f, 1.0f);
1946 v0.
set(a.x, 0.0f, 0.0f);
1947 v1.
set(0.0f, a.y, 0.0f);
1948 v2.
set(0.0f, 0.0f, a.z);
1951 void makeOuterProduct(
const Vector &a,
const Vector &b)
noexcept {
1960 t = v0[1], v0[1] = v1[0], v1[0] = t;
1961 t = v0[2], v0[2] = v2[0], v2[0] = t;
1962 t = v1[2], v1[2] = v2[1], v2[1] = t;
1970 double d = mixed(v0, v1, v2);
1984 void addDiagonal(
const Vector &a)
noexcept {
1990 void addTranspose(
const Matrix &b)
noexcept {
2006 v0 *= x, v1 *= x, v2 *= x;
2011 v0 /= x, v1 /= x, v2 /= x;
2037 void makeOrthogonal(
void)
noexcept {
2042 v0 = length(v0) * t.v0;
2043 v1 = length(v1) * t.v1;
2044 v2 = length(v2) * t.v2;
2047 void makeOrthonormal(
void)
noexcept {
2058 double d = m.v0*(m.v1^m.v2);
2059 r.
setRow(0, (m.v1^m.v2)/d);
2060 r.
setRow(1, (m.v2^m.v0)/d);
2061 r.
setRow(2, (m.v0^m.v1)/d);
2068 return Vector(a*m.v0, a*m.v1, a*m.v2);
2074 return a.x*m.v0 + a.y*m.v1 + a.z*m.v2;
2080 return Matrix(m.v0^a, m.v1^a, m.v2^a);
2086 return Matrix(a^m.v0, a^m.v1, a^m.v2);
2092 return Matrix(m.v0*x, m.v1*x, m.v2*x);
2098 return Matrix(x*m.v0, x*m.v1, x*m.v2);
2104 return Matrix(m.v0/x, m.v1/x, m.v2/x);
2109 inline float operator /(
float x,
const Matrix &m)
noexcept {
2110 return x / float(m.v0*(m.v1^m.v2));
2116 return Matrix(a.v0 + b.v0, a.v1 + b.v1, a.v2 + b.v2);
2122 return Matrix(a.v0 - b.v0, a.v1 - b.v1, a.v2 - b.v2);
2130 a.v0[0]*b.v0[0]+a.v1[0]*b.v0[1]+a.v2[0]*b.v0[2],
2131 a.v0[1]*b.v0[0]+a.v1[1]*b.v0[1]+a.v2[1]*b.v0[2],
2132 a.v0[2]*b.v0[0]+a.v1[2]*b.v0[1]+a.v2[2]*b.v0[2]),
2134 a.v0[0]*b.v1[0]+a.v1[0]*b.v1[1]+a.v2[0]*b.v1[2],
2135 a.v0[1]*b.v1[0]+a.v1[1]*b.v1[1]+a.v2[1]*b.v1[2],
2136 a.v0[2]*b.v1[0]+a.v1[2]*b.v1[1]+a.v2[2]*b.v1[2]),
2138 a.v0[0]*b.v2[0]+a.v1[0]*b.v2[1]+a.v2[0]*b.v2[2],
2139 a.v0[1]*b.v2[0]+a.v1[1]*b.v2[1]+a.v2[1]*b.v2[2],
2140 a.v0[2]*b.v2[0]+a.v1[2]*b.v2[1]+a.v2[2]*b.v2[2])
2148 return a.v0 != b.v0 || a.v1 != b.v1 || a.v2 != b.v2;
2155 return a.v0 == b.v0 && a.v1 == b.v1 && a.v2 == b.v2;
2161 return Matrix(-a.v0, -a.v1, -a.v2);
2165 return Matrix(a.x*b, a.y*b, a.z*b);
2169 inline Matrix transpose(
const Matrix &m)
noexcept {
2171 Vector(m.v0[0], m.v1[0], m.v2[0]),
2172 Vector(m.v0[1], m.v1[1], m.v2[1]),
2173 Vector(m.v0[2], m.v1[2], m.v2[2]));
2179 return Matrix(rotate(m.v0, axis), rotate(m.v1, axis), rotate(m.v2, axis));
2185 Vector v0 = normalize(m.v0);
2186 Vector v1 = normalize(m.v2^m.v0);
2187 return Matrix(v0, v1, v0^v1);
2193 return Matrix(normalize(m.v0), normalize(m.v1), normalize(m.v2));
2199 return Vector(m[0].length(), m[1].length(), m[2].length());
2205 const Matrix mns = noScale(m);
2221 atan2(-mns[2][1], mns[2][2]),
2223 atan2(-mns[1][0], mns[0][0])
2231 const float s = sinf(xrot);
2232 const float c = cosf(xrot);
2240 const float s = sinf(yrot);
2241 const float c = cosf(yrot);
2249 const float s = sinf(zrot);
2250 const float c = cosf(zrot);
2255 inline Matrix normalTransformMatrix(
const Matrix &m)
noexcept {
2256 return Matrix(m[1]^m[2], m[2]^m[0], m[0]^m[1]);
2260 inline Matrix normalTransformMatrixX(
const Matrix &m,
bool &DlessThanZero )
noexcept {
2261 if((m[0]^m[1])*m[2] < 0){
2262 DlessThanZero =
true;
2263 return Matrix(m[2]^m[1], m[0]^m[2], m[1]^m[0]);
2265 DlessThanZero =
false;
2266 return Matrix(m[1]^m[2], m[2]^m[0], m[0]^m[1]);
2292 scale[0] = rot.v0.
length();
2295 shear[0] = (float)(rot.v0 * rot.v1);
2296 if (fabsf(shear[0]) < 1e-6f) shear[0] = 0.0f;
2298 rot.v1 = rot.v1 - shear[0] * rot.v0;
2300 scale[1] = rot.v1.
length();
2304 shear[1] = (float)(rot.v0 * rot.v2);
2305 if (fabsf(shear[1]) < 1e-6f) shear[1] = 0.0f;
2306 rot.v2 = rot.v2 - shear[1] * rot.v0;
2307 shear[2] = (float)(rot.v1 * rot.v2);
2308 if (fabsf(shear[2]) < 1e-6f) shear[2] = 0.0f;
2309 rot.v2 = rot.v2 - shear[2] * rot.v1;
2311 scale[2] = rot.v2.
length();
2314 shear[0] /= scale[1];
2315 shear[1] /= scale[2];
2316 shear[2] /= scale[2];
2321 if (mixed(rot.v1, rot.v2, rot.v0) < 0.0f) {
2322 for (
int i = 0; i < 3; i++) {
2323 scale[i] = -scale[i];
2328 rotation[1] = asinf(-rot.v0.f[2]);
2329 const float cosBeta = cosf(rotation[1]);
2330 if (fabsf(cosBeta) > 1e-6) {
2331 rotation[0] = atan2f(rot.v1.f[2], rot.v2.f[2]);
2332 rotation[2] = atan2f(rot.v0.f[1], rot.v0.f[0]);
2335 rotation[0] = atan2f(rot.v1.f[0], rot.v1.f[1]);
2339 for (
int i = 0; i < 3; ++i) {
2340 if (fabsf(rotation[i]) < 1e-6f) rotation[i] = 0.0f;
2341 if (fabsf(fabsf(scale[i]) - 1.0f) < 1e-6f) scale[i] = (scale[i]<0.0f) ? -1.0f : (scale[i]>0.0f) ? 1.0f : 0.0f;
2347 Matrix result = makeRotationMatrixZ(rotation.z) * makeRotationMatrixY(rotation.y) * makeRotationMatrixX(rotation.x) *
2348 Matrix({1.0f, 0.0f, 0.0f},{shear.x,1.0f,0.0f},{shear.y,shear.z,1.0f}) *
2349 Matrix({scale.x,.0f,.0f},{.0f,scale.y,.0f},{.0f,.0f,scale.z});
2361 inline bool computeQRFactorization(
const Matrix &m, Matrix &q, Matrix &r) {
2364 if (!q[0].makeNormalized0())
return false;
2366 float proj10 = (float)(m[1] * q[0]);
2367 q[1] -= proj10 * q[0];
2368 if (!q[1].makeNormalized0())
return false;
2370 float proj20= (float)(m[2] * q[0]);
2371 float proj21= (float)(m[2] * q[1]);
2372 q[2] -= proj20 * q[0];
2373 q[2] -= proj21 * q[1];
2374 if (!q[2].makeNormalized0())
return false;
2379 for (
int i=0; i<3; i++)
2380 r[i][i]= (
float)(m[i] * q[i]);
2389 if (mixed(m[0], m[1], m[2])<0.0f) {
2407 inline bool computeCholeskyDecomposition(
const Matrix &m, Matrix& l) {
2410 for (
int i=0; i<3; i++) {
2411 for (
int j=i; j<3; j++) {
2413 for (
int k=i-1; k>=0; k--) {
2414 accum -= l[k][i] * l[k][j];
2417 if (accum>0.0f) l[i][i]=sqrtf(accum);
2421 l[i][j] = accum/l[i][i];
2434 inline std::ostream& operator <<(std::ostream& stream,
const Matrix& matrix) {
2435 stream <<
"Matrix(" << matrix.v0 <<
", " << matrix.v1 <<
", " << matrix.v2 <<
")";
2439 inline std::string Matrix::toString()
const {
2440 std::ostringstream stream;
2442 return stream.str();
2491 matrix += tm.matrix;
2492 offset += tm.offset;
2497 matrix -= tm.matrix;
2498 offset -= tm.offset;
2510 offset = -matrix * offset;
2521 offset += offsetParameter;
2526 matrix.v0=mul(
scale, matrix.v0);
2527 matrix.v1=mul(
scale, matrix.v1);
2528 matrix.v2=mul(
scale, matrix.v2);
2531 std::string toString()
const;
2537 return a.matrix != b.matrix || a.offset != b.offset;
2544 return a.matrix == b.matrix && a.offset == b.offset;
2550 return Transform(-tm.matrix, -tm.offset);
2556 return Transform(tm.matrix * x, tm.offset * x);
2562 return Transform(x * tm.matrix, x * tm.offset);
2568 return Transform(tm.matrix / x, tm.offset / x);
2574 return Transform(a.matrix + b.matrix, a.offset + b.offset);
2580 return Transform(a.matrix - b.matrix, a.offset - b.offset);
2586 return Transform(a.matrix * b.matrix, a.matrix * b.offset + a.offset);
2592 return tm.matrix * a + tm.offset;
2598 return (a - tm.offset) * tm.matrix;
2601 inline std::ostream& operator <<(std::ostream& stream,
const Transform& transform) {
2602 stream <<
"Transform(" << transform.matrix <<
", " << transform.offset <<
")";
2606 inline std::string Transform::toString()
const {
2607 std::ostringstream stream;
2609 return stream.str();
2631 struct RendererOptions;
2634 class PropertyRuntimeMeta;
2637 struct RenderSizeParams;
2640 const float DEFAULT_FPS = 24.0f;
2641 const float DEFAULT_POINT_SIZE = 2.2f;
2642 const long long READ_DATA_STRUCT_VERSION = 5;
2643 const long long READ_PARAMS_STRUCT_VERSION = 2;
2644 const long long CREATE_PARAMS_STRUCT_VERSION = 7;
2645 const long long GEOM_MESH_DATA_STRUCT_VERSION = 2;
2646 const long long ENABLE_DRCLIENT_PARAMS_STRUCT_VERSION = 0;
2647 const long long LIVE_LINK_CLIENT_PARAMS_STRUCT_VERSION = 0;
2648 const long long SCATTER_READ_PARAMS_STRUCT_VERSION = 0;
2649 class VRayRendererNative;
2650 class BinaryValueParser;
2651 class BinaryValueBuilder;
2652 struct MeshFileDataParser;
2782 SHEEN =
USER + 5011,
2783 AMBIENT_OCCLUSION =
USER + 5012,
2849 InstanceId pluginID;
2858 size_t getData_internal(
2860 InstanceId alphaPluginID,
2864 bool rgbOrder =
false,
2887 return binaryFormat;
2892 return defaultPixelFormat;
2912 bool flipImage =
false;
2954 operator bool ()
const {
2955 return pluginID != NO_ID;
3002 int start, end, step;
3050 std::vector<ComputeDeviceInfo> getComputeDevicesMetal();
3055 std::vector<ComputeDeviceInfo> getComputeDevicesMetalRT();
3060 std::vector<ComputeDeviceInfo> getComputeDevicesOptix();
3068 std::vector<ComputeDeviceInfo> getComputeDevicesCUDA();
3073 std::vector<ComputeDeviceInfo> getComputeDevicesDenoiser();
3078 bool setComputeDevicesMetal(
const std::vector<int>& indices);
3083 bool setComputeDevicesMetalRT(
const std::vector<int>& indices);
3088 bool setComputeDevicesOptix(
const std::vector<int>& indices);
3093 bool setComputeDevicesCUDA(
const std::vector<int>& indices);
3098 bool setComputeDevicesDenoiser(
const std::vector<int>& indices);
3103 bool setComputeDevicesEnvironmentVariable();
3112 float currentProgress;
3131 typedef std::vector<int> IntList;
3132 typedef std::vector<float> FloatList;
3133 typedef std::vector<Color> ColorList;
3134 typedef std::vector<Vector> VectorList;
3135 typedef std::vector<Value> ValueList;
3136 typedef std::vector<std::string> StringList;
3162 VRAY_MINIMUM2(
pmin.x, point.x),
3163 VRAY_MINIMUM2(
pmin.y, point.y),
3164 VRAY_MINIMUM2(
pmin.z, point.z)
3167 VRAY_MAXIMUM2(
pmax.x, point.x),
3168 VRAY_MAXIMUM2(
pmax.y, point.y),
3169 VRAY_MAXIMUM2(
pmax.z, point.z)
3188 std::string toString()
const;
3191 inline std::ostream& operator <<(std::ostream& stream,
const Box& box) {
3192 stream <<
"Box(min: " << box.pmin <<
", max: " << box.pmax <<
")";
3196 inline std::string Box::toString()
const {
3197 std::ostringstream stream;
3199 return stream.str();
3241 MESH_VERTICES = (1 << 4),
3242 MESH_NORMALS = (1 << 5),
3243 MESH_MTLIDS = (1 << 6),
3244 MESH_VELOCITIES = (1 << 7),
3245 MESH_UVS = (1 << 8),
3246 MESH_SHADERS = (1 << 9),
3247 MESH_OBJECTINFOS = (1 << 10),
3248 MESH_HAIROBJECTINFOS = (1 << 11),
3249 MESH_PARTICLEOBJECTINFOS = (1 << 12),
3250 MESH_HAIRGEOMETRY = (1 << 13),
3251 MESH_PARTICLESGEOMETRY = (1 << 14),
3252 MESH_GEOMETRYMESHESBBOXES = (1 << 15),
3253 MESH_HAIROBJECTBBOXES = (1 << 16),
3254 MESH_PARTICLEOBJECTBBOXES = (1 << 17),
3255 MESH_ALL = MESH_VERTICES | MESH_NORMALS | MESH_VELOCITIES | MESH_MTLIDS | MESH_UVS | MESH_SHADERS |
3256 MESH_OBJECTINFOS | MESH_HAIROBJECTINFOS | MESH_PARTICLEOBJECTINFOS | MESH_HAIRGEOMETRY | MESH_PARTICLESGEOMETRY |
3257 MESH_GEOMETRYMESHESBBOXES | MESH_HAIROBJECTBBOXES | MESH_PARTICLEOBJECTBBOXES,
3273 const std::vector<Vector> &
getNormals()
const {
return normals; }
3480 std::vector<int>
getArrayOfLengths(
const int* startIndices,
int elementsCount,
int objectCount)
const;
3487 std::vector<int>
getArrayOfLengths(
const int* startIndices,
int elementsCount,
int objectCount,
int uvSetsCount)
const;
3503 int getLengthFromStartIndex(
int objectIndex,
int setIndex,
const int* startIndices,
int elementsCount,
int objectCount,
int uvSetsCount)
const;
3538 void allocateArrays();
3539 std::vector<Vector> getArrayElement (
int objectIndex,
const int* startIndices,
const VectorList& list,
int elementsCount,
size_t objectCount)
const;
3540 std::vector<int> getArrayElement (
int objectIndex,
const int* startIndices,
const int* primaryStartIndices,
const IntList& list,
int elementsCount,
size_t objectCount)
const;
3541 std::vector<int> getArrayElement (
int objectIndex,
const int* startIndices,
const IntList& list,
int elementsCount,
size_t objectCount)
const;
3542 std::vector<float> getArrayElement (
int objectIndex,
const int* startIndices,
const FloatList& list,
int elementsCount,
size_t objectCount)
const;
3543 std::vector<Vector> getArrayElement (
int objectIndex,
int setIndex,
const int* startIndices,
const VectorList& list,
int elementsCount,
size_t objectCount,
size_t uvSetsCount)
const;
3544 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;
3549 long long int flags;
3551 bool maxToMayaTM : 1;
3552 bool mayaToMaxTM : 1;
3553 bool reserved_bit2 : 1;
3554 bool reserved_bit3 : 1;
3555 bool use_vertices : 1;
3556 bool use_normals : 1;
3557 bool use_mtlIDs : 1;
3558 bool use_velocities : 1;
3560 bool use_shaders : 1;
3561 bool use_objectInfos : 1;
3562 bool use_hairObjectInfos : 1;
3563 bool use_particleObjectInfos : 1;
3565 bool use_particles : 1;
3566 bool use_geometryVoxelsBBoxes : 1;
3567 bool use_hairVoxelsBBoxes : 1;
3568 bool use_particleVoxelsBBoxes : 1;
3573 size_t vertices_count;
3575 size_t indices_count;
3577 size_t normals_count;
3579 size_t normalIndices_count;
3581 size_t materialIDs_count;
3583 size_t velocities_count;
3587 int* uvValueIndices;
3588 size_t uvSets_count;
3589 size_t uvSetNames_length;
3590 int uvSetIndices[100];
3591 size_t uvValues_counts[100];
3592 size_t uvValueIndices_counts[100];
3596 size_t shaders_count;
3597 size_t shaderNames_length;
3599 char* objectInfoNames;
3601 int* objectInfoVBegins;
3602 int* objectInfoVEnds;
3603 size_t objectInfos_count;
3604 size_t objectInfoNames_length;
3606 char* hairObjectInfoNames;
3607 int* hairObjectInfoIds;
3608 int* hairObjectInfoVBegins;
3609 int* hairObjectInfoVEnds;
3610 size_t hairObjectInfos_count;
3611 size_t hairObjectInfoNames_length;
3613 char* particleObjectInfoNames;
3614 int* particleObjectInfoIds;
3615 int* particleObjectInfoVBegins;
3616 int* particleObjectInfoVEnds;
3617 size_t particleObjectInfos_count;
3618 size_t particleObjectInfoNames_length;
3620 float* hairVertices;
3621 size_t hairVertices_count;
3622 int* hairVerticesPerStrand;
3623 size_t hairVerticesPerStrand_count;
3624 float* particleVertices;
3625 size_t particlesVertices_count;
3627 int* voxelVerticesStartIndices;
3628 int* voxelVertexIndicesStartIndices;
3629 int* voxelNormalsStartIndices;
3630 int* voxelNormalIndicesStartIndices;
3631 int* voxelMaterialIDsStartIndices;
3632 int* voxelVelocitiesStartIndices;
3633 int* voxelUVValuesStartIndices;
3634 int* voxelUVValueIndicesStartIndices;
3636 float* geometryVoxelsBBoxes;
3637 float* hairVoxelsBBoxes;
3638 float* particleVoxelsBBoxes;
3640 int* hairVerticesStartIndices;
3641 int* hairVerticesPerStrandStartIndices;
3642 int* particleVerticesStartIndices;
3644 size_t geometryVoxels_count;
3645 size_t hairVoxels_count;
3646 size_t particleVoxels_count;
3648 size_t totalUVvalues;
3649 size_t totalUVindices;
3651 int* edgeVisibility;
3653 Color* voxelInfoWireColor;
3654 int* voxelInfoSmoothed;
3655 int* voxelInfoFlipNormals;
3656 size_t voxelInfoObjects_count;
3659 size_t hairWidths_count;
3660 int* hairWidthsStartIndices;
3661 float* particleWidths;
3662 size_t particleWidths_count;
3663 int* particleWidthsStartIndices;
3666 Bool hasVelocityChannel;
3668 float* hairVelocities;
3669 size_t hairVelocities_count;
3670 int* hairVelocitiesStartIndices;
3671 float* particleVelocities;
3672 size_t particleVelocities_count;
3673 int* particleVelocitiesStartIndices;
3676 std::vector<Vector> vertices;
3677 std::vector<int> indices;
3678 std::vector<Vector> normals;
3679 std::vector<int> normalIndices;
3680 std::vector<int> materialIDs;
3681 std::vector<Vector> velocities;
3682 std::vector<char> uvSetNames;
3683 std::vector<Vector> uvValues;
3684 std::vector<int> uvValueIndices;
3685 std::vector<char> shaderNames;
3686 std::vector<int> shaderIds;
3687 std::vector<char> objectInfoNames;
3688 std::vector<int> objectInfoIds;
3689 std::vector<int> objectInfoVBegins;
3690 std::vector<int> objectInfoVEnds;
3691 std::vector<char> hairObjectInfoNames;
3692 std::vector<int> hairObjectInfoIds;
3693 std::vector<int> hairObjectInfoVBegins;
3694 std::vector<int> hairObjectInfoVEnds;
3695 std::vector<char> particleObjectInfoNames;
3696 std::vector<int> particleObjectInfoIds;
3697 std::vector<int> particleObjectInfoVBegins;
3698 std::vector<int> particleObjectInfoVEnds;
3699 std::vector<Vector> hairVertices;
3700 std::vector<int> hairVerticesPerStrand;
3701 std::vector<Vector> particleVertices;
3702 std::vector<int> voxelVerticesStartIndices;
3703 std::vector<int> voxelVertexIndicesStartIndices;
3704 std::vector<int> voxelNormalsStartIndices;
3705 std::vector<int> voxelNormalIndicesStartIndices;
3706 std::vector<int> voxelMaterialIDsStartIndices;
3707 std::vector<int> voxelVelocitiesStartIndices;
3708 std::vector<int> voxelUVValuesStartIndices;
3709 std::vector<int> voxelUVValueIndicesStartIndices;
3710 std::vector<Box> geometryVoxelsBBoxes;
3711 std::vector<Box> hairVoxelsBBoxes;
3712 std::vector<Box> particleVoxelsBBoxes;
3713 std::vector<int> hairVerticesStartIndices;
3714 std::vector<int> hairVerticesPerStrandStartIndices;
3715 std::vector<int> particleVerticesStartIndices;
3716 std::vector<int> edgeVisibility;
3717 std::vector<Color> voxelInfoWireColor;
3718 std::vector<Bool> voxelInfoSmoothed;
3719 std::vector<Bool> voxelInfoFlipNormals;
3720 std::vector<float> hairWidths;
3721 std::vector<int> hairWidthsStartIndices;
3722 std::vector<float> particleWidths;
3723 std::vector<int> particleWidthsStartIndices;
3724 std::vector<Vector> hairVelocities;
3725 std::vector<int> hairVelocitiesStartIndices;
3726 std::vector<Vector> particleVelocities;
3727 std::vector<int> particleVelocitiesStartIndices;
3736 explicit TiMe(int64_t time) : asInt(time) {}
3741 explicit TiMe(
double time) : asDouble(time) {}
3743 operator double() {
return asDouble; }
3751 static double None() {
return TiMe(int64_t(-2)).asDouble; }
3898 void* luminaireFieldHandle;
3903 unsigned char revision;
3904 unsigned char minor;
3905 unsigned short major;
3910 #pragma warning(disable : 4996)
3912 std::string toString()
const {
3915 int n = std::snprintf(&str[0], str.size() - 1,
"%u.%02u.%02u", major, minor, revision);
3920 #pragma warning(default : 4996)
3926 inline std::ostream& operator <<(std::ostream& stream,
const VRayVersion& version) {
3927 stream << version.toString();
3933 static const int useParentTimes = (1 << 0);
3934 static const int useObjectID = (1 << 1);
3935 static const int usePrimaryVisibility = (1 << 2);
3936 static const int useUserAttributes = (1 << 3);
3961#include "_vraysdk_import.hpp"
3964 namespace Language {
3965 constexpr const char* EN_US =
"en-US";
3966 constexpr const char* ZH_CN =
"zh-CN";
3975 ThemeStyleStandalone,
4004 bool forwardProgressToVfbProgressBar : 1;
4010 void* parentWindowHandle;
4019 , parentWindowHandle()
4047 bool immediatelyForwardReadySplitBucketSubunits : 1;
4066 std::string vantageFile;
4100#if !defined(VRAY_RUNTIME_LOAD_PRIMARY) && !defined(VRAY_RUNTIME_LOAD_SECONDARY)
4113 Internal::VRay_incrementModuleReferenceCounter();
4118 Internal::VRay_incrementModuleReferenceCounter();
4126 void setUseParentEventLoop() {
4127 Internal::VRay_blendFrameBuffer();
4135 Internal::VRay_GUIMessageProcessing(enableMessageProcessing);
4143 Internal::VRay_OSMessageDispatching(enableMessageDispatching);
4147 Internal::VRay_LicenseManager_releaseLicense();
4151#elif defined(VRAY_RUNTIME_LOAD_PRIMARY)
4155 VRayInit(VRayInit&);
4158 enum Flags :
unsigned {
4165 explicit VRayInit(
const char*
const libraryFileName) {
4166 initialize(libraryFileName);
4167 if (Internal::VRay_incrementModuleReferenceCounter) Internal::VRay_incrementModuleReferenceCounter();
4174 VRayInit(
const char*
const libraryFileName,
unsigned enableFlags) {
4175 initialize(libraryFileName);
4176 if (Internal::VRay_incrementModuleReferenceCounter) Internal::VRay_incrementModuleReferenceCounter();
4177 if (Internal::VRay_enableFrameBuffer) Internal::VRay_enableFrameBuffer((enableFlags &
EnableFrameBuffer)!=0);
4178 if (Internal::VRay_LicenseManager_enableChaosCloudLicensing) Internal::VRay_LicenseManager_enableChaosCloudLicensing((enableFlags &
EnableChaosCloudLicensing)!=0);
4184 void setUseParentEventLoop() {
4185 Internal::VRay_blendFrameBuffer();
4193 Internal::VRay_GUIMessageProcessing(enableMessageProcessing);
4201 Internal::VRay_OSMessageDispatching(enableMessageDispatching);
4205 if (Internal::VRay_LicenseManager_releaseLicense)
4206 Internal::VRay_LicenseManager_releaseLicense();
4210 operator bool ()
const {
4215 std::string getSDKLibraryErrorString()
const {
4222 Internal::HModule hLib;
4223 std::string errString;
4226 void makeError(
const std::string &errMsg) {
4232 void initialize(
const char* libraryFileName);
4233 void importFunctions();
4238 Internal::FreeLibrary(hLib);
4240 Internal::dlclose(hLib);
4248 inline bool isDR2() {
4249 return !!Internal::VRay_isDR2();
4253 inline APIVersion getAPIVersion() {
4255 ver.allFields = Internal::VRay_getSDKVersion();
4260 inline VRayVersion getVRayVersion() {
4262 ver.allFields = Internal::VRay_getVRayVersion();
4267 inline const char* getVRayVersionDetails() {
4268 return Internal::VRay_getVRayVersionDetails();
4273 inline const char* getMaterialLibraryPath() {
4274 return Internal::VRay_getMaterialLibraryPath();
4301 std::string certificateFilePath;
4319 inline int setLicenseServers(
const LicenseServerSettings& settings);
4324 inline void setUSDProvider(
const char* usdProvider);
4329 ErrorCode errorCode;
4332 Error(
int errorCode = SUCCESS) : errorCode(
static_cast<ErrorCode
>(errorCode)) {
4335 Error(ErrorCode errorCode) : errorCode(errorCode) {
4338 bool error()
const {
4339 return errorCode != SUCCESS;
4342 ErrorCode getCode()
const {
4346 const char* toString()
const {
4347 return Internal::VRay_getErrorTextStringFromErrorCode(errorCode);
4350 friend inline bool operator==(
const Error& err0,
const Error& err1) {
4351 return err0.errorCode == err1.errorCode;
4354 friend inline bool operator!=(
const Error& err0,
const Error& err1) {
4355 return err0.errorCode != err1.errorCode;
4358 friend inline bool operator==(
const Error& err, ErrorCode errCode) {
4359 return err.errorCode == errCode;
4362 friend inline bool operator==(ErrorCode errCode,
const Error& err) {
4363 return errCode == err.errorCode;
4366 friend inline bool operator!=(
const Error& err, ErrorCode errCode) {
4367 return err.errorCode != errCode;
4370 friend inline bool operator!=(ErrorCode errCode,
const Error& err) {
4371 return errCode != err.errorCode;
4376 inline std::ostream& operator <<(std::ostream& stream,
const Error& err) {
4377 stream << err.toString();
4383 std::string fileName;
4384 std::string errorText;
4390 LicenseError::VRLAuthError errorCode;
4393 : errorCode(errorCode) {}
4395 bool error()
const {
4396 return errorCode != LicenseError::vrlauth_noError;
4399 const char* toString()
const;
4420 CH_PAINT_MASK = 1 << VRSM_PAINT,
4498 unsigned getScannedMaterialUILicense();
4509 unsigned releaseScannedMaterialUILicense();
4562 void createThis(
const char* pluginLibPath);
4567 BAD_LIBRARY_FILE = 1,
4583 operator bool()
const;
4593 bool getInfo(
const char* filename, std::string& info)
const;
4596 bool getInfo(
const std::string& filename, std::string& info)
const;
4612 namespace Internal {
4614 class BinaryValueParser;
4617 enum PluginCategory {
4618 category_bitmap = 0,
4620 category_geometric_object,
4621 category_geometry_source,
4624 category_render_channel,
4625 category_render_view,
4628 category_texture_float,
4629 category_texture_int,
4630 category_texture_matrix,
4631 category_texture_transform,
4632 category_texture_vector,
4634 category_volumetric,
4657 void resetBitmapCategory() noexcept {
pluginCategoryField &= ~(1ull << category_bitmap); }
4666 void setGeometricObjectCategory() noexcept {
pluginCategoryField |= 1ull << category_geometric_object; }
4667 void resetGeometricObjectCategory() noexcept {
pluginCategoryField &= ~(1ull << category_geometric_object); }
4671 void setGeometrySourceCategory() noexcept {
pluginCategoryField |= 1ull << category_geometry_source; }
4672 void resetGeometrySourceCategory() noexcept {
pluginCategoryField &= ~(1ull << category_geometry_source); }
4682 void resetMaterialCategory() noexcept {
pluginCategoryField &= ~(1ull << category_material); }
4686 void setRenderChannelCategory() noexcept {
pluginCategoryField |= 1ull << category_render_channel; }
4687 void resetRenderChannelCategory() noexcept {
pluginCategoryField &= ~(1ull << category_render_channel); }
4691 void setRenderViewCategory() noexcept {
pluginCategoryField |= 1ull << category_render_view; }
4692 void resetRenderViewCategory() noexcept {
pluginCategoryField &= ~(1ull << category_render_view); }
4697 void resetSettingsCategory() noexcept {
pluginCategoryField &= ~(1ull << category_settings); }
4702 void resetTextureCategory() noexcept {
pluginCategoryField &= ~(1ull << category_texture); }
4706 void setTextureFloatCategory() noexcept {
pluginCategoryField |= 1ull << category_texture_float; }
4707 void resetTextureFloatCategory() noexcept {
pluginCategoryField &= ~(1ull << category_texture_float); }
4711 void setTextureIntCategory() noexcept {
pluginCategoryField |= 1ull << category_texture_int; }
4712 void resetTextureIntCategory() noexcept {
pluginCategoryField &= ~(1ull << category_texture_int); }
4716 void setTextureMatrixCategory() noexcept {
pluginCategoryField |= 1ull << category_texture_matrix; }
4717 void resetTextureMatrixCategory() noexcept {
pluginCategoryField &= ~(1ull << category_texture_matrix); }
4721 void setTextureTransformCategory() noexcept {
pluginCategoryField |= 1ull << category_texture_transform; }
4722 void resetTextureTransformCategory() noexcept {
pluginCategoryField &= ~(1ull << category_texture_transform); }
4726 void setTextureVectorCategory() noexcept {
pluginCategoryField |= 1ull << category_texture_vector; }
4727 void resetTextureVectorCategory() noexcept {
pluginCategoryField &= ~(1ull << category_texture_vector); }
4732 void resetUvwgenCategory() noexcept {
pluginCategoryField &= ~(1ull << category_uvwgen); }
4736 void setVolumetricCategory() noexcept {
pluginCategoryField |= 1ull << category_volumetric; }
4737 void resetVolumetricCategory() noexcept {
pluginCategoryField &= ~(1ull << category_volumetric); }
4742 void resetCameraCategory() noexcept {
pluginCategoryField &= ~(1ull << category_camera); }
4751 void setInstancerCategory() noexcept {
pluginCategoryField |= 1ull << category_instancer; }
4752 void resetInstancerCategory() noexcept {
pluginCategoryField &= ~(1ull << category_instancer); }
4756 explicit PluginCategories(PluginCategory category) noexcept
4759 PluginCategories(PluginCategory category0, PluginCategory category1) noexcept
4762 PluginCategories(PluginCategory category0, PluginCategory category1, PluginCategory category2) noexcept
4763 :
pluginCategoryField((1ull << category0) || (1ull << category1) || (1ull << category2)) {}
4765 PluginCategories(PluginCategory category0, PluginCategory category1, PluginCategory category2, PluginCategory category3) noexcept
4766 :
pluginCategoryField((1ull << category0) || (1ull << category1) || (1ull << category2) || (1ull << category3)) {}
4770 bool hasCategory(PluginCategory category)
const noexcept {
4774 void setCategory(PluginCategory category,
bool value)
noexcept {
4775 const long long msk = 1ll << category;
4776 const long long val = -
static_cast<long long>(value);
4785 const char* getPluginCategoryName(PluginCategory category);
4796 friend class VUtils::Value;
4797 friend class Internal::Access;
4798 friend class Internal::BinaryValueParser;
4799 friend class Internal::BinaryValueBuilder;
4803 InstanceId internalId;
4804 InstanceId id()
const {
4805 constexpr int shift =
sizeof(InstanceId) * 8 - Internal::INSTANCE_ID_BITS;
4806 return static_cast<signed long long>(internalId << shift) >> shift;
4814 template<
typename T,
int TYPE>
4815 bool setValueAtTimeTemplate(
const char* propertyName,
const T& value,
double time);
4817 template<
typename T,
int TYPE>
4818 bool setArrayAtTimeTemplate(
const char* propertyName,
size_t count,
const T& value,
double time);
4820 template<
typename LengthFn,
typename Po
interFn>
4821 bool setStringArrayTemplate(
const char *propertyName,
size_t count, LengthFn lengthAt, PointerFn pointerAt,
double time);
4832 Plugin() noexcept : pRenderer(), internalId(NO_ID) {}
4846 bool operator<(
const Plugin& plugin)
const noexcept;
4847 bool operator<=(
const Plugin& plugin)
const noexcept;
4848 bool operator>(
const Plugin& plugin)
const noexcept;
4849 bool operator>=(
const Plugin& plugin)
const noexcept;
5367 bool setArray(const std::
string& propertyName, const
int data[],
size_t count,
double time =
TiMe::
Default());
5374 bool setArray(const std::
string& propertyName, const
float data[],
size_t count,
double time =
TiMe::
Default());
5382 bool setArray(const std::
string& propertyName, const
double data[],
size_t count,
double time =
TiMe::
Default());
5404 bool setArray(const
char* propertyName, const std::
string data[],
size_t count,
double time =
TiMe::
Default());
5406 bool setArray(const std::
string& propertyName, const std::
string data[],
size_t count,
double time =
TiMe::
Default());
5408 bool setArray(const
char* propertyName, const
char* const data[],
size_t count,
double time =
TiMe::
Default());
5410 bool setArray(const std::
string& propertyName, const
char* const data[],
size_t count,
double time =
TiMe::
Default());
5442 friend std::ostream& operator <<(std::ostream& stream, const
Plugin& plugin);
5444#ifdef VRAY_SDK_INTEROPERABILITY
5445 bool setValueAsStringAtTime(
const char* propertyName,
const char* value,
double time);
5446 bool setValueAsStringAtTime(
const char* propertyName,
const std::string& value,
double time);
5447 bool setValueAsStringAtTime(
const std::string& propertyName,
const char* value,
double time);
5448 bool setValueAsStringAtTime(
const std::string& propertyName,
const std::string& value,
double time);
5449 bool setValueAtTime(
const char* propertyName,
const bool value,
double time);
5450 bool setValueAtTime(
const std::string& propertyName,
const bool value,
double time);
5451 bool setValueAtTime(
const char* propertyName,
const int value,
double time);
5452 bool setValueAtTime(
const std::string& propertyName,
const int value,
double time);
5453 bool setValueAtTime(
const char* propertyName,
const float value,
double time);
5454 bool setValueAtTime(
const std::string& propertyName,
const float value,
double time);
5455 bool setValueAtTime(
const char* propertyName,
const double value,
double time);
5456 bool setValueAtTime(
const std::string& propertyName,
const double value,
double time);
5457 bool setValueAtTime(
const char* propertyName,
const Color& value,
double time);
5458 bool setValueAtTime(
const std::string& propertyName,
const Color& value,
double time);
5459 bool setValueAtTime(
const char* propertyName,
const AColor& value,
double time);
5460 bool setValueAtTime(
const std::string& propertyName,
const AColor& value,
double time);
5461 bool setValueAtTime(
const char* propertyName,
const Vector& value,
double time);
5462 bool setValueAtTime(
const std::string& propertyName,
const Vector& value,
double time);
5463 bool setValueAtTime(
const char* propertyName,
const Matrix& value,
double time);
5464 bool setValueAtTime(
const std::string& propertyName,
const Matrix& value,
double time);
5465 bool setValueAtTime(
const char* propertyName,
const Transform& transform,
double time);
5466 bool setValueAtTime(
const std::string& propertyName,
const Transform& transform,
double time);
5467 bool setValueAtTime(
const char* propertyName,
const PluginRefT<Plugin>& pluginRef,
double time);
5468 bool setValueAtTime(
const std::string& propertyName,
const PluginRefT<Plugin>& pluginRef,
double time);
5469 bool setValueAtTime(
const char* propertyName,
const char* str,
double time);
5470 bool setValueAtTime(
const std::string& propertyName,
const char* str,
double time);
5471 bool setValueAtTime(
const char* propertyName,
const std::string& str,
double time);
5472 bool setValueAtTime(
const std::string& propertyName,
const std::string& str,
double time);
5473 bool setValueAtTime(
const char* propertyName,
const Value& value,
double time);
5474 bool setValueAtTime(
const std::string& propertyName,
const Value& value,
double time);
5475 bool setValueAtTime(
const char* propertyName,
const ValueList& value,
double time);
5476 bool setValueAtTime(
const std::string& propertyName,
const ValueList& value,
double time);
5477 bool setValueAtTime(
const char* propertyName,
const IntList& value,
double time);
5478 bool setValueAtTime(
const std::string& propertyName,
const IntList& value,
double time);
5479 bool setValueAtTime(
const char* propertyName,
const FloatList& value,
double time);
5480 bool setValueAtTime(
const std::string& propertyName,
const FloatList& value,
double time);
5481 bool setValueAtTime(
const char* propertyName,
const VectorList& value,
double time);
5482 bool setValueAtTime(
const std::string& propertyName,
const VectorList& value,
double time);
5483 bool setValueAtTime(
const char* propertyName,
const ColorList& value,
double time);
5484 bool setValueAtTime(
const std::string& propertyName,
const ColorList& value,
double time);
5485 bool setValueAtTime(
const char* propertyName,
const PluginList& value,
double time);
5486 bool setValueAtTime(
const std::string& propertyName,
const PluginList& value,
double time);
5487 bool setValueAtTime(
const char* propertyName,
const StringList& value,
double time);
5488 bool setValueAtTime(
const std::string& propertyName,
const StringList& value,
double time);
5489 bool setArrayAtTime(
const char* propertyName,
const int data[],
size_t count,
double time);
5490 bool setArrayAtTime(
const std::string& propertyName,
const int data[],
size_t count,
double time);
5491 bool setArrayAtTime(
const char* propertyName,
const float data[],
size_t count,
double time);
5492 bool setArrayAtTime(
const std::string& propertyName,
const float data[],
size_t count,
double time);
5493 bool setArrayAtTime(
const char* propertyName,
const double data[],
size_t count,
double time);
5494 bool setArrayAtTime(
const std::string& propertyName,
const double data[],
size_t count,
double time);
5495 bool setArrayAtTime(
const char* propertyName,
const Vector data[],
size_t count,
double time);
5496 bool setArrayAtTime(
const std::string& propertyName,
const Vector data[],
size_t count,
double time);
5497 bool setArrayAtTime(
const char* propertyName,
const Color data[],
size_t count,
double time);
5498 bool setArrayAtTime(
const std::string& propertyName,
const Color data[],
size_t count,
double time);
5499 bool setArrayAtTime(
const char* propertyName,
const Plugin data[],
size_t count,
double time);
5500 bool setArrayAtTime(
const std::string& propertyName,
const Plugin data[],
size_t count,
double time);
5501 bool setArrayAtTime(
const char* propertyName,
const std::string data[],
size_t count,
double time);
5502 bool setArrayAtTime(
const std::string& propertyName,
const std::string data[],
size_t count,
double time);
5503 bool setValueAtTime(
const char* propertyName,
const void* data,
size_t size,
double time);
5504 bool setValueAtTime(
const std::string& propertyName,
const void* data,
size_t size,
double time);
5507 VUtils::IntRefList getIntRefList(
const char* propertyName);
5508 VUtils::IntRefList getIntRefList(
const char* propertyName,
bool& ok);
5509 VUtils::IntRefList getIntRefListAtTime(
const char* propertyName,
double time);
5510 VUtils::IntRefList getIntRefListAtTime(
const char* propertyName,
double time,
bool& ok);
5511 VUtils::IntRefList getIntRefList(
const std::string& propertyName);
5512 VUtils::IntRefList getIntRefList(
const std::string& propertyName,
bool& ok);
5513 VUtils::IntRefList getIntRefListAtTime(
const std::string& propertyName,
double time);
5514 VUtils::IntRefList getIntRefListAtTime(
const std::string& propertyName,
double time,
bool& ok);
5516 VUtils::FloatRefList getFloatRefList(
const char* propertyName);
5517 VUtils::FloatRefList getFloatRefList(
const char* propertyName,
bool& ok);
5518 VUtils::FloatRefList getFloatRefListAtTime(
const char* propertyName,
double time);
5519 VUtils::FloatRefList getFloatRefListAtTime(
const char* propertyName,
double time,
bool& ok);
5520 VUtils::FloatRefList getFloatRefList(
const std::string& propertyName);
5521 VUtils::FloatRefList getFloatRefList(
const std::string& propertyName,
bool& ok);
5522 VUtils::FloatRefList getFloatRefListAtTime(
const std::string& propertyName,
double time);
5523 VUtils::FloatRefList getFloatRefListAtTime(
const std::string& propertyName,
double time,
bool& ok);
5525 VUtils::VectorRefList getVectorRefList(
const char* propertyName);
5526 VUtils::VectorRefList getVectorRefList(
const char* propertyName,
bool& ok);
5527 VUtils::VectorRefList getVectorRefListAtTime(
const char* propertyName,
double time);
5528 VUtils::VectorRefList getVectorRefListAtTime(
const char* propertyName,
double time,
bool& ok);
5529 VUtils::VectorRefList getVectorRefList(
const std::string& propertyName);
5530 VUtils::VectorRefList getVectorRefList(
const std::string& propertyName,
bool& ok);
5531 VUtils::VectorRefList getVectorRefListAtTime(
const std::string& propertyName,
double time);
5532 VUtils::VectorRefList getVectorRefListAtTime(
const std::string& propertyName,
double time,
bool& ok);
5534 VUtils::ColorRefList getColorRefList(
const char* propertyName);
5535 VUtils::ColorRefList getColorRefList(
const char* propertyName,
bool& ok);
5536 VUtils::ColorRefList getColorRefListAtTime(
const char* propertyName,
double time);
5537 VUtils::ColorRefList getColorRefListAtTime(
const char* propertyName,
double time,
bool& ok);
5538 VUtils::ColorRefList getColorRefList(
const std::string& propertyName);
5539 VUtils::ColorRefList getColorRefList(
const std::string& propertyName,
bool& ok);
5540 VUtils::ColorRefList getColorRefListAtTime(
const std::string& propertyName,
double time);
5541 VUtils::ColorRefList getColorRefListAtTime(
const std::string& propertyName,
double time,
bool& ok);
5543 VUtils::ValueRefList getValueRefList(
const char* propertyName);
5544 VUtils::ValueRefList getValueRefList(
const char* propertyName,
bool& ok);
5545 VUtils::ValueRefList getValueRefListAtTime(
const char* propertyName,
double time);
5546 VUtils::ValueRefList getValueRefListAtTime(
const char* propertyName,
double time,
bool& ok);
5547 VUtils::ValueRefList getValueRefList(
const std::string& propertyName);
5548 VUtils::ValueRefList getValueRefList(
const std::string& propertyName,
bool& ok);
5549 VUtils::ValueRefList getValueRefListAtTime(
const std::string& propertyName,
double time);
5550 VUtils::ValueRefList getValueRefListAtTime(
const std::string& propertyName,
double time,
bool& ok);
5552 VUtils::CharStringRefList getStringRefList(
const char* propertyName);
5553 VUtils::CharStringRefList getStringRefList(
const char* propertyName,
bool& ok);
5554 VUtils::CharStringRefList getStringRefListAtTime(
const char* propertyName,
double time);
5555 VUtils::CharStringRefList getStringRefListAtTime(
const char* propertyName,
double time,
bool& ok);
5556 VUtils::CharStringRefList getStringRefList(
const std::string& propertyName);
5557 VUtils::CharStringRefList getStringRefList(
const std::string& propertyName,
bool& ok);
5558 VUtils::CharStringRefList getStringRefListAtTime(
const std::string& propertyName,
double time);
5559 VUtils::CharStringRefList getStringRefListAtTime(
const std::string& propertyName,
double time,
bool& ok);
5561 VUtils::CharString getCharString(
const char* propertyName);
5562 VUtils::CharString getCharString(
const char* propertyName,
bool& ok);
5563 VUtils::CharString getCharStringAtTime(
const char* propertyName,
double time);
5564 VUtils::CharString getCharStringAtTime(
const char* propertyName,
double time,
bool& ok);
5565 VUtils::CharString getCharString(
const std::string& propertyName);
5566 VUtils::CharString getCharString(
const std::string& propertyName,
bool& ok);
5567 VUtils::CharString getCharStringAtTime(
const std::string& propertyName,
double time);
5568 VUtils::CharString getCharStringAtTime(
const std::string& propertyName,
double time,
bool& ok);
5570 bool setValue(
const char* propertyName,
const VUtils::IntRefList& intList);
5571 bool setValueAtTime(
const char* propertyName,
const VUtils::IntRefList& intList,
double time);
5572 bool setValue(
const std::string& propertyName,
const VUtils::IntRefList& intList);
5573 bool setValueAtTime(
const std::string& propertyName,
const VUtils::IntRefList& intList,
double time);
5575 bool setValue(
const char* propertyName,
const VUtils::FloatRefList& floatList);
5576 bool setValueAtTime(
const char* propertyName,
const VUtils::FloatRefList& floatList,
double time);
5577 bool setValue(
const std::string& propertyName,
const VUtils::FloatRefList& floatList);
5578 bool setValueAtTime(
const std::string& propertyName,
const VUtils::FloatRefList& floatList,
double time);
5580 bool setValue(
const char* propertyName,
const VUtils::VectorRefList& vectorList);
5581 bool setValueAtTime(
const char* propertyName,
const VUtils::VectorRefList& vectorList,
double time);
5582 bool setValue(
const std::string& propertyName,
const VUtils::VectorRefList& vectorList);
5583 bool setValueAtTime(
const std::string& propertyName,
const VUtils::VectorRefList& vectorList,
double time);
5585 bool setValue(
const char* propertyName,
const VUtils::ColorRefList& colorList);
5586 bool setValueAtTime(
const char* propertyName,
const VUtils::ColorRefList& colorList,
double time);
5587 bool setValue(
const std::string& propertyName,
const VUtils::ColorRefList& colorList);
5588 bool setValueAtTime(
const std::string& propertyName,
const VUtils::ColorRefList& colorList,
double time);
5590 bool setValue(
const char* propertyName,
const VUtils::TransformRefList& transformList);
5591 bool setValueAtTime(
const char* propertyName,
const VUtils::TransformRefList& transformList,
double time);
5592 bool setValue(
const std::string& propertyName,
const VUtils::TransformRefList& transformList);
5593 bool setValueAtTime(
const std::string& propertyName,
const VUtils::TransformRefList& transformList,
double time);
5595 bool setValue(
const char* propertyName,
const VUtils::CharStringRefList& stringList);
5596 bool setValueAtTime(
const char* propertyName,
const VUtils::CharStringRefList& stringList,
double time);
5597 bool setValue(
const std::string& propertyName,
const VUtils::CharStringRefList& stringList);
5598 bool setValueAtTime(
const std::string& propertyName,
const VUtils::CharStringRefList& stringList,
double time);
5600 bool setValue(
const char* propertyName,
const VUtils::ValueRefList& valueList);
5601 bool setValueAtTime(
const char* propertyName,
const VUtils::ValueRefList& valueList,
double time);
5602 bool setValue(
const std::string& propertyName,
const VUtils::ValueRefList& valueList);
5603 bool setValueAtTime(
const std::string& propertyName,
const VUtils::ValueRefList& valueList,
double time);
5605 bool setValue(
const char* propertyName,
const VUtils::CharString& str);
5606 bool setValueAtTime(
const char* propertyName,
const VUtils::CharString& str,
double time);
5607 bool setValue(
const std::string& propertyName,
const VUtils::CharString& str);
5608 bool setValueAtTime(
const std::string& propertyName,
const VUtils::CharString& str,
double time);
5619 friend class Internal::BinaryValueBuilder;
5628 int getOutputIndex()
const noexcept {
return outPropIdx; }
5658 template<
class T>
bool operator<(
const PluginRefT<T>& plugin)
const noexcept;
5659 template<
class T>
bool operator<=(
const PluginRefT<T>& plugin)
const noexcept;
5660 template<
class T>
bool operator>(
const PluginRefT<T>& plugin)
const noexcept;
5661 template<
class T>
bool operator>=(
const PluginRefT<T>& plugin)
const noexcept;
5668 return outPropIdx >= 0;
5678 friend std::ostream& operator <<(std::ostream& stream,
const PluginRefT& pluginRef);
5706 PluginRefT(
const T &plugin) noexcept : T(plugin), outPropIdx(0) {}
5718 PluginRefT(
const X &plugin) noexcept : T(
static_cast<X
>(plugin)), outPropIdx(0) {}
5732 bool operator<(
const PluginRefT& plugin)
const noexcept;
5734 bool operator<=(
const PluginRefT& plugin)
const noexcept;
5736 bool operator>(
const PluginRefT& plugin)
const noexcept;
5738 bool operator>=(
const PluginRefT& plugin)
const noexcept;
5746 return outPropIdx >= 0;
5757 friend std::ostream& operator <<(std::ostream& stream,
const PluginRefT<U>& pluginRef);
5762 friend class Internal::BinaryValueParser;
5763 friend class Internal::BinaryValueBuilder;
5764 friend struct Internal::MeshFileDataParser;
5765 friend std::ostream& operator<<(std::ostream& stream,
const Value& value);
5769 char val[VRAY_MAXIMUM4(
sizeof(
Transform),
sizeof(std::string),
sizeof(ValueList),
sizeof(
PluginRef))];
5774 explicit Value(Type type)
noexcept;
5776 void copyValue(
const Value& value);
5777 void moveValue(
Value&& value)
noexcept;
5778 void swapValue(
Value& value)
noexcept;
5779 void destroyValue()
noexcept;
5780 template<
typename T, Type TYPE>
void constructOnly_()
noexcept;
5781 template<
typename T, Type TYPE>
void constructListWithIterators_(
const T* first,
const T* last);
5782 template<
typename T, Type TYPE,
bool noExcept>
void constructWithValue_(T&& value)
noexcept(noExcept);
5783 template<
typename T, Type TYPE>
void setToValue_(T&& value);
5784 template<
typename T> T& interpretAs_();
5785 template<
typename T>
const T& interpretAs_()
const;
5786 template<
typename T, Type TYPE> T& viewAs_();
5787 template<
typename T, Type TYPE>
const T& viewAs_()
const;
5788 template<
typename T, Type TYPE> T getValue_()
const;
5798 explicit
Value(
int value) noexcept;
5799 explicit
Value(
float value) noexcept;
5800 explicit
Value(
double value) noexcept;
5801 explicit
Value(
bool value) noexcept;
5807 explicit
Value(const IntList& value);
5808 explicit
Value(IntList&& value) noexcept;
5809 explicit
Value(const FloatList& value);
5810 explicit
Value(FloatList&& value) noexcept;
5811 explicit
Value(const VectorList& value);
5812 explicit
Value(VectorList&& value) noexcept;
5813 explicit
Value(const ColorList& value);
5814 explicit
Value(ColorList&& value) noexcept;
5815 explicit
Value(TransformList&& value) noexcept;
5816 explicit
Value(const TransformList& value);
5817 explicit
Value(const ValueList& value);
5818 explicit
Value(ValueList&& value) noexcept;
5819 explicit
Value(const StringList& value);
5820 explicit
Value(StringList&& value) noexcept;
5821 explicit
Value(const PluginList& value);
5822 explicit
Value(PluginList&& value) noexcept;
5823 explicit
Value(const
char* value);
5824 explicit
Value(const std::
string& value);
5825 explicit
Value(std::
string&& value) noexcept;
5827 Value(const
int* values,
size_t count);
5828 Value(const
float* values,
size_t count);
5834 template<
size_t count> explicit
Value(const
int(&arr)[count]);
5835 template<
size_t count> explicit
Value(const
float(&arr)[count]);
5836 template<
size_t count> explicit
Value(const
Vector(&arr)[count]);
5837 template<
size_t count> explicit
Value(const
Color(&arr)[count]);
5838 template<
size_t count> explicit
Value(const
Transform(&arr)[count]);
5839 template<
size_t count> explicit
Value(const
Plugin(&arr)[count]);
5840 template<
size_t count> explicit
Value(const
Value(&arr)[count]);
5841 template<
size_t count> explicit
Value(
Value(&&arr)[count]);
5848 void swap(
Value& value) noexcept;
5852 bool operator==(const
Value& value) const noexcept;
5853 bool operator!=(const
Value& value) const noexcept;
5901 void set(const std::
string& value);
5904 void set(std::
string&& value);
5907 void set(const IntList& value);
5913 void set(const FloatList& value);
5919 void set(const ColorList& value);
5925 void set(const VectorList& value);
5931 void set(const TransformList& value);
5934 void set(TransformList&& value);
5937 void set(const ValueList& value);
5943 void set(const StringList& value);
5949 void set(const PluginList& value);
5955 void set(const
int* values,
size_t count);
5958 void set(const
float* values,
size_t count);
5970 void set(const std::
string* values,
size_t count);
5974 template<typename T> T&
as();
5978 template<typename T> const T&
as() const;
5983 template<typename T> T
get() const;
6075 std::ostream&
toString(std::ostream& stream) const;
6078 std::ostream& operator <<(std::ostream& stream, const IntList& list);
6079 std::ostream& operator <<(std::ostream& stream, const FloatList& list);
6080 std::ostream& operator <<(std::ostream& stream, const VectorList& list);
6081 std::ostream& operator <<(std::ostream& stream, const ColorList& list);
6082 std::ostream& operator <<(std::ostream& stream, const TransformList& list);
6083 std::ostream& operator <<(std::ostream& stream, const ValueList& list);
6084 std::ostream& operator <<(std::ostream& stream, const StringList& list);
6085 std::ostream& operator <<(std::ostream& stream, const PluginList& list);
6086 std::ostream& operator <<(std::ostream& stream, const
Value& value);
6139 , hexArraysHash(false)
6140 , hexTransforms(false)
6141 , renderElementsSeparateFolders(false)
6143 , currentFrameOnly(false)
6144 , incremental(false)
6145 , appendFrameSuffix(false)
6148 , rightInterval(0.0)
6149 , vrdataExport(false)
6150 , vrdataSmallBufferSizeLimit(2048)
6151 , vrdataFileSizeLimitMiB(0)
6152 , vrfilesExport(false)
6153 , vrfilesComputeHashes(false)
6183 enum VFBMenuItemType {
6216 enum RenderSizesBitmask {
6218 RS_IMG_SIZE = 1 << 0,
6219 RS_RENDER_RGN = 1 << 1,
6220 RS_CROP_RGN = 1 << 2
6234 enum ReasonsForAutoRename {
6239 NO_OVERWRITE_NO_EXISTING_PLUGIN_BUT_INVALID_PLUGIN_NAME,
6242 NO_OVERWRITE_BUT_EXISTING_PLUGIN_WITH_NAME,
6245 OVERWRITE_EXISTING_PLUGIN_WITH_NAME_BUT_DIFFERENT_TYPE
6271 this->skipOnlyCurrentPlugin =
false;
6272 this->skipAllSuccessorsOfCurrentPlugin =
false;
6273 this->overwriteExistingPlugin =
false;
6276 PreCreateCallbackOptions(
const char* name,
const bool skipOnlyCurrentPlugin =
false,
const bool skipAllSuccessorsOfCurrentPlugin =
false,
const bool overwriteExistingPlugin =
false) {
6280 this->skipOnlyCurrentPlugin = skipOnlyCurrentPlugin;
6281 this->skipAllSuccessorsOfCurrentPlugin = skipAllSuccessorsOfCurrentPlugin;
6282 this->overwriteExistingPlugin = overwriteExistingPlugin;
6285 PreCreateCallbackOptions(
const std::string& name,
const bool skipOnlyCurrentPlugin =
false,
const bool skipAllSuccessorsOfCurrentPlugin =
false,
const bool overwriteExistingPlugin =
false) {
6286 if (!name.empty()) {
6289 this->skipOnlyCurrentPlugin = skipOnlyCurrentPlugin;
6290 this->skipAllSuccessorsOfCurrentPlugin = skipAllSuccessorsOfCurrentPlugin;
6291 this->overwriteExistingPlugin = overwriteExistingPlugin;
6328 VRayRenderer& srcRenderer, VRayRenderer& dstRenderer,
6329 const std::vector<Plugin>& includeListOfPlugins,
const std::vector<Plugin>& excludeListOfPlugins,
6330 Util::PreCreateCallbackOptions(*preCreateCallback)(VRayRenderer& dstRenderer, Plugin& srcPlugin,
void*),
6331 void(*postCreateCallback)(Plugin& dstPlugin,
const char* srcPluginName, Util::ReasonsForAutoRename autoRenamedResult,
const char* preCreateCallbackReturnedName,
void*),
6332 const void* userData =
nullptr);
6365 template<
class T, Util::PreCreateCallbackOptions(T::* TMethod)(VRayRenderer& dstRenderer, Plugin& srcPlugin,
void*),
6366 void(T::* TMethod1)(Plugin& dstPlugin,
const char* srcPluginName, Util::ReasonsForAutoRename autoRenamedResult,
const char* preCreateCallbackReturnedName,
void*)>
6368 VRayRenderer& srcRenderer, VRayRenderer& dstRenderer,
6369 const std::vector<Plugin>& includeListOfPlugins,
const std::vector<Plugin>& excludeListOfPlugins,
6371 const void* userData =
nullptr);
6399 VRayRenderer& srcRenderer, VRayRenderer& dstRenderer,
6400 const char* pluginType,
6401 Util::PreCreateCallbackOptions(*preCreateCallback)(VRayRenderer& dstRenderer, Plugin& srcPlugin,
void*),
6402 void(*postCreateCallback)(Plugin& dstPlugin,
const char* srcPluginName, Util::ReasonsForAutoRename autoRenamedResult,
const char* preCreateCallbackReturnedName,
void*),
6403 const void* userData =
nullptr);
6407 VRayRenderer& srcRenderer, VRayRenderer& dstRenderer,
6408 const std::string& pluginType,
6409 Util::PreCreateCallbackOptions(*preCreateCallback)(VRayRenderer& dstRenderer, Plugin& srcPlugin,
void*),
6410 void(*postCreateCallback)(Plugin& dstPlugin,
const char* srcPluginName, Util::ReasonsForAutoRename autoRenamedResult,
const char* preCreateCallbackReturnedName,
void*),
6411 const void* userData =
nullptr);
6415 VRayRenderer& srcRenderer, VRayRenderer& dstRenderer,
6416 const PluginTypeId& pluginTypeId,
6417 Util::PreCreateCallbackOptions(*preCreateCallback)(VRayRenderer& dstRenderer, Plugin& srcPlugin,
void*),
6418 void(*postCreateCallback)(Plugin& dstPlugin,
const char* srcPluginName, Util::ReasonsForAutoRename autoRenamedResult,
const char* preCreateCallbackReturnedName,
void*),
6419 const void* userData =
nullptr);
6422 template<
class PluginType>
6424 VRayRenderer& srcRenderer, VRayRenderer& dstRenderer,
6425 Util::PreCreateCallbackOptions(*preCreateCallback)(VRayRenderer& dstRenderer, Plugin& srcPlugin,
void*),
6426 void(*postCreateCallback)(Plugin& dstPlugin,
const char* srcPluginName, Util::ReasonsForAutoRename autoRenamedResult,
const char* preCreateCallbackReturnedName,
void*),
6427 const void* userData =
nullptr);
6452 template<
class T, Util::PreCreateCallbackOptions(T::* TMethod)(VRayRenderer& dstRenderer, Plugin& srcPlugin,
void*),
6453 void(T::* TMethod1)(Plugin& dstPlugin,
const char* srcPluginName, Util::ReasonsForAutoRename autoRenamedResult,
const char* preCreateCallbackReturnedName,
void*)>
6455 VRayRenderer& srcRenderer, VRayRenderer& dstRenderer,
6456 const char* pluginType,
6458 const void* userData =
nullptr);
6461 template<
class T, Util::PreCreateCallbackOptions(T::* TMethod)(VRayRenderer& dstRenderer, Plugin& srcPlugin,
void*),
6462 void(T::* TMethod1)(Plugin& dstPlugin,
const char* srcPluginName, Util::ReasonsForAutoRename autoRenamedResult,
const char* preCreateCallbackReturnedName,
void*)>
6464 VRayRenderer& srcRenderer, VRayRenderer& dstRenderer,
6465 const std::string& pluginType,
6467 const void* userData =
nullptr);
6470 template<
class T, Util::PreCreateCallbackOptions(T::* TMethod)(VRayRenderer& dstRenderer, Plugin& srcPlugin,
void*),
6471 void(T::* TMethod1)(Plugin& dstPlugin,
const char* srcPluginName, Util::ReasonsForAutoRename autoRenamedResult,
const char* preCreateCallbackReturnedName,
void*)>
6473 VRayRenderer& srcRenderer, VRayRenderer& dstRenderer,
6474 const PluginTypeId& pluginTypeId,
6476 const void* userData =
nullptr);
6479 template<
class T, Util::PreCreateCallbackOptions(T::* TMethod)(VRayRenderer& dstRenderer, Plugin& srcPlugin,
void*),
6480 void(T::* TMethod1)(Plugin& dstPlugin,
const char* srcPluginName, Util::ReasonsForAutoRename autoRenamedResult,
const char* preCreateCallbackReturnedName,
void*),
6483 VRayRenderer& srcRenderer, VRayRenderer& dstRenderer,
6485 const void* userData =
nullptr);
6510 friend class Internal::Access;
6512 friend int Util::copyPlugins(
6514 const std::vector<Plugin>& includeListOfPlugins,
const std::vector<Plugin>& excludeListOfPlugins,
6516 void(*postCreateCallback)(
Plugin& dstPlugin,
const char* srcPluginName, Util::ReasonsForAutoRename autoRenamedResult,
const char* preCreateCallbackReturnedName,
void*),
6517 const void* userData);
6520 void(T::* TMethod1)(
Plugin& dstPlugin,
const char* srcPluginName, Util::ReasonsForAutoRename autoRenamedResult,
const char* preCreateCallbackReturnedName,
void*)>
6521 friend int Util::copyPlugins(
6523 const std::vector<Plugin>& includeListOfPlugins,
const std::vector<Plugin>& excludeListOfPlugins,
6525 const void* userData);
6527 friend int Util::copyPlugins(
6529 const char* pluginType,
6531 void(*postCreateCallback)(
Plugin& dstPlugin,
const char* srcPluginName, Util::ReasonsForAutoRename autoRenamedResult,
const char* preCreateCallbackReturnedName,
void*),
6532 const void* userData);
6534 friend int Util::copyPlugins(
6536 const std::string& pluginType,
6538 void(*postCreateCallback)(
Plugin& dstPlugin,
const char* srcPluginName, Util::ReasonsForAutoRename autoRenamedResult,
const char* preCreateCallbackReturnedName,
void*),
6539 const void* userData);
6541 friend int Util::copyPlugins(
6543 const PluginTypeId& pluginTypeId,
6545 void(*postCreateCallback)(
Plugin& dstPlugin,
const char* srcPluginName, Util::ReasonsForAutoRename autoRenamedResult,
const char* preCreateCallbackReturnedName,
void*),
6546 const void* userData);
6548 template<
class PluginType>
6549 friend int Util::copyPlugins(
6552 void(*postCreateCallback)(
Plugin& dstPlugin,
const char* srcPluginName, Util::ReasonsForAutoRename autoRenamedResult,
const char* preCreateCallbackReturnedName,
void*),
6553 const void* userData);
6556 void(T::* TMethod1)(
Plugin& dstPlugin,
const char* srcPluginName, Util::ReasonsForAutoRename autoRenamedResult,
const char* preCreateCallbackReturnedName,
void*)>
6557 friend int Util::copyPlugins(
6559 const char* pluginType,
6561 const void* userData);
6564 void(T::* TMethod1)(
Plugin& dstPlugin,
const char* srcPluginName, Util::ReasonsForAutoRename autoRenamedResult,
const char* preCreateCallbackReturnedName,
void*)>
6565 friend int Util::copyPlugins(
6567 const std::string& pluginType,
6569 const void* userData);
6572 void(T::* TMethod1)(
Plugin& dstPlugin,
const char* srcPluginName, Util::ReasonsForAutoRename autoRenamedResult,
const char* preCreateCallbackReturnedName,
void*)>
6573 friend int Util::copyPlugins(
6575 const PluginTypeId& pluginTypeId,
6577 const void* userData);
6580 void(T::* TMethod1)(
Plugin& dstPlugin,
const char* srcPluginName, Util::ReasonsForAutoRename autoRenamedResult,
const char* preCreateCallbackReturnedName,
void*),
6582 friend int Util::copyPlugins(
6585 const void* userData);
6588 static void pluginCopyParamsPreCreateCallback(
const InstanceId srcPluginID, Internal::PreCreateCallbackOptions* opts,
void* info);
6589 static void pluginCopyParamsPostCreateCallback(
6590 const InstanceId dstPluginID,
const char* srcPluginName,
6591 Util::ReasonsForAutoRename autoRenamedResult,
const char* preCreateCallbackReturnedName,
6594 class PluginCopyParamsCreateDelegate {
6598 typedef void (*tstubPost)(
void* pobject,
Plugin& dstPlugin,
const char* srcPluginName, Util::ReasonsForAutoRename autoRenamedResult,
const char* preCreateCallbackReturnedName,
void* userObj);
6599 typedef void (*tfuncPost)(
Plugin& dstPlugin,
const char* srcPluginName, Util::ReasonsForAutoRename autoRenamedResult,
const char* preCreateCallbackReturnedName,
void* userObj);
6605 tmethodPre() : pstubPre() {}
6606 tmethodPre(tstubPre pstubPre) : pstubPre(pstubPre) {}
6607 tmethodPre(tfuncPre pfuncPre) : pfuncPre(pfuncPre) {}
6611 tstubPost pstubPost;
6612 tfuncPost pfuncPost;
6613 tmethodPost() : pstubPost() {}
6614 tmethodPost(tstubPost pstubPost) : pstubPost(pstubPost) {}
6615 tmethodPost(tfuncPost pfuncPost) : pfuncPost(pfuncPost) {}
6622 template <
class T, Util::PreCreateCallbackOptions(T::* PreCreateTMethod)(VRayRenderer& dstRenderer, Plugin& srcPlugin,
void* puserObj)>
6624 T* p =
static_cast<T*
>(pobject);
6625 return (p->*PreCreateTMethod)(dstRenderer, srcPlugin, puserObj);
6628 template <
class T,
void(T::* PostCreateTMethod)(Plugin& dstPlugin, const
char* srcPluginName, Util::ReasonsForAutoRename autoRenamedResult, const
char* preCreateCallbackReturnedName,
void* puserObj)>
6629 static void method_stubPost(
void* pobject,
Plugin& dstPlugin,
const char* srcPluginName, Util::ReasonsForAutoRename autoRenamedResult,
const char* preCreateCallbackReturnedName,
void* puserObj) {
6630 T* p =
static_cast<T*
>(pobject);
6631 (p->*PostCreateTMethod)(dstPlugin, srcPluginName, autoRenamedResult, preCreateCallbackReturnedName, puserObj);
6634 PluginCopyParamsCreateDelegate(tfuncPre pfuncPre, tfuncPost pfuncPost,
void* puserObj,
VRayRenderer* srcRenderer,
VRayRenderer* dstRenderer) :
6635 pobject(), pmethodPre(pfuncPre), pmethodPost(pfuncPost), puserObj(puserObj), srcRenderer(srcRenderer), dstRenderer(dstRenderer) {}
6636 PluginCopyParamsCreateDelegate(
void* pobject, tstubPre pstubPre, tstubPost pstubPost,
void* puserObj,
VRayRenderer* srcRenderer,
VRayRenderer* dstRenderer) :
6637 pobject(pobject), pmethodPre(pstubPre), pmethodPost(pstubPost), puserObj(puserObj), srcRenderer(srcRenderer), dstRenderer(dstRenderer) {}
6641 void(T::* PostCreateTMethod)(
Plugin& dstPlugin,
const char* srcPluginName, Util::ReasonsForAutoRename autoRenamedResult,
const char* preCreateCallbackReturnedName,
void*)>
6642 static PluginCopyParamsCreateDelegate from_method(T* pobject,
void* puserObj,
VRayRenderer* srcRenderer,
VRayRenderer* dstRenderer) {
6643 return PluginCopyParamsCreateDelegate(pobject, &method_stubPre<T, PreCreateTMethod>, &method_stubPost<T, PostCreateTMethod>, puserObj, srcRenderer, dstRenderer);
6646 static PluginCopyParamsCreateDelegate from_function(tfuncPre pfuncPre, tfuncPost pfuncPost,
void* puserObj,
VRayRenderer* srcRenderer,
VRayRenderer* dstRenderer) {
6647 return PluginCopyParamsCreateDelegate(pfuncPre, pfuncPost, puserObj, srcRenderer, dstRenderer);
6651 Plugin srcPlugin = srcRenderer->getPlugin_internal(srcPluginID);
6652 return pobject ? (*pmethodPre.pstubPre)(pobject, *dstRenderer, srcPlugin, puserObj) : (*pmethodPre.pfuncPre)(*dstRenderer, srcPlugin, puserObj);
6655 void operator()(
const InstanceId& dstPluginID,
const char* srcPluginName, Util::ReasonsForAutoRename autoRenamedResult,
const char* preCreateCallbackReturnedName)
const {
6656 Plugin dstPlugin = dstRenderer->getPlugin_internal(dstPluginID);
6657 pobject ? (*pmethodPost.pstubPost)(pobject, dstPlugin, srcPluginName, autoRenamedResult, preCreateCallbackReturnedName, puserObj) :
6658 (*pmethodPost.pfuncPost)(dstPlugin, srcPluginName, autoRenamedResult, preCreateCallbackReturnedName, puserObj);
6668 class PluginFilterDelegate {
6669 typedef bool (*tstub)(
void* pobject,
VRayRenderer& renderer,
const char* type, std::string& name,
void* userObj);
6670 typedef bool (*tfunc)(
VRayRenderer& renderer,
const char* type, std::string& name,
void* userObj);
6676 tmethod() : pstub() {}
6677 tmethod(tstub pstub) : pstub(pstub) {}
6678 tmethod(tfunc pfunc) : pfunc(pfunc) {}
6683 template <
class T,
bool (T::*TMethod)(VRayRenderer&, const
char* type, std::
string& name,
void* puserObj)>
6684 static bool method_stub(
void* pobject,
VRayRenderer& renderer,
const char* type, std::string& name,
void *puserObj) {
6685 T* p =
static_cast<T*
>(pobject);
6686 return (p->*TMethod)(renderer, type, name, puserObj);
6689 PluginFilterDelegate(tfunc pfunc,
void *puserObj,
VRayRenderer& renderer) : pobject(), pmethod(pfunc), puserObj(puserObj), renderer(renderer) {}
6690 PluginFilterDelegate(
void *pobject, tstub pstub,
void *puserObj,
VRayRenderer& renderer) : pobject(pobject), pmethod(pstub), puserObj(puserObj), renderer(renderer) {}
6693 template <
class T,
bool (T::*TMethod)(VRayRenderer&, const
char*, std::
string&,
void*)>
6694 static PluginFilterDelegate from_method(T* pobject,
void *puserObj,
VRayRenderer& renderer) {
6695 return PluginFilterDelegate(pobject, &method_stub<T, TMethod>, puserObj, renderer);
6698 static PluginFilterDelegate from_function(tfunc pfunc,
void *puserObj,
VRayRenderer& renderer) {
6699 return PluginFilterDelegate(pfunc, puserObj, renderer);
6702 bool operator()(
const char* type, std::string& name)
const {
6703 return pobject ? (*pmethod.pstub)(pobject, renderer, type, name, puserObj) : (*pmethod.pfunc)(renderer, type, name, puserObj);
6707 template<
class T,
void (T::*TMethod)(VRayRenderer&, RendererState oldState, RendererState newState,
double instant,
void* userData)>
6708 static void stateChangedCallbackT(
const Internal::StateChangedParams* params);
6709 static void stateChangedCallback(
const Internal::StateChangedParams* params);
6711 template<
class T,
void (T::*TMethod)(VRayRenderer&,
double instant,
void* userData)>
6712 static void rendererCloseCallbackT(
const Internal::CallbackParamsBase* params);
6713 static void rendererCloseCallback(
const Internal::CallbackParamsBase* params);
6715 template<
class T,
void (T::*TMethod)(VRayRenderer&, VRayImage* img,
unsigned long long changeIndex, ImagePassType pass,
double instant,
void* userData)>
6716 static void progressiveImageUpdatedCallbackT(
const Internal::ImageUpdatedParams* params);
6717 static void progressiveImageUpdatedCallback(
const Internal::ImageUpdatedParams* params);
6719 template<
class T,
void (T::*TMethod)(VRayRenderer& renderer, const
char* msg, MessageLevel level,
double instant,
void* userData)>
6720 static void logMessageCallbackT(
const Internal::LogMessageParams* params);
6721 static void logMessageCallback(
const Internal::LogMessageParams* params);
6723 template<
class T,
void (T::*TMethod)(VRayRenderer& renderer, const
char* msg,
int errorCode, LicenseUserStatus userStatus,
double instant,
void* userData)>
6724 static void licenseErrorCallbackT(
const Internal::LicenseErrorParams* params);
6725 static void licenseErrorCallback(
const Internal::LicenseErrorParams* params);
6727 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)>
6728 static void bucketInitCallbackT(
const Internal::BucketInitParams* params);
6729 static void bucketInitCallback(
const Internal::BucketInitParams* params);
6731 template<
class T,
void (T::*TMethod)(VRayRenderer& renderer,
int x,
int y, const
char* host, VRayImage* image, ImagePassType pass,
double instant,
void* userData)>
6732 static void bucketReadyCallbackT(
const Internal::BucketReadyParams* params);
6733 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)>
6734 static void bucketReadyCallback1T(
const Internal::BucketReadyParams* params);
6735 static void bucketReadyCallback(
const Internal::BucketReadyParams* params);
6736 static void bucketReadyCallback1(
const Internal::BucketReadyParams* params);
6738 template<
class T,
void (T::*TMethod)(VRayRenderer&, const
char* msg,
int elementNumber,
int elementsCount,
double instant,
void* userData)>
6739 static void progressCallbackT(
const Internal::ProgressParams* params);
6740 static void progressCallback(
const Internal::ProgressParams* params);
6742 template<
class T,
void (T::*TMethod)(VRayRenderer&, const
char* propName,
double instant,
void* userData)>
6743 static void renderViewChangedCallbackT(
const Internal::RenderViewChangedParams* params);
6744 static void renderViewChangedCallback(
const Internal::RenderViewChangedParams* params);
6746 template<
class T,
void (T::*TMethod)(VRayRenderer&,
bool isRendering,
double instant,
void* userData)>
6747 static void vfbRenderLastCallbackT(
const Internal::RenderLastParams* params);
6748 static void vfbRenderLastCallback(
const Internal::RenderLastParams* params);
6750 template<
class T,
void (T::*TMethod)(VRayRenderer&, const
char* hostName,
double instant,
void* userData)>
6751 static void drHostConnectedCallbackT(
const Internal::ConnectParams* params);
6752 static void drHostConnectedCallback(
const Internal::ConnectParams* params);
6754 template<
class T,
void(T::*TMethod)(VRayRenderer&,
int commandId,
int x,
int y,
void* userData)>
6755 static void vfbContextMenuSelectedCallbackT(
const Internal::VFBContextMenuSelectedParams* params);
6756 static void vfbContextMenuSelectedCallback(
const Internal::VFBContextMenuSelectedParams* params);
6759 enum class VFBSourceButton :
int {
6761 InteractiveRendering = 1,
6766 static void vfbCameraSelectionCallback(
const Internal::VFBRenderCameraSelectedParams* params);
6767 template<
class T,
void(T::*TMethod)(VRayRenderer&,
int itemId, VFBSourceButton sourceButton,
void* userData)>
6768 static void vfbCameraSelectionCallbackT(
const Internal::VFBRenderCameraSelectedParams* params);
6770 static char* pluginFilterCallback(
const char* pluginType,
const char* pluginName,
void* userObject);
6771 static void deleteTempStringCallback(
char*,
size_t, std::string* str);
6774 template<
class T,
void(T::*TMethod)(VRayRenderer&, VRayImage* img,
void* userData)>
6775 static void manualDenoiseCallbackT(
VRayImage* img,
void* info);
6776 static void manualDenoiseCallback(
VRayImage* img,
void* info);
6778 template<
class T,
int(T::*TMethod)(VRayRenderer&, const std::vector<LightMixChange>& lightMixChanges,
double instant,
void* userData)>
6779 static int lightMixTransferToSceneCallbackT(Internal::LightMixCallbackParams* params);
6780 static int lightMixTransferToSceneCallback(Internal::LightMixCallbackParams* params);
6781 void transferToScenePreCallback(std::vector<LightMixChange>& changes,
const Internal::LightMixCallbackParams* params);
6782 void transferToScenePostCallback(
const std::vector<LightMixChange>& changes, Internal::LightMixCallbackParams* params);
6784 template<
class T,
int(T::*TMethod)(VRayRenderer&, const std::vector<std::
string>& fileList,
double instant,
void* userData)>
6785 static int uploadToCollaborationCallbackT(Internal::UploadToCollaborationParams* params);
6786 static int uploadToCollaborationCallback(Internal::UploadToCollaborationParams* params);
6787 void uploadToCollaborationPreCallback(std::vector<std::string>& fileList,
const Internal::UploadToCollaborationParams* params);
6789 template<
class T,
int(T::*TMethod)(VRayRenderer&, const std::vector<std::
string>& fileList,
double instant,
void* userData)>
6790 static int enhanceOnCollaborationCallbackT(Internal::UploadToCollaborationParams* params);
6791 static int enhanceOnCollaborationCallback(Internal::UploadToCollaborationParams* params);
6792 void enhanceOnCollaborationPreCallback(std::vector<std::string>& fileList,
const Internal::UploadToCollaborationParams* params);
6794 template<
class T,
void(T::*TMethod)(VRayRenderer&,
int imageLoaded,
int enhanceSupported,
double instant,
void* userData)>
6795 static void collaborationImageChangeCallbackT(
const Internal::VFBCollaborationImageParams* params);
6796 static void collaborationImageChangeCallback(
const Internal::VFBCollaborationImageParams* params);
6798 template<
class T,
void (T::* TMethod)(VRayRenderer&,
int enabled,
int mode,
int selectionLocked,
double instant,
void* userData)>
6799 static void debugShadingCallbackT(
const Internal::DebugShadingCallbackParams* params);
6800 static void debugShadingCallback(
const Internal::DebugShadingCallbackParams* params);
6802 template<
class T,
void(T::*TMethod)(VRayRenderer&, const std::
string &outputFile,
int fileType,
double instant,
void* userData)>
6803 static void vrayProfilerWriteCallbackT(
const Internal::VRayProfilerWriteParams* params);
6804 static void vrayProfilerWriteCallback(
const Internal::VRayProfilerWriteParams* params);
6806 template<
class T,
bool (T::*TMethod)(VRayRenderer&, VFBRenderElementType type,
double instant,
void* userData)>
6807 static int vfbAddRenderElementToSceneT(
const Internal::AddRenderElementToSceneParams* params);
6808 static int vfbAddRenderElementToScene(
const Internal::AddRenderElementToSceneParams* params);
6810 template<
class T,
void (T::*TMethod)(VRayRenderer&, VFBMouseButton button,
int x,
int y,
bool ctrl,
bool shift,
void* userData)>
6811 static void vfbClickT(
const Internal::VFBClickParams* params);
6812 static void vfbClick(
const Internal::VFBClickParams* params);
6815 typedef void* InstanceHandleType;
6821 Internal::VRayRendererNative *rendererNative;
6827 VFB() : autoCommit(
true),
6828 layerManager(*
this),
6829 historyManager(*
this),
6830 toolbarManager(*
this) {}
6832 VFB& operator=(
const VFB&);
6837 void show(
bool show,
bool setFocus =
true);
6873 VFBState*
getState(
size_t& dataSize,
bool includeMain =
true,
bool includeHistory =
true)
const;
6882 void setState(
const void* vfbStateData,
size_t dataSize,
bool setMain =
true,
bool setHistory =
true);
7233 if (&myLayerManager == &rhs.myLayerManager) {
7234 layerUID = rhs.layerUID;
7240 bool operator==(
const Layer& rhs)
const {
7241 return layerUID == rhs.layerUID && &myLayerManager == &rhs.myLayerManager;
7244 Layer(
const int& layerUID,
const LayerManager& layerManager) :
7245 layerUID(layerUID), myLayerManager(layerManager){
7248 void invalidateLayer()
const {
7249 layerUID = NO_LAYER_ID;
7252 const LayerManager& myLayerManager;
7253 mutable LayerUID layerUID;
7442 void* original = errMsgHandle.exchange(
nullptr);
7444 Internal::releaseCharString(&original);
7450 void* original = (
void*)errMsgHandle;
7451 return Internal::getCharStringContent(&original);
7456 Internal::VRayRendererNative* getNativeRenderer()
const {
7457 return myVfb.rendererNative;
7461 void handleError(
void*& errorMsgHandlePtr,
const bool throwException =
true)
const {
7462 const char* errstr =
nullptr;
7463 if (throwException) {
7464 errstr = Internal::getCharStringContent(&errorMsgHandlePtr);
7466 void* oldErr = errMsgHandle.exchange(errorMsgHandlePtr);
7467 Internal::releaseCharString(&oldErr);
7468 if (throwException) {
7469 throw VFBLayerErr(errstr);
7473 void handleError(
void*& errorMsgHandlePtr,
const bool throwException =
false)
const {
7474 void* oldErr = errMsgHandle.exchange(errorMsgHandlePtr);
7475 Internal::releaseCharString(&oldErr);
7479 void getLayerListAndReleaseIDs(std::vector<Layer>& layers, LayerUID*& layerIDs,
const int len)
const {
7480 layers.reserve(len);
7481 for (
int i = 0; i < len; i++) {
7482 layers.push_back(Layer(layerIDs[i], *
this));
7484 Internal::C_memory_free(layerIDs);
7487 static void getStringListAndReleaseCharStars(std::vector<std::string>& words,
char*& cStyleWords,
const int len) {
7489 const char* curr = cStyleWords;
7490 for (
int i = 0; i < len; i++) {
7491 words.emplace_back(curr);
7492 curr += words[i].size() + 1;
7494 Internal::C_memory_free(cStyleWords);
7497 Layer getCommonLayer(
int (*layerLoader)(Internal::VRayRendererNative* renderer, LayerUID* layerID,
void** errorMsgHandlePtr))
const {
7498 LayerUID layerID = NO_LAYER_ID;
7499 void* errorMsgHandlePtr =
nullptr;
7500 int err = layerLoader(myVfb.rendererNative, &layerID, &errorMsgHandlePtr);
7502 handleError(errorMsgHandlePtr);
7503 return Layer(NO_LAYER_ID, *
this);
7505 return Layer(layerID, *
this);
7509 const VRayRenderer::VFB& myVfb;
7510 mutable std::atomic<void*> errMsgHandle;
7559 Internal::VRayRendererNative* getNativeRenderer()
const {
7560 return myVfb.rendererNative;
7708 Internal::VRayRendererNative* getNativeRenderer()
const {
7709 return myVfb.rendererNative;
7737 VRAY_DEPRECATED(
"getWindowHandle in unsafe and deprecated - use getNativeHandle or getQWidget instead")
7738 void* getWindowHandle() const;
7745 NativeWidgetHandle getNativeHandle() const;
7748 APPSDK_QT_NAMESPACE::QWidget* getQWidget() const;
7754 VRAY_DEPRECATED("setParentWindow in unsafe and deprecated - use setNativeParentWindow or setQWidgetParent instead")
7755 void setParentWindow(
void* hWnd);
7762 void setNativeParentWindow(NativeWindowHandle handle);
7766 void setQWidgetParent(APPSDK_QT_NAMESPACE::QWidget* parentWidget);
7772 bool getMinimumSize(
int& w,
int& h) const;
7777 bool loadColorCorrectionsPreset(const
char* filename);
7780 bool loadColorCorrectionsPreset(const std::
string& filename);
7785 bool saveColorCorrectionsPreset(const
char* filename) const;
7788 bool saveColorCorrectionsPreset(const std::
string& filename) const;
7793 bool setTitlePrefix(const
char* prefix);
7796 bool setTitlePrefix(const std::
string& prefix);
7801 bool setProjectPath(const
char *projectPath);
7804 bool setProjectPath(const std::
string& projectPath);
7808 void enableProgressBar(
bool enable = true);
7813 void setProgressText(const
char* text);
7816 void setProgressText(const std::
string& text);
7821 void setProgressValue(
float value = -1.0f);
7827 void setProgressTextAndValue(const
char* text,
float value);
7830 void setProgressTextAndValue(const std::
string& text,
float value);
7836 bool fillSettingsVFB(const
char* instanceName =
nullptr);
7839 bool fillSettingsVFB(const std::
string& instanceName);
7844 bool applySettingsVFB();
7849 bool loadImage(const
char* filename);
7852 bool loadImage(const std::
string& filename);
7856 bool saveImage(const
char* fileName) const;
7859 bool saveImage(const std::
string& fileName) const;
7874 void setUpdateAvailable(
bool available);
7879 void logMessage(MessageLevel level, const
char* message);
7882 void logMessage(MessageLevel level, const std::
string& message);
7889 void appendAdditionalStyleSheet(const
char *styleSheet);
7894 RENDER_MODE_PRODUCTION = -1,
7895 RENDER_MODE_INTERACTIVE = 0,
7896 RENDER_MODE_INTERACTIVE_CUDA = 4,
7897 RENDER_MODE_INTERACTIVE_OPTIX = 7,
7898 RENDER_MODE_INTERACTIVE_METAL = 8,
7899 RENDER_MODE_INTERACTIVE_METALRT = 9,
7900 RENDER_MODE_PRODUCTION_CUDA = 104,
7901 RENDER_MODE_PRODUCTION_OPTIX = 107,
7902 RENDER_MODE_PRODUCTION_METAL = 108,
7903 RENDER_MODE_PRODUCTION_METALRT = 109,
7910 static bool isActiveState(RendererState value) {
return !isInactiveState(value); }
7915 return Internal::VRay_VRayRenderer_halfResolutionMode
7916 (getNativeRenderer());
7919 LicenseError licErr;
7920 PluginTypeId* pluginTypeIds;
7921 int pluginTypeIdsCount;
7923 void createInstance(
const Internal::RendererOptions_internal* options);
7924 int findPluginIdIndex(PluginTypeId typeId)
const;
7951 operator bool()
const;
8077 const char* propName;
8084 const char* vstring;
8094 const char* camName;
8104 const char* lightName;
8109 enum UserSceneManipType { USMType_Transform_Set = 0, USMType_Show = 1, USMType_Hide = 2 };
8111 enum UserSceneNodeObjectType { USNOType_Node = 0, USNOType_Camera = 1, USNOType_Light = 2 };
8118 const char* objName;
8120 UserSceneManipType umt;
8122 UserSceneNodeObjectType objType;
8243 bool setImageSize(
int width,
int height,
bool resetCropRegion =
true,
bool resetRenderRegion =
true);
8257 bool getCropRegion(
int& srcWidth,
int& srcHeight,
float& rgnLeft,
float& rgnTop,
float& rgnWidth,
float& rgnHeight)
const;
8271 bool setCropRegion(
int srcWidth,
int srcHeight,
float rgnLeft,
float rgnTop,
float rgnWidth,
float rgnHeight);
8290 int load(
const std::string& fileName);
8312 template<
typename T =
void>
8313 int loadAsText(
const char* text,
size_t length,
void(*freeFn)(
char* text,
size_t size, T* holderObject) =
nullptr, T* holderObject =
nullptr);
8319 int append(
const char* fileName,
bool drSendNameOnly =
false);
8322 int append(
const std::string& fileName,
bool drSendNameOnly =
false);
8329 int append(
const std::vector<const char*> &fileNames);
8332 int append(
const std::vector<std::string> &fileNames);
8362 template<
typename T =
void>
8363 int appendAsText(
const char* text,
size_t length,
void(*freeFn)(
char* text,
size_t size, T* holderObject) =
nullptr, T* holderObject =
nullptr);
8374 int loadFiltered(
const char* fileName,
bool (*callback)(
VRayRenderer&,
const char* pluginType, std::string& pluginName,
void*),
const void* userData =
nullptr);
8377 int loadFiltered(
const std::string& fileName,
bool(*callback)(
VRayRenderer&,
const char* pluginType, std::string& pluginName,
void*),
const void* userData =
nullptr);
8390 template<
class T,
bool (T::*TMethod)(VRayRenderer&, const
char* pluginType, std::
string& pluginName,
void*)>
8391 int loadFiltered(
const char* fileName, T& obj,
const void* userData =
nullptr);
8394 template<
class T,
bool (T::*TMethod)(VRayRenderer&, const
char* pluginType, std::
string& pluginName,
void*)>
8395 int loadFiltered(
const std::string& fileName, T& obj,
const void* userData =
nullptr);
8406 int appendFiltered(
const char* fileName,
bool(*callback)(
VRayRenderer&,
const char* pluginType, std::string& pluginName,
void*),
const void* userData =
nullptr);
8409 int appendFiltered(
const std::string& fileName,
bool(*callback)(
VRayRenderer&,
const char* pluginType, std::string& pluginName,
void*),
const void* userData =
nullptr);
8422 template<
class T,
bool (T::*TMethod)(VRayRenderer&, const
char* pluginType, std::
string& pluginName,
void*)>
8426 template<
class T,
bool (T::*TMethod)(VRayRenderer&, const
char* pluginType, std::
string& pluginName,
void*)>
8427 int appendFiltered(
const std::string& fileName, T& obj,
const void* userData =
nullptr);
8441 template<
class T,
bool (T::*TMethod)(VRayRenderer&, const
char* pluginType, std::
string& pluginName,
void*)>
8442 int appendFiltered(
const std::vector<const char*> &fileNames, T& obj,
const void* userData =
nullptr);
8445 template<
class T,
bool (T::*TMethod)(VRayRenderer&, const
char* pluginType, std::
string& pluginName,
void*)>
8446 int appendFiltered(
const std::vector<std::string> &fileNames, T& obj,
const void* userData =
nullptr);
8458 int appendFiltered(
const std::vector<const char*> &fileNames,
bool(*callback)(
VRayRenderer&,
const char* pluginType, std::string& pluginName,
void*),
const void* userData =
nullptr);
8461 int appendFiltered(
const std::vector<std::string> &fileNames,
bool(*callback)(
VRayRenderer&,
const char* pluginType, std::string& pluginName,
void*),
const void* userData =
nullptr);
8466 int loadAsTextFiltered(
const char* fileName,
bool(*callback)(
VRayRenderer&,
const char* pluginType, std::string& pluginName,
void*),
const void* userData =
nullptr);
8469 int loadAsTextFiltered(
const std::string& fileName,
bool(*callback)(
VRayRenderer&,
const char* pluginType, std::string& pluginName,
void*),
const void* userData =
nullptr);
8473 template<
class T,
bool (T::*TMethod)(VRayRenderer&, const
char* pluginType, std::
string& pluginName,
void*)>
8477 template<
class T,
bool (T::*TMethod)(VRayRenderer&, const
char* pluginType, std::
string& pluginName,
void*)>
8489 template<
class T,
bool (T::*TMethod)(VRayRenderer&, const
char* pluginType, std::
string& pluginName,
void*)>
8493 template<
class T,
bool (T::*TMethod)(VRayRenderer&, const
char* pluginType, std::
string& pluginName,
void*)>
8508 template<
class T,
bool (T::*TMethod)(VRayRenderer&, const
char* pluginType, std::
string& pluginName,
void*)>
8512 template<
class T,
bool (T::*TMethod)(VRayRenderer&, const
char* pluginType, std::
string& pluginName,
void*)>
8525 int appendAsTextFiltered(
const std::vector<const char*> &sceneTexts,
bool(*callback)(
VRayRenderer&,
const char* pluginType, std::string& pluginName,
void*),
const void* userData =
nullptr);
8528 int appendAsTextFiltered(
const std::vector<std::string> &sceneTexts,
bool(*callback)(
VRayRenderer&,
const char* pluginType, std::string& pluginName,
void*),
const void* userData =
nullptr);
8600 AddHostsResult
addHosts(
const std::string& hosts)
const;
8632 unsigned long long commit(
bool force =
false);
8701 AwaitingOrIdle = -1,
8745 template <
class T,
class RetT = T> std::vector<RetT>
getPlugins()
const;
8748 std::vector<Plugin>
getPlugins(
const char* pluginClassName)
const;
8751 std::vector<Plugin>
getPlugins(
const std::string& pluginClassName)
const;
8863 template<
class T,
void (T::*TMethod)(VRayRenderer&, RendererState oldState, RendererState newState,
double instant,
void* userData)>
8872 template<
class T,
void (T::*TMethod)(VRayRenderer&,
double instant,
void* userData)>
8884 template<
class T,
void (T::*TMethod)(VRayRenderer&, VRayImage* img,
unsigned long long changeIndex, ImagePassType pass,
double instant,
void* userData)>
8893 void setOnLogMessage(
void(*callback)(
VRayRenderer&,
const char* msg, MessageLevel level,
double instant,
void* userData), MessageLevel minLevel=MessageInfo,
const void* userData =
nullptr);
8895 template<
class T,
void (T::*TMethod)(VRayRenderer& renderer, const
char* msg, MessageLevel level,
double instant,
void* userData)>
8896 void setOnLogMessage(T&
object, MessageLevel minLevel = MessageInfo,
const void* userData =
nullptr);
8905 void setOnLicenseError(
void(*callback)(
VRayRenderer&,
const char* msg,
int errorCode, LicenseUserStatus userStatus,
double instant,
void* userData),
const void* userData =
nullptr);
8907 template<
class T,
void (T::*TMethod)(VRayRenderer& renderer, const
char* msg,
int errorCode, LicenseUserStatus userStatus,
double instant,
void* userData)>
8920 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 =
nullptr);
8922 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)>
8936 template<
class T,
void (T::*TMethod)(VRayRenderer&,
int x,
int y, const
char* host, VRayImage* img, ImagePassType pass,
double instant,
void* userData)>
8949 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 =
nullptr);
8951 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)>
8966 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 =
nullptr);
8968 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)>
8979 void setOnProgress(
void(*callback)(
VRayRenderer&,
const char* msg,
int elementNumber,
int elementsCount,
double instant,
void* userData),
const void* userData =
nullptr);
8981 template<
class T,
void (T::*TMethod)(VRayRenderer&, const
char* msg,
int elementNumber,
int elementsCount,
double instant,
void* userData)>
8991 template<
class T,
void (T::*TMethod)(VRayRenderer&, const
char* propName,
double instant,
void* userData)>
9001 template<
class T,
void (T::*TMethod)(VRayRenderer&,
bool isRendering,
double,
void* userData)>
9011 template<
class T,
void (T::*TMethod)(VRayRenderer&,
bool isRendering,
double instant,
void* userData)>
9020 template<
class T,
void (T::*TMethod)(VRayRenderer&,
double instant,
void* userData)>
9029 template<
class T,
void (T::*TMethod)(VRayRenderer&,
double instant,
void* userData)>
9039 template<
class T,
void (T::*TMethod)(VRayRenderer&,
double instant,
void* userData)>
9048 template<
class T,
void (T::*TMethod)(VRayRenderer&,
double instant,
void* userData)>
9058 template<
class T,
void (T::*TMethod)(VRayRenderer&, const
char* hostName,
double instant,
void* userData)>
9068 template<
class T,
void (T::*TMethod)(VRayRenderer&, const
char* hostName,
double instant,
void* userData)>
9077 template<
class T,
void (T::*TMethod)(VRayRenderer&,
double instant,
void* userData)>
9085 template<
class T,
void (T::*TMethod)(VRayRenderer&,
double instant,
void* userData)>
9108 template<
class T,
void (T::*TMethod)(VRayRenderer&,
int enabled,
int mode,
int selectionLocked,
double instant,
void* userData)>
9119 template<
class T,
void(T::*TMethod)(VRayRenderer&,
int commandId,
int x,
int y,
void* userData)>
9127 template<
class T,
void (T::*TMethod)(VRayRenderer&,
double instant,
void* userData)>
9138 template<
class T,
int(T::*TMethod)(VRayRenderer&, const std::vector<LightMixChange>& lightMixChanges,
double instant,
void* userData)>
9149 template<
class T,
int(T::*TMethod)(VRayRenderer&, const std::vector<std::
string>& fileList,
double instant,
void* userData)>
9160 template<
class T,
int(T::*TMethod)(VRayRenderer&, const std::vector<std::
string>& fileList,
double instant,
void* userData)>
9171 template<
class T,
void (T::*TMethod)(VRayRenderer&,
int imageLoaded,
int enhanceSupported,
double instant,
void* userData)>
9182 template<
class T,
void (T::*TMethod)(VRayRenderer&,
bool isRendering,
double instant,
void* userData)>
9193 template<
class T,
void (T::*TMethod)(VRayRenderer&,
bool isRendering,
double instant,
void* userData)>
9205 template<
class T,
bool (T::*TMethod)(VRayRenderer&, VFBRenderElementType type,
double instant,
void* userData)>
9216 void setOnVFBClick(
void(*callback)(
VRayRenderer&, VFBMouseButton button,
int x,
int y,
bool ctrl,
bool shift,
void* userData),
const void* userData =
nullptr);
9218 template<
class T,
void (T::* TMethod)(VRayRenderer&, VFBMouseButton button,
int x,
int y,
bool ctrl,
bool shift,
void* userData)>
9240 void setVFBCameraSelectionItems(
const std::vector<std::string>& items);
9249 template<
class T,
void(T::*TMethod)(VRayRenderer&,
int itemId, VFBSourceButton sourceButton,
void* userData)>
9280 VRAY_DEPRECATED(
"Use setProgressiveImageUpdatedHasBuffer instead")
9281 void setProgresiveImageUpdatedHasBuffer(
bool hasBuffer) {
9282 setProgressiveImageUpdatedHasBuffer(hasBuffer);
9285 VRAY_DEPRECATED(
"Use getProgressiveImageUpdatedHasBuffer instead")
9286 bool getProgresiveImageUpdatedHasBuffer()
const {
9287 return getProgressiveImageUpdatedHasBuffer();
9305 bool hasAlpha =
true,
9306 bool flipImage =
false
9323 template<
class T> T
getPlugin(
const char *pluginName)
const;
9326 template<
class T> T
getPlugin(
const std::string &pluginName)
const;
9359 template<
class T> T
newPlugin(
const std::string& pluginName);
9423 std::vector<PickedPluginInfo>
pickPlugins(
double x,
double y,
int maxcount = 0,
int timeout = -1)
const;
9602 template<
class T,
void (T::*TMethod)(VRayRenderer&, VRayImage*,
void*)>
9603 bool denoiseNow(T&
object,
bool shouldPassImage =
true,
const void* userData =
nullptr);
9670 } profiler{ *
this };
9709 template<
class T,
void(T::*TMethod)(VRayRenderer&, const std::
string &outputFile,
int fileType,
double instant,
void* userData)>
9717 Internal::VRayRendererNative* getNativeRenderer()
const;
9718 static VRayRenderer* getVRayRenderer(
void* rendererNative);
9720 InstanceId getPluginId_internal(
const char* pluginName, PluginTypeId& outTypeId)
const;
9721 PluginTypeId getPluginTypeId_internal(
const char* pluginType)
const;
9722 PluginTypeId getPluginTypeId_internal(InstanceId pluginID)
const;
9723 const char* getPluginTypeString(PluginTypeId pluginTypeId)
const;
9724 Plugin getPlugin_internal(InstanceId pluginID)
const;
9725 template<
class T> T getPlugin_internal(InstanceId pluginID)
const;
9726 const char* getPluginName_internal(InstanceId pluginID)
const;
9727 bool pluginExists_internal(InstanceId pluginID)
const;
9729 int getPropertyIndexFromName(InstanceId pluginID,
const char* propertyName)
const;
9730 const char* getPropertyNameFromIndex(InstanceId pluginID,
int idx)
const;
9731 template<
class T>
static std::vector<T> getPluginsOfType(
VRayRenderer& renderer,
const char* pluginType);
9732 template<
class T>
static std::vector<T> getPluginsOfTypeId(
VRayRenderer& renderer, PluginTypeId typeId);
9733 static std::vector<std::string> getStringVector(
void *pvector);
9734 static std::vector<const char*> getCharPtrVector(
const std::vector<std::string> &strVector);
9735 std::vector<std::string> getPluginPropertyNames(
const char* pluginClassName)
const;
9736 const char* getPluginType(
const char* name)
const;
9737 const char* getPluginType(InstanceId pluginID)
const;
9738 bool setPluginName(InstanceId pluginID,
const char* name)
const;
9739 Type getPluginPropertyRuntimeType(
const char* pluginName,
const char* propertyName)
const;
9740 Type getPluginPropertyRuntimeType(InstanceId pluginID,
const char* propertyName)
const;
9741 int getPluginPropertyElementsCount(InstanceId pluginID,
const char* propertyName)
const;
9742 const void* getPluginPropertyDefinition(
const char* pluginName,
const char* propertyName)
const;
9743 const void* getPluginPropertyDefinition(InstanceId pluginID,
const char* propertyName)
const;
9744 const void* getPluginPropertyDefinitionFromClass(
const char* pluginClassName,
const char* propertyName)
const;
9745 std::string getPluginPropertyValueAsString(
const char* pluginName,
const char* propertyName,
double time)
const;
9746 std::string getPluginPropertyValueAsString(InstanceId pluginID,
const char* propertyName,
bool& ok,
double time)
const;
9747 bool setPluginPropertyValueAsString(InstanceId pluginID,
const char* propertyName,
const char* value)
const;
9748 bool setPluginPropertyValueAsStringAtTime(InstanceId pluginID,
const char* propertyName,
const char* value,
double time)
const;
9749 bool getPluginPropertyBool(
const char* pluginName,
const char* propertyName,
bool& ok,
double time)
const;
9750 bool getPluginPropertyBool(InstanceId pluginID,
const char* propertyName,
bool& ok,
double time)
const;
9751 int getPluginPropertyInt(
const char* pluginName,
const char* propertyName,
bool& ok,
double time)
const;
9752 int getPluginPropertyInt(InstanceId pluginID,
const char* propertyName,
bool& ok,
double time)
const;
9753 float getPluginPropertyFloat(
const char* pluginName,
const char* propertyName,
bool& ok,
double time)
const;
9754 float getPluginPropertyFloat(InstanceId pluginID,
const char* propertyName,
bool& ok,
double time)
const;
9755 double getPluginPropertyDouble(InstanceId pluginID,
const char* propertyName,
bool& ok,
double time)
const;
9756 Color getPluginPropertyColor(
const char* pluginName,
const char* propertyName,
bool& ok,
double time)
const;
9757 Color getPluginPropertyColor(InstanceId pluginID,
const char* propertyName,
bool& ok,
double time)
const;
9758 AColor getPluginPropertyAColor(
const char* pluginName,
const char* propertyName,
bool& ok,
double time)
const;
9759 AColor getPluginPropertyAColor(InstanceId pluginID,
const char* propertyName,
bool& ok,
double time)
const;
9760 Vector getPluginPropertyVector(
const char* pluginName,
const char* propertyName,
bool& ok,
double time)
const;
9761 Vector getPluginPropertyVector(InstanceId pluginID,
const char* propertyName,
bool& ok,
double time)
const;
9762 Matrix getPluginPropertyMatrix(
const char* pluginName,
const char* propertyName,
bool& ok,
double time)
const;
9763 Matrix getPluginPropertyMatrix(InstanceId pluginID,
const char* propertyName,
bool& ok,
double time)
const;
9764 Transform getPluginPropertyTransform(
const char* pluginName,
const char* propertyName,
bool& ok,
double time)
const;
9765 Transform getPluginPropertyTransform(InstanceId pluginID,
const char* propertyName,
bool& ok,
double time)
const;
9766 PluginRef getPluginPropertyPluginRef(InstanceId pluginID,
const char* propertyName,
bool& ok,
double time)
const;
9767 Value getPluginPropertyValue(InstanceId pluginID,
const char* propertyName,
bool& ok,
double time)
const;
9768 template<
typename T> T getPluginPropertyTyped(InstanceId pluginID,
const char* propertyName,
bool& ok,
double time)
const;
9769 int getPropertyState(InstanceId pluginID,
const char* propertyName)
const;
9770 int getKeyframeTimes(InstanceId pluginID,
const char* propertyName,
double* ×)
const;
9771 bool setPluginPropertyValueAtTime(InstanceId pluginID,
const char* propertyName,
const void *pval,
double time)
const;
9772 bool setPluginPropertyValueRawAtTime(InstanceId pluginID,
const char* propertyName,
const void *pval,
size_t count,
double time)
const;
9773 bool setPluginUpdatedDefaultProperties(InstanceId pluginID)
const;
9775#ifdef VRAY_SDK_INTEROPERABILITY
9776 bool getPluginPropertyValueSDKInterop(InstanceId pluginID,
const char* propertyName,
void *pval,
int type)
const;
9777 bool getPluginPropertyValueAtTimeSDKInterop(InstanceId pluginID,
const char* propertyName,
void *pval,
int type,
double time)
const;
9778 bool setPluginPropertyValueSDKInterop(InstanceId pluginID,
const char* propertyName,
const void* pval,
int type)
const;
9779 bool setPluginPropertyValueAtTimeSDKInterop(InstanceId pluginID,
const char* propertyName,
const void* pval,
int type,
double time)
const;
9782 Plugin newRenderElementPlugin(
int type,
const char *instanceName,
const char *displayName);
9783 Plugin getRenderElementPlugin(
int type)
const;
9784 std::vector<Plugin> getRenderElementPluginsList(
int type)
const;
9785 bool getRenderElementInfo(InstanceId pluginID,
int type,
RenderElement::Info& chInfo)
const;
9786 size_t getRenderElementData(
9787 InstanceId pluginID,
9788 InstanceId alphaPluginID,
9797 size_t getRenderElementDataIntoBuffer(
9798 InstanceId pluginID,
9799 InstanceId alphaPluginID,
9809 VRayImage* getRenderElementAsImage(InstanceId pluginID,
int type,
int layer,
const GetImageOptions &options,
const bool isDoColorCorrectionsUSerSet =
false)
const;
9810 std::string getRenderElementMetadata(InstanceId pluginID,
int type)
const;
9819 eventName(eventName),
9820 threadIndex(threadIndex) {
9821 if (renderer.profiler.isManual()) {
9822 renderer.profiler.startDurationEvent(eventName.c_str(), threadIndex);
9827 if (renderer.profiler.isManual()) {
9828 renderer.profiler.endDurationEvent(eventName.c_str(), threadIndex);
9834 std::string eventName;
9851 template<
class T, Plugin(T::* TMethod)(VRayRenderer&, const
char* assetId, Vector importPosition,
void* userData)>
9852 static InstanceId importScatterPresetCallbackT(
const char* assetId,
Vector* importPosition,
void* info);
9853 static InstanceId importScatterPresetCallback(
const char* assetId,
Vector* importPosition,
void* info);
9882 template<
class T, Plugin(T::* TMethod)(VRayRenderer&, const
char* assetId, Vector importPosition,
void* userData)>
10048 enum GPUParamSupport {
10049 GPUParamSupport_Full,
10050 GPUParamSupport_Partial,
10051 GPUParamSupport_None,
10052 GPUParamSupport_Unknown,
10055 inline std::ostream& operator <<(std::ostream& stream,
const GPUParamSupport val) {
10057 case GPUParamSupport_Full:
10060 case GPUParamSupport_Partial:
10061 stream <<
"Partial";
10063 case GPUParamSupport_None:
10067 stream <<
"Unknown";
10076 const void* pParamDef;
10079 UIGuides(
const void* pParamDef) : pParamDef(pParamDef) {}
10081 const void* getParamDef()
const {
10219 PartOf3dsMaxTriple = 8,
10240 UIGuides& operator=(
const UIGuides& uiGuides) {
10241 pParamDef = uiGuides.pParamDef;
10368 const Internal::VRayRendererNative* renderer;
10371 RuntimeUIGuides(
const void* pParamDef,
const Internal::VRayRendererNative* renderer, InstanceId
id) :
10372 UIGuides(pParamDef), renderer(renderer), id(
id) {}
10389 const void* pParamDef;
10390 GPUParamSupport gpuSupport;
10394 pParamDef = pRenderer->getPluginPropertyDefinitionFromClass(pluginClassName, propertyName);
10395 gpuSupport = (GPUParamSupport)Internal::VRay_PluginUtils_getPropertyGpuSupport(pRenderer->getNativeRenderer(), pluginClassName, pParamDef);
10400 : pParamDef(propertyMeta.pParamDef), gpuSupport(propertyMeta.gpuSupport) {}
10403 pParamDef = propertyMeta.pParamDef;
10404 gpuSupport = propertyMeta.gpuSupport;
10409 std::swap(pParamDef, propertyMeta.pParamDef);
10410 std::swap(gpuSupport, propertyMeta.gpuSupport);
10414 operator bool ()
const {
10415 return !!pParamDef;
10420 return Internal::VRay_PluginUtils_getPropertyElementsCount(pParamDef);
10425 return Internal::VRay_PluginUtils_getPropertyName(pParamDef);
10434 return Internal::VRay_PluginUtils_getPropertyType(pParamDef);
10439 return Internal::VRay_PluginUtils_getPropertyElementType(pParamDef);
10449 const char*
const description = Internal::VRay_PluginUtils_getPropertyDescription(pParamDef);
10450 return description ? description :
"";
10455 return Internal::VRay_PluginUtils_getPropertyDeprecation(pParamDef);
10461 const char*
const uiGuides = Internal::VRay_PluginUtils_getPropertyUIGuides(pParamDef);
10462 return uiGuides ? uiGuides :
"";
10470 static const char* typeToString(
const Type type);
10472 const char* getTypeAsString()
const {
10473 return typeToString(
getType());
10491 :
PropertyMeta(plugin.pRenderer, plugin.
getType(), propertyName), renderer(plugin.pRenderer), id(plugin.id()) {
10496 :
PropertyMeta(propertyRuntimeMeta), renderer(propertyRuntimeMeta.renderer), id(propertyRuntimeMeta.id) {
10500 PropertyMeta::operator=(propertyRuntimeMeta);
10501 renderer = propertyRuntimeMeta.renderer;
10502 id = propertyRuntimeMeta.id;
10508 return renderer->getPluginPropertyElementsCount(
id, getName());
10513 return renderer->getPluginPropertyRuntimeType(
id, getName());
10516 const char* getRuntimeTypeAsString()
const {
10517 return typeToString(getRuntimeType());
10520 void swap(PropertyRuntimeMeta &propertyRuntimeMeta)
noexcept {
10521 PropertyMeta::swap(propertyRuntimeMeta);
10522 std::swap(renderer, propertyRuntimeMeta.renderer);
10528 return RuntimeUIGuides(pParamDef, renderer->getNativeRenderer(),
id);
10533 enum GPUPluginSupport {
10534 GPUPluginSupport_Full,
10535 GPUPluginSupport_Partial,
10536 GPUPluginSupport_Bake,
10537 GPUPluginSupport_None,
10538 GPUPluginSupport_Unknown,
10541 inline std::ostream& operator <<(std::ostream& stream,
const GPUPluginSupport val) {
10543 case GPUPluginSupport_Full:
10546 case GPUPluginSupport_Partial:
10547 stream <<
"Partial";
10549 case GPUPluginSupport_Bake:
10552 case GPUPluginSupport_None:
10556 stream <<
"Unknown";
10566 PluginTypeId typeId;
10578 typeId = renderer->getPluginTypeId_internal(typeStr);
10579 type = renderer->getPluginTypeString(typeId);
10580 pRenderer = renderer;
10584 typeId = pluginTypeId;
10585 type = renderer->getPluginTypeString(pluginTypeId);
10586 pRenderer = renderer;
10593 bool operator==(
const PluginMeta& pluginMeta)
const {
10594 return typeId == pluginMeta.typeId && pRenderer == pluginMeta.pRenderer;
10597 void swap(
PluginMeta& pluginMeta)
noexcept {
10598 std::swap(typeId, pluginMeta.typeId);
10599 std::swap(type, pluginMeta.type);
10600 std::swap(pRenderer, pluginMeta.pRenderer);
10620 return pRenderer->getPluginPropertyNames(type);
10636 return PropertyMeta(pRenderer, type, propertyName.c_str());
10654 namespace Internal {
10680 ci.bufAddr =
nullptr;
10687 operator size_t ()
const noexcept {
10706 return saveToFile(fileName.c_str());
10711 Internal::C_memory_free(bufAddr);
10723 bufSize = Internal::VRayImage_compressToJpeg(img, quality, &bufAddr,
nullptr);
10728 bufSize = Internal::VRayImage_compressToJpeg(img, quality, &bufAddr, renderer.getNativeRenderer());
10741 bufSize = Internal::VRayImage_compressToPng(img, preserveAlpha, &bufAddr,
nullptr);
10746 bufSize = Internal::VRayImage_compressToPng(img, preserveAlpha, &bufAddr, renderer.getNativeRenderer());
10760 bufSize = Internal::VRayImage_convertToBmp(img, preserveAlpha, &bufAddr,
nullptr, swapChannels ? 1 : 0);
10765 bufSize = Internal::VRayImage_convertToBmp(img, preserveAlpha, &bufAddr, renderer.getNativeRenderer(), swapChannels ? 1 : 0);
10773 T plugin_cast(Plugin plugin) {
10774 return *
static_cast<T*
>(&plugin);
10779 PluginRefT<T> plugin_cast(PluginRef pluginRef) {
10781 return *
static_cast<PluginRefT<T>*
>(
static_cast<T*
>(
static_cast<Plugin*
>(&pluginRef)));
10787 T plugin_checked_cast(Plugin plugin) {
10788 return plugin_cast<T>(plugin.getTypeId() != T::getTypeId() ? Plugin() : plugin);
10794 PluginRefT<T> plugin_checked_cast(PluginRef pluginRef) {
10795 return plugin_cast<T>(pluginRef.getTypeId() != T::getTypeId() ? PluginRef() : pluginRef);
10799 template<
typename PluginType>
10800 inline bool _isPluginOfTypes(PluginTypeId typeId) {
10801 return typeId == PluginType::getTypeId();
10804 template<
typename PluginType0,
typename PluginType1,
typename... RemainingTypes>
10805 inline bool _isPluginOfTypes(PluginTypeId typeId) {
10806 return typeId == PluginType0::getTypeId() || _isPluginOfTypes<PluginType1, RemainingTypes...>(typeId);
10815 template<
typename PluginType>
10816 inline bool isPluginOfType(
const Plugin& plugin) {
10817 return plugin.getTypeId() == PluginType::getTypeId();
10825 template<
typename PluginType,
typename... Types>
10826 inline bool isPluginOfTypes(
const Plugin& plugin) {
10827 return Internal::_isPluginOfTypes<PluginType, Types...>(plugin.getTypeId());
10835 inline bool isPluginOfType(
const Plugin& plugin,
const char* type) {
10836 return plugin.isNotEmpty() && strcmp(plugin.getType(), type) == 0;
10846 template <
size_t N>
10847 inline bool isPluginOfTypes(
const Plugin& plugin,
const char*
const (&types)[N]) {
10848 if (plugin.isNotEmpty()) {
10849 const char* type = plugin.getType();
10850 for (
size_t i = 0; i < N; ++i) {
10851 if (strcmp(type, types[i]) == 0)
10865 template <
size_t N>
10866 inline bool isPluginOfTypes(
const Plugin& plugin,
const PluginTypeId (&types)[N]) {
10867 PluginTypeId typeId = plugin.getTypeId();
10868 for (
size_t i = 0; i < N; ++i) {
10869 if (typeId == types[i])
10877 enum SourceMode :
int {
10912 : errorCode(OCIOResult::Result_OK) {
10914 Internal::OCIOData internalOCIOData;
10915 errorCode = (OCIOResult)Internal::VRay_OCIO_initData(&internalOCIOData, fileName, (
int)vraySourceType);
10916 if (errorCode != OCIOResult::Result_OK) {
10917 const char* ending = internalOCIOData.status ? internalOCIOData.status :
"<unknown>";
10918 errorString = std::string(
"Failed initializing OCIO configuration: ") + ending;
10919 Internal::VRay_OCIO_freeData(&internalOCIOData);
10920#ifndef VRAY_NOTHROW
10926 familySeparator = char(internalOCIOData.familySeparator);
10928 convertRawData(colorSpaces, internalOCIOData.colorSpaces, internalOCIOData.colorSpacesCount);
10929 if (internalOCIOData.colorSpaceFamilies) {
10930 convertRawData(colorSpaceFamilies, internalOCIOData.colorSpaceFamilies, internalOCIOData.colorSpacesCount);
10932 convertRawData(roles, internalOCIOData.roles, internalOCIOData.rolesCount);
10933 convertRawData(roleColorSpaces, internalOCIOData.roleColorSpaces, internalOCIOData.rolesCount);
10935 convertRawData(looks, internalOCIOData.looks, internalOCIOData.looksCount);
10936 convertRawData(devices, internalOCIOData.devices, internalOCIOData.devicesCount);
10937 convertRawData(viewTransforms, internalOCIOData.viewTransforms, internalOCIOData.viewTransformsCount);
10939 Internal::VRay_OCIO_freeData(&internalOCIOData);
10944 return errorString;
10949 enum OCIOResult :
int {
10951 Result_FileNotFound,
10952 Result_OCIOException,
10953 Result_EmptyConfiguration,
10954 Result_InternalException = -1
10958 std::string errorString;
10960 void convertRawData(std::vector<std::string>& output,
char const*
const* input,
const int inputCount) {
10962 output.reserve(inputCount);
10963 for (
int i = 0; i < inputCount; ++i) {
10964 output.emplace_back(input[i]);
10974 bool setEnvVar(
const char* name,
const char* value);
10979 const char* getEnvVar(
const char* name);
10981 enum OSLParameterType {
10982 OSL_TYPE_UNSUPPORTED,
10990 OSL_TYPE_OUTPUT_CLOSURE,
10991 OSL_TYPE_OUTPUT_COLOR,
10992 OSL_TYPE_OUTPUT_FLOAT,
11017 enum OSLSourceType {
11018 OSL_SOURCE_TYPE_OSL = 1,
11019 OSL_SOURCE_TYPE_OSO = 2,
11022 enum OSLSourceEncoding {
11023 OSL_SOURCE_ENC_TXT,
11024 OSL_SOURCE_ENC_BASE64,
11032 Error getOSLParameters(
const char* src, OSLSourceType type, OSLSourceEncoding encoding, OSLParameters& params);
11035 Error getOSLParameters(
const std::string& src, OSLSourceType type, OSLSourceEncoding encoding, OSLParameters& params);
11039 void createThis(
const char* filename,
const void* settings);
11050 ObjectTypeNodeParticle,
11052 ObjectTypeInstancer,
11054 ObjectTypeVRayScene,
11055 ObjectTypeMaterial,
11062 DataTypeNoData = 0,
11063 DataTypeMesh = (1 << 0),
11064 DataTypeHair = (1 << 1),
11065 DataTypeParticles = (1 << 2),
11066 DataTypeVolume = (1 << 3),
11067 DataTypeInfinitePlane = (1 << 4),
11068 DataTypeInstancer2 = (1 << 5),
11069 DataTypeVRayProxy = (1 << 6),
11070 DataTypeRayserverInstancer = (1 << 7),
11071 DataTypeStaticMesh = (1 << 8),
11072 DataTypePerfectSphere = (1 << 9),
11073 DataTypeGeomInstancer = (1 << 10),
11075 DataTypeHasInstances = DataTypeInstancer2 | DataTypeRayserverInstancer | DataTypeGeomInstancer,
11077 ObjectDataTypeAll = DataTypeAll,
11078 ObjectDataTypeNoData = DataTypeNoData,
11079 ObjectDataTypeMesh = DataTypeMesh,
11080 ObjectDataTypeHair = DataTypeHair,
11081 ObjectDataTypeParticles = DataTypeParticles,
11082 ObjectDataTypeVolume = DataTypeVolume,
11083 ObjectDataTypeInfinitePlane = DataTypeInfinitePlane,
11084 ObjectDataTypeInstancer2 = DataTypeInstancer2,
11085 ObjectDataTypeVRayProxy = DataTypeVRayProxy,
11086 ObjectDataTypeRayserverInstancer = DataTypeRayserverInstancer,
11087 ObjectDataTypeStaticMesh = DataTypeStaticMesh,
11088 ObjectDataTypePerfectSphere = DataTypePerfectSphere,
11089 ObjectDataTypeGeomInstancer = DataTypeGeomInstancer,
11091 ObjectDataTypeHasInstances = DataTypeHasInstances,
11095 LightTypeUnsupported = 0,
11097 LightTypeRectangle,
11108 UpAxisUnknown = -1,
11143 std::vector<Object>
getObjects(ObjectType objectType = ObjectTypeAll, DataType dataType = DataTypeAll)
const;
11152 operator bool()
const {
11153 return !!vrsceneDesc;
11159 return !vrsceneDesc;
11205 CoordinateSystemRightHanded=0,
11207 CoordinateSystemLeftHanded=1
11212 previewFacesCount(100000),
11213 minPreviewFaces(64),
11214 maxPreviewFaces(10000),
11215 cacheType(CacheType::CacheTypeSingle),
11216 coordinateSystem(CoordinateSystem::CoordinateSystemRightHanded) {
11220 int previewFacesCount;
11221 int minPreviewFaces;
11222 int maxPreviewFaces;
11223 CacheType cacheType;
11224 CoordinateSystem coordinateSystem;
11232 static void addDataTypeStringHelperPrivate(std::string& currentString, DataType types, DataType dataType,
const char* typeString);
11234 explicit Object(
void* objectBase) : objectBase(objectBase) {}
11235 Object(
void* vrsceneDesc,
const char* name);
11238 Object() : objectBase() {}
11247 return !!objectBase;
11291#ifndef VRAY_SDK_INTEROPERABILITY
11347 VUtils::VectorRefList getMeshVertices(
double time = 0);
11352 VUtils::IntRefList getMeshFaces(
double time = 0);
11358 VUtils::VectorRefList getHairVertices(
double time = 0);
11364 VUtils::IntRefList getHairNumVertices(
double time = 0);
11367 std::vector<Particle> getInstancerParticles(
double time = 0);
11369 Sizes3D getDecalSize(
double time = 0);
11370 Sizes2D getClipperSize(
double time = 0);
11387 bool isValid()
const {
11401 void *internalTextureSampler;
11470 IntList
sampleAreaInt(
const PluginRef &pluginRef,
float u_start,
float u_end,
float v_start,
float v_end,
int width,
int height);
11479 template<
typename ListType,
typename SampleFunction>
11480 static std::vector<ListType> sampleAreaAsListResult(
int width,
int height, SampleFunction &&sampleArea);
11491 bool operator==(
const PluginLink& other)
const noexcept {
11492 return fromPlugin == other.fromPlugin && fromProperty == other.fromProperty && toPlugin == other.toPlugin;
11495 bool operator!=(
const PluginLink& other)
const noexcept {
11496 return fromPlugin != other.fromPlugin || fromProperty != other.fromProperty || toPlugin != other.toPlugin;
11499 bool operator<(
const PluginLink& other)
const noexcept {
11500 if (fromPlugin != other.fromPlugin)
11501 return fromPlugin < other.fromPlugin;
11502 if (fromProperty != other.fromProperty)
11503 return fromProperty < other.fromProperty;
11504 return toPlugin < other.toPlugin;
11507 bool operator<=(
const PluginLink& other)
const noexcept {
11508 if (fromPlugin < other.fromPlugin)
return true;
11509 if (fromPlugin > other.fromPlugin)
return false;
11510 if (fromProperty < other.fromProperty)
return true;
11511 if (fromProperty > other.fromProperty)
return false;
11512 return toPlugin < other.toPlugin;
11521 std::vector<PluginLink> getChildPlugins(Plugin root,
bool recursive);
11526 std::vector<PluginLink> getParentPlugins(Plugin child,
bool recursive =
false);
11530 float getIESPrescribedIntensity(
const char* iesLightFileName);
11533 float getIESPrescribedIntensity(
const std::string& iesLightFileName);
11602 binUserAttributeType_int = 0,
11603 binUserAttributeType_float,
11604 binUserAttributeType_vector,
11605 binUserAttributeType_acolor,
11606 binUserAttributeType_string,
11607 binUserAttributeType_last,
11613 binUserAttributeFlag_small = 1 << 3,
11616 binUserAttributeFlag_smallY = 1 << 2,
11619 binUserAttributeFlag_smallZ = 1 << 1,
11622 binUserAttributeFlag_smallA = 1 << 0,
11628 template<
size_t count>
11629 void add(
const char(&name)[count],
int value) {
11630 add(name, count - 1, value);
11636 template<
size_t count>
11637 void add(
const char(&name)[count],
float value) {
11638 add(name, count - 1, value);
11644 template<
size_t count>
11646 add(name, count - 1, value);
11652 template<
size_t count>
11654 add(name, count - 1, value);
11661 template<
size_t nameLen>
11662 void add(
const char(&name)[nameLen],
const char* value,
size_t valueLen) {
11663 add(name, nameLen - 1, value, valueLen);
11669 template<
size_t nameLen,
size_t valueLen>
11670 void add(
const char(&name)[nameLen],
const char(&value)[valueLen]) {
11671 add(name, nameLen - 1, value, valueLen - 1);
11677 template<
size_t nameLen>
11678 void add(
const char(&name)[nameLen],
const std::string& value) {
11679 add(name, nameLen - 1, value.c_str(), value.length());
11685 void add(
const std::string& name,
int value) {
11686 add(name.c_str(), name.length(), value);
11692 void add(
const std::string& name,
float value) {
11693 add(name.c_str(), name.length(), value);
11700 add(name.c_str(), name.length(), value);
11707 add(name.c_str(), name.length(), value);
11714 void add(
const std::string& name,
const char* value,
size_t valueLen) {
11715 add(name.c_str(), name.length(), value, valueLen);
11721 template<
size_t valueLen>
11722 void add(
const std::string& name,
const char(&value)[valueLen]) {
11723 add(name.c_str(), name.length(), value, valueLen - 1);
11729 void add(
const std::string& name,
const std::string& value) {
11730 add(name.c_str(), name.length(), value.c_str(), value.length());
11737 void add(
const char* name,
size_t nameLen,
int value) {
11738 appendString(name, nameLen);
11740 if (value >= -128 && value <= 127) {
11741 const byte attrType = binUserAttributeType_int | (binUserAttributeFlag_small << 4);
11744 write(sbyte(value));
11746 resize(1 +
sizeof(
int));
11747 write(binUserAttributeType_int);
11756 void add(
const char* name,
size_t nameLen,
float value) {
11757 appendString(name, nameLen);
11759 byte attrType = binUserAttributeType_float;
11760 byte writeSize = 1;
11762 const SmallFloat smallValue(value, attrType, binUserAttributeFlag_small, writeSize);
11765 smallValue.write(*
this);
11772 void add(
const char* name,
size_t nameLen,
const Vector& value) {
11773 appendString(name, nameLen);
11775 byte attrType = binUserAttributeType_vector;
11776 byte writeSize =
sizeof(byte);
11778 const SmallFloat smallX(value.x, attrType, binUserAttributeFlag_small, writeSize);
11779 const SmallFloat smallY(value.y, attrType, binUserAttributeFlag_smallY, writeSize);
11780 const SmallFloat smallZ(value.z, attrType, binUserAttributeFlag_smallZ, writeSize);
11785 smallX.write(*
this);
11786 smallY.write(*
this);
11787 smallZ.write(*
this);
11794 void add(
const char* name,
size_t nameLen,
const AColor& value) {
11795 appendString(name, nameLen);
11797 byte attrType = binUserAttributeType_acolor;
11798 byte writeSize =
sizeof(byte);
11800 const SmallFloat smallR(value.color.r, attrType, binUserAttributeFlag_small, writeSize);
11801 const SmallFloat smallG(value.color.g, attrType, binUserAttributeFlag_smallY, writeSize);
11802 const SmallFloat smallB(value.color.b, attrType, binUserAttributeFlag_smallZ, writeSize);
11803 const SmallFloat smallA(value.alpha, attrType, binUserAttributeFlag_smallA, writeSize);
11809 smallR.write(*
this);
11810 smallG.write(*
this);
11811 smallB.write(*
this);
11812 smallA.write(*
this);
11820 void add(
const char* name,
size_t nameLen,
const char* value,
size_t valueLen) {
11821 appendString(name, nameLen);
11824 write(binUserAttributeType_string);
11826 appendString(value, valueLen);
11863 const byte* bytes =
reinterpret_cast<const byte*
>(data.data());
11864 size_t count = getNumBytes();
11865 std::string chars(count * 3 + 2,
'\0');
11867 for (
size_t i = 0; i < count; ++i) {
11869 chars[3 * i + 0] = getHexChar(b >> 4);
11870 chars[3 * i + 1] = getHexChar(b & 0xf);
11871 chars[3 * i + 2] =
' ';
11873 chars[3 * count + 0] =
'0';
11874 chars[3 * count + 1] =
'0';
11883 struct SmallFloat {
11884 SmallFloat(
float value,
byte& attrType,
byte smallFlag,
byte& writeSize)
11889 const float roundValue = roundf(value);
11890 const bool almostInt = std::abs(value - roundValue) < 1e-6f;
11891 isSmall = almostInt && roundValue >= -128 && roundValue <= 127;
11893 writeSize +=
sizeof(float);
11896 smallFloat = sbyte(roundValue);
11897 attrType |= (smallFlag << 4);
11898 writeSize +=
sizeof(sbyte);
11903 float getFloat()
const {
return value; }
11906 sbyte getSmallFloat()
const {
return smallFloat; }
11909 bool getIsSmall()
const {
return isSmall; }
11912 void write(BinUserAttributesWriter& buf)
const {
11914 buf.write(smallFloat);
11925 inline static char getHexChar(
byte b) {
11926 return b < 10 ? b +
'0' : b - 10 +
'A';
11932 void appendString(
const char* name,
size_t nameLen) {
11934 resize(nameLen + 1);
11935 std::memcpy(ptr(), name, nameLen);
11942 void append(
const void* bytes,
size_t bytes_count) {
11943 resize(bytes_count);
11944 std::memcpy(ptr(), bytes, bytes_count);
11945 index += bytes_count;
11949 template<
typename T>
11950 void append(
const T& value) {
11956 template<
typename T>
11957 void write(
const T& value) {
11958 std::memcpy(ptr(), &value,
sizeof(value));
11959 index +=
sizeof(T);
11964 void resize(
size_t bytesToAdd) {
11965 size_t newSize = index + bytesToAdd;
11966 if (newSize > data.size() *
sizeof(
int)) {
11967 data.resize((newSize +
sizeof(
int) - 1) /
sizeof(
int));
11973 return reinterpret_cast<byte*
>(data.data()) + index;
11977 std::vector<int> data;
11983 inline std::ostream& operator <<(std::ostream& stream,
const BinUserAttributesWriter& writer) {
11984 stream << writer.toString();
11989#ifdef VRAY_SDK_INTEROPERABILITY
11990#include "vrayinterop.hpp"
11993#include "_vraysdk_implementation.hpp"
11996# pragma warning(pop)
The raw memory contents of a BMP image.
Definition: vraysdk.hpp:558
Base class for LocalJpeg, LocalPng, LocalBmp. Can't be instantiated.
Definition: vraysdk.hpp:10669
bool saveToFile(const char *fileName) const
Write the data to disk.
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:10705
size_t getLen() const noexcept
Returns size of image data in bytes.
Definition: vraysdk.hpp:10697
void * getBuf() const noexcept
Returns a pointer to the image data.
Definition: vraysdk.hpp:10692
Definition: vraysdk.hpp:4326
Definition: vraysdk.hpp:3205
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:3223
A group of utility methods related to variuos geometry source plugins.
Definition: vraysdk.hpp:9849
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:10655
The raw memory contents of a JPEG image.
Definition: vraysdk.hpp:505
A group of utility methods related to variuos light source plugins.
Definition: vraysdk.hpp:9895
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:10752
LocalBmp(const VRayImage *img, bool preserveAlpha=false, bool swapChannels=false)
Definition: vraysdk.hpp:10759
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:10764
A wrapper around JPEG data in memory. It's meant to be stack allocated to free the data when done.
Definition: vraysdk.hpp:10716
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:10727
LocalJpeg(const VRayImage *img, int quality=0)
Definition: vraysdk.hpp:10722
Definition: vraysdk.hpp:10734
LocalPng(const VRayImage *img, bool preserveAlpha=false)
Definition: vraysdk.hpp:10740
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:10745
A variation of VRayImage to be created on the stack so that the image gets auto-deleted.
Definition: vraysdk.hpp:824
Definition: vraysdk.hpp:3878
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:484
Definition: vraysdk.hpp:4793
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.
bool setUpdatedDefaultProperties()
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:4824
@ 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:4832
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:5615
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:5642
PluginRefT(const PluginRefT &plugin) noexcept
Copy construct from another PluginRef.
Definition: vraysdk.hpp:5638
PluginRefT() noexcept
Default construct an invalid PluginRef - not referencing a V-Ray scene object.
Definition: vraysdk.hpp:5632
bool isOutputValid() const noexcept
Returns true if this PluginRef references a valid Plugin output (including the default one).
Definition: vraysdk.hpp:5667
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:5635
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:5693
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:5745
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:5706
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:5703
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:5709
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:503
Definition: vraysdk.hpp:9815
A group of methods for reading data and creating V-Ray geometry proxies.
Definition: vraysdk.hpp:9924
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:3238
const std::vector< int > & getMaterialIDs() const
Get material IDs for each consecutive triangle in the full mesh.
Definition: vraysdk.hpp:3279
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:3447
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:3420
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:3512
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:3506
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:3378
const std::vector< Vector > & getUVValues() const
Get the full array of UVW 3-tuples.
Definition: vraysdk.hpp:3423
const std::vector< float > & getHairWidths() const
Get the full array of the hair geometry widths.
Definition: vraysdk.hpp:3351
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:3530
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:3509
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:3348
const std::vector< Vector > & getNormals() const
Get full mesh normal vectors array.
Definition: vraysdk.hpp:3273
const std::vector< Color > & getVoxelInfoWireColor() const
Get an array of diffuse (wire) colors - 1 Color per mesh object.
Definition: vraysdk.hpp:3524
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:3444
const std::vector< Vector > & getVelocities() const
Get velocity vectors for each vertex in the vertex array.
Definition: vraysdk.hpp:3285
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:3417
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:3450
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:3435
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:3381
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:3276
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:3438
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:3390
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:3426
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:3357
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:3527
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:3453
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:3393
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:3441
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:3354
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:3408
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:3270
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:3264
const std::vector< Vector > & getVertices() const
Get full mesh vertex positions array.
Definition: vraysdk.hpp:3267
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:3399
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:3282
const std::vector< Vector > & getHairVertices() const
Get the full array of the hair geometry vertices.
Definition: vraysdk.hpp:3345
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:2670
PixelFormat
This describes the desired data format for getData().
Definition: vraysdk.hpp:2797
@ PF_RGBA_BIT16
4x2 bytes RGBA.
Definition: vraysdk.hpp:2811
@ PF_BW_BIT8
1-byte greyscale/integer.
Definition: vraysdk.hpp:2799
@ PF_RGBA_FLOAT
4x4 bytes float RGBA.
Definition: vraysdk.hpp:2813
@ PF_RGB_FLOAT
3x4 bytes float RGB.
Definition: vraysdk.hpp:2808
@ PF_BW_BIT16
2-byte greyscale/integer.
Definition: vraysdk.hpp:2800
@ PF_RGBA_HALF
4x2 bytes half-float RGBA.
Definition: vraysdk.hpp:2812
@ PF_RGB_BIT16
3x2 bytes RGB.
Definition: vraysdk.hpp:2806
@ PF_BW_BIT32
4-byte greyscale/integer.
Definition: vraysdk.hpp:2801
@ PF_BW_FLOAT
4-byte float greyscale.
Definition: vraysdk.hpp:2803
@ PF_RGB_BIT8
3x1 bytes RGB.
Definition: vraysdk.hpp:2805
@ PF_RGBA_BIT8
4x1 bytes RGBA.
Definition: vraysdk.hpp:2810
@ PF_RGB_HALF
3x2 bytes half-float RGB.
Definition: vraysdk.hpp:2807
@ PF_BW_HALF
2-byte half-float greyscale.
Definition: vraysdk.hpp:2802
Plugin getPlugin() const
Get the plugin instance in the scene that enables this render element. Might be invalid for special c...
RenderElement()
Default construct an invalid object.
Definition: vraysdk.hpp:2870
size_t getDataIntoBuffer(const GetDataOptions &options, void *data) const
VRayImage * getImage(const ImageRegion *rgn=nullptr, int layerIndex=0) const
DataIntent
Definition: vraysdk.hpp:2816
@ DI_INTENT_FILE
The data will be saved in a file, so we don't want color corrections applied.
Definition: vraysdk.hpp:2821
@ DI_INTENT_VIEWPORT_IPR
Image will be displayed in viewport, color corrections should be applied with the exception of sRGB a...
Definition: vraysdk.hpp:2837
@ DI_INTENT_FILE_SRGB
Same as IntentFile, but with forced sRGB/Gamma correction.
Definition: vraysdk.hpp:2834
@ DI_INTENT_DISPLAY
The data will be shown on a display, so we want color corrections to be applied.
Definition: vraysdk.hpp:2818
@ DI_INTENT_FILE_NO_COLOR_CORRECTIONS
Definition: vraysdk.hpp:2831
@ DI_INTENT_RAW
Definition: vraysdk.hpp:2826
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:2787
@ BF_FLOAT
A single float number (e.g. z-depth).
Definition: vraysdk.hpp:2788
@ BF_3FLOAT_SIGNED
3 signed float numbers (e.g. surface normals).
Definition: vraysdk.hpp:2792
@ BF_4FLOAT
4 float numbers (e.g. RGBA color).
Definition: vraysdk.hpp:2793
@ BF_3FLOAT
3 float numbers (e.g. RGB color).
Definition: vraysdk.hpp:2789
@ BF_2FLOAT
2 signed float numbers (e.g. uv coordinates or pixel screen velocity).
Definition: vraysdk.hpp:2790
@ BF_INT
A single integer number (e.g. render ID, material ID etc).
Definition: vraysdk.hpp:2791
PixelFormat getDefaultPixelFormat() const
Get the default format used by the getData method for this render element.
Definition: vraysdk.hpp:2891
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:2876
BinaryFormat getBinaryFormat() const
Get the binary format of pixels in this render element.
Definition: vraysdk.hpp:2886
Type
The render channal types/aliases are used to identify some common channels.
Definition: vraysdk.hpp:2675
@ REFLECT_ALPHA
Used by matte materials to store the alpha of the reflections.
Definition: vraysdk.hpp:2731
@ VRMTL_SHEEN_GLOSSINESS
VRayMtl sheen glossiness parameter.
Definition: vraysdk.hpp:2759
@ REALCOLOR
Real color VFB channel.
Definition: vraysdk.hpp:2705
@ COLOR
RGB VFB channel. This is always created by V-Ray and there can't be multiple instances....
Definition: vraysdk.hpp:2710
@ CRYPTOMATTE
Used for Cryptomatte render channel output.
Definition: vraysdk.hpp:2746
@ NODEID
Node ID VFB channel. This channel is generated by V-Ray.
Definition: vraysdk.hpp:2696
@ RAW_COAT_REFLECTION
Raw coat indirect reflection VFB channel.
Definition: vraysdk.hpp:2763
@ REFLECT
Reflection VFB channel. This channel must be generated by shaders.
Definition: vraysdk.hpp:2681
@ VRMTL_COAT_COLOR
VRayMtl coat highlight color (coat filter uninfluenced by Fresnel weight, reflection and refraction c...
Definition: vraysdk.hpp:2762
@ EXTRA_TEX_FLOAT
A single texture override is applied to the whole scene (e.g. Dirt)
Definition: vraysdk.hpp:2780
@ LAST
not a type, just a delimiter
Definition: vraysdk.hpp:2769
@ RENDERTIME
Per-pixel render time.
Definition: vraysdk.hpp:2745
@ DRBUCKET
A channel that keeps track of which DR server rendered a particular bucket (it is a Color buffer that...
Definition: vraysdk.hpp:2724
@ NOISE_LEVEL
The noise level as estimated by the Adaptive and Progressive image samplers. Used for denoising purpo...
Definition: vraysdk.hpp:2736
@ RAW_REFLECTION
Raw reflection VFB channel. This channel must be generated by shaders.
Definition: vraysdk.hpp:2700
@ BACKGROUND
Background VFB channel. This channel is generated by V-Ray.
Definition: vraysdk.hpp:2707
@ VRMTL_REFRACTGLOSS
A VRayMtl reflection glossiness VFB channel. This channel is generated by V-Ray.
Definition: vraysdk.hpp:2728
@ ZDEPTH
Z-Depth VFB channel. This channel is generated by V-Ray.
Definition: vraysdk.hpp:2697
@ SHEEN_FILTER
Sheen filter VFB channel.
Definition: vraysdk.hpp:2758
@ COAT_FILTER
Coat filter VFB channel.
Definition: vraysdk.hpp:2764
@ TOON
Toon effect channel.
Definition: vraysdk.hpp:2743
@ MTLRENDERID
Mtl render ID VFB channel. This channel is generated by V-Ray.
Definition: vraysdk.hpp:2734
@ DENOISED
A denoised version of the image. Adding this render element enables denoising.
Definition: vraysdk.hpp:2738
@ MATERIAL_SELECT
Material select.
Definition: vraysdk.hpp:2774
@ REFRACTION_FILTER
Refraction filter VFB channel. This channel must be generated by shaders.
Definition: vraysdk.hpp:2702
@ COAT_REFL_ALPHA
Used by matte materials to store the alpha of the coat reflections.
Definition: vraysdk.hpp:2761
@ NONE
Unspecified channel.
Definition: vraysdk.hpp:2676
@ NORMALS
Normals VFB channel. This channel is generated by V-Ray.
Definition: vraysdk.hpp:2706
@ LIGHT_SELECT
Link this in the channels parameters of your lights.
Definition: vraysdk.hpp:2748
@ SAMPLERATE
The sample rate for the image samplers.
Definition: vraysdk.hpp:2720
@ SHEEN_REFLECTION
Sheen indirect reflection VFB channel.
Definition: vraysdk.hpp:2766
@ RAWGI
Raw GI VFB channel. This channel is generated by V-Ray.
Definition: vraysdk.hpp:2689
@ AUTO
Not an actual channel, used by e.g. setProgressiveImageUpdatedDataType()
Definition: vraysdk.hpp:2677
@ COAT_REFLECTION
Raw coat indirect reflection VFB channel.
Definition: vraysdk.hpp:2767
@ COVERAGE
Pixel coverage.
Definition: vraysdk.hpp:2773
@ RAW_REFRACTION
Raw refraction VFB channel. This channel must be generated by shaders.
Definition: vraysdk.hpp:2703
@ OBJECT_SELECT
Selects by object/material ID.
Definition: vraysdk.hpp:2777
@ LIGHTING_ANALYSIS
The lighting analysis overlay.
Definition: vraysdk.hpp:2747
@ BUMPNORMALS
The normals modified with bump map. This channel must be generated by shaders.
Definition: vraysdk.hpp:2718
@ LIGHT_MIX
Channel for Interactive Light Mix.
Definition: vraysdk.hpp:2751
@ MULTIMATTE_ID
RGB matte using material IDs.
Definition: vraysdk.hpp:2776
@ SHADEMAP_EXPORT
A channel that keeps the fragment coordinates in camera space.
Definition: vraysdk.hpp:2730
@ VRMTL_METALNESS
VRayMtl metalness parameter.
Definition: vraysdk.hpp:2750
@ SHADOW
Shadow VFB channel. This channel is generated by V-Ray.
Definition: vraysdk.hpp:2684
@ REFLECTION_FILTER
Reflection filter VFB channel. This channel must be generated by shaders.
Definition: vraysdk.hpp:2699
@ SPECULAR
Specular VFB channel. This channel is generated by V-Ray.
Definition: vraysdk.hpp:2685
@ MATTESHADOW
Matte shadow channel where full shadows are white and areas not in shadow are black; essentially this...
Definition: vraysdk.hpp:2713
@ ALPHA
Alpha VFB channel. This is always created by V-Ray and there can't be multiple instances....
Definition: vraysdk.hpp:2709
@ EXTRA_TEX_INT
A single texture override is applied to the whole scene (e.g. Dirt)
Definition: vraysdk.hpp:2779
@ CAUSTICS
Caustics VFB channel. This channel is generated by V-Ray.
Definition: vraysdk.hpp:2688
@ SHEEN_REFL_ALPHA
Used by matte materials to store the alpha of the sheen reflections.
Definition: vraysdk.hpp:2760
@ VRMTL_REFLECTHIGLOSS
A VRayMtl reflection hilight glossiness VFB channel. This channel is generated by V-Ray.
Definition: vraysdk.hpp:2727
@ GI
GI VFB channel. This channel is generated by V-Ray.
Definition: vraysdk.hpp:2687
@ RAWTOTALLIGHT
The raw total diffuse lighting (direct+indirect) falling on a surface. This channel is generated by V...
Definition: vraysdk.hpp:2716
@ VRMTL_REFLECTGLOSS
A VRayMtl reflection glossiness VFB channel. This channel is generated by V-Ray.
Definition: vraysdk.hpp:2726
@ VELOCITY
Velocity VFB channel. This channel is generated by V-Ray.
Definition: vraysdk.hpp:2693
@ WORLD_POSITION
The position in world space. Used for denoising purposes.
Definition: vraysdk.hpp:2737
@ RENDERID
Render ID VFB channel. This channel is generated by V-Ray.
Definition: vraysdk.hpp:2694
@ TOON_LIGHTING
Direct toon diffuse lighting.
Definition: vraysdk.hpp:2753
@ EXTRA_TEX
A single texture override is applied to the whole scene (e.g. Dirt)
Definition: vraysdk.hpp:2778
@ USER
User defined channel indices start from here.
Definition: vraysdk.hpp:2771
@ TOTALLIGHT
The total diffuse lighting (direct+indirect) falling on a surface. This channel is generated by V-Ray...
Definition: vraysdk.hpp:2715
@ MTLID
Mtl ID VFB channel. This channel is generated by V-Ray.
Definition: vraysdk.hpp:2695
@ TOON_SPECULAR
Direct toon specular lighting.
Definition: vraysdk.hpp:2754
@ DIFFUSE
Diffuse filter VFB channel. This channel is generated by V-Ray.
Definition: vraysdk.hpp:2680
@ WIRECOLOR
Wire color channel where each object appears with a solid color. This channel is generated by V-Ray.
Definition: vraysdk.hpp:2712
@ VRMTL_COAT_GLOSSINESS
VRayMtl coat glossiness parameter.
Definition: vraysdk.hpp:2765
@ RAW_SHEEN_REFLECTION
Raw sheen indirect reflection VFB channel.
Definition: vraysdk.hpp:2757
@ SELFILLUM
Self-illumination VFB channel. This channel must be generated by shaders.
Definition: vraysdk.hpp:2683
@ DEFOCUS_AMOUNT
Pixel blur, combination of DOF and moblur. Used for denoising purposes.
Definition: vraysdk.hpp:2740
@ MULTIMATTE
RGB matte for up to 3 objects.
Definition: vraysdk.hpp:2775
@ VRMTL_SHEEN_COLOR
VRayMtl sheen color parameter (sheen filter uninfluenced by Fresnel weight, reflection and refraction...
Definition: vraysdk.hpp:2756
@ LIGHTING
Lighting VFB channel. This channel is generated by V-Ray.
Definition: vraysdk.hpp:2686
@ RAWLIGHT
Raw light VFB channel. This channel is generated by V-Ray.
Definition: vraysdk.hpp:2690
@ EFFECTS_RESULT
Channel for all post effects.
Definition: vraysdk.hpp:2742
@ REFRACT
Refraction VFB channel. This channel must be generated by shaders.
Definition: vraysdk.hpp:2682
@ RAWSHADOW
Raw shadow VFB channel. This channel is generated by V-Ray.
Definition: vraysdk.hpp:2691
@ ATMOSPHERE
Atmospheric effects channel.
Definition: vraysdk.hpp:2679
@ VRMTL_REFLECTIOR
A VRayMtl reflection IOR VFB channel. This channel is generated by V-Ray.
Definition: vraysdk.hpp:2733
@ SSS
A channel used for VRayFastSSS2 material sub-surface portion.
Definition: vraysdk.hpp:2722
@ WORLD_BUMPNORMAL
Normal with bump mapping in world space.
Definition: vraysdk.hpp:2739
Type getType() const
Get the type of the render element.
Definition: vraysdk.hpp:2881
This class groups methods related to management of render elements in the scene.
Definition: vraysdk.hpp:2960
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:10365
Definition: vraysdk.hpp:4556
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:11227
DataType getDataType() const
bool isValid() const
Definition: vraysdk.hpp:11246
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:11037
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:11158
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:10072
bool hasOverriddenBy() const
bool hasAttribute(const AttributesType attributeType) const
UnitsType
Definition: vraysdk.hpp:10187
QuantityTypeEnum
Defines the quantity type that the parameter represents.
Definition: vraysdk.hpp:10167
@ Angle
Definition: vraysdk.hpp:10179
@ Distance
Definition: vraysdk.hpp:10174
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:10087
@ StartRollout
Definition: vraysdk.hpp:10123
@ Tier
Definition: vraysdk.hpp:10152
@ Hide
Indicates when the control should be hidden (not shown at all), depending on other plugin parameter v...
Definition: vraysdk.hpp:10154
@ GPUSupport
To what extent the property is supported by V-Ray GPU.
Definition: vraysdk.hpp:10149
@ QuantityType
Definition: vraysdk.hpp:10133
@ Enum
Definition: vraysdk.hpp:10090
@ Overrides
Definition: vraysdk.hpp:10147
@ MinValue
Limits the min value of the control.
Definition: vraysdk.hpp:10097
@ StringEnum
Definition: vraysdk.hpp:10113
@ SoftMinValue
Limits the max value of the control initially (the user can override it).
Definition: vraysdk.hpp:10128
@ StartTab
Definition: vraysdk.hpp:10126
@ Enable
Indicates when the control should be active (not grayed out), depending on other plugin parameter val...
Definition: vraysdk.hpp:10092
@ FileAssetNames
Definition: vraysdk.hpp:10116
@ SoftMaxValue
Limits the min value of the control initially (the user can override it).
Definition: vraysdk.hpp:10130
@ 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:10118
@ Attributes
Definition: vraysdk.hpp:10110
@ Units
Definition: vraysdk.hpp:10104
@ FileAsset
Definition: vraysdk.hpp:10107
@ OverridenBy
Definition: vraysdk.hpp:10140
@ DisplayName
Definition: vraysdk.hpp:10095
@ SpinStep
Add a step hint to a slider.
Definition: vraysdk.hpp:10101
@ MaxValue
Limits the max value of the control.
Definition: vraysdk.hpp:10099
@ DefaultValue
Definition: vraysdk.hpp:10161
FileAssetOpType
Definition: vraysdk.hpp:10201
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:10208
TierType
Definition: vraysdk.hpp:10232
Definition: vraysdk.hpp:11400
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:507
Definition: vraythrow.hpp:9
Definition: vraysdk.hpp:4103
void setOSMessageDispatching(bool enableMessageDispatching)
Definition: vraysdk.hpp:4142
VRayInit(unsigned enableFlags)
Definition: vraysdk.hpp:4117
void setGUIMessageProcessing(bool enableMessageProcessing)
Definition: vraysdk.hpp:4134
Flags
Definition: vraysdk.hpp:4107
@ EnableChaosCloudLicensing
Add to enable the Chaos Cloud licensing when using V-Ray. Note that the licensing also requires a val...
Definition: vraysdk.hpp:4109
@ EnableFrameBuffer
Add to enable the usage of the V-Ray Frame Buffer. Note that this flag is needed to use the V-Ray Fra...
Definition: vraysdk.hpp:4108
This class groups all VFB history related methods.
Definition: vraysdk.hpp:7514
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:6906
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:7270
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:7449
Layer createLayer(const char *layerClass, const Layer &parent)
This class groups all VFB related methods.
Definition: vraysdk.hpp:6818
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:6498
static bool isActiveState(RendererState value)
Convenience function for checking if a state value is in the rendering subset (including preparing).
Definition: vraysdk.hpp:7910
bool isRenderEnded() const
Box getBoundingBox(bool &ok) const
Returns the current bounding box of the scene.
InstanceHandleType getInstanceHandle() const
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...
void setOnEnhanceOnCollaboration(int(*callback)(VRayRenderer &, const std::vector< std::string > &fileList, double instant, void *), const void *userData=nullptr)
void setOnPostEffectsUpdated(void(*callback)(VRayRenderer &, double instant, void *userData), const void *userData=nullptr)
int resetHosts(const std::string &hosts) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
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 setBucketReadyHasBuffer(bool hasBuffer)
Sets if an image passed in the BucketReady event parameters is needed. If not, no unnecessary copies ...
bool setInteractiveNoiseThreshold(float threshold)
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.
int getNumThreads() const
Return the number of threads that will be used for rendering. 0 means all CPU logical threads.
bool setCurrentTime(double time)
void setOnHostDisconnected(T &object, const void *userData=nullptr)
This is an overloaded member function, provided for convenience. It differs from the above function o...
void setOnVFBPauseIPR(T &object, const void *userData=nullptr)
This is an overloaded member function, provided for convenience. It differs from the above function o...
void setOnProgressiveImageUpdated(T &object, const void *userData=nullptr)
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...
std::string getAllHosts() const
bool denoiseNow(T &object, bool shouldPassImage=true, const void *userData=nullptr)
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 setOnBucketInit(void(*callback)(VRayRenderer &, int x, int y, int width, int height, const char *host, ImagePassType pass, double instant, void *userData), const void *userData=nullptr)
bool getDREnabled() const
void setVFBContextMenuSelectedCallback(T &object, const void *userData=nullptr)
This is an overloaded member function, provided for convenience. It differs from the above function o...
std::string getActiveHosts() const
int appendFiltered(const std::vector< std::string > &fileNames, bool(*callback)(VRayRenderer &, const char *pluginType, std::string &pluginName, void *), const void *userData=nullptr)
This is an overloaded member function, provided for convenience. It differs from the above function o...
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 setOnBucketInit(T &object, const void *userData=nullptr)
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 std::vector< std::string > &fileNames, T &obj, const void *userData=nullptr)
This is an overloaded member function, provided for convenience. It differs from the above function o...
bool clearAllPropertyValuesUpToTime(double time)
Removes all keyframe values at times less than 'time'.
std::vector< ComputeDeviceInfo > getComputeDevicesMetalRT() const
bool deletePlugin(const Plugin &plugin)
void setOnLightMixTransferToScene(int(*callback)(VRayRenderer &, const std::vector< LightMixChange > &changes, double instant, void *), const void *userData=nullptr)
RenderElements getRenderElements()
Returns an object that groups render element management methods.
bool updateLightingAnalysis(VRay::Plugin plugin)
void setOnVFBUpdateIPR(void(*callback)(VRayRenderer &, bool isRendering, double instant, void *userData), const void *userData=nullptr)
bool deletePlugin(const char *pluginName)
void setProgressiveImageUpdatedHasBuffer(bool hasBuffer)
Sets if an image passed in the ProgressiveImageUpdated event parameters is needed....
bool getInProcess() const
Plugin pickPlugin(int x, int y, int timeout) const
void setOnRendererClose(T &object, const void *userData=nullptr)
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:8698
bool enableDRClient(const EnableDRClientParams &enableParams)
int appendAsTextFiltered(const std::vector< std::string > &sceneTexts, T &obj, const void *userData=nullptr)
This is an overloaded member function, provided for convenience. It differs from the above function o...
void setOnVFBClosed(void(*callback)(VRayRenderer &, double instant, void *userData), const void *userData=nullptr)
void setOnBucketReady(void(&callback)(VRayRenderer &, int x, int y, const char *host, VRayImage *img, ImagePassType pass, double instant, void *userData), const void *userData=nullptr)
int loadFiltered(const std::string &fileName, T &obj, const void *userData=nullptr)
This is an overloaded member function, provided for convenience. It differs from the above function o...
void setOnLightMixTransferToScene(T &object, const void *userData=nullptr)
This is an overloaded member function, provided for convenience. It differs from the above function o...
AddHostsResult addHosts(const char *hosts) const
Plugin newPlugin(const char *pluginType)
void setOnRenderViewChanged(T &object, const void *userData=nullptr)
This is an overloaded member function, provided for convenience. It differs from the above function o...
void setProgressiveImageUpdatedDataType(RenderElement::Type renderChannel=RenderElement::AUTO, RenderElement::DataIntent intent=RenderElement::DI_INTENT_VIEWPORT_IPR, bool hasAlpha=true, bool flipImage=false)
bool setRenderSizes(const RenderSizeParams &sizes, bool regionButtonState)
bool waitForSequenceEnd() const
std::vector< Plugin > getPlugins() const
Returns all plugin instances in the current scene.
void setOnBucketFailed(T &object, const void *userData=nullptr)
This is an overloaded member function, provided for convenience. It differs from the above function o...
Plugin newPlugin(const char *pluginName, const char *pluginType)
bool setComputeDevicesMetalRT(const std::vector< int > &indices)
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...
void setOnVFBDebugShadingNotify(void(*callback)(VRayRenderer &, int enabled, DebugShadingMode mode, int selectionLocked, double instant, void *userData), const void *userData=nullptr)
bool waitForVFBClosed(const int timeout) const
void setOnVFBRenderLast(void(*callback)(VRayRenderer &, bool isRendering, double instant, void *userData), const void *userData=nullptr)
T getInstanceOrCreate(const char *pluginName)
This is an overloaded member function, provided for convenience. It differs from the above function o...
int setBitmapCache(bool onOff)
void setOnProgress(void(*callback)(VRayRenderer &, const char *msg, int elementNumber, int elementsCount, double instant, void *userData), const void *userData=nullptr)
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.
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=nullptr)
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...
int loadFiltered(const char *fileName, bool(*callback)(VRayRenderer &, const char *pluginType, std::string &pluginName, void *), const void *userData=nullptr)
void setUserSceneName(const std::string &sceneName)
This is an overloaded member function, provided for convenience. It differs from the above function o...
void setOnVFBInteractiveStart(T &object, const void *userData=nullptr)
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...
unsigned long long commit(bool force=false)
void setOnLogMessage(void(*callback)(VRayRenderer &, const char *msg, MessageLevel level, double instant, void *userData), MessageLevel minLevel=MessageInfo, const void *userData=nullptr)
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)
bool getProgressiveImageUpdatedHasBuffer() const
Gets if an image will be passed in the ProgressiveImageUpdated callback parameters.
const RendererOptions getOptions() const
Return the options used to construct this renderer.
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)
void setOnRenderViewChanged(void(*callback)(VRayRenderer &, const char *propName, double instant, void *userData), const void *userData=nullptr)
int appendAsText(const std::string &text)
This is an overloaded member function, provided for convenience. It differs from the above function o...
size_t getIrradianceMapSize() const
VRayRenderer(InstanceHandleType handle)
void setVFBContextMenuSelectedCallback(void(*callback)(VRayRenderer &, int commandId, int x, int y, void *userData), const void *userData=nullptr)
bool getImageSize(int &width, int &height) const
Returns the frame buffer width and height.
bool updateLightingAnalysis()
void setOnVFBCopyToHostFrameBufferNotify(T &object, const void *userData=nullptr)
This is an overloaded member function, provided for convenience. It differs from the above function o...
bool saveLightCacheFile(const std::string &fileName)
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=nullptr)
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:7907
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...
void setDebugShadingSelection(const std::vector< Plugin > &selection)
~VRayRenderer()
Destructor.
Plugin getPlugin(const char *pluginName) const
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 isRenderingInHalfResolution() const
Definition: vraysdk.hpp:7914
int appendAsText(const char *text, size_t length, void(*freeFn)(char *text, size_t size, T *holderObject)=nullptr, T *holderObject=nullptr)
int loadFiltered(const char *fileName, T &obj, const void *userData=nullptr)
int appendFiltered(const std::vector< const char * > &fileNames, T &obj, const void *userData=nullptr)
void renderSequence() const
Begins rendering an animation sequence in a separate thread. A non-blocking call.
int loadAsText(const char *text)
std::vector< Plugin > getPluginsOfCategories(const std::vector< PluginCategories > &categories) const
Plugin getCamera() const
Gets the current camera plugin. Don't use this unless you need to use setCamera() - see the comments ...
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.
void setDenoiserOptions(const DenoiserOptions &denoiserOptions)
void setVFBContextMenuItems(const std::vector< VFBContextMenuItem > &items)
Set menu items for the VFB's context menu.
int appendAsTextFiltered(const std::vector< const char * > &sceneTexts, bool(*callback)(VRayRenderer &, const char *pluginType, std::string &pluginName, void *), const void *userData=nullptr)
int loadFiltered(const std::string &fileName, bool(*callback)(VRayRenderer &, const char *pluginType, std::string &pluginName, void *), const void *userData=nullptr)
This is an overloaded member function, provided for convenience. It differs from the above function o...
bool waitForSequenceEnd(const int timeout) const
int appendFiltered(const std::string &fileName, T &obj, const void *userData=nullptr)
This is an overloaded member function, provided for convenience. It differs from the above function o...
int loadAsTextFiltered(const char *fileName, bool(*callback)(VRayRenderer &, const char *pluginType, std::string &pluginName, void *), const void *userData=nullptr)
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)
void setOnStateChanged(T &object, const void *userData=nullptr)
This is an overloaded member function, provided for convenience. It differs from the above function o...
void setOnVFBShowMessagesWindow(void(*callback)(VRayRenderer &, double instant, void *userData), const void *userData=nullptr)
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...
std::vector< ComputeDeviceInfo > getComputeDevicesCurrentEngine() const
void setOnHostDisconnected(void(*callback)(VRayRenderer &, const char *hostName, double instant, void *userData), const void *userData=nullptr)
void bucketRenderNearest(int x, int y) const
void clearLastError()
Clears the last error code.
size_t getLightCacheSize() const
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...
void setOnLogMessage(T &object, MessageLevel minLevel=MessageInfo, const void *userData=nullptr)
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 denoiseNow(void(*userCb)(VRayRenderer &, VRayImage *, void *)=0, bool shouldPassImage=true, const void *userData=nullptr)
bool enableLiveLinkClient(const LiveLinkClientParameters ¶ms)
int appendFiltered(const std::string &fileName, bool(*callback)(VRayRenderer &, const char *pluginType, std::string &pluginName, void *), const void *userData=nullptr)
This is an overloaded member function, provided for convenience. It differs from the above function o...
size_t getCausticsSize() const
void setOnEnhanceOnCollaboration(T &object, const void *userData=nullptr)
This is an overloaded member function, provided for convenience. It differs from the above function o...
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)
int resetHosts(const char *hosts=nullptr) const
void setUserLightChangedCB(void(*cb)(const UserLightChanged *info, void *userData), void *userData)
void setOnHostConnected(T &object, const void *userData=nullptr)
This is an overloaded member function, provided for convenience. It differs from the above function o...
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.
void setOnVFBLayersChanged(void(*callback)(VRayRenderer &, double instant, void *userData), const void *userData=nullptr)
void setOnLicenseError(T &object, const void *userData=nullptr)
This is an overloaded member function, provided for convenience. It differs from the above function o...
RenderMode getRenderMode() const
Get the current render mode.
int appendAsTextFiltered(const std::vector< const char * > &sceneTexts, T &obj, const void *userData=nullptr)
InteractiveStatistics getInteractiveStatistics() const
Returns some performance statistics from the Interactive (RT) engine.
bool setInteractiveTimeout(int timeoutMsec)
bool addVRayProfilerMetadata(const char *category, const char *key, const char *value)
bool waitForRenderEnd(const int timeout) const
void setOnCollaborationImageChange(T &object, const void *userData=nullptr)
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=nullptr)
int loadAsTextFiltered(const std::string &fileName, T &obj, const void *userData=nullptr)
This is an overloaded member function, provided for convenience. It differs from the above function o...
void setOnVFBPauseIPR(void(*callback)(VRayRenderer &, bool isRendering, double instant, void *userData), const void *userData=nullptr)
VRayImage * getImage() const
unsigned long setProgressiveImageUpdateTimeout(unsigned long timeout)
void setOnVFBClick(void(*callback)(VRayRenderer &, VFBMouseButton button, int x, int y, bool ctrl, bool shift, void *userData), const void *userData=nullptr)
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
void setOnVFBClick(T &object, const void *userData=nullptr)
This is an overloaded member function, provided for convenience. It differs from the above function o...
float getIESPrescribedIntensity(const char *iesLightFileName) const
void setOnVFBUpdateIPR(T &object, const void *userData=nullptr)
This is an overloaded member function, provided for convenience. It differs from the above function o...
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 append(const std::vector< const char * > &fileNames)
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)
int appendAsTextFiltered(const char *fileName, bool(*callback)(VRayRenderer &, const char *pluginType, std::string &pluginName, void *), const void *userData=nullptr)
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 setOnVFBSaveSettingsNotify(T &object, const void *userData=nullptr)
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)
std::vector< ComputeDeviceInfo > getComputeDevicesMetal() const
void setOnVFBSaveSettingsNotify(void(*callback)(VRayRenderer &, double instant, void *userData), const void *userData=nullptr)
void setOnVFBDebugShadingNotify(T &object, const void *userData=nullptr)
This is an overloaded member function, provided for convenience. It differs from the above function o...
T getPlugin(const std::string &pluginName) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
void setOnVFBRenderLast(T &object, const void *userData=nullptr)
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...
int appendFiltered(const std::vector< const char * > &fileNames, bool(*callback)(VRayRenderer &, const char *pluginType, std::string &pluginName, void *), const void *userData=nullptr)
void setOnVFBAddRenderElementToScene(T &object, const void *userData=nullptr)
This is an overloaded member function, provided for convenience. It differs from the above function o...
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...
void setOnCollaborationImageChange(void(*callback)(VRayRenderer &, int imageLoaded, int enhanceSupported, double instant, void *userData), const void *userData=nullptr)
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)
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)
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...
int appendAsTextFiltered(const std::string &fileName, bool(*callback)(VRayRenderer &, const char *pluginType, std::string &pluginName, void *), const void *userData=nullptr)
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
void setOnVFBOpenUpdateNotify(T &object, const void *userData=nullptr)
This is an overloaded member function, provided for convenience. It differs from the above function o...
void setOnVFBCameraSelection(void(*callback)(VRayRenderer &renderer, int itemId, VFBSourceButton sourceButton, void *userData), const void *userData=nullptr)
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....
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=nullptr)
This is an overloaded member function, provided for convenience. It differs from the above function o...
UserPropertyType
Property types for UserPropertyChanged.
Definition: vraysdk.hpp:8065
void setOnVFBClosed(T &object, const void *userData=nullptr)
This is an overloaded member function, provided for convenience. It differs from the above function o...
bool saveIrradianceMapFile(const std::string &fileName)
int exportScene(const char *filePath) const
void setOnVFBCameraSelection(T &object, const void *userData=nullptr)
This is an overloaded member function, provided for convenience. It differs from the above function o...
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 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.
void setOnStateChanged(void(*callback)(VRayRenderer &, RendererState oldState, RendererState newState, double instant, void *), const void *userData=nullptr)
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
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...
void setOnVFBShowMessagesWindow(T &object, const void *userData=nullptr)
This is an overloaded member function, provided for convenience. It differs from the above function o...
bool setUpdatedDefaultProperties()
int loadAsTextFiltered(const char *fileName, T &obj, const void *userData=nullptr)
std::string getUserSceneName()
T newPlugin()
This is an overloaded member function, provided for convenience. It differs from the above function o...
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...
void setVFBCameraSelectionItems(const std::vector< const char * > &items)
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...
void setOnUploadToCollaboration(int(*callback)(VRayRenderer &, const std::vector< std::string > &fileList, double instant, void *), const void *userData=nullptr)
Plugin getInstanceOrCreate(const std::string &pluginName, PluginTypeId pluginTypeId)
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)
void setOnProgressiveImageUpdated(void(*callback)(VRayRenderer &, VRayImage *img, unsigned long long changeIndex, ImagePassType pass, double instant, void *userData), const void *userData=nullptr)
bool waitForVFBClosed() const
void setOnProgress(T &object, const void *userData=nullptr)
This is an overloaded member function, provided for convenience. It differs from the above function o...
int append(const char *fileName, bool drSendNameOnly=false)
void setOnUploadToCollaboration(T &object, const void *userData=nullptr)
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
int appendAsTextFiltered(const char *fileName, T &obj, const void *userData=nullptr)
int appendFiltered(const char *fileName, bool(*callback)(VRayRenderer &, const char *pluginType, std::string &pluginName, void *), const void *userData=nullptr)
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...
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()
int loadAsTextFiltered(const std::string &fileName, bool(*callback)(VRayRenderer &, const char *pluginType, std::string &pluginName, void *), const void *userData=nullptr)
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...
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...
int appendAsTextFiltered(const std::vector< std::string > &sceneTexts, bool(*callback)(VRayRenderer &, const char *pluginType, std::string &pluginName, void *), const void *userData=nullptr)
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...
std::vector< std::string > getPluginTypesOfCategories(const std::vector< PluginCategories > &categories) const
Plugin pickPlugin(int x, int y) const
void setOnVFBInteractiveStart(void(*callback)(VRayRenderer &, bool isRendering, double instant, void *userData), const void *userData=nullptr)
std::vector< ComputeDeviceInfo > getComputeDevicesDenoiser() const
bool getRenderRegion(int &rgnLeft, int &rgnTop, int &rgnWidth, int &rgnHeight) const
void setOnVFBOpenUpdateNotify(void(*callback)(VRayRenderer &, double instant, void *userData), const void *userData=nullptr)
int exportScene(const std::string &filePath) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
void setOnVFBLayersChanged(T &object, const void *userData=nullptr)
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
void setOnVFBAddRenderElementToScene(bool(*callback)(VRayRenderer &, VFBRenderElementType type, double instant, void *userData), const void *userData=nullptr)
void setOnVFBCopyToHostFrameBufferNotify(void(*callback)(VRayRenderer &, double instant, void *userData), const void *userData=nullptr)
bool setCamera(const Plugin &plugin)
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
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
void setOnLicenseError(void(*callback)(VRayRenderer &, const char *msg, int errorCode, LicenseUserStatus userStatus, double instant, void *userData), const void *userData=nullptr)
RendererState getState() const
int appendAsText(const char *text)
bool setCropRegion(int srcWidth, int srcHeight, float rgnLeft, float rgnTop)
void setOnRendererClose(void(*callback)(VRayRenderer &, double instant, void *userData), const void *userData=nullptr)
void renderSequence(SubSequenceDesc descriptions[], size_t count) const
void setOnBucketReady(T &object, const void *userData=nullptr)
This is an overloaded member function, provided for convenience. It differs from the above function o...
void setOnPostEffectsUpdated(T &object, const void *userData=nullptr)
This is an overloaded member function, provided for convenience. It differs from the above function o...
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:9090
void setOnHostConnected(void(*callback)(VRayRenderer &, const char *hostName, double instant, void *userData), const void *userData=nullptr)
std::vector< Plugin > getPlugins(const char *pluginClassName) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
int loadAsText(const char *text, size_t length, void(*freeFn)(char *text, size_t size, T *holderObject)=nullptr, T *holderObject=nullptr)
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:5761
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:403
@ stampFontWeight_light
Light font.
Definition: vraysdk.hpp:405
@ stampFontWeight_bold
Bold font.
Definition: vraysdk.hpp:406
@ stampFontWeight_normal
Normal weight.
Definition: vraysdk.hpp:404
StampFontStyle
Describes the style of a UI font.
Definition: vraysdk.hpp:397
@ stampFontStyle_italic
Italic style.
Definition: vraysdk.hpp:399
@ stampFontStyle_normal
Normal style.
Definition: vraysdk.hpp:398
BlendMode
Definition: vraysdk.hpp:422
@ BlendMode_Saturation
Uses the saturation from the FG, while the value and hue are taken from the BG.
Definition: vraysdk.hpp:445
@ BlendMode_LinearBurn
Same as Color Burn but with less contrast.
Definition: vraysdk.hpp:430
@ BlendMode_Last
Last element.
Definition: vraysdk.hpp:457
@ BlendMode_SplotlightBlend
Also known as 'Spotlight Blend (8bit)'. Same as Spotlight, but additionally brightens the BG.
Definition: vraysdk.hpp:436
@ BlendMode_FgWhiteMask
Definition: vraysdk.hpp:455
@ BlendMode_Add
Adds the FG to the BG.
Definition: vraysdk.hpp:425
@ BlendMode_Subtract
Subtracts the FG from the BG. Does not affect completely black areas.
Definition: vraysdk.hpp:426
@ BlendMode_Hardlight
Also known as 'Hard Light (8bit)'. Spotlight is applied to pixels where the FG is dark and Screen is ...
Definition: vraysdk.hpp:439
@ 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:441
@ BlendMode_Exclusion
Same as Difference but with less contrast.
Definition: vraysdk.hpp:443
@ BlendMode_ColorDodge
Also known as 'Color Dodge (8bit)'. The color of the FG is applied to lighter pixels in the BG.
Definition: vraysdk.hpp:433
@ BlendMode_Background
Use as background.
Definition: vraysdk.hpp:450
@ BlendMode_Lighten
Compares the FG to the BG and takes the lighter of the two.
Definition: vraysdk.hpp:431
@ BlendMode_Overlay
Also known as 'Overlay (8bit)'. Darker pixels become darker where the BG is dark and brighter pixels ...
Definition: vraysdk.hpp:437
@ BlendMode_Multiply
Multiplies the FG by the BG.
Definition: vraysdk.hpp:428
@ BlendMode_Spotlight
Also known as 'Spotlight (8bit)'. Same as Multiply, but with twice the brightness.
Definition: vraysdk.hpp:435
@ BlendMode_Hue
Uses the hue from the FG , while the value and saturation are taken from the BG.
Definition: vraysdk.hpp:444
@ BlendMode_ColorBurn
The color of the FG is applied to darker pixels in the BG.
Definition: vraysdk.hpp:429
@ BlendMode_Average
The average of the current layer (FG) and the result from the layers below it (BG).
Definition: vraysdk.hpp:424
@ BlendMode_Darken
Compares the FG to the BG and takes the darker pixel values of the two.
Definition: vraysdk.hpp:427
@ BlendMode_Difference
Compares the pixels in the BG and FG and subtracts the darker pixels from the brighter ones.
Definition: vraysdk.hpp:442
@ BlendMode_Value
Uses the value from the FG, while the hue and saturation are taken from the BG.
Definition: vraysdk.hpp:447
@ BlendMode_Softlight
Also known as 'Soft Light (8bit)'. Darker pixels become darker where the FG is dark and brighter pixe...
Definition: vraysdk.hpp:438
@ BlendMode_LinearDodge
Also known as 'Linear Dodge (8bit)'. Same as Color Dodge but with less contrast.
Definition: vraysdk.hpp:434
@ 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:440
@ BlendMode_Screen
Makes both light and dark areas lighter.
Definition: vraysdk.hpp:432
@ BlendMode_Color
Uses the hue and saturation from the FG, while the value is taken from the BG.
Definition: vraysdk.hpp:446
@ BlendMode_Foreground
Use as foreground.
Definition: vraysdk.hpp:451
@ BlendMode_Divide
Subtracts the BG from the FG. Dark areas of the render are brightened, while bright areas of the rend...
Definition: vraysdk.hpp:448
@ BlendMode_Overwrite
Displays the current layer (FG) on top of all layers (BG) without blending. This is the default.
Definition: vraysdk.hpp:423
@ BlendMode_Normal
Blends the alpha of the VRayMtlSelect render element's material and other layers.
Definition: vraysdk.hpp:449
Flags
Definition: vraysdk.hpp:348
@ EnumRadioButtons
Specific to Int properties, the UI should use radio buttons.
Definition: vraysdk.hpp:352
@ Stretched
Specifies that when a widget is added it has to be stretched.
Definition: vraysdk.hpp:382
@ NonResettable
Properties with this flag won't be reset by calls to resetPropsToDefaults (e.g. Layer name).
Definition: vraysdk.hpp:368
@ WithoutLineEdit
Definition: vraysdk.hpp:379
@ HorizontalRolloutControls
Definition: vraysdk.hpp:361
@ Hidden
If this flag is raised the property should be temporarily hidden from its "Properties" UI.
Definition: vraysdk.hpp:351
@ Advanced
Indicate a property only visible when toggling advanced properties visibility/export mode or whatever...
Definition: vraysdk.hpp:370
@ ReadOnly
Properties with this flag should be shown with a read only UI.
Definition: vraysdk.hpp:364
@ EnumComboBox
Specific to Int properties, the UI should use a combo box.
Definition: vraysdk.hpp:353
@ Command
Definition: vraysdk.hpp:357
@ ScrollableVerticalRollout
Scrollable rollouts will have their contents in a scroll area.
Definition: vraysdk.hpp:366
@ CollapsibleVerticalRollout
Collapsible rollouts have buttons to collapse/expand them.
Definition: vraysdk.hpp:365
@ NoCustomStyleTag
Properties with this flag will not have Q_PROPERTY for custom styling (e.g. horizontal_rollout_groupb...
Definition: vraysdk.hpp:367
@ HasPipetteTool
Specific to Color property, add an additional pipette tool next to the color swatch button.
Definition: vraysdk.hpp:372
@ Transient
Parameter that is not stored in files.
Definition: vraysdk.hpp:363
@ Internal
No UI should be created in its "Properties" UI.
Definition: vraysdk.hpp:350
@ NoUndo
Properties with this flag don't need undo on changes. Example calculated images, curves for now.
Definition: vraysdk.hpp:369
@ Const
Properties marked as "Const" cannot have their internal value modified (i.e. const).
Definition: vraysdk.hpp:375
StampFontFamily
Describes the family of a UI font.
Definition: vraysdk.hpp:386
@ stampFontFamily_monospaced
Monospaced font.
Definition: vraysdk.hpp:393
@ stampFontFamily_sansSerif
A sans serif font.
Definition: vraysdk.hpp:391
@ stampFontFamily_default
Default family.
Definition: vraysdk.hpp:387
@ stampFontFamily_script
Script font (handwriting).
Definition: vraysdk.hpp:390
@ stampFontFamily_modern
Modern font.
Definition: vraysdk.hpp:392
@ stampFontFamily_roman
Roman (serif) font.
Definition: vraysdk.hpp:389
@ stampFontFamily_decorated
Decorated font.
Definition: vraysdk.hpp:388
Type
Definition: vraysdk.hpp:326
@ Rollout
Not in use!
Definition: vraysdk.hpp:336
@ Double
Not in use!
Definition: vraysdk.hpp:337
@ StampString
Holds two strings - raw string with user entered text and one string with fields replaced.
Definition: vraysdk.hpp:344
@ Image
Not in use!
Definition: vraysdk.hpp:340
@ Stream
Not in use! Binary stream holder.
Definition: vraysdk.hpp:345
@ IntEnum
It is an Int with a fixed number of values.
Definition: vraysdk.hpp:327
@ Curve
Not in use!
Definition: vraysdk.hpp:339
@ CustomPopup
Not in use! Holds a pointer to a CustomPopupMenuCallback, can be nullptr.
Definition: vraysdk.hpp:341
@ UInt32
Not in use!
Definition: vraysdk.hpp:338
@ MaskItemList
Not in use! Holds a list of items used for masking - each item is represented with some id,...
Definition: vraysdk.hpp:342
@ StampFont
Holds a StampFontDesc structure describing a font.
Definition: vraysdk.hpp:343
RGBA color, float32.
Definition: vraysdk.hpp:1571
AColor toSRGB() const noexcept
Creates the copy of this AColor with the values converted from linear to sRGB.
Definition: vraysdk.hpp:1704
void operator-=(const AColor &c) noexcept
Definition: vraysdk.hpp:1605
void operator*=(const AColor &c) noexcept
Definition: vraysdk.hpp:1612
void operator/=(const AColor &c) noexcept
Definition: vraysdk.hpp:1640
void makeWhiteComplement() noexcept
Definition: vraysdk.hpp:1683
void operator+=(const AColor &c) noexcept
Definition: vraysdk.hpp:1598
AColor getWhiteComplement() const noexcept
Returns the white complement of the AColor.
Definition: vraysdk.hpp:1677
float getLength() const noexcept
Returns the length of the RGBA components.
Definition: vraysdk.hpp:1667
float getLengthSquared() const noexcept
Returns the squared sum of the RGBA components.
Definition: vraysdk.hpp:1672
float maxComponentValue() const noexcept
Calculates the magnitude of the greatest color component (the alpha is not taken into account)
Definition: vraysdk.hpp:1689
AColor fromSRGB() const noexcept
Creates the copy of this AColor with the values converted from sRGB to linear.
Definition: vraysdk.hpp:1694
Contains the auto-exposure and auto-white balance values computed during the last light cache calcula...
Definition: vraysdk.hpp:3952
float autoWhiteBalance
The auto-white balance (in Kelvin). 0 means that autoWhiteBalance calculations are not enabled.
Definition: vraysdk.hpp:3954
float ISO
Definition: vraysdk.hpp:3955
float autoExposure
The auto-exposure multiplier. 0 means that autoExposure calculations are not enabled.
Definition: vraysdk.hpp:3953
Attributes storage format: [attrName\0|type{uint8}|value{some_bytes}][...][...]\0.
Definition: vraysdk.hpp:11588
void add(const char(&name)[nameLen], const std::string &value)
Definition: vraysdk.hpp:11678
void add(const std::string &name, const AColor &value)
Definition: vraysdk.hpp:11706
void add(const char *name, size_t nameLen, float value)
Definition: vraysdk.hpp:11756
void add(const std::string &name, const char(&value)[valueLen])
Definition: vraysdk.hpp:11722
void add(const std::string &name, const std::string &value)
Definition: vraysdk.hpp:11729
void add(const char(&name)[count], const AColor &value)
Definition: vraysdk.hpp:11653
BinUserAttributeTypeFlags
Definition: vraysdk.hpp:11610
bool hasData() const
Checks if we've written any attributes.
Definition: vraysdk.hpp:11842
void close()
Definition: vraysdk.hpp:11831
void add(const std::string &name, const Vector &value)
Definition: vraysdk.hpp:11699
IntList toIntList()
Definition: vraysdk.hpp:11850
void add(const char *name, size_t nameLen, const AColor &value)
Definition: vraysdk.hpp:11794
void add(const char *name, size_t nameLen, const char *value, size_t valueLen)
Definition: vraysdk.hpp:11820
void add(const std::string &name, float value)
Definition: vraysdk.hpp:11692
void add(const std::string &name, const char *value, size_t valueLen)
Definition: vraysdk.hpp:11714
std::string toString() const
Definition: vraysdk.hpp:11862
BinUserAttributeType
Definition: vraysdk.hpp:11601
void add(const char *name, size_t nameLen, int value)
Definition: vraysdk.hpp:11737
void add(const char(&name)[nameLen], const char *value, size_t valueLen)
Definition: vraysdk.hpp:11662
void add(const char(&name)[count], float value)
Definition: vraysdk.hpp:11637
void add(const char *name, size_t nameLen, const Vector &value)
Definition: vraysdk.hpp:11772
void add(const char(&name)[nameLen], const char(&value)[valueLen])
Definition: vraysdk.hpp:11670
void add(const char(&name)[count], const Vector &value)
Definition: vraysdk.hpp:11645
void add(const std::string &name, int value)
Definition: vraysdk.hpp:11685
size_t getNumBytes() const
Get number of written bytes.
Definition: vraysdk.hpp:11837
void add(const char(&name)[count], int value)
Definition: vraysdk.hpp:11629
Axis-aligned bounding box.
Definition: vraysdk.hpp:3154
Vector pmax
The upper bounds for the box along the three axes.
Definition: vraysdk.hpp:3156
void expand(const Box &box)
Definition: vraysdk.hpp:3175
void expand(const Vector &point)
Definition: vraysdk.hpp:3160
Vector pmin
The lower bounds for the box along the three axes.
Definition: vraysdk.hpp:3155
Definition: vraysdk.hpp:11536
int cpuCount
Only ServerReady means no error.
Definition: vraysdk.hpp:11564
int vrayVersion
Server V-Ray version number.
Definition: vraysdk.hpp:11567
Status
Definition: vraysdk.hpp:11537
std::string hostConnectedTo
Server is busy connected to ip. Valid only when status is ServerReady.
Definition: vraysdk.hpp:11573
std::string hostResolved
hostName:port translated to ip:port.
Definition: vraysdk.hpp:11570
std::string revisionTime
The time the server revision is built.
Definition: vraysdk.hpp:11576
RGB color, float32.
Definition: vraysdk.hpp:1243
Color getWhiteComplement() const noexcept
Returns the white complement of the Color.
Definition: vraysdk.hpp:1332
float getIntensity() const noexcept
Returns the intensity of the color (also called chroma or saturation) which is the brightness or dull...
Definition: vraysdk.hpp:1284
void makeWhiteComplement() noexcept
Definition: vraysdk.hpp:1338
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:1431
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:1302
static Matrix getRGBtoRGBmatrix(RGBColorSpace srcColorSpace, RGBColorSpace dstColorSpace)
void operator*=(const Color &c) noexcept
Definition: vraysdk.hpp:1364
Color fromSRGB()
Creates the copy of this Color with the values converted from sRGB to linear.
Definition: vraysdk.hpp:1437
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:1289
RGBColorSpace
These color space do not include their corresponding gamma corrections!
Definition: vraysdk.hpp:1263
float getLengthSquared() const noexcept
Returns the squared length of the color.
Definition: vraysdk.hpp:1297
void operator/=(const Color &c) noexcept
Definition: vraysdk.hpp:1398
Color toSRGB()
Creates the copy of this Color with the values converted from linear to sRGB.
Definition: vraysdk.hpp:1446
void operator-=(const Color &c) noexcept
Definition: vraysdk.hpp:1356
void operator+=(const Color &c) noexcept
Definition: vraysdk.hpp:1348
void setContrast(float k, float middle=0.5f) noexcept
Definition: vraysdk.hpp:1324
void setSaturation(float k) noexcept
Definition: vraysdk.hpp:1313
float getPower() const
Returns the sum of all color components.
Definition: vraysdk.hpp:1307
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:3006
long long deviceHandle
Device handle.
Definition: vraysdk.hpp:3007
int ccMajor
CUDA Compute Capability Major version number.
Definition: vraysdk.hpp:3032
int rtCoreVersion
The version of the raytracing cores (if supported). 0 if the GPU does not support RT Cores.
Definition: vraysdk.hpp:3034
int numConnectedDisplays
Number of displays (monitors) attached to this device. -1 if this information is unavailable.
Definition: vraysdk.hpp:3029
Type
Definition: vraysdk.hpp:3020
@ deviceType_CPU
CPU device.
Definition: vraysdk.hpp:3022
@ deviceType_GPU
GPU device.
Definition: vraysdk.hpp:3023
@ deviceType_default
Default.
Definition: vraysdk.hpp:3021
@ deviceType_ACCEL
Accelerated device.
Definition: vraysdk.hpp:3024
int isCpuEmulation
Is device CPU emulated.
Definition: vraysdk.hpp:3042
std::string name
Non-unique displayable name. Device index is its unique identifier.
Definition: vraysdk.hpp:3010
int cudaOrdinalIndex
Cuda ordinal index.
Definition: vraysdk.hpp:3039
int useForRendering
Device is used for rendering.
Definition: vraysdk.hpp:3014
int tccMode
TCC mode.
Definition: vraysdk.hpp:3040
Type deviceType
Device type.
Definition: vraysdk.hpp:3027
int busId
Bus ID.
Definition: vraysdk.hpp:3037
int totalMemoryMB
MegaBytes.
Definition: vraysdk.hpp:3028
int localIndex
Local index.
Definition: vraysdk.hpp:3038
long long platform
Platform.
Definition: vraysdk.hpp:3008
int ccMinor
CUDA Compute Capability Minor version number.
Definition: vraysdk.hpp:3033
int shaderProcessorsCount
Shader processors count.
Definition: vraysdk.hpp:3036
int useForDenoising
Device is used for denoising.
Definition: vraysdk.hpp:3015
int frequencyMHz
Base clock frequency or -1 if not available.
Definition: vraysdk.hpp:3030
int isSupported
Is device supported.
Definition: vraysdk.hpp:3016
int gFlops
Theoretical GFLOPS. 0 or -1 if not available.
Definition: vraysdk.hpp:3031
int gfxArchNum
HIP device architecture.
Definition: vraysdk.hpp:3044
Definition: vraysdk.hpp:3853
FlagVal skipAlpha
True if the alpha channel should NOT be denoised.
Definition: vraysdk.hpp:3862
FlagVal
Definition: vraysdk.hpp:3854
@ Enabled
Will reset the flag.
Definition: vraysdk.hpp:3856
@ Default
Will set the flag.
Definition: vraysdk.hpp:3857
FlagVal panorama
True if denoised image is wrapped around the left/right border.
Definition: vraysdk.hpp:3861
FlagVal hideDest
Hide destination channel in VFB.
Definition: vraysdk.hpp:3860
FlagVal optixUpscale
True if the optix denoiser should use the upscaling mode. Does nothing for other engines.
Definition: vraysdk.hpp:3863
FlagVal allowInSingleChannelFiles
True to allow writing to single channel files too. Off by default.
Definition: vraysdk.hpp:3864
FlagVal skipAuxElementsInFiles
True to skip writing the additional channels to files.
Definition: vraysdk.hpp:3865
The necessary parameters passed to the VRayRenderer::enableDRClient interface.
Definition: vraysdk.hpp:4037
bool withBroadcastListener
True if a broadcast listener socket was created.
Definition: vraysdk.hpp:4044
std::string httpProxy
server:port connection parameter for http connections via proxy
Definition: vraysdk.hpp:4039
int connectTimeout
Initial connection timeout in seconds.
Definition: vraysdk.hpp:4050
std::string dispatcher
can either be an empty string or host[:port]
Definition: vraysdk.hpp:4038
int verboseLevel
Numeric progress verbosity level from 0 (none) to 4 (all, incl. debug)
Definition: vraysdk.hpp:4052
bool enableAssigningWUsAsBackups
TransferrableDrOptions.
Definition: vraysdk.hpp:4046
bool localRendering
True if, when local dispatcher selected, it's configured to spawn a local render server.
Definition: vraysdk.hpp:4043
int upstreamChannels
Number of upstream connections, which the client side will use, when pipelining is not enabled.
Definition: vraysdk.hpp:4051
bool pipelinedUpstream
Whether to use pipelining. Note pipelining will be disabled internally (even if requested),...
Definition: vraysdk.hpp:4045
Used by VRayRenderer::getImage() and RenderElement::getImage()
Definition: vraysdk.hpp:2656
ImageRegion region
Optional crop rectangle.
Definition: vraysdk.hpp:2657
bool flipImage
Flip image top-bottom.
Definition: vraysdk.hpp:2660
bool doColorCorrect
Whether to apply VFB color corrections.
Definition: vraysdk.hpp:2658
bool stripAlpha
Set alpha to 1.
Definition: vraysdk.hpp:2659
A rectangle defined by top-left and bottom-right frame coordinates.
Definition: vraysdk.hpp:254
Options passed to VRayRenderer::saveImage.
Definition: vraysdk.hpp:877
enum VRay::ImageWriterOptions::CompressionType compressionType
for EXR format only
int bitsPerChannel
for EXR format only - either 16 or 32
Definition: vraysdk.hpp:912
Additional parameter flags for Instancer and Instancer2 plugins.
Definition: vraysdk.hpp:3932
static const int useUserAttributesBin
Use binary user attributes.
Definition: vraysdk.hpp:3944
static const int useObjectProperties
Use object properties.
Definition: vraysdk.hpp:3945
static const int useParentTimesAtleastForGeometry
Definition: vraysdk.hpp:3937
static const int useSkipCryptomatte
Skip registering Node for the Cryptomatte.
Definition: vraysdk.hpp:3942
static const int useMaterial
Use material override.
Definition: vraysdk.hpp:3939
static const int useGeometry
Use geometry override.
Definition: vraysdk.hpp:3940
static const int useMapChannels
Use additional map channels.
Definition: vraysdk.hpp:3941
static const int useRenderIDOverride
Use renderIDOverride.
Definition: vraysdk.hpp:3943
Definition: vraysdk.hpp:3123
unsigned long long usage
The name of the memory type category.
Definition: vraysdk.hpp:3125
Current rendering progress.
Definition: vraysdk.hpp:3114
std::string name
name of the device
Definition: vraysdk.hpp:3115
float totalMem
total mem in mega bytes
Definition: vraysdk.hpp:3118
float utilization
usage (from 0.0f to 100.0f)
Definition: vraysdk.hpp:3116
float freeMem
free mem in mega bytes
Definition: vraysdk.hpp:3117
Returned by VRayRenderer::getInteractiveStatistics when rendering in interactive mode.
Definition: vraysdk.hpp:3106
float currentNoiseThreshold
Current noise threshold. Useful when dynamic noise threshold is enabled.
Definition: vraysdk.hpp:3111
unsigned elapsedTicks
Time since start.
Definition: vraysdk.hpp:3108
std::vector< ComputeDeviceStatistics > computeDevices
array of statistics for each device with valid data
Definition: vraysdk.hpp:3121
std::vector< ComputeDeviceMemoryType > computeDevicesMemUsage
Memory usage by memory type.
Definition: vraysdk.hpp:3128
double pathsPerSecond
Number of camera rays traced per second.
Definition: vraysdk.hpp:3107
int sampleLevel
Number of samples per pixel accumulated.
Definition: vraysdk.hpp:3109
int numPasses
Number of sampling passes done.
Definition: vraysdk.hpp:3110
Parameters for setLicenseServer(). Only serverName is obligatory.
Definition: vraysdk.hpp:4278
std::string proxyUserName
Optional http proxy server.
Definition: vraysdk.hpp:4292
std::string serverName1
Optional alternative server if the primary doesn't work.
Definition: vraysdk.hpp:4286
std::string serverName2
Optional second alternative server.
Definition: vraysdk.hpp:4289
int serverPort
default port is 30304
Definition: vraysdk.hpp:4280
std::string proxyName
Optional http proxy server.
Definition: vraysdk.hpp:4281
bool useSecureConnection
Must be true to enable the secure connection.
Definition: vraysdk.hpp:4295
std::string username
Optional login.
Definition: vraysdk.hpp:4283
std::string serverName
Primary license server - hostname or IP address.
Definition: vraysdk.hpp:4279
bool useCustomCertificate
True to enable the usage of the custom certificate file path to be used for secure connection.
Definition: vraysdk.hpp:4300
int safeModeFlags
Do not use without explicit instructions. Added as precaution.
Definition: vraysdk.hpp:4298
std::string secureServer
Must be set to "ols.chaos.com" to use the Chaos Cloud licensing.
Definition: vraysdk.hpp:4296
std::string proxyPassword
Login for the optional proxy server.
Definition: vraysdk.hpp:4293
std::string password
For the optional login.
Definition: vraysdk.hpp:4284
Definition: vraysdk.hpp:6225
bool isApplied
[In] Is the channel enabled.
Definition: vraysdk.hpp:6230
Color colorMult
[In] Can be empty for the rest channel.
Definition: vraysdk.hpp:6227
float intensityMult
[In] Color multiplier.
Definition: vraysdk.hpp:6228
bool enabled
[In] Intensity multiplier.
Definition: vraysdk.hpp:6229
Definition: vraysdk.hpp:4064
3x3 column-major matrix, float32
Definition: vraysdk.hpp:1853
void simpleDecompose(const Matrix &m, Vector &rotation, Vector &scale, Vector &shear) noexcept
Definition: vraysdk.hpp:2289
void setRow(const int i, const Vector &a) noexcept
Definition: vraysdk.hpp:1925
Matrix makeMatrixFromRowMajor(const Vector &a, const Vector &b, const Vector &c) noexcept
Definition: vraysdk.hpp:2272
void makeTranspose(void) noexcept
Make the matrix to be the transpose of its currrent value.
Definition: vraysdk.hpp:1958
Vector & operator[](const int index) noexcept
Return the i-th column of the matrix (i=0,1,2).
Definition: vraysdk.hpp:1859
void operator+=(const Matrix &m) noexcept
Definition: vraysdk.hpp:2016
Matrix inverse(const Matrix &m) noexcept
Definition: vraysdk.hpp:2056
Matrix makeRotationMatrixX(float xrot) noexcept
Definition: vraysdk.hpp:2230
Matrix makeRotationMatrixY(float yrot) noexcept
Definition: vraysdk.hpp:2239
Matrix noScale(const Matrix &m) noexcept
Definition: vraysdk.hpp:2192
void makeIdentity(void) noexcept
Make the matrix the identity matrix.
Definition: vraysdk.hpp:1937
bool makeInverse(void) noexcept
Definition: vraysdk.hpp:1968
void makeDiagonal(const Vector &a) noexcept
Definition: vraysdk.hpp:1945
Matrix() noexcept=default
Constructor - initializes all components to zero.
void setCol(const int i, const Vector &a) noexcept
Definition: vraysdk.hpp:1918
Matrix makeRotationMatrixZ(float zrot) noexcept
Definition: vraysdk.hpp:2248
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:2031
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:2010
Matrix(Vector diagonal) noexcept
Constructor to diagonal matrix.
Definition: vraysdk.hpp:1880
void makeZero(void) noexcept
Make the matrix the zero matrix (all elements are zeroes).
Definition: vraysdk.hpp:1930
void set(float value) noexcept
Make diagonal matrix.
Definition: vraysdk.hpp:1901
Matrix normalize(const Matrix &m) noexcept
Definition: vraysdk.hpp:2184
void operator-=(const Matrix &m) noexcept
Definition: vraysdk.hpp:2024
Vector rotationAngles(const Matrix &m) noexcept
Definition: vraysdk.hpp:2204
void set(const Matrix &other) noexcept
Definition: vraysdk.hpp:1909
Vector scale(const Matrix &m) noexcept
Definition: vraysdk.hpp:2198
Matrix(const Vector &a, const Vector &b, const Vector &c) noexcept
Definition: vraysdk.hpp:1886
void operator*=(float x) noexcept
Multiply all elements in the matrix by the given number.
Definition: vraysdk.hpp:2005
Matrix rotate(const Matrix &m, const Vector &axis) noexcept
Definition: vraysdk.hpp:2178
void set(const Vector &a, const Vector &b, const Vector &c) noexcept
Definition: vraysdk.hpp:1896
A container for the data necessary to a export vrmesh with geometry, hair or particles....
Definition: vraysdk.hpp:6158
ValueList hairVertices
ValueList( VectorList ) (single frame) OR ValueList( ValueList(int, VectorList) ) (multiple frames - ...
Definition: vraysdk.hpp:6169
ValueList vertices
ValueList( VectorList ) (single frame) OR ValueList( ValueList(int, VectorList) ) (multiple frames - ...
Definition: vraysdk.hpp:6159
ValueList mapChannels
ValueList( ValueList(int, VectorList, IntList) )
Definition: vraysdk.hpp:6165
ValueList hairWidths
ValueList( FloatList ) (single frame) OR ValueList( ValueList(int, FloatList ) ) (multiple frames - ...
Definition: vraysdk.hpp:6171
ValueList hairVerticesPerStrand
ValueList( IntList ) (single frame) OR ValueList( ValueList(int, IntList ) ) (multiple frames - ...
Definition: vraysdk.hpp:6170
ValueList particleWidths
ValueList( FloatList ) (single frame) OR ValueList( ValueList(int, FloatList ) ) (multiple frames - ...
Definition: vraysdk.hpp:6173
ValueList faces
ValueList( IntList ) (single frame) OR ValueList( ValueList(int, IntList ) ) (multiple frames - ...
Definition: vraysdk.hpp:6160
ValueList mapChNames
ValueList( StringList )
Definition: vraysdk.hpp:6166
ValueList shaderNames
ValueList( ValueList(int, string) )
Definition: vraysdk.hpp:6167
ValueList faceNormals
ValueList( IntList ) (single frame) OR ValueList( ValueList(int, IntList ) ) (multiple frames - ...
Definition: vraysdk.hpp:6162
ValueList normals
ValueList( VectorList ) (single frame) OR ValueList( ValueList(int, VectorList) ) (multiple frames - ...
Definition: vraysdk.hpp:6161
ValueList velocities
ValueList( VectorList ) (single frame) OR ValueList( ValueList(int, VectorList) ) (multiple frames - ...
Definition: vraysdk.hpp:6163
ValueList faceMtlIDs
ValueList( IntList ) (single frame) OR ValueList( ValueList(int, IntList ) ) (multiple frames - ...
Definition: vraysdk.hpp:6164
ValueList edgeVisibility
ValueList( IntList ) (single frame) OR ValueList( ValueList(int, IntList ) ) (multiple frames - ...
Definition: vraysdk.hpp:6168
ValueList particleVertices
ValueList( VectorList ) (single frame) OR ValueList( ValueList(int, VectorList) ) (multiple frames - ...
Definition: vraysdk.hpp:6172
Helper structure storing the relevant configuration entries as they were read from the configuration ...
Definition: vraysdk.hpp:10889
char familySeparator
The separator that is used to distinguish different families for UI separation.
Definition: vraysdk.hpp:10905
std::string getErrorString() const
Get whether there was any error with the loading of the OCIO configuration.
Definition: vraysdk.hpp:10943
OCIOConfigurationData(const char *fileName=nullptr, SourceMode vraySourceType=SourceMode::Automatic)
Definition: vraysdk.hpp:10911
std::vector< std::string > roles
List of the stored roles in the configuration.
Definition: vraysdk.hpp:10895
std::vector< std::string > looks
List of the looks in the configuration.
Definition: vraysdk.hpp:10899
std::vector< std::string > viewTransforms
List of unique view transformations from the configuration.
Definition: vraysdk.hpp:10903
std::vector< std::string > colorSpaces
List of the stored color spaces in the configuration.
Definition: vraysdk.hpp:10891
std::vector< std::string > devices
List of devices as read from the configuration.
Definition: vraysdk.hpp:10901
std::vector< std::string > roleColorSpaces
List of corresponding color spaces for each role. Size will match the roles size.
Definition: vraysdk.hpp:10897
std::vector< std::string > colorSpaceFamilies
List of stored color space families for the configuration. May be empty.
Definition: vraysdk.hpp:10893
Definition: vraysdk.hpp:11002
std::vector< OSLInputParameter > inputParams
Input parameters defined in the shader file.
Definition: vraysdk.hpp:11006
std::vector< std::string > outputColorParams
Output color parameters defined in the shader file.
Definition: vraysdk.hpp:11003
std::vector< std::string > outputFloatParams
Output float parameters defined in the shader file.
Definition: vraysdk.hpp:11004
std::vector< std::string > outputClosureParams
Output closure parameters defined in the shader file.
Definition: vraysdk.hpp:11005
The info contained in geometry, hair or particle objects.
Definition: vraysdk.hpp:3139
std::string name
the name of the object
Definition: vraysdk.hpp:3140
int id
the id of the object
Definition: vraysdk.hpp:3141
int vEnd
the end of the voxel range of the object (vEnd is excluded from the range)
Definition: vraysdk.hpp:3143
int vBegin
the begin of the voxel range of the object (vBegin is included in the range)
Definition: vraysdk.hpp:3142
Returned by VRayRenderer::getLastParserError. Use to diagnose problems when loading vrscene files.
Definition: vraysdk.hpp:4382
See VRayRenderer::pickPlugins.
Definition: vraysdk.hpp:6177
This struct is used to determine if a plugin type is of certain category.
Definition: vraysdk.hpp:4643
bool hasGeometricObjectCategory() const noexcept
Is the plugin of category_geometric_object.
Definition: vraysdk.hpp:4665
bool hasInstancerCategory() const noexcept
Is the plugin of category_instancer.
Definition: vraysdk.hpp:4750
unsigned long long pluginCategoryField
bitfield of the plugin categories
Definition: vraysdk.hpp:4644
bool hasTextureFloatCategory() const noexcept
Is the plugin of category_texture_float.
Definition: vraysdk.hpp:4705
bool hasHairCategory() const noexcept
Is the plugin of category_hair.
Definition: vraysdk.hpp:4745
bool hasUvwgenCategory() const noexcept
Is the plugin of category_uvwgen.
Definition: vraysdk.hpp:4730
bool hasBsdfCategory() const noexcept
Is the plugin of category_bsdf.
Definition: vraysdk.hpp:4660
bool hasRenderChannelCategory() const noexcept
Is the plugin of category_render_channel.
Definition: vraysdk.hpp:4685
bool hasSettingsCategory() const noexcept
Is the plugin of category_settings.
Definition: vraysdk.hpp:4695
bool hasMaterialCategory() const noexcept
Is the plugin of category_material.
Definition: vraysdk.hpp:4680
bool hasBitmapCategory() const noexcept
Is the plugin of category_bitmap.
Definition: vraysdk.hpp:4655
bool hasRenderViewCategory() const noexcept
Is the plugin of category_render_view.
Definition: vraysdk.hpp:4690
bool hasGeometrySourceCategory() const noexcept
Is the plugin of category_geometry_source.
Definition: vraysdk.hpp:4670
bool hasLightCategory() const noexcept
Is the plugin of category_light.
Definition: vraysdk.hpp:4675
bool hasVolumetricCategory() const noexcept
Is the plugin of category_volumetric.
Definition: vraysdk.hpp:4735
bool hasTextureIntCategory() const noexcept
Is the plugin of category_texture_int.
Definition: vraysdk.hpp:4710
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:4725
bool hasTextureCategory() const noexcept
Is the plugin of category_texture.
Definition: vraysdk.hpp:4700
bool hasCameraCategory() const noexcept
Is the plugin of category_camera.
Definition: vraysdk.hpp:4740
bool hasTextureMatrixCategory() const noexcept
Is the plugin of category_texture_matrix.
Definition: vraysdk.hpp:4715
bool hasTextureTransformCategory() const noexcept
Is the plugin of category_texture_transform.
Definition: vraysdk.hpp:4720
Used by VRay::Proxy::createMeshFile()
Definition: vraysdk.hpp:3755
std::string customPreviewFile
file name to read and use its vertices and faces for the preview voxel
Definition: vraysdk.hpp:3791
int previewType
Definition: vraysdk.hpp:3783
std::string destination
destination file name
Definition: vraysdk.hpp:3780
int startFrame
used if animOn is true
Definition: vraysdk.hpp:3785
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:3789
PreviewTypes
Definition: vraysdk.hpp:3756
@ SIMPLIFY_FACE_SAMPLING
Definition: vraysdk.hpp:3760
@ SIMPLIFY_COMBINED
Definition: vraysdk.hpp:3775
@ SIMPLIFY_CLUSTERING
Definition: vraysdk.hpp:3764
@ SIMPLIFY_EDGE_COLLAPSE
Definition: vraysdk.hpp:3768
int endFrame
used if animOn is true
Definition: vraysdk.hpp:3786
Bool exportPointCloud
when enabled, adds a point cloud representation of the mesh separated into different levels of detail...
Definition: vraysdk.hpp:3796
float pointSize
determines the size of point cloud disks at the most detailed level. If this value is small,...
Definition: vraysdk.hpp:3797
int previewParticles
number of preview particles (default 20000)
Definition: vraysdk.hpp:3799
std::vector< Color > voxelInfoWireColor
array of diffuse (wire) colors - 1 Color per mesh object
Definition: vraysdk.hpp:3792
std::vector< int > objectIDs
array of unique IDs for the respective meshes. This should usually match Node.objectID values.
Definition: vraysdk.hpp:3790
int previewFaces
approximate number of preview triangles (default 10000; set to 0 to disable preview)
Definition: vraysdk.hpp:3782
int mergeVoxels
merge all voxels of the same type, before subdivision
Definition: vraysdk.hpp:3787
std::vector< Bool > voxelInfoFlipNormals
array of flipNormals flags (1 flag per mesh object - true if the geometric normals should be flipped)
Definition: vraysdk.hpp:3794
int previewHairs
number of preview hairs (default 1000)
Definition: vraysdk.hpp:3798
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:3793
Bool bakeTransforms
when enabled (default), applies the input Transform(s) to the geometry data, otherwise writes the Tra...
Definition: vraysdk.hpp:3800
int elementsPerVoxel
number of triangles in each voxel
Definition: vraysdk.hpp:3781
int animOn
enables saving multiple animated frames in the proxy
Definition: vraysdk.hpp:3784
The necessary parameters for reading data in a proxy file.
Definition: vraysdk.hpp:3804
int flip_axis
0 do not rotate; 1 transform from Maya to 3dsMax coordinate system (90 deg. rotation around x axis); ...
Definition: vraysdk.hpp:3808
float particle_width_multiplier
a multiplier to the particle width data
Definition: vraysdk.hpp:3825
float smooth_angle
smooth angle in degrees
Definition: vraysdk.hpp:3813
int compute_normals
true to calculate smooth normals
Definition: vraysdk.hpp:3807
int num_preview_faces
number of faces in preview
Definition: vraysdk.hpp:3812
bool use_full_names
read the full path instead of only the name
Definition: vraysdk.hpp:3817
float hair_width_multiplier
a multiplier to the hair width data
Definition: vraysdk.hpp:3824
bool compute_bbox
true to compute the bounding box, false to read it from the file
Definition: vraysdk.hpp:3818
std::string file
file name to read
Definition: vraysdk.hpp:3805
bool subdiv_uvs
subdivide or skip mapping channels
Definition: vraysdk.hpp:3820
int subdiv_level
the subdivision level
Definition: vraysdk.hpp:3809
std::string object_path
starting object path in Alembic hierarchy
Definition: vraysdk.hpp:3806
bool use_alembic_offset
true to use Alembic animation frame offset
Definition: vraysdk.hpp:3823
float fps
frames per second for calculation of current time and frame
Definition: vraysdk.hpp:3816
bool instancing
turns on/off the instancing of Alembic duplicated objects
Definition: vraysdk.hpp:3822
bool subdiv_preserve_geom_borders
if true, the borders won't be subdivided
Definition: vraysdk.hpp:3821
int anim_type
animated proxy playback type(0 - loop; 1 - once; 2 - ping - pong; 3 - still)
Definition: vraysdk.hpp:3811
float anim_speed
animated proxy playback speed
Definition: vraysdk.hpp:3814
int subdiv_preserve_map_borders
determines the smoothing mode of the mapping channels' borders. 0-None, 1-Internal and 2-All
Definition: vraysdk.hpp:3810
bool subdiv_all_meshes
true to subdivide Alembic PolyMesh and SubD objects; false to subdivide only SubD objects
Definition: vraysdk.hpp:3819
float anim_offset
animated proxy initial frame offset
Definition: vraysdk.hpp:3815
Controls what the buffer returned by getData() contains.
Definition: vraysdk.hpp:2896
Plugin * alphaChannelPlugin
The plugin describing the alpha channel render element. Can be nullptr.
Definition: vraysdk.hpp:2906
bool rgbOrder
true - RGB order, false - BGR order
Definition: vraysdk.hpp:2909
bool useDefaultAlpha
Use any existing alpha render channel.
Definition: vraysdk.hpp:2907
PixelFormat format
The desired pixel format.
Definition: vraysdk.hpp:2908
int layerIndex
For multi-layer elements only. The Cryptomatte layer index (between 0 and num_level/2)....
Definition: vraysdk.hpp:2911
ImageRegion * region
An optional image region rectange; nullptr means the whole image.
Definition: vraysdk.hpp:2910
This structure is used to return information about a particular channel in the VFB.
Definition: vraysdk.hpp:2841
BinaryFormat binaryFormat
The channel binary format.
Definition: vraysdk.hpp:2843
Type type
The channel type/alias.
Definition: vraysdk.hpp:2844
const char * name
The name of the channel as it appears in the VFB.
Definition: vraysdk.hpp:2842
Definition: vraysdk.hpp:6197
int rgnLeft
Render region left.
Definition: vraysdk.hpp:6211
int rgnTop
Render region top.
Definition: vraysdk.hpp:6212
float cropRgnHeight
Crop region height.
Definition: vraysdk.hpp:6204
int bmpHeight
Output bitmap height. This is the sampling resolution, not the file resolution.
Definition: vraysdk.hpp:6200
int imgHeight
Output image height.
Definition: vraysdk.hpp:6208
float cropRgnLeft
Crop region left.
Definition: vraysdk.hpp:6201
int rgnHeight
Render region height.
Definition: vraysdk.hpp:6214
float cropRgnTop
Crop region top.
Definition: vraysdk.hpp:6202
int bmpWidth
Output bitmap width. This is the sampling resolution, not the file resolution.
Definition: vraysdk.hpp:6199
int imgWidth
Output image width.
Definition: vraysdk.hpp:6207
int rgnWidth
Render region width.
Definition: vraysdk.hpp:6213
int bitmask
Bitmask which indicates which part to be set or has been set.
Definition: vraysdk.hpp:6222
float cropRgnWidth
Crop region width.
Definition: vraysdk.hpp:6203
Combines various options required for the rendering process.
Definition: vraysdk.hpp:3970
bool showVfbButtonCopyToHostFrameBuffer
show "Duplicate to host frame buffer" button
Definition: vraysdk.hpp:4001
bool showVfbButtonIPRUpdate
show "Update IPR" button
Definition: vraysdk.hpp:4000
bool showVfbAddDenoiserREToSceneButton
show "Add Denoiser to the scene" button
Definition: vraysdk.hpp:4003
std::string vfbLanguage
[OPTIONAL] A language code string telling the VFB which builtin language to load (from VRay::Language...
Definition: vraysdk.hpp:4014
bool showVfbAddLightMixREToSceneButton
show "Add LightMix to the scene" button
Definition: vraysdk.hpp:4002
ThemeStyle vfbDrawStyle
specifies VFB drawing style
Definition: vraysdk.hpp:3981
bool useVfbLog
use built-in VFB log
Definition: vraysdk.hpp:3995
bool noRenderLicensePreCheck
if set appsdk will not check for render node license before rendering is started
Definition: vraysdk.hpp:3988
bool showVfbButtonTestResolution
show "Test Resolution" button
Definition: vraysdk.hpp:3998
bool enableVfbPlugins
Allow the VFB to load plugins.
Definition: vraysdk.hpp:3996
bool showVfbButtonIPRPause
show "Pause IPR" button
Definition: vraysdk.hpp:3999
ThemeStyle
Specifies the drawing style of the VFB widgets.
Definition: vraysdk.hpp:3973
bool hideToSceneButton
hide Light Mix To Scene button
Definition: vraysdk.hpp:3994
bool useDefaultVfbTheme
enabled by default. If set to false the parent application theme is inherited
Definition: vraysdk.hpp:3989
bool enableFrameBuffer
true to enable the frame buffer
Definition: vraysdk.hpp:3986
bool showVfbButtonDebugShading
show "IPR Debug Shading" button
Definition: vraysdk.hpp:3997
bool dockFrameBuffer
dock V-Ray Frame Buffer window
Definition: vraysdk.hpp:3993
bool allowInvalidCharactersInPluginNames
allow invalid characters in plugin names
Definition: vraysdk.hpp:3992
std::string pluginLibraryPath
[OPTIONAL] specifies additional, non-default plugin library paths to load vray_*.dll (libvray_*....
Definition: vraysdk.hpp:4012
bool showFrameBuffer
true to initially show the frame buffer
Definition: vraysdk.hpp:3987
bool previewRenderer
optimize the renderer for small preview purposes
Definition: vraysdk.hpp:3991
bool showVfbButtonInteractiveStart
show "Start IPR" button
Definition: vraysdk.hpp:3990
Definition: vraysdk.hpp:3830
std::string outputFileName
Definition: vraysdk.hpp:3833
bool compressProgressiveFiles
Set to false to disable compression. (These files can get quite large)
Definition: vraysdk.hpp:3836
int progressiveAutoSaveSeconds
Definition: vraysdk.hpp:3846
bool deleteResumableFileOnSuccess
Definition: vraysdk.hpp:3841
See encodeScannedMaterialParams() and getScannedMaterialUILicense()
Definition: vraysdk.hpp:4389
This structure contains the parameters used in the rendering of the scanned materials.
Definition: vraysdk.hpp:4404
int dome
the mapping channel
Definition: vraysdk.hpp:4450
int triplanar
Clear coat multiplier.
Definition: vraysdk.hpp:4472
float ccmul
This parameter modifies the clear coat reflection to metalic behavior, i.e., it modulates the reflect...
Definition: vraysdk.hpp:4471
float cutoff
the reflection rays count, the UI contains subdivision parameter, this must be seto to the square val...
Definition: vraysdk.hpp:4448
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:4463
float sceneScale
used when the plain option is set to PL_SCRAMBLE, determines the size of the pieces that are continuo...
Definition: vraysdk.hpp:4454
Bool noCachedGI
the output color space (Not used anymore, replaced by the vray color space)
Definition: vraysdk.hpp:4469
ColorSpace
Definition: vraysdk.hpp:4425
@ CS_PP
adobe rgb
Definition: vraysdk.hpp:4428
@ CS_ADOBE
sRGB - linear
Definition: vraysdk.hpp:4427
float saturation
inverse gamma
Definition: vraysdk.hpp:4439
Transform uvtrans
general result multiplier (tint)
Definition: vraysdk.hpp:4443
int noPrimGI
edge displacement, used to prevent the flat appearance of the edges
Definition: vraysdk.hpp:4461
MapChannelsMask mapChBitmask
multiplies the transparency (only the transparency, the translucency remains!) (Not used anymore)
Definition: vraysdk.hpp:4465
float fltStrength
strength of the replace paint effect
Definition: vraysdk.hpp:4467
int disablewmap
displacement/paralax multiplier
Definition: vraysdk.hpp:4441
float sssmul
Clear coat glossiness variation, the measured value is kept in presets.scratchdens.
Definition: vraysdk.hpp:4477
Triplanar
Definition: vraysdk.hpp:4431
@ TP_RNDOFFS
Enable triplanar.
Definition: vraysdk.hpp:4433
@ TP_RNDROT
Enable random offset.
Definition: vraysdk.hpp:4434
float retrace
the primary rays are rendered without using the GI engine (better acuracity, lower speed) (Not used a...
Definition: vraysdk.hpp:4462
ColorSpace clrSpace
strength of the filter
Definition: vraysdk.hpp:4468
int twoside
uniform reflections distribution, when nonzero the importance sampling is not used
Definition: vraysdk.hpp:4459
int displace
same as two side in the standard material
Definition: vraysdk.hpp:4460
int fasttrans
Controls the triplanar mapping, combination of enum Triplanar flags.
Definition: vraysdk.hpp:4473
int nsamples
the z value of the view vector below which bump is gradualy applied
Definition: vraysdk.hpp:4447
MapChannels
Definition: vraysdk.hpp:4412
@ VRSM_FILTER
the color of the material
Definition: vraysdk.hpp:4414
@ VRSM_CCMULT
general color multiplier
Definition: vraysdk.hpp:4415
float paintStrength
bitmask for the maps used in the rendering
Definition: vraysdk.hpp:4466
MapChannelsMask
These values can be combined. Each bit enables the corresponding feature.
Definition: vraysdk.hpp:4419
float transpMul
force opaque rendering even if backside lighting is present.
Definition: vraysdk.hpp:4464
Plain
Definition: vraysdk.hpp:4405
@ PL_HMGSYM
the material is homogenous and potentially anisotropic, an averaged brdf is used instead texture,...
Definition: vraysdk.hpp:4408
@ PL_TRIPLANAR
the material is homogenous and isotropic , no uv mapping is needed
Definition: vraysdk.hpp:4409
@ PL_HMG
no plain strategy
Definition: vraysdk.hpp:4407
int mapChannel
stop of the indirect ray if the total weight is below this value
Definition: vraysdk.hpp:4449
float multdirect
prevent double lighting by direct and reflection rays (not used anymore)
Definition: vraysdk.hpp:4451
float bumpstart
bump multiplier for the inclined views
Definition: vraysdk.hpp:4446
float scrambleSize
limit for the tracing recursion
Definition: vraysdk.hpp:4453
float ccglossyvar
Clear coat glossiness, the measured value is kept in presets.specbell.
Definition: vraysdk.hpp:4476
int usemap
uv mapping transformation matrix
Definition: vraysdk.hpp:4444
float ccbump
clear coat highlights
Definition: vraysdk.hpp:4457
float bumpmul
not used
Definition: vraysdk.hpp:4445
int traceDepth
multipliers for different parts of the light (not used anymore)
Definition: vraysdk.hpp:4452
ScannedMaterialParams()
sss thickness multiplier
int cchlight
the clear coat ior, used for carpaints and other materials with thin refractive layer
Definition: vraysdk.hpp:4456
Color filter
disable use of the enlargement, directly the original small sample is used for rendering (Not used an...
Definition: vraysdk.hpp:4442
float ccmetalrefl
rendering without using the GI engine at all (but most scenes have low scanned materials in count)
Definition: vraysdk.hpp:4470
int BWforGI
Used in volumetric translucency calculation, switches between two models of calculation,...
Definition: vraysdk.hpp:4474
float ccior
the size of one scene unit in cm
Definition: vraysdk.hpp:4455
int unfRefl
used to make the clear coat not perfect
Definition: vraysdk.hpp:4458
float invgamma
this option modifies the rendering in order to improve the result for materials without large details
Definition: vraysdk.hpp:4438
float ccglossy
The material is represented as non colored for the GI rays, used to prevent the color bleeding when t...
Definition: vraysdk.hpp:4475
Definition: vraysdk.hpp:4517
float specbell
Controls how to use the smooth brdf model.
Definition: vraysdk.hpp:4538
int plain
ClearCoat index of reflection.
Definition: vraysdk.hpp:4524
float shdmul
Height multiplier for self shadowing.
Definition: vraysdk.hpp:4535
float fuzzy
Controls the pure reflective behavior for inclined angles, a feature typical for brushed metal.
Definition: vraysdk.hpp:4542
float bumpstart
Bump multiplier for the inclined views.
Definition: vraysdk.hpp:4526
float topvLs_A
Used mostly with top view fabrics, modifies the rendering of the inclined views making them blurred a...
Definition: vraysdk.hpp:4543
float bumpmul
Plain materials strategy.
Definition: vraysdk.hpp:4525
float lfsizecm
value used to control the function converting translucency to transparency
Definition: vraysdk.hpp:4551
float free7
CC specular multiplier (Not used anymore)
Definition: vraysdk.hpp:4540
float orgglvar
the clear coat glossiness the inverse angle deviation width (60 is one degree), since 20....
Definition: vraysdk.hpp:4530
float specmul
CC specular highlights, inverse bell width (60 is one degree)
Definition: vraysdk.hpp:4539
float ccmetalrefl
Multiplier of the indirect light, used to handle the fluorescent materials by putting value below 1 i...
Definition: vraysdk.hpp:4547
ScannedMaterialPreset()
The large feature map physical size.
float orggls
Clear coat noise-like bump amount (there is separate hmap bump)
Definition: vraysdk.hpp:4529
int forcebrdf
Used to render materials with sharp sparks, a procedural map with relative size this param is used to...
Definition: vraysdk.hpp:4537
float indmul
When flakes is nonzero (spark mode) this parameter specifies to not scramble the uv coordinates.
Definition: vraysdk.hpp:4546
int triplanar
The sample thickness in mm, used to introduce alpha/translucency correction of thick materials.
Definition: vraysdk.hpp:4549
int keepflakesuv
Not used anymore (set to 1)
Definition: vraysdk.hpp:4545
float topvLs_B
Used in top view materials to control the light direction correction.
Definition: vraysdk.hpp:4544
int flakes
Brightness multiplier for self shadowing.
Definition: vraysdk.hpp:4536
float depthmul
The z-value of the view vector below which bump is gradualy applied.
Definition: vraysdk.hpp:4527
float transpf
used to force triplanar mapping when certain customer has old vray (luxottica)
Definition: vraysdk.hpp:4550
SmoothModelFlags
Definition: vraysdk.hpp:4518
@ SMF_PS
when set, the BRDF is "forced"
Definition: vraysdk.hpp:4520
@ SMF_FORCE
used in forcebrdf
Definition: vraysdk.hpp:4519
float shdhmul
Clear coat effect multiplier.
Definition: vraysdk.hpp:4534
float ccbump
Displacement multiplier.
Definition: vraysdk.hpp:4528
float free4
the material thumnail relative offset - this is kind of a hack, using the place of an old obsolete pa...
Definition: vraysdk.hpp:4532
int thumbpos
the clearcoat glossiness variation (0-none 1-the shallow anglesare glossy), since 20....
Definition: vraysdk.hpp:4531
The necessary parameters for reading the data in the preset config file (.mbc)
Definition: vraysdk.hpp:9839
std::string fileName
Scatter preset config file (.mbc)
Definition: vraysdk.hpp:9840
float unitRescale
Rescale to specific callers units setup, e.g. the default Cosmos asset units are centimeters,...
Definition: vraysdk.hpp:9842
Plugin scatterPlugin
A GeomScatter plugin instance to be filled by the Scatter preset config.
Definition: vraysdk.hpp:9841
bool isYAxisUp
If true - process as if Y is up axis and otherwise default to Z.
Definition: vraysdk.hpp:9843
Definition: vraysdk.hpp:11373
Object material
Material used for the particle, can be empty/invalid if no material override present.
Definition: vraysdk.hpp:11383
Transform transform
Particle transform.
Definition: vraysdk.hpp:11380
Object node
Particle object, always valid (unless the Particle is invalid).
Definition: vraysdk.hpp:11377
Definition: vraysdk.hpp:11190
CoordinateSystem
The coordinate system in which the preview will be loaded.
Definition: vraysdk.hpp:11203
CacheType
Definition: vraysdk.hpp:11191
Definition: vraysdk.hpp:11113
Definition: vraysdk.hpp:11118
A helper struct with info regarding file exports for plugins of a specified type.
Definition: vraysdk.hpp:2993
std::string fileNameSuffix
Substring to append at the end of the common part of the filename passed to the export function.
Definition: vraysdk.hpp:2997
std::string pluginType
Allowed types: "view", "lights", "geometry", "nodes", "materials", "textures", "bitmaps",...
Definition: vraysdk.hpp:2995
Describes a sub-sequence of an animation range at regular steps (usually step=1)
Definition: vraysdk.hpp:3001
Structure representing an enumerated item with a value and a name.
Definition: vraysdk.hpp:10269
int value
The integer value of the enum item.
Definition: vraysdk.hpp:10270
std::string name
The string name of the enum item.
Definition: vraysdk.hpp:10271
Describes a dependency between two plugin instances.
Definition: vraysdk.hpp:11486
PluginRef toPlugin
This plugin is used by the 'fromPlugin'.
Definition: vraysdk.hpp:11489
std::string fromProperty
The 'fromPlugin' property which uses 'toPlugin'.
Definition: vraysdk.hpp:11488
Plugin fromPlugin
This plugin uses the other plugin, 'toPlugin'.
Definition: vraysdk.hpp:11487
Definition: vraysdk.hpp:6248
bool skipAllSuccessorsOfCurrentPlugin
Definition: vraysdk.hpp:6261
bool overwriteExistingPlugin
Definition: vraysdk.hpp:6268
bool skipOnlyCurrentPlugin
Definition: vraysdk.hpp:6257
std::string name
Definition: vraysdk.hpp:6252
Describes a UI font.
Definition: vraysdk.hpp:410
StampFontFamily fontFamily
Font family.
Definition: vraysdk.hpp:412
char fontFace[100]
Name of the font face ("Arial" etc).
Definition: vraysdk.hpp:415
StampFontWeight fontWeight
Font weight.
Definition: vraysdk.hpp:414
int pointSize
Size of text, in points.
Definition: vraysdk.hpp:411
StampFontStyle fontStyle
Font style.
Definition: vraysdk.hpp:413
A struct that encapsulates the export scene options.
Definition: vraysdk.hpp:6089
bool appendFrameSuffix
valid only when currentFrameOnly=true - appends a %04d frame number to the file name
Definition: vraysdk.hpp:6098
std::string sceneBasePath
Optional absolute scene base path that can be used for resolving relative paths for the ....
Definition: vraysdk.hpp:6132
bool renderElementsSeparateFolders
controls the default value of SettingsOutput.relements_separateFolders
Definition: vraysdk.hpp:6094
bool compressed
enables zlib compression of large data arrays; requires hexArrays==true
Definition: vraysdk.hpp:6090
bool stripPaths
If enabled, the paths for bitmap textures and other external files are stripped from the file so that...
Definition: vraysdk.hpp:6099
bool hexArraysHash
data arrays hash will be computed and written for duplicate data
Definition: vraysdk.hpp:6092
bool printHeader
whether to write the comment section with version and time info
Definition: vraysdk.hpp:6095
std::vector< std::string > additionalIncludeFiles
Optional list of files to #include at the end of the main vrscene.
Definition: vraysdk.hpp:6117
bool hexTransforms
transforms will be encoded in hex (mainly useful with large instancers)
Definition: vraysdk.hpp:6093
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:6114
double rightInterval
Definition: vraysdk.hpp:6108
bool incremental
valid only when currentFrameOnly=true && appendFrameSuffix=false - set to true to incrementally appen...
Definition: vraysdk.hpp:6097
double leftInterval
Definition: vraysdk.hpp:6104
std::vector< SubFileInfo > subFileInfos
A list of files to split the scene into, based on plugin type. See SubFileInfo struct comments.
Definition: vraysdk.hpp:6111
bool hexArrays
data arrays will be encoded in hex
Definition: vraysdk.hpp:6091
int vrfilesComputeHashes
True if MD5 and SHA256 hashes should be computed and written in the .vrfiles file for each resolved a...
Definition: vraysdk.hpp:6134
int vrfilesExport
Enable or disable vrfiles file writing.
Definition: vraysdk.hpp:6130
std::string hostAppString
An optional string identifying the host application, version, etc.
Definition: vraysdk.hpp:6120
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:6125
bool currentFrameOnly
if true only the current keyframe is exported, otherwise the whole timeline
Definition: vraysdk.hpp:6096
bool vrdataExport
Enable or disable vrdata file writing.
Definition: vraysdk.hpp:6123
int vrdataFileSizeLimitMiB
Limit the size of the vrdata file. If this limit is reached another file is started.
Definition: vraysdk.hpp:6127
Definition: vraysdk.hpp:780
unsigned fillerBytes
Force the alpha channel to the given value in the [0, 255] range. Forces BGRA/RGBA format....
Definition: vraysdk.hpp:798
unsigned flags
The byte offset between the beginning of two consecutive rows of the output bitmap (optional,...
Definition: vraysdk.hpp:796
int dstHeight
The width of the target bitmap in pixels (mandatory).
Definition: vraysdk.hpp:792
int x
The height of the target bitmap in pixels (mandatory).
Definition: vraysdk.hpp:793
int alphaValue
A combination of enum Flags.
Definition: vraysdk.hpp:797
int dstStride
Y coordinate at which to draw the source image. If x==INT_MIN and y==INT_MIN, the image will be cente...
Definition: vraysdk.hpp:795
int y
X coordinate at which to draw the source image. If x==INT_MIN and y==INT_MIN, the image will be cente...
Definition: vraysdk.hpp:794
Flags
Definition: vraysdk.hpp:781
@ USE_FILLER_BYTES
0 - BGR/RGB (bytes_per_pixel = 3), 1 - BGRA/RGBA (bytes_per_pixel = 4).
Definition: vraysdk.hpp:785
@ REVERSE_Y
0 - BGR(A) order, 1 - RGB(A) order.
Definition: vraysdk.hpp:783
@ PRESERVE_ALPHA
0 - fill top-bottom bitmap, 1 - fill bottom-top bitmap.
Definition: vraysdk.hpp:784
DrawMode mode
the parts of the target bitmap outside of the drawn region if USE_FILLER_BYTES is set.
Definition: vraysdk.hpp:800
int dstWidth
The address of the memory buffer / target bitmap to write into (mandatory).
Definition: vraysdk.hpp:791
Definition: vraysdk.hpp:564
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.
static VRayImage * createFromIntList(const IntList &buffer, IntList_DataType dataType, int width, int height)
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)
DrawMode
Definition: vraysdk.hpp:690
@ DRAW_MODE_BLEND_FAST
Alpha-blend using only the source image alpha but keep the original destination image alpha unchanged...
Definition: vraysdk.hpp:692
@ DRAW_MODE_COPY
Overwrite destination image pixels with the source image pixels.
Definition: vraysdk.hpp:691
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:621
@ rgba_float
8-bit int BGRA
Definition: vraysdk.hpp:623
@ bgr_byte
16-bit unsigned int RGBA
Definition: vraysdk.hpp:625
@ rgba_16bit
32-bit float RGBA (sRGB or gamma won't be applied automatically)
Definition: vraysdk.hpp:624
@ rgba_float16
8-bit int BGR
Definition: vraysdk.hpp:626
bool setGamma(float gamma)
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...
size_t drawToBitmap(const DrawToBitmapParams ¶ms) const
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:4070
std::string outputDirectory
The directory where the profiler reports will be created. If nullptr is passed, temp directory is use...
Definition: vraysdk.hpp:4087
std::string productName
Name of the host product.
Definition: vraysdk.hpp:4089
FileType
Definition: vraysdk.hpp:4080
@ FileType_JSON
This is the raw profiler output, which is passed when an HTML file could not be generated.
Definition: vraysdk.hpp:4082
@ FileType_HTML
An html output file. Needs a valid htmlTemplatePath or valid installation of the default path.
Definition: vraysdk.hpp:4081
int maxDepth
The maximum ray bounces that will be profiled. Range [1, 8].
Definition: vraysdk.hpp:4086
Mode
Definition: vraysdk.hpp:4071
@ 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:4088
Mode mode
Specifies the operational mode of the Profiler.
Definition: vraysdk.hpp:4085
std::string productVersion
Version of the host product.
Definition: vraysdk.hpp:4090
std::string sceneName
Name of the scene that will be profiled. Used as a suffix to the generated filename.
Definition: vraysdk.hpp:4091
Definition: vraysdk.hpp:8090
Definition: vraysdk.hpp:8100
Definition: vraysdk.hpp:8114
Definition of one changed property for LiveLink scene updates.
Definition: vraysdk.hpp:8076
Definition: vraysdk.hpp:9640
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:918
float lengthSqr(const Vector &a) noexcept
Definition: vraysdk.hpp:1205
Vector & makeZero(void) noexcept
Sets the components of the vector.
Definition: vraysdk.hpp:947
Vector & makeNormalized(void) noexcept
Makes this vector a unit vector.
Definition: vraysdk.hpp:953
float length(const Vector &a) noexcept
Definition: vraysdk.hpp:1199
Vector & set(T1 x_, T2 y_, T3 z_) noexcept
Sets the components of the vector.
Definition: vraysdk.hpp:941
Vector rotate(const Vector &v, const Vector &axis) noexcept
Definition: vraysdk.hpp:1224
bool makeNormalized0(void)
Makes this vector a unit vector. Returns true if the vector is normalized successfully,...
Definition: vraysdk.hpp:963
float length(void) const noexcept
Returns the length of the vector.
Definition: vraysdk.hpp:1040
float & operator[](const int index) noexcept
Returns the i-th component (0 for x, 1 for y, 2 for z)
Definition: vraysdk.hpp:1030
Vector & operator-=(const Vector &other) noexcept
Subtracts the components of the given vector.
Definition: vraysdk.hpp:983
double mixed(const Vector &a, const Vector &b, const Vector &c) noexcept
Definition: vraysdk.hpp:1184
Vector mul(const Vector &a, const Vector &b) noexcept
Definition: vraysdk.hpp:1155
Vector & operator*=(int factor) noexcept
Multiplies all components by the given number.
Definition: vraysdk.hpp:989
Vector normalize(const Vector &a) noexcept
Definition: vraysdk.hpp:1193
Vector & operator/=(int divisor) noexcept
Divides all components by the given number.
Definition: vraysdk.hpp:1007
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:1025
float lengthSqr(void) const noexcept
Returns the squared length of the vector.
Definition: vraysdk.hpp:1045
Vector & operator+=(const Vector &other) noexcept
Adds the components of the given vector.
Definition: vraysdk.hpp:977
The information about a voxel.
Definition: vraysdk.hpp:3147
Color wireColor
the diffuse (wire) color of the voxel
Definition: vraysdk.hpp:3148
Bool smoothed
true, if the voxel should be rendered with smoothed normals
Definition: vraysdk.hpp:3149
Bool flipNormals
true, if the geometric normals should be flipped
Definition: vraysdk.hpp:3150
Definition: vraysdk.hpp:878
bool multipleFiles
unused
Definition: vraysdk.hpp:882
bool multiChannel
create a single multi-channel file if the file format supports it
Definition: vraysdk.hpp:890
bool velocityZeroBased
unused
Definition: vraysdk.hpp:889
bool skipRGB
do not write the RGB channel into a separate file
Definition: vraysdk.hpp:887
bool frameNumber
the current frame number will be appended to the file name(s)
Definition: vraysdk.hpp:884
bool applyColorCorrections
bake the VFB corrections to the output file
Definition: vraysdk.hpp:891
bool writeExifData
add all the available EXIF data to the written image, if the type supports it
Definition: vraysdk.hpp:892
bool noAlpha
do not write the alpha channel together with the color data
Definition: vraysdk.hpp:885
bool singleChannel
only a single channel is written to the file (the current one in vfb)
Definition: vraysdk.hpp:886
bool skipAlpha
do not write the alpha channel into a separate file
Definition: vraysdk.hpp:883
bool writeIntegerIDs
write to EXR as integer data
Definition: vraysdk.hpp:888
Definition: vraysdk.hpp:3732
static double None()
The None value (double) of the TiMe union In case used in Plugin::setValue(), the given plugin proper...
Definition: vraysdk.hpp:3751
TiMe(double time)
Constructs a TiMe object from a given time (double)
Definition: vraysdk.hpp:3741
static double Default()
Definition: vraysdk.hpp:3747
TiMe()
Default constructor.
Definition: vraysdk.hpp:3739
Definition: vraysdk.hpp:3901