[Bf-python] Bug and Fix in tracker for Armature.NLA
Ken Hughes
khughes at pacific.edu
Thu May 4 19:34:06 CEST 2006
Stephen Swaney wrote:
> 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!
Looking thru blenkernel/intern/library.c, it looks like we'd need to add
our own routine to test for an existing name. In any case, I think we
need to handle this in the "rip the API apart" rewrite?
Ken
More information about the Bf-python
mailing list