• 吸取属性


    --------------------
    global copy_wir_col = true        -- 吸取线框颜色
    global copy_mat = true            -- 吸取材质
    global copy_name = true        -- 吸取名字
    global copy_modify = true        -- 吸取修改器
    global copy_layer = true        -- 吸取图层
    --------------------
    fn FN_copyset =        --吸取属性设置函数
    (
        try (destroydialog copyset_Roll)catch()
        rollout copyset_Roll "关联属性设置" 110 height:150
        (
            checkbox chk_wirecolor "关联颜色" pos:[20,9] 70 height:20
            checkbox chk_material "关联材质" pos:[20,30] 70 height:20
            checkbox chk_name "统一名字" pos:[20,51] 70 height:20
            checkbox chk_modify "关联修改器" pos:[20,72] 80 height:20
            checkbox chk_layer "统一图层" pos:[20,93] 70 height:20 
            button btn_ok "确定" pos:[20,120] 70 height:25
            
            on copyset_Roll open do
            (
                chk_material.state = copy_mat
                chk_wirecolor.state = copy_wir_col
                chk_name.state = copy_name
                chk_modify.state = copy_modify
                chk_layer.state = copy_layer
            )
            on chk_material changed state do
                copy_mat = state
            on chk_wirecolor changed state do
                copy_wir_col = state
            on chk_name changed state do
                copy_name = state
            on chk_modify changed state do
                copy_modify = state
            on chk_layer changed state do
                copy_layer = state
            on btn_ok pressed do
                destroydialog copyset_roll
        )
        createdialog copyset_Roll style:#(#style_toolwindow, #style_sysmenu)
    )
    fn FN_copypro =        --吸取属性
    (
        obj_pick=pickObject()
        if (selection.count != 0) and (obj_pick != undefined) then
        (
            if copy_wir_col then ($.wirecolor = obj_pick.wirecolor)        -- 线框颜色
            if copy_mat then ($.material = obj_pick.material)        -- 材质
            if copy_name then        -- 统一名字
            (
                for m = 1 to selection.count do (selection[m].name = uniqueName obj_pick.name)
            )
            if copy_modify then    -- 吸取所有修改器 
            (
                if obj_pick.modifiers != 0 then
                (
                    for m = 1 to selection.count do 
                    (
                        
                        for u = obj_pick.modifiers.count  to 1 by -1 do  try( addModifier selection[m]  obj_pick.modifiers[u])catch()
                    )
                )
            )
            if copy_layer then     -- 吸取图层
            (
                vLayer =obj_pick.INodeLayerProperties.layer
                for e in selection do vLayer.addNode e
            )
        )
        else(messagebox "请先选择物体!")
    )
  • 相关阅读:
    怎么将java项目打包成双击就可以运行的jar包---fatjar
    hdu 2629 Identity Card (字符串解析模拟题)
    求最远点对,输出距离
    poj 2299 求逆序数
    第九周作业 实现图片压缩
    第八周作业 struts,spring,jpa整合简单测试
    第七周作业 POI操作Excel,world文档
    第七周作业 关于xml问题
    第六周作业 略谈jsp
    第六作业 持久层框架mybatis小记
  • 原文地址:https://www.cnblogs.com/humd/p/12110024.html
Copyright © 2020-2023  润新知