Announcement

Collapse
No announcement yet.

How to make Vray library loading dynamic ?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to make Vray library loading dynamic ?

    Hi,
    I am developing a c++ plugin for maya that gives the possibility to render in Vray.
    However, when someone not having Vray is willing to load the plugin, maya returns immediately:
    Code:
    // Error: line 1: dlopen(myBundle.bundle, 1): Library not loaded: @executable_path/libvray.dylib
      Referenced from: myBundle.bundle
      Reason: image not found (myBundle) //
    Library linking at compilation occurs with the -lvray flag (compilation on MacOSX).

    How can I enable a dynamic loading of the Vray library, only when rendering, so that people without Vray can anyway use my plugin without rendering ?
    Thanks.
    Last edited by lcrivell; 22-01-2016, 05:45 AM.

  • #2
    You have two options:
    1. Use dlopen and LoadLibrary to load the lib, but this will be pretty tedious to load all the symbols manually
    2. Separate the code that interacts with V-Ray in another Maya plugin.

    The latter is what most of the other plugin vendors do.
    They have one main plugin that provides their custom Maya nodes and several renderer related plugins that interact with different renderers.
    V-Ray developer

    Comment


    • #3
      Okay thanks for your answer. I will try to see how realistic it is to implement either or.
      As option #3, would I be allowed to distribute the library with my plugin or is it not legal ?

      Thanks !
      Last edited by lcrivell; 26-01-2016, 12:56 AM.

      Comment

      Working...
      X