AWS Thinkbox Discussion Forums

By MaxScript exposed properties are not available in the UI

Hi,

recently I have been building Magma flows by MaxScript when I realized that properties which are exposed by MaxScript don’t show up in the modifier panel.

-Chris

Krakatoa v2.0.2.46508
3ds Max 2012 SP2

Hi Chris,

There is a way to force an update of the exposed properties, but it is slightly convoluted. I will look into making it easier in the future.

Here is what you could do to force the update of the exposed properties:

  1. Get the modifier’s MagmaHolder object. This is the object that contains the flow. You probably already have it in a variable for your node creation calls.
  2. Open the Editor by calling the OpenMagmaFlowEditor function in the MagmaFlowEditor_Functions global struct. Providing the offscreen:true option will open the dialog outside of the visible desktop, making the operation less visually intrusive. Unfortunately, the UI has to be up right now for the properties exposure to work. I will see if this could be changed in the future. The return value of this call is the rollout of the editor. The rollout exposes functions for performing various operations including the exposure of the properties.
  3. Call the exposeControlsToModifier function in the rollout. This should produce the controls in the modify panel.
  4. Make sure you close the rollout. Otherwise, future clicks on the Open Magma Editor button will produce no UI within the current Max session…

theMagma = $.modifiers[1].MagmaHolder theRollout = MagmaFlowEditor_Functions.OpenMagmaFlowEditor theMagma offscreen:true theRollout.exposeControlsToModifier() destroyDialog theRollout

You should call this once the flow has been built and all properties have been set to “Exposed”.

Privacy | Site terms | Cookie preferences