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
diff options
context:
space:
mode:
authorTon Roosendaal <ton@blender.org>2011-01-22 18:34:20 +0300
committerTon Roosendaal <ton@blender.org>2011-01-22 18:34:20 +0300
commitc0e4c7bbc6c498f601e2748b05126835c84ee352 (patch)
tree26036bd188f6d6f36adaf5fa6695239456536887 /source/blender
parentdb8a253ace6810264062a26f36fe7e59f8a70231 (diff)
Bugfix #25761
Move-to-layer in 3D window didn't work for linked library objects. That should be possible, as was in 2.49. Layer property is local.
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/editors/object/object_relations.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/source/blender/editors/object/object_relations.c b/source/blender/editors/object/object_relations.c
index a0d8e3c9733..704efb59d3d 100644
--- a/source/blender/editors/object/object_relations.c
+++ b/source/blender/editors/object/object_relations.c
@@ -1050,7 +1050,8 @@ static unsigned int move_to_layer_init(bContext *C, wmOperator *op)
unsigned int lay= 0;
if(!RNA_property_is_set(op->ptr, "layers")) {
- CTX_DATA_BEGIN(C, Base*, base, selected_editable_bases) {
+ /* note: layers are set in bases, library objects work for this */
+ CTX_DATA_BEGIN(C, Base*, base, selected_bases) {
lay |= base->lay;
}
CTX_DATA_END;
@@ -1098,8 +1099,8 @@ static int move_to_layer_exec(bContext *C, wmOperator *op)
if(v3d && v3d->localvd) {
/* now we can move out of localview. */
- // XXX if (!okee("Move from localview")) return;
- CTX_DATA_BEGIN(C, Base*, base, selected_editable_bases) {
+ /* note: layers are set in bases, library objects work for this */
+ CTX_DATA_BEGIN(C, Base*, base, selected_bases) {
lay= base->lay & ~v3d->lay;
base->lay= lay;
base->object->lay= lay;
@@ -1111,7 +1112,8 @@ static int move_to_layer_exec(bContext *C, wmOperator *op)
}
else {
/* normal non localview operation */
- CTX_DATA_BEGIN(C, Base*, base, selected_editable_bases) {
+ /* note: layers are set in bases, library objects work for this */
+ CTX_DATA_BEGIN(C, Base*, base, selected_bases) {
/* upper byte is used for local view */
local= base->lay & 0xFF000000;
base->lay= lay + local;