[Closed] MXS Editor . Evaluation Inconsistency
CTRL+E vs SHIFT+ENTER is giving different results:
Next creates plane
selects some edges
and removes them
expected result: remove edges, but preserve verts
ctrl+e == verts removed [X]
shift+enter == verts preserved
What is it I can’t notice? anybody has any idea?
bug?
(
TRY delete $mxseval CATCH()
redrawViews()
x = plane name:#mxseval
x.lengthsegs = 10
x.widthsegs = 10
x.wirecolor = gray
convertToPoly x
select x
max zoomext sel
max modify mode
viewport.SetGridVisibility #all off
sleep .25
redrawViews()
x.vertexTicks = on
subobjectLevel = 2
redrawViews()
sleep .25
polyop.setVertFlags $ \
(for n = 1 to 121
where (mod (ceil(n/11.)) 2)==0
collect n) 1
x.convertSelection #Vertex #Edge requireAll:true
redrawViews()
sleep 1
x.remove selLevel:#Edge
)
if you manually remove edges using poly UI pressing button “Remove” with CTRL pressed, the method removes vertices. We have the same result doing evaluation of your code by CTRL+E .
it means that developers of editablepoly interface do CTRL pressed check on low level of remove function. very smart
I see, seems your right.
mxs also says that there is an internal method not exposed through polyop,
that internal method must be what happens when ctrl+e is pressed
something not possible with just the function .remove(), ironically
still an unexpeted behaviour. but good to know
thanks DenisT
another thing… try to remove edges being on object level. does it work the same way? to remove edges you haven’t to set edge level, but CTRL pressed check might work on edge level only.
too many refreshes, …to make it friendly,
it’s a exhibition script, to show the problem.
nothing related to how I would script something… :]
I wrote it a little fast, I should have placee the refreshes before each sleep
–
The problem happens even, if out of modify panel /subobjects,etc
or with the object not selected.