3 years agoMerge branch 'master' into blender2.8
Bastien Montagne [Thu, 11 Jan 2018 13:35:36 +0000 (14:35 +0100)]
Merge branch 'master' into blender2.8


3 years agoFix critical issue with our DNA ID tags (two totally different tags having same value).
Bastien Montagne [Thu, 11 Jan 2018 13:26:44 +0000 (14:26 +0100)]
Fix critical issue with our DNA ID tags (two totally different tags having same value).

Nice typo from rBc4046e9082f6, tssk. ;)

3 years agoFix static override (very stupid mistakes in code!)
Bastien Montagne [Thu, 11 Jan 2018 11:29:09 +0000 (12:29 +0100)]
Fix static override (very stupid mistakes in code!)

3 years agoFurther fixes to new RNA props diff code.
Bastien Montagne [Thu, 11 Jan 2018 08:38:27 +0000 (09:38 +0100)]
Further fixes to new RNA props diff code.

Unfortunately, we cannot perform set/unset checks on 'resolved'
properties (i.e. from actual IDProperties pointers, and not virtual RNA
placeholders)... IDProps in RNA are rather challenging topic. :|

This should fully fix T53715: 2.8: Removing keymap items no longer works

3 years agoFix T53311: transform edge/normal orientation
Campbell Barton [Thu, 11 Jan 2018 08:09:45 +0000 (19:09 +1100)]
Fix T53311: transform edge/normal orientation

When the edge is aligned with it's own normals,
transform orientation wasn't aligned with the edge.

3 years agoFix T53755: Cycles OpenCL lamp shaders have incorrect normal.
Brecht Van Lommel [Thu, 11 Jan 2018 07:42:57 +0000 (08:42 +0100)]
Fix T53755: Cycles OpenCL lamp shaders have incorrect normal.

3 years agoUI: option not to show screen splitting widgets
Campbell Barton [Thu, 11 Jan 2018 05:08:55 +0000 (16:08 +1100)]
UI: option not to show screen splitting widgets

Request for simplified Blender template,
this may be extended to limit access to other UI changes
that could be pressed by accident.

3 years agoMerge branch 'master' into blender2.8
Campbell Barton [Thu, 11 Jan 2018 02:24:41 +0000 (13:24 +1100)]
Merge branch 'master' into blender2.8

3 years agoUI: don't draw outline when it's not calculated
Campbell Barton [Thu, 11 Jan 2018 02:20:08 +0000 (13:20 +1100)]
UI: don't draw outline when it's not calculated

Outline drawing was running even when there were no verts to draw.
Causes an assert in 2.8.

3 years agoCycles: support animated object scale in motion blur.
Stefan Werner [Sat, 2 Dec 2017 02:28:13 +0000 (03:28 +0100)]
Cycles: support animated object scale in motion blur.

This was disabled previously due to CUDA compiler bugs, see T32900.

Differential Revision:

3 years agoFix T53455: Object disappear w/ TrackTo constraint
Campbell Barton [Wed, 10 Jan 2018 23:57:30 +0000 (10:57 +1100)]
Fix T53455: Object disappear w/ TrackTo constraint

Regression caused by own commit 16fbb47c886,
this is really an edge case though since calling normalize twice fixes.

3 years agoFix T53752: Draw curve fails w/ stylus
Philipp Oeser [Wed, 10 Jan 2018 23:22:08 +0000 (10:22 +1100)]
Fix T53752: Draw curve fails w/ stylus

3 years agoMerge branch 'master' into blender2.8
Campbell Barton [Wed, 10 Jan 2018 23:14:34 +0000 (10:14 +1100)]
Merge branch 'master' into blender2.8

3 years agoCleanup: BKE naming conventions for datablock add/localize
Campbell Barton [Wed, 10 Jan 2018 22:55:41 +0000 (09:55 +1100)]
Cleanup: BKE naming conventions for datablock add/localize

Conventions were already followed nearly everywhere.

3 years agoFix Windows compiler warning using WITH_CYCLES_NATIVE_ONLY.
Brecht Van Lommel [Tue, 9 Jan 2018 21:50:48 +0000 (22:50 +0100)]
Fix Windows compiler warning using WITH_CYCLES_NATIVE_ONLY.

3 years agoFix issue with moving CUDA memory to host and multiple devices.
Brecht Van Lommel [Tue, 9 Jan 2018 17:37:46 +0000 (18:37 +0100)]
Fix issue with moving CUDA memory to host and multiple devices.

This is not expected to fix all issues. Also adds some more details
to error reporting to investigate failures.

3 years agoFix T53692: OpenCL multi GPU rendering not using all GPUs.
Brecht Van Lommel [Thu, 4 Jan 2018 22:29:06 +0000 (23:29 +0100)]
Fix T53692: OpenCL multi GPU rendering not using all GPUs.

Ensure each OpenCL device has a unique ID even if the hardware ID is not
unique for some reason.

3 years agoCleanup: Naming, avoid passing bContext to low-level function, etc
Julian Eisel [Wed, 10 Jan 2018 22:02:10 +0000 (23:02 +0100)]
Cleanup: Naming, avoid passing bContext to low-level function, etc

3 years agoFix crash when deleting collections
Julian Eisel [Wed, 10 Jan 2018 21:45:44 +0000 (22:45 +0100)]
Fix crash when deleting collections

With factory settings, steps to reproduce were:
* Select "Collection 1" (in "RenderLayer")
* Delete
It might crash at this point, although maybe this crash is ASAN only.

However, this was also doing some weird things that I've corrected now. It
called outliner_build_tree in an operator callback. This should only be
called in the main redraw function or so, not in regular handlers.
Instead, we manually cleanup the tree to keep it valid.

3 years agoSubsurf: Loop array should not be called mv
Sergey Sharybin [Wed, 10 Jan 2018 13:58:49 +0000 (14:58 +0100)]
Subsurf: Loop array should not be called mv

mv is a mesh vertex, not loop.

3 years agoSubsurf: Remove increment of unused variable
Sergey Sharybin [Wed, 10 Jan 2018 13:58:09 +0000 (14:58 +0100)]
Subsurf: Remove increment of unused variable

3 years agoFix compilation error
Sergey Sharybin [Wed, 10 Jan 2018 13:15:04 +0000 (14:15 +0100)]
Fix compilation error

Seems of new padding were added in 2.8 branch.

3 years agoMerge branch 'master' into blender2.8
Sergey Sharybin [Wed, 10 Jan 2018 12:22:03 +0000 (13:22 +0100)]
Merge branch 'master' into blender2.8

3 years agoFix wrong data type used for undo memory limit
Sergey Sharybin [Wed, 10 Jan 2018 12:20:36 +0000 (13:20 +0100)]
Fix wrong data type used for undo memory limit

3 years agoTask scheduler: Use const qualifier in callbacks for parallel range
Sergey Sharybin [Wed, 10 Jan 2018 11:53:59 +0000 (12:53 +0100)]
Task scheduler: Use const qualifier in callbacks for parallel range

3 years agoTask scheduler: Use restrict pointer qualifier
Sergey Sharybin [Wed, 10 Jan 2018 11:49:51 +0000 (12:49 +0100)]
Task scheduler: Use restrict pointer qualifier

Those pointers are never to be aliased, so let's be explicit about this and hope
compiler does save some CPU ticks.

3 years agoTask scheduler: Use more const qualifiers
Sergey Sharybin [Wed, 10 Jan 2018 11:27:43 +0000 (12:27 +0100)]
Task scheduler: Use more const qualifiers

3 years agoRNA: Increase memory limit settings to their possible max on platform
Sergey Sharybin [Thu, 21 Dec 2017 10:07:59 +0000 (11:07 +0100)]
RNA: Increase memory limit settings to their possible max on platform

This is quite common to have 64GB memory now, and even 128. There is no reason
to add any artificial caps on the cache and undo memory here. We can not protect
against using too much memory in one cases and allow use of full computer
potential in others.

Now 32 bit will use 2GB max (as it used to be), but 64bit will use whatever
number of megabytes fits into integer.

Reviewers: campbellbarton, mont29

Subscribers: sebastian_k

Differential Revision:

3 years agomath utils: Add size_t version of min and max functions
Sergey Sharybin [Thu, 21 Dec 2017 09:39:15 +0000 (10:39 +0100)]
math utils: Add size_t version of min and max functions

3 years agoFix color for manipulator drawing
Campbell Barton [Wed, 10 Jan 2018 09:50:14 +0000 (20:50 +1100)]
Fix color for manipulator drawing

Was drawing black after the first draw call.
For now set the shader before each draw call,
noted as TODO to investigate a nicer way to handle.

3 years agoMerge branch 'master' into blender2.8
Campbell Barton [Wed, 10 Jan 2018 08:58:05 +0000 (19:58 +1100)]
Merge branch 'master' into blender2.8

3 years agoCleanup: comment block alignment
Campbell Barton [Wed, 10 Jan 2018 08:57:02 +0000 (19:57 +1100)]
Cleanup: comment block alignment

3 years agoAlternate fix for brush user count
Campbell Barton [Wed, 10 Jan 2018 08:34:34 +0000 (19:34 +1100)]
Alternate fix for brush user count

This reverts change to BKE_brush_add,
callers now remove the extra user.

Note this isn't very convenient for callers but
is consistent with other ID types.

In the future we will probably remove this and have new
ID's created with zero users.

3 years agoCorrection to brush user commit
Campbell Barton [Wed, 10 Jan 2018 07:31:54 +0000 (18:31 +1100)]
Correction to brush user commit

RNA API was compensating for the extra user.

3 years agoFix background_job template
Campbell Barton [Wed, 10 Jan 2018 06:49:20 +0000 (17:49 +1100)]
Fix background_job template

Update attribute and use empty file operator

3 years agoFix brush user count
Campbell Barton [Wed, 10 Jan 2018 06:45:34 +0000 (17:45 +1100)]
Fix brush user count

New brushes had 2 users on adding.
Caused assert removing them after.

3 years agoMerge branch 'master' into blender2.8
Campbell Barton [Wed, 10 Jan 2018 02:57:26 +0000 (13:57 +1100)]
Merge branch 'master' into blender2.8

3 years agoDraw Manager: Edit Mode: Curve: uniforms were not being setted
Germano [Wed, 10 Jan 2018 02:40:02 +0000 (00:40 -0200)]
Draw Manager: Edit Mode: Curve: uniforms were not being setted

3 years agoFix T53748: uniform `globalsBlock` was not being added was not being added to the...
Germano [Wed, 10 Jan 2018 02:08:51 +0000 (00:08 -0200)]
Fix T53748: uniform `globalsBlock` was not being added was not being added to the shaders of the curves handles

3 years agoCorrect typos
Campbell Barton [Wed, 10 Jan 2018 01:43:29 +0000 (12:43 +1100)]
Correct typos

3 years agoFix T53491: Absolute tablet motion detection fails
Campbell Barton [Wed, 10 Jan 2018 01:25:20 +0000 (12:25 +1100)]
Fix T53491: Absolute tablet motion detection fails

When using a tablet, detecting absolute motion only worked
when activating a tool with the tablet.

Pressing Enter to run a tool for e.g. would use relative motion.

Now store is_motion_absolute in the event,
set for new events based on the most recent motion events.

3 years agofix t53701 minimal changes to get it working right
bjornmose [Wed, 10 Jan 2018 00:51:04 +0000 (01:51 +0100)]
fix t53701 minimal changes to get it working right

3 years agoCurve/Surface Display: UV support
mano-wii [Tue, 9 Jan 2018 23:06:10 +0000 (10:06 +1100)]
Curve/Surface Display: UV support

3 years agoFix (unreported) potential crash.
Bastien Montagne [Tue, 9 Jan 2018 18:51:50 +0000 (19:51 +0100)]
Fix (unreported) potential crash.

RNA_pointer_as_string could return NULL instead of a valid string in some cases.

3 years agoEevee: Fix AO in planar reflections.
Clément Foucault [Tue, 9 Jan 2018 18:01:24 +0000 (19:01 +0100)]
Eevee: Fix AO in planar reflections.

3 years agoEevee: Fix Planar probe refresh.
Clément Foucault [Tue, 9 Jan 2018 17:59:13 +0000 (18:59 +0100)]
Eevee: Fix Planar probe refresh.

3 years agoTask scheduler: Use single thread branch when range fits into single chunk
Sergey Sharybin [Tue, 9 Jan 2018 17:10:47 +0000 (18:10 +0100)]
Task scheduler: Use single thread branch when range fits into single chunk

3 years agoTask scheduler: Fix wrong tasks calculation when chunk size is too big
Sergey Sharybin [Tue, 9 Jan 2018 17:07:34 +0000 (18:07 +0100)]
Task scheduler: Fix wrong tasks calculation when chunk size is too big

3 years agoEevee: Support for dupli lamps without shadows.
Clément Foucault [Tue, 9 Jan 2018 17:01:56 +0000 (18:01 +0100)]
Eevee: Support for dupli lamps without shadows.

3 years agoEevee: Fix crash with volumetrics.
Clément Foucault [Tue, 9 Jan 2018 16:29:28 +0000 (17:29 +0100)]
Eevee: Fix crash with volumetrics.

3 years agoMerge branch 'master' into blender2.8
Sergey Sharybin [Tue, 9 Jan 2018 15:15:33 +0000 (16:15 +0100)]
Merge branch 'master' into blender2.8

3 years agoTask scheduler: Use const qualifiers in parallel range
Sergey Sharybin [Tue, 9 Jan 2018 09:47:01 +0000 (10:47 +0100)]
Task scheduler: Use const qualifiers in parallel range

3 years agoTask scheduler: Avoid over-allocation of tasks for parallel ranges
Sergey Sharybin [Mon, 8 Jan 2018 11:13:56 +0000 (12:13 +0100)]
Task scheduler: Avoid over-allocation of tasks for parallel ranges

This seems to only cause extra rthreading overhead on systems with 10s of
threads, without actually solving anything.

3 years agoTask scheduler: Add minimum number of iterations per thread in parallel range
Sergey Sharybin [Mon, 8 Jan 2018 11:08:18 +0000 (12:08 +0100)]
Task scheduler: Add minimum number of iterations per thread in parallel range

The idea is to support following: allow doing parallel for on a small range,
each iteration of which takes lots of compute power, but limit such range to
a subset of threads.

For example, on a machine with 44 threads we can occupy 4 threads to handle
range of 64 elements, 16 elements per thread, where each block of 16 elements
is very complex to compute.

The idea should be to use this setting instead of global use_threading flag,
which is only based on size of array. Proper use of the new flag will improve

This commit only contains internal task scheduler changes, this setting is not
used yet by any areas.

3 years agoTask scheduler: Simplify parallel range function
Sergey Sharybin [Mon, 8 Jan 2018 11:07:09 +0000 (12:07 +0100)]
Task scheduler: Simplify parallel range function

Basically, split it up and avoid extra abstraction level.

3 years agoTask scheduler: Use single parallel range function with more flexible function
Sergey Sharybin [Mon, 8 Jan 2018 10:35:48 +0000 (11:35 +0100)]
Task scheduler: Use single parallel range function with more flexible function

Now all the fine-tuning is happening using parallel range settings structure,
which avoid passing long lists of arguments, allows extend fine-tuning further,
avoid having lots of various functions which basically does the same thing.

3 years agoTask scheduler: Get rid of extended version of parallel range callback
Sergey Sharybin [Fri, 5 Jan 2018 15:33:13 +0000 (16:33 +0100)]
Task scheduler: Get rid of extended version of parallel range callback

Wrap all arguments into TLS type of argument. Avoids some branching and also
makes it easier to extend things in the future.

3 years agoSignificant step toward supporting IDProperties in new RNA diff code.
Bastien Montagne [Tue, 9 Jan 2018 14:52:34 +0000 (15:52 +0100)]
Significant step toward supporting IDProperties in new RNA diff code.

Still not fully working, more work TODO (IDProps are rather tedious to
handle in RNA... :/ ).

Partial fix of T53715: 2.8: Removing keymap items no longer works.
Some shortcuts can now be edited/deleted again, but some remain
mysteriously frozen!

3 years agoDRWInstanceData: Bump the max data size.
Clément Foucault [Tue, 9 Jan 2018 14:37:28 +0000 (15:37 +0100)]
DRWInstanceData: Bump the max data size.

3 years agoGawain: Fix codestyle.
Clément Foucault [Tue, 9 Jan 2018 14:37:00 +0000 (15:37 +0100)]
Gawain: Fix codestyle.

3 years agoDRW & GPUViewport: Cleanup unused code.
Clément Foucault [Tue, 9 Jan 2018 13:22:46 +0000 (14:22 +0100)]
DRW & GPUViewport: Cleanup unused code.

3 years agoDRW: Make use of DRWInstanceData.
Clément Foucault [Tue, 9 Jan 2018 13:21:55 +0000 (14:21 +0100)]
DRW: Make use of DRWInstanceData.

This modify the selection code quite a bit but it's for the better.
When using selection we use the same batching / instancing process but we draw each element at a time using a an offset to the first element we want to draw and by drawing only one element.
This result much less memory allocation and better draw time.

3 years agoDRW: Add instance data memory manager.
Clément Foucault [Tue, 9 Jan 2018 13:09:14 +0000 (14:09 +0100)]
DRW: Add instance data memory manager.

This is a special memory manager that keeps memory blocks ready to send as vbo data.
Since we loose which memory block was used each DRWShadingGroup we need to redistribute them in the same order/size to avoid to realloc each frame.
This is why DRWInstanceDatas are sorted in a list for each different data size.

3 years agoGawain: VBO: Add possibility to use external datablock.
Clément Foucault [Tue, 9 Jan 2018 12:37:52 +0000 (13:37 +0100)]
Gawain: VBO: Add possibility to use external datablock.

Adds the possibility to specify the data buffer directly and precise ownership.
By not passing ownership to gawain the memory block can be reused.

3 years agoGawain: Modify batch draw function to work with ranges.
Clément Foucault [Tue, 9 Jan 2018 12:37:28 +0000 (13:37 +0100)]
Gawain: Modify batch draw function to work with ranges.

This enables to draw the same vbo but only with a selected range. (useful for selection with instancing/batching)

3 years agoFix T53691: Motion Tracking Object Solver Constraint doesn't work as Bone Constraint
Sergey Sharybin [Tue, 9 Jan 2018 13:27:19 +0000 (14:27 +0100)]
Fix T53691: Motion Tracking Object Solver Constraint doesn't work as Bone Constraint

3 years agoDepsgraph: Move special handling of tracking constraints to a dedicated function
Sergey Sharybin [Tue, 9 Jan 2018 13:11:23 +0000 (14:11 +0100)]
Depsgraph: Move special handling of tracking constraints to a dedicated function

3 years agoDepsgraph: Perform early check on constraint info NULL
Sergey Sharybin [Tue, 9 Jan 2018 12:09:59 +0000 (13:09 +0100)]
Depsgraph: Perform early check on constraint info NULL

3 years agoMerge branch 'master' into blender2.8
Sergey Sharybin [Tue, 9 Jan 2018 11:52:13 +0000 (12:52 +0100)]
Merge branch 'master' into blender2.8

3 years agoCorrect error in last commit (versioning)
Campbell Barton [Tue, 9 Jan 2018 04:17:00 +0000 (15:17 +1100)]
Correct error in last commit (versioning)

3 years agoAdd deform axis for Simple Deform modifier
Campbell Barton [Tue, 9 Jan 2018 03:59:45 +0000 (14:59 +1100)]
Add deform axis for Simple Deform modifier

D2989 by @dmarra w/ own edits

3 years agoCurve Edit Mode: Use curve handle theme colors
mano-wii [Tue, 9 Jan 2018 02:29:16 +0000 (13:29 +1100)]
Curve Edit Mode: Use curve handle theme colors

3 years agoinstall_deps: Fix OCIO always re-cloning its whole git repository.
Bastien Montagne [Mon, 8 Jan 2018 15:33:56 +0000 (16:33 +0100)]
install_deps: Fix OCIO always re-cloning its whole git repository.

3 years agoNo groping in Blender's Tracker!
Sebastian Koenig [Mon, 8 Jan 2018 13:11:43 +0000 (14:11 +0100)]
No groping in Blender's Tracker!

This a small cleanup of something which I think is just a typo anyway.

With all the recent talks of harrassment and groping, I think we better avoid
that within our source code! :)

Reviewers: sergey

Reviewed By: sergey

Tags: #motion_tracking

Differential Revision:

3 years agoFix T53612: Blender crashes on CleanTracks with 'DELETE_SEGMENTS' and a disabled...
Sergey Sharybin [Mon, 8 Jan 2018 13:10:50 +0000 (14:10 +0100)]
Fix T53612: Blender crashes on CleanTracks with 'DELETE_SEGMENTS' and a disabled marker

Simple fix, which is totally safe for 2.79a!

3 years agoMerge branch 'master' into blender2.8
Bastien Montagne [Mon, 8 Jan 2018 08:39:32 +0000 (09:39 +0100)]
Merge branch 'master' into blender2.8

3 years agoFix T53509: Datablock ID Properties attached to bpy.types.Material are not loaded.
Bastien Montagne [Mon, 8 Jan 2018 08:37:56 +0000 (09:37 +0100)]
Fix T53509: Datablock ID Properties attached to bpy.types.Material are not loaded.

Stupid mistake in material reading code, thanks to Simon Wendsche (@BYOB) for the investigation and fix!

To be backported to 2.79a.

3 years agoFix T53713: User remap failed w/ texface images
Campbell Barton [Mon, 8 Jan 2018 05:58:58 +0000 (16:58 +1100)]
Fix T53713: User remap failed w/ texface images

3 years ago(Nodes) Display image name if any in the Image and Texture Image node title
Ines Almeida [Sun, 7 Jan 2018 21:29:25 +0000 (22:29 +0100)]
(Nodes) Display image name if any in the Image and Texture Image node title

3 years agoFix T47212: Luminance Key not working with HDR and out-of-gamut ranges.
Aaron Carlisle [Sat, 6 Jan 2018 15:23:58 +0000 (16:23 +0100)]
Fix T47212: Luminance Key not working with HDR and out-of-gamut ranges.

Differential Revision:

3 years agoFix T47212: incorrect luma coefficients for Luminance Key node.
Brecht Van Lommel [Sat, 6 Jan 2018 15:41:33 +0000 (16:41 +0100)]
Fix T47212: incorrect luma coefficients for Luminance Key node.

Differential Revision:

3 years agoFix T53650: remove hard limits on force field size and max distance.
Philipp Oeser [Sat, 6 Jan 2018 04:12:24 +0000 (05:12 +0100)]
Fix T53650: remove hard limits on force field size and max distance.

Differential Revision:

3 years agoOutliner: Rename "Master Collection Tree" to "Collections"
Dalai Felinto [Fri, 5 Jan 2018 21:17:38 +0000 (19:17 -0200)]
Outliner: Rename "Master Collection Tree" to "Collections"

This is part of T53495.

3 years agoOutliner: Support multiple-objects drag'n'drop into collections
Dalai Felinto [Fri, 5 Jan 2018 20:09:58 +0000 (18:09 -0200)]
Outliner: Support multiple-objects drag'n'drop into collections

We now can drag multiple objects at once in the outliner. You we restricted to
working within a single outliner. Be sure to drag from the objects name, not
from its icon (otherwise it will try to parent it).

We don't use the same drag'n'drop system as IDs here. Which although I dislike
allowed for this solution to be local, and not dependent on the entire
drag'n'drop system of Blender.

This is a feature Andy Goralczyk has requested a long time ago.
Kudos for him for his request.

3 years agoCleanup: DNA comment regarding ID for collections in outliner
Dalai Felinto [Fri, 5 Jan 2018 19:32:22 +0000 (17:32 -0200)]
Cleanup: DNA comment regarding ID for collections in outliner

3 years agoFix drag and drop in outliner for scene collections
Dalai Felinto [Fri, 5 Jan 2018 15:27:32 +0000 (13:27 -0200)]
Fix drag and drop in outliner for scene collections

This technically reverts 176698b2eb7f.

Drag and drop for scene collections requires id for its poll function. However
we were passing the collection as id pointer for outliner_add_element
(which is ok since the function doesn't require a real ID).

I couldn't reproduce the original issue tackled by the forementioned commit so
I'm going ahead and bringing drag and drop back for scene collections.

Note: We already pass the ID for view layer collections as well since we brought
collections into groups.

3 years agoOutliner: Fix for restriction columns
Dalai Felinto [Wed, 3 Jan 2018 20:32:46 +0000 (18:32 -0200)]
Outliner: Fix for restriction columns

This is a partial revert of 1f5106de610b115b87.

First and firemost, for groups I was checking the wrong flag
(soops->flag & SO_GROUPS) instead of (soops->outlinevis == SO_GROUPS).

Second, the columns were entirely broken for things like Orphan Data.

Third, I tried to have different columns for different `outlinevis`, but we have
bones with only visible and select, modifiers with visible and render, render
passes with enable and another value ... I would rather stay away from this mess
at the moment, and stick to the more obvious bug fix.

Finally, there is a bug (not addressed here) where the whole line is selected,
regardless of the restriction column area. It should be fixed separately.

3 years agoEevee: Make Ogl render sampling more correct
Clément Foucault [Fri, 5 Jan 2018 09:25:00 +0000 (10:25 +0100)]
Eevee: Make Ogl render sampling more correct

Result is less noisy ogl renders.

What this patch does:
- the draw loops gets accumulated into the output buffer.
- disable TXAA persmat jittering in ogl render since ogl render already does that.
- make noise texture update correct accross all draw loops. Previously it was reset between each FSAA samples.

3 years agoDRW: Add viewport argument to DRW_draw_render_loop_offscreen
Clément Foucault [Fri, 5 Jan 2018 09:18:44 +0000 (10:18 +0100)]
DRW: Add viewport argument to DRW_draw_render_loop_offscreen

This way we can have persistent data accross different calls.

3 years agoFix T53696: Compositor HSV limits changed
Campbell Barton [Fri, 5 Jan 2018 09:13:17 +0000 (20:13 +1100)]
Fix T53696: Compositor HSV limits changed

3 years agoFix manipulator crash when modal operator doesn't run
Campbell Barton [Fri, 5 Jan 2018 03:53:10 +0000 (14:53 +1100)]
Fix manipulator crash when modal operator doesn't run

3 years agoMerge remote-tracking branch 'origin/master' into blender2.8
Dalai Felinto [Thu, 4 Jan 2018 17:57:48 +0000 (15:57 -0200)]
Merge remote-tracking branch 'origin/master' into blender2.8

3 years agoFix leak when rendering OpenGL animations
Dalai Felinto [Thu, 4 Jan 2018 17:56:41 +0000 (15:56 -0200)]
Fix leak when rendering OpenGL animations

We were duplicating rectf twice :/

Patch by Clément Foucault.

3 years agoFix T52953: Crash removing material
Campbell Barton [Thu, 4 Jan 2018 10:35:09 +0000 (21:35 +1100)]
Fix T52953: Crash removing material

3 years agoEevee: Fix AO applied twice on glossy shader when using OGL render
Clément Foucault [Thu, 4 Jan 2018 09:41:34 +0000 (10:41 +0100)]
Eevee: Fix AO applied twice on glossy shader when using OGL render

Seems to be a compiler bug. This is really strange.
I just rephrased the whole thing and it appears to work.

3 years agoEevee: SSR: Fix ssr nor working in ogl render.
Clément Foucault [Wed, 3 Jan 2018 19:41:14 +0000 (20:41 +0100)]
Eevee: SSR: Fix ssr nor working in ogl render.

3 years agoDRW: Fix boolean uniform lenght.
Clément Foucault [Wed, 3 Jan 2018 19:39:44 +0000 (20:39 +0100)]
DRW: Fix boolean uniform lenght.

Boolean uniform needs to be 4bytes long for opengl.
Use "int" for every bool you want to pass as a uniform.

3 years agoEevee: Fix issues with alpha blending
Clément Foucault [Wed, 3 Jan 2018 12:28:38 +0000 (13:28 +0100)]
Eevee: Fix issues with alpha blending

- Hashed Alpha materials were outputing their alpha values even if the final pixel has no blending and thus no transparency.
- Opacity was not clamped when using "add closure" nodes.

3 years agoDRW: Fix incorrect blending functions.
Clément Foucault [Wed, 3 Jan 2018 12:25:46 +0000 (13:25 +0100)]
DRW: Fix incorrect blending functions.

3 years agoEevee: Make the background black when rendering without sky.
Clément Foucault [Wed, 3 Jan 2018 12:24:04 +0000 (13:24 +0100)]
Eevee: Make the background black when rendering without sky.

This prevent some bad blending when using transparent materials.