blender.git
4 months agoMerge branch 'blender2.7'
Brecht Van Lommel [Wed, 30 Jan 2019 17:36:54 +0000 (18:36 +0100)]
Merge branch 'blender2.7'

4 months agoCleanup: use better names for depsgraph driver relations.
Brecht Van Lommel [Wed, 30 Jan 2019 12:31:44 +0000 (13:31 +0100)]
Cleanup: use better names for depsgraph driver relations.

Both the driven properties and driver targets were called targets, now make
a distinction.

4 months agoGP: Remove DEG_get_original_id() from draw manager
Antonioya [Wed, 30 Jan 2019 15:26:06 +0000 (16:26 +0100)]
GP: Remove DEG_get_original_id() from draw manager

Only keep this function when drawing to avoid COW overhead that reduce performance.

After some changes I did some time ago, the use of original ID was not required and this only added depsgraph overhead and problems.

This change solves the problems with updates in render mode.

Related to T57484 and the changes requested by Sergey.

4 months agoFix T61017: node_shader_utils did not handle diffuse_color correctly
Jacques Lucke [Wed, 30 Jan 2019 13:37:09 +0000 (14:37 +0100)]
Fix T61017: node_shader_utils did not handle diffuse_color correctly

4 months agoFix default material using zero alpha
Campbell Barton [Wed, 30 Jan 2019 12:53:40 +0000 (23:53 +1100)]
Fix default material using zero alpha

4 months agoFix (unreported) memleak when copying object and its material with GP settings.
Bastien Montagne [Wed, 30 Jan 2019 11:00:58 +0000 (12:00 +0100)]
Fix (unreported) memleak when copying object and its material with GP settings.

Like... seriously?

4 months agoFix T60957: ASSERT when reloading double-linked file.
Bastien Montagne [Wed, 30 Jan 2019 10:46:49 +0000 (11:46 +0100)]
Fix T60957: ASSERT when reloading double-linked file.

Kind of funny to see that this has been missing presumably since the
first version of library linking in Blender, and only gets noticed now.
Then again, that was not really a critical issue, iirc write code
ensures all libraries directly used get properly written, even if flags
are incorrect.

4 months agoCleanup: use proper bitflag operators.
Bastien Montagne [Wed, 30 Jan 2019 10:38:13 +0000 (11:38 +0100)]
Cleanup: use proper bitflag operators.

4 months agoCleanup: Unused function argument
Sergey Sharybin [Wed, 30 Jan 2019 10:02:06 +0000 (11:02 +0100)]
Cleanup: Unused function argument

4 months agoCycles: improved rounding of sample chunks for resumable renders
Sybren A. Stüvel [Tue, 29 Jan 2019 17:08:12 +0000 (18:08 +0100)]
Cycles: improved rounding of sample chunks for resumable renders

When using `--cycles-resumable-num-chunks N` to render a subset of the
samples, having N close to the total number of samples causes rounding
issues.

For example, a file configured for 250 samples and 150 chunks should
have 1.6666 sample per chunk. The old code rounded this to 2 samples per
chunk, which would result in too many samples being rendered. When
rendering a single chunk this doesn't matter much, but when larger chunk
ranges are rendered with `--cycles-resumable-start-chunk` and
`--cycles-resumable-end-chunk` the rounding errors start to add up.

By multiplying with the number of chunks to render first, and only round
to integers after that, this issue is solved. In the above example,
rendering 3 chunks will correctly render 5 samples rather than 6.

When the requested number of chunks is larger than the number of samples
there will be duplicate samples (that is, sample N appearing both in
chunk M and M+1). In this case a warning is printed to stderr.

This is needed for T50977 Progressive render: use non-uniform sample
chunks.

Reviewed by: sergey

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

4 months agoFix T60974: Dyntopo crash on undo after object deleted
Campbell Barton [Wed, 30 Jan 2019 09:44:15 +0000 (20:44 +1100)]
Fix T60974: Dyntopo crash on undo after object deleted

Add the ability for undo steps to request memfile undo step added after
them, useful for mode switching, where we need the data to exist for
undo to enter the mode.

4 months agoVersioning: add renaming utility function
Campbell Barton [Tue, 29 Jan 2019 22:36:38 +0000 (09:36 +1100)]
Versioning: add renaming utility function

Avoids accidents creating duplicate names.

Also ensure screens are sorted on rename.

4 months agoCleanup: line length
Campbell Barton [Tue, 29 Jan 2019 22:03:37 +0000 (09:03 +1100)]
Cleanup: line length

4 months agoPartial fix for T60982: Editable anim settings in linked action.
Bastien Montagne [Tue, 29 Jan 2019 20:47:15 +0000 (21:47 +0100)]
Partial fix for T60982: Editable anim settings in linked action.

This is only partially working, because some bAnimListElem items do not
have any ID pointer set (for wome mysterious reason...), notably the
'group' ones.

Will re-assign to @aligorith for that, this code is rather complicated
and hard to follow (with all those macros ;) ).

4 months agoCleanup: typo in comment.
Bastien Montagne [Tue, 29 Jan 2019 20:46:59 +0000 (21:46 +0100)]
Cleanup: typo in comment.

4 months agoWorkbench: Make Material transparency part of the rgba color picker
Clément Foucault [Tue, 29 Jan 2019 19:33:51 +0000 (20:33 +0100)]
Workbench: Make Material transparency part of the rgba color picker

It is only used for solid mode for now but could be used by eevee in the
future.

4 months agoWorkbench: Opti: Only request OIT buffers if needed
Clément Foucault [Tue, 29 Jan 2019 18:57:12 +0000 (19:57 +0100)]
Workbench: Opti: Only request OIT buffers if needed

4 months agoWorkbench: Support transparency from object color alpha
Clément Foucault [Tue, 29 Jan 2019 18:56:22 +0000 (19:56 +0100)]
Workbench: Support transparency from object color alpha

Support the alpha channel use of the object color in solid mode.

The Transparency effect is still using the Xray algorithm and not
true Alpha blending.

4 months agoUI: Add Dynamic Topology toggle entry to Sculpt menu
Pablo Vazquez [Tue, 29 Jan 2019 17:58:34 +0000 (18:58 +0100)]
UI: Add Dynamic Topology toggle entry to Sculpt menu

Helps to find the shortcut (Ctrl+D) which wasn't exposed anywhere else than in search.

4 months agoFix: Add units to text offset_x and offset_y properties
Joel Godin [Tue, 29 Jan 2019 17:31:39 +0000 (18:31 +0100)]
Fix: Add units to text offset_x and offset_y properties

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

4 months agoFix T60067: some modifiers don't use shape keys correctly
Jacques Lucke [Tue, 29 Jan 2019 16:57:21 +0000 (17:57 +0100)]
Fix T60067: some modifiers don't use shape keys correctly

4 months agoCycles: delay CUDA and OpenCL initialization to avoid driver crashes.
Brecht Van Lommel [Tue, 29 Jan 2019 15:39:30 +0000 (16:39 +0100)]
Cycles: delay CUDA and OpenCL initialization to avoid driver crashes.

We've had many reported crashes on Windows where we suspect there is a
corrupted OpenCL driver. The purpose here is to keep Blender generally
usable in such cases.

Now it always shows None / CUDA / OpenCL in the preferences, and only when
selecting one will it reveal if there are any GPUs available. This should
avoid crashes when opening the preferences or on startup.

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

4 months agoAdd missing Shader FX remapping to library query
Sergey Sharybin [Tue, 29 Jan 2019 14:41:00 +0000 (15:41 +0100)]
Add missing Shader FX remapping to library query

4 months agoWorkbench: Add "Shadow" factor to Xray
Clément Foucault [Tue, 29 Jan 2019 02:46:57 +0000 (03:46 +0100)]
Workbench: Add "Shadow" factor to Xray

This just maintain more parity accross the 2 visuals. Note that this is not
"real shadowing" just the facing factor shadowing.

4 months agoWorkbench: Add transparency support for materials
Clément Foucault [Tue, 29 Jan 2019 02:06:59 +0000 (03:06 +0100)]
Workbench: Add transparency support for materials

This adds the posibility of having certain materials transparent in solid
mode. The option is (for now) per material only and thus only shows in
material color mode.

This uses the same rendering technique as Xray mode.

Note that objects are not considered transparent for selection with this.

4 months agoObject Mode: Fix reading past buffer end when drawing camera
Clément Foucault [Tue, 29 Jan 2019 01:41:16 +0000 (02:41 +0100)]
Object Mode: Fix reading past buffer end when drawing camera

4 months agoWorkbench: Depth Of Field: Improve noise and Large radius
Clément Foucault [Mon, 28 Jan 2019 17:49:00 +0000 (18:49 +0100)]
Workbench: Depth Of Field: Improve noise and Large radius

- Add noise to remove undersampling artifact
- Create 2 mipmaps to the scene color buffer in order to have bigger blurs
- Replace blur2 with a 3x3 median filter that doesn't dilate the highlights
- Use temporal accumulation to remove noise

For some reason all of this exacerbate some bleeding issues happening on
far foreground elements from near foreground elements. The actual problem
was already happening before but was not really noticeable. It needs some
more work to be fixed.

4 months agoFix duplicate brushes from recent startup files
Campbell Barton [Tue, 29 Jan 2019 12:43:11 +0000 (23:43 +1100)]
Fix duplicate brushes from recent startup files

Default versioning caused duplicates when the startup was re-saved.

See c305759762aa3

4 months agoFix T60226: Inset not working well on very small faces
Jacques Lucke [Tue, 29 Jan 2019 12:39:21 +0000 (13:39 +0100)]
Fix T60226: Inset not working well on very small faces

The inset operator uses 0.01 as default for the inset.
When the face is very small than this default is very confusing (see T60226).

The simplest fix seems to be to just use 0 as default.
This is similar to the extrude operator which uses 0 as default as well.

Reviewers: brecht, campbellbarton

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

4 months agoBevel - better corner shapes for inner arc miters.
Howard Trickey [Tue, 29 Jan 2019 12:21:59 +0000 (07:21 -0500)]
Bevel - better corner shapes for inner arc miters.

The subdivision method for getting corner shapes has a fullness
parameter which had been set by eye before. This change uses fullness
as found by offline search process to best match the superellipsoid
octant in the cube corner case (except cube corner case is still handled
by other code). This somewhat improves the look of cube corners with
inner arc miters, however.

4 months agoRevert "3D Text: avoid checking null character's text on path"
Campbell Barton [Tue, 29 Jan 2019 11:50:55 +0000 (22:50 +1100)]
Revert "3D Text: avoid checking null character's text on path"

This reverts commit 8a379e3460048906306042145052d5d7f3bb859c.

Caused T58284

4 months agoRevert "3D Text: avoid checking null character's text on path"
Campbell Barton [Tue, 29 Jan 2019 11:50:55 +0000 (22:50 +1100)]
Revert "3D Text: avoid checking null character's text on path"

This reverts commit 8a379e3460048906306042145052d5d7f3bb859c.

Caused T58284

4 months agoFix T59924: Blender 2.8 particle system error
Sergey Sharybin [Tue, 29 Jan 2019 09:16:16 +0000 (10:16 +0100)]
Fix T59924: Blender 2.8 particle system error

Was missing relation from particle keyed targets to the
particle system, which caused some race conditions.

4 months agoDRW: support clipping for all lamp types
Campbell Barton [Tue, 29 Jan 2019 08:57:35 +0000 (19:57 +1100)]
DRW: support clipping for all lamp types

4 months agoFix CLOG_STR_AT_SEVERITY macro
Campbell Barton [Tue, 29 Jan 2019 06:28:44 +0000 (17:28 +1100)]
Fix CLOG_STR_AT_SEVERITY macro

Part of D4277 by @sobakasu

4 months agoFix duplicate brushes being added to startup
Campbell Barton [Tue, 29 Jan 2019 05:19:28 +0000 (16:19 +1100)]
Fix duplicate brushes being added to startup

All builtin templates have this brush.

4 months agoFix T60809: Crash undoing object rename in edit-mode
Campbell Barton [Tue, 29 Jan 2019 03:31:00 +0000 (14:31 +1100)]
Fix T60809: Crash undoing object rename in edit-mode

Currently names are used for edit-mode undo-steps,
any changes to Main ID names cause lookup failure (crashing).

This commit ensures any undo steps that use ID lookups have the same
mem-file undo state loaded that was used to encode the steps.

Renaming also has an undo push added (last commit).

4 months agoLibrary: tag memfile undo for writing after rename
Campbell Barton [Tue, 29 Jan 2019 03:28:55 +0000 (14:28 +1100)]
Library: tag memfile undo for writing after rename

Needed for T60809 fix.

4 months agoCleanup: Remove unused MTex.texflag
Campbell Barton [Mon, 28 Jan 2019 21:52:56 +0000 (08:52 +1100)]
Cleanup: Remove unused MTex.texflag

4 months agoCleanup: remove immediate mode TODO
Campbell Barton [Mon, 28 Jan 2019 21:40:46 +0000 (08:40 +1100)]
Cleanup: remove immediate mode TODO

We've managed without these functions and can add them if needed,
this TODO isn't helping.

4 months agoCleanup: replace attrib w/ attr
Campbell Barton [Mon, 28 Jan 2019 20:46:25 +0000 (07:46 +1100)]
Cleanup: replace attrib w/ attr

Also rename GPUVertexAttribs to GPUVertAttrLayers,
avoids confusion with GPUVertAttr which isn't closely related.

4 months agoMerge branch 'blender2.7'
Bastien Montagne [Mon, 28 Jan 2019 21:27:45 +0000 (22:27 +0100)]
Merge branch 'blender2.7'

Conflicts:
source/creator/CMakeLists.txt

4 months agoFix T60896: Missing update for Auto Texture Space.
Bastien Montagne [Mon, 28 Jan 2019 21:25:26 +0000 (22:25 +0100)]
Fix T60896: Missing update for Auto Texture Space.

4 months agoOutliner: Enable new faster 'Delete Hierarchy' code by default.
Bastien Montagne [Mon, 28 Jan 2019 20:57:56 +0000 (21:57 +0100)]
Outliner: Enable new faster 'Delete Hierarchy' code by default.

Some more tests showed no issue, so now feeling reasonably confident.

Old, 'safer' one remains available through setting debug value to 666,
for a few more weeks.

4 months agoFix several missing cases of copy func for modifiers.
Bastien Montagne [Mon, 28 Jan 2019 20:48:09 +0000 (21:48 +0100)]
Fix several missing cases of copy func for modifiers.

Any time a modifier data has non-ID pointer, it should have own copy
function (and also take care of proper init/reset in its init callback).

4 months agoFix T60840: Serious memleak in solidify modifier.
Bastien Montagne [Mon, 28 Jan 2019 20:46:05 +0000 (21:46 +0100)]
Fix T60840: Serious memleak in solidify modifier.

Another one painful to pin down, due to misleading info in report, and
more than anything else, waaayyyyy too complex example file!

4 months agoFix T60944: Add Tablet eraser support to annotations usin pen
Antonioya [Mon, 28 Jan 2019 16:46:11 +0000 (17:46 +0100)]
Fix T60944: Add Tablet eraser support to annotations usin pen

4 months agoFix T60566: Warnings in rigid body and certain conrfiguration
Sergey Sharybin [Mon, 28 Jan 2019 15:38:12 +0000 (16:38 +0100)]
Fix T60566: Warnings in rigid body and certain conrfiguration

Was visible when constraint object is not directly visible via
view layers, need to indirectly pull it into the graph.

4 months agoFix T60599: Multires crash after doing dyntopo sculpt
Sergey Sharybin [Mon, 28 Jan 2019 15:14:30 +0000 (16:14 +0100)]
Fix T60599: Multires crash after doing dyntopo sculpt

4 months agoFix T59963: Can't manipulate hair keys with G, R, S or mirror transforms
Sergey Sharybin [Mon, 28 Jan 2019 14:45:34 +0000 (15:45 +0100)]
Fix T59963: Can't manipulate hair keys with G, R, S or mirror transforms

Need to pass proper evaluated mesh to calculate hair matrix.

4 months agoDRW: support clipping for object & lamp centers
Campbell Barton [Mon, 28 Jan 2019 13:13:42 +0000 (00:13 +1100)]
DRW: support clipping for object & lamp centers

4 months agomakesrna: write files w/ spaces instead of tabs
Campbell Barton [Mon, 28 Jan 2019 12:06:37 +0000 (23:06 +1100)]
makesrna: write files w/ spaces instead of tabs

We're preparing to move to spaces, having literal tabs in strings
complicates conversion a little, move makesrna to spaces now.

4 months agoFix blenderplayer build after OpenMP changes.
Brecht Van Lommel [Mon, 28 Jan 2019 12:04:20 +0000 (13:04 +0100)]
Fix blenderplayer build after OpenMP changes.

4 months agoMake scene statistics to respect locked interface
Sergey Sharybin [Mon, 28 Jan 2019 11:47:39 +0000 (12:47 +0100)]
Make scene statistics to respect locked interface

Interface is being locked when some destructive operations
are called from non-main thread.

This was causing crash with particles in T60065.

4 months agoMerge branch 'blender2.7'
Campbell Barton [Mon, 28 Jan 2019 11:27:00 +0000 (22:27 +1100)]
Merge branch 'blender2.7'

4 months agoFix T60127: Particles texture mapping coordinates objects
Sergey Sharybin [Mon, 28 Jan 2019 11:17:54 +0000 (12:17 +0100)]
Fix T60127: Particles texture mapping coordinates objects

Part of the issue was a missing relation. Other part wes
aboud object's inverse matrix never being updated.

4 months agoCleanup: unused struct declarations
Campbell Barton [Mon, 28 Jan 2019 11:15:46 +0000 (22:15 +1100)]
Cleanup: unused struct declarations

4 months agoCleanup: sort forward declarations of enum & struct
Campbell Barton [Mon, 28 Jan 2019 11:08:29 +0000 (22:08 +1100)]
Cleanup: sort forward declarations of enum & struct

Done using:
  source/tools/utils_maintenance/c_sort_blocks.py

4 months agoMerge branch 'blender2.7'
Brecht Van Lommel [Mon, 28 Jan 2019 11:05:51 +0000 (12:05 +0100)]
Merge branch 'blender2.7'

4 months agoCleanup: unused struct declarations
Campbell Barton [Mon, 28 Jan 2019 11:06:53 +0000 (22:06 +1100)]
Cleanup: unused struct declarations

4 months agoOSL: remove fresnel template that was not public domain.
Brecht Van Lommel [Mon, 28 Jan 2019 10:51:24 +0000 (11:51 +0100)]
OSL: remove fresnel template that was not public domain.

Convention is to only have public domain code templates. Also fixes wrong
license header in Cycles.

4 months agoFix T57069: macOS window contents scaling bug.
Brecht Van Lommel [Mon, 28 Jan 2019 10:58:00 +0000 (11:58 +0100)]
Fix T57069: macOS window contents scaling bug.

The cause of this is unclear, but delaying querying the native pixel size
appears to help in the one case I could reproduce.

4 months agoCleanup: sort forward declarations of enum & struct
Campbell Barton [Mon, 28 Jan 2019 10:08:24 +0000 (21:08 +1100)]
Cleanup: sort forward declarations of enum & struct

Done using:
  source/tools/utils_maintenance/c_sort_blocks.py

4 months agoFix: use correct units for some bone properties
Scott Spadea [Mon, 28 Jan 2019 10:01:46 +0000 (11:01 +0100)]
Fix: use correct units for some bone properties

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

4 months agoFix: allow removal of addons that are symlinked
Jacques Lucke [Mon, 28 Jan 2019 09:52:54 +0000 (10:52 +0100)]
Fix: allow removal of addons that are symlinked

Reviewers: campbellbarton

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

4 months agoFix: use pixel as unit for some properties
Scott Spadea [Mon, 28 Jan 2019 09:49:00 +0000 (10:49 +0100)]
Fix: use pixel as unit for some properties

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

4 months agoMerge branch 'blender2.7'
Brecht Van Lommel [Sun, 27 Jan 2019 19:17:11 +0000 (20:17 +0100)]
Merge branch 'blender2.7'

4 months agoFix Cycles standalone build as part of Blender.
Brecht Van Lommel [Sun, 27 Jan 2019 17:26:26 +0000 (18:26 +0100)]
Fix Cycles standalone build as part of Blender.

4 months agoFix T60908: crash in workbench render after DoF changes.
Brecht Van Lommel [Sun, 27 Jan 2019 12:52:28 +0000 (13:52 +0100)]
Fix T60908: crash in workbench render after DoF changes.

4 months agoFix: Use correct units in Shrinkwrap modifier
Łukasz Kwoska [Sun, 27 Jan 2019 11:22:14 +0000 (12:22 +0100)]
Fix: Use correct units in Shrinkwrap modifier

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

4 months agoFix T59921: RuntimeError:bpy.ops.object.gpencil_modifier_apply()
Antonioya [Sat, 26 Jan 2019 15:19:03 +0000 (16:19 +0100)]
Fix T59921: RuntimeError:bpy.ops.object.gpencil_modifier_apply()

Thanks to Brecht for his help

4 months agoMerge branch 'blender2.7'
Brecht Van Lommel [Sat, 26 Jan 2019 14:54:13 +0000 (15:54 +0100)]
Merge branch 'blender2.7'

4 months agomacOS: add support for OpenMP, making smoke/fluid/cloth simulations faster.
Arto Kitula [Sat, 26 Jan 2019 13:14:51 +0000 (14:14 +0100)]
macOS: add support for OpenMP, making smoke/fluid/cloth simulations faster.

This bring macOS on par with Windows and Linux. It uses the OpenMP library
added to our precompiled libraries.

Custom flags are set because FindOpenMP from CMake below 3.12 does not support
AppleClang, and more recent versions do not work with our custom directory
location either.

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

4 months agoCycles: add missing units for properties.
Robert Guetzkow [Sat, 26 Jan 2019 14:08:59 +0000 (15:08 +0100)]
Cycles: add missing units for properties.

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

4 months agoFix build error after recent cleanup.
Brecht Van Lommel [Sat, 26 Jan 2019 14:02:52 +0000 (15:02 +0100)]
Fix build error after recent cleanup.

4 months agoCleanup: fix compiler warnings.
Brecht Van Lommel [Sat, 26 Jan 2019 13:46:38 +0000 (14:46 +0100)]
Cleanup: fix compiler warnings.

4 months agoFix: Use correct units for cloth properties
Valentin [Sat, 26 Jan 2019 12:31:07 +0000 (13:31 +0100)]
Fix: Use correct units for cloth properties

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

4 months agoFix incorrect sizeof use in rna array formatting
Campbell Barton [Sat, 26 Jan 2019 12:17:31 +0000 (23:17 +1100)]
Fix incorrect sizeof use in rna array formatting

4 months agoCorrect build error removing includes
Campbell Barton [Sat, 26 Jan 2019 12:08:11 +0000 (23:08 +1100)]
Correct build error removing includes

4 months agoCleanup: blank lines over doxy headers
Campbell Barton [Sat, 26 Jan 2019 10:43:24 +0000 (21:43 +1100)]
Cleanup: blank lines over doxy headers

4 months agoCleanup: remove redundant BKE/BLI/BIF headers
Campbell Barton [Sat, 26 Jan 2019 09:41:52 +0000 (20:41 +1100)]
Cleanup: remove redundant BKE/BLI/BIF headers

4 months agoCleanup: draw manager headers
Campbell Barton [Sat, 26 Jan 2019 09:07:31 +0000 (20:07 +1100)]
Cleanup: draw manager headers

4 months agoCleanup: redundant defines
Campbell Barton [Sat, 26 Jan 2019 05:50:13 +0000 (16:50 +1100)]
Cleanup: redundant defines

Comment or remove unused defines.

4 months agoCleanup: remove blender-internal update flag
Campbell Barton [Sat, 26 Jan 2019 07:18:13 +0000 (18:18 +1100)]
Cleanup: remove blender-internal update flag

4 months agoCleanup: wrapper for built-in shader access
Campbell Barton [Sat, 26 Jan 2019 05:39:05 +0000 (16:39 +1100)]
Cleanup: wrapper for built-in shader access

4 months agoDRW: support clipping for empty object
Campbell Barton [Sat, 26 Jan 2019 04:00:03 +0000 (15:00 +1100)]
DRW: support clipping for empty object

4 months agoKeymap: move grease pencil Alt-C to 2.7x map
Campbell Barton [Sat, 26 Jan 2019 01:56:56 +0000 (12:56 +1100)]
Keymap: move grease pencil Alt-C to 2.7x map

This has been removed from the default map, so don't use elsewhere.

4 months agoCleanup: avoid static vars to store legacy shaders
Campbell Barton [Fri, 25 Jan 2019 23:31:53 +0000 (10:31 +1100)]
Cleanup: avoid static vars to store legacy shaders

4 months agoGPU: refactor defines into GPUShaderStages
Campbell Barton [Fri, 25 Jan 2019 23:04:10 +0000 (10:04 +1100)]
GPU: refactor defines into GPUShaderStages

Code comment notes there are "just a few",
now there are enough it's useful to include in GPUShaderStages.

4 months agoCleanup: order GPUShaderStages (vert, geom, frag)
Campbell Barton [Fri, 25 Jan 2019 22:46:29 +0000 (09:46 +1100)]
Cleanup: order GPUShaderStages (vert, geom, frag)

Use names for declarations to support adding defines, coming next.

4 months agoWorkbench: Depth Of Field: Add toggle option in shading popover
Clément Foucault [Fri, 25 Jan 2019 20:03:50 +0000 (21:03 +0100)]
Workbench: Depth Of Field: Add toggle option in shading popover

Pretty straight forward. Just an option to turn the DoF per viewport.
Default is off as in 2.79.

4 months agoWorkbench: Depth Of Field: Cleanups
Clément Foucault [Fri, 25 Jan 2019 20:02:24 +0000 (21:02 +0100)]
Workbench: Depth Of Field: Cleanups

4 months agoGP: Apply scale to particles
Antonioya [Fri, 25 Jan 2019 19:40:56 +0000 (20:40 +0100)]
GP: Apply scale to particles

The particles were using the scale of the original object and the thickness of the stroke was not correct. Now, the scale is applied by particle.

4 months agoGP: Set cyclic to OFF when use cutter
Antonioya [Fri, 25 Jan 2019 19:01:11 +0000 (20:01 +0100)]
GP: Set cyclic to OFF when use cutter

When cut a stroke, the cyclic must be set to off because keep it gets very weird results.

4 months agoAmmend to rBea5326df86cb.
Bastien Montagne [Fri, 25 Jan 2019 18:51:38 +0000 (19:51 +0100)]
Ammend to rBea5326df86cb.

As suggested by @sergey, better use RECALC flag dedicated to pointcache.

4 months agoFix T58142: Crash when use Cycles to render stereoscopy
Dalai Felinto [Fri, 25 Jan 2019 13:05:04 +0000 (11:05 -0200)]
Fix T58142: Crash when use Cycles to render stereoscopy

This is a quick workaround to prevent the crashes with multi-view.
The ultimate solution can be plenty, and would turn around refactoring
Cycles to handle multi-view internally, so that depsgraph could be freed
before render with no problems.

Reviewers: brecht, sergey

For the complete discussion check: https://developer.blender.org/D4239

4 months agoFix Freestyle (ASAN detected) crash
Dalai Felinto [Fri, 25 Jan 2019 16:54:36 +0000 (14:54 -0200)]
Fix Freestyle (ASAN detected) crash

This was very simple to reproduce, just turn on Freestyle and press render.

Now to the truth of things. Most (if not all) of
~BlenderStrokeRenderer() can be removed. I believe this was done back
when freestyle was using G.main, and since we gave freestyle its own
main we can just leave the cleanup for later.

I will leave this for freestyle maintainers to think over though.

Note: There is a chance this was the issue reported on T57890. I will
wait for the reporter to confirm this as fixed though.

4 months agoFix T60783: (Certain) shapekeys stopped working in 2.8.
Bastien Montagne [Fri, 25 Jan 2019 16:42:43 +0000 (17:42 +0100)]
Fix T60783: (Certain) shapekeys stopped working in 2.8.

This commit adds another optional check (when `--debug-io` is set) on
write .blend process, to check and ensure all shape keys have their
'from' pointer properly set to their respective user ID.
This is intended to be used as debuging tool mostly (to try to detect
when/why some of those pointers can become NULL).

For now, it also systematically perform same checks/fixes when loading a
.blend file, to fix all broken ones laying around. Later we might move
that usage to a do_version instead, but for now think it's safer to
always perfom it (and it's rather cheap process anyway).

4 months agoShapeKey: add utils to say whether given ID type supports shapekeys.
Bastien Montagne [Fri, 25 Jan 2019 16:37:19 +0000 (17:37 +0100)]
ShapeKey: add utils to say whether given ID type supports shapekeys.

Those kind of checks are handy to have for generic processing...

4 months agoCleanup: BLO: move validate code into own header.
Bastien Montagne [Fri, 25 Jan 2019 16:31:32 +0000 (17:31 +0100)]
Cleanup: BLO: move validate code into own header.

Does not make sense to keep that with BLO_writefile.h, this can also be
used by read code, and some other parts of Blender (like ed_undo.c
currently)...