Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(7)  |  Call(7)  |  Derive(0)  |  Import(0)

src/p/y/PyPRP-HEAD/PyPRP/prp_ObjClasses.py   PyPRP(Download)
            print "\n[Visual Object %s]"%(str(self.Key.name))
 
            obj = Blender.Object.New('Mesh',str(self.Key.name))
            scene.objects.link(obj)
            mesh = Mesh.New(str(self.Key.name))
        elif not self.simulation.isNull(): # if it has simulation, but no drawable, it's a collider mesh
            print "\n[Phyical Object %s]"%(str(self.Key.name))
            obj = Blender.Object.New('Mesh',str(self.Key.name))
            scene.objects.link(obj)
            mesh = Mesh.New(str(self.Key.name))
        elif LightInfo:
            print "\n[Lamp %s]"%(str(self.Key.name))
            obj = Blender.Object.New('Lamp',str(self.Key.name))
            scene.objects.link(obj)
            obj.layers=[1,]
        elif CameraMod:
            print "\n[Camera %s]"%(str(self.Key.name))
            obj = Blender.Object.New('Camera',str(self.Key.name))
            scene.objects.link(obj)
            obj.layers=[4,]
        else: # if all else fails, it's an Empty
            print "\n[Empty Object %s]"%(str(self.Key.name))
            obj = Blender.Object.New('Empty',str(self.Key.name))
            scene.link(obj)
            plCoordinateInterface.Import(self,root,obj)

src/p/y/PyPRP-HEAD/PyPRP/prp_Functions.py   PyPRP(Download)
def alcCreateLinkInPoint(name="LinkInPointDefault",where=None,page=0):
    obj = Blender.Object.New('Empty',name)
    scene = Blender.Scene.GetCurrent()
    scene.link(obj)
    #obj.addProperty("name",name)

src/p/y/PyPRP-HEAD/PyPRP/prp_MatClasses.py   PyPRP(Download)
                if not mtex.texco == Blender.Texture.TexCo["OBJECT"]:
                    # first make a calculation of the uv transformation matrix.
                    uvmobj = Blender.Object.New ('Empty')
 
                    # now set the scale (and rotation) to the object