LW Object Info LW Scene Info 2 Globals Table of Contents

"Product Info"

Availability:  LightWave 5.5 (250) - 6.0, Inspire 1.0 (250)
Component:  Layout, Modeler

The product info global returns the product (LightWave or Inspire), its major and minor version numbers, and its build number. Build numbers can be used to distinguish between bug-fix revisions for which the major and minor version numbers weren't incremented, which can happen in particular when the revision only affects one platform.

Global Call

   unsigned long prodinfo;
   prodinfo = ( unsigned long ) global( "Product Info", GFUSE_TRANSIENT );

The global function ordinarily returns a void *, so this should be cast to an integer type to get the return value.

The product ID is in the low four bits of the return value. The build number is in bits 15 - 4, the minor version number is in bits 19 - 16, and the major revision number is in bits 23 - 20. All of these components can be extracted using macros defined in lwhost.h.

   product = prodinfo & LWINF_PRODUCT;
   major = LWINF_GETMAJOR( prodinfo );
   minor = LWINF_GETMINOR( prodinfo );
   build = LWINF_GETBUILD( prodinfo );

Currently, the product can be LWINF_PRODLWAV (LightWave), LWINF_PRODINSP3D (Inspire), or LWINF_PRODOTHER.