-- Get Head Dummy fn GetHeadDummy gos =( result for i in gos do if Classof i == Dummy && i.children.count == 0 && i.parent==null do result =i return i ) -- Get Polys fn GetPolys gos =( result = #() for i in gos do if Classof i == PolyMeshObject do append result i return result )
fn GetHairPolys PolyMeshs =( result for i in PolyMeshs do ( polyMeshName = i.name if matchpattern i.name pattern: "*Hair*" == true do ( result = i ) ) return result ) -- 获得所有子集 http://tk.v5cg.com/help/250.html fn RecurseChildren RecurseCollector currNode= ( append RecurseCollector currNode local childNodes = currNode.children if(childNodes.count !=0)then for c in childNodes do ( RecurseChildren RecurseCollector c ) )
fn GetChildrens currNode= ( -- 清空集合 RecurseCollector = #() -- 开始递归 RecurseChildren RecurseCollector currNode -- 返回 return RecurseCollector ) -- 获得skin列表 fn GetBipsOnSkin skin =( result = #() num = skinOps.GetNumberBones skin for i=1 to num do boneName = skinOps.GetBoneName skin i 0 append result boneName return result ) -- 按键 on GetCurrentPath pressed do ( path = GetFolderPath() if(path.count==0) then( messageBox "错误!" ) else( ExportPath.text = GetFolderPath() ) )
on Export pressed do ( aa = $ ExportFbx aa ExportPath.text )
on ShowIn pressed do (
a= $.modifiers[#Skin] cc = GetBipsOnSkin a for i in cc do print i )