blender.git
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 agoinstall_deps.sh: 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)]
install_deps.sh: remove libglewmx from deb for now, the package is broken in deb testing...

4 years agoinstall_deps.sh: first attempt to support cxx11.
Bastien Montagne [Mon, 10 Oct 2016 17:17:43 +0000 (19:17 +0200)]
install_deps.sh: 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
    libraries.
  - 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

Conflicts:
source/blender/blenloader/intern/readfile.c
source/blender/editors/space_view3d/view3d_draw.c

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: https://developer.blender.org/D2281

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: https://developer.blender.org/D2231

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: https://developer.blender.org/D2283

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: https://developer.blender.org/D2271

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: https://developer.blender.org/D2274

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: https://developer.blender.org/D2277

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.
Patch: https://developer.blender.org/D2232
Code documentation: https://wiki.blender.org/index.php/Dev:2.8/Source/Custom_Manipulator
Main task: https://developer.blender.org/T47343
More info: https://code.blender.org/2015/09/the-custom-manipulator-project-widget-project/

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

4 years agoOpenGL: fix shader input typo
Mike Erwin [Fri, 7 Oct 2016 04:00:12 +0000 (00:00 -0400)]
OpenGL: fix shader input typo

4 years agogpencil: disable / remove some legacy drawing
Mike Erwin [Fri, 7 Oct 2016 02:04:59 +0000 (22:04 -0400)]
gpencil: disable / remove some legacy drawing

Want to avoid updating code we no longer use anyway.

Comments for areas to investigate or deadlines for deletion.

also some minor bool cleanup

Part of T49165

4 years agoAvoid possible compatibility issues with tmp viewport flags
Julian Eisel [Fri, 7 Oct 2016 01:33:50 +0000 (03:33 +0200)]
Avoid possible compatibility issues with tmp viewport flags

We can't prevent users from using this branch, so I'd say it's reasonable to be a bit careful about what we store to files. In this concrete case we were storing a bit-flag for temporary use (only during early viewport transition) in a bit-field that's saved in files. Doing so would mean we either can't reuse this bit later or we risk breaking files (admittedly, likely in a pretty minor way). Moved the bit-flag to a new bit-field which can be removed later.

4 years agoViewport: support for external render engines (e.g., Cycles) with depth
Dalai Felinto [Fri, 7 Oct 2016 01:45:28 +0000 (01:45 +0000)]
Viewport: support for external render engines (e.g., Cycles) with depth

(it is still a rough approach, but you can already see Cycles with Floor (when using board render or full render)

4 years agoViewport: floor cleanup
Dalai Felinto [Thu, 6 Oct 2016 23:40:48 +0000 (23:40 +0000)]
Viewport: floor cleanup

4 years agoViewport: draw floor routine should not use GL_ALWAYS for depth
Dalai Felinto [Thu, 6 Oct 2016 22:21:12 +0000 (22:21 +0000)]
Viewport: draw floor routine should not use GL_ALWAYS for depth

(talked with merwin about that, and he agrees on it, we are not supposed to write to the scene depth buffer
but we should read its depth)

4 years agoMove panel for new viewport up
Julian Eisel [Fri, 7 Oct 2016 01:22:48 +0000 (03:22 +0200)]
Move panel for new viewport up

Makes it easier to enable it and avoids jumping of the panel when activating/deactivating it (because some panels disappear then). Also changed how panel title is drawn to make it behave like other panels.

4 years agoUse theme color for clearing viewport background
Julian Eisel [Fri, 7 Oct 2016 01:09:21 +0000 (03:09 +0200)]
Use theme color for clearing viewport background

We'll obviously do more fancy stuff here later, but we don't have to look at pure blackness either ;)

4 years agoOpenGL/GPencil: draw stroke-in-progress with new imm mode
Mike Erwin [Fri, 7 Oct 2016 00:51:05 +0000 (20:51 -0400)]
OpenGL/GPencil: draw stroke-in-progress with new imm mode

We should revisit this later and use geometry shader to draw one continuous tapered stroke.

Part of T49043

4 years agoGawain: allow strips of 1 line, fans of 1 triangle
Mike Erwin [Fri, 7 Oct 2016 00:05:06 +0000 (20:05 -0400)]
Gawain: allow strips of 1 line, fans of 1 triangle

My initial tests were stricter than necessary, and blocked some valid uses. Fixed!

4 years agocleanup: C99, const, blank lines
Mike Erwin [Thu, 6 Oct 2016 23:13:49 +0000 (19:13 -0400)]
cleanup: C99,  const, blank lines

4 years agoMerge branch 'master' into blender2.8
Julian Eisel [Thu, 6 Oct 2016 22:22:21 +0000 (00:22 +0200)]
Merge branch 'master' into blender2.8

4 years agoOpenGL: modernize gp_draw_strokes_edit
Mike Erwin [Thu, 6 Oct 2016 21:40:12 +0000 (17:40 -0400)]
OpenGL: modernize gp_draw_strokes_edit

Single draw call per stroke!

Part of T49043

4 years agoFix wrong separator line width after drawing vec icon
Julian Eisel [Thu, 6 Oct 2016 20:44:15 +0000 (22:44 +0200)]
Fix wrong separator line width after drawing vec icon

Was visible in Dynamic Context Menu add-on.

4 years agoViewport: bring grid over to the new viewport
Dalai Felinto [Thu, 6 Oct 2016 19:55:06 +0000 (19:55 +0000)]
Viewport: bring grid over to the new viewport

We will keep the old system working as long as we can. At the moment even the visibility flags we are getting from the old system. That will continue like this until we have decided on the new UI

4 years agoViewport: Starting to port over the principles of the draw flux into placeholder...
Dalai Felinto [Thu, 6 Oct 2016 14:14:41 +0000 (14:14 +0000)]
Viewport: Starting to port over the principles of the draw flux into placeholder functions

A lot of the work still have to done on space_view3d.c for initialize the data and buffers properly, but it is a start

4 years agoOpenGL: another built-in shader for 2D points
Mike Erwin [Thu, 6 Oct 2016 20:31:49 +0000 (16:31 -0400)]
OpenGL: another built-in shader for 2D points

GPU_SHADER_2D_POINT_VARYING_SIZE_VARYING_COLOR

4 years agoGPencil: Fix interpolate stroke keymap conflict with sculpt
Antonioya [Thu, 6 Oct 2016 20:21:10 +0000 (22:21 +0200)]
GPencil: Fix interpolate stroke keymap conflict with sculpt

The initial idea was to use Ctrl+E to interpolate stroke because this is
similar to Pose breakdown, but the Ctrl+E keymap is used to inverse
grease pencil sculpt effect.

The new keymap is Ctrl+Alt+E in order to fix the conflict

4 years agoOpenGL: convert gp_draw_stroke_point to new immediate mode
Mike Erwin [Thu, 6 Oct 2016 18:40:47 +0000 (14:40 -0400)]
OpenGL: convert gp_draw_stroke_point to new immediate mode

and constify some static utility functions

Note: 2D shader will ignore position's z value, but making pos a vec3 lets us unify code in this function.

4 years agoOpenGL: more built-in GPU_SHADERs for points
Mike Erwin [Thu, 6 Oct 2016 18:20:20 +0000 (14:20 -0400)]
OpenGL: more built-in GPU_SHADERs for points

No new GLSL shaders were needed! Just combined existing vertex & fragment shaders in new ways.

4 years agoOpenGL: modernize more volumetric gpencil drawing
Mike Erwin [Thu, 6 Oct 2016 16:45:04 +0000 (12:45 -0400)]
OpenGL: modernize more volumetric gpencil drawing

Main goal is to get rid of GLU.

Part of T49042, touches on T49043 and T49450

4 years agoGawain: more ways to set uniform color
Mike Erwin [Thu, 6 Oct 2016 13:37:04 +0000 (09:37 -0400)]
Gawain: more ways to set uniform color

4 years agoFix T49523: very slow normal map tangent computation for rendering in 2.78.
Brecht Van Lommel [Thu, 6 Oct 2016 01:09:46 +0000 (03:09 +0200)]
Fix T49523: very slow normal map tangent computation for rendering in 2.78.

4 years agodraw gpencil erase cursor with new imm mode
Mike Erwin [Wed, 5 Oct 2016 18:05:55 +0000 (14:05 -0400)]
draw gpencil erase cursor with new imm mode

Part of T49043 and T49450.

4 years agodraw gpencil sculpt cursor with new imm mode
Mike Erwin [Wed, 5 Oct 2016 17:45:28 +0000 (13:45 -0400)]
draw gpencil sculpt cursor with new imm mode

Part of T49043 and T49450.

4 years agoGawain: more ways to set uniform color
Mike Erwin [Wed, 5 Oct 2016 17:12:18 +0000 (13:12 -0400)]
Gawain: more ways to set uniform color

4 years agoFix T49501: Animations imported via alembic render with wrong or no motion blur
Sergey Sharybin [Wed, 5 Oct 2016 10:37:09 +0000 (12:37 +0200)]
Fix T49501: Animations imported via alembic render with wrong or no motion blur

4 years agoBarebones for viewport code apart from 2.7x drawing code
Dalai Felinto [Tue, 4 Oct 2016 20:00:46 +0000 (20:00 +0000)]
Barebones for viewport code apart from 2.7x drawing code

A new option (set in the properties region) allows the user to pick the
"new viewport" for the rendering  (in the UI: Modern Viewport).

For now we have a semi-blank file (view3d_draw.c) that can starts to take
over the drawing pipeline.

I can't guarantee we will be able to keep both drawing systems working
through the entire 2.8 development, but it should do for now.

also, we can use branches for some of the viewport development, but it's
better to keep things in 2.8 whenever we can, so people can test it.

4 years ago[msvc] make.bat, no need to set the cuda path at all, cmake will figure it out on...
lazydodo [Tue, 4 Oct 2016 19:30:38 +0000 (13:30 -0600)]
[msvc] make.bat, no need to set the cuda path at all, cmake will figure it out on it's own.

4 years ago[msvc] make.bat remove mixed cuda 7.5/8.0 build for release since all kernels can...
lazydodo [Tue, 4 Oct 2016 17:51:04 +0000 (11:51 -0600)]
[msvc] make.bat remove mixed cuda 7.5/8.0 build for release since all kernels can now be properly build with 8.0

4 years agoCleanup: Update links to online py API doc, and remove old commented stuff.
Bastien Montagne [Tue, 4 Oct 2016 14:44:24 +0000 (16:44 +0200)]
Cleanup: Update links to online py API doc, and remove old commented stuff.

4 years agoFix T49553: Blender 2.78 crashes when File->Data Previews ->Refresh Datablock Previews
Bastien Montagne [Tue, 4 Oct 2016 13:03:34 +0000 (15:03 +0200)]
Fix T49553: Blender 2.78 crashes when File->Data Previews ->Refresh Datablock Previews

New recursive iteration over IDs in BKE_library_foreach_ID_link() was
broken by the infamous nodetree case. We cannot really recusively call
this function in that case, so better to deffer handling of
non-datablock NodeTrees as if real IDs here.

Also fixed initial ID not being stored as handled, in rare cases this
could also lead to infinite looping.

To be backported to 2.78a.

4 years agofix Linux build
Mike Erwin [Tue, 4 Oct 2016 05:31:24 +0000 (01:31 -0400)]
fix Linux build

My mistake. Breakage reported by @mont29

4 years agoGawain: fix bug in immUniformColor4ubv
Mike Erwin [Tue, 4 Oct 2016 05:24:33 +0000 (01:24 -0400)]
Gawain: fix bug in immUniformColor4ubv

Reported by @kgeogeo

4 years agoMerge remote-tracking branch 'origin/master' into blender2.8
Dalai Felinto [Mon, 3 Oct 2016 20:54:22 +0000 (20:54 +0000)]
Merge remote-tracking branch 'origin/master' into blender2.8

4 years agoCycles CUDA: make CUDA 8.0 the officially supported version for all platforms.
Brecht Van Lommel [Mon, 3 Oct 2016 20:14:43 +0000 (22:14 +0200)]
Cycles CUDA: make CUDA 8.0 the officially supported version for all platforms.

4 years agoFix Cycles CUDA performance on CUDA 8.0.
Brecht Van Lommel [Sun, 2 Oct 2016 12:48:39 +0000 (14:48 +0200)]
Fix Cycles CUDA performance on CUDA 8.0.

Mostly this is making inlining match CUDA 7.5 in a few performance critical
places. The end result is that performance is now better than before, possibly
due to less register spilling or other CUDA 8.0 compiler improvements.

On benchmarks scenes, there are 3% to 35% render time reductions. Stack memory
usage is reduced a little too.

Reviewed By: sergey

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

4 years agoFix fluid sim build error with MSVC.
Brecht Van Lommel [Mon, 3 Oct 2016 20:07:13 +0000 (22:07 +0200)]
Fix fluid sim build error with MSVC.

4 years agoMerge branch 'master' into blender2.8
Bastien Montagne [Mon, 3 Oct 2016 18:48:00 +0000 (20:48 +0200)]
Merge branch 'master' into blender2.8

4 years agoFix memory leak caused by unknown opeartor of keymap item
Julian Eisel [Mon, 3 Oct 2016 15:52:46 +0000 (17:52 +0200)]
Fix memory leak caused by unknown opeartor of keymap item

4 years agoFix T49548: Entering Cycles Rendered Viewport Unlinks Material from Objects.
Bastien Montagne [Mon, 3 Oct 2016 15:38:14 +0000 (17:38 +0200)]
Fix T49548: Entering Cycles Rendered Viewport Unlinks Material from Objects.

We *always* want to increase mat user count when from Object (and not
Data), because in that case we are moving mat from object to temp
generated mesh, material can never be 'borrowed' in that case.

To be backported to 2.78a

4 years agoFix missing operator-type registration
Julian Eisel [Mon, 3 Oct 2016 14:34:51 +0000 (16:34 +0200)]
Fix missing operator-type registration

Removed in a7dbc0704f217a, but only should've removed default keymap entry.

4 years agoFix T49506: Remove unused File Browser theme settings
Julian Eisel [Mon, 3 Oct 2016 11:26:52 +0000 (13:26 +0200)]
Fix T49506: Remove unused File Browser theme settings

If I didn't miss anything these are indeed not used. Old themes should still work (will only print info on redundant theme defines into console), but updated non-contrib themes already.

4 years agoFix missing new eyedropper keymap entry in keyconfig_utils.py
Bastien Montagne [Mon, 3 Oct 2016 10:29:18 +0000 (12:29 +0200)]
Fix missing new eyedropper keymap entry in keyconfig_utils.py

Missing from rBe9bcdcdbbd91d9.

4 years ago[Windows/Cycles/Clang] Fix compilation error with clang-cl on windows
lazydodo [Sun, 2 Oct 2016 20:01:23 +0000 (14:01 -0600)]
[Windows/Cycles/Clang] Fix compilation error with clang-cl on windows

4 years agoFix compile errors with Alembic.
Kévin Dietrich [Sun, 2 Oct 2016 18:52:25 +0000 (20:52 +0200)]
Fix compile errors with Alembic.

4 years agoMerge branch 'master' into blender2.8
Bastien Montagne [Sun, 2 Oct 2016 16:53:01 +0000 (18:53 +0200)]
Merge branch 'master' into blender2.8