diff options
author | Campbell Barton <ideasman42@gmail.com> | 2009-12-21 14:42:31 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2009-12-21 14:42:31 +0300 |
commit | 371571fed6a8d2218be714dac5884d8135935b69 (patch) | |
tree | 345380ce980c8abf2d7f224bb83dea782416fd95 | |
parent | 5832f2fb7bd396e45690b1765103d4136694845a (diff) |
- camera switching didnt work for openGL render
- UV Project (Bounds) wasnt in the menu
-rw-r--r-- | release/scripts/ui/space_view3d.py | 1 | ||||
-rw-r--r-- | source/blender/editors/screen/screen_edit.c | 14 | ||||
-rw-r--r-- | source/blender/editors/screen/screen_ops.c | 11 |
3 files changed, 12 insertions, 14 deletions
diff --git a/release/scripts/ui/space_view3d.py b/release/scripts/ui/space_view3d.py index 0ea9c947d4b..fa0a6a8c5fa 100644 --- a/release/scripts/ui/space_view3d.py +++ b/release/scripts/ui/space_view3d.py @@ -216,6 +216,7 @@ class VIEW3D_MT_uv_map(dynamic_menu.DynMenu): layout.operator("uv.cylinder_project") layout.operator("uv.sphere_project") layout.operator("uv.project_from_view") + layout.operator("uv.project_from_view", text="Project from View (Bounds)").scale_to_bounds = True layout.separator() diff --git a/source/blender/editors/screen/screen_edit.c b/source/blender/editors/screen/screen_edit.c index 0c690452d8a..6bf01a69d12 100644 --- a/source/blender/editors/screen/screen_edit.c +++ b/source/blender/editors/screen/screen_edit.c @@ -1686,19 +1686,8 @@ void ED_update_for_newframe(const bContext *C, int mute) while(sl) { if(sl->spacetype==SPACE_VIEW3D) { View3D *v3d= (View3D*) sl; - if (v3d->camera == scene->camera) { + if (v3d->scenelock) { v3d->camera= camera; - /* - ARegion *ar; - for(ar=v3d->regionbase.first; ar; ar= ar->next) { - if(ar->regiontype == RGN_TYPE_WINDOW) { - RegionView3D *rv3d= ar->regiondata; - - if(rv3d->persp==RV3D_CAMOB) - rv3d->persp= RV3D_PERSP; - } - } - */ } } sl= sl->next; @@ -1709,7 +1698,6 @@ void ED_update_for_newframe(const bContext *C, int mute) } scene->camera= camera; - } #endif diff --git a/source/blender/editors/screen/screen_ops.c b/source/blender/editors/screen/screen_ops.c index 55a977da663..fe1587a965d 100644 --- a/source/blender/editors/screen/screen_ops.c +++ b/source/blender/editors/screen/screen_ops.c @@ -3365,7 +3365,16 @@ static int screen_opengl_render_modal(bContext *C, wmOperator *op, wmEvent *even } scene_update_for_newframe(scene, scene->lay); - + + if(oglrender->rv3d->persp==RV3D_CAMOB && oglrender->v3d->camera && oglrender->v3d->scenelock) { + /* since scene_update_for_newframe() is used rather + * then ED_update_for_newframe() the camera needs to be set */ + Object *camera= scene_find_camera_switch(scene); + + if(camera) + oglrender->v3d->camera= scene->camera= camera; + } + /* render into offscreen buffer */ screen_opengl_render_apply(oglrender); |