diff options
author | Campbell Barton <ideasman42@gmail.com> | 2010-01-20 01:44:43 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2010-01-20 01:44:43 +0300 |
commit | ccb6e1904abf358c0f999019ffd62d407ecc920b (patch) | |
tree | 7bb8243349754a5add2bd8adaf8d6e99030eca05 /release/scripts | |
parent | 7165008b354ed1a47a4f2c8f9a384f995c899935 (diff) |
patch from Bjørnar Hansen (anachron)
Multiple background images displaying each on a different axis.
Changes made from the original patch.
- Use an enum rather then multiple booleans.
- Reduced the space taken up by the user interface.
- Made the image template compact display not show fields & premul options.
- Added readfile.c lines so old blendfile images are loaded.
- Option to hide BGpic UI (like modifiers & constraints)
- Use the index rather then a bgpic from the context for the remove operator.
note: could be good to use 1 image for both left+right, for eg, but for this to work as intended we would need to add image flipping depending on the axis so left this commented out for now.
Diffstat (limited to 'release/scripts')
-rw-r--r-- | release/scripts/ui/space_view3d.py | 44 |
1 files changed, 24 insertions, 20 deletions
diff --git a/release/scripts/ui/space_view3d.py b/release/scripts/ui/space_view3d.py index af0e2ec7879..c422781d00e 100644 --- a/release/scripts/ui/space_view3d.py +++ b/release/scripts/ui/space_view3d.py @@ -1783,7 +1783,7 @@ class VIEW3D_PT_3dview_curvedisplay(bpy.types.Panel): class VIEW3D_PT_background_image(bpy.types.Panel): bl_space_type = 'VIEW_3D' bl_region_type = 'UI' - bl_label = "Background Image" + bl_label = "Background Images" bl_default_closed = True def poll(self, context): @@ -1795,34 +1795,38 @@ class VIEW3D_PT_background_image(bpy.types.Panel): layout = self.layout view = context.space_data - layout.prop(view, "display_background_image", text="") + layout.prop(view, "display_background_images", text="") def draw(self, context): layout = self.layout view = context.space_data - bg = view.background_image + + col = layout.column() + col.operator("view3d.add_background_image", text="Add Image") - if bg: - layout.active = view.display_background_image + for i, bg in enumerate(view.background_images): + layout.active = view.display_background_images box = layout.box() - if (bg.image): - box.template_ID(bg, "image", open="image.open") - box.template_image(bg, "image", bg.image_user, compact=True) - else: - box.template_ID(bg, "image", open="image.open") + row = box.row(align=True) + row.prop(bg, "show_expanded", text="", no_bg=True) + row.label(text=getattr(bg.image, "name", "Not Set")) + row.operator("view3d.remove_background_image", text="", icon='X').index = i - col = layout.column() - col.label(text="Display Settings") + box.prop(bg, "view_axis", text="Axis") - col = layout.column() - col.prop(bg, "size") - col.prop(bg, "transparency", slider=True) - - col = layout.column() - col.label(text="Offset") - col.prop(bg, "offset_x", text="X") - col.prop(bg, "offset_y", text="Y") + if bg.show_expanded: + row = box.row() + row.template_ID(bg, "image", open="image.open") + if (bg.image): + box.template_image(bg, "image", bg.image_user, compact=True) + + box.prop(bg, "transparency", slider=True) + box.prop(bg, "size") + row = box.row(align=True) + row.prop(bg, "offset_x", text="X") + row.prop(bg, "offset_y", text="Y") + class VIEW3D_PT_transform_orientations(bpy.types.Panel): bl_space_type = 'VIEW_3D' |