Notifications
Clear all

[Closed] Hide Edit Poly movement

Hi guys!

                I have a problem and i don't know how to solve this.
                [b]It is possible [/b][b]to[/b][b] hide[/b][i][b] (to [/b][b]not [/b][b]see[/b][/i][b][i])[/i] [/b][b]movement[/b][b] created by[/b][b] edge[/b][b] or [/b][b]vertex [/b][b]in [/b][b]Edit[/b][b]Poly[/b][b]?[/b]
                
           Here is a short movie with what happens when i execute the script and i don't what to see that:
              [img] http://www.esnips.com/doc/43925edf-54e9-404b-b512-91b1c820c6d8/Edit-Poly [/img]
               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!
12 Replies

the link is broken.

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

That flickering in the view redrawing. Or both, if is possible.
For the video i put another link, now it’s OK.

Try this:
disbleSceneRedraw()

script body

enableSceneRedraw()

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

Works both ways, but only in viewports. Thanks, miauu!
Is possible tobe a method that would work in the same way inthe ModifyPanel?

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”

1 Reply
(@denist)
Joined: 11 months ago

Posts: 0

i showed it many times in this forum… here is it for example:
http://forums.cgsociety.org/showpost.php?p=6037881&postcount=8

Works, miauu, but maybe is another way, a better one, to do this.

Thank you.

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

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!

Page 1 / 2