[Bf-python] Bug and Fix in tracker for Armature.NLA

Stephen Swaney sswaney at centurytel.net
Thu May 4 19:09:55 CEST 2006


On Thu, May 04, 2006 at 08:59:15AM -0700, Ken Hughes wrote:
> Stephen Swaney wrote:
> >I have a problem with this in that if there is a name collision, it
> >changes the name from what was asked for but does not inform the
> >caller in any way.  The script now has no idea what the new name is or
> >that there is one.
> 
> But it's not hard to find out the resulting name:
> 
>   arm.name = 'this'
>   name = arm.name
> 
> We proabably just need to document this "behavior".

The part that bothers me is that it happens with no indication that
the result was not what you asked for.  That does not seem good.

Normally, when unusual things happen, we throw an exception.  In
the "don't care what happens case", this simply devolves into

  try: arm.name = 'foo'
  except: pass

That does not seem too painful!

> Same thing (name collision and renaming) happens elsewhere now.  Calling 
> Object.New() with a duplicate name returns a unique name, but doesn't 
> inform the user either.

This is slightly different case since you are getting an handle to a
new object, no matter what.  It may not be named exactly like you
wanted, but you know where it is via the handle.

> Note: the sets "design rationale" and "rational scripters" may nave a 
> small or even empty intersection :-)

Heh heh.  indeed!


-- 
Stephen Swaney			
sswaney at centurytel.net




More information about the Bf-python mailing list