global GetBoneArray
struct GetBoneArray
(
 RootBone=#(),
 fn selRootBone =
 (
  sel_Array=selection as Array
  for sel_obj in sel_Array where findItem sel_Array (sel_obj.parent)==0 do append RootBone sel_obj
  select RootBone
 ),
 fn getChildren theNode =
 (
  nodeArray = #()
  for obj in theNode.children do
  (
  append nodeArray obj
  join nodeArray (getChildren obj)
  )
  return nodeArray
 ),
 ChildrenBone=#(),
 fn GetAllChildrenBone=
 (
  for i in RootBone do ChildrenBone +=getChildren i
 ),
 allBone=#(),
 fn GetAllBone=
 (
  allBone=RootBone+ChildrenBone
 )
)


GetBoneArray=GetBoneArray()
GetBoneArray.selRootBone()
GetBoneArray.GetAllChildrenBone()
GetBoneArray.GetAllBone()


 

相关文章:

  • 2021-10-23
  • 2022-01-10
  • 2022-02-02
  • 2021-08-30
  • 2021-06-07
  • 2021-10-24
  • 2022-01-15
猜你喜欢
  • 2022-01-22
  • 2021-06-07
  • 2021-12-10
  • 2021-11-30
  • 2022-01-07
  • 2021-08-28
  • 2022-01-12
相关资源
相似解决方案