Jump to content

 

Photo

Control growfx with maxscript

maxscript

  • Please log in to reply
9 replies to this topic

#1 hkrol

hkrol

    Newbie

  • Members
  • Pip
  • 5 posts

Posted 01 February 2012 - 10:37 AM

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

#2 Eduard

Eduard

    Developer

  • Moderators
  • 1552 posts

Posted 01 February 2012 - 11:21 AM

Hello Henning,

Ok, we'll add this feature soon.

Best regards,
Eduard

Eduard Danilov

www.exlevel.com


#3 hkrol

hkrol

    Newbie

  • Members
  • Pip
  • 5 posts

Posted 01 February 2012 - 12:05 PM

Thank you! :)

#4 Rokas

Rokas

    Advanced Member

  • Members
  • PipPipPip
  • 43 posts

Posted 18 August 2017 - 04:16 AM

how to get growfx path name via maxscript?

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



#5 Eduard

Eduard

    Developer

  • Moderators
  • 1552 posts

Posted 07 September 2017 - 09:34 PM

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!


Eduard Danilov

www.exlevel.com


#6 Eduard

Eduard

    Developer

  • Moderators
  • 1552 posts

Posted 07 September 2017 - 09:46 PM

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!


Eduard Danilov

www.exlevel.com


#7 Rokas

Rokas

    Advanced Member

  • Members
  • PipPipPip
  • 43 posts

Posted 08 September 2017 - 04:07 AM

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



#8 Eduard

Eduard

    Developer

  • Moderators
  • 1552 posts

Posted 08 September 2017 - 07:57 PM

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!


Eduard Danilov

www.exlevel.com


#9 Rokas

Rokas

    Advanced Member

  • Members
  • PipPipPip
  • 43 posts

Posted 09 September 2017 - 07:00 AM

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...



#10 Eduard

Eduard

    Developer

  • Moderators
  • 1552 posts

Posted 09 September 2017 - 11:57 AM

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!


Eduard Danilov

www.exlevel.com






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

Copyright © 2017 Exlevel™