[Bf-python] Bug in Blender.Object.New ?
Manuel Bastioni
manuelbastioni at tin.it
Wed Sep 10 10:48:39 CEST 2003
Thx, it work (and the link instruction isn't necessary :-) )
but I've followed the example from 228 doc:
-----------------------------------------------------------
import Blender
scene = Blencer.Scene.getCurrent () # get the current scene
ob = Blender.Object.New ('Camera') # make camera object
cam = Blender.Camera.New ('ortho') # make ortho camera data object
ob.link (cam) # link camera data with the object
scene.link (ob) # link the object into the scene
ob.setLocation (0.0, -5.0, 1.0) # position the object in the scene
Blender.Redraw() # redraw the scene to show the
updates.
-----------------------------------------------------------
only modify it using the "name" argument in the
new object declaration as I've read here:
-----------------------------------------------------------
New(type, name='type')
Creates a new Object.
Parameters:
type - The Object type: 'Armature', 'Camera', 'Curve', 'Lamp', 'Mesh' or
'Empty'.
(type=string)
name - The name of the object. By default, the name will be the same as
the object type.
(type=string)
-----------------------------------------------------------
I'm using
newBaseObj = Blender.Object.New("Mesh","Base")
but it return a object named "Mesh" instead "Base".
----- Original Message -----
From: "jms" <jmsoler at free.fr>
To: <bf-python at blender.org>
Sent: Wednesday, September 10, 2003 1:11 AM
Subject: Re: [Bf-python] Bug in Blender.Object.New ?
> newBaseMesh = GetRaw()
> ...
> ...[construction of a mesh from a file]...
> ...
> newBaseObject=PutRaw(newBaseMesh,"Base")
> newBaseObject.name="Base"
>
>
> Regards
>
>
> _______________________________________________
> Bf-python mailing list
> Bf-python at blender.org
> http://www.blender.org/mailman/listinfo/bf-python
More information about the Bf-python
mailing list