[3dsMax] Creating Primitive Draw Mode

python
max

#1

I’m a fairly novice scripted and I have been looking for something for awhile. I’m not quite sure what its called so its hard to search for it.

  • What’s it called when you click a primitive in the create tab and can draw the primitive out in the viewport?

  • Secondly, can you invoke this mode via script? To let the user draw out a primitive then continue on with a script?


#2

Look up the Max Script help page on the Create Panel, the top of the help page discusses this specifically.
It is up to you to script a “pause” in your execution until the creation is complete

Also look up Command Panel, as you will probably have to set the command panel to Create mode before accessing the Create Panel Scripts


#3

Ah jeesh! There it is. I feel dumb now.

Thanks so much. That is very helpful.

EDIT: Here is the link just in case anyone comes across with with the same question.
http://docs.autodesk.com/3DSMAX/15/ENU/MAXScript-Help/index.html?url=files/GUID-D2A6D67D-60D6-4068-80E2-7C16496213CF.htm,topicNumber=d30e663178


#4

If you’re interested in learning MaxPython API, here’s a link to the bent cylinder demo. It shows how to use the MaxPlus.Factory class to create objects and add modifiers to them…

http://help.autodesk.com/view/3DSMAX/2016/ENU/?guid=__py_ref_demo_bent_cylinder_8py_example_html


#5

@expansivemango: Thanks! That looks really interesting. I have not looked at MaxPython at all. I’m not sure of its pros and cons?

I’m not really sure what is the best way to “wait” while the user draws out the mesh in create mode. This is what I made and it seems to work but I wanted to see if there was a more elegant way.


fn createMode prim =(
	if okToCreate prim do(
		max create mode
		c = undefined
			while c == undefined do(
			c = startObjectCreation prim returnNewNodes: true
			)
		max modify mode
                --Do Stuff
		)

)

(createMode box)