[Bf-python] EditBone Safty

Campbell Barton cbarton at metavr.com
Wed Jul 26 08:55:15 CEST 2006


Can we have the create editbone function, add to a list (stored in the 
armature, but not seen by the user)
when update is called, all these python bones can have a  a property set 
taht will raise an error if they are accsessed.

- Cam

Gilbert, Joseph T. wrote:
> Yes I agree. However I bet this is a more complex issue than it first
> appears....
>
> Because editbones wrap editbone data directly, and that data is freed
> upon calling update(). Python will still maintain a reference to the
> python object but it's underlying data is corrupt because it was freed.
>
> Your issue here (I'm assuming) will be to somehow delete the python
> object from the script's __dict__ so that it can't be called (because
> the python object is now invalid).  
>
> Anyway without looking at the code, I have a feeling this may be the
> case.
>
> -----Original Message-----
> From: bf-python-bounces at projects.blender.org
> [mailto:bf-python-bounces at projects.blender.org] On Behalf Of Campbell
> Barton
> Sent: Sunday, July 23, 2006 9:46 PM
> To: Blender Foundation Python list
> Subject: [Bf-python] EditBone Safty
>
> Hi, was using the armatuer module and noticed that you can still access 
> previously created even though you have exited editMode - with 
> arm_data.update()
>
> It should brobably raise an error if you access an EditBone out of 
> editmode so no memory errors happen,
> The only reason I noticed this is that the edit_bone.name  value became 
> correupt
>
> - Ca,
> _______________________________________________
> Bf-python mailing list
> Bf-python at projects.blender.org
> http://projects.blender.org/mailman/listinfo/bf-python
>
>   


-- 
Campbell J Barton

133 Hope Street
Geelong West, Victoria 3218 Australia

URL:    http://www.metavr.com
e-mail: cbarton at metavr.com
phone: AU (03) 5229 0241



More information about the Bf-python mailing list