4 years agoMerge branch 'master' into blender2.8
Bastien Montagne [Mon, 10 Apr 2017 15:34:31 +0000 (17:34 +0200)]
Merge branch 'master' into blender2.8


4 years agoFix stereoscopic camera volume drawing.
Bastien Montagne [Mon, 10 Apr 2017 15:31:39 +0000 (17:31 +0200)]
Fix stereoscopic camera volume drawing.

Not sure how we got to that point, but code was drawing twice one side
of the camera volume, and not at all another side!

4 years agoOpenGL: Fix textureXd deprecated calls.
Clément Foucault [Mon, 10 Apr 2017 14:58:08 +0000 (16:58 +0200)]
OpenGL: Fix textureXd deprecated calls.

4 years agoDraw Manager: Add Manipulator Back.
Clément Foucault [Mon, 10 Apr 2017 13:02:25 +0000 (15:02 +0200)]
Draw Manager: Add Manipulator Back.

4 years agoGPencil 2D Drawing: get rid of PRIM_QUAD_XXX.
Bastien Montagne [Mon, 10 Apr 2017 14:54:21 +0000 (16:54 +0200)]
GPencil 2D Drawing: get rid of PRIM_QUAD_XXX.

Here we can easily use a PRIM_TRIANGLE_STRIP instead!

4 years agoMerge branch 'master' into blender2.8
Bastien Montagne [Mon, 10 Apr 2017 14:53:12 +0000 (16:53 +0200)]
Merge branch 'master' into blender2.8


4 years agoCycles: Fix race condition in shader attribute for real now
Sergey Sharybin [Mon, 10 Apr 2017 14:53:01 +0000 (16:53 +0200)]
Cycles: Fix race condition in shader attribute for real now

Ended up moving lock in the more centralized space since multiple shaders
can access this map.

4 years agoGPencil 2D drawing code: minor optimization.
Bastien Montagne [Mon, 10 Apr 2017 14:28:40 +0000 (16:28 +0200)]
GPencil 2D drawing code: minor optimization.

Do not recompute both points's 2D coordinates for each segments, we can
copy over from previous one... Does not gives any measurable speedup off
hands, though.

4 years agoFix compilation error with strick flags caused by missing abort()
Sergey Sharybin [Mon, 10 Apr 2017 14:20:18 +0000 (16:20 +0200)]
Fix compilation error with strick flags caused by missing abort()

4 years agoFix T51158: Motion Tracking Movie clip editor graph
Sergey Sharybin [Mon, 10 Apr 2017 14:16:12 +0000 (16:16 +0200)]
Fix T51158: Motion Tracking Movie clip editor graph

4 years agoTracking: Fix use-after-free bug
Sergey Sharybin [Mon, 10 Apr 2017 14:01:58 +0000 (16:01 +0200)]
Tracking: Fix use-after-free bug

4 years agoInstall deps: Fix compilation error of Alembic
Luca Rood [Mon, 10 Apr 2017 13:53:37 +0000 (15:53 +0200)]
Install deps: Fix compilation error of Alembic

Couple of things here:

- Boost is not necesserily compiled into your /opt/lib and system-wide
  version might have been used. The recent change in Alembic did not
  take this into account.

- Alembic needs some extra component of Boost.
  This part might be missing now for other distros than DEB.

4 years agoFix glCheckFramebufferStatusEXT
Dalai Felinto [Mon, 10 Apr 2017 13:50:08 +0000 (15:50 +0200)]
Fix glCheckFramebufferStatusEXT

4 years agoCycles: Apparently board name could be an empty string
Sergey Sharybin [Mon, 10 Apr 2017 13:31:21 +0000 (15:31 +0200)]
Cycles: Apparently board name could be an empty string

4 years agoFirst batch of PRIM_QUAD_XXX replacement by PRIM_TRIANGLES.
Bastien Montagne [Mon, 10 Apr 2017 13:16:59 +0000 (15:16 +0200)]
First batch of PRIM_QUAD_XXX replacement by PRIM_TRIANGLES.

4 years agoUpgrade glew to v2.0
Dalai Felinto [Mon, 10 Apr 2017 12:47:01 +0000 (14:47 +0200)]
Upgrade glew to v2.0

4 years agoCycles: Workaround cubic volume filtering crashing on Linux
Sergey Sharybin [Mon, 10 Apr 2017 12:42:17 +0000 (14:42 +0200)]
Cycles: Workaround cubic volume filtering crashing on Linux

The issue was caused by recent change in inline policy.

There is some sort of memory corruption happening here, ASAN suggests
it's stack overflow issue. Not quite sure why it is happening tho and
was not able to solve anything here yet in the past hours.

Committing fix which works with a big TODO note.

The issue is visible on AVX2 machine when rendering cycles_reports_test.

4 years agoCycles: Fix compilation error of AVX2 kernels with SSE optimization disabled
Sergey Sharybin [Mon, 10 Apr 2017 11:37:19 +0000 (13:37 +0200)]
Cycles: Fix compilation error of AVX2 kernels with SSE optimization disabled

4 years agoCycles: Cleanup, indentation and trailing whitespace
Sergey Sharybin [Mon, 10 Apr 2017 08:59:31 +0000 (10:59 +0200)]
Cycles: Cleanup, indentation and trailing whitespace

4 years agoPyAPI: Fast buffer access to id property arrays
Jacques Lucke [Mon, 10 Apr 2017 11:06:00 +0000 (21:06 +1000)]
PyAPI: Fast buffer access to id property arrays

Support Python's buffer protocol for ID-properties.

4 years agoEevee: First Shadows implementation
Clément Foucault [Mon, 10 Apr 2017 10:06:17 +0000 (12:06 +0200)]
Eevee: First Shadows implementation

Using Texture Arrays to store shadow maps so less texture slots are used when shading. This means a large amount of shadows can be supported.

Support Projection Shadow Map for sun like in old BI/BGE.

Support Cube Shadow Map for Point/Spot/Area lights. the benefit of using it for spot light is that the spot angle does not change shadow resolution (at the cost of more memory used). The implementation of the cubemap sampling is targeted for 3.3 core. We rely on 2D texture arrays to store cubemaps faces and sample the right one manualy. Significant performance improvement can be done using Cubemap Arrays on supported hardware.

Shadows are only hardware filtered. Prefiltered shadows and settings comming next.

4 years agoDraw Manager: Use Texture flag in Framebuffer init.
Clément Foucault [Wed, 5 Apr 2017 10:57:32 +0000 (12:57 +0200)]
Draw Manager: Use Texture flag in Framebuffer init.

4 years agoGPUTextures: Work on cubemap support and array textures
Clément Foucault [Tue, 4 Apr 2017 12:48:42 +0000 (14:48 +0200)]
GPUTextures: Work on cubemap support and array textures

4 years agoEevee: Fix spot lights
Clément Foucault [Tue, 4 Apr 2017 10:08:42 +0000 (12:08 +0200)]
Eevee: Fix spot lights

4 years agoMake build with GL 3.3 again
Dalai Felinto [Mon, 10 Apr 2017 10:21:13 +0000 (12:21 +0200)]
Make build with GL 3.3 again

This is a workaround while the PRIM_QUADS_XXX are still in the code

4 years agoLayers unittest: layer_cyncing test was not being called
Dalai Felinto [Mon, 10 Apr 2017 08:08:29 +0000 (10:08 +0200)]
Layers unittest: layer_cyncing test was not being called

4 years agoUnitettesting: Force python errors to show as error
Dalai Felinto [Mon, 10 Apr 2017 08:03:02 +0000 (10:03 +0200)]
Unitettesting: Force python errors to show as error

4 years agoGL stubs: no need to assert when calling deprecated calls
Dalai Felinto [Mon, 10 Apr 2017 07:33:57 +0000 (09:33 +0200)]
GL stubs: no need to assert when calling deprecated calls

4 years agoExpand OpenGL stubs to allow for breakpoints
Dalai Felinto [Mon, 10 Apr 2017 06:59:05 +0000 (08:59 +0200)]
Expand OpenGL stubs to allow for breakpoints

4 years agoAdd stubs to build WITH_GL_PROFILE_CORE
Dalai Felinto [Mon, 10 Apr 2017 06:30:09 +0000 (08:30 +0200)]
Add stubs to build WITH_GL_PROFILE_CORE

This is an auto-generated list, crossing gl-deprecated.h, glew.h and the
Blender code. It allows Blender to build with core profile.

WITH_OPENGL_LEGACY=ON: nothing changes

It stubs deprecated legacy calls.

It stubs deprecated legacy calls thus allowing Blender to build with
core profile only.

Technically you only want to use WITH_OPENGL_LEGACY=OFF when
WITH_GL_PROFILE_CORE=ON. But it doesn't hurt to have it working for both

Reviewed by: merwin

Differential Revision:

4 years agoMerge branch 'master' into blender2.8
Julian Eisel [Sun, 9 Apr 2017 20:51:38 +0000 (22:51 +0200)]
Merge branch 'master' into blender2.8

4 years agoCleanup: glsl indentation
Campbell Barton [Sun, 9 Apr 2017 06:34:15 +0000 (16:34 +1000)]
Cleanup: glsl indentation

4 years agoCleanup: use doxy code block
Campbell Barton [Sun, 9 Apr 2017 06:26:04 +0000 (16:26 +1000)]
Cleanup: use doxy code block

4 years agoMerge branch 'master' into blender2.8
Campbell Barton [Sun, 9 Apr 2017 06:09:12 +0000 (16:09 +1000)]
Merge branch 'master' into blender2.8

4 years agoListBase: Add insert-replace function
Campbell Barton [Sun, 9 Apr 2017 06:07:09 +0000 (16:07 +1000)]
ListBase: Add insert-replace function

Handy to replace an existing link
(without having to store before/after links)

Use for id-props

4 years agoCycles: Fix building of CUDA kernels with compilers where C++11 is disabled
Mai Lavelle [Sat, 8 Apr 2017 11:12:04 +0000 (07:12 -0400)]
Cycles: Fix building of CUDA kernels with compilers where C++11 is disabled

4 years agoAdd helpers in bpy_extras.keyconfig_utils for addons to (un)register their keymaps.
Bastien Montagne [Sat, 8 Apr 2017 09:06:44 +0000 (11:06 +0200)]
Add helpers in bpy_extras.keyconfig_utils for addons to (un)register their keymaps.

Doing this in a fully 'clean' way is far from obvious, especially
unregister, you often end up leaving nasty 'orphanned' keymap items
referring to unregistered operators...

4 years agoGPU lib support for WITH_LEGACY_OPENGL
Mike Erwin [Sat, 8 Apr 2017 06:34:30 +0000 (02:34 -0400)]
GPU lib support for WITH_LEGACY_OPENGL

For early testing of core profile:
- GPU_legacy_support = false
- GPU_display_list_support = false
- GPU_geometry_shader_support = true

Relates to T49012

4 years agoOpenGL: drop support for EXT_geometry_shader4
Mike Erwin [Sat, 8 Apr 2017 06:21:13 +0000 (02:21 -0400)]
OpenGL: drop support for EXT_geometry_shader4

See gpu_shader.c for the main changes.

EXT_geometry_shader4 brought this feature to GL versions < 3.2, but now it's just cluttering up our code.

Soon all platforms will be on version 3.3 so we won't even have to check support at runtime!

4 years agoGawain: remove GL enum from primitive API
Mike Erwin [Sat, 8 Apr 2017 05:19:25 +0000 (01:19 -0400)]
Gawain: remove GL enum from primitive API

Callers now have to use Gawain's PRIM enum to specify geometric primitives.

This makes the API more bullet-proof (at least less vulnerable) since GLenum covers waaay more than GL_POINTS, GL_LINES, etc.

Also prepares us for Vulkan.

4 years agoOpenGL: use PRIM instead of GL enum everywhere else
Mike Erwin [Sat, 8 Apr 2017 04:50:36 +0000 (00:50 -0400)]
OpenGL: use PRIM instead of GL enum everywhere else

Well, everywhere that uses Gawain for drawing. Places that call OpenGL directly still use GL enums.

Part of T49043

4 years agoCorrect constraint manipulator colors
Campbell Barton [Sat, 8 Apr 2017 02:08:51 +0000 (12:08 +1000)]
Correct constraint manipulator colors

Widget show as color of constrained axis

Campbell Barton [Sat, 8 Apr 2017 02:00:46 +0000 (12:00 +1000)]

This wasn't working outside of gpu module.

4 years agoOpenGL: use PRIM instead of GL enum for immBegin
Mike Erwin [Fri, 7 Apr 2017 20:31:26 +0000 (16:31 -0400)]
OpenGL: use PRIM instead of GL enum for immBegin

Getting ready for a Gawain API change...

Part of T49043

4 years agoGawain: remove GL enum from vertex format API
Mike Erwin [Fri, 7 Apr 2017 20:00:03 +0000 (16:00 -0400)]
Gawain: remove GL enum from vertex format API

Callers now have to use Gawain's COMP enum to specify vertex attributes.

This makes the API more bullet-proof (at least less vulnerable) since GLenum covers waaay more than component types.

Also prepares us for Vulkan.

4 years agouse COMP instead of GL enum to construct vertex format
Mike Erwin [Fri, 7 Apr 2017 19:51:39 +0000 (15:51 -0400)]
use COMP instead of GL enum to construct vertex format

I converted all other files a day or two ago; this file was part of a recent merge.

4 years agoOpenGL: remove UI_reinit_gl_state function
Mike Erwin [Fri, 7 Apr 2017 19:10:48 +0000 (15:10 -0400)]
OpenGL: remove UI_reinit_gl_state function

All line & point drawing is responsible for setting its own state (as of January 2016) making this redundant.

4 years agoOpenGL: transition away from GL_QUADS
Mike Erwin [Fri, 7 Apr 2017 19:03:24 +0000 (15:03 -0400)]
OpenGL: transition away from GL_QUADS

Single quads are drawn as a TRIANGLE_FAN, with 4 verts in the same order.

Multiple quads now use PRIM_QUADS_XXX and will need further work. Only 8 places still use this.

Part of T49043

4 years agoGawain: append XXX to PRIM_QUADS to make it scary
Mike Erwin [Fri, 7 Apr 2017 18:21:10 +0000 (14:21 -0400)]
Gawain: append XXX to PRIM_QUADS to make it scary

Quads are not part of modern GL or Vulkan, so we should avoid them. XXX makes coders think "hmm how could I draw this without using quads?"

Quads will be removed during the transition to core profile.

Part of T49043

4 years agofix use of uninitialized variable
Mike Erwin [Fri, 7 Apr 2017 17:48:11 +0000 (13:48 -0400)]
fix use of uninitialized variable

Bug crawled in via 2944438e9a276e48d7eabb5bb88ecec9b2f1e7dc as part of custom manipulators.

4 years agoshrink fixed-size internal GLSL string buffers
Mike Erwin [Fri, 7 Apr 2017 17:28:42 +0000 (13:28 -0400)]
shrink fixed-size internal GLSL string buffers

We concatenate #defines and #extensions into these, and can count the max string lengths needed. 256 is enough to hold today's strings; we can adjust later if needed.

4 years agouse best GPU matrix function for the job
Mike Erwin [Fri, 7 Apr 2017 17:24:00 +0000 (13:24 -0400)]
use best GPU matrix function for the job

Follow-up to 204e067111af9346fccea9981a0a7962ec8ef906 which coverted manipulators' legacy GL matrix calls to new ones.

part of T49450

4 years agoOpenGL: support GLSL 3.3 core profile
Mike Erwin [Fri, 7 Apr 2017 16:50:44 +0000 (12:50 -0400)]
OpenGL: support GLSL 3.3 core profile


This is our final target for Blender 2.8, all previous versions will be dropped in the future. GLSL 3.3 is richer so we don't require as many extensions.

4 years agoCycles: Fix warning with MSVC
Sergey Sharybin [Fri, 7 Apr 2017 16:28:16 +0000 (18:28 +0200)]
Cycles: Fix warning with MSVC

4 years agoCycles: Fix compilation error with certain CUDA and host compiler configuration
Sergey Sharybin [Fri, 7 Apr 2017 16:27:07 +0000 (18:27 +0200)]
Cycles: Fix compilation error with certain CUDA and host compiler configuration

This seems to happen on Windows only, happened to Thomas and Nathan already.

Similar patch Thomas was showing, but i do not see it committted. So comitting
now in order to get more developers and users happy.

4 years agoTests: Compare vectors with epsilon
Sergey Sharybin [Fri, 7 Apr 2017 16:26:39 +0000 (18:26 +0200)]
Tests: Compare vectors with epsilon

SOlves the test false-positively failing in 32 bit environment.

4 years ago[Cycles/msvc] Get cycles_kernel compile time under control.
lazydodo [Fri, 7 Apr 2017 16:25:54 +0000 (10:25 -0600)]
[Cycles/msvc] Get cycles_kernel compile time under control.

Ever since we merged the extra texture types (half etc) and spit kernel the compile time for cycles_kernel has been going out of control.

It's currently sitting at a cool 1295.762 seconds with our standard compiler (2013/x64/release)

I'm not entirely sure why msvc gets upset with it, but the inlining of matrix near the bottom of the tri-cubic 3d interpolator is the source of the issue, this patch excludes it from being inlined.

This patch bring it back down to a manageable 186 seconds. (7x faster!!)

with the attached bzzt.blend that @sergey  kindly provided i got the following results with builds with identical hashes

58:51.73 buildbot
58:04.23 Patched

it's really close, the slight speedup could be explained by the switch instead of having multiple if's (switches do generate more optimal code than a chain of if/else/if/else statements) but in all honesty it might just have been pure luck (dev box,very polluted, bad for benchmarks) regardless, this patch doesn't seem to slow down anything with my limited testing.



Reviewers: brecht, lukasstockner97, juicyfruit, dingto, sergey

Reviewed By: brecht, dingto, sergey

Subscribers: InsigMathK, sergey

Tags: #cycles

Differential Revision:

4 years agoWorkaround for weightpoint not working
Dalai Felinto [Fri, 7 Apr 2017 16:00:39 +0000 (18:00 +0200)]
Workaround for weightpoint not working

Kudos to Germano Cavalcante for spotting the issue, the real fix is to pass SL to the function though

4 years agoLibmv: Correction to previous commit
Sergey Sharybin [Fri, 7 Apr 2017 15:57:48 +0000 (17:57 +0200)]
Libmv: Correction to previous commit

We do need to make a copy of the values.

4 years agoSimplified some test code in
Sybren A. Stüvel [Fri, 7 Apr 2017 15:51:23 +0000 (17:51 +0200)]
Simplified some test code in

4 years agoNo more need to alter sys.path in each and every render_layer unit test.
Sybren A. Stüvel [Fri, 7 Apr 2017 15:50:47 +0000 (17:50 +0200)]
No more need to alter sys.path in each and every render_layer unit test.

I tried the clean way, by setting the PYTHONPATH environment variable for
CTest, using SET (CTEST_ENVIRONMENT blablab), but that didn't seem to

4 years agoTests: import blendfile without modifying sys.path
Sybren A. Stüvel [Fri, 7 Apr 2017 15:25:09 +0000 (17:25 +0200)]
Tests: import blendfile without modifying sys.path

4 years agoMerge branch 'master' into blender2.8
Sybren A. Stüvel [Fri, 7 Apr 2017 15:28:22 +0000 (17:28 +0200)]
Merge branch 'master' into blender2.8

# Conflicts:
# source/blender/alembic/intern/abc_exporter.h
# source/blender/alembic/intern/

4 years agoLibmv: Fix crash of keyframe selection on 32bit linux
Sergey Sharybin [Fri, 7 Apr 2017 15:10:44 +0000 (17:10 +0200)]
Libmv: Fix crash of keyframe selection on 32bit linux

4 years agoOpenGL: Get rid of PRIM_QUADS usage in manipulators code
Julian Eisel [Fri, 7 Apr 2017 15:04:14 +0000 (17:04 +0200)]
OpenGL: Get rid of PRIM_QUADS usage in manipulators code

4 years agoBuildbot: List freetype for OIIO libraries
Sergey Sharybin [Fri, 7 Apr 2017 15:01:07 +0000 (17:01 +0200)]
Buildbot: List freetype for OIIO libraries

OIIO in release environment is compiled with Freetype support.

This fixes compilation error of static unit tests.

4 years agoBuildbot: Link statically against freetype
Sergey Sharybin [Fri, 7 Apr 2017 15:00:43 +0000 (17:00 +0200)]
Buildbot: Link statically against freetype

4 years agoCMake: Fix detection of idiff program
Sergey Sharybin [Fri, 7 Apr 2017 15:00:06 +0000 (17:00 +0200)]
CMake: Fix detection of idiff program

4 years agoOpenGL / Outliner: QUADS are not supported in core
Dalai Felinto [Fri, 7 Apr 2017 14:42:56 +0000 (16:42 +0200)]
OpenGL / Outliner: QUADS are not supported in core

4 years agoTests: Fix compilation error with static OpenMP
Sergey Sharybin [Fri, 7 Apr 2017 14:06:05 +0000 (16:06 +0200)]
Tests: Fix compilation error with static OpenMP

4 years agoFix drawing of planar transfrom manipulators, update matrix code
Julian Eisel [Fri, 7 Apr 2017 14:02:45 +0000 (16:02 +0200)]
Fix drawing of planar transfrom manipulators, update matrix code

4 years agoAlembic import: prevent crash when cancelling import.
Sybren A. Stüvel [Fri, 7 Apr 2017 14:03:16 +0000 (16:03 +0200)]
Alembic import: prevent crash when cancelling import.

It's possible that cancellation occured between the creation of the reader
and the creation of the Blender object, in which case reader->object()
returns a NULL pointer.

4 years agoAlembic import: prevent double user decrement when cancelling import.
Sybren A. Stüvel [Fri, 7 Apr 2017 14:02:51 +0000 (16:02 +0200)]
Alembic import: prevent double user decrement when cancelling import.

BKE_libblock_free_us() was called on the object data, which decrements
its user count, after which the same function was called on the object,
which decrements the user count of the object data again. This double
decrement was too much.

4 years agoCycles: Fix access of NULL pointer as array
Sergey Sharybin [Fri, 7 Apr 2017 13:07:25 +0000 (15:07 +0200)]
Cycles: Fix access of NULL pointer as array

Was confusing guarded allocator for some reason.

4 years ago3D Manipulator: add back protected flags check
Campbell Barton [Fri, 7 Apr 2017 13:01:20 +0000 (23:01 +1000)]
3D Manipulator: add back protected flags check

This used to be a separate pass

4 years agoAlembic: synced gather_objects_paths with visit_objects
Sybren A. Stüvel [Fri, 7 Apr 2017 11:40:38 +0000 (13:40 +0200)]
Alembic: synced gather_objects_paths with visit_objects

This was necessary, but was only mentioned at gather_object_paths (which
I didn't see earlier). That's now also fixed.

4 years ago3D View: manipulator from custom-manipulators branch
Campbell Barton [Thu, 6 Apr 2017 14:35:57 +0000 (00:35 +1000)]
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

4 years agoReplace CGSubSurf direct includes to GL/glew.h
Dalai Felinto [Fri, 7 Apr 2017 11:03:24 +0000 (13:03 +0200)]
Replace CGSubSurf direct includes to GL/glew.h

4 years agoCleanup: Unused function
Sergey Sharybin [Fri, 7 Apr 2017 10:55:04 +0000 (12:55 +0200)]
Cleanup: Unused function

4 years agoCycles: Fix corrupted mesh render when topology differs at the next frame
Sergey Sharybin [Fri, 7 Apr 2017 10:48:43 +0000 (12:48 +0200)]
Cycles: Fix corrupted mesh render when topology differs at the next frame

4 years agoCycles: Change work pool and global size of split CPU for easier debugging
Mai Lavelle [Thu, 6 Apr 2017 09:08:35 +0000 (05:08 -0400)]
Cycles: Change work pool and global size of split CPU for easier debugging

4 years agoCycles: Fix indentation
Mai Lavelle [Fri, 31 Mar 2017 06:38:07 +0000 (02:38 -0400)]
Cycles: Fix indentation

4 years agoCycles: Add missing flush
Mai Lavelle [Fri, 31 Mar 2017 06:00:27 +0000 (02:00 -0400)]
Cycles: Add missing flush

4 years agoCycles: Check ray state properly to avoid endless loop
Mai Lavelle [Tue, 28 Mar 2017 06:28:36 +0000 (02:28 -0400)]
Cycles: Check ray state properly to avoid endless loop

The state mask wasnt applied before comparison giving false results. It
shouldnt really happen that a ray state contains any flags that need to
be masked away, but if it does happen its better to not get stuck.

4 years agoAlembic: documented use of CacheReader struct
Sybren A. Stüvel [Thu, 23 Feb 2017 10:58:20 +0000 (11:58 +0100)]
Alembic: documented use of CacheReader struct

4 years agoAlembic: just pass NULL when we know mcmd->reader is NULL.
Sybren A. Stüvel [Thu, 23 Feb 2017 10:58:45 +0000 (11:58 +0100)]
Alembic: just pass NULL when we know mcmd->reader is NULL.

More explicit, easier to read & understand.

4 years agoFix building alembic gtest with buildinfo...
Bastien Montagne [Fri, 7 Apr 2017 08:44:13 +0000 (10:44 +0200)]
Fix building alembic gtest with buildinfo...

4 years agoFix compilation error after recent changes
Sergey Sharybin [Fri, 7 Apr 2017 07:58:32 +0000 (09:58 +0200)]
Fix compilation error after recent changes

4 years agoOpenGL: disable rotate manipulator clipping on Mac
Mike Erwin [Fri, 7 Apr 2017 07:08:00 +0000 (03:08 -0400)]
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.

4 years agofix rotation manipulator's Push/PopMatrix balance
Mike Erwin [Fri, 7 Apr 2017 07:51:10 +0000 (03:51 -0400)]
fix rotation manipulator's Push/PopMatrix balance

Was popping out the bottom of the stack.

4 years agoFix T51137: Edge Rip Hangs
Campbell Barton [Fri, 7 Apr 2017 01:43:50 +0000 (11:43 +1000)]
Fix T51137: Edge Rip Hangs

4 years agoOpenGL: refactor ui_panel_category_draw_tab
Mike Erwin [Thu, 6 Apr 2017 23:37:50 +0000 (19:37 -0400)]
OpenGL: refactor ui_panel_category_draw_tab

- 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.

4 years agoOpenGL: refactor UI_draw_roundbox functions
Mike Erwin [Thu, 6 Apr 2017 23:15:26 +0000 (19:15 -0400)]
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)

4 years agoNew build option WITH_LEGACY_OPENGL
Dalai Felinto [Thu, 6 Apr 2017 16:46:33 +0000 (18:46 +0200)]
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

(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:

Many thanks for Sergey Sharybin for the help.

4 years agoFix T51135: Cylinder primitive generated bad UVs
Germano Cavalcante [Thu, 6 Apr 2017 15:20:22 +0000 (12:20 -0300)]
Fix T51135: Cylinder primitive generated bad UVs

4 years agoDepsgraph: Prefer use anonymous structs for unused arguments
Sergey Sharybin [Thu, 6 Apr 2017 14:58:19 +0000 (16:58 +0200)]
Depsgraph: Prefer use anonymous structs for unused arguments

4 years agoAlembic: rewrapped some lines to fit within 80 chars.
Sybren A. Stüvel [Thu, 6 Apr 2017 13:08:35 +0000 (15:08 +0200)]
Alembic: rewrapped some lines to fit within 80 chars.

4 years agoAlembic import: compatibility with pre-C++11 compilers.
Sybren A. Stüvel [Thu, 6 Apr 2017 13:08:19 +0000 (15:08 +0200)]
Alembic import: compatibility with pre-C++11 compilers.

4 years agoAlembic import: restructured the importer w.g.t. parenthood
Sybren A. Stüvel [Thu, 6 Apr 2017 12:22:28 +0000 (14:22 +0200)]
Alembic import: restructured the importer w.g.t. parenthood

Previously, a GHash was used to store a flattened mapping of parent
information based on the Alembic hierarchy, and then that hash was used to
set parent pointers on Blender objects. This resulted in errors and
some duplicate objects. The new approach stores parent pointers while
traversing the Alembic hierarchy, which means that there is much more
information about the actual context of the Alembic object itself,
producing a more stable import.

4 years agoAlembic: rotation mode issue in copy_m44_axis_swap, and added unit tests.
Sybren A. Stüvel [Wed, 5 Apr 2017 15:07:24 +0000 (17:07 +0200)]
Alembic: rotation mode issue in copy_m44_axis_swap, and added unit tests.