Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2008-05-06 21:54:55 +0400
committerCampbell Barton <ideasman42@gmail.com>2008-05-06 21:54:55 +0400
commit4255f3c7abe5c0bc7e9d2bc407ec6671e6ae6c45 (patch)
treed36e4b68107597912f8f9cf38764a03c78b8401f /source/blender/python/api2_2x/Blender.c
parent722f24d15357275ee3efed33fa03f9b27909a604 (diff)
made python add mesh module respect blenders user settings for editmode and view align.
added sys.cleanpath() was a patch in the tracker but blender's internal path cleaning is now more general and can be used from python.
Diffstat (limited to 'source/blender/python/api2_2x/Blender.c')
-rw-r--r--source/blender/python/api2_2x/Blender.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/source/blender/python/api2_2x/Blender.c b/source/blender/python/api2_2x/Blender.c
index daba0c36fdf..7c2895d96be 100644
--- a/source/blender/python/api2_2x/Blender.c
+++ b/source/blender/python/api2_2x/Blender.c
@@ -545,8 +545,12 @@ static PyObject *Blender_Get( PyObject * self, PyObject * value )
else if(StringEqual( str, "compressfile" ))
ret = PyInt_FromLong( (U.flag & USER_FILECOMPRESS) >> 15 );
else if(StringEqual( str, "mipmap" ))
- ret = PyInt_FromLong( (U.gameflags & USER_DISABLE_MIPMAP) == 0 );
- else
+ ret = PyInt_FromLong( (U.gameflags & USER_DISABLE_MIPMAP)!=0 );
+ else if(StringEqual( str, "add_view_align" ))
+ ret = PyInt_FromLong( ((U.flag & USER_ADD_VIEWALIGNED)!=0) );
+ else if(StringEqual( str, "add_editmode" ))
+ ret = PyInt_FromLong( ((U.flag & USER_ADD_EDITMODE)!=0) );
+ else
return EXPP_ReturnPyObjError( PyExc_AttributeError, "unknown attribute" );
if (ret) return ret;