
However, for C++ programmers, instead of working at the C-interface level, it’s more convenient to use higher-level C++ classes, such as the Active Template Library (ATL) CComSafeArray. For further details on the SAFEARRAY C data structure and some of its native C-interface APIs, see the online companion piece to this article, “Introducing the SAFEARRAY Data Structure” ( /magazine/mt778923).

There are also C-interface Windows APIs for manipulating safe arrays, such as SafeArra圜reate and SafeArrayDestroy for creation and destruction, and other functions to lock a safe array instance and safely access its data. A safe array is usually handled in code via a pointer to its SAFEARRAY descriptor, that is, SAFEARRAY*. Basically, the SAFEARRAY data structure describes a particular instance of a safe array, specifying attributes such as its number of dimensions and a pointer to the actual safe array’s data. The Windows programming platform offers a convenient ready-to-use data structure that can be used for that purpose: the SAFEARRAY, whose definition can be found on the Windows Dev Center ( bit.ly/2fLXY6K). Passing that data across module boundaries isn’t trivial and requires the use of well-designed and well-crafted data structures. Or, you might have a Windows service written in C++ that interacts with other low-level modules and returns arrays of strings that you want to consume in GUI clients written in C#, or in a scripting language. For example, you might have some C++ components that interact with some hardware and produce an array of data, like an array of bytes representing the pixels of an image read from an input device, or an array of floating point numbers representing measurements read from a sensor. If a connection cannot be established, you can choose to proceed using the assets that are already available on your hard drive.Often, you want to exchange some data in the form of arrays between those components. Note that the first time the Preset Material Library is opened during a new Rhino session, V-Ray connects to the Chaos servers to validate the completeness of the downloaded assets and check for updates. V-Ray 5 for 3ds Max and V-Ray 5 for SketchUp. Asset files are shared between other V-Ray products if they are also installed on the system, e.g. If a previous installation of V-Ray 5 for 3ds Max is detected, the Preset Material Library will be saved in the already specified location. Note that you can change the directory and disable the automatic check for updates from the Configuration rollout. The assets are saved in \Documents\V-Ray Material Library\ Once the download is complete, the library assets remain permanently available. Note that you need about 8.5 GB of free disk space to download it.



The first time you open the left panel of the Asset Editor after installing V-Ray for Rhino, you will be presented with the option to download the Preset Material Library.
