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


     

  • 相关阅读:
    tp 30秒超时
    zend studio git 提示错误
    php连接数据库
    php点击排序
    表情符号解析
    js Object.assign 方法
    Web界面简繁体转换
    H5骨架屏实战
    JavaScript heap out of memory问题
    Vue bus插件封装
  • 原文地址:https://www.cnblogs.com/gaitian00/p/2151047.html
Copyright © 2011-2022 走看看