Пример #1
0
def make2D(sid):
    # create frustum X
    frustumLines = frustumX()
    att = LayerTools.layerAttributes("viewportFramework", System.Drawing.Color.Cyan )
    bakeMany( frustumLines, att)
    cmds = [
        'SelAll',
        'Make2D Enter',
        'Invert Delete SetView World Top',
        'SelNone',
        'SelLayer Make2D::visible::lines::viewportframework',
        'SelLayer Make2D::hidden::lines::viewportframework',
        'ZS',
        'Delete',
        ]
    rcmds( cmds )
Пример #2
0
def make2D(sid):
    # create frustum X
    frustumLines = frustumX()
    att = LayerTools.layerAttributes("viewportFramework",
                                     System.Drawing.Color.Cyan)
    bakeMany(frustumLines, att)
    cmds = [
        'SelAll',
        'Make2D Enter',
        'Invert Delete SetView World Top',
        'SelNone',
        'SelLayer Make2D::visible::lines::viewportframework',
        'SelLayer Make2D::hidden::lines::viewportframework',
        'ZS',
        'Delete',
    ]
    rcmds(cmds)
Пример #3
0
            }


    #i = 25

    s = 5
    for sid in ids:

        setView(sid)
        # unhide all and delete all
        [ rs.LayerVisible( n, True ) for n in layers ]
        FileTools.deleteAll()
        # get all the geometry
        for layer in layers:
            # make the layer
            att = LayerTools.layerAttributes(layer)
            path = '/amigos/db/%s%s' % (sid, layer)
            # get the geometry
            bakePickle( path, layer, att )

            if not rs.IsLayerEmpty( layer ) and len(layers[layer]) > 1:
                # set the material
                material = None
                material = layers[layer][1]
                matindex = __getMaterial( material )
                uv = materials[material]
                cmds = materialConfig( layer, material, uv )
                cmds = [formatCmd(c) for c in cmds]
                rcmds(cmds, False)

        # run through render frames
Пример #4
0
                        ]
                importPath = '/amigos/dump/%s-terrain.3dm' % sid
                data = getModelLayers( importPath, layers )
                print ', '.join(['%s:%s' % (k, len(data[k])) for k in data])
            else:
                data = {}
                if len(scene) > 1:
                    layers = scene[1:]
                else:
                    layers = scene
                for layer in layers:
                    fmask = '/amigos/db/%s%s' % (sid, layer)
                    f = open(fmask, 'rb')
                    data[layer] = pickle.load(f)
                    f.close()
            # bake data
            for key in data:
                layerAtt = LayerTools.layerAttributes( key )
                bakeMany( data[key], layerAtt )
            # do make2d or export AI file of current view
            exportPerspective( outPath )

            #make2D(sid)
            #cmds = [
                    #'SelAll',
                    #'Export "%s" Enter' % outPath,
                    #]



Пример #5
0
                layers = [
                    'bigcontours',
                    'smallcontours',
                ]
                importPath = '/amigos/dump/%s-terrain.3dm' % sid
                data = getModelLayers(importPath, layers)
                print ', '.join(['%s:%s' % (k, len(data[k])) for k in data])
            else:
                data = {}
                if len(scene) > 1:
                    layers = scene[1:]
                else:
                    layers = scene
                for layer in layers:
                    fmask = '/amigos/db/%s%s' % (sid, layer)
                    f = open(fmask, 'rb')
                    data[layer] = pickle.load(f)
                    f.close()
            # bake data
            for key in data:
                layerAtt = LayerTools.layerAttributes(key)
                bakeMany(data[key], layerAtt)
            # do make2d or export AI file of current view
            exportPerspective(outPath)

            #make2D(sid)
            #cmds = [
            #'SelAll',
            #'Export "%s" Enter' % outPath,
            #]
Пример #6
0
        'hardscapemesh': ((1, 5), 'hardscape'),
    }

    #i = 25

    s = 5
    for sid in ids:

        setView(sid)
        # unhide all and delete all
        [rs.LayerVisible(n, True) for n in layers]
        FileTools.deleteAll()
        # get all the geometry
        for layer in layers:
            # make the layer
            att = LayerTools.layerAttributes(layer)
            path = '/amigos/db/%s%s' % (sid, layer)
            # get the geometry
            bakePickle(path, layer, att)

            if not rs.IsLayerEmpty(layer) and len(layers[layer]) > 1:
                # set the material
                material = None
                material = layers[layer][1]
                matindex = __getMaterial(material)
                uv = materials[material]
                cmds = materialConfig(layer, material, uv)
                cmds = [formatCmd(c) for c in cmds]
                rcmds(cmds, False)

        # run through render frames