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:
authorJacques Lucke <mail@jlucke.com>2018-09-27 17:21:51 +0300
committerJacques Lucke <mail@jlucke.com>2018-09-27 17:21:51 +0300
commit6791d95b1db8a2419b9534e95ea7c73c1cb4ff62 (patch)
tree7df79d02159e5d571638bf2cbd330c49ec5b656a /release/scripts/startup/bl_ui/space_view3d.py
parenta3fea397244406e2f60c388ea651a200e5b3681c (diff)
Empty Object: new "Load Image as Empty" operator
New entry in the Add Object menu. Opens a file selector and creates a new empty object from the selected image. Previously more steps were needed to archieve the same. Differential: https://developer.blender.org/D3708 Reviewer: brecht
Diffstat (limited to 'release/scripts/startup/bl_ui/space_view3d.py')
-rw-r--r--release/scripts/startup/bl_ui/space_view3d.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py
index 328ed854044..898f22a8ca9 100644
--- a/release/scripts/startup/bl_ui/space_view3d.py
+++ b/release/scripts/startup/bl_ui/space_view3d.py
@@ -1518,6 +1518,10 @@ class VIEW3D_MT_add(Menu):
layout.menu("VIEW3D_MT_armature_add", icon='OUTLINER_OB_ARMATURE')
layout.operator("object.add", text="Lattice", icon='OUTLINER_OB_LATTICE').type = 'LATTICE'
layout.operator_menu_enum("object.empty_add", "type", text="Empty", icon='OUTLINER_OB_EMPTY')
+
+ sublayout = layout.column()
+ sublayout.operator_context = 'INVOKE_DEFAULT'
+ sublayout.operator("object.load_image_as_empty", text="Image", icon="IMAGE_DATA")
layout.separator()
layout.operator("object.speaker_add", text="Speaker", icon='OUTLINER_OB_SPEAKER')