- ### 7.0 Changes September 24, 2001 This is a list of the changes in the LightWave 7.0 release that affect the SDK. The changes include a new Layout tool class and two new globals, as well as extensive enhancement of many of the info globals defined in `lwrender.h`. Layout supports 51 new commands of its own plus another 46 that it now propagates to the various editors. One change and one bug fix were made to the SDK for the LightWave 7.0B patch. These have been marked here with "[ B ]". Structures associated with the ShaderHandler class and the Preview Functions and Item Info globals were changed, but the shader version number and the global name strings weren't incremented. In all cases, the changes involve members added to the ends of structures, so they have no effect on existing plug-ins. New plug-ins can use the Product Info global to verify that they're running in at least LightWave 7.0 before they use the new structure members. `lwcustobj.h` `LWCUSTOMOBJ_VERSION` (CustomObjHandler) has been incremented. A `quad` function for drawing solid quad polygons has been added to LWCustomObjAccess. Quads can be image-mapped using new `setTexture` and `setUVs` functions. `setTexture` accepts a square image in `GL_RGBA` format, and `setUVs` sets the UV coordinates at the corners of a quad. The `text` function accepts a new justification argument, 0 for left, 1 for center, 2 for right. The color argument to `setColor` now takes a fourth array element for the color's alpha level. Since custom objects can draw semi-transparent primitives, `viewPos` and `viewDir` vectors have been added so that plug-ins can depth-sort their primitives. `lwdisplay.h` The header now defines `_WIN32_WINNT`. `lwdisplce.h` `LWDISPLACEMENT_VERSION` (DisplacementHandler) has been incremented because of changes to LWMeshInfo. `lwenvel.h` `LWCHANNELINFO_GLOBAL` (Channel Info) has been incremented to "Channel Info 2". `serverApply` and `serverRemove` functions have been added to LWChannelInfo. Also added were `serverFlags` and `serverInstance` functions that return the flags and instance data of a channel handler. A new event code, `LWCEVNT_VALUE`, has been added to signal changes to channels. `lwlaytool.h` This is a new header file containing the definition of a new plug-in class, LayoutTool. `lwmaster.h` An `LWEVNT_SELECT` event code has been added (MasterHandler). `lwmeshes.h` A `polFlags` function has been added to LWMeshInfo. `pntVIDGet` and `pntVPIDGet` functions have been added to LWMeshInfo. These are like `pntVGet` and `pntVPGet`, but they don't require a preceeding call to `pntVSelect`, making them more reliable when called from threaded code. Because of LWMeshInfo changes, `LWOBJECTFUNCS_GLOBAL` (Scene Objects) has been incremented to "Scene Objects 4". `lwmonitor.h` A new global (Layout Monitor) has been created to provide a standard monitor for Layout. The server name is `LWLMONFUNCS_GLOBAL`. `lwpanel.h` A new global (Context Menu) has been created to provide context menus in Panels. The server name is `LWCONTEXTMENU_GLOBAL`. `LWPANELS_API_VERSION` (Panels) has been incremented. Panels using the new `PANF_NOBUTT` flag will not have Continue or Cancel buttons. `PANF_RESIZE` panels can be resized. `lwpreview.h` A `setPreset` function has been added to LWPreviewFuncs (Preview Functions). `lwrender.h` Due to an error, `LWSCENEINFO_GLOBAL` (Scene Info) was defined as "LW Scene Info 2" in the public version of `lwrender.h` released with LightWave 6.5B. It should have been "LW Scene Info 3". The correct definition has been restored in the LightWave 7.0 headers. Four functions (`flags`, `lookAhead`, `goalStrength` and `stiffness`) have been added to LWItemInfo (Item Info). `LWOBJECTINFO_GLOBAL` (Object Info) has been incremented to "LW Object Info 4". Eight new functions (`boneSource`, `morphTarget`, `morphAmount`, `edgeOpts`, `edgeColor`, `subdivOrder`, `polygonSize` and `excluded`) have been added to LWObjectInfo. The `excluded` function returns TRUE if the object has been excluded from the given light. The LWObjectInfo `flags` function returns new flags `LWOBJF_UNAFFECT_BY_FOG`, `LWOBJF_MORPH_MTSE` and `LWOBJF_MORPH_SURFACES`. `LWBONEINFO_GLOBAL` (Bone Info) has been incremented to "LW Bone Info 3". Four new functions (`strength`, `falloff`, `jointComp` and `muscleFlex`) have been added to LWBoneInfo. The LWBoneInfo `flags` function returns new flags `LWBONEF_JOINT_COMP`, `LWBONEF_JOINT_COMP_PAR`, `LWBONEF_MUSCLE_FLEX` and `LWBONEF_MUSCLE_FLEX_PAR`. `LWLIGHTINFO_GLOBAL` (Light Info) has been incremented to "LW Light Info 3". Eight new functions (`falloff`, `projImage`, `shadMapSize`, `shadMapAngle`, `shadMapFuzz`, `quality`, `rawColor`, `intensity`) have been added to LWLightInfo. The `coneAngles` function now includes a time argument (since the angles can be enveloped) and returns values in radians rather than degrees. A time argument has been added to the LWLightInfo `range` function. The LWLightInfo `flags` function returns new flags `LWLFL_FIT_CONE` and `LWLFL_CACHE_SHAD_MAP`. `LWINTERFACEINFO_GLOBAL` (Interface Info) has been incremented to "LW Interface Info 3". The LWInterfaceInfo `itemColor` function returns the color used to draw the item in the interface. The new `boxThreshold` field contains the bounding box threshold, and `alertLevel` contains `LWALERT_BEGINNER`, `LWALERT_INTERMEDIATE` or `LWALERT_EXPERT`. `lwshader.h` `replacement_percentage` and `replacement_color` fields have been added to LWShaderAccess (ShaderHandler). Use these to set the surface color when your shader calculates lighting and you therefore don't want LightWave to overwrite your color. [ B ] `reflectionBlur` and `refractionBlur`. fields have been added to the shader access structure. `lwsurf.h` Two new channel definitions for reflection and refraction blurring have been added (Surface Functions). `lwtool.h` A `text` function and `pxScale` (pixel scale) field have been added to LWWireDrawAccess. `lwtxtr.h` `LWTEXTUREFUNCS_GLOBAL` (Texture Functions) has been incremented to "Texture Functions 2", and four new functions have been added to LWTextureFuncs. `texture` returns a texture ID, given the ID of a texture layer. `name`, `type` and `context` return information about a texture. `lwvparm.h` Due to an error, the public version of `lwvparm.h` (Variant Parameters) released with LightWave 6.5 and 6.5B contained an incorrect definition of the LWVParmFuncs `getEnv` function. This definition showed `getEnv` taking a single argument and returning a single envelope ID. The correct definition shows `getEnv` returning void. It writes up to three envelope IDs in an array passed as the second argument. This definition has been restored in the current header. Commands: Layout The file written by `SaveCommandList` now includes Graph Editor, Image Editor and Surface Editor commands, and Layout now dispatches those commands to their respective components. The `Refresh` command now defers its work until the system is idle, for improved interactivity. A `RefreshNow` command has been added for cases in which synchronous updates are desired. The new `Redraw` and `RedrawNow` commands are similar except that they don't cause motions and geometry to be recomputed. The `PluginOptions` command has been replaced by `MasterPlugins`, to reflect the fact that the name of the panel it invokes has changed in the interface. Other new commands:
      RecentScenes           ItemActive             PolygonSize
      ReplaceObjectLayer     ItemLock               UnaffectedByFog
      SquashTool             ItemVisibility         BoneStrengthMultiply
      ShowTargetLines        ItemColor              BoneMinRange
      BoundingBoxThreshold   RadiosityType          BoneMaxRange
      VIPER                  RecentContentDirs      BoneJointComp
      Presets                AlertLevel             BoneJointCompParent
      EnableDeformations     AddButton              BoneJointCompAmounts
      MatchGoalOrientation   Generics               BoneMuscleFlex
      KeepGoalWithinReach    ClearAudio             BoneMuscleFlexParent
      LimitH                 LoadAudio              BoneMuscleFlexAmounts
      LimitP                 PlayAudio              LightQuality
      LimitB                 RayTraceTransparency   ShadowMapFuzziness
      HStiffness             LoadObjectLayer        ShadowMapFitCone
      PStiffness             MorphMTSE              ShadowMapAngle
      BStiffness             MorphSurfaces
- Commands: Modeler The new `setcontent` command sets the content directory. Commands: Common New (or newly available) Graph Editor commands include:
      GE_OpenWindow         GE_DeleteSelKeys        GE_MoveKeys
      GE_SetWindowPos       GE_ReduceKeys           GE_CreateExpression
      GE_SetWindowSize      GE_LockKeys             GE_AttachExpression
      GE_ApplyServer        GE_CopySelKeys          GE_AttachExpressionID
      GE_RemoveServer       GE_PasteKeys            GE_SetGroup
      GE_GetLayoutSel       GE_LeaveFootprints      GE_SetEnv
      GE_SelectAllCurves    GE_PickupFootprints     GE_SetEnvID
      GE_FilterSelection    GE_BacktrackFootprints  GE_LoadExpressions
      GE_BakeCurves         GE_CopyTimeslice        GE_SaveExpressions
      GE_SnapKeysToFrames   GE_PasteTimeslice       GE_ClearBin
      GE_SelectAllKeys      GE_MatchFootprintAtFrame
- The newly available Image Editor commands are:
      IE_OpenWindow
      IE_SetClipTable
      IE_SetWindowPos
The surface system supports a new `Surf_SetBakerImage` command. Miscellaneous When the user changes the item order, plug-ins are now notified of the new IDs only after the item data have actually been rearranged. Globals that take item IDs as arguments should now behave correctly when called from within a handler's `changeID` callback. In LWSN, master plug-ins now receive a `LoadScene` command event at the end of scene loading. Since the issuing of commands is not supported in LWSN, the LWMasterAccess structure contains dummy functions in this situation. Attempts by plug-ins to trace rays during Wireframe or Quickshade renders were causing crashes. This has been fixed (the ray tracing functions now always return -1 in those modes). The Directory Info global now returns the correct result for "Content" in Modeler. Low and high angles are now returned by the Item Info `limits` function even if the corresponding limits are turned off. A condition that could cause mesh info queries to fail after an object is cleared from the scene has been fixed. All enabled environment plug-ins are now evaluated (although this can be a waste of time since each one will overwrite the results of the previous one). The `PreviousItem` and `NextItem` commands now skip over locked items. When Adaptive Sampling is on and Antialiasing is off, the `minSamplesPerPixel` from the Scene Info global is now zero, since some pixels may be totally skipped. The Item Info `controller` function now returns correct values. Button names specified by generic plug-ins are now used if present. The envelope commands are now safe to use when there is no current item. Object serial numbers are now computed during rather than after cloning so that plug-ins can get the final object names as they are created. Since they may draw semi-transparent primitives, custom objects are now processed after all other 3D elements (including the grid). [ B ] During scene file loading, newline characters after plug-in server names were not being read before the plug-ins loaded their data. This has been fixed.