forked from bartvdbraak/blender
(Python Object API)
setting object layers didnt break once the base of an object was found. DAG update and countall ran even when the object wasnt in the scene.
This commit is contained in:
parent
188e3ede4f
commit
62ac9cba9c
@ -1230,7 +1230,9 @@ static int Object_setSelect( BPy_Object * self, PyObject * value )
|
||||
}
|
||||
base = base->next;
|
||||
}
|
||||
if (base) { /* was the object selected? */
|
||||
countall( );
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -4297,13 +4299,16 @@ static int Object_setLayers( BPy_Object * self, PyObject *value )
|
||||
local = base->lay;
|
||||
base->lay = local | layers;
|
||||
self->object->lay = base->lay;
|
||||
break;
|
||||
}
|
||||
base = base->next;
|
||||
}
|
||||
|
||||
/* these to calls here are overkill! (ton) */
|
||||
if (base) { /* The object was found? */
|
||||
countall();
|
||||
DAG_scene_sort( G.scene );
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -4333,11 +4338,14 @@ static int Object_setLayersMask( BPy_Object *self, PyObject *value )
|
||||
local = base->lay;
|
||||
base->lay = local | layers;
|
||||
self->object->lay = base->lay;
|
||||
break;
|
||||
}
|
||||
base = base->next;
|
||||
}
|
||||
if (base) { /* The object was found? */
|
||||
countall();
|
||||
DAG_scene_sort( G.scene );
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user