forked from bartvdbraak/blender
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.
This commit is contained in:
parent
2b1e59500f
commit
7d251de01c
@ -611,7 +611,11 @@ if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'win64-vc'):
|
|||||||
'${LCGDIR}/ffmpeg/lib/avformat-52.dll',
|
'${LCGDIR}/ffmpeg/lib/avformat-52.dll',
|
||||||
'${LCGDIR}/ffmpeg/lib/avdevice-52.dll',
|
'${LCGDIR}/ffmpeg/lib/avdevice-52.dll',
|
||||||
'${LCGDIR}/ffmpeg/lib/avutil-50.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']:
|
if env['WITH_BF_JACK']:
|
||||||
dllsources += ['${LCGDIR}/jack/lib/libjack.dll']
|
dllsources += ['${LCGDIR}/jack/lib/libjack.dll']
|
||||||
windlls = env.Install(dir=env['BF_INSTALLDIR'], source = dllsources)
|
windlls = env.Install(dir=env['BF_INSTALLDIR'], source = dllsources)
|
||||||
|
@ -1795,19 +1795,21 @@ class VIEW3D_PT_background_image(bpy.types.Panel):
|
|||||||
|
|
||||||
if bg:
|
if bg:
|
||||||
layout.active = view.display_background_image
|
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 = layout.column()
|
||||||
col.template_ID(bg, "image", open="image.open")
|
|
||||||
col.prop(bg, "size")
|
col.prop(bg, "size")
|
||||||
col.prop(bg, "transparency", slider=True)
|
col.prop(bg, "transparency", slider=True)
|
||||||
|
|
||||||
|
col = layout.column()
|
||||||
col = layout.column(align=True)
|
col.label(text="Offset")
|
||||||
col.label(text="Offset:")
|
|
||||||
col.prop(bg, "offset_x", text="X")
|
col.prop(bg, "offset_x", text="X")
|
||||||
col.prop(bg, "offset_y", text="Y")
|
col.prop(bg, "offset_y", text="Y")
|
||||||
|
|
||||||
|
|
||||||
class VIEW3D_PT_transform_orientations(bpy.types.Panel):
|
class VIEW3D_PT_transform_orientations(bpy.types.Panel):
|
||||||
bl_space_type = 'VIEW_3D'
|
bl_space_type = 'VIEW_3D'
|
||||||
bl_region_type = 'UI'
|
bl_region_type = 'UI'
|
||||||
|
@ -48,6 +48,7 @@
|
|||||||
#include "BKE_global.h"
|
#include "BKE_global.h"
|
||||||
#include "BKE_screen.h"
|
#include "BKE_screen.h"
|
||||||
#include "BKE_utildefines.h"
|
#include "BKE_utildefines.h"
|
||||||
|
#include "BKE_image.h"
|
||||||
|
|
||||||
#include "ED_armature.h"
|
#include "ED_armature.h"
|
||||||
#include "ED_space_api.h"
|
#include "ED_space_api.h"
|
||||||
@ -447,8 +448,8 @@ static void view3d_main_area_listener(ARegion *ar, wmNotifier *wmn)
|
|||||||
break;
|
break;
|
||||||
case NC_SCENE:
|
case NC_SCENE:
|
||||||
switch(wmn->data) {
|
switch(wmn->data) {
|
||||||
case ND_TRANSFORM:
|
|
||||||
case ND_FRAME:
|
case ND_FRAME:
|
||||||
|
case ND_TRANSFORM:
|
||||||
case ND_OB_ACTIVE:
|
case ND_OB_ACTIVE:
|
||||||
case ND_OB_SELECT:
|
case ND_OB_SELECT:
|
||||||
case ND_LAYER:
|
case ND_LAYER:
|
||||||
@ -783,6 +784,20 @@ static int view3d_context(const bContext *C, const char *member, bContextDataRes
|
|||||||
return -1; /* found but not available */
|
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 */
|
/* only called once, from space/spacetypes.c */
|
||||||
void ED_spacetype_view3d(void)
|
void ED_spacetype_view3d(void)
|
||||||
{
|
{
|
||||||
@ -795,6 +810,7 @@ void ED_spacetype_view3d(void)
|
|||||||
st->new= view3d_new;
|
st->new= view3d_new;
|
||||||
st->free= view3d_free;
|
st->free= view3d_free;
|
||||||
st->init= view3d_init;
|
st->init= view3d_init;
|
||||||
|
st->listener = space_view3d_listener;
|
||||||
st->duplicate= view3d_duplicate;
|
st->duplicate= view3d_duplicate;
|
||||||
st->operatortypes= view3d_operatortypes;
|
st->operatortypes= view3d_operatortypes;
|
||||||
st->keymap= view3d_keymap;
|
st->keymap= view3d_keymap;
|
||||||
|
Loading…
Reference in New Issue
Block a user