©Anton Podvalny

Table of Contents

Introduction


In this chapter we'll talk about an important part of the proper functioning of the AppSDK - obtaining licenses from your code to unlock V-Ray.

The new online License Server, available at download.chaos.com, provides you with a fast and secure way to license both current products and those we plan to release in the near future. 


Obtaining a license


The AppSDK license is obtained automatically once the first renderer is created. If you don't have an AppSDK license available renderer creation will fail.

The Render Node license is also checked when a renderer is being created and if not available, the renderer creation fails. This check serves as an early warning and can be suppressed in RendererOptions.noRenderLicensePreCheck. The Render Node license is obtained when the actual rendering starts. Again, if you don't have a Render Node license, the render start call will fail.

Releasing a license


The Render Node license is released when rendering stops, whatever the reason. If communication with the license server is disrupted, the license will be released after a certain timeout.

The AppSDK license is released when the AppSDK module's deinitialization method is called, which happens implicitly. For Node.js and Python this means vray.close(), for C++ it's the destructor of the VRayInit structure, for C# it happens completely under the hood. All these methods are called automatically by the SDK, so the user generally should not care about releasing the UI license.

Changing license server


If you install the license server on the machine that runs V-Ray its installer takes care of configuring your system to use it and you don't need to take further action. But you may want to use an alternative server or set up the server on a machine that has no prior configuration. You can use the setLicenseServers global method for this. See the code comments for usage details. Make sure you call this before creating a VRayRenderer or VRayServer object, because their constructors require a license.


For more information, see the Chaos License Quick Start Guide page. 

  • No labels
Was this helpful?