4 years agoMerge remote-tracking branch 'origin/master' into blender2.8
Dalai Felinto [Thu, 13 Oct 2016 16:42:54 +0000 (16:42 +0000)]
Merge remote-tracking branch 'origin/master' into blender2.8

4 years agoFix T49534: 2.78 Wrong texture scaling in material viewport
Sergey Sharybin [Thu, 13 Oct 2016 16:31:53 +0000 (18:31 +0200)]
Fix T49534: 2.78 Wrong texture scaling in material viewport

Seems to be a bug in original implementation of a830280: code was always
using tangent space instead of UV map because it had the same name. Now
prefer UVMap over tangent because this is how Cycles works. At least it's
closer to.

Not sure it the save+reload issue is still relevant after this fix, that
needs to be double-checked.

Thanks @dfelinto for looking into the report and simplifying the case.

Should be included into 2.78a.

4 years agoviewport: barebones to handle viewport compositing in gpu_viewport.c
Dalai Felinto [Thu, 13 Oct 2016 04:22:28 +0000 (04:22 +0000)]
viewport: barebones to handle viewport compositing in gpu_viewport.c

4 years agoGawain: fix build when TRUST_NO_ONE is disabled
Mike Erwin [Thu, 13 Oct 2016 16:24:01 +0000 (12:24 -0400)]
Gawain: fix build when TRUST_NO_ONE is disabled

4 years agoFix OLD pre-git links in the API, add missing factory-startup option to blender execu...
Aaron Carlisle [Thu, 13 Oct 2016 15:53:30 +0000 (17:53 +0200)]
Fix OLD pre-git links in the API, add missing factory-startup option to blender executions.

Reviewers: mont29

Reviewed By: mont29

Tags: #bf_blender, #python, #infrastructure:_websites

Differential Revision:

4 years agoFix compiling with Blenderplayer
Julian Eisel [Thu, 13 Oct 2016 15:17:17 +0000 (17:17 +0200)]
Fix compiling with Blenderplayer

4 years agoPrevent problems when appending scene with referenced proxy
Sybren A. Stüvel [Thu, 13 Oct 2016 15:06:24 +0000 (17:06 +0200)]
Prevent problems when appending scene with referenced proxy

Such a "referenced proxy" could be a proxy that is used in a constraint on
another object. Brings back part of 1cdc54dc7db85766 but without the
memory leak.

4 years agoUsual UI/i18n tweaks & fixes.
Bastien Montagne [Thu, 13 Oct 2016 14:20:29 +0000 (16:20 +0200)]
Usual UI/i18n tweaks & fixes.

4 years agoimmediate mode: small cleanup on timeline
Dalai Felinto [Thu, 13 Oct 2016 14:17:52 +0000 (14:17 +0000)]
immediate mode: small cleanup on timeline

(no need to unbind/rebind the same program)

4 years agoFix: Grease Pencil palettes were missing a RNA path callback
Joshua Leung [Thu, 13 Oct 2016 12:18:53 +0000 (01:18 +1300)]
Fix: Grease Pencil palettes were missing a RNA path callback

4 years agoProxy appending: re-establish link to proxies when they are made local
Sybren A. Stüvel [Thu, 13 Oct 2016 11:32:08 +0000 (13:32 +0200)]
Proxy appending: re-establish link to proxies when they are made local

This allows appending of an entire scene from another blend file into this one,
even when that blend file contains proxified armatures.

This replaces the approach from commit 1cdc54dc7db85766.

Thanks @sergey for the help.

4 years agoFix T49635: column_flow Layout - last column is too small.
Bastien Montagne [Thu, 13 Oct 2016 08:21:38 +0000 (10:21 +0200)]
Fix T49635: column_flow Layout - last column is too small.

Column flow layout was abuse ui_item_fit in a weird way, which was
broken for last column items.

Now rather use own code, which basically spread available width as
equally as possible between all columns.

4 years agoCleanup: UI layout: remove unsed and confusing parameter.
Bastien Montagne [Wed, 12 Oct 2016 19:28:11 +0000 (21:28 +0200)]
Cleanup: UI layout: remove unsed and confusing parameter.

Things are complicated enough like that, no need to add useless noise on
top of it!

4 years agoinform immediate mode when switching OpenGL context
Mike Erwin [Thu, 13 Oct 2016 04:37:47 +0000 (00:37 -0400)]
inform immediate mode when switching OpenGL context

Longstanding to-do is now to-done.

Heinous bug reported by @dfelinto pushed me to fix this.

4 years agoGawain: fix immediate mode for multiple GL contexts
Mike Erwin [Thu, 13 Oct 2016 04:31:23 +0000 (00:31 -0400)]
Gawain: fix immediate mode for multiple GL contexts

New functions activate & deactivate immediate mode. Call these when switching context and the internal VAO will be handled properly. VAOs are one of the few things *not* shared between OpenGL contexts.

4 years agoFix for crash on dopesheet drawing with immediate mode (rB7a552612c)
Dalai Felinto [Thu, 13 Oct 2016 04:23:58 +0000 (04:23 +0000)]
Fix for crash on dopesheet drawing with immediate mode (rB7a552612c)

4 years agoviewport: bring the manipulators
Dalai Felinto [Thu, 13 Oct 2016 02:50:42 +0000 (02:50 +0000)]
viewport: bring the manipulators

4 years agoFix timeline break after recent immediate mode change (rBf6e7e46f)
Dalai Felinto [Thu, 13 Oct 2016 02:19:04 +0000 (02:19 +0000)]
Fix timeline break after recent immediate mode change (rBf6e7e46f)

4 years agogawain: assert for immBeginAtMost(..., 0)
Dalai Felinto [Thu, 13 Oct 2016 02:16:55 +0000 (02:16 +0000)]
gawain: assert for immBeginAtMost(..., 0)

4 years agoDraw depth even when in wire mode (for OB_RENDER)
Dalai Felinto [Wed, 12 Oct 2016 23:31:44 +0000 (23:31 +0000)]
Draw depth even when in wire mode (for OB_RENDER)

Note: this is not working at the moment, but the logic is sound.
Since we will still change the drawing code a lot I think the commit is valid.

4 years agoimmediate mode: use new ThemeColor functions
Dalai Felinto [Wed, 12 Oct 2016 23:18:14 +0000 (23:18 +0000)]
immediate mode: use new ThemeColor functions

4 years agogawain/immediate mode: new util functions for color uniforms
Dalai Felinto [Wed, 12 Oct 2016 23:01:59 +0000 (23:01 +0000)]
gawain/immediate mode: new util functions for color uniforms

4 years agowrong alpha set for timeline theme (fixup for rBf329ebe3)
Dalai Felinto [Thu, 13 Oct 2016 00:28:07 +0000 (00:28 +0000)]
wrong alpha set for timeline theme (fixup for rBf329ebe3)

4 years agoImmediate mode: timeline (keyframes and range)
Dalai Felinto [Wed, 12 Oct 2016 22:12:14 +0000 (22:12 +0000)]
Immediate mode: timeline (keyframes and range)

Part of T49043

4 years agoFix T49631: radial control operators not using DPI properly.
Brecht Van Lommel [Wed, 12 Oct 2016 18:15:38 +0000 (20:15 +0200)]
Fix T49631: radial control operators not using DPI properly.

4 years agoFix T49640: Cycles constant folding incorrect for texture coordinates.
Brecht Van Lommel [Wed, 12 Oct 2016 16:36:41 +0000 (18:36 +0200)]
Fix T49640: Cycles constant folding incorrect for texture coordinates.

4 years agoFix build error with WITH_CYCLES_NATIVE_ONLY and recent AVX2 changes.
Brecht Van Lommel [Wed, 12 Oct 2016 15:35:03 +0000 (17:35 +0200)]
Fix build error with WITH_CYCLES_NATIVE_ONLY and recent AVX2 changes.

4 years agoFix T49636: material draw mode crash with displacement and missing group input node.
Brecht Van Lommel [Wed, 12 Oct 2016 11:10:09 +0000 (13:10 +0200)]
Fix T49636: material draw mode crash with displacement and missing group input node.

4 years agoFFmpeg: Fix off by one error in number of detected frames in matroska container
Sergey Sharybin [Wed, 12 Oct 2016 14:17:43 +0000 (16:17 +0200)]
FFmpeg: Fix off by one error in number of detected frames in matroska container

Seems to be rounding error. Hopefully new code handles the error fixed back in
SVN revision 28901 and still have proper frame number for Hjalti.

What could possibly go wrong here..

4 years agoCycles: Use const reference for register variables in non-OpenCL code
Sergey Sharybin [Wed, 12 Oct 2016 12:48:59 +0000 (14:48 +0200)]
Cycles: Use const reference for register variables in non-OpenCL code

This is something tested by @LazyDodo and suggested by Maxym to make
MSVC happier.

4 years agoCycles: Use more SSE intrinsics for float3 type
Sergey Sharybin [Wed, 12 Oct 2016 12:23:29 +0000 (14:23 +0200)]
Cycles: Use more SSE intrinsics for float3 type

This gives about 5% speedup on AVX2 kernels (other kernels still
have SSE disabled for math operations) and this solves the slowdown
of koro scene mention in the previous commit.

The title says it all actually. This commit also contains
changes to pass float3 as const reference in affected functions.

This should make MSVC happier without breaking OpenCL because it's
only done in areas which are ifdef-ed for non-OpenCL.

Another patch based on inspiration from Maxym Dmytrychenko, thanks!

4 years agoCycles: Implement AVX2 version of triangle_intersect
Sergey Sharybin [Wed, 12 Oct 2016 11:46:25 +0000 (13:46 +0200)]
Cycles: Implement AVX2 version of triangle_intersect

This commit basically vectorizes existing code using AVX2 instructions
(without modifying algorithm itself). This gives quite nice speedups:

  BMW:        -8%
  Classroom:  -5%
  Cat:        -5%
  Koro:       +1%
  Barcelona:  -8%

That's on Linux machine, reported performance improvement on Windows
goes up to 20%.

Not currently sure why Koro is somewhat slower because it mainly uses
curve intersection tests, could be a time noise? Or osmething with the
cache utilization perhaps? In any case speedup in other scenes makes
me thinking that current state is acceptable for initial implementation.

This is again inspired by Maxym Dmytrychenko.

4 years agoCycles: Add new avxf vectorized data type
Sergey Sharybin [Wed, 12 Oct 2016 11:03:15 +0000 (13:03 +0200)]
Cycles: Add new avxf vectorized data type

Based on existing ssef data type and to my knowledge it's also what happens in
Embree nowadays.

Inspired by Maxym Dmytrychenko and required for the upcoming triangle
intersection commit.

Hopefully the copyright message is correct.

4 years agoCycles: Enable SSE options of math module for AVX2 kernels
Sergey Sharybin [Wed, 12 Oct 2016 10:54:31 +0000 (12:54 +0200)]
Cycles: Enable SSE options of math module for AVX2 kernels

Currently this does not give measurable difference, but is required
ground work for some upcoming further optimization of AVX2 kernels.

4 years agoCycles: Get rid of ifdef-ed noinline policy
Sergey Sharybin [Wed, 12 Oct 2016 10:15:24 +0000 (12:15 +0200)]
Cycles: Get rid of ifdef-ed noinline policy

4 years agoCycles: Fix use of uninitialized variable in SSS
Sergey Sharybin [Wed, 12 Oct 2016 10:12:28 +0000 (12:12 +0200)]
Cycles: Fix use of uninitialized variable in SSS

When ray hits curve segment with SSS shader it was possible to have
uninitialized hit_P variable used for sampling.

Seems that was a reason of our headache of difference between AVX2
and SSE4 render results here, so now we can revert all the nasty
ifdef-ed inline policies.

4 years agoCycles: Cleanup, style
Sergey Sharybin [Wed, 12 Oct 2016 09:54:33 +0000 (11:54 +0200)]
Cycles: Cleanup, style

4 years agoFix T49622: Grease pencil not rendering out of VSE
Sergey Sharybin [Wed, 12 Oct 2016 08:01:30 +0000 (10:01 +0200)]
Fix T49622: Grease pencil not rendering out of VSE

4 years agoBLF/OpenGL: use new matrix API when drawing text
Mike Erwin [Wed, 12 Oct 2016 01:21:02 +0000 (21:21 -0400)]
BLF/OpenGL: use new matrix API when drawing text

First test of matrix API. This will eventually use the 2D part of this API, but the 3D part is ready now.

Part of T49450

4 years agoOpenGL: matrix fixes & compatibility
Mike Erwin [Wed, 12 Oct 2016 01:13:13 +0000 (21:13 -0400)]
OpenGL: matrix fixes & compatibility

Was multiplying matrices backward, so concatenation was broken. Fixed!

Also a way to mix legacy matrix stacks with the new library. Just during the transition! Anything within SUPPORT_LEGACY_MATRIX will go away after we switch to core profile.

Part of T49450

4 years agoFix T49502: file browser on OS X not highlighting external drives.
Brecht Van Lommel [Tue, 11 Oct 2016 22:07:11 +0000 (00:07 +0200)]
Fix T49502: file browser on OS X not highlighting external drives.

4 years agoquiet GPU matrix debug printing
Mike Erwin [Tue, 11 Oct 2016 18:44:12 +0000 (14:44 -0400)]
quiet GPU matrix debug printing

Will be needed soon but turn it off by default.
Part of T49450

4 years agoBLF/OpenGL: draw text with new immediate mode
Mike Erwin [Tue, 11 Oct 2016 18:36:16 +0000 (14:36 -0400)]
BLF/OpenGL: draw text with new immediate mode

Part of T49043

4 years agoFix T49629: Graph editor normalize function doesn't work on f-curves with a constant...
Sergey Sharybin [Tue, 11 Oct 2016 15:08:00 +0000 (17:08 +0200)]
Fix T49629: Graph editor normalize function doesn't work on f-curves with a constant key value

Technically it is a regression in behavior and should be 2.78a.

4 years agoFix objects added via py being on the wrong layer when viewport is decoupled from...
Sergey Sharybin [Tue, 11 Oct 2016 13:35:14 +0000 (15:35 +0200)]
Fix objects added via py being on the wrong layer when viewport is decoupled from scene

4 years agoMake console message more clear for --scene argument
Sergey Sharybin [Tue, 11 Oct 2016 12:48:15 +0000 (14:48 +0200)]
Make console message more clear for --scene argument

4 years agoinstall_deps: make c++11 building mandatory on blender2.8 branch.
Bastien Montagne [Tue, 11 Oct 2016 10:19:04 +0000 (12:19 +0200)]
install_deps: make c++11 building mandatory on blender2.8 branch.

4 years agoMerge branch 'master' into blender2.8
Bastien Montagne [Tue, 11 Oct 2016 10:09:59 +0000 (12:09 +0200)]
Merge branch 'master' into blender2.8

4 years agoFix T49623: Immediately crash trying to render attached file in Cycles
Sergey Sharybin [Tue, 11 Oct 2016 09:54:04 +0000 (11:54 +0200)]
Fix T49623: Immediately crash trying to render attached file in Cycles

Original fix in this area was not really complete (but was the safest at
the release time). Now all the crazy configurations of slots going out
of sync should be handled here.

4 years remove libglewmx from deb for now, the package is broken in deb...
Bastien Montagne [Mon, 10 Oct 2016 17:29:04 +0000 (19:29 +0200)] remove libglewmx from deb for now, the package is broken in deb testing...

4 years first attempt to support cxx11.
Bastien Montagne [Mon, 10 Oct 2016 17:17:43 +0000 (19:17 +0200)] first attempt to support cxx11.

For now, we merely add an option that sets CXXFLAGS envvar with
'--std=c++11' option.

There is no check done to ensure compatibility with the system
libraries, mainly because:
  - It is all but trivial to get this information in a generic and
    reliable way.
  - Currently even cutting edge distributions may still distribute some c++98
  - With recent stdlibc++, both ABIs are supported together, which means
    that incompatibilities are rather unlikely.

To summarize: if your system is recent and built with gcc-5.1 or more,
you should not experience too much troubles with c++11.

4 years agoGawain: add immRect utility functions (replaces legacy glRect)
Mike Erwin [Mon, 10 Oct 2016 16:30:55 +0000 (12:30 -0400)]
Gawain: add immRect utility functions (replaces legacy glRect)

Caller is responsible for setting up vertex format, binding a shader program, and setting the color *before* calling immRect.

4 years agoOpenGL animation: Fix stupid mistake form previous commit
Sergey Sharybin [Mon, 10 Oct 2016 13:52:10 +0000 (15:52 +0200)]
OpenGL animation: Fix stupid mistake form previous commit

Flagging of pool to cancel was done in the wrong place, making last
frames missing in the final video.

4 years agoFix viewport camera gets out of sync in certain cases
Sergey Sharybin [Mon, 10 Oct 2016 12:47:03 +0000 (14:47 +0200)]
Fix viewport camera gets out of sync in certain cases

It was possible to have two viewports opened and start using Ctrl-0
to make different objects an active camera for the viewport. This
worked fine for viewports which had decoupled camera from the scene,
but if viewport was locked to scene camera it was possible to run into
situation when two different viewports are locked to scene camera but
had different v3d->camera pointers.

4 years agoOpenGL render: Fix missing file output after pressing Esc
Sergey Sharybin [Mon, 10 Oct 2016 10:51:01 +0000 (12:51 +0200)]
OpenGL render: Fix missing file output after pressing Esc

Apparently, the whole G.is_break is not used by OpenGL render, meaning
this flag will not be clear before running the operator. This was
causing missing file output after pressing Esc once for the rest of
Blender session.

4 years agoMerge branch 'master' into blender2.8
Bastien Montagne [Mon, 10 Oct 2016 10:41:32 +0000 (12:41 +0200)]
Merge branch 'master' into blender2.8


4 years agoblender 2.8; OpenGL. ui_panel_category_draw_tab with immediate API
Mike Erwin [Mon, 10 Oct 2016 05:33:56 +0000 (01:33 -0400)]
blender 2.8; OpenGL. ui_panel_category_draw_tab with immediate API

Reviewers: dfelinto, Severin, merwin

Reviewed By: merwin

Tags: #bf_blender_2.8, #opengl_gfx

Maniphest Tasks: T49043

Differential Revision:

4 years agoOpenGL: remove GLSL support query (it's always supported)
Mike Erwin [Mon, 10 Oct 2016 05:13:03 +0000 (01:13 -0400)]
OpenGL: remove GLSL support query (it's always supported)

4 years agoremove call to GLSL support query (it's always supported)
Mike Erwin [Mon, 10 Oct 2016 05:28:02 +0000 (01:28 -0400)]
remove call to GLSL support query (it's always supported)

Reworked logic in the one place that still called this. Deleted the "GLSL not supported" fallback.

(equivalent to rB78abbdf26451 on blender2.8 branch)

4 years agoBGE: remove calls to GLSL support query (it's always supported)
Mike Erwin [Mon, 10 Oct 2016 05:08:49 +0000 (01:08 -0400)]
BGE: remove calls to GLSL support query (it's always supported)

Reworked logic in the few places that still called this. Deleted the "GLSL not supported" fallbacks.

Also removed some nearby checks for ARB_multitexture and OpenGL 1.1. Blender 2.77 removed checks like this, but game engine still has some.

4 years agoOpenGL: remove GLSL support query (it's always supported)
Mike Erwin [Mon, 10 Oct 2016 05:13:03 +0000 (01:13 -0400)]
OpenGL: remove GLSL support query (it's always supported)

4 years agoremove call to GLSL support query (it's always supported)
Mike Erwin [Mon, 10 Oct 2016 05:11:03 +0000 (01:11 -0400)]
remove call to GLSL support query (it's always supported)

Reworked logic in the one place that still called this. Deleted the "GLSL not supported" fallback.

4 years agoBGE: remove calls to GLSL support query (it's always supported)
Mike Erwin [Mon, 10 Oct 2016 05:08:49 +0000 (01:08 -0400)]
BGE: remove calls to GLSL support query (it's always supported)

Reworked logic in the few places that still called this. Deleted the "GLSL not supported" fallbacks.

Also removed some nearby checks for ARB_multitexture and OpenGL 1.1. Blender 2.77 removed checks like this, but game engine still has some.

4 years agoOpenGL: plug new matrix system into shaders (WIP)
Mike Erwin [Mon, 10 Oct 2016 03:03:35 +0000 (23:03 -0400)]
OpenGL: plug new matrix system into shaders (WIP)

Built-in shaders now use uniforms instead of legacy built-in matrices. So far I only hooked this up for new immediate mode.

We use the same matrix naming convention as OpenGL, but without the gl_ prefix, e.g. gl_ModelView becomes ModelView.

Right now it can skip the new matrix stack and use the legacy built-in matrices app-side. This will help us transition gradually from glMatrix functions to gpuMatrix functions.

Still some work to do in gpuBindMatrices. See TODO comments in gpu_matrix.c for specifics.

4 years agoOpenGL: Draw dividers in space_file with the new immediate mode
Thomas Beck [Sun, 9 Oct 2016 16:12:43 +0000 (18:12 +0200)]
OpenGL: Draw dividers in space_file with the new immediate mode

Thanks to @merwin for the review

Part of T49043

4 years agofix shaders for picky GLSL compilers
Mike Erwin [Sun, 9 Oct 2016 14:53:03 +0000 (10:53 -0400)]
fix shaders for picky GLSL compilers

@zeauro reported this issue:
texture2DRect needs the ARB_texture_rectangle extension.
But isn't that an OpenGL 2.1 feature and should be part of GLSL 1.2+?

This should fix it, and future shaders should do something similar.

4 years agoCycles: Split device_opencl.cpp into multiple files for easier maintenance
Lukas Stockner [Wed, 14 Sep 2016 21:47:54 +0000 (23:47 +0200)]
Cycles: Split device_opencl.cpp into multiple files for easier maintenance

There are no user-visible changes, just some internal restructuring.

Differential Revision:

4 years agoFix T49609: Point density textures: vertex colors are not properly averaged in BI
Daisuke Takahashi [Sun, 9 Oct 2016 11:16:19 +0000 (13:16 +0200)]
Fix T49609: Point density textures: vertex colors are not properly averaged in BI

Nice to have in 2.78a, though not a regression.

4 years agoCMake changes for new macOS target 10.9 / libc++ libraries.
Brecht Van Lommel [Wed, 14 Sep 2016 09:41:20 +0000 (11:41 +0200)]
CMake changes for new macOS target 10.9 / libc++ libraries.

Differential Revision:

4 years agoGawain: validate inputs to add_attrib
Mike Erwin [Sat, 8 Oct 2016 20:58:06 +0000 (16:58 -0400)]
Gawain: validate inputs to add_attrib

Should help prevent errors when building vertex formats.

4 years agoAmmend to rB00dc0666b3fe: forgot to fix boid->ground of first particle.
Bastien Montagne [Sat, 8 Oct 2016 17:13:50 +0000 (19:13 +0200)]
Ammend to rB00dc0666b3fe: forgot to fix boid->ground of first particle.

This code is confusing, such dirty details should not sneak out of
particles' own private code. :(

4 years agoFix T49608: runtime-only particle's boid->ground Object pointer was left dangling...
Bastien Montagne [Sat, 8 Oct 2016 13:18:35 +0000 (15:18 +0200)]
Fix T49608: runtime-only particle's boid->ground Object pointer was left dangling to invalid value in read code...

4 years agoFix a few compile errors with C++11 on macOS.
Brecht Van Lommel [Wed, 14 Sep 2016 09:41:20 +0000 (11:41 +0200)]
Fix a few compile errors with C++11 on macOS.

4 years agoBLI_task: fix case were some pool could work in more threads than allowed.
Bastien Montagne [Sat, 8 Oct 2016 12:46:01 +0000 (14:46 +0200)]
BLI_task: fix case were some pool could work in more threads than allowed.

We were checking for number of tasks from given pool already active, and
then atomically increasing it if allowed - this is not correct, number
could be increased by another thread between check and atomic op!

Atomic primitives are nice, but you must be very careful with *how* you
use them... Now we atomically increase counter, check result, and if we
end up over max value, abort and decrease counter again.

Spotted by Sergey, thanks!

4 years agoOpenGL: fix smooth point fringe
Mike Erwin [Sat, 8 Oct 2016 07:34:05 +0000 (03:34 -0400)]
OpenGL: fix smooth point fringe

Smooth edge was fading to transparent black instead of transparent color. My bad.

4 years agoOpenGL: draw f-curve points and handles with new imm mode
Mike Erwin [Sat, 8 Oct 2016 07:27:02 +0000 (03:27 -0400)]
OpenGL: draw f-curve points and handles with new imm mode

Got rid of GLU and some matrix manipulation. Everything is shader driven now, drawn with point sprites.

Still plenty to do in this file...

Part of T49042 and T49043

4 years agoOpenGL: shaders for smooth round points
Mike Erwin [Sat, 8 Oct 2016 07:10:59 +0000 (03:10 -0400)]
OpenGL: shaders for smooth round points

Solid color with an optional outline.

size (diameter) and outlineWidth are in pixels.

4 years agoGawain: allow immBeginAtMost, immEnd with no vertices
Mike Erwin [Sat, 8 Oct 2016 01:09:03 +0000 (21:09 -0400)]
Gawain: allow immBeginAtMost, immEnd with no vertices

The whole point of BeginAtMost is to avoid counting before drawing. Sometimes the uncounted count is zero, and that's ok!

4 years agodraw region emboss with new immediate mode
Mike Erwin [Sat, 8 Oct 2016 03:44:54 +0000 (23:44 -0400)]
draw region emboss with new immediate mode

Simple convert of drawing emboss lines to new immediate mode.

Part of T49043

Reviewers: merwin

Reviewed By: merwin

Subscribers: dfelinto

Tags: #bf_blender_2.8

Differential Revision:

4 years agoGawain: code cleanup & inline docs
Mike Erwin [Fri, 7 Oct 2016 22:51:42 +0000 (18:51 -0400)]
Gawain: code cleanup & inline docs

Made function categories more clear & added more notes about how to use this API.

immEndVertex is no longer part of the public API.

Minor cleanup & organizing of recent additions.

4 years agoBlender 2.8: OpenGL: replace old GL with the new immediate API in UI_draw_roundbox_gl...
Mike Erwin [Fri, 7 Oct 2016 18:56:08 +0000 (14:56 -0400)]
Blender 2.8: OpenGL: replace old GL with the new immediate API in UI_draw_roundbox_gl_mode

I change UI_draw_roundbox_gl_mode to use immediate API.
The rest of the change is the call to the function.
I also make some change in UI_ThemeColor4(int colorid) for eg to make convenience to use.
I would really like to know if it's the good way to do, if yes I will make all the change in the node_daw.c after, else say me what's wrong and how to deal with color else.

Reviewers: merwin, dfelinto, Severin

Reviewed By: merwin

Subscribers: fablefox, Severin

Tags: #bf_blender_2.8, #opengl_gfx

Maniphest Tasks: T49043

Differential Revision:

4 years agoCollision: skip expensive BVH update if the collider doesn't move.
Alexander Gavrilov [Fri, 7 Oct 2016 10:27:11 +0000 (13:27 +0300)]
Collision: skip expensive BVH update if the collider doesn't move.

Since the collision modifier cannot be disabled, it causes a constant
hit on the viewport animation playback FPS. Most of this overhead can
be automatically removed in the case when the collider is static.

The updates are only skipped when the collider was stationary during
the preceding update as well, so the state is stored in a field.
Knowing that the collider is static can also be used to disable similar
BVH updates for substeps in the actual cloth simulation code.

Differential Revision:

4 years agofix grid floor drawing assert
Mike Erwin [Fri, 7 Oct 2016 17:00:23 +0000 (13:00 -0400)]
fix grid floor drawing assert

@dfelinto reported crash when setting grid subdivisions too low.

Code was setting color twice and Gawain was catching this. Fix is to only set regular grid color when we have regular grid lines to draw.  Then emphasized grid lines are free to set their own color further down.

4 years agoCycles: Fix OpenCL split kernel compilation after recent CUDA 8 performance fix
Lukas Stockner [Fri, 7 Oct 2016 16:50:43 +0000 (18:50 +0200)]
Cycles: Fix OpenCL split kernel compilation after recent CUDA 8 performance fix

4 years agoOpenGL render: Limit number of scheduled frames for write
Sergey Sharybin [Fri, 7 Oct 2016 15:46:13 +0000 (17:46 +0200)]
OpenGL render: Limit number of scheduled frames for write

Previously if the rendering is much faster than saving (for example,
when transcoding stuff via VSE) it was possible to have 100s of frames
in memory.

This isn't ideal because of limited amount of RAM, so need to have
some sort of limit. This is exactly what is implemented in this commit.

4 years agoOpenGL render: Fix non-deterministic order of frame writes for movies
Sergey Sharybin [Fri, 7 Oct 2016 15:12:27 +0000 (17:12 +0200)]
OpenGL render: Fix non-deterministic order of frame writes for movies

By the design of task scheduler it was possible that tasks from somewhere
in the middle of scheduled list will be handled first.

For example, one thread might be iterating over the scheduled list and
ignore tasks because there is other thread is working on task from the
same pool. However, if that other thread finishes task before iteration
is over current thread will pick up task from somewhere in in the middle
of the list.

This isn't a problem in general case, but for movie rendering we do need
to have strict order of frames.

4 years agoCustom Manipulators Core Backend
Julian Eisel [Fri, 7 Oct 2016 14:34:55 +0000 (16:34 +0200)]
Custom Manipulators Core Backend

This commit lands the core backend of the Custom Manipulators project onto the blender2.8 branch. It is a generic backend for managinig interactive on-screen controls that can be integrated into any 2D or 3D edito. It's also already integrated into the window-manager and editor code where needed.

NOTE: The changes here should not be visible for users at all. It's really just a back-end patch. Neither does this include any RNA or Python integration.

Of course, there's still lots of work ahead for custom manipulators, but this is a big milestone. WIP code that actually uses this backend can be found in the 'custom-manipulators' branch (previously called 'wiggly-widgets').

The work here isn't completely my own, all the initial work was done by @Antony Riakiotakis (psy-fi) and - although it has changed a lot since them - it's still the same in essence. He definitely deserves a big credit! Some changes in this patch were also done by @Campbell Barton (campbellbarton). Thank you guys!

Merge accepted by @brecht and @merwin.
Code documentation:
Main task:
More info:

4 years agoOpenGL: Don't write frames when rendering was canceled
Sergey Sharybin [Fri, 7 Oct 2016 14:51:19 +0000 (16:51 +0200)]
OpenGL: Don't write frames when rendering was canceled

4 years agoCleanup: Use more clear name for where allocation is coming from
Sergey Sharybin [Fri, 7 Oct 2016 14:06:24 +0000 (16:06 +0200)]
Cleanup: Use more clear name for where allocation is coming from

4 years agoOpenGL: Do not schedule new frames for write if error happens
Sergey Sharybin [Fri, 7 Oct 2016 14:05:51 +0000 (16:05 +0200)]
OpenGL: Do not schedule new frames for write if error happens

Also do not attempt to write any already scheduled frames.

4 years agoMerge branch 'master' into blender2.8
Julian Eisel [Fri, 7 Oct 2016 13:14:49 +0000 (15:14 +0200)]
Merge branch 'master' into blender2.8

4 years agoProxied → Proxified
Sybren A. Stüvel [Fri, 7 Oct 2016 11:33:43 +0000 (13:33 +0200)]
Proxied → Proxified

4 years agoRe-establish link to proxies when they are made local after appending.
Sybren A. Stüvel [Thu, 6 Oct 2016 14:52:13 +0000 (16:52 +0200)]
Re-establish link to proxies when they are made local after appending.

This allows appending of an entire scene from another blend file into
this one, even when that blend file contains proxified armatures.

Since the proxified object needs to be linked (not local), this will
only work when the "Localize all" checkbox is disabled. The appended
proxy object should also not be referenced from anything in a library
(for example in a constraint). Referencing it from the appended data
should be fine.

Fixes T49495.

4 years agoMerge branch 'master' into blender2.8
Bastien Montagne [Fri, 7 Oct 2016 09:50:17 +0000 (11:50 +0200)]
Merge branch 'master' into blender2.8

4 years agoDatablock management: remove 'proxy_from' pointer from 'is ID used' checks.
Bastien Montagne [Fri, 7 Oct 2016 08:20:40 +0000 (10:20 +0200)]
Datablock management: remove 'proxy_from' pointer from 'is ID used' checks.

Pretty much same reason as for the 'from' pointer of shapekeys - runtime
data creating loops and 'ghost' dependencies between datablocks.

We need to handle them in cases like remapping, but whall not take them
into account to check dependencies between datablocks... :/

4 years agoFix T49595: bpy - negative skin_vertices radius crashes Blender
Bastien Montagne [Fri, 7 Oct 2016 08:19:22 +0000 (10:19 +0200)]
Fix T49595: bpy - negative skin_vertices radius crashes Blender

This is unsigned value (negative radius does not have much sense anyway!).

4 years agoOpenGL/gpencil: delete unused utility functions
Mike Erwin [Fri, 7 Oct 2016 07:17:23 +0000 (03:17 -0400)]
OpenGL/gpencil: delete unused utility functions

Part of T49043  -- done with this file!

4 years agoOpenGL: draw gpencil fill with new imm mode
Mike Erwin [Fri, 7 Oct 2016 07:04:34 +0000 (03:04 -0400)]
OpenGL: draw gpencil fill with new imm mode

Part of T49043

4 years agoOpenGL: draw 2D gpencil strokes with new imm mode
Mike Erwin [Fri, 7 Oct 2016 04:56:28 +0000 (00:56 -0400)]
OpenGL: draw 2D gpencil strokes with new imm mode

Part of T49043

4 years agoOpenGL: draw 3D gpencil strokes with new imm mode
Mike Erwin [Fri, 7 Oct 2016 04:06:20 +0000 (00:06 -0400)]
OpenGL: draw 3D gpencil strokes with new imm mode

Part of T49043