Required Changes To Atmospheric plug-ins

3DS Max Plug-In SDK

Required Changes To Atmospheric Plug-ins

See Also: What's New in the MAX 3.0 SDK, Required Changes to MAX 2.0 Plug-Ins for MAX 3.0.

Atmospheric Gizmos

Developers may want to use the Atmospheres & Effects rollup which appears in some of the core 3ds max plug-ins. This is a new rollout that appears only in the Modify panel. (It does not appear when you create the atmosphere gizmo.) The items in the new rollout let you assign Atmosphere and Render Effects to a selected atmosphere gizmo from the command panel. Note that you can do the same thing from within the Environment dialog or the Render Effects dialog, but this provides the controls for the gizmo you’re working on and lets you easily see, just by selecting a gizmo in the scene, if that gizmo has an effect assigned to it.

See Class Interface and Class Atmospheric for the required methods.

Handling Undo for Adding and Deleting Gizmo References

Atmosphere plug-ins need to implement undo for the adding and deleting of gizmo references.

Below is a summary of what needs to be done:

Implement the SpecialFX methods AppendGizmo() and DeleteGizmo() to handle the undo. See Class SpecialFX. There are helper classes for this purpose. See Class AppendGizmoRestore and Class DeleteGizmoRestore.

Anywhere in the plug-in where a gizmo is deleted, it should call DeleteGizmo() so the undo will work uniformly. The DeleteGizmo() calls should be surrounded with theHold.Begin and theHold.Accept.

AppendGizmo() calls (for instance inside pick procs) should be surrounded by theHold.Begin and theHold.Accept.

Use code in NotifyRefChanged() to update any list box controls, where changes can happen due to an Undo. For example:

  case REFMSG_SUBANIM_STRUCTURE_CHANGED:

  case REFMSG_NODE_NAMECHANGE:

   if (dlg) dlg->UpdateNames();

   break;