9.3.1 Changes 9.6 Changess Table of Contents

9.5 Changes

June 20, 2008

This is a list of the changes in the LightWave® 9.5 release that affect the SDK.

lwtimer.h

  • Added the LWTimer access interface for constructing timer instances.

lwsc5.html

  • The MorphTarget tag in the LightWave scene file has been promoted to an object identifier instead of an object index.
  • The UseBonesFrom tag in the LightWave scene file has been promoted to an object identifier instead of an object index.

lwimage.h

  • Functions have been added to get EXIF and MakerNote information from an image. This has increased the LWImageUtil global version to 3.

lwimageio.h

  • EXIF and MakerNote support has been added to image loading and saving.

lwmaster.h

  • Added the following Master plug-in handler notifications:
    • LWEVNT_NOTIFY_LIST_UPDATE_OBJECTS
    • LWEVNT_NOTIFY_LIST_UPDATE_LIGHTS
    • LWEVNT_NOTIFY_LIST_UPDATE_CAMERAS
    • LWEVNT_NOTIFY_LIST_UPDATE_BONES
  • Plugin change notification has a new LWEVNT_PLUGIN_DESTROYING event code to indicate that a plugin is about to be destroyed (in contrast to the plugin having been destroyed).

lwcustobj.h

  • Added functions to the LWCustomObjAccess structure to draw polygons and disks, and manipulate the drawing mode.

lwrender.h

  • Added function to the LWInterfaceInfo global to retrieve the actual RGBA color with which an item is drawn in the viewport. As a consequence, the version number of the global has been incremented to 6.
  • Added function to LWInterfaceInfo to get the per-item icon scale factor.
  • The version of the LWViewportInfo global has been incremented to 4, with the addition of the viewItem function to retrieve the ID of the item through which the camera or light viewport is viewing.
  • The controller related function in LWItemInfo have been expanded to also return information about the new position and scale controllers.
  • IK settings have been expanded to include the setting of an objective for a goal. A goalObjective function has been added to LWItemInfo to query the currently set objective. ikfkBlending, ikInitialState, ikInitialStateFrame, and ikSoft functions have been added to support the new IK features. The version number of the global has been bumped to 5.
  • Goal strength can now be enveloped. The goalStrength function in LWItemInfo has therefore gained a time input argument.
  • A random float function (LWRandomFloatFunc) was added to LWNodalAccess, LWShaderAccess, LWVolumeAccess and LWPixelAccess. The purpose of the function is to generate the same noise pattern for unchanged frames and between threads. The function generates a random number on the [>0, <1] interval.
  • New illumination functions (LWIlluminateNormalFunc and LWIlluminateSampleNormalFunc) were added to the Rendering Functions. See the raytracing functions page for a description of these.
  • The motion flag LWITEMF_USE_IKCHAINVALS has been added, to indicate whether or not the item uses IK values from the chain.
  • Bones can now be one of two types: the traditional Z-axis aligned bone, or the new joint-style bone. A function has been added to the LWBoneInfo global to obtain the bone type. The version number of the global has been increased to 4.
  • Functions have been added to LWBoneInfo to obtain the bone twist value, and the bone rest and final coordinate transformation system.
  • Support for the new pole vector motion controller has been added with a pole function in LWItemInfo global, and LWMOTCTL_POLE constant.
  • Added the LWROPT_CACHERADIOSITY flag for the SceneInfo renderOpts to indicate the state of the cache radiosity setting.
  • The various "Same As Item" motion controller settings can be queried through several new functions in the LWItemInfo global, and a matching LWMOTCTL_SAMEITEM controller constant has been added.

lwshader.h

  • Sub-pixel precision pixel location subsx,subsy, and an incoming ray direction rayDir have been added to the LWShaderAccess structure.

lwnodes.h

  • Sub-pixel precision pixel location subsx,subsy, and an incoming ray direction rayDir have been added to the LWNodalAccess structure.

lwvolume.h

  • LWVRayFuncs was incremented to version 4. LWVRayFuncs->SetRenderFuncs() will now accept a function pointer to a LWRandomFloatFunc function.

lwgizmo.h

  • Gizmos can now participate in viewport picking by setting a pickItems function. The function is used to determine what items should be picked if the user picks the gizmo drawing. The version number of the gizmo interface has therefore been incremented to 2.

lwlight.h

  • A new plugin class has been added to implement light types. Also added is a matching global (LWLIGHTEVALUATIONFUNCS_GLOBAL) to allow plugins to evaluate lights.
  • There is of course some documentation for the new class.

lwmtutil.h

  • A function groupWait has been added to wait for group completion with a timeout.
  • Support for read/write locks has been added.
  • The version number of the global has been increased to 2.
  • The number of available locks per group has been increased to 129.

Commands: Layout

  • New commands added:
    • RenameLayer
    • PositionServerByItemID
    • ObjGIUseGlobal
    • ObjGIRaysPerEvaluation
    • ObjGISecondaryBounceRays
    • ObjGIRadiosityTolerance
    • ObjGIMinPixelSpacing
    • ObjGIMaxPixelSpacing
    • UnseenByRadiosity
  • The following scene-export commands have been added to Layout as replacements for the "SaveLWSC1", "SaveLWSC3", and "SaveLWSC4" commands (which are now deprecated):
    • SaveLWSC_4_0
      • Represents the version 1 scene file format
      • Replaces the "SaveLWSC1" command
    • SaveLWSC_5_6
      • Represents the version 2 scene file format
    • SaveLWSC_6_0
      • Represents the version 3 scene file format
      • Replaces the "SaveLWSC3" command
    • SaveLWSC_9_2
      • Represents the version 4 scene file format
      • Replaces the "SaveLWSC4" command
  • Commands have been added to support the position and scale controllers. These are the obvious extension of the existing heading, pitch, and bank controller commands:
    • XController ncontroller
    • YController ncontroller
    • ZController ncontroller
    • SXController ncontroller
    • SYController ncontroller
    • SZController ncontroller
    • XLimits gmin gmax
    • YLimits gmin gmax
    • ZLimits gmin gmax
    • SXLimits gmin gmax
    • SYLimits gmin gmax
    • SZLimits gmin gmax
    • RecordMinPosition
    • RecordMaxPosition
    • RecordMinScale
    • RecordMaxScale
    • LimitX
    • LimitY
    • LimitZ
    • LimitSX
    • LimitSY
    • LimitSZ
    • LimitX
    • LimitY
    • XStiffness gstiffness
    • YStiffness gstiffness
    • ZStiffness gstiffness
    • SXStiffness gstiffness
    • SYStiffness gstiffness
    • SZStiffness gstiffness
  • New commands to support new IK features:
    • GoalObjective nobjective
    • IKFKBlending gblend
    • IKInitialState nstate
    • IKInitialStateFrame nframe
    • SoftIK ntype
    • SoftIKDistanceType ntype
    • SoftIKMin gmin
    • SoftIKMax gmax
    • UseIKChainVals nstate
  • The ItemIconScale gscale command has been added to control the size of individual icons representing items such as lights, camera, and bones in the Layout viewports.
  • Commands have been added to support joint-style bones:
    • AddJoint sname
    • AddChildJoint sname
    • DrawJoints
    • DrawChildJoints
    • BoneType ntype
  • The UpdateMotion command has been added to force any pending motion updates to be processed.
  • LoadElementsFromScene has been added to support the improved load from scene functionality. The command is provided with a description of the elements to load from the scene. The LoadFromScene command now asks the user for the elements to load.
  • The PoleItem command has been added to set the pole item for the selected item.
  • There is now a LockAxis command which is like the EnableXH/YP/ZB commands, except that it takes a channel number and a lock state, and therefore is not dependent on the currently active tool.

Layout: Load From Scene

  • Layout's load-from-scene functionality has received the following improvements:
    1. The name of a layer, if present, is now displayed next to the layer entry.
    2. The content directory of the selected scene temporarily replaces the current setting during a load-from-scene, ensuring all objects and dependencies can be found.

LScript v2.13

  • The behavior of the Mesh(), Light() and Camera() Object Agent generators has been altered with respect to object ids. Previously, if provided with an object id that was invalid, or not of the specific type (e.g., a Light object id passed to Mesh()), LScript would generate an error message and halt the script. Now, a nil value is returned instead.
  • The Mesh() Object Agent generator previously required an object name in order to generate a Bone Object Agent. Now a bone object id can be provided and, if valid, a Bone Object Agent will be returned.
  • The preprocessor command @insert now recognizes the metacharacter '@' at the start of the insertion string. This metacharacter indicates relative pathing for the file to be inserted, allowing files to be located relative to the location of the original script.

    For example, say you have two files in the same folder, one named "file1.ls" and the other named "file2.ls". Further, the first file performs an @insert of the second file. In order to successfully insert the second file without the need of maintaining specific absolute pathing, you need only specify the name of the second file preceeded by the '@' symbol:

    @insert "@file2.ls"

  • A new function called getfolder() has been added. This function is similar to getfile() except it only allows the user to select folders. It takes two optional parameters: the first is the title of the dialog (defaults to "Select A Folder"); the second is a starting path. Returns a string representing the path to the selected folder, or returns nil if the user cancelled.
  • A Requester control corresponding to the getfolder() function has been added, called ctlfoldername(). This control accepts the same arguments as ctlfilename(), with the exception of the last argument ('load').

    path = "E:\\thirdParty\\Icons";
    ...
    c1 = ctlfoldername("Source folder",path);

  • The SceneInfo.renderopts[] array has been expanded to encompass new flag values. The renderopts[] array now maps to the following 27 render options flags:

        [1]  LWROPT_SHADOWTRACE
        [2]  LWROPT_REFLECTTRACE
        [3]  LWROPT_REFRACTTRACE
        [4]  LWROPT_FIELDS
        [5]  LWROPT_EVENFIELDS
        [6]  LWROPT_MOTIONBLUR
        [7]  LWROPT_DEPTHOFFIELD
        [8]  LWROPT_LIMITEDREGION
        [9]  LWROPT_PARTICLEBLUR
        [10] LWROPT_ENHANCEDAA
        [11] LWROPT_SAVEANIM
        [12] LWROPT_SAVERGB
        [13] LWROPT_SAVEALPHA
        [14] LWROPT_ZBUFFERAA
        [15] LWROPT_RTTRANSPARENCIES
        [16] LWROPT_RADIOSITY
        [17] LWROPT_CAUSTICS
        [18] LWROPT_OCCLUSION
        [19] LWROPT_RENDERLINES
        [20] LWROPT_INTERPOLATED
        [21] LWROPT_BLURBACKGROUND
        [22] LWROPT_USETRANSPARENCY
        [23] LWROPT_VOLUMETRICRADIOSITY
        [24] LWROPT_USEAMBIENT
        [25] LWROPT_DIRECTIONALRAYS
        [26] LWROPT_LIMITDYNAMICRANGE
        [27] LWROPT_CACHERADIOSITY
                                
  • The following new Command Sequence functions have been added to LScript:

    • UnseenByRadiosity()