[Closed] Edit Poly Update weirdness
Man Edit Poly is odd Here’s a new perplexing puzzle.
- Make a cube
- Add an edit poly modifier
- Select an edge
Type in the following script…
(modPanel.getCurrentObject()).getNumEdges()
I get 12, which is what’s expected.
Now, divide an edge of your cube…
(modPanel.getCurrentObject()).DivideEdge 5 0.5
now see how many edges the object has
(modPanel.getCurrentObject()).getNumEdges()
The answer is…12? It should be 13.
is there some sort of maxscript based update that forces max to update this number?
- Neil
yes , Commit
(modPanel.getCurrentObject()).getNumEdges()
(modPanel.getCurrentObject()).DivideEdge 5 0.5
(modpanel.getCurrentObject()).commit()
(modPanel.getCurrentObject()).getNumEdges()
Thanks for the info. It’s weird that you have to use commit. According to the help file, Commit…
“Corresponds to pressing the Commit button in the User Interface. Commits the edits.”
However, the DivideEdge maxscript command is not using the User Interface, that would be using EnterCommandMode #DivideEdge. So I would only expect to use .commit if I was doing a UI operation.
Also, the polyop.divideEdge command that works on editable polys does not require a commit.
I’ll probably log this with adesk, to hopefully at least get a helpfile mention. Thanks for the info!
- Neil
here is something more to test
select vertsubObject and execute the previous code . … nothing happens
select the EdgeSubObject and select none and execute the code
some edge get divided , now if you do that operation again “form scratch “you get a different Edge Divided
i thought the 1st argument is the EdgeIndex
steps to reproduce
1-select subobject edge
2-select none
3-Execute
4-switch to vert
5-right Click and remove the vert
6-Execute
maybe it needs another commit after removing the vert .