blender.git
3 years agoEevee: Fix assert with subsurface bsdf
Clément Foucault [Thu, 9 Aug 2018 14:45:56 +0000 (16:45 +0200)]
Eevee: Fix assert with subsurface bsdf

3 years agoEevee: Principled BSDF: Add support for the sheen parameter
Clément Foucault [Thu, 9 Aug 2018 13:03:15 +0000 (15:03 +0200)]
Eevee: Principled BSDF: Add support for the sheen parameter

This is a rough (but fast) approximation that still match cycles reference
in common case.

In practice, it's just adding more of the diffuse light computed for the
diffuse contribution.

3 years agoMerge branch 'soc-2018-bevel' into blender2.8
Rohan Rathi [Thu, 9 Aug 2018 14:22:07 +0000 (19:52 +0530)]
Merge branch 'soc-2018-bevel' into blender2.8

3 years agoFix T56279: Grease Pencil transformations show a help line with wrong origin
Antonioya [Thu, 9 Aug 2018 14:14:14 +0000 (16:14 +0200)]
Fix T56279: Grease Pencil transformations show a help line with wrong origin

As grease pencil use multiedit frames instead of multiobject edit, this fix solves the issue.

In the future maybe will need modifications if we add multiobject support, but we need a solution now.

3 years agoMerge branch 'master' into blender2.8
Sergey Sharybin [Thu, 9 Aug 2018 14:03:09 +0000 (16:03 +0200)]
Merge branch 'master' into blender2.8

3 years agoCycles: Append compute units for RX Vega card names
fclem [Thu, 9 Aug 2018 13:41:24 +0000 (15:41 +0200)]
Cycles: Append compute units for RX Vega card names

Makes it more clear whether compute device is Vega 56 or Vega 64.

3 years agoCycles: Report more details about OpenCL devices
fclem [Thu, 9 Aug 2018 13:31:44 +0000 (15:31 +0200)]
Cycles: Report more details about OpenCL devices

3 years agoCycles: Util, add to_string() with some helper
fclem [Thu, 9 Aug 2018 13:27:19 +0000 (15:27 +0200)]
Cycles: Util, add to_string() with some helper

Currently unused, but will allow to convert unknown
argument type to a string for reporting and such.

3 years agoFix trivial error in call soc-2018-bevel
Rohan Rathi [Thu, 9 Aug 2018 13:26:46 +0000 (18:56 +0530)]
Fix trivial error in call

3 years agoFixed custom shading not updating in Edit Mode
Rohan Rathi [Thu, 9 Aug 2018 13:06:38 +0000 (18:36 +0530)]
Fixed custom shading not updating in Edit Mode

3 years agoGP: Add option to select color affected in modifiers
Charlie Jolly [Thu, 9 Aug 2018 11:42:02 +0000 (13:42 +0200)]
GP: Add option to select color affected in modifiers

Now it's possible to define if the Tint, Hue and OPacity modifier affect the stroke color, fill color or both.

3 years agoGP: Undo incorrect modification in previous commit
Antonioya [Thu, 9 Aug 2018 11:39:35 +0000 (13:39 +0200)]
GP: Undo incorrect modification in previous commit

3 years agoFix T56239: creating material crashes with OpenGL render engine selected.
Brecht Van Lommel [Thu, 9 Aug 2018 10:04:00 +0000 (12:04 +0200)]
Fix T56239: creating material crashes with OpenGL render engine selected.

3 years agoMerge branch 'master' into blender2.8
Campbell Barton [Wed, 8 Aug 2018 22:20:06 +0000 (08:20 +1000)]
Merge branch 'master' into blender2.8

3 years agoMath Lib: varied size vector multiply
Andrew Hale [Wed, 8 Aug 2018 22:10:27 +0000 (08:10 +1000)]
Math Lib: varied size vector multiply

Needed for Python mathutils elementwise multiply.

3 years agoEevee: Fix Clearcoat intensity
Clément Foucault [Wed, 8 Aug 2018 18:15:00 +0000 (20:15 +0200)]
Eevee: Fix Clearcoat intensity

3 years agoEevee: Remove per material SSS toggle
Clément Foucault [Wed, 8 Aug 2018 18:14:42 +0000 (20:14 +0200)]
Eevee: Remove per material SSS toggle

This is because we can now optimize the use of SSS on shaders based on
socket input values.

3 years agoEevee: Use "constant folding" for the principle shader
Clément Foucault [Wed, 8 Aug 2018 16:34:25 +0000 (18:34 +0200)]
Eevee: Use "constant folding" for the principle shader

This is more like a static optimisation when some parameters are set to 1.0
or 0.0. In theses case we use a more optimized version of the node.

This also revisit the transmission parameter behaviour to make it closer to
cycles.

3 years agoGPUMaterial: Fix Material appear broken when using sliders to tweak props
Clément Foucault [Wed, 8 Aug 2018 10:18:02 +0000 (12:18 +0200)]
GPUMaterial: Fix Material appear broken when using sliders to tweak props

This was likely caused by some sort of race condition where the drawing
thread would request the state of the shader before the shader has been
compiled.

3 years agoEevee: Remove some of the non-necessary uniforms
Clément Foucault [Fri, 3 Aug 2018 16:53:36 +0000 (18:53 +0200)]
Eevee: Remove some of the non-necessary uniforms

The remaining ones are from the attributes linear/srgb switches and from
nodes that should be pruned before running their _gpu function.

3 years agoGP: Fix modifiers Tint, Opacity and Hue and create materials to Opacity
Antonioya [Wed, 8 Aug 2018 18:35:08 +0000 (20:35 +0200)]
GP: Fix modifiers Tint, Opacity and Hue and create materials to Opacity

Thanks to Charlie Jolly (mistajolly@gmail.com) for his patch D3586 that added create materials to opacity modifier.

I had to do some more changes to get all running.

3 years agoMerge branch 'master' into blender2.8
Brecht Van Lommel [Wed, 8 Aug 2018 18:31:08 +0000 (20:31 +0200)]
Merge branch 'master' into blender2.8

3 years agoOpenJPEG: support building against both 1.5 and 2.3.
Brecht Van Lommel [Wed, 8 Aug 2018 17:48:12 +0000 (19:48 +0200)]
OpenJPEG: support building against both 1.5 and 2.3.

Patch porting to OpenJPEG 2.3 is by Campbell.

Once all platforms are upgraded we can remove the code for 1.5, and upgrade
or remove the openjpeg version from extern/. This intermediate step makes it
possible for platform maintainers to upgrade to 2.3 without breaking other
platforms.

3 years agoBuild: fix ffmpeg using system crystalhd library.
Brecht Van Lommel [Wed, 8 Aug 2018 18:26:14 +0000 (20:26 +0200)]
Build: fix ffmpeg using system crystalhd library.

3 years agoUI: move grease pencil entry in add menu.
Brecht Van Lommel [Wed, 8 Aug 2018 18:22:40 +0000 (20:22 +0200)]
UI: move grease pencil entry in add menu.

The first group of object types is renderable geometry which this belongs
to more than the second group, which are unrenderable utility objects.

3 years agoCleanup: remove leftover game player code.
Brecht Van Lommel [Fri, 3 Aug 2018 09:32:36 +0000 (11:32 +0200)]
Cleanup: remove leftover game player code.

3 years agoWeightVG modifiers: cleanup.
Bastien Montagne [Wed, 8 Aug 2018 18:13:17 +0000 (20:13 +0200)]
WeightVG modifiers: cleanup.

3 years agoFix T55818: Dynamically modified influence vertex group not working in modifier stack.
Bastien Montagne [Wed, 8 Aug 2018 18:07:12 +0000 (20:07 +0200)]
Fix T55818: Dynamically modified influence vertex group not working in modifier stack.

Now that we are using meshes, we need to assign back potential new
vgroup cdlayer to mesh->dvert pointer...

3 years agoGP: Fix memory leak in draw engine for buffer strokes
Antonioya [Wed, 8 Aug 2018 17:48:57 +0000 (19:48 +0200)]
GP: Fix memory leak in draw engine for buffer strokes

This memory leak was undetected during a long time, but with new memory checking is visible.

The problem was the stroke buffer batch was realocating new batches without free the memory.

3 years agoFix T56220: Adding Grease Object crashes if link Material is set to Object
Antonioya [Wed, 8 Aug 2018 14:56:56 +0000 (16:56 +0200)]
Fix T56220: Adding Grease Object crashes if link Material is set to Object

3 years agoCleanup: Move some duplicate code to new function
Antonioya [Wed, 8 Aug 2018 11:37:56 +0000 (13:37 +0200)]
Cleanup: Move some duplicate code to new function

3 years agoCleanup: trailing space
Campbell Barton [Wed, 8 Aug 2018 10:45:43 +0000 (20:45 +1000)]
Cleanup: trailing space

3 years agoGP: Fix unreported segment fault with some old files
Antonioya [Wed, 8 Aug 2018 10:17:00 +0000 (12:17 +0200)]
GP: Fix unreported segment fault with some old files

In some corner situations for old files, the weights array could not be initialized properly.

3 years agoCleanup unused arg warning.
Bastien Montagne [Wed, 8 Aug 2018 09:57:35 +0000 (11:57 +0200)]
Cleanup unused arg warning.

3 years agoFix T56273: User count assert on re-saving a particular file.
Bastien Montagne [Wed, 8 Aug 2018 09:54:58 +0000 (11:54 +0200)]
Fix T56273: User count assert on re-saving a particular file.

new background image/clip of Camera ID was totally wrong, down the old,
broken 'way it used to be' instead of using new, more generic system.

Those ID pointers were not even added to library_query.c file, shame! xD

3 years agoGP: Change to make the temp name unique
Antonioya [Wed, 8 Aug 2018 09:48:18 +0000 (11:48 +0200)]
GP: Change to make the temp name unique

The previous commit could fail if some corner situations. This new temp name must be unique always.

3 years agoFix T55095: Undo crash w/ linked library data
Campbell Barton [Wed, 8 Aug 2018 09:16:43 +0000 (19:16 +1000)]
Fix T55095: Undo crash w/ linked library data

3 years agoFix T56270: Crash when save a grease pencil file with instance modifier.
Antonioya [Wed, 8 Aug 2018 09:10:56 +0000 (11:10 +0200)]
Fix T56270: Crash when save a grease pencil file with instance modifier.

The error was related to duplicate names in the internal hash used to order instances in z-depth.

3 years agoGP: Check render status before use it.
Antonioya [Wed, 8 Aug 2018 09:09:12 +0000 (11:09 +0200)]
GP: Check render status before use it.

3 years agoFix T56251: Outliner crash on selecting nested.
Bastien Montagne [Wed, 8 Aug 2018 08:55:30 +0000 (10:55 +0200)]
Fix T56251: Outliner crash on selecting nested.

We need a valid tree here, undo step will make it invalid...

3 years agoMerge branch 'master' into blender2.8
Campbell Barton [Wed, 8 Aug 2018 07:56:56 +0000 (17:56 +1000)]
Merge branch 'master' into blender2.8

3 years agoGhost/X11: correct function signature
Campbell Barton [Wed, 8 Aug 2018 07:54:41 +0000 (17:54 +1000)]
Ghost/X11: correct function signature

3 years agoMerge branch 'master' into blender2.8
Campbell Barton [Wed, 8 Aug 2018 07:13:43 +0000 (17:13 +1000)]
Merge branch 'master' into blender2.8

3 years agoFix T54584: Crash w/ image undo
Campbell Barton [Wed, 8 Aug 2018 07:08:53 +0000 (17:08 +1000)]
Fix T54584: Crash w/ image undo

Using accumulation undo type (eg painting)
as the first undo step, broke code which adds an initial memfile undo.

3 years agoMinor tweak to last commit
Campbell Barton [Wed, 8 Aug 2018 06:02:45 +0000 (16:02 +1000)]
Minor tweak to last commit

3 years ago3D View: hide object centers in paint modes
Campbell Barton [Wed, 8 Aug 2018 05:52:25 +0000 (15:52 +1000)]
3D View: hide object centers in paint modes

Match 2.7x behavior

3 years agoUI: only show vertex select w/ weight paint mode
Campbell Barton [Wed, 8 Aug 2018 05:33:11 +0000 (15:33 +1000)]
UI: only show vertex select w/ weight paint mode

Was being used for vertex paint where it's not supported.

3 years agoVertex Paint: use original mesh data
Campbell Barton [Wed, 8 Aug 2018 05:17:30 +0000 (15:17 +1000)]
Vertex Paint: use original mesh data

This is already done in weight paint mode,
avoids a mesh refresh on selection changes.

3 years agoFix missing uniform for vert/weight/texture paint
Campbell Barton [Wed, 8 Aug 2018 05:08:50 +0000 (15:08 +1000)]
Fix missing uniform for vert/weight/texture paint

Entering any of these modes would assert immediately.

3 years agoUV: stitch multi-object support
Campbell Barton [Wed, 8 Aug 2018 03:56:53 +0000 (13:56 +1000)]
UV: stitch multi-object support

D3561 by @Al

3 years agoUI: don't show pie menu w/ no active object
Campbell Barton [Wed, 8 Aug 2018 03:30:27 +0000 (13:30 +1000)]
UI: don't show pie menu w/ no active object

Addresses T56272

3 years agoMerge branch 'master' into blender2.8
Campbell Barton [Wed, 8 Aug 2018 03:14:07 +0000 (13:14 +1000)]
Merge branch 'master' into blender2.8

3 years agoCleanup: correct header guard
Campbell Barton [Wed, 8 Aug 2018 03:10:53 +0000 (13:10 +1000)]
Cleanup: correct header guard

Header guard was duplicated before renaming.

3 years agoMerge branch 'master' into blender2.8
Campbell Barton [Wed, 8 Aug 2018 01:53:22 +0000 (11:53 +1000)]
Merge branch 'master' into blender2.8

3 years agoCleanup: use conforming header guard
Campbell Barton [Wed, 8 Aug 2018 01:49:51 +0000 (11:49 +1000)]
Cleanup: use conforming header guard

3 years agoMerge branch 'master' into blender2.8
Campbell Barton [Wed, 8 Aug 2018 01:33:42 +0000 (11:33 +1000)]
Merge branch 'master' into blender2.8

3 years agoCleanup: indentation
Campbell Barton [Wed, 8 Aug 2018 01:31:28 +0000 (11:31 +1000)]
Cleanup: indentation

3 years agoMerge branch 'master' into blender2.8
Campbell Barton [Wed, 8 Aug 2018 01:05:08 +0000 (11:05 +1000)]
Merge branch 'master' into blender2.8

3 years agoCleanup: use static variables
Campbell Barton [Wed, 8 Aug 2018 01:00:57 +0000 (11:00 +1000)]
Cleanup: use static variables

3 years agoCleanup: style
Campbell Barton [Wed, 8 Aug 2018 00:59:50 +0000 (10:59 +1000)]
Cleanup: style

3 years agoCleanup: Fix stupid duplication
Antonioya [Tue, 7 Aug 2018 20:26:54 +0000 (22:26 +0200)]
Cleanup: Fix stupid duplication

3 years agoFix memory leak in previous commit
Antonioya [Tue, 7 Aug 2018 20:22:03 +0000 (22:22 +0200)]
Fix memory leak in previous commit

3 years agoFix T56266: Second try to fix material problems
Antonioya [Tue, 7 Aug 2018 20:13:02 +0000 (22:13 +0200)]
Fix T56266: Second try to fix material problems

3 years agomacOS GHOST: use non-deprecated functions for coordinates
Arto Kitula [Tue, 7 Aug 2018 18:53:02 +0000 (21:53 +0300)]
macOS GHOST: use non-deprecated functions for coordinates

3 years agoFix T56266: Grease Pencil Tint and Color modifier error when apply
Antonioya [Tue, 7 Aug 2018 18:10:20 +0000 (20:10 +0200)]
Fix T56266: Grease Pencil Tint and Color modifier error when apply

The material created was not right when apply the modifiers.

These errors were related to the material modification from old palette system before the merge and for any reason this code was not changed in the right way.

Also changed the "Create Colors" to "Create Materials" to keep UI names aligned.

3 years agoCleanup: Tag only objects of the scene collections
Antonioya [Tue, 7 Aug 2018 14:41:38 +0000 (16:41 +0200)]
Cleanup: Tag only objects of the scene collections

In previous commit the bmain loop updated all GP objects, but must tag only scene collection objects.

3 years agoFix T54799: NDOF events not dispatched on windows.
mano-wii [Tue, 7 Aug 2018 14:41:55 +0000 (11:41 -0300)]
Fix T54799: NDOF events not dispatched on windows.

Caused by commit rB785e8a636a29

3 years agoFix T56263: Crash when sculpting a GP object with animation
Antonioya [Tue, 7 Aug 2018 12:15:41 +0000 (14:15 +0200)]
Fix T56263: Crash when sculpting a GP object with animation

This is a limitation of the current operator design.

I have added a test to be sure the operator is not initializated while play animations to avoid segment fault.

In the future, we can enable this option again, but it will need a operator redesign.

3 years agoCleanup GP: Change playing field to boolean
Antonioya [Tue, 7 Aug 2018 11:56:30 +0000 (13:56 +0200)]
Cleanup GP: Change playing field to boolean

3 years agoFix T56261: Grease Pencil simplify options get segment fault
Antonioya [Tue, 7 Aug 2018 11:36:30 +0000 (13:36 +0200)]
Fix T56261: Grease Pencil simplify options get segment fault

The depsgraph was not updated as expected with the function used and the cache was not set as dirty.

3 years agoFix T56252: Selectable Bases includes hidden objects
Campbell Barton [Tue, 7 Aug 2018 03:22:07 +0000 (13:22 +1000)]
Fix T56252: Selectable Bases includes hidden objects

3 years agoFix T56258: Solidify assert w/ empty mesh
Campbell Barton [Tue, 7 Aug 2018 02:58:08 +0000 (12:58 +1000)]
Fix T56258: Solidify assert w/ empty mesh

3 years agoFix T56255: Crash w/ collection access from Python
Campbell Barton [Tue, 7 Aug 2018 02:45:01 +0000 (12:45 +1000)]
Fix T56255: Crash w/ collection access from Python

3 years agomacOS Deps: use xcode 10.13 sdk
Arto Kitula [Mon, 6 Aug 2018 19:55:25 +0000 (22:55 +0300)]
macOS Deps: use xcode 10.13 sdk

3 years agoGP: Add Simplify Shader FX option
Antonioya [Mon, 6 Aug 2018 15:01:47 +0000 (17:01 +0200)]
GP: Add Simplify Shader FX option

This option was missing when old VFX modifers were backported as Shader FX.

3 years agoGP: Fix Front z-depth display precision
Antonioya [Mon, 6 Aug 2018 14:11:31 +0000 (16:11 +0200)]
GP: Fix  Front z-depth display precision

The zdepth 0 was clipped and need 0.000001

3 years agoPyAPI: Make skin modifier roots settable
Andrew Hale [Mon, 6 Aug 2018 09:37:49 +0000 (11:37 +0200)]
PyAPI: Make skin modifier roots settable

This make the root flag writable using the Python API, using the
generic skin vertex flag setter function.

Reviewed By: Campbell Barton

Differential Revision: http://developer.blender.org/D3583

3 years agoFix horrible invalid mesh freeing in weightvg modifiers.
Bastien Montagne [Mon, 6 Aug 2018 09:48:05 +0000 (11:48 +0200)]
Fix horrible invalid mesh freeing in weightvg modifiers.

Comes from rB7661f8a65b. Found while checking on T55818, but not solving
that issue of course.

3 years agoCleanup LIB_ID_COPY_ flags a bit, add missing comment.
Bastien Montagne [Mon, 6 Aug 2018 09:45:56 +0000 (11:45 +0200)]
Cleanup LIB_ID_COPY_ flags a bit, add missing comment.

3 years agoMerge branch 'master' into blender2.8
Campbell Barton [Mon, 6 Aug 2018 07:13:27 +0000 (17:13 +1000)]
Merge branch 'master' into blender2.8

3 years agoFix T55012: Corruption editing screen keymap
Campbell Barton [Mon, 6 Aug 2018 07:08:39 +0000 (17:08 +1000)]
Fix T55012: Corruption editing screen keymap

3 years agoCleanup: unused vars
Campbell Barton [Mon, 6 Aug 2018 02:52:48 +0000 (12:52 +1000)]
Cleanup: unused vars

3 years agoCleanup: line length
Campbell Barton [Mon, 6 Aug 2018 02:49:02 +0000 (12:49 +1000)]
Cleanup: line length

3 years agoFix T54915: Usercount of active action increases when editing things with COW enabled.
Bastien Montagne [Sun, 5 Aug 2018 16:50:01 +0000 (18:50 +0200)]
Fix T54915: Usercount of active action increases when editing things with COW enabled.

Just pass along the 'no user refcount' flag to animdata copy function.

3 years agoGP: Add python api to create brush settings for grease pencil
Antonioya [Sun, 5 Aug 2018 14:19:24 +0000 (16:19 +0200)]
GP: Add python api to create brush settings for grease pencil

3 years agoMerge branch 'master' into blender2.8
Brecht Van Lommel [Sun, 5 Aug 2018 10:15:13 +0000 (12:15 +0200)]
Merge branch 'master' into blender2.8

3 years agoFix Cycles crash rendering mix of instanced and non-instanced volumes.
Brecht Van Lommel [Sun, 5 Aug 2018 09:58:31 +0000 (11:58 +0200)]
Fix Cycles crash rendering mix of instanced and non-instanced volumes.

3 years agoGP: Fix NULL pointer when preview is not ready
Antonioya [Sun, 5 Aug 2018 09:06:20 +0000 (11:06 +0200)]
GP: Fix NULL pointer when preview is not ready

The preview cannot be ready when create a material with python

3 years agoMinor fix unused var compiler warning.
Bastien Montagne [Sun, 5 Aug 2018 07:19:15 +0000 (09:19 +0200)]
Minor fix unused var compiler warning.

3 years agoFix indentation, spacing and added comments
Rohan Rathi [Sun, 5 Aug 2018 03:09:20 +0000 (08:39 +0530)]
Fix indentation, spacing and added comments

3 years agoInitialized normal data in BevMod
Rohan Rathi [Sat, 4 Aug 2018 18:08:12 +0000 (23:38 +0530)]
Initialized normal data in BevMod

3 years agoAdded some comments to bevel_harden_normals for bev tool
Rohan Rathi [Sat, 4 Aug 2018 18:06:00 +0000 (23:36 +0530)]
Added some comments to bevel_harden_normals for bev tool

3 years agoAdded comments to functionality in main bevel code
Rohan Rathi [Sat, 4 Aug 2018 17:50:53 +0000 (23:20 +0530)]
Added comments to functionality in main bevel code

3 years agoAdded comments to seam and sharp len, removed unused var
Rohan Rathi [Sat, 4 Aug 2018 17:08:54 +0000 (22:38 +0530)]
Added comments to seam and sharp len, removed unused var

3 years agoFixed hnmode not being passed with bevel tool
Rohan Rathi [Sat, 4 Aug 2018 17:02:28 +0000 (22:32 +0530)]
Fixed hnmode not being passed with bevel tool

3 years agoAdded comments on hn_mode, BMOps on bevel
Rohan Rathi [Sat, 4 Aug 2018 17:01:53 +0000 (22:31 +0530)]
Added comments on hn_mode, BMOps on bevel

3 years agoFixed comment formatting in editmesh.c
Rohan Rathi [Sat, 4 Aug 2018 16:41:57 +0000 (22:11 +0530)]
Fixed comment formatting in editmesh.c

3 years agoRemoved redundant comment in BMesh
Rohan Rathi [Sat, 4 Aug 2018 16:41:11 +0000 (22:11 +0530)]
Removed redundant comment in BMesh

3 years agoGP: Fix stupid mistake in mirror modifier
Antonioya [Sat, 4 Aug 2018 13:59:57 +0000 (15:59 +0200)]
GP: Fix stupid mistake in mirror modifier

The object can be NULL. This was a line used in debug that it was not removed.

Also removed an old function not used.

Thanks to Charlie Jolly for catching this error.

3 years agoMerge branch 'master' into blender2.8
Bastien Montagne [Sat, 4 Aug 2018 11:43:10 +0000 (13:43 +0200)]
Merge branch 'master' into blender2.8