Is this correct?
(
obj = $Box001
while obj.parent != undefined and (isGroupHead obj.parent) do obj = obj.parent
print obj
)
no need for print but that’s it. One line code
fn getRootGroupHead obj = (while obj.parent != undefined and (isGroupHead obj.parent) do obj = obj.parent)
Now we need one line for getGeometryGroupMembers function
no… i give a clue… condition looks like
node != undefined and (not isgrouphed node or ...)
Second 1st condition “not isgrouphed node“is killing me. Are we talk about rootGroup or not?
trust me… the function looks as:
fn getRootGroupHead node = if ... node do
(
while node != undefined and (not isgrouphead node and ... node) do node = ...
node
)
First try
fn getRootGroupHead node = if isgroupMember node do
(
while node != undefined and (not isgrouphead node and not isKindOf node Dummy) do node = node.parent
node
)
Returns first parent group. Second[2nd] condition is wrong or whole code
Me? You are melting my brain with your tricky fn’s.
isGroupHead and isGroupMember.
Or I wrong again.
My mxs editor is hot. Even worse I freeze max 50 times. Only Task Manager helps me now
My son have 39.5 deg body temperature. I don’t have much time, but
Denis, can you tell me(us) when this will not works?
while obj.parent != undefined and (isGroupHead obj.parent) do obj = obj.parent
Sorry bud I did not know? I saw that you active on these threat.
If you ask that kind of questions this “5 pages torture” will never end.
Denis, I tried for second condition:
#1 (not isgrouphead node and isGroupMember node.parent)
#2 (not isgrouphead node and not isGroupMember node.parent)
#3 (not isgrouphead node and isGroupMember node)
#4 (not isgrouphead node and not isGroupMember node)
But without luck. I not see your kindness today. Can this torture to be completed
You need to take care for your son, go, I will stay to see Denis mystery fn. But maybe
do you wanna the answer? easy… i can show. and i’m absolutely sure you will say after that: “FUKC… how simple is it!”
Maybe after we finish getGeometryGroupMembers function:) I’m kidding.
You start the challenge. Me and Kostadin are tried tho solve the riddle and we did in some way.
But you have another probably better solution that works in any cases. So its up to you to decide is it time to show your result and continue challenge
Last attempt and I will leave you:
fn getRootGroupHead node = if isValidNode node do
(
while node.parent != undefined and (isgrouphead node.parent and isGroupMember node) do node = node.parent
node
)
getRootGroupHead $Box001
returns the correct result, but i removed
not isgroupHead node
the lite porno lucky (69) is famous now. his really primitive question made a discussion.
He asked here first and on scriptspot he have different “area” number.
this is the good weekend discussion