View Full Version : Hide Edit Poly movement

 versusfx07-17-2011, 10:12 AMHi guys! I have a problem and i don't know how to solve this. It is possible to hide (to not see) movement created by edge or vertex in EditPoly? Here is a short movie with what happens when i execute the script and i don't what to see that: http://www.esnips.com/doc/43925edf-54e9-404b-b512-91b1c820c6d8/Edit-Poly http://www.youtube.com/watch?v=izb0DcEjSkY I don't want to convert that box in Editable Poly or Editable Mesh. Here is the code: -- Parameters A = 730.0 B = 600.0 C = 22.0 D = 60.0 F = 4.0 G = 3.0 H = 5.0 I = 5.0 J = 120.0 K = 35.0 -------------------------------------- -- The box and Edith Poly -------------------------------------- T=Box lengthsegs:1 widthsegs:2 heightsegs:1 length:((B)+(I*2)-(D*2)-(F)) width:(H*2) height:((A)+(I*2)-(D*2)-(F)) mapcoords:on pos:[(B/2),((C/2)-(H*2)),((D)-(I)+(J)+(F/2))] isSelected:on rotate T (angleaxis 90 [0,0,1]) T.name = "T" T.wirecolor = color 59 67 60 modPanel.addModToSelection (Edit_Poly ()) ui:on subobjectLevel = 2 T.modifiers[#Edit_Poly].SetSelection #Edge #{} T.modifiers[#Edit_Poly].Select #Edge #{20} T.modifiers[#Edit_Poly].SetOperation #Transform T.modifiers[#Edit_Poly].MoveSelection [(K+I),0,0] /* parent:(matrix3 [0,1,0] [-1,0,0] [0,0,1] [300,1,177]) */ axis:(matrix3 [1,0,0] [0,0,1] [0,-1,0] [57,-4.00001,475]) T.modifiers[#Edit_Poly].Commit () T.modifiers[#Edit_Poly].SetSelection #Edge #{} T.modifiers[#Edit_Poly].Select #Edge #{16} T.modifiers[#Edit_Poly].SetOperation #Transform T.modifiers[#Edit_Poly].MoveSelection [-(K+I),0,0] /* parent:(matrix3 [0,1,0] [-1,0,0] [0,0,1] [300,1,177]) */ axis:(matrix3 [1,0,0] [0,0,1] [0,-1,0] [543,-3.99999,475]) T.modifiers[#Edit_Poly].Commit () T.modifiers[#Edit_Poly].SetSelection #Edge #{} T.modifiers[#Edit_Poly].Select #Edge #{11} T.modifiers[#Edit_Poly].SetOperation #Transform T.modifiers[#Edit_Poly].MoveSelection [0,-(K+I),0] /* parent:(matrix3 [0,1,0] [-1,0,0] [0,0,1] [300,1,177]) */ axis:(matrix3 [1,0,0] [0,0,1] [0,-1,0] [300,-4,773]) T.modifiers[#Edit_Poly].Commit () T.modifiers[#Edit_Poly].SetSelection #Edge #{} T.modifiers[#Edit_Poly].Select #Edge #{1} T.modifiers[#Edit_Poly].SetOperation #Transform T.modifiers[#Edit_Poly].MoveSelection [0,(K+I),0] /* parent:(matrix3 [0,1,0] [-1,0,0] [0,0,1] [300,1,177]) */ axis:(matrix3 [1,0,0] [0,0,1] [0,-1,0] [300,-4,177]) T.modifiers[#Edit_Poly].Commit () -- Extrude subobjectLevel = 4 T.modifiers[#Edit_Poly].SetSelection #Face #{} T.modifiers[#Edit_Poly].Select #Face #{10} T.modifiers[#Edit_Poly].SetOperation #ExtrudeFace T.modifiers[#Edit_Poly].extrudeFaceHeight = ((C-C)+(C-H*3)) T.modifiers[#Edit_Poly].Commit () -- CLEAR ALL subobjectLevel = 5 T.modifiers[#Edit_Poly].SetSelection #Face #{} T.modifiers[#Edit_Poly].Select #Face #{1..14} T.modifiers[#Edit_Poly].SetOperation #SetSmooth T.modifiers[#Edit_Poly].smoothingGroupsToSet = 0 T.modifiers[#Edit_Poly].smoothingGroupsToClear = -1 -- R subobjectLevel = 2 sleep 0 T.modifiers[#Edit_Poly].SetSelection #Edge #{} T.modifiers[#Edit_Poly].Select #Edge #{21,22,23,24} T.modifiers[#Edit_Poly].SetOperation #ChamferEdge T.modifiers[#Edit_Poly].chamferEdgeAmount = 3 T.modifiers[#Edit_Poly].bevelType = 0 T.modifiers[#Edit_Poly].edgeChamferSegments = 6 T.modifiers[#Edit_Poly].bevelType = 0 T.modifiers[#Edit_Poly].Commit () subobjectLevel = 0 modPanel.setCurrentObject T.modifiers[#Edit_Poly] clearSelection() Thank you!
denisT
07-17-2011, 10:21 AM
the link is broken.

but what moves do you want to hide? the view redrawing or the modifiers panel flickering?

versusfx
07-17-2011, 10:27 AM
That flickering in the view redrawing. Or both, if is possible. :)
For the video i put another link, now it's OK.

miauu
07-17-2011, 11:21 AM
Try this:
disbleSceneRedraw()
--
script body
--
enableSceneRedraw()

or:
with redraw off
(
script body
)
redrawViews()

versusfx
07-17-2011, 12:52 PM
Works both ways, but only in viewports. Thanks, miauu! :)
Is possible tobe a method that would work in the same way inthe ModifyPanel?

miauu
07-17-2011, 01:01 PM
I dont't know a way to stop flickering when there is changing of the subobject level. YOu can try to hide the command pannel and then to show it.
Put this in the begining and in the end of the sctipt

actionMan.executeAction 0 "408"

denisT
07-17-2011, 01:25 PM
I dont't know a way to stop flickering when there is changing of the subobject level.
i showed it many times in this forum... here is it for example:
http://forums.cgsociety.org/showpost.php?p=6037881&postcount=8

versusfx
07-17-2011, 01:27 PM
Works, miauu, but maybe is another way, a better one, to do this.

miauu
07-17-2011, 01:30 PM
i showed it many times in this forum... here is it for example:
http://forums.cgsociety.org/showpost.php?p=6037881&postcount=8

Thank you. :)

denisT
07-17-2011, 01:31 PM
Works both ways, but only in viewports. Thanks, miauu! :)
Is possible tobe a method that would work in the same way inthe ModifyPanel?

see the answer below. but i would do the same mesh editing using polyop interface methods without applying edit_poly modifier.

versusfx
07-17-2011, 01:46 PM
Works fine both methods, denisT.

But this one (mothod 2) is super, i think!

WM_SETREDRAW=0xB
commandHWND = windows.getChildHWND #max "Command Panel"

windows.sendmessage commandHWND[1] WM_SETREDRAW 0 0
...
windows.sendmessage commandHWND[1] WM_SETREDRAW 1 0

I don't know how to work with polyop interface methods, denisT, maybe it's a better way.
Can you explain, please?

THANK YOU, GUYS!

denisT
07-17-2011, 03:39 PM
I don't know how to work with polyop interface methods, denisT, maybe it's a better way.
Can you explain, please?

here is how i would do it:

(
d = box name:"panel" length:5 width:400 height:600 wirecolor:(color 60 100 120)

converttopoly d
face = 5
polyop.bevelFaces d face 5 -35
polyop.extrudeFaces d face 7
d.edgeChamferSegments = 6
polyop.chamferEdges d (polyop.getEdgesUsingFace d face) 3
update d
)

versusfx
07-18-2011, 12:04 PM
Nice work, denisT! Super!
Thanks again!

CGTalk Moderation
07-18-2011, 12:04 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.

1