How to use the pyassimp.pyassimp.release function in pyassimp

To help you get started, we’ve selected a few pyassimp examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github anttisalonen / pyopengl-tests / cliff.py View on Github external
def __del__(self):
        pyassimp.release(self.model)
github anttisalonen / pyopengl-tests / two-cubes.py View on Github external
def __del__(self):
        pyassimp.release(self.model)
github adamlwgriffiths / PyGLy / pygly / attic / oai_mesh.py View on Github external
properties = pyassimp.GetMaterialProperties(material)
        for key in properties:
            print "    %s: %s" % (key, properties[key])
    print
    
    print "TEXTURES:"
    if scene.textures != None:
        for index, texture in enumerate(scene.textures):
            print "  TEXTURE", index+1
            print "    width:", texture.mWidth
            print "    height:", texture.mHeight
            print "    hint:", texture.achFormatHint
            print "    data (size):", texture.mWidth*texture.mHeight
   
    # Finally release the model
    pyassimp.release(scene)
github adamlwgriffiths / PyGLy / pygly / attic / oai_mesh.py View on Github external
# clear the existing display lists
        self.displayList = None
        
        self.displayList = glGenLists( 1 )
        glNewList( self.displayList, GL_COMPILE )
        
        glEnable( GL_TEXTURE_2D )
        
        # render the meshes
        self.recursive_render( scene, scene.mRootNode.contents )
        
        glEndList()
        
        # release the model
        pyassimp.release(scene)
github facebookresearch / pyrobot / src / pyrobot / utils / planning_scene_interface.py View on Github external
mesh = Mesh()
        for face in scene.meshes[0].faces:
            triangle = MeshTriangle()
            if len(face.indices) == 3:
                triangle.vertex_indices = [face.indices[0],
                                           face.indices[1],
                                           face.indices[2]]
            mesh.triangles.append(triangle)
        for vertex in scene.meshes[0].vertices:
            point = Point()
            point.x = vertex[0]
            point.y = vertex[1]
            point.z = vertex[2]
            mesh.vertices.append(point)
        pyassimp.release(scene)

        o = CollisionObject()
        o.header.stamp = rospy.Time.now()
        o.header.frame_id = ps.header.frame_id
        o.id = name
        o.meshes.append(mesh)
        o.mesh_poses.append(ps.pose)
        o.operation = o.ADD
        return o