Author Topic: 3ds Max Scripting  (Read 952 times)

2023-09-29, 04:41:17

jarmo2127

  • Active Users
  • **
  • Posts: 7
    • View Profile
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
« Last Edit: 2023-09-29, 15:29:26 by maru »

2023-09-29, 08:54:59
Reply #1

Frood

  • Active Users
  • **
  • Posts: 1922
    • View Profile
    • Rakete GmbH
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



« Last Edit: 2023-09-30, 18:46:31 by Frood »
Never underestimate the power of a well placed level one spell.

2023-10-03, 07:45:32
Reply #2

Beanzvision

  • Corona Team
  • Active Users
  • ****
  • Posts: 3873
  • Bengamin
    • View Profile
    • Cormats
Bengamin Jerrems l
Portfolio l Click me!