Notifications
Clear all

[Closed] Converting selections gives incorrect results?

I’m completely new to Max after having been using Maya for years, and although I am used to writing scripts and tools in MEL/Python/PyMEL, MaxScript is new to me so bear with me.

-- This does not select the faces that connects an edge
$.EditablePoly.ConvertSelection #Edge #Face
subobjectLevel = 4

But converting an edge selection via the command panel > selection > ctrl click “Polygon”, will output exactly the same code as above, and give proper results. Why?
I wanted to make a script which selects the faces belonging to some edges and then assigning these faces to the same smoothing group.

3 Replies

Can you show an image what is the initial edge selection and the result from the maxscript code and manualy converting the selection to polygons?

In both cases I have a single edge selected.
Case 1: I convert the selection by control clicking “Polygon” in the selection panel
Case 2: I try and convert the selection by executing the script above in the scriptListener

Execute your code in Maxscript Editor and it will works.


 (
 	$.EditablePoly.ConvertSelection #Edge #Face
 	subobjectLevel = 4
 )
 

In the Maxscript Listener also works.


 $.EditablePoly.ConvertSelection #Edge #Face
 

and pressing Numpad Enter returns “2”. Then


 	subobjectLevel = 4
 

and pressing Numpad Enter selects the polygons.

Which 3dsMax version you use?