zoukankan      html  css  js  c++  java
  • 转载 多层影藏 和显示


    global LI_Isolate
    global LI_Back
     btnpress=0
     AllArray=#()
    curselArray=#()
     firstArray
    pview
     activecam
     theNodeName
           
     store1stPos=true


    fn LI_Isolate=
    (
                           
                    if store1stPos==true and btnpress==0 then activecam=getActiveCamera() --store the camera
    --                 viewport.setType #view_persp_user
           
                    if btnpress==0 then pview=getViewTM() --store the perspective viewTM
                                   
                    if selection.count==1 and $.name!=theNodeName then
                    (
                            firstArray=$
                   
                            btnpress+=1

                            AllArray[btnpress]=(for i in objects where i.ishiddeninvpt!=true  collect i) as array
                            max hide inv
    --                          max zoomext sel all
                            theNodeName=$.name
                           
                    curselArray.count=(random 1 1000000)
                    )
                   
                    else if selection.count>1 and selection.count!=curselArray.count then 
                    (
                            if btnpress==0 then firstArray=$ as array
                                   
                            btnpress+=1
                           

                            AllArray[btnpress]=(for i in objects where i.ishiddeninvpt!=true  collect i) as array
                            max hide inv
    --                          max zoomext sel all
                           
                            curselArray=$ as array
                    )
                   
                   
                   
    --         print btnpress
    )


    fn LI_Back=
    (
    try
    (
    curselArray=#()

            if btnpress>0 do try
                            (
                            prevsel=for i in objects where i.ishiddeninvpt!=true collect i
                            unhide allarray[btnpress]
                            btnpress-=1

    --                         max tool zoomextents all
                            select prevsel
                            )catch(max unhide all)
                   
                   
                                   
            if store1stPos==true and btnpress==0  do
            (
                    theNodeName=("LI_"+objects[(random 1 objects.count)].name)
                   
                    if activecam==undefined then
                            (       
                            viewport.setTM pview
                            )               
                            else
                            (
                            viewport.setCamera activecam
                            )
                    try (select firstArray)catch()
            )
           
    --         print btnpress
           
    )catch()
    )


    LI_Isolate()


    LI_Back()

  • 相关阅读:
    LeetCode-62. Unique Paths
    南大算法设计与分析课程课后习题(3)
    linux-2.6.18源码分析笔记---信号
    南大算法设计与分析课程复习笔记(4)L4
    南大算法设计与分析课程复习笔记(3)L3
    南大算法设计与分析课程复习笔记(2)L2
    南大算法设计与分析课程OJ答案代码(2)最大子序列和问题、所有的逆序对
    【zz】史上最全设计模式导学目录(完整版)
    gtest学习
    全文检索及ElasticSearch框架学习
  • 原文地址:https://www.cnblogs.com/gaitian00/p/2258764.html
Copyright © 2011-2022 走看看