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:
authorJoseph Eagar <joeedh@gmail.com>2010-01-14 05:16:45 +0300
committerJoseph Eagar <joeedh@gmail.com>2010-01-14 05:16:45 +0300
commit7d251de01cb80f289479e3c6a4b9316237640fee (patch)
tree840f816d92e1f1ada201d96622c98245a0bf5051
parent2b1e59500fe838e89cbbcbd332e4a6185976174c (diff)
view3d bg image now updates on frame change, and the panel for it properly draws an image user template. someone else might want to look over the UI stuff, hopefully it's ok. also added some ffmpeg .dlls to the SConscript to install.
-rw-r--r--SConstruct6
-rw-r--r--release/scripts/ui/space_view3d.py14
-rw-r--r--source/blender/editors/space_view3d/space_view3d.c18
3 files changed, 30 insertions, 8 deletions
diff --git a/SConstruct b/SConstruct
index 8a026a0c083..83570cb5c1a 100644
--- a/SConstruct
+++ b/SConstruct
@@ -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)
diff --git a/release/scripts/ui/space_view3d.py b/release/scripts/ui/space_view3d.py
index a3e3d2d3b53..db77918458a 100644
--- a/release/scripts/ui/space_view3d.py
+++ b/release/scripts/ui/space_view3d.py
@@ -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'
diff --git a/source/blender/editors/space_view3d/space_view3d.c b/source/blender/editors/space_view3d/space_view3d.c
index fe3ec2a5e50..986d8003e6e 100644
--- a/source/blender/editors/space_view3d/space_view3d.c
+++ b/source/blender/editors/space_view3d/space_view3d.c
@@ -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;