Commit Graph

68287 Commits

Author SHA1 Message Date
Campbell Barton
2944438e9a 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
2017-04-07 21:23:32 +10:00
Dalai Felinto
8ec1a05ef5 Replace CGSubSurf direct includes to GL/glew.h 2017-04-07 13:03:31 +02:00
Sergey Sharybin
d649f26858 Fix compilation error after recent changes 2017-04-07 09:58:54 +02:00
Mike Erwin
9c01aaa3dd OpenGL: disable rotate manipulator clipping on Mac
This fixes T51143.

gl_ClipDistance is part of GLSL version 1.3 but Mac is stuck on 1.2 for now.

This workaround uses GPU_SHADER_3D_UNIFORM_COLOR for the entire rotation widget, ignoring any clipping plane. The CLIPPING shader only works on GLSL 1.3+ so I removed its 1.2 cruft.

A legacy implementation using gl_ClipVertex might be possible, but is not worth the effort. This problem (and workaround) goes away when all platforms move to 3.3 core profile.
2017-04-07 03:08:00 -04:00
Mike Erwin
c986a2c7aa fix rotation manipulator's Push/PopMatrix balance
Was popping out the bottom of the stack.
2017-04-07 03:51:10 -04:00
Mike Erwin
115a889bd7 OpenGL: refactor ui_panel_category_draw_tab
changes:
- exact vertex count
- take bool (filled vs outline) instead of GLenum

This function has some flexibility that is not currently used. I left that in.
2017-04-06 19:37:50 -04:00
Mike Erwin
f69678482c OpenGL: refactor UI_draw_roundbox functions
Each function takes a bool (filled vs outline) and a color. We already had multiple ways of passing color in; these are still here. Special variant for anti-aliasing.

- took GLenum out of interface
- removed UI_RB_ALPHA flag (only one place really used it)
- use exact vertex count
- removed redundant state changes (BLEND, LINE_SMOOTH)
2017-04-06 19:15:26 -04:00
Dalai Felinto
934dfc4200 New build option WITH_LEGACY_OPENGL
This introduces a new CMake option - WITH_LEGACY_OPENGL. Without this option
things may not draw perfectly, however, we should soon be able to build with
OpenGL core profile.

The matrix-related api calls are (still) not handled here (glTranslate, ...).

There seems to be no consensus on whether to make this build option the
default. We can talk about this later. For now two things are the
priority:

(1) To get rid of deprecated calls when WITH_LEGACY_OPENGL is ON
(2) To make core profile work for Mesa/Mac when WITH_LEGACY_OPENGL is OFF

Reviewers: merwin, sergey, campbellbarton

Differential Revision: https://developer.blender.org/D2603

Many thanks for Sergey Sharybin for the help.
2017-04-06 18:46:33 +02:00
Sergey Sharybin
843922a480 Depsgraph: Prefer use anonymous structs for unused arguments 2017-04-06 16:58:19 +02:00
Sergey Sharybin
035b340f48 Depsgraph: Remove old depsgraph header from window manager 2017-04-06 16:44:32 +02:00
Sergey Sharybin
ec178b861c Depsgraph: Remove print dependnecies operator
This is not really supported with the new depsgraph.
2017-04-06 16:43:09 +02:00
Sergey Sharybin
ed1ef06199 Depsgraph: Remove old depsgraph header from blender internal 2017-04-06 16:38:43 +02:00
Sergey Sharybin
2d80f37bce Depsgraph: Remove old depsgraph header from python 2017-04-06 16:36:15 +02:00
Sergey Sharybin
05ffca5c8a Depsgraph: Remove old depsgraph header from modifiers 2017-04-06 16:34:38 +02:00
Sergey Sharybin
1165027308 Depsgraph: Remove old depsgraph header from freestyle 2017-04-06 16:32:59 +02:00
Sergey Sharybin
35db70a466 Depsgraph: Remove olde depsgraph header from new depsgraph 2017-04-06 16:18:42 +02:00
Sergey Sharybin
e9e703f0dd Depsgraph: Remove old depsgraph header from collada 2017-04-06 16:17:21 +02:00
Sergey Sharybin
7da2379124 Depsgraph: Remove old depsgraph header from blenloader 2017-04-06 16:13:57 +02:00
Sergey Sharybin
7b45edacab Depsgraph: Remove old header from blenkernel 2017-04-06 16:11:50 +02:00
Sergey Sharybin
2613ad64c5 Depsgraph: Remove old depsgraph header from alembic files 2017-04-06 15:49:56 +02:00
Sergey Sharybin
ae33f78229 Depsgraph: Remove old depsgraph header from game engine 2017-04-06 15:40:53 +02:00
Sergey Sharybin
d36fb4f08f Depsgraph: Remove old depsgraph headers from creator 2017-04-06 15:40:08 +02:00
Sergey Sharybin
a1b8c0bca2 Depsgraph: More type definitions to new depsgraph header 2017-04-06 15:37:46 +02:00
Campbell Barton
d8f931c9b7 Changes from custom-manipulators branch
Minor changes from custom-manipulators branch,
before larger changes are applied.
2017-04-06 22:10:09 +10:00
Sergey Sharybin
0feca278a4 Merge branch 'master' into blender2.8 2017-04-06 12:31:26 +02:00
Dalai Felinto
967b04cb07 Layer unittesting: pep8 touch up on test_evaluation_selectability_f.py 2017-04-06 12:22:21 +02:00
Sergey Sharybin
ae76a90593 Buildbot: Correct previous release
Seems CMake is not happy about changing compiler from script.
2017-04-06 11:39:06 +02:00
Sergey Sharybin
97300a3beb Buildbot: Force build environment to use latest GCC 2017-04-06 11:21:07 +02:00
Mike Erwin
0debbe2b7f Gawain: VertexFormat_add_attrib (function name change)
See intern/gawain for the API change. Other files are updated to use the new name. Also updated every call site to the recommended style:
unsigned int foo = VertexFormat_add_attrib(format, "foo", COMP_ ... )
2017-04-06 01:18:12 -04:00
Mike Erwin
c2f5cd8f64 Gawain: add VertexBuffer prefix to functions
See intern/gawain for the API change. Other files are updated to use the new names.
2017-04-06 01:18:12 -04:00
Campbell Barton
957b408458 Fix manipulator showing in pose & editmode 2017-04-06 15:17:38 +10:00
Campbell Barton
0899b4bb3f Fix building without clay engine 2017-04-06 15:17:38 +10:00
Germano Cavalcante
ff3880ff93 Initialize immediate mode in Animation Player
PS. With this solution, immediate mode can be initialized and finalized consecutively if you drop a video

part of T49043
2017-04-06 01:54:10 -03:00
Campbell Barton
9f72580d07 Merge branch 'master' into blender2.8 2017-04-06 12:26:55 +10:00
Campbell Barton
f74b4a010d Cleanup: function naming for manipulator
Rename 'stats_*' to 'protectflag_to_drawflags_*' (was too vague).
Also remove NULL check from gimbal_axis
2017-04-06 12:26:07 +10:00
Campbell Barton
13f77de214 Merge branch 'master' into blender2.8 2017-04-06 12:04:48 +10:00
Campbell Barton
5e3b6e951b Cleanup: minor changes to transform-manipulator
Match stats_editbone & stats_pchan behavior to avoid confusion.
2017-04-06 12:02:32 +10:00
Campbell Barton
e63ba6d0f4 Remove NULL check from gimbal_axis 2017-04-06 11:32:45 +10:00
Dalai Felinto
40cb5a067b Immediate Mode: missing ALPHA_TEST in gpuRestoreState
Missed in rBcbd78c81268f06e7b658ae042f3ab6a3816149b0
2017-04-05 21:46:08 +02:00
lazydodo
7ae9d092d0 Fix alembic build error with MSVC 2017-04-05 10:59:29 -06:00
Sergey Sharybin
fa5e5f898e Cleanup: Remove depsgraph stubs 2017-04-05 15:57:36 +02:00
Sergey Sharybin
1980f3d3b8 Motion paths: Switch to a slower evaluation which does not need bases to be sorted
New dpesgtraph does not ensure bases are sorted by the evaluation order
any more, so motion paths update might go horrribly wrong.
2017-04-05 15:56:27 +02:00
Sergey Sharybin
5b386270a5 Cleanup: Get rid of legacy depsgraph header file 2017-04-05 15:50:45 +02:00
Sergey Sharybin
a13878b9af Cleanup: Remove legacy depsgraph private header from modifiers 2017-04-05 15:46:56 +02:00
Sergey Sharybin
70aa5f97f2 Cleanup, remove unused function 2017-04-05 15:45:54 +02:00
Sergey Sharybin
3bb88a7807 Merge branch 'master' into blender2.8 2017-04-05 15:36:55 +02:00
Sergey Sharybin
f921442a44 Depsghraph: Remove unused function 2017-04-05 15:36:17 +02:00
Dalai Felinto
929c45b7d4 Paint cursor changes, so it save/load only the required flags 2017-04-05 15:02:31 +02:00
Dalai Felinto
cbd78c8126 Immediate Mode: replacing glPushAttrib/glPopAttrib
Reference document: http://docs.gl/gl3/glPushAttrib

This patch only tackles the bits that are set by Blender with the
following exceptions:

1) Deprecated states (e.g., GL_STIPPLE) are not saved/restored

2) The exception being GL_ALPHA_TEST, which will be removed, but it may
affect drawing too much now. To be removed once we no longer set GL_ALPHA_TEST
elsewhere.

3) paint_cursor will be tackled separated, since it was abusing
glPush/PopAttrib in the first place.

4) Despite what the glPushAttrib page above may suggest, GL_DEPTH_WRITEMASK needs glGet, not glIsEnabled

5) BGE is still a problem since it relies on GL_ALL_ATTRIB_BITS which
would lead to a way more complete/lenghty solution. Since the BGE has
other (OpenGL deprecated) problems anyways, it can be handled on its own
time.

Finally, the original design for 2.8 was to implement a proper stack
system. However we need to move to core profile sooner than later. So
this is a pragmatic temporary (that may be permanent) solution.

Reviewers: merwin, campbellbarton

Differential Revision: https://developer.blender.org/D2600
2017-04-05 15:02:31 +02:00
Dalai Felinto
bbfa1a8639 Viewport: 3D cameras don't need glPushAttrib/glPopAttrib 2017-04-05 15:02:31 +02:00