view3d bg image now updates on frame change, and the panel for it properly draws...
authorJoseph Eagar <joeedh@gmail.com>
Thu, 14 Jan 2010 02:16:45 +0000 (02:16 +0000)
committerJoseph Eagar <joeedh@gmail.com>
Thu, 14 Jan 2010 02:16:45 +0000 (02:16 +0000)
SConstruct
release/scripts/ui/space_view3d.py
source/blender/editors/space_view3d/space_view3d.c

index 8a026a0c0837a494fd92778f0c88b799b1f1da7e..83570cb5c1a28b070c471ee8940ce56c97419a07 100644 (file)
@@ -611,7 +611,11 @@ if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'win64-vc'):
                                                '${LCGDIR}/ffmpeg/lib/avformat-52.dll',
                                                '${LCGDIR}/ffmpeg/lib/avdevice-52.dll',
                                                '${LCGDIR}/ffmpeg/lib/avutil-50.dll',
-                                               '${LCGDIR}/ffmpeg/lib/swscale-0.dll']
+                                               '${LCGDIR}/ffmpeg/lib/swscale-0.dll',
+                                               '${LCGDIR}/ffmpeg/lib/libfaac-0.dll',
+                                               '${LCGDIR}/ffmpeg/lib/libfaad-2.dll',
+                                               '${LCGDIR}/ffmpeg/lib/libmp3lame-0.dll',
+                                               '${LCGDIR}/ffmpeg/lib/libx264-67.dll']
        if env['WITH_BF_JACK']:
                dllsources += ['${LCGDIR}/jack/lib/libjack.dll']
        windlls = env.Install(dir=env['BF_INSTALLDIR'], source = dllsources)
index a3e3d2d3b53df1491cba7e317f53b72fa27e5859..db77918458a95e1b6856723eae698b6449233bef 100644 (file)
@@ -1795,19 +1795,21 @@ class VIEW3D_PT_background_image(bpy.types.Panel):
 
         if bg:
             layout.active = view.display_background_image
-
+            box = layout.box()
+            box.template_image(bg, "image", bg.image_user, compact=True)
+            
+            col = layout.column()
+            col.label(text="Display Settings")
+            
             col = layout.column()
-            col.template_ID(bg, "image", open="image.open")
             col.prop(bg, "size")
             col.prop(bg, "transparency", slider=True)
 
-
-            col = layout.column(align=True)
-            col.label(text="Offset:")
+            col = layout.column()
+            col.label(text="Offset")
             col.prop(bg, "offset_x", text="X")
             col.prop(bg, "offset_y", text="Y")
 
-
 class VIEW3D_PT_transform_orientations(bpy.types.Panel):
     bl_space_type = 'VIEW_3D'
     bl_region_type = 'UI'
index fe3ec2a5e50a44619ac8748f0364d55094e579ca..986d8003e6e7d784f881d9989da1e6dbd6e266e4 100644 (file)
@@ -48,6 +48,7 @@
 #include "BKE_global.h"
 #include "BKE_screen.h"
 #include "BKE_utildefines.h"
+#include "BKE_image.h"
 
 #include "ED_armature.h"
 #include "ED_space_api.h"
@@ -447,8 +448,8 @@ static void view3d_main_area_listener(ARegion *ar, wmNotifier *wmn)
                        break;
                case NC_SCENE:
                        switch(wmn->data) {
-                               case ND_TRANSFORM:
                                case ND_FRAME:
+                               case ND_TRANSFORM:
                                case ND_OB_ACTIVE:
                                case ND_OB_SELECT:
                                case ND_LAYER:
@@ -783,6 +784,20 @@ static int view3d_context(const bContext *C, const char *member, bContextDataRes
        return -1; /* found but not available */
 }
 
+/*area (not region) level listener*/
+void space_view3d_listener(struct ScrArea *area, struct wmNotifier *wmn)
+{
+       if (wmn->category == NC_SCENE && wmn->data == ND_FRAME) {
+               View3D *v3d = area->spacedata.first;
+       
+               if (v3d->bgpic && v3d->bgpic->ima) {
+                       Scene *scene = wmn->reference;
+
+                       BKE_image_user_calc_imanr(&v3d->bgpic->iuser, scene->r.cfra, 0);
+               }
+       }
+}
+
 /* only called once, from space/spacetypes.c */
 void ED_spacetype_view3d(void)
 {
@@ -795,6 +810,7 @@ void ED_spacetype_view3d(void)
        st->new= view3d_new;
        st->free= view3d_free;
        st->init= view3d_init;
+       st->listener = space_view3d_listener;
        st->duplicate= view3d_duplicate;
        st->operatortypes= view3d_operatortypes;
        st->keymap= view3d_keymap;