Help a friend to find and select the Parent and Child bones. Previously, I used recursion,

Source: Internet
Author: User

--- Method 1.
Sel_array = For I in selection collect I --- make sure the collected skeleton
 
Global op = false
Global OOP = undefined
For J in 1 to sel_array.count do
(
 
For I in 1 to sel_array.count do
(
If sel_array [J]. parent! = Sel_array [I] Then

(
OP = true
Oop = sel_array [J] as string
-- Print OOP
)
/* Else
(
OP = true
If op then
Oop = sel_array [J] as string
)*/
)

)
If op then
(
Print OOP
)
Sel_array = #()

 

--- Method 2

Sel_array = For I in selection collect I --- make sure the collected skeleton

Boneb = #()

For I in sel_array do
(
Case
(
(I. Parent = undefined ):
(
Append boneb I


)
(Finditem sel_array (I. Parent) = 0 ):
(
Append boneb I
)

) --- End case

) --- End
Select boneb

 

 

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.