blender.git
3 years agoMerge branch 'master' into blender2.8
Campbell Barton [Sat, 29 Apr 2017 06:32:25 +0000 (16:32 +1000)]
Merge branch 'master' into blender2.8

3 years agoCleanup: unused includes
Campbell Barton [Sat, 29 Apr 2017 06:27:29 +0000 (16:27 +1000)]
Cleanup: unused includes

3 years agoCleanup: menu example
Campbell Barton [Sat, 29 Apr 2017 06:20:06 +0000 (16:20 +1000)]
Cleanup: menu example

remove some redundant checks, imports

3 years agoblenderplayer: fix warnings in stubs
Dalai Felinto [Sat, 29 Apr 2017 00:07:39 +0000 (02:07 +0200)]
blenderplayer: fix warnings in stubs

3 years agoCycles: Fix crashes after recent image changes
Mai Lavelle [Fri, 28 Apr 2017 22:47:47 +0000 (18:47 -0400)]
Cycles: Fix crashes after recent image changes

Not sure if this is a proper fix, but was getting frequent crashes, so
committing this real quick just to make master sable again. Can be
reverted later if there's a better fix. The changes to images really
need a closer look...

3 years agoDraw manager: Style cleanups
Dalai Felinto [Fri, 28 Apr 2017 22:54:11 +0000 (00:54 +0200)]
Draw manager: Style cleanups

3 years agoImplementation of custom python entries in all right click menus
Thomas Beck [Fri, 28 Apr 2017 11:01:03 +0000 (13:01 +0200)]
Implementation of custom python entries in all right click menus

Hi Guys,

as one of my clients needs the possibility to have custom menu entries in the general right click menu (all over Blender: in the node editor, properties, toolbars,..) I talked with Campbell about expanding our hard coded menu a bit. This is the outcome. As I only need those two, I support currently a button_prop and a button_pointer.

{F540397}

I tested the changes with a custom script where I added a custom entry and executed an operator on click - it seems to work exactly how it's intended to. The script: {F540435}

As I'm not too experienced in rna stuff I would really appreciate any review.
Thanks very much Campbell for his open ears & help on this issue!

Reviewers: campbellbarton, mont29

Reviewed By: campbellbarton, mont29

Subscribers: sybren, mont29

Tags: #addons

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

3 years agoDisable custom armature colors
Campbell Barton [Fri, 28 Apr 2017 18:25:10 +0000 (04:25 +1000)]
Disable custom armature colors

3 years agoMerge branch 'master' into blender2.8
Campbell Barton [Fri, 28 Apr 2017 17:39:24 +0000 (03:39 +1000)]
Merge branch 'master' into blender2.8

3 years agoCycles support for preview on viewport with core profile
Dalai Felinto [Fri, 28 Apr 2017 17:25:57 +0000 (19:25 +0200)]
Cycles support for preview on viewport with core profile

This upgrade the drawing code to use latest opengl calls.
Also, it adds a fallback shader for opencolorio.

Reviewers: sergey, brecht
Subscribers: merwin, fclem

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

3 years agoGetting rid of setlinestyle: Clip drawing code.
Bastien Montagne [Fri, 28 Apr 2017 17:20:14 +0000 (19:20 +0200)]
Getting rid of setlinestyle: Clip drawing code.

This one has been painful, it's doing lots of nifty conditional drawing
of all kind... Also, very nice illustration of how cumbersome it is to
use dashed shader currently, we really need to find a simpler way at
some point imho. But this is not critical issue either, for now we can
live with some uglyness like that. :/

3 years agoGetting rid of setlinestyle: markers' dashed line in VSE.
Bastien Montagne [Thu, 27 Apr 2017 13:49:10 +0000 (15:49 +0200)]
Getting rid of setlinestyle: markers' dashed line in VSE.

3 years agoMerge branch 'master' into blender2.8
Campbell Barton [Fri, 28 Apr 2017 17:23:54 +0000 (03:23 +1000)]
Merge branch 'master' into blender2.8

3 years agoFix T51324: Auto-Depth fails rotating out of camera
Campbell Barton [Fri, 28 Apr 2017 17:13:49 +0000 (03:13 +1000)]
Fix T51324: Auto-Depth fails rotating out of camera

3 years agoCycles: Use relative path for #line directives
Sergey Sharybin [Fri, 28 Apr 2017 15:46:11 +0000 (17:46 +0200)]
Cycles: Use relative path for #line directives

This way moving Blender bundle around doesn't re-trigger kernels compilation.

3 years agoLibmv: Make ERROR a default printing severity
Sergey Sharybin [Fri, 28 Apr 2017 14:47:35 +0000 (16:47 +0200)]
Libmv: Make ERROR a default printing severity

3 years agoCycles: Correct comment after previous commit
Sergey Sharybin [Fri, 28 Apr 2017 14:47:24 +0000 (16:47 +0200)]
Cycles: Correct comment after previous commit

3 years agoCycles: Lower default severity level to ERROR
Sergey Sharybin [Fri, 28 Apr 2017 14:46:11 +0000 (16:46 +0200)]
Cycles: Lower default severity level to ERROR

3 years agoMerge branch 'master' into blender2.8
Sybren A. Stüvel [Fri, 28 Apr 2017 13:52:07 +0000 (15:52 +0200)]
Merge branch 'master' into blender2.8

3 years agoHide object center and other info when drawing sets
Campbell Barton [Fri, 28 Apr 2017 13:52:02 +0000 (23:52 +1000)]
Hide object center and other info when drawing sets

3 years agoAlembic: use object-oriented approach in ABC_read_mesh()
Sybren A. Stüvel [Fri, 28 Apr 2017 11:48:00 +0000 (13:48 +0200)]
Alembic: use object-oriented approach in ABC_read_mesh()

This is easier to extend than the if/else if/else chain that was in place,
and allows for somewhat more granular error messages.

3 years agoAlembic: Construct ISampleSelector once and pass along
Sybren A. Stüvel [Wed, 26 Apr 2017 14:56:50 +0000 (16:56 +0200)]
Alembic: Construct ISampleSelector once and pass along

3 years agoFix T51331: fixes for Alembic unit tests on Windows
Sybren A. Stüvel [Fri, 28 Apr 2017 13:28:41 +0000 (15:28 +0200)]
Fix T51331: fixes for Alembic unit tests on Windows

3 years agoCycles: De-duplicate bit magic for decoding image options in OpenCL kernel
Sergey Sharybin [Fri, 28 Apr 2017 13:20:34 +0000 (15:20 +0200)]
Cycles: De-duplicate bit magic for decoding image options in OpenCL kernel

3 years agoCycles: Simplify code around maximum OpenCL info size allocation
Sergey Sharybin [Fri, 28 Apr 2017 13:15:15 +0000 (15:15 +0200)]
Cycles: Simplify code around maximum OpenCL info size allocation

3 years agoCycles: Cleanup, de-duplicate image packing of various types
Sergey Sharybin [Fri, 28 Apr 2017 13:08:54 +0000 (15:08 +0200)]
Cycles: Cleanup, de-duplicate image packing of various types

3 years agoCorrect comment, we need wire_outline data in this case
Campbell Barton [Fri, 28 Apr 2017 13:04:29 +0000 (23:04 +1000)]
Correct comment, we need wire_outline data in this case

3 years agoCycles: Quick (real) fix for broken textures on OpenCL
Sergey Sharybin [Fri, 28 Apr 2017 12:56:22 +0000 (14:56 +0200)]
Cycles: Quick (real) fix for broken textures on OpenCL

Previous fix did not work for mixed textures. This one will over-allocate
information array, but it's better than not being able to render at all.

Some more cleanup and improvement is coming.

3 years agoRevert "Cycles: Fix image textures were completely broken since recent unlimited...
Sergey Sharybin [Fri, 28 Apr 2017 12:48:40 +0000 (14:48 +0200)]
Revert "Cycles: Fix image textures were completely broken since recent unlimited textures commit"

This reverts commit 8f4166ee495531fa38b676b0a5ef4c482e89f9a5.

The fix was not correct for cases when we've got float textures.

3 years agoDraw Manager: pose-mode custom bone display
Campbell Barton [Fri, 28 Apr 2017 12:30:21 +0000 (22:30 +1000)]
Draw Manager: pose-mode custom bone display

3 years agoCycles: Cleanup, spelling and braces
Sergey Sharybin [Fri, 28 Apr 2017 12:10:21 +0000 (14:10 +0200)]
Cycles: Cleanup, spelling and braces

3 years agoCycles: Fix image textures were completely broken since recent unlimited textures...
Sergey Sharybin [Fri, 28 Apr 2017 12:04:27 +0000 (14:04 +0200)]
Cycles: Fix image textures were completely broken since recent unlimited textures commit

The indexing was totally wrong in both image packing code and image sampling in kernel.

Fixes T51341: Cycles OpenCL corruption in todays buildbot

3 years agoCycles: Cleanup, always use braces for blocks
Sergey Sharybin [Fri, 28 Apr 2017 11:39:14 +0000 (13:39 +0200)]
Cycles: Cleanup, always use braces for blocks

3 years agoCycles: Cleanup, indentation in preprocessor
Sergey Sharybin [Fri, 28 Apr 2017 11:24:09 +0000 (13:24 +0200)]
Cycles: Cleanup, indentation in preprocessor

3 years agoCycles: Cleanup, use ccl::vector instead of std::vector
Sergey Sharybin [Fri, 28 Apr 2017 11:22:07 +0000 (13:22 +0200)]
Cycles: Cleanup, use ccl::vector instead of std::vector

3 years agoCycles: Cleanup, indentaiton and trailing whitespace and wrapping
Sergey Sharybin [Fri, 28 Apr 2017 11:21:17 +0000 (13:21 +0200)]
Cycles: Cleanup, indentaiton and trailing whitespace and wrapping

3 years agoRecent commit state broke lattice vertex drawing
Campbell Barton [Fri, 28 Apr 2017 08:43:46 +0000 (18:43 +1000)]
Recent commit state broke lattice vertex drawing

e4d856e3 caused lattice vertices not to draw in editmode.

3 years agoFix draw manager draw-modes interfering with eachother
Campbell Barton [Thu, 27 Apr 2017 19:22:30 +0000 (05:22 +1000)]
Fix draw manager draw-modes interfering with eachother

3 years agoDraw Manager: basic text overlay support
Campbell Barton [Thu, 27 Apr 2017 18:33:58 +0000 (04:33 +1000)]
Draw Manager: basic text overlay support

3 years agoOpenGL: manage legacy state only when WITH_LEGACY_OPENGL=ON
Mike Erwin [Thu, 27 Apr 2017 18:32:47 +0000 (14:32 -0400)]
OpenGL: manage legacy state only when WITH_LEGACY_OPENGL=ON

- enabled lights
- alpha test
- texture environment
- point sprites (always enabled in modern GL)

Moved is_clip_plane for better struct packing, no functional change there.

Part of T51164

3 years agoOpenGL: don't set texture LoD bias via glTexEnvf
Mike Erwin [Thu, 27 Apr 2017 18:24:32 +0000 (14:24 -0400)]
OpenGL: don't set texture LoD bias via glTexEnvf

Not supported in core profile. We could do this in GLSL if it's really needed.

Part of T51164

3 years agoOpenGL: early exit from functions that don't mix with core profile
Mike Erwin [Thu, 27 Apr 2017 18:00:38 +0000 (14:00 -0400)]
OpenGL: early exit from functions that don't mix with core profile

These parts will not be part of final viewport, but are called indirectly during the transition. To avoid runtime errors on core profile, exit early -- functions effectively do nothing.

I put the early exits inside the functions to avoid cluttering the code that calls these. But (long term) the calling functions need to change.

Basic shader's detect_options function was unused and full of old, so I deleted it.

Part of T51164

3 years agoOpenGL: fix color logic op
Mike Erwin [Thu, 27 Apr 2017 18:18:33 +0000 (14:18 -0400)]
OpenGL: fix color logic op

GL_LOGIC_OP is a synonym for GL_INDEX_LOGIC_OP, from OpenGL 1.0's indexed color drawing. It's not part of modern GL and causes an error in core profile.

GL_COLOR_LOGIC_OP is still supported in the latest GL. It's the last stage before writing to the framebuffer.

Part of T51164

3 years agoAdd back text color for legacy drawing
Campbell Barton [Thu, 27 Apr 2017 17:04:51 +0000 (03:04 +1000)]
Add back text color for legacy drawing

3 years agoGawain: safely orphan immediate mode's VBO
Mike Erwin [Thu, 27 Apr 2017 14:16:20 +0000 (10:16 -0400)]
Gawain: safely orphan immediate mode's VBO

There are multiple ways to orphan a buffer resource, and this code picks the oldest/safest way no matter which OpenGL version we're running.

TODO: use other (more recent) methods after thorough testing

Follow up to 8e0c57a812e8

3 years agoOpenGL: don't glGet(GL_RED_BITS) in core profile
Mike Erwin [Wed, 26 Apr 2017 22:06:00 +0000 (18:06 -0400)]
OpenGL: don't glGet(GL_RED_BITS) in core profile

or GREEN or BLUE. These are deprecated and cause errors under core profile.

TODO: get color depth value another way

Part of T51164

3 years agoOpenGL: stop enabling GL_TEXTURE
Mike Erwin [Thu, 27 Apr 2017 15:24:35 +0000 (11:24 -0400)]
OpenGL: stop enabling GL_TEXTURE

Texturing is always enabled in GLSL. Simply use a sampler in the shader.

Replaced gpu_generate_mipmap with glGenerateMipmap since the former just Enabled/Disabled the texture target and called the latter.

Part of T51164

3 years agoOpenGL: stop using GL_NORMALIZE
Mike Erwin [Thu, 27 Apr 2017 14:35:12 +0000 (10:35 -0400)]
OpenGL: stop using GL_NORMALIZE

With GLSL there is no need for GL_NORMALIZE. We explicitly normalize in the shader, or (better) send in unit vectors.

Part of T51164

3 years agoGawain: fix pointer arithmetic warning
Mike Erwin [Thu, 27 Apr 2017 13:59:19 +0000 (09:59 -0400)]
Gawain: fix pointer arithmetic warning

void* + offset = ???

This Mac-only code works, but wasn't strictly correct. clang doesn't warn about this, gcc does.

3 years agofix Clay compatibility comment
Mike Erwin [Wed, 26 Apr 2017 22:12:52 +0000 (18:12 -0400)]
fix Clay compatibility comment

When building WITH_LEGACY_OPENGL, Mac uses GL 2.1, Mesa uses GL 3.0. Has nothing to do with Intel!

Clay assumes GL 3.3 is available.

3 years agoOpenGL: restore all 8 lights
Mike Erwin [Wed, 26 Apr 2017 21:59:51 +0000 (17:59 -0400)]
OpenGL: restore all 8 lights

fixes a copy/paste mistake

3 years agoOpenGL: remove GL_MAP1_VERTEX_3
Mike Erwin [Wed, 26 Apr 2017 21:55:59 +0000 (17:55 -0400)]
OpenGL: remove GL_MAP1_VERTEX_3

This is related to OpenGL evaluators (old feature). From my understanding, we don't seem to be actually using it.

Part of T51164

3 years agosupport OpenGL 3.0 on Linux only when WITH_LEGACY_OPENGL=ON
Mike Erwin [Wed, 26 Apr 2017 21:23:43 +0000 (17:23 -0400)]
support OpenGL 3.0 on Linux only when WITH_LEGACY_OPENGL=ON

Part of T49012

3 years agoGetting rid of setlinestyle: transform code.
Bastien Montagne [Thu, 27 Apr 2017 13:27:00 +0000 (15:27 +0200)]
Getting rid of setlinestyle: transform code.

Note that I also made 'dash anchor point' consistent (the static one,
not the mouse one), in previous code somtimes dashed were anchored to
the static center point, in others, to the moving mouse position, the
later was rather disturbing imho...

3 years agoFix: T50271: Bilateral/Directional blur's iterations is zero by default
brunoT [Thu, 27 Apr 2017 12:54:06 +0000 (08:54 -0400)]
Fix: T50271: Bilateral/Directional blur's iterations is zero by default

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

3 years agoError in last commit
Campbell Barton [Thu, 27 Apr 2017 12:01:31 +0000 (22:01 +1000)]
Error in last commit

3 years agoCleanup: split cmake source/headers
Campbell Barton [Thu, 27 Apr 2017 11:58:43 +0000 (21:58 +1000)]
Cleanup: split cmake source/headers

3 years agoRevert "Fix T51328: Add note to cmdline help that threads must be first"
Campbell Barton [Thu, 27 Apr 2017 11:48:01 +0000 (21:48 +1000)]
Revert "Fix T51328: Add note to cmdline help that threads must be first"

The help message already notes that argument order matters,
and this doesn't need to be the first.

3 years agoMerge branch 'master' into blender2.8
Campbell Barton [Thu, 27 Apr 2017 11:41:57 +0000 (21:41 +1000)]
Merge branch 'master' into blender2.8

3 years agoCleanup: spelling
Campbell Barton [Thu, 27 Apr 2017 11:40:18 +0000 (21:40 +1000)]
Cleanup: spelling

3 years agoCleanup: remove unused matrix arg
Campbell Barton [Thu, 27 Apr 2017 11:35:31 +0000 (21:35 +1000)]
Cleanup: remove unused matrix arg

3 years ago3D widgets were obscured by view geometry
Campbell Barton [Thu, 27 Apr 2017 09:43:27 +0000 (19:43 +1000)]
3D widgets were obscured by view geometry

3 years agoPose-mode drawing used alpha where it shouldn't
Campbell Barton [Thu, 27 Apr 2017 09:31:19 +0000 (19:31 +1000)]
Pose-mode drawing used alpha where it shouldn't

3 years agoCleanup: Some style and code tweaks to Image Code after changes.
Thomas Dinges [Thu, 27 Apr 2017 09:11:08 +0000 (11:11 +0200)]
Cleanup: Some style and code tweaks to Image Code after changes.

Whitespace and order of switch/case etc. Let's try to stick to float4/byte4/half4/float/byte/half order as defined in "ImageDataType".

3 years agoFix gpuScaleUniform (caused strange pose-bone size)
Campbell Barton [Thu, 27 Apr 2017 08:44:57 +0000 (18:44 +1000)]
Fix gpuScaleUniform (caused strange pose-bone size)

3 years agoUse pose-mode colors for pose-bone drawing
Campbell Barton [Thu, 27 Apr 2017 08:17:47 +0000 (18:17 +1000)]
Use pose-mode colors for pose-bone drawing

Also move static vars into structs

3 years agoUnlimited number of textures for Cycles
Stefan Werner [Thu, 27 Apr 2017 07:34:51 +0000 (09:34 +0200)]
Unlimited number of textures for Cycles

This patch allows for an unlimited number of textures in Cycles where the hardware allows. It replaces a number static arrays with dynamic arrays and changes the way the flat_slot indices are calculated. Eventually, I'd like to get to a point where there are only flat slots left and textures off all kinds are stored in a single array.

Note that the arrays in DeviceScene are changed from containing device_vector<T> objects to device_vector<T>* pointers. Ideally, I'd like to store objects, but dynamic resizing of a std:vector in pre-C++11 calls the copy constructor, which for a good reason is not implemented for device_vector. Once we require C++11 for Cycles builds, we can implement a move constructor for device_vector and store objects again.

The limits for CUDA Fermi hardware still apply.

Reviewers: tod_baudais, InsigMathK, dingto, #cycles

Reviewed By: dingto, #cycles

Subscribers: dingto, smellslikedonkey

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

3 years agoCleanup: use doxy groups for armature
Campbell Barton [Thu, 27 Apr 2017 07:06:52 +0000 (17:06 +1000)]
Cleanup: use doxy groups for armature

3 years agoFix basic pose-mode select drawing
Campbell Barton [Thu, 27 Apr 2017 06:57:11 +0000 (16:57 +1000)]
Fix basic pose-mode select drawing

3 years agoFix wrong scene assigned when using sets
Campbell Barton [Thu, 27 Apr 2017 06:21:56 +0000 (16:21 +1000)]
Fix wrong scene assigned when using sets

Depsgraph was left with wrong set-scene.

3 years agoFix/workaround crash with non mesh geometry
Campbell Barton [Thu, 27 Apr 2017 05:56:04 +0000 (15:56 +1000)]
Fix/workaround crash with non mesh geometry

eevee was crashing on curve grometry, draw without material for now.

3 years agoFix T51328: Add note to cmdline help that threads must be first
Aaron Carlisle [Thu, 27 Apr 2017 02:44:43 +0000 (22:44 -0400)]
Fix T51328: Add note to cmdline help that threads must be first

3 years agoCycles: Allow samples to finish in split kernel to avoid artifacts when canceling
Mai Lavelle [Wed, 26 Apr 2017 14:22:48 +0000 (10:22 -0400)]
Cycles: Allow samples to finish in split kernel to avoid artifacts when canceling

Previously canceling a render done by the split kernel could cause artifacts
such as very bright or dark tiles. This was caused by unfinished samples
being included in the output buffer. To avoid this we now wait till all the
currently rendering samples have finished, up to a limit of twice the
expected time for them to finish (currently this is no more than 20 seconds,
but usually its much less). If samples still haven't finished by then we
stop anyways in case there's an endless loop occurring.

3 years agoCycles: Change OpenCL split kernel to use single program by default
Mai Lavelle [Wed, 26 Apr 2017 14:05:10 +0000 (10:05 -0400)]
Cycles: Change OpenCL split kernel to use single program by default

Single program builds twice as fast as multi programs, so its better for
users to have it as the default.

3 years agoCycles: Enable Correlated Multi Jitter for OpenCL and split kernel
Mai Lavelle [Fri, 21 Apr 2017 03:14:34 +0000 (23:14 -0400)]
Cycles: Enable Correlated Multi Jitter for OpenCL and split kernel

Testing showed no issues so there's no reason to not have this.

3 years ago[msvc/make.bat] Provide a convenience rebuild.cmd in the build folder for easy rebuilds.
lazydodo [Wed, 26 Apr 2017 14:46:35 +0000 (08:46 -0600)]
[msvc/make.bat] Provide a convenience rebuild.cmd in the build folder for easy rebuilds.

3 years agoGetting rid of setlinestyle: Paint 'line' strokes.
Bastien Montagne [Wed, 26 Apr 2017 19:22:05 +0000 (21:22 +0200)]
Getting rid of setlinestyle: Paint 'line' strokes.

3 years agoGetting rid of setlinestyle: armature drawing code.
Bastien Montagne [Wed, 26 Apr 2017 18:56:10 +0000 (20:56 +0200)]
Getting rid of setlinestyle: armature drawing code.

Firts usage of 3D version of new dashed line shader... Though not sure
whether that code will be kept for long?

3 years agoAdd 3D version of dashed line shader.
Bastien Montagne [Wed, 26 Apr 2017 18:55:14 +0000 (20:55 +0200)]
Add 3D version of dashed line shader.

This is actually nearly same code as 2D version, maybe we can
deduplicate that later?

3 years ago2D dashed line shader: changed to use viewport side instead of scale.
Bastien Montagne [Wed, 26 Apr 2017 18:51:17 +0000 (20:51 +0200)]
2D dashed line shader: changed to use viewport side instead of scale.

The scale version was working(ish), but it was not really extendable to
a 3D line version of the shader.

Also note that sequencer view still keeps its 'UI scale' adaptation
(dashes grow together with UI scale setting). Would be nice to do that
everywhere ultimately imho, but nothing urgent here.

3 years agoCleanup: rename select engine -> basic
Campbell Barton [Wed, 26 Apr 2017 16:49:13 +0000 (02:49 +1000)]
Cleanup: rename select engine -> basic

This is used by depth drawing too and had no selection specific code.

3 years agoPass graph to depth functions
Campbell Barton [Wed, 26 Apr 2017 16:36:56 +0000 (02:36 +1000)]
Pass graph to depth functions

3 years agoDraw Manager: cleanup, use doxy categories
Campbell Barton [Wed, 26 Apr 2017 16:04:56 +0000 (02:04 +1000)]
Draw Manager: cleanup, use doxy categories

Also add DRW_state for accessing current draw state.

3 years agoDraw Manager: use engine drawing for depth drawing
Campbell Barton [Wed, 26 Apr 2017 15:43:05 +0000 (01:43 +1000)]
Draw Manager: use engine drawing for depth drawing

3 years agoView3D: move depth drawing into own function
Campbell Barton [Wed, 26 Apr 2017 15:01:20 +0000 (01:01 +1000)]
View3D: move depth drawing into own function

No functional changes

3 years agoMerge branch 'master' into 28
Campbell Barton [Wed, 26 Apr 2017 14:58:28 +0000 (00:58 +1000)]
Merge branch 'master' into 28

3 years agoMerge commit 'master@6ed15c5a41130b55cb57a43a8a9470a91d38c3d5' into blender2.8
Sybren A. Stüvel [Wed, 26 Apr 2017 14:50:29 +0000 (16:50 +0200)]
Merge commit 'master@6ed15c5a41130b55cb57a43a8a9470a91d38c3d5' into blender2.8

# Conflicts:
# source/blender/alembic/intern/abc_exporter.cc

3 years agoCycles: Allow samples to finish in split kernel to avoid artifacts when canceling
Mai Lavelle [Wed, 26 Apr 2017 14:22:48 +0000 (10:22 -0400)]
Cycles: Allow samples to finish in split kernel to avoid artifacts when canceling

Previously canceling a render done by the split kernel could cause artifacts
such as very bright or dark tiles. This was caused by unfinished samples
being included in the output buffer. To avoid this we now wait till all the
currently rendering samples have finished, up to a limit of twice the
expected time for them to finish (currently this is no more than 20 seconds,
but usually its much less). If samples still haven't finished by then we
stop anyways in case there's an endless loop occurring.

3 years agoCycles: Change OpenCL split kernel to use single program by default
Mai Lavelle [Wed, 26 Apr 2017 14:05:10 +0000 (10:05 -0400)]
Cycles: Change OpenCL split kernel to use single program by default

Single program builds twice as fast as multi programs, so its better for
users to have it as the default.

3 years agoCycles: Enable Correlated Multi Jitter for OpenCL and split kernel
Mai Lavelle [Fri, 21 Apr 2017 03:14:34 +0000 (23:14 -0400)]
Cycles: Enable Correlated Multi Jitter for OpenCL and split kernel

Testing showed no issues so there's no reason to not have this.

3 years ago[msvc/make.bat] Provide a convenience rebuild.cmd in the build folder for easy rebuilds.
lazydodo [Wed, 26 Apr 2017 14:46:35 +0000 (08:46 -0600)]
[msvc/make.bat] Provide a convenience rebuild.cmd in the build folder for easy rebuilds.

3 years agoCycles: Fix over-allocation of triangles storage for triangle primitive hair
Sergey Sharybin [Wed, 26 Apr 2017 13:58:40 +0000 (15:58 +0200)]
Cycles: Fix over-allocation of triangles storage for triangle primitive hair

Was also causing some bad memory access caused by read data from non-initialized
arrays.

Repoted by bzztploink in IRC, thanks!

3 years agoFix race condition invalidating object data's bounding box
Sergey Sharybin [Wed, 26 Apr 2017 13:40:32 +0000 (15:40 +0200)]
Fix race condition invalidating object data's bounding box

3 years agoEnsure task scheduler exists before any threading starts in Blender
Sergey Sharybin [Wed, 26 Apr 2017 13:23:46 +0000 (15:23 +0200)]
Ensure task scheduler exists before any threading starts in Blender

3 years agoAvoid race condition copying Scene for off-thread OpenGL image save
Sergey Sharybin [Wed, 26 Apr 2017 13:11:58 +0000 (15:11 +0200)]
Avoid race condition copying Scene for off-thread OpenGL image save

3 years agoUser preferences: Use checkbox for Cycles device selection
Sergey Sharybin [Wed, 26 Apr 2017 13:06:31 +0000 (15:06 +0200)]
User preferences: Use checkbox for Cycles device selection

It was totally unclear whether the device is enabled or disabled.
Lots of people got fully lost in the current interface.

While the solution is not fully ideal, it is at least solves
ambiguity in the interface.

3 years agoThreading: Remove thread lock which seems useless
Sergey Sharybin [Wed, 26 Apr 2017 12:50:21 +0000 (14:50 +0200)]
Threading: Remove thread lock which seems useless

Render data is never guarded by image drawe lock.

3 years agoMove depth select loop into its own function
Campbell Barton [Wed, 26 Apr 2017 14:01:23 +0000 (00:01 +1000)]
Move depth select loop into its own function

Useful for splitting out draw logic in 2.8x

3 years agoAlembic export: support simple child hairs (Fix T51144)
Sybren A. Stüvel [Wed, 26 Apr 2017 13:31:03 +0000 (15:31 +0200)]
Alembic export: support simple child hairs (Fix T51144)

Simple child hairs don't have a face index number assigned, so the
call to dm->getTessFaceData(dm, num, CD_MFACE) would cause a crash. To
work around this, UV and normal vectors are copied from the parent
hair.

I've also removed an unnecessary call to dm->getTessFaceArray(dm);

Reviewers: kevindietrich

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

3 years agoAlembic: fixed indentation
Sybren A. Stüvel [Wed, 26 Apr 2017 13:17:28 +0000 (15:17 +0200)]
Alembic: fixed indentation