Announcements

Between mid-October and November, the content on AREA will be relocated to the Autodesk Community M&E Hub and the Autodesk Community Gallery. Learn more HERE.

MAX Script Listener

MAX Script Listener

Anonymous
Not applicable
1,113 Views
5 Replies
Message 1 of 6

MAX Script Listener

Anonymous
Not applicable

I'm trying to make a script that does a repetative task for me. The task is this:

 

Apply an edit mesh modifier

select all verts and weld at .005"

Select all faces

Unify normals

clear smoothing groups

set auto smooth to 25 and apply to all faces

deselect

 

When I try to use MAX Script Listener, it doesnt seem to capture all the settings. (Or any of them except putting the modifier on the geometry)

 

How do I know what listener will and will not capture?

 

I wasted about three hours looking in the maxscript help, and watching (trying to find) you tube videos to help, but I'm coming up empty and feeling very frustrated.

 

Admitedly, I know very little about python scripting, and maxscript so any help would be greatly appreciated!

 

Dean

0 Likes
Accepted solutions (2)
1,114 Views
5 Replies
Replies (5)
Message 2 of 6

Anonymous
Not applicable

Could someone please move this question to the "Programming" area? I mistakenly posted it here.

 

Thanks,

 

Dean

0 Likes
Message 3 of 6

RGhost77
Advisor
Advisor

Pyro777 wrote:)

 

How do I know what listener will and will not capture?

 


Is no way 😞 I don't think somebody still uses macrorecorder...

You must write your script using maxscript documentation for proper "commands".


Royal Ghost | veda3d.com
0 Likes
Message 4 of 6

kevinvandecar
Community Manager
Community Manager

Hello,

 

The MAXScript listener is a slave to the functionality provided from the C++ SDK side via function publishing. So in this case yes, there is missing echoing of the needed commands. Sorry for that.

 

Normally the best solution for Autodesk plugins is to review the documentation. The edit mesh modifier has pretty good docs, so hopefully you can find what you need there. See here for a starting point:

http://help.autodesk.com/view/3DSMAX/2015/ENU/?guid=__files_GUID_2D34BEBA_4DF3_4EC7_8E8E_4477DB6D954...

 

hope it helps, kevin

 

 


Kevin Vandecar
Developer Technical Services
Autodesk Developer Network



0 Likes
Message 5 of 6

paulneale
Advisor
Advisor
Accepted solution

I would do this with modifiers instead as it is far easier. 

 

Run this

 

for x in selection do
(
	vw=Vertex_Weld()
	vw.threshold=0.005
	addModifier x vw
	
	nm=Normalmodifier()
	nm.unify=true
	addModifier x nm
	
	sm=smooth()
	sm.autoSmooth=true
	sm.threshold=25
	addModifier x sm
)

 

Paul Neale

http://paulneale.com


Paul Neale




EESignature

Message 6 of 6

paulneale
Advisor
Advisor
Accepted solution

Or

 

for x in selection do
(
	addModifier x (Vertex_Weld threshold:0.005)
	addModifier x (Normalmodifier unify:true)
	addModifier x (smooth autoSmooth:true threshold:25)
)

 

Paul Neale

http://paulneale.com


Paul Neale




EESignature