forked from bartvdbraak/blender
BPyRender sets renderlayers right now
Object groups were get/set without user counts changeing.
This commit is contained in:
parent
1266234202
commit
de3c54569d
@ -33,7 +33,7 @@ def imageFromObjectsOrtho(objects, path, width, height, smooth, alpha= True, cam
|
|||||||
scn= Scene.GetCurrent()
|
scn= Scene.GetCurrent()
|
||||||
render_scn= Scene.New()
|
render_scn= Scene.New()
|
||||||
render_scn.makeCurrent()
|
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
|
# Add objects into the current scene
|
||||||
for ob in objects:
|
for ob in objects:
|
||||||
|
@ -2904,13 +2904,21 @@ static int Object_setDupliGroup( BPy_Object * self, BPy_Group * args )
|
|||||||
{
|
{
|
||||||
Object *ob= self->object;
|
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;
|
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;
|
ob->dup_group = args->group;
|
||||||
else
|
ob->dup_group->id.us++;
|
||||||
|
} else {
|
||||||
return EXPP_ReturnIntError( PyExc_TypeError,
|
return EXPP_ReturnIntError( PyExc_TypeError,
|
||||||
"expected a group or None" );
|
"expected a group or None" );
|
||||||
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user