Jump to content

GrowFx 2.x add wind after mesh modifier maxscript


Recommended Posts

Hi Eduard,

 

I managed to create a wind and attach it to the paths. 

 

-- Create wind direction modifier
wind_direction = $.addNode #NDirWind "Wind" 0 0

-- Connect wind direction to path 1
$.createConnection 1 4 wind_direction 2

-- Create public node
public_node = $.addPublicNode wind_direction 3 "Wind" 100 0

-- Creating wind helper:
gfx_wind = Windhelper name:($.name + "_wind")

-- Attach the wind to the Public node:
$.attachObjectToPublicNode public_node gfx_wind

 

All good so far. While trying to modify the wind modifier properties values all work apart from Looping Value.

 

/*
   WindDirection Values:
      [6] - Stiffness
      [7] - Flexibility
      [8] - Scale Frequency
      [9] - Amplitude Multiplier
      [11] - Use axial rotation
      [12] - Max angle
      [13] - Use Strength
      [14] - Strength factor
      [16] - Orientation for leaves
      [17] - Angle strength
      [19] - Looping Animation
      [20] - Looping period
*/

looping_period_property_index = 20
new_looping_value = 33

$.setNodeParamValue wind_direction looping_period_property_index new_looping_value

 

What am I missing?

 

Cheers!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...