PDA

View Full Version : Silo cut tool


Wheiraucher
05-30-2008, 04:44 PM
Hi

I'm puzzled. I tried to create a cut functionality in 3DSmax similar to Silo. Depending on the subobjectlevel and amount of selected elements the same shortcut should activate a different macroscript. e.g if two edges are selected the script should perform a connectedges, if one edge is selected the script should perform divideEdge and if no edge is selected the script should activate the epoly_cut macro. Similar in vertex mode, there's connectvertices and cut. and so on.

I finished this script and it works fine as long as it is assigned to a button. But if i assign a keyboard shortcut it does not, or only parts do. You can have a look at my script and try for yourself. The part that is troubling me most is the edgedivide if only one edge is selected. Max refuses to divide the edge if i use a keyboard shortcut, but happily divides if i press a button. weird.

macroScript SiloConnect
category:"Silo functionality"

(
case subobjectlevel of
(
0: macros.run "Editable Polygon Object" "Epoly_cut"
1: (
if ((polyOp.getVertSelection $).numberset) > 0 then $.EditablePoly.ConnectVertices()
else macros.run "Editable Polygon Object" "Epoly_cut"
)
2: (
case ((polyOp.getEdgeSelection $).numberset) of
(
0: macros.run "Editable Polygon Object" "Epoly_cut"
1: $.EditablePoly.divideEdge ($.EditablePoly.GetSelection(#Edge)as array)[1] 0.5
default: $.EditablePoly.ConnectEdges()
)
)
3: macros.run "Editable Polygon Object" "Epoly_cap"
4: if ((polyOp.getfaceSelection $).numberset) > 0 then macros.run "Editable Polygon Object" "Epoly_Bevel" else macros.run "Editable Polygon Object" "Epoly_cut"
default: macros.run "Editable Polygon Object" "Epoly_cut"
)
)

Wheiraucher
06-02-2008, 09:21 AM
can someone tell me if he experiences the same problem?

run the script and find it in the customize ui window. Create a toolbar with a button assigned to the macro and a keyboard shortcut. And then try if both work the same.

thanks, David

zortech
06-02-2008, 11:59 AM
I just checked your script and it seems to work fine for me. I have tried both, using a shortcut as well as a toolbar button.

I'm not sure but I don't think there's a difference in between using it as button or shortcut.

Wheiraucher
06-02-2008, 12:20 PM
hi

thanks for the reply. I found the problem somewhere else. It was my fault. The space key was already assigned to connect somewhere else, but i did not recognize that. Kind of a dumb mistake...:D

Anyways. I'd be interested if you find the script useful?

CGTalk Moderation
06-02-2008, 12:20 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.