Scene InfoAvailability LightWave 6.0 Component LayoutHeader lwrender.h The scene info global returns information about the current scene. This information is read-only and reflects the state of the scene at the time the global function is called. You can set these parameters using commands. Global Call LWSceneInfo *sceneinfo; sceneinfo = global( LWSCENEINFO_GLOBAL, GFUSE_TRANSIENT );The global function returns a pointer to an LWSceneInfo. typedef struct st_LWSceneInfo { const char *name; const char *filename; int numPoints; int numPolygons; int renderType; int renderOpts; LWFrame frameStart; LWFrame frameEnd; LWFrame frameStep; double framesPerSecond; int frameWidth; int frameHeight; double pixelAspect; int minSamplesPerPixel; int maxSamplesPerPixel; int limitedRegion[4]; int recursionDepth; LWItemID (*renderCamera) (LWTime); int numThreads; const char *animFilename; const char *RGBPrefix; const char *alphaPrefix; } LWSceneInfo;
filename numPoints, numPolygons renderType LWRTYPE_WIRE LWRTYPE_QUICK LWRTYPE_REALISTIC LWROPT_SHADOWTRACE LWROPT_REFLECTTRACE LWROPT_REFRACTTRACE LWROPT_FIELDS LWROPT_EVENFIELDS LWROPT_MOTIONBLUR LWROPT_DEPTHOFFIELD LWROPT_LIMITEDREGION LWROPT_PARTICLEBLUR LWROPT_ENHANCEDAA LWROPT_SAVEANIM LWROPT_SAVERGB LWROPT_SAVEALPHALWROPT_EVENFIELDS is set only if field rendering is on and the first line of the output image is from the field that comes first in time. frameStep framesPerSecond frameWidth, frameHeight pixelAspect minSamplesPerPixel, maxSamplesPerPixel limitedRegion recursionDepth camID = renderCamera( time ) animFilename AlphaPrefix This code fragment calculates the running time and frame aspect. #include <lwserver.h> #include <lwrender.h> LWSceneInfo *lwsi; double duration, frameAspect; lwsi = global( LWSCENEINFO_GLOBAL, GFUSE_TRANSIENT ); if ( lwsi ) { duration = ( lwsi->frameEnd - lwsi->frameStart + 1 ) / lwsi->framesPerSecond; frameAspect = lwsi->pixelAspect * lwsi->frameWidth / lwsi->frameHeight; } |