3 years agomerge from master
Gaia Clary [Mon, 26 Feb 2018 21:49:30 +0000 (22:49 +0100)]
merge from master

3 years agoGWN: Fix glitches when closing a window.
Clément Foucault [Mon, 26 Feb 2018 19:09:54 +0000 (20:09 +0100)]
GWN: Fix glitches when closing a window.

3 years agoEevee: Fix prev_persmat being used by multiple viewport.
Clément Foucault [Mon, 26 Feb 2018 19:08:48 +0000 (20:08 +0100)]
Eevee: Fix prev_persmat being used by multiple viewport.

3 years agoV3D: Vertex selection: Fix opengl error.
Clément Foucault [Mon, 26 Feb 2018 19:07:39 +0000 (20:07 +0100)]
V3D: Vertex selection: Fix opengl error.

3 years agoWM/GPU: Clear VAO cache of batch preset when switching context.
Clément Foucault [Mon, 26 Feb 2018 18:49:06 +0000 (19:49 +0100)]
WM/GPU: Clear VAO cache of batch preset when switching context.

This is needed for multiple windows to draw the batch presets.
This will not be needed once we use only one context for UI.

3 years agoDRW: Add new Draw Manager OpenGL Context.
Clément Foucault [Mon, 26 Feb 2018 18:41:17 +0000 (19:41 +0100)]
DRW: Add new Draw Manager OpenGL Context.

This separate context allows two things:
- It allows viewports in multi-windows configuration.
- F12 render can use this context in a separate thread and do a non-blocking render.

The downside is that the context cannot be used while rendering so a request to refresh a viewport will lock the UI. This is something that will be adressed in the future.

Under the hood what does that mean:
- Not adding more mess with VAOs management in gawain.
- Doing depth only draw for operators / selection needs to be done in an offscreen buffer.
- The 3D cursor "autodis" operator is still reading the backbuffer so we need to copy the result to it.
- All FBOs needed by the drawmanager must to be created/destroyed with its context active.
- We cannot use batches created for UI in the DRW context and vice-versa. There is a clear separation of resources that enables the use of safe multi-threading.

3 years agoGHOST: Add new interface to manage offscreen contexts.
Clément Foucault [Mon, 26 Feb 2018 18:10:15 +0000 (19:10 +0100)]
GHOST: Add new interface to manage offscreen contexts.

Offscreen contexts are not attached to a window and can only be used for rendering to frambuffer objects.

CGL implementation : Brecht Van Lommel (brecht)
GLX implementation : Clément Foucault (fclem)
WGL implementation : Germano Cavalcante (mano-wii)

Other implementation are just place holder for now.

3 years agosimplified collada integration in Blender. made functions mostly similar with blender2.8
Gaia Clary [Mon, 26 Feb 2018 15:49:06 +0000 (16:49 +0100)]
simplified collada integration in Blender. made functions mostly similar with blender2.8

3 years agoAdding support for Matrix Transformation export
Gaia Clary [Mon, 26 Feb 2018 15:34:45 +0000 (16:34 +0100)]
Adding support for Matrix Transformation export

The exporter does export matrix data (4*4 Transformation matrix) only for Skeletal animation. For object animation only exporting to trans/rot/loc is implemented.

This task implements Matrix export also for simple Object animation.

Differential Revision:

3 years agocollada: fix typo in if statement
Gaia Clary [Mon, 26 Feb 2018 11:55:54 +0000 (12:55 +0100)]
collada: fix typo in if statement

3 years agoas discussed on IRC this definition seems to be not necessary
Gaia Clary [Mon, 26 Feb 2018 11:09:29 +0000 (12:09 +0100)]
as discussed on IRC this definition seems to be not necessary

3 years agooptimized the output of the collada test script for better reading
Gaia Clary [Sun, 25 Feb 2018 23:09:00 +0000 (00:09 +0100)]
optimized the output of the collada test script for better reading

3 years agoCleanup: typos
Campbell Barton [Mon, 26 Feb 2018 08:58:31 +0000 (19:58 +1100)]
Cleanup: typos

D3081 by @rjg, with others.

3 years agoRevert "changing collada parameters"
Campbell Barton [Mon, 26 Feb 2018 08:33:53 +0000 (19:33 +1100)]
Revert "changing collada parameters"

This reverts commit d91f2ac37aa02d96a00d116fa55cdc9f55afd32c.

This change makes scene.collada_export() meaningless
(ignoring the scene the method is being run on).

3 years agoPresets: remove double underscore in preset names
Campbell Barton [Mon, 26 Feb 2018 08:21:02 +0000 (19:21 +1100)]
Presets: remove double underscore in preset names

3 years agoFix T54029: Wrong preset name display in win32
Campbell Barton [Mon, 26 Feb 2018 08:05:01 +0000 (19:05 +1100)]
Fix T54029: Wrong preset name display in win32

3 years agoCleanup: use function for clearing bmesh tags
Campbell Barton [Mon, 26 Feb 2018 03:05:41 +0000 (14:05 +1100)]
Cleanup: use function for clearing bmesh tags

3 years agoFix T50132: UV sticky mode is not respected with border/circle/lasso select.
Hugo Sales [Sun, 25 Feb 2018 21:24:55 +0000 (22:24 +0100)]
Fix T50132: UV sticky mode is not respected with border/circle/lasso select.

Differential Revision:

3 years agoFix incorrect text clipping on node link button in material properties.
Brecht Van Lommel [Sat, 24 Feb 2018 16:15:16 +0000 (17:15 +0100)]
Fix incorrect text clipping on node link button in material properties.

3 years agoObject Mode: Display meshes without faces and edges in object mode.
Clément Foucault [Sat, 24 Feb 2018 03:45:13 +0000 (04:45 +0100)]
Object Mode: Display meshes without faces and edges in object mode.

3 years agoEevee: Cleanup cascaded shadowmap code.
Clément Foucault [Sat, 24 Feb 2018 03:25:25 +0000 (04:25 +0100)]
Eevee: Cleanup cascaded shadowmap code.

3 years agoDRW/GWN: Bypass glUseProgram.
Clément Foucault [Sun, 25 Feb 2018 04:24:06 +0000 (05:24 +0100)]
DRW/GWN: Bypass glUseProgram.

Turns out to be the call that was destroying performance.

I get 18ms->6ms improvement of drawing time with 10 000 unique objects.

And we can still improve upon this!

3 years agoManipulator: rename is_visible -> poll
Campbell Barton [Sun, 25 Feb 2018 12:52:20 +0000 (23:52 +1100)]
Manipulator: rename is_visible -> poll

Rename to WM_manipulator_group_type_poll,
use convention of other poll functions.

3 years agoFix Player tm, a lifes job
Jens Verwiebe [Sun, 25 Feb 2018 09:35:08 +0000 (10:35 +0100)]
Fix Player tm, a lifes job

3 years agomerged collada rework from master into blender 2.8
Gaia Clary [Sat, 24 Feb 2018 23:06:41 +0000 (00:06 +0100)]
merged collada rework from master into blender 2.8

3 years agochanging collada parameters
Gaia Clary [Sat, 24 Feb 2018 21:15:52 +0000 (22:15 +0100)]
changing collada parameters

Differential Revision:

3 years agoFix a whitespace slipped in
Jens Verwiebe [Sat, 24 Feb 2018 17:07:05 +0000 (18:07 +0100)]
Fix a whitespace slipped in

3 years agoFix Plyer tm
Jens Verwiebe [Sat, 24 Feb 2018 16:30:37 +0000 (17:30 +0100)]
Fix Plyer tm

3 years agoT45687: Rework the Export/Import of Animations
Gaia Clary [Sat, 24 Feb 2018 12:11:30 +0000 (13:11 +0100)]
T45687: Rework the Export/Import of Animations

This started with a fix for an animated Object Hierarchy. Then i decided to cleanup and optimize a bit. But at the end this has become a more or less full rewrite of the Animation Exporter. All of this happened in a separate local branch and i have retained all my local commits to better see what i have done.

Brief description:

* I fixed a few issues with exporting keyframed animations of object hierarchies where the objects have parent inverse matrices which differ from the Identity matrix.
* I added the option to export sampled animations with a user defined sampling rate (new user interface option)
* I briefly tested Object Animations and Rig Animations.

What is still needed:

* Cleanup the code
* Optimize the user interface
* Do the Documentation

Reviewers: mont29

Reviewed By: mont29

Differential Revision:

3 years agoMerge branch 'master' into blender2.8
Kévin Dietrich [Sat, 24 Feb 2018 13:02:50 +0000 (14:02 +0100)]
Merge branch 'master' into blender2.8


3 years agoSmoke: expose empty space clipping property to the UI.
Kévin Dietrich [Thu, 22 Feb 2018 15:26:50 +0000 (16:26 +0100)]
Smoke: expose empty space clipping property to the UI.

This is used to determine which voxels are to be considered empty space.

Previously it was hardcoded for converting dense grids to OpenVDB grids
to reduce disk space usage.

This value is also useful for rendering engines to know, i.e. to
optimize ray marching.

3 years agoOpenVDB : use underscores instead of spaces in grid names.
Kévin Dietrich [Mon, 29 Jan 2018 17:37:35 +0000 (18:37 +0100)]
OpenVDB : use underscores instead of spaces in grid names.

Some other software cannot handle grid names with spaces in them. We still check for names with spaces so as to not break old

This fixes T53802.

3 years agoFixup for border render changes
Dalai Felinto [Fri, 23 Feb 2018 20:18:12 +0000 (17:18 -0300)]
Fixup for border render changes

Although I fixed border rendering, I broke non-border rendering.

Issue introduced on:  0305fc30b3ba6a1b24e2c9c182ae2e76d553f341

3 years agoEevee: add Principled Volume shader.
Brecht Van Lommel [Thu, 22 Feb 2018 19:04:20 +0000 (20:04 +0100)]
Eevee: add Principled Volume shader.

3 years agoEevee: add blackbody shader node support.
Brecht Van Lommel [Fri, 23 Feb 2018 03:55:54 +0000 (04:55 +0100)]
Eevee: add blackbody shader node support.

This replaces the blackbody to RGB code with the simpler and faster one from
Cycles. It's a little different but the other placing using this is the legacy
volume drawing, so no need to stay compatible with that.

3 years agoGPU: fixes for string socket types in shader nodes.
Brecht Van Lommel [Thu, 22 Feb 2018 19:52:08 +0000 (20:52 +0100)]
GPU: fixes for string socket types in shader nodes.

These are not passed to GLSL functions, but should be used to load e.g.
a texture or attribute.

3 years agoEeevee: add temperature grid support, make color grid unpremultiplied.
Brecht Van Lommel [Thu, 22 Feb 2018 17:51:20 +0000 (18:51 +0100)]
Eeevee: add temperature grid support, make color grid unpremultiplied.

This matches similar changes done for Cycles.

3 years agoMerge branch 'master' into blender2.8
Brecht Van Lommel [Fri, 23 Feb 2018 18:02:49 +0000 (19:02 +0100)]
Merge branch 'master' into blender2.8

3 years agoCycles: add Principled Volume shader.
Brecht Van Lommel [Tue, 30 Jan 2018 14:05:19 +0000 (15:05 +0100)]
Cycles: add Principled Volume shader.

Similar to the Principled BSDF, this should make it easier to set up volume
materials. Smoke and fire can be rendererd with just a single principled
volume node, the appropriate attributes will be used when available. The node
also works for simpler homogeneous volumes like water or mist.

Differential Revision:

3 years agoCycles: change smoke color grid to not include density multiplied in.
Brecht Van Lommel [Sun, 18 Feb 2018 02:16:29 +0000 (03:16 +0100)]
Cycles: change smoke color grid to not include density multiplied in.

This breaks backwards compatibility some, making smoke colors brighters
than before. But it is also more correct this way.

3 years agoCode refactor: improve attribute handling for optional volume attributes.
Brecht Van Lommel [Sun, 18 Feb 2018 02:20:39 +0000 (03:20 +0100)]
Code refactor: improve attribute handling for optional volume attributes.

A volume shader should be able to request attributes, and still be rendered
as homogeneous if no volume attributes are available for the object.

3 years agoSmoke: change default flame temperatures to match OpenGL preview.
Brecht Van Lommel [Sun, 18 Feb 2018 02:24:40 +0000 (03:24 +0100)]
Smoke: change default flame temperatures to match OpenGL preview.

3 years agoSmoke: add temperature grid, with values 0..1 corresponding to 0..1000K.
Brecht Van Lommel [Sun, 18 Feb 2018 02:13:07 +0000 (03:13 +0100)]
Smoke: add temperature grid, with values 0..1 corresponding to 0..1000K.

3 years agoNodes: left align text for color and string sockets, same as other types.
Brecht Van Lommel [Sun, 18 Feb 2018 02:15:13 +0000 (03:15 +0100)]
Nodes: left align text for color and string sockets, same as other types.

3 years agoFix border rendering for eevee + stop passing render result around
Dalai Felinto [Fri, 23 Feb 2018 16:26:28 +0000 (13:26 -0300)]
Fix border rendering for eevee + stop passing render result around

Technically the original issue is that xof/yof in render result is calculated
for drawing border render. So a simpler patch could be:

- rr->xof = re->disprect.xmin;
+ rr->xof = re->disprect.xmin + BLI_rcti_cent_x(&re->disprect) - (re->winx / 2);

However everywhere in the code we are getting border directly from re->disprect
which we may as well do here too.

Besides I'm taking this as a chance to get rid of RenderResult in the internal
loop of eevee, to help prepare the code to the upcoming rendering pipeline

3 years agoFix T54137: OpenEXR files with long red/green/blue channel names not loading correctly.
Brecht Van Lommel [Fri, 23 Feb 2018 13:32:17 +0000 (14:32 +0100)]
Fix T54137: OpenEXR files with long red/green/blue channel names not loading correctly.

3 years agoBuildbot: Enable Volta deviced CUDA binaries
Sergey Sharybin [Fri, 23 Feb 2018 13:24:59 +0000 (14:24 +0100)]
Buildbot: Enable Volta deviced CUDA binaries

3 years agoBuildbot: Remove master configuration files
Sergey Sharybin [Fri, 23 Feb 2018 11:37:05 +0000 (12:37 +0100)]
Buildbot: Remove master configuration files

Those are stored in blender-buildbot repository now, so having them in
Blender only causes extra work to keep files in sync.

3 years agoBuildbot: Disable cuda hack for macOS
Sergey Sharybin [Fri, 23 Feb 2018 09:55:14 +0000 (10:55 +0100)]
Buildbot: Disable cuda hack for macOS

3 years agoMerge branch 'master' into blender2.8
Campbell Barton [Fri, 23 Feb 2018 06:11:53 +0000 (17:11 +1100)]
Merge branch 'master' into blender2.8

3 years agoWM: Add WM_menutype_poll function
Campbell Barton [Fri, 23 Feb 2018 06:01:22 +0000 (17:01 +1100)]
WM: Add WM_menutype_poll function

Wraps menutype poll, no functional changes.

3 years agoMerge branch 'master' into blender2.8
Campbell Barton [Fri, 23 Feb 2018 02:10:39 +0000 (13:10 +1100)]
Merge branch 'master' into blender2.8

3 years agoWM: add WM_keymap_poll function
Campbell Barton [Fri, 23 Feb 2018 01:50:56 +0000 (12:50 +1100)]
WM: add WM_keymap_poll function

Wrapps keymap poll, no functional changes.

3 years agoCleanup: header guards & style
Campbell Barton [Fri, 23 Feb 2018 01:59:02 +0000 (12:59 +1100)]
Cleanup: header guards & style

3 years agoFix T54136: Crash when deleting an object that is in an instanced group
Dalai Felinto [Thu, 22 Feb 2018 20:16:39 +0000 (17:16 -0300)]
Fix T54136: Crash when deleting an object that is in an instanced group

We were not cleaning up groups after deleting objects, leaving groups with
Bases that had no object.

It includes a unittest.

Reviewers: mont29

3 years agoGWN: Fix immediate mode when closing a window.
Clément Foucault [Thu, 22 Feb 2018 15:36:16 +0000 (16:36 +0100)]
GWN: Fix immediate mode when closing a window.

3 years agoDRW: Fix T54135 : Crash caused by wrongly iterating over ListBase.
Clément Foucault [Thu, 22 Feb 2018 18:47:41 +0000 (19:47 +0100)]
DRW: Fix T54135 : Crash caused by wrongly iterating over ListBase.

3 years agoDRW: Fix use of uninitialized call->obmat.
Clément Foucault [Thu, 22 Feb 2018 18:45:20 +0000 (19:45 +0100)]
DRW: Fix use of uninitialized call->obmat.

3 years agoWM: Make sure that immediate mode is active before deactivate it
Germano [Thu, 22 Feb 2018 16:22:28 +0000 (13:22 -0300)]
WM: Make sure that immediate mode is active before deactivate it

3 years agoMerge branch 'master' into blender2.8
Sergey Sharybin [Thu, 22 Feb 2018 15:31:59 +0000 (16:31 +0100)]
Merge branch 'master' into blender2.8

3 years agoDepsgraph: Fix mistake in previous refactor commit
Sergey Sharybin [Thu, 22 Feb 2018 15:30:47 +0000 (16:30 +0100)]
Depsgraph: Fix mistake in previous refactor commit

3 years agoMerge branch 'master' into blender2.8
Sergey Sharybin [Thu, 22 Feb 2018 14:45:41 +0000 (15:45 +0100)]
Merge branch 'master' into blender2.8

3 years agoCleanup: Fix const pointers mess in previous commit.
Bastien Montagne [Thu, 22 Feb 2018 14:41:41 +0000 (15:41 +0100)]
Cleanup: Fix const pointers mess in previous commit.

3 years agoMerge branch 'master' into blender2.8
Bastien Montagne [Thu, 22 Feb 2018 14:22:44 +0000 (15:22 +0100)]
Merge branch 'master' into blender2.8


3 years agoFix (unreported) meshes changing shading when creating empty clnors data.
Bastien Montagne [Thu, 22 Feb 2018 14:00:42 +0000 (15:00 +0100)]
Fix (unreported) meshes changing shading when creating empty clnors data.

When you were using autosmooth to generate some custom normals, and
created empty custom loop normal data, you would go back to an 'all
smooth' shading, cancelling some sharp edges generated by the mesh's
smooth threshold.

Now we will first tag such edges as sharp, such that shading remains the
same. This is not crucial in current master, but it is for clnors
editing gsoc branch!

3 years agoCleanup: clnor code: more 'do not use same varname for two different things'.
Bastien Montagne [Thu, 22 Feb 2018 09:35:08 +0000 (10:35 +0100)]
Cleanup: clnor code: more 'do not use same varname for two different things'.

3 years agoFix T54129: Moving keyframes on top of other keyframes, removes both keyframes
Joshua Leung [Thu, 22 Feb 2018 14:13:56 +0000 (03:13 +1300)]
Fix T54129: Moving keyframes on top of other keyframes, removes both keyframes

Regression caused by earlier commits to improve the automerge behaviour.
In this case, the problems only occurred when moving a selected keyframe
forwards in time to overlap an unselected keyframe.

3 years agoFix: Don't ignore duplicate channels when doing border/circle/lasso select
Joshua Leung [Thu, 22 Feb 2018 13:34:19 +0000 (02:34 +1300)]
Fix: Don't ignore duplicate channels when doing border/circle/lasso select

While it is necessary to ignore duplicates when doing Deselect/Column Select
(where double-updates may result in nothing being selected), for borderselect,
not including the duplicates meant that sometimes, nothing would happen
if you were trying to borderselect keyframes originating from hidden channels.

This was first noticed in the greasepencil-object branch, but affects all
animation channel types.

3 years agoGWN: Context: Fix allocation/codestyle and crash on startup.
Clément Foucault [Thu, 22 Feb 2018 13:31:10 +0000 (14:31 +0100)]
GWN: Context: Fix allocation/codestyle and crash on startup.

3 years agoMerge branch 'master' into blender2.8
Sergey Sharybin [Thu, 22 Feb 2018 13:27:57 +0000 (14:27 +0100)]
Merge branch 'master' into blender2.8

3 years agoDepsgraph: Remove unused argument
Sergey Sharybin [Thu, 22 Feb 2018 13:27:29 +0000 (14:27 +0100)]
Depsgraph: Remove unused argument

3 years agoRemove old depsgraph from modifiers relations update context
Sergey Sharybin [Thu, 22 Feb 2018 13:09:13 +0000 (14:09 +0100)]
Remove old depsgraph from modifiers relations update context

3 years agoMerge branch 'master' into blender2.8
Sergey Sharybin [Thu, 22 Feb 2018 13:08:27 +0000 (14:08 +0100)]
Merge branch 'master' into blender2.8

3 years agoDepsgraph: Remove unused bmain from modifiers relations update context
Sergey Sharybin [Thu, 22 Feb 2018 13:07:08 +0000 (14:07 +0100)]
Depsgraph: Remove unused bmain from modifiers relations update context

3 years agoFix compilation error with legacy depsgraph disabled
Sergey Sharybin [Thu, 22 Feb 2018 12:05:38 +0000 (13:05 +0100)]
Fix compilation error with legacy depsgraph disabled

3 years agoMerge branch 'master' into blender2.8
Sergey Sharybin [Thu, 22 Feb 2018 12:05:00 +0000 (13:05 +0100)]
Merge branch 'master' into blender2.8

3 years agoDepsgraph: Wrap all arguments foe modifiers relations update into a struct
Sergey Sharybin [Thu, 22 Feb 2018 11:54:06 +0000 (12:54 +0100)]
Depsgraph: Wrap all arguments foe modifiers relations update into a struct

Makes it easier to add or remove fields needed to update relations.

3 years agoGWN: Fix use after free crash.
Clément Foucault [Thu, 22 Feb 2018 11:39:57 +0000 (12:39 +0100)]
GWN: Fix use after free crash.

This is not an ideal solution but blender freeing system is already well tangled.
So tracking and clearing vao caches when destroying contexts does prevent bad behaviour.

3 years agoMerge branch 'master' into blender2.8
Sergey Sharybin [Thu, 22 Feb 2018 10:20:28 +0000 (11:20 +0100)]
Merge branch 'master' into blender2.8

3 years agoDepsgraph: Replace LIB_TAG_DOIT with hash lookup
Sergey Sharybin [Thu, 22 Feb 2018 10:03:39 +0000 (11:03 +0100)]
Depsgraph: Replace LIB_TAG_DOIT with hash lookup

This allows us to:

- Not mock around with tags stored in a global space,
    and not to iterate over all datablocks in the database
    to clear the tags.

- Properly deal with datablocks which might not be in main database.

    While it sounds crazy, it might be handy when dealing with preview,
    or some partial scene updates, such as motion paths.

- Avoids majority of places where depsgraph construction needed bmain.

    This is something what could help in blender2.8 branch.

From tests with production file here did not see any measurable slowdown.

Hopefully, there is no functional changes :)

3 years agoDepsgraph: Add utility class to keep track of handled ID datablocks
Sergey Sharybin [Thu, 22 Feb 2018 09:52:43 +0000 (10:52 +0100)]
Depsgraph: Add utility class to keep track of handled ID datablocks

Currently unused, actual logic change will come in the next commit.

3 years agoMerge branch 'master' into blender2.8
Sergey Sharybin [Thu, 22 Feb 2018 09:47:40 +0000 (10:47 +0100)]
Merge branch 'master' into blender2.8

3 years agoDepsgraph: Use proper debug print flags check
Sergey Sharybin [Thu, 22 Feb 2018 09:40:18 +0000 (10:40 +0100)]
Depsgraph: Use proper debug print flags check

Was printing some tagging/evaluation prints when only building
messages were requested.

3 years agoDepsgraph: Report graph construction time when run with --debug-depsgraph-build
Sergey Sharybin [Thu, 22 Feb 2018 09:35:04 +0000 (10:35 +0100)]
Depsgraph: Report graph construction time when run with --debug-depsgraph-build

3 years agoDepsgraph: Cleanup, reduce indentation level
Sergey Sharybin [Thu, 22 Feb 2018 09:31:47 +0000 (10:31 +0100)]
Depsgraph: Cleanup, reduce indentation level

3 years agoWorkSpace: object-mode switching support
Campbell Barton [Thu, 22 Feb 2018 07:15:34 +0000 (18:15 +1100)]
WorkSpace: object-mode switching support

When changing workspaces, existing object-mode data is freed
the new workspaces mode is entered (if possible).

3 years agoAdd NULL checks to ED_object_base_activate
Campbell Barton [Thu, 22 Feb 2018 06:09:25 +0000 (17:09 +1100)]
Add NULL checks to ED_object_base_activate

Passing a NULL active base is valid,
own changes to mode-switching didn't check for this case.

3 years agoWorkSpace: Restore saved object-modes again
Campbell Barton [Thu, 22 Feb 2018 04:52:30 +0000 (15:52 +1100)]
WorkSpace: Restore saved object-modes again

Was temporarily removed when moving object mode to workspace.

Note: there is an issue where eval_ctx->view_layer is NULL on load,
for now pass a view layer argument, we might wan't to set the value

3 years agoRevert "BKE: Changing ID freeing order."
Campbell Barton [Thu, 22 Feb 2018 04:10:43 +0000 (15:10 +1100)]
Revert "BKE: Changing ID freeing order."

This reverts commit 87c72a7d2714de286109573055d5d5da32ece91e.

Caused T54121 which breaks blend file saving.
For now crash on exit is preferable.
Possible solution is to free screen-manipulator batches in a separate

3 years agoMerge branch 'master' into blender2.8
Brecht Van Lommel [Wed, 21 Feb 2018 23:59:32 +0000 (00:59 +0100)]
Merge branch 'master' into blender2.8

3 years agoCycles: add Russian roulette termination for volume multiple scattering.
Brecht Van Lommel [Tue, 20 Feb 2018 14:36:07 +0000 (15:36 +0100)]
Cycles: add Russian roulette termination for volume multiple scattering.

This mainly helps with dense volumes, rendering can be 30% faster with
little noise increase in such scenes.

3 years agoCycles: better path termination for transparency.
Brecht Van Lommel [Tue, 20 Feb 2018 13:22:40 +0000 (14:22 +0100)]
Cycles: better path termination for transparency.

We now continue transparent paths after diffuse/glossy/transmission/volume
bounces are exceeded. This avoids unexpected boundaries in volumes with
transparent boundaries. It is also required for MIS to work correctly with
transparent surfaces, as we also continue through these in shadow rays.

The main visible changes is that volumes will now be lit by the background
even at volume bounces 0, same as surfaces.

Fixes T53914 and T54103.

3 years agoCycles: make principled BSDF node wider in the node editor by default.
Brecht Van Lommel [Mon, 19 Feb 2018 22:47:42 +0000 (23:47 +0100)]
Cycles: make principled BSDF node wider in the node editor by default.

3 years agoCode cleanup: fix incorrect socket names in hair and particle info nodes.
Brecht Van Lommel [Wed, 21 Feb 2018 12:18:40 +0000 (13:18 +0100)]
Code cleanup: fix incorrect socket names in hair and particle info nodes.

3 years agoGWN: Fix compilation on windows
Germano [Wed, 21 Feb 2018 21:58:29 +0000 (18:58 -0300)]
GWN: Fix compilation on windows

3 years agoBKE: Changing ID freeing order.
Clément Foucault [Wed, 21 Feb 2018 21:51:35 +0000 (22:51 +0100)]
BKE: Changing ID freeing order.

Screen can contains manipulators that contains batches to be freed before the opengl contexts (in WM) are destroyed.

Also fix other GPU related free.

3 years agoFix incorrect OSL raytype bits and add some comments.
Brecht Van Lommel [Tue, 20 Feb 2018 13:36:50 +0000 (14:36 +0100)]
Fix incorrect OSL raytype bits and add some comments.

3 years agoFix T54105: random walk SSS missing in branched indirect paths.
Brecht Van Lommel [Mon, 19 Feb 2018 23:15:14 +0000 (00:15 +0100)]
Fix T54105: random walk SSS missing in branched indirect paths.

Unify the path and branched path indirect SSS code. No performance impact
found on CUDA, for AMD split kernel the extra code was already there.

3 years agoFix T54107: bevel shader + normal map gives wrong result.
Brecht Van Lommel [Tue, 20 Feb 2018 19:24:40 +0000 (20:24 +0100)]
Fix T54107: bevel shader + normal map gives wrong result.

3 years agoGawain: VertexFormat: Cleanup
Clément Foucault [Tue, 20 Feb 2018 01:20:40 +0000 (02:20 +0100)]
Gawain: VertexFormat: Cleanup

Reorganize struct elements by size, rename a constant.