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>2011-05-09 20:31:54 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-05-09 20:31:54 +0400
commit885141c9dec9828172471b0e58dc4d975d250a04 (patch)
tree4901c666de40a3159f107f9b985a94a1612777e2 /release/scripts/startup/bl_ui/properties_data_empty.py
parent1e0c3d315b8b5db4b5d594c05c7b1b92d5bf967a (diff)
patch [#21740] Image support for Empty Objects
from Andy Braham (andybraham) This adds support for empties to reference images and draw in the 3D view. Modifications from the original patch. - use an empty draw 'image' type - use image aspect ratio for non-square-pixels - when the image is not found, still draw the frame.
Diffstat (limited to 'release/scripts/startup/bl_ui/properties_data_empty.py')
-rw-r--r--release/scripts/startup/bl_ui/properties_data_empty.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/release/scripts/startup/bl_ui/properties_data_empty.py b/release/scripts/startup/bl_ui/properties_data_empty.py
index e46cd1270ad..80f83e7fabe 100644
--- a/release/scripts/startup/bl_ui/properties_data_empty.py
+++ b/release/scripts/startup/bl_ui/properties_data_empty.py
@@ -39,6 +39,17 @@ class DATA_PT_empty(DataButtonsPanel, bpy.types.Panel):
ob = context.object
layout.prop(ob, "empty_draw_type", text="Display")
+
+ if ob.empty_draw_type == 'IMAGE':
+ # layout.template_image(ob, "data", None)
+ layout.template_ID(ob, "data", open="image.open", unlink="image.unlink")
+
+ row = layout.row(align = True)
+ row.prop(ob, "color", text="Transparency", index=3, slider=True)
+ row = layout.row(align = True)
+ row.prop(ob, "empty_image_offset", text="Offset X", index=0)
+ row.prop(ob, "empty_image_offset", text="Offset Y", index=1)
+
layout.prop(ob, "empty_draw_size", text="Size")
if __name__ == "__main__": # only for live edit.