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:
Diffstat (limited to 'release/scripts/startup/bl_ui/space_info.py')
-rw-r--r--release/scripts/startup/bl_ui/space_info.py48
1 files changed, 23 insertions, 25 deletions
diff --git a/release/scripts/startup/bl_ui/space_info.py b/release/scripts/startup/bl_ui/space_info.py
index 63322ddeecb..1f4a128acad 100644
--- a/release/scripts/startup/bl_ui/space_info.py
+++ b/release/scripts/startup/bl_ui/space_info.py
@@ -196,7 +196,7 @@ class INFO_MT_mesh_add(Menu):
def draw(self, context):
layout = self.layout
- layout.operator_context = 'INVOKE_REGION_WIN'
+ layout.operator_context = 'EXEC_REGION_WIN'
layout.operator("mesh.primitive_plane_add", icon='MESH_PLANE', text="Plane")
layout.operator("mesh.primitive_cube_add", icon='MESH_CUBE', text="Cube")
layout.operator("mesh.primitive_circle_add", icon='MESH_CIRCLE', text="Circle")
@@ -207,7 +207,7 @@ class INFO_MT_mesh_add(Menu):
layout.separator()
layout.operator("mesh.primitive_grid_add", icon='MESH_GRID', text="Grid")
layout.operator("mesh.primitive_monkey_add", icon='MESH_MONKEY', text="Monkey")
- layout.operator("mesh.primitive_torus_add", text="Torus", icon='MESH_TORUS')
+ layout.operator("mesh.primitive_torus_add", icon='MESH_TORUS', text="Torus")
class INFO_MT_curve_add(Menu):
@@ -217,7 +217,7 @@ class INFO_MT_curve_add(Menu):
def draw(self, context):
layout = self.layout
- layout.operator_context = 'INVOKE_REGION_WIN'
+ layout.operator_context = 'EXEC_REGION_WIN'
layout.operator("curve.primitive_bezier_curve_add", icon='CURVE_BEZCURVE', text="Bezier")
layout.operator("curve.primitive_bezier_circle_add", icon='CURVE_BEZCIRCLE', text="Circle")
layout.operator("curve.primitive_nurbs_curve_add", icon='CURVE_NCURVE', text="Nurbs Curve")
@@ -225,22 +225,6 @@ class INFO_MT_curve_add(Menu):
layout.operator("curve.primitive_nurbs_path_add", icon='CURVE_PATH', text="Path")
-class INFO_MT_edit_curve_add(Menu):
- bl_idname = "INFO_MT_edit_curve_add"
- bl_label = "Add"
-
- def draw(self, context):
- is_surf = context.active_object.type == 'SURFACE'
-
- layout = self.layout
- layout.operator_context = 'INVOKE_REGION_WIN'
-
- if is_surf:
- INFO_MT_surface_add.draw(self, context)
- else:
- INFO_MT_curve_add.draw(self, context)
-
-
class INFO_MT_surface_add(Menu):
bl_idname = "INFO_MT_surface_add"
bl_label = "Surface"
@@ -248,7 +232,7 @@ class INFO_MT_surface_add(Menu):
def draw(self, context):
layout = self.layout
- layout.operator_context = 'INVOKE_REGION_WIN'
+ layout.operator_context = 'EXEC_REGION_WIN'
layout.operator("surface.primitive_nurbs_surface_curve_add", icon='SURFACE_NCURVE', text="NURBS Curve")
layout.operator("surface.primitive_nurbs_surface_circle_add", icon='SURFACE_NCIRCLE', text="NURBS Circle")
layout.operator("surface.primitive_nurbs_surface_surface_add", icon='SURFACE_NSURFACE', text="NURBS Surface")
@@ -257,6 +241,22 @@ class INFO_MT_surface_add(Menu):
layout.operator("surface.primitive_nurbs_surface_torus_add", icon='SURFACE_NTORUS', text="NURBS Torus")
+class INFO_MT_edit_curve_add(Menu):
+ bl_idname = "INFO_MT_edit_curve_add"
+ bl_label = "Add"
+
+ def draw(self, context):
+ is_surf = context.active_object.type == 'SURFACE'
+
+ layout = self.layout
+ layout.operator_context = 'EXEC_REGION_WIN'
+
+ if is_surf:
+ INFO_MT_surface_add.draw(self, context)
+ else:
+ INFO_MT_curve_add.draw(self, context)
+
+
class INFO_MT_armature_add(Menu):
bl_idname = "INFO_MT_armature_add"
bl_label = "Armature"
@@ -264,7 +264,7 @@ class INFO_MT_armature_add(Menu):
def draw(self, context):
layout = self.layout
- layout.operator_context = 'INVOKE_REGION_WIN'
+ layout.operator_context = 'EXEC_REGION_WIN'
layout.operator("object.armature_add", text="Single Bone", icon='BONE_DATA')
@@ -286,20 +286,18 @@ class INFO_MT_add(Menu):
#layout.operator_menu_enum("object.surface_add", "type", text="Surface", icon='OUTLINER_OB_SURFACE')
layout.menu("INFO_MT_surface_add", icon='OUTLINER_OB_SURFACE')
layout.operator_menu_enum("object.metaball_add", "type", text="Metaball", icon='OUTLINER_OB_META')
- layout.operator_context = 'INVOKE_REGION_WIN'
layout.operator("object.text_add", text="Text", icon='OUTLINER_OB_FONT')
layout.separator()
layout.menu("INFO_MT_armature_add", icon='OUTLINER_OB_ARMATURE')
layout.operator("object.add", text="Lattice", icon='OUTLINER_OB_LATTICE').type = 'LATTICE'
- layout.operator("object.add", text="Empty", icon='OUTLINER_OB_EMPTY').type = 'EMPTY'
+ layout.operator_menu_enum("object.empty_add", "type", text="Empty", icon='OUTLINER_OB_EMPTY')
layout.separator()
layout.operator("object.speaker_add", text="Speaker", icon='OUTLINER_OB_SPEAKER')
layout.separator()
layout.operator("object.camera_add", text="Camera", icon='OUTLINER_OB_CAMERA')
- layout.operator_context = 'EXEC_AREA'
layout.operator_menu_enum("object.lamp_add", "type", text="Lamp", icon='OUTLINER_OB_LAMP')
layout.separator()
@@ -307,7 +305,7 @@ class INFO_MT_add(Menu):
layout.separator()
if(len(bpy.data.groups) > 10):
- layout.operator_context = 'INVOKE_DEFAULT'
+ layout.operator_context = 'INVOKE_REGION_WIN'
layout.operator("object.group_instance_add", text="Group Instance...", icon='OUTLINER_OB_EMPTY')
else:
layout.operator_menu_enum("object.group_instance_add", "group", text="Group Instance", icon='OUTLINER_OB_EMPTY')