Jump to content
hkrol

Control growfx with maxscript

Recommended Posts

Hello,

 

i'm thinking of writing small maxscripts to help with my complex growfx-system.

For example I want to iterate through all meta-meshes and toggle the face-size between two values (low and high).

But all my paths and meta-meshes are only accessible via an explicit name it seems.

I'd like to do something like this:

for path in $growfx.paths do
(
for mesh in path.meshes do
(
	 if classof mesh == Meta_Mesh then mesh.Face_size = 2
)
)

 

If this isn't doable at this time then please add this post to the feature requests.

 

regards,

Henning

Share this post


Link to post
Share on other sites

how to get growfx path name via maxscript?

since some parameters need it: <growfx>.<path>.Enabled : Boolean default: on

 

Of course, it's works. And you can check this with the command:

 

ShowProperties $.Path_01

  .Enabled : boolean

  .WireColor : RGB color by value

  .Length_path : float

  .Chaos_length : float

  .Steps : float

  .Steps_Graph

  .PARAMETER_Angle

  .PARAMETER_Length

  .Distr_01

  .Random_dir_01

  .Cylinder_mesh_01

false

 

Thanks!

Share this post


Link to post
Share on other sites

Hello,

 

i'm thinking of writing small maxscripts to help with my complex growfx-system.

For example I want to iterate through all meta-meshes and toggle the face-size between two values (low and high).

But all my paths and meta-meshes are only accessible via an explicit name it seems.

I'd like to do something like this:

for path in $growfx.paths do
(
	for mesh in path.meshes do
	(
		 if classof mesh == Meta_Mesh then mesh.Face_size = 2
	)
)
If this isn't doable at this time then please add this post to the feature requests.

 

regards,

Henning

 

 

 

Now you can use the following script:

for i=1 to $.getNumPaths() do (
    for j=1 to $.getNumMeshBuilders(i) do (
        if ($.getMeshBuilder i j).Type == #Meta then
           ($.getMeshBuilder i j).Face_size = 2
    )
)

Thanks!

Share this post


Link to post
Share on other sites

I still dont see a maxscript command to get path name.

My paths name is not Path_01.

 

command "ShowProperties $.Path_01"  doesnt work.

 

i need another command to get my paths name

sUuUmzW.png

Share this post


Link to post
Share on other sites

I still dont see a maxscript command to get path name.

My paths name is not Path_01.

 

command "ShowProperties $.Path_01"  doesnt work.

 

i need another command to get my paths name

sUuUmzW.png

 

Your path name is Branch or Trunk, so please use the following command: ShowProperties $.Branch  or  ShowProperties $.Trunk...

 

Thanks!

Share this post


Link to post
Share on other sites

Dah.. I understand that...

I want batch process multiple growFX objects all paths not knowing their names...

I need maxscript commands, to get the names of paths used in current growfx.

 

I can`t explain more clear than that...

Share this post


Link to post
Share on other sites

Dah.. I understand that...

I want batch process multiple growFX objects all paths not knowing their names...

I need maxscript commands, to get the names of paths used in current growfx.

 

I can`t explain more clear than that...

 

Yes of course, here's some maxscript commands:

 

 

getNumPaths()

Returns the number of paths.

 

getNumDistributors <path_index_integer>

Returns the number of distributors for the specified path, index are 1-based.

 

getNumModifiers <path_index_integer>

Returns the number of modifiers for the specified path, index are 1-based.

 

getNumMeshBuilders <path_index_integer>

Returns the number of mesh builders for the specified path, index are 1-based.

 

getNumAfterMeshModifiers <path_index_integer>

Returns the number of after mesh modifiers for the specified path, index are 1-based.

 

 

getPath <path_index_integer>

Returns the indexed path, index are 1-based.

 

getDistributor <path_index_integer> <distributor_index_integer>

Returns the indexed distributor for the specified path, indexes are 1-based.

 

getModifier <path_index_integer> <modifier_index_integer>

Returns the indexed modifier for the specified path, indexes are 1-based.

 

getMeshBuilder <path_index_integer> <mesh_index_integer>

Returns the indexed mesh builder for the specified path, indexes are 1-based.

 

getAfterMeshModifier <path_index_integer> <aftermeshmodifier_index_integer>

Returns the indexed after mesh modifier for the specified path, indexes are 1-based. 

 

 

 

You can find all MAXScript Access functions in the GrowFX Help...

 

Thanks!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×