[Bf-python] obj.setLocation(x, y, z) and obj.LocX=x don't seem to work

Glen Pike glen at engineeredarts.co.uk
Tue Oct 5 18:27:15 CEST 2010


  Hmm,

     Okay...

     Not sure about dynamic meshes - check you are not still in Editing 
mode 
http://www.blender.org/documentation/249PythonDoc/Window-module.html#EditMode

     1.    Try moving an object you have not created with a script - you 
probably did that already.
     2.    Try placing your mesh at a non-zero location - might be a 
problem when creating it.
     3.    When you get your mesh, can you see the location from 
getLocation()?

     Apart from that I can't really help much, sorry.

     Glen



On 05/10/2010 17:09, andrew2006 at flight.us wrote:
>
> On October 5, 2010 at 3:38 PM Glen Pike <glen at engineeredarts.co.uk> wrote:
>
> >   You might need to call Blender.Redraw(-1)
>
> Tried Redraw(-1) -- no difference
>
> >
> > http://www.blender.org/documentation/249PythonDoc/frames.html
> >
> >
> >
> > On 05/10/2010 16:27, andrew2006 at flight.us wrote:
> > >
> > > hi, all
> > >
> > > i am very new to both blender, python and blender python.
> > >
> > > I have a rudimentary script creating a mesh primitive (cylinder)
> > >
> > > I get the object handle like so: obj=Blender.Object.Get('cylmesh')
> > >
> > > then I do
> > >
> > > obj.setLocation(x,y,0.5)
> > >
> > > -- or, alternatively ---
> > >
> > > obj.LocX=x
> > > obj.LocY=y
> > >
> > > (my "x" and "y" are non-zero)
> > >
> > > but the mesh stays at the origin
> > >
> > > the "setLocation()" call doesn't seem to have an effect, nor do the
> > > "Loc[X,Y,Z]" assignments
> > >
> > > yet, there are no errors reported
> > >
> > > blender version: 2.49b
> > >
> > > tia
> > >
> > > andrew
> > >
> > >
> > > _______________________________________________
> > > Bf-python mailing list
> > > Bf-python at blender.org
> > > http://lists.blender.org/mailman/listinfo/bf-python
> >
>
>
> _______________________________________________
> Bf-python mailing list
> Bf-python at blender.org
> http://lists.blender.org/mailman/listinfo/bf-python

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.blender.org/pipermail/bf-python/attachments/20101005/7debae0f/attachment.html>


More information about the Bf-python mailing list