zoukankan      html  css  js  c++  java
  • 帮朋友写的查找选择的父子骨骼。之前我都是用递归,这个好、


    ---第一种方法。
    sel_array=for i in selection collect i ---确保收集的是骨骼
     
     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=#()

    ---第二种方法


    sel_array=for i in selection collect i ---确保收集的是骨骼

    boneb=#()

    for i in sel_array do
    (
     case of
     (
      (i.parent==undefined):
      (
       append boneb i
       
       
      )
      ( findItem sel_array (i.parent)==0 ):
      (
       append boneb i
      )
      
     )---end case

    )---end for
    select boneb


     

  • 相关阅读:
    Maven简介
    Activiti核心API
    Activiti数据库支持
    使用idea进行activiti工作流开发入门学习
    Activiti 工作流
    枚举其他用法
    枚举类的基本使用
    kotlin中抽象类
    kotlin中接口
    kotlin 类的继承
  • 原文地址:https://www.cnblogs.com/gaitian00/p/2151047.html
Copyright © 2011-2022 走看看