Hello guys,
I've been trying to make a "smart" script that combine many functions based on what sub object level I'm currently in and map it to a single hotkey, really inspired by Perna's thread a long while back.
Now my problem is I'm trying to figure out how to translate this Editable Poly code into an Edit Poly compatible;
$.bridgeSelected = 1
if ($.EditablePoly.Bridge () == false) do
(
$.EditablePoly.ConnectEdges ()
)
It's based on miauu's Magic Hotkey script which I'm trying to expand more. Basically to check if the selection is on open edge it'll bridge them, if it's not then connect them. Code bellow just won't work;
$.modifiers[#Edit_Poly].ButtonOp #BridgeEdge
if ($.modifiers[#Edit_Poly].bridgeselected == false) do
(
$.modifiers[#Edit_Poly].ButtonOp #ConnectEdges
)
Any idea?
Replies
This works:
I did try to use array and compare both of these two; Check whether all of the selected edges are part of the open edges or not; if yes then do bridge, else connect. If edgeSel.count > part of the open edges; connect them (this work if one of the selected edges are on the border and the rest are closed edges). But since I'm new to MAXScript, I have no idea on how to proceed from those 2 lines, haha!
Btw, I'm wonder how did you come up with the solution? or just pure out of experience?
And just an extra question, what does the 'res' means?
I forgot to remove the res variable. I used it to show me what the command will return, but since its return OK in any situations it is useless, so remove it from the code.
But how come with the Editable Poly object it's working fine?
The code for Editable Poly and Edit Poly for a same operation are just...different with one another. I don't think I will introduce Edit/ Editable Mesh into the code in the future, since I never use it anyway and adding mode headache, haha!
I might ask few more questions here if I stumble across some problem again next time~
Hey guys, is there any way to merge this blocks for undefinedClass and Edit_Poly together cus both contain the same thing?
So I'm wondering if "if statement" can have more then one condition in order for it to enter the code block bellow it? like "if (this or that) are true then do the code"?
Currently for a multiple condition like that I'm using logic like "if (this) is true then if (that) is true then only do the code".
Ah, I edited my previous post for my current solution