diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-05-09 20:31:54 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-05-09 20:31:54 +0400 |
commit | 885141c9dec9828172471b0e58dc4d975d250a04 (patch) | |
tree | 4901c666de40a3159f107f9b985a94a1612777e2 /release/scripts/startup/bl_ui/properties_data_empty.py | |
parent | 1e0c3d315b8b5db4b5d594c05c7b1b92d5bf967a (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.py | 11 |
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. |