Blender Git Loki

Git Commits -> Revision 2ae5c39

Revision 2ae5c39 by Campbell Barton (master)
February 17, 2011, 07:21 (GMT)
Change to how python classes are initialized when blender calls them.

Annoyance was that operators that defined and __init__ function would need to do...
def __init__(self, another_self):
....

py/rna was calling the class directly with PyObject_Call() but needed to pass the pre-allocated object only so __init__() would run .
This works OK internally but becomes messy since __new__ and __init__ always get the same args there was no way to avoid a superfluous self argument to __init__.

Commit Details:

Full Hash: 2ae5c3932dd7a3f7d232fb04a3d5a11e92c0ff6d
SVN Revision: 34926
Parent Commit: 73df566
Lines Changed: +24, -3

1 Modified Path:

/source/blender/python/intern/bpy_rna.c (+24, -3) (Diff)
Tehnyt: Miika HämäläinenViimeksi päivitetty: 07.11.2014 14:18MiikaH:n Sivut a.k.a. MiikaHweb | 2003-2021