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:
authorCampbell Barton <ideasman42@gmail.com>2017-04-06 17:35:57 +0300
committerCampbell Barton <ideasman42@gmail.com>2017-04-07 14:23:32 +0300
commit2944438e9a276e48d7eabb5bb88ecec9b2f1e7dc (patch)
treec5b60eceb5522e794d61cf49c30209ba674fc3fc /source/blender/editors/space_view3d/view3d_draw_legacy.c
parent8ec1a05ef514aff978ec550d89638d0e654d7a0a (diff)
3D View: manipulator from custom-manipulators branch
Original code from @Severin with changes from @dfelinto & @hypersomniac. This doesn't cause many functional changes besides using new transform manipulators. Submitted as D2604
Diffstat (limited to 'source/blender/editors/space_view3d/view3d_draw_legacy.c')
-rw-r--r--source/blender/editors/space_view3d/view3d_draw_legacy.c17
1 files changed, 13 insertions, 4 deletions
diff --git a/source/blender/editors/space_view3d/view3d_draw_legacy.c b/source/blender/editors/space_view3d/view3d_draw_legacy.c
index 7070cadb414..14b8f78e4c7 100644
--- a/source/blender/editors/space_view3d/view3d_draw_legacy.c
+++ b/source/blender/editors/space_view3d/view3d_draw_legacy.c
@@ -79,6 +79,7 @@
#include "BIF_glutil.h"
#include "WM_api.h"
+#include "WM_types.h"
#include "BLF_api.h"
#include "BLT_translation.h"
@@ -1709,10 +1710,6 @@ static void view3d_draw_objects(
view3d_draw_bgpic_test(scene, ar, v3d, true, do_camera_frame);
}
- if (!draw_offscreen) {
- BIF_draw_manipulator(C);
- }
-
/* cleanup */
if (v3d->zbuf) {
v3d->zbuf = false;
@@ -2429,6 +2426,11 @@ static void view3d_main_region_draw_objects(const bContext *C, Scene *scene, Sce
/* main drawing call */
view3d_draw_objects(C, scene, v3d, ar, grid_unit, true, false, do_compositing ? rv3d->compositor : NULL);
+ /* draw depth culled manipulators - manipulators need to be updated *after* view matrix was set up */
+ /* TODO depth culling manipulators is not yet supported, just drawing _3D here, should
+ * later become _IN_SCENE (and draw _3D separate) */
+ WM_manipulatormap_draw(ar->manipulator_map, C, WM_MANIPULATORMAP_DRAWSTEP_3D);
+
/* post process */
if (do_compositing) {
GPU_fx_do_composite_pass(rv3d->compositor, rv3d->winmat, rv3d->is_persp, scene, NULL);
@@ -2553,6 +2555,13 @@ void view3d_main_region_draw_legacy(const bContext *C, ARegion *ar)
if (v3d->drawtype == OB_RENDER)
view3d_main_region_draw_engine(C, scene, ar, v3d, clip_border, &border_rect);
+ VP_legacy_view3d_main_region_setup_view(scene, v3d, ar, NULL, NULL);
+ glClear(GL_DEPTH_BUFFER_BIT);
+
+ WM_manipulatormap_draw(ar->manipulator_map, C, WM_MANIPULATORMAP_DRAWSTEP_2D);
+
+ ED_region_pixelspace(ar);
+
view3d_main_region_draw_info(C, scene, ar, v3d, grid_unit, render_border);
glMatrixMode(GL_PROJECTION);