diff options
author | Campbell Barton <ideasman42@gmail.com> | 2006-09-16 14:05:57 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2006-09-16 14:05:57 +0400 |
commit | c7d39e1a06bef22cb972f84808836dea0ff1e79f (patch) | |
tree | 68242b732cfb2aff7e55a55957cdd20157df91c8 /source/blender/python/api2_2x/Image.c | |
parent | e6960f3881fc3c1f0672b8b115af8e0e2fc307eb (diff) |
New images were being initialized with zero users (normal for other data types),
but for images user counts work differently.
(just noticed this is what blender does so Image.New() now does the same)
Many of the sys functions had maximum path thengths that were too short.
char path[FILE_MAXFILE];
rather then
char path[FILE_MAXDIR + FILE_MAXFILE];
Diffstat (limited to 'source/blender/python/api2_2x/Image.c')
-rw-r--r-- | source/blender/python/api2_2x/Image.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/python/api2_2x/Image.c b/source/blender/python/api2_2x/Image.c index 55ffcfa0eb6..0d443031d3d 100644 --- a/source/blender/python/api2_2x/Image.c +++ b/source/blender/python/api2_2x/Image.c @@ -239,7 +239,9 @@ static PyObject *M_Image_New( PyObject * self, PyObject * args) "couldn't create PyObject Image_Type" ) ); /* reset usage count, since new_image() incremented it */ - image->id.us--; + /* image->id.us--; */ + /* Strange, new images have a user count of one???, otherwise it messes up */ + return Image_CreatePyObject( image ); } |