[Bf-blender-cvs] [4a4963c] soc-2016-layer_manager: Fix: No way to assign object to layer if it isn't assigned to one yet

Julian Eisel noreply at git.blender.org
Sun Jul 10 11:48:20 CEST 2016


Commit: 4a4963c7c8412128508999cb394d9cbe04a0d117
Author: Julian Eisel
Date:   Sun Jul 10 11:46:58 2016 +0200
Branches: soc-2016-layer_manager
https://developer.blender.org/rB4a4963c7c8412128508999cb394d9cbe04a0d117

Fix: No way to assign object to layer if it isn't assigned to one yet

Should be a temporary fix as long as it's possible to have objects that are not assigned to a layer.

===================================================================

M	source/blender/editors/space_layers/layers_ops.c

===================================================================

diff --git a/source/blender/editors/space_layers/layers_ops.c b/source/blender/editors/space_layers/layers_ops.c
index 11eb991..fb2ce8a 100644
--- a/source/blender/editors/space_layers/layers_ops.c
+++ b/source/blender/editors/space_layers/layers_ops.c
@@ -665,7 +665,9 @@ static int layer_objects_assign_invoke(bContext *C, wmOperator *UNUSED(op), cons
 	if (!slayer->act_tree->active_layer)
 		return OPERATOR_CANCELLED;
 
-	BKE_BASES_ITER_START(scene)
+	/* TODO Uses old base list to allow assigning objects that don't have a layer yet */
+//	BKE_BASES_ITER_START(scene)
+	for (Base *base = scene->base.first; base; base = base->next)
 	{
 		if (base->flag & SELECT) {
 			if (base->layer) {
@@ -674,7 +676,7 @@ static int layer_objects_assign_invoke(bContext *C, wmOperator *UNUSED(op), cons
 			BKE_objectlayer_base_assign(base, slayer->act_tree->active_layer, false);
 		}
 	}
-	BKE_BASES_ITER_END;
+//	BKE_BASES_ITER_END;
 
 	WM_event_add_notifier(C, NC_SCENE | ND_LAYER_CONTENT, NULL);




More information about the Bf-blender-cvs mailing list