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

andrew2006 at flight.us andrew2006 at flight.us
Mon Oct 11 07:15:22 CEST 2010


 

On October 11, 2010 at 4:22 AM Stephen Swaney <sswaney at centurytel.net> wrote:

> On Sun, Oct 10, 2010 at 11:39:08PM -0400, andrew2006 at flight.us wrote:
> 
> > The issue is referring to the object AFTER it's created (via the above
> > command), by name.
> >  
> > Using  'mynewobjectname' with Blender.Object.Get(...) is what fails.
> >  
> > You have to include the suffix (it appears):
> > Blender.Object.Get('mynewobjectname.001'), in order to get the right
> > reference.
>
> It is not a 'suffix'.  It is simply the last few characters of the object
> name.
 
well it's less of a prefix than a suffix (morpho-semantically)
 
and no, "last few characters" is unnecessarily broad and vague. It's not just
"last few characters"; it is, more specifically, a 3-digit number, with leading
zeros, apparently incremented with/for every newly created object with a
duplicating name, appended to the name passed to myscene.objects.new(...,...),
with a joining period. Intended to index a series of objects created by the same
name, in succession, when the pre-existing one is not deleted first. (Has the
appearance of an extension, but isn't really one)
 
> To refer to an object by name, you have to use its actual name.
 
No! that has been my point all along. Using the original (actual?) name does not
work for me (see original post), but using the name plus the ".001" does. Like
so:
 
               Blender.Object.Get('name_i_originally_gave.001')
 
 
 

> --
> Stephen Swaney                       
> sswaney at centurytel.net
>
> _______________________________________________
> 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/20101011/3ae127ba/attachment.html>


More information about the Bf-python mailing list