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:
authorCampbell Barton <ideasman42@gmail.com>2012-01-13 14:14:48 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-01-13 14:14:48 +0400
commite06d82227c2d6fc58f3e3d28852f251c1de68997 (patch)
tree1efede1045efe8dc17eeff200fcf2b36e11736d2
parent0527c4923d23cc205e9e74de2d53853ca96cc08c (diff)
adding metaballs and lamps in local mode was broken.
-rw-r--r--release/scripts/startup/bl_ui/space_info.py6
-rw-r--r--source/blender/editors/object/object_add.c12
2 files changed, 9 insertions, 9 deletions
diff --git a/release/scripts/startup/bl_ui/space_info.py b/release/scripts/startup/bl_ui/space_info.py
index 56a48ad77b9..901f709fb5b 100644
--- a/release/scripts/startup/bl_ui/space_info.py
+++ b/release/scripts/startup/bl_ui/space_info.py
@@ -273,7 +273,9 @@ class INFO_MT_add(Menu):
def draw(self, context):
layout = self.layout
- layout.operator_context = 'EXEC_SCREEN'
+ # note, dont use 'EXEC_SCREEN' or operators wont get the 'v3d' context.
+
+ layout.operator_context = 'EXEC_AREA'
#layout.operator_menu_enum("object.mesh_add", "type", text="Mesh", icon='OUTLINER_OB_MESH')
layout.menu("INFO_MT_mesh_add", icon='OUTLINER_OB_MESH')
@@ -296,7 +298,7 @@ class INFO_MT_add(Menu):
layout.separator()
layout.operator("object.camera_add", text="Camera", icon='OUTLINER_OB_CAMERA')
- layout.operator_context = 'EXEC_SCREEN'
+ layout.operator_context = 'EXEC_AREA'
layout.operator_menu_enum("object.lamp_add", "type", text="Lamp", icon='OUTLINER_OB_LAMP')
layout.separator()
diff --git a/source/blender/editors/object/object_add.c b/source/blender/editors/object/object_add.c
index 196362d9fcd..c53549728f6 100644
--- a/source/blender/editors/object/object_add.c
+++ b/source/blender/editors/object/object_add.c
@@ -226,20 +226,18 @@ static void object_add_generic_invoke_options(bContext *C, wmOperator *op)
View3D *v3d = CTX_wm_view3d(C);
Scene *scene = CTX_data_scene(C);
int a, values[20], layer;
-
+
if(v3d) {
layer = (v3d->scenelock && !v3d->localvd)? scene->layact: v3d->layact;
-
- for(a=0; a<20; a++)
- values[a]= (layer & (1<<a));
}
else {
layer = scene->layact;
+ }
- for(a=0; a<20; a++)
- values[a]= (layer & (1<<a));
+ for (a=0; a<20; a++) {
+ values[a]= (layer & (1<<a));
}
-
+
RNA_boolean_set_array(op->ptr, "layers", values);
}
}