Chaos Corona Forum

General Category => General CG Discussion => Topic started by: jarmo2127 on 2023-09-29, 04:41:17

Title: 3ds Max Scripting
Post by: jarmo2127 on 2023-09-29, 04:41:17
Hey Guys
Where to I find help on scripting - I have a repetitive task of selecting objects converting them to poly and welding the vets - I tried the script listen but is saves a selection set not the whole object vertices

Cheers
Title: Re: Scripting
Post by: Frood on 2023-09-29, 08:54:59
Hi,

just check max script help and search the web. http://www.scriptspot.com and https://forums.cgsociety.org are good resources for script stuff if you are stuck.

Although this is has been the "I need help" section regarding Corona, here is a quickly written script as a start for you. It converts to Poly, adds a vertex weld modifier with a threshold of your choice (thres) and then collapses the stack:

Code: [Select]
thres=0.01 -- vertex weld threshold

for o in $selection do (

try (
format "Processing object '%1'\n" o.name
ConvertTo o Editable_Poly
addmodifier o (vertexweld())
o.vertexweld.threshold=thres
maxOps.CollapseNodeTo o 1 true
)
catch (
format "Error processing object '%1'\n" o.name
)
)



Good Luck



Title: Re: 3ds Max Scripting
Post by: Beanzvision on 2023-10-03, 07:45:32
This also: https://vimeo.com/showcase/1514565