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
path: root/source
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2006-10-11 14:33:34 +0400
committerCampbell Barton <ideasman42@gmail.com>2006-10-11 14:33:34 +0400
commitde3c54569d320a2de343039085eefe0b9d45b1ed (patch)
tree9956b041f88ac996d3758b366e33c3e4e5605dd4 /source
parent1266234202a00b85dbb50fa86e1cf67509d19205 (diff)
BPyRender sets renderlayers right now
Object groups were get/set without user counts changeing.
Diffstat (limited to 'source')
-rw-r--r--source/blender/python/api2_2x/Object.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/source/blender/python/api2_2x/Object.c b/source/blender/python/api2_2x/Object.c
index f26b5dd2b76..9ec0ffa8c00 100644
--- a/source/blender/python/api2_2x/Object.c
+++ b/source/blender/python/api2_2x/Object.c
@@ -2904,13 +2904,21 @@ static int Object_setDupliGroup( BPy_Object * self, BPy_Group * args )
{
Object *ob= self->object;
- if( (PyObject *)args == Py_None )
+ if( (PyObject *)args == Py_None ) {
+ if (ob->dup_group)
+ ob->dup_group->id.us--;
+
ob->dup_group = NULL;
- else if( BPy_Group_Check( args ) )
+ } else if( BPy_Group_Check( args ) ) {
+ if (ob->dup_group)
+ ob->dup_group->id.us--;
+
ob->dup_group = args->group;
- else
+ ob->dup_group->id.us++;
+ } else {
return EXPP_ReturnIntError( PyExc_TypeError,
"expected a group or None" );
+ }
return 0;
}