BPyRender sets renderlayers right now

Object groups were get/set without user counts changeing.
This commit is contained in:
Campbell Barton 2006-10-11 10:33:34 +00:00
parent 1266234202
commit de3c54569d
2 changed files with 12 additions and 4 deletions

@ -33,7 +33,7 @@ def imageFromObjectsOrtho(objects, path, width, height, smooth, alpha= True, cam
scn= Scene.GetCurrent()
render_scn= Scene.New()
render_scn.makeCurrent()
render_scn.Layers |= 2097151 # all layers enabled
render_scn.Layers |= (1<<20)-1 # all layers enabled
# Add objects into the current scene
for ob in objects:

@ -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;
}