blender.git
3 years agoCycles: Fix occasional black pixels from denoising with excessive radii
Lukas Stockner [Mon, 8 May 2017 20:09:35 +0000 (22:09 +0200)]
Cycles: Fix occasional black pixels from denoising with excessive radii

Numerical inaccuracies would cause the XtWX matrix to be no longer
positive-semidefinite, which in turn caused the LSQ solver to fail.

3 years agoupdate new 2.79 themes: T50869
meta-androcto [Thu, 11 May 2017 00:27:16 +0000 (10:27 +1000)]
update new 2.79 themes: T50869

3 years agoFix Blenderplayer stubs
Lukas Stockner [Wed, 10 May 2017 23:13:32 +0000 (01:13 +0200)]
Fix Blenderplayer stubs

The change from 62aa925c11d0 wasn't included.

3 years agoSculpt Drawing: reduce redundant color conversion
Campbell Barton [Wed, 10 May 2017 21:34:56 +0000 (07:34 +1000)]
Sculpt Drawing: reduce redundant color conversion

Also replace macro with for loop.

3 years agoFix T51455: Render Layers in compositor from a different scene not working
Lukas Stockner [Wed, 10 May 2017 20:39:43 +0000 (22:39 +0200)]
Fix T51455: Render Layers in compositor from a different scene not working

The code only updated nodes in the nodetree of the scene to which the render layer belongs. Therefore, when using scene B in the compositor setup of scene A, A's node wouldn't be updated.
With this fix, the update function loops over all scenes and checks them for relevant nodes.

3 years agoFix missing relation in new DEG between World and its NodeTree.
Bastien Montagne [Wed, 10 May 2017 08:31:33 +0000 (10:31 +0200)]
Fix missing relation in new DEG between World and its NodeTree.

Was preventing update in 3DView etc. when changing something in the
World's NodeTree, especially annoying in blender2.8 branch (since legacy
depsgraph has been removed there), but also affecting master.

3 years agoUI: editor menu, swap Text and node editors
Aaron Carlisle [Wed, 10 May 2017 15:27:20 +0000 (11:27 -0400)]
UI: editor menu, swap Text and node editors

Proposed by @sebastian_k and approved by @severin over IRC.

Follows up on rB0f561da5fb77540626aec7a995314271a91acdf6

3 years agoFix T51354: Final take on multi-view (single view) issues
Dalai Felinto [Wed, 10 May 2017 14:54:01 +0000 (16:54 +0200)]
Fix T51354: Final take on multi-view (single view) issues

We now handle selection and transform manipulators
(kudos to Julian Eisel to help hunting down the latter).

3 years agoFixup for multi-view single eye viewport issues
Dalai Felinto [Wed, 10 May 2017 11:13:55 +0000 (13:13 +0200)]
Fixup for multi-view single eye viewport issues

In d2f1f80a6fa I was always calling view3d_main_regio_setup_view with
NULL matrices, which is not always correct.

3 years agoPartial fix to Multi-View single eye issues in viewport
Dalai Felinto [Tue, 9 May 2017 17:21:22 +0000 (19:21 +0200)]
Partial fix to Multi-View single eye issues in viewport

Handling depth loop for now (3d cursor positioning). Selection is a bit
more tricky.

Reported on 51354

3 years agoFix errors in vse ui commit
Aaron Carlisle [Tue, 9 May 2017 18:36:00 +0000 (14:36 -0400)]
Fix errors in vse ui commit

- Fixes double labels
- Fixes an aligned layout when un-needed
- Fixes an error were a layout can become disabled but never enabled again

3 years agoFix (unreported): Crash if a right click is performed on an image datablock (open...
Thomas Beck [Tue, 9 May 2017 18:12:25 +0000 (20:12 +0200)]
Fix (unreported): Crash if a right click is performed on an image datablock (open btn f.e.).

Only access/insert the button_pointer if it's not null...

3 years agoCycles: Use more stable version of integer square root function
Sergey Sharybin [Tue, 9 May 2017 14:12:06 +0000 (16:12 +0200)]
Cycles: Use more stable version of integer square root function

Old code was working quite unreliable in combination with fast math
flag, especially when compiling with Clang. It seems we were hitting
result of the following bug submitted to Clang [1].

Basically, it was happening so that (int)sqrtf(64) was 7 when Cycles
is built with Clang but was correct 8 when built with GCC.

This commit works this around. Annoying, but don't see other way to
keep sampling pattern the same for Clang and GCC.

[1] https://bugs.llvm.org//show_bug.cgi?id=24063

3 years agoCycles: Properly free memory used by KernelGlobals
Sergey Sharybin [Tue, 9 May 2017 14:29:29 +0000 (16:29 +0200)]
Cycles: Properly free memory used by KernelGlobals

Previous logic did not free memory used by vector classes
which were storing images, causing memory leaks.

3 years agoFix denoiser tooltip
Jens Verwiebe [Tue, 9 May 2017 12:44:59 +0000 (14:44 +0200)]
Fix denoiser tooltip

3 years agoFix T51434: Module math operation is wrong in GLSL shading
Carlo Andreacchio [Tue, 9 May 2017 10:31:19 +0000 (12:31 +0200)]
Fix T51434: Module math operation is wrong in GLSL shading

Based on patch from @lazydodo.

Reviewers: sergey

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

3 years agoCycles: Enable BPT for NVidia OpenCL
Sergey Sharybin [Tue, 9 May 2017 09:44:18 +0000 (11:44 +0200)]
Cycles: Enable BPT for NVidia OpenCL

3 years agoFix assert failure caused by bug in sequencer interface script
Sergey Sharybin [Tue, 9 May 2017 08:44:31 +0000 (10:44 +0200)]
Fix assert failure caused by bug in sequencer interface script

If icon_only is True then one must not pass text attribute.

3 years agoLibmv: Fix strict compiler warnings, unused variables
Sergey Sharybin [Tue, 9 May 2017 08:16:42 +0000 (10:16 +0200)]
Libmv: Fix strict compiler warnings, unused variables

3 years agoUI: Editor menu, move VSE below MCE
Aaron Carlisle [Tue, 9 May 2017 03:32:06 +0000 (23:32 -0400)]
UI: Editor menu, move VSE below MCE

The idea here is to keep things in a logical order to match the order of ones worflow.
This concept can be seen in Graph > Dope Sheet > NLA. This issue is mainly affecting the manual.

Fixes T50709

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

3 years agoFix missing render update when building without OCIO but having GLSL image draw method
Sergey Sharybin [Mon, 8 May 2017 15:43:32 +0000 (17:43 +0200)]
Fix missing render update when building without OCIO but having GLSL image draw method

3 years agoCycles: Fix compilation error with gcc-6.3.0 and debug mode
Sergey Sharybin [Mon, 8 May 2017 13:40:48 +0000 (15:40 +0200)]
Cycles: Fix compilation error with gcc-6.3.0 and debug mode

3 years agoFix capitalization in some particle panels
Luca Rood [Mon, 8 May 2017 13:24:05 +0000 (15:24 +0200)]
Fix capitalization in some particle panels

3 years agoSequencer: Fix broken interface script since 415ff74
Sergey Sharybin [Mon, 8 May 2017 12:54:49 +0000 (14:54 +0200)]
Sequencer: Fix broken interface script since 415ff74

3 years agoFix T51432: Find Files case sensitive on win32
Campbell Barton [Sun, 7 May 2017 23:42:36 +0000 (09:42 +1000)]
Fix T51432: Find Files case sensitive on win32

3 years agoUI: Cleanup VSE Properties Shelf
Mike Pan [Sun, 7 May 2017 22:13:50 +0000 (18:13 -0400)]
UI: Cleanup VSE Properties Shelf

The goal is to reduce wasted space and improve clarity in the 'N' panel of the VSE through layout changes.
The changes are intentional conservative to avoid making people re-learn anything.

Author: @mpan3

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

3 years agoRemove unused node socket flag that was added in the render pass commit
Lukas Stockner [Sun, 7 May 2017 18:32:51 +0000 (20:32 +0200)]
Remove unused node socket flag that was added in the render pass commit

3 years agoCycles: Fix transform addressing in the denoiser code
Lukas Stockner [Sun, 7 May 2017 18:48:24 +0000 (20:48 +0200)]
Cycles: Fix transform addressing in the denoiser code

3 years ago[Cycles] Fix math problems in safe_logf
lazydodo [Sun, 7 May 2017 15:16:14 +0000 (09:16 -0600)]
[Cycles] Fix math problems in safe_logf

log(0) is undefined and should not have been included
log(1) == 0, dividing by zero is not recommended

3 years agoColor management: add Filmic view transform to Blender configuration.
Brecht Van Lommel [Sun, 7 May 2017 14:41:38 +0000 (16:41 +0200)]
Color management: add Filmic view transform to Blender configuration.

* "Filmic" and "False Color" view transforms added (sRGB display device only).
* "Very Low/Low/Base/High/Very High Contrast" looks added.
* Added filtering so that Filmic only shows look names prefixed with "Filmic - ".

Filmic Dynamic Range LUT configuration created by Troy James Sobotka with
special thanks and feedback from Guillermo, Claudio Rocha, Bassam Kurdali,
Eugenio Pignataro, Henri Hebeisen, Jason Clarke, Haarm-Peter Duiker, Thomas
Mansencal, and Timothy Lottes.

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

3 years agoCycles: Implement denoising option for reducing noise in the rendered image
Lukas Stockner [Sun, 7 May 2017 12:40:58 +0000 (14:40 +0200)]
Cycles: Implement denoising option for reducing noise in the rendered image

This commit contains the first part of the new Cycles denoising option,
which filters the resulting image using information gathered during rendering
to get rid of noise while preserving visual features as well as possible.

To use the option, enable it in the render layer options. The default settings
fit a wide range of scenes, but the user can tweak individual settings to
control the tradeoff between a noise-free image, image details, and calculation
time.

Note that the denoiser may still change in the future and that some features
are not implemented yet. The most important missing feature is animation
denoising, which uses information from multiple frames at once to produce a
flicker-free and smoother result. These features will be added in the future.

Finally, thanks to all the people who supported this project:

- Google (through the GSoC) and Theory Studios for sponsoring the development
- The authors of the papers I used for implementing the denoiser (more details
  on them will be included in the technical docs)
- The other Cycles devs for feedback on the code, especially Sergey for
  mentoring the GSoC project and Brecht for the code review!
- And of course the users who helped with testing, reported bugs and things
  that could and/or should work better!

3 years agoCleanup: use index syntax instead of addition
Campbell Barton [Sat, 6 May 2017 17:12:39 +0000 (03:12 +1000)]
Cleanup: use index syntax instead of addition

Harmless but made accessing the first element read strangely.

3 years agoCleanup: use uint/ushort for polyfill2d
Campbell Barton [Sat, 6 May 2017 16:19:56 +0000 (02:19 +1000)]
Cleanup: use uint/ushort for polyfill2d

3 years agoCleanup: use const pointers where possible
Campbell Barton [Sat, 6 May 2017 15:59:37 +0000 (01:59 +1000)]
Cleanup: use const pointers where possible

3 years agoFix PyAPI crash assigning/deleting id-properties
Campbell Barton [Sat, 6 May 2017 13:26:18 +0000 (23:26 +1000)]
Fix PyAPI crash assigning/deleting id-properties

Caused by D113.

3 years agoCleanup: unused return, redundant assignments
Campbell Barton [Sat, 6 May 2017 12:36:21 +0000 (22:36 +1000)]
Cleanup: unused return, redundant assignments

3 years agobmesh: use 'uint' instead of 'unsigned int'
Campbell Barton [Sat, 6 May 2017 04:18:31 +0000 (14:18 +1000)]
bmesh: use 'uint' instead of 'unsigned int'

no functional changes.

3 years agoCleanup: line length, use const struct members
Campbell Barton [Sat, 6 May 2017 01:06:20 +0000 (11:06 +1000)]
Cleanup: line length, use const struct members

3 years agoCycles: Fix access array index of -1 in SSS and volume split kernels
Sergey Sharybin [Fri, 5 May 2017 15:54:03 +0000 (17:54 +0200)]
Cycles: Fix access array index of -1 in SSS and volume split kernels

3 years agoCycles: Cleanup, indentation
Sergey Sharybin [Fri, 5 May 2017 14:52:23 +0000 (16:52 +0200)]
Cycles: Cleanup, indentation

3 years agoMakeLocal: fix bad (missing) handling of proxy_from uglyness.
Bastien Montagne [Fri, 5 May 2017 14:15:55 +0000 (16:15 +0200)]
MakeLocal: fix bad (missing) handling of proxy_from uglyness.

Those shall not be considered while checking whether a to-be-made-local
ID will end up fully local, or still be partially used by linked data...
Even less since we already do have special handling of proxies later.

Fixes main remaining issue found with 04_01_H.lighting.blend Agent327
file, and allows us to switch back to optimized post-processing in
make_local code.

3 years agoAdd a new LOOPBACK flag to libquery's callbacks.
Bastien Montagne [Fri, 5 May 2017 14:13:01 +0000 (16:13 +0200)]
Add a new LOOPBACK flag to libquery's callbacks.

That one tags those ugly little 'from' ID pointers (shape keys and
proxies), which point back from used to user ID, and require a lot of
special care in data-block management...

3 years agoMasks: Fix broken animation after adding primitives
Sergey Sharybin [Fri, 5 May 2017 11:49:46 +0000 (13:49 +0200)]
Masks: Fix broken animation after adding primitives

Was missing mask shape initialization.

Not ideal from the CPU ticks point of view, but will work for now.

3 years agoCycles: Split kernel SSS & Volume data definitions cleanup
Hristo Gueorguiev [Fri, 5 May 2017 11:39:52 +0000 (13:39 +0200)]
Cycles: Split kernel SSS & Volume data definitions cleanup

3 years agoCycles: Show samples progress for OpenCL split kernel
Hristo Gueorguiev [Fri, 5 May 2017 11:31:21 +0000 (13:31 +0200)]
Cycles: Show samples progress for OpenCL split kernel

3 years agoCycles: Workaround for AMD GPU OpenCL compiler
Hristo Gueorguiev [Fri, 5 May 2017 10:57:01 +0000 (12:57 +0200)]
Cycles: Workaround for AMD GPU OpenCL compiler

Fix for SSS in BPT.

3 years agoFix (unreported) memleak in Warp modifier copying.
Bastien Montagne [Fri, 5 May 2017 08:36:23 +0000 (10:36 +0200)]
Fix (unreported) memleak in Warp modifier copying.

3 years agoMakeLocal: switch back to secure, slightly slower final steps.
Bastien Montagne [Fri, 5 May 2017 07:52:31 +0000 (09:52 +0200)]
MakeLocal: switch back to secure, slightly slower final steps.

Again, Agent327's 04_01_H.lighting.blend shows some problem here, it
triggers several times the 'not used at all' assert in step 5 of secure
code, and with optimized version we lose the connection between
rigs and the main characters!

Will keep investigating on this, but for now let's try to give something
working to the studio.

3 years agoMakeLocal: forcefully recalc affected armatures' poses.
Bastien Montagne [Fri, 5 May 2017 07:49:30 +0000 (09:49 +0200)]
MakeLocal: forcefully recalc affected armatures' poses.

This should not be needed imho, we already set POSE_RECALC flag
correctly there, but it still is missing actual update of poses in some
(complex and convoluted) cases. So at least for now, let's go with this
hack, it's not really harming anyone anyway.

Fixes crash in Agent327's 04_01_H.lighting.blend when making all local.

3 years agoAdd check (error message + assert) that pose is valid in armature evaluation.
Bastien Montagne [Fri, 5 May 2017 07:47:35 +0000 (09:47 +0200)]
Add check (error message + assert) that pose is valid in armature evaluation.

Not sure how this happens, but in some cases we can evaluate
deformations of an armature which pose is not valid, at least put a
warning here to help identifying the issue quickly.

3 years agoRevert "Add red alert in UI controls for datablock pointer properties"
Julian Eisel [Thu, 4 May 2017 22:44:06 +0000 (00:44 +0200)]
Revert "Add red alert in UI controls for datablock pointer properties"

This reverts commit f5bc8ad4ce87165fc0648f1cd8c0ae1fb5f07281.

We agreed there needs to be a better solution for this, see comments in
rBf5bc8ad4ce87165.

3 years agoFix reading past bounds removing from color ramp
Campbell Barton [Thu, 4 May 2017 21:41:12 +0000 (07:41 +1000)]
Fix reading past bounds removing from color ramp

3 years agoRemove redundant backbuffer/transform check
Campbell Barton [Thu, 4 May 2017 21:06:15 +0000 (07:06 +1000)]
Remove redundant backbuffer/transform check

Transform no longer uses backbuffer for snap.

3 years agoTypo: 'Signle program' -> 'Single program'
Pablo Vazquez [Thu, 4 May 2017 20:15:53 +0000 (22:15 +0200)]
Typo: 'Signle program' -> 'Single program'

3 years agoCycles: Fix crash when assigning KernelGlobals
Lukas Stockner [Thu, 4 May 2017 18:49:04 +0000 (20:49 +0200)]
Cycles: Fix crash when assigning KernelGlobals

The memory isn't initialized during allocation, so calling the assignment operator is a bad idea.

3 years agoFix T51412: Instant crash with texture plugged into the Displacement output
Sergey Sharybin [Thu, 4 May 2017 14:27:31 +0000 (16:27 +0200)]
Fix T51412: Instant crash with texture plugged into the Displacement output

The issue was caused by unlimited textures commit, root of the issue is that
displacement code updates some of the image slots directly, so it needs to
ensure device vectors are all proper size.

3 years agoFix missing usercount update of poselib when copying Object.
Bastien Montagne [Thu, 4 May 2017 13:08:05 +0000 (15:08 +0200)]
Fix missing usercount update of poselib when copying Object.

Still finding such missing cases... :(

3 years agoAdd debug/timing prints in MakeLocal and remapping code.
Bastien Montagne [Thu, 4 May 2017 13:07:21 +0000 (15:07 +0200)]
Add debug/timing prints in MakeLocal and remapping code.

3 years agoFix use after free of new render layer ID properites after copying scene
Sergey Sharybin [Thu, 4 May 2017 10:27:28 +0000 (12:27 +0200)]
Fix use after free of new render layer ID properites after copying scene

3 years agoFix memory leak of ID properties after recent render passes commit
Sergey Sharybin [Thu, 4 May 2017 10:18:39 +0000 (12:18 +0200)]
Fix memory leak of ID properties after recent render passes commit

3 years agoCycles: Fix unused argument warning when building without debug passes
Sergey Sharybin [Thu, 4 May 2017 07:33:51 +0000 (09:33 +0200)]
Cycles: Fix unused argument warning when building without debug passes

3 years ago[msvc/make.bat] Limit the amount of simultaneously compiled projects.
lazydodo [Wed, 3 May 2017 21:15:35 +0000 (15:15 -0600)]
[msvc/make.bat] Limit the amount of simultaneously compiled projects.

This was set to maxcpu which in an 8 core box would be 8, each project would then spawn
8 instances of cl.exe, making a possible of 64 simultaneously running compiler instances
slowing the compile down instead of speeding it up.

3 years agoFix Cycles build on Windows
Dalai Felinto [Wed, 3 May 2017 19:16:45 +0000 (21:16 +0200)]
Fix Cycles build on Windows

3 years agoFix error in node flag check
Campbell Barton [Wed, 3 May 2017 16:57:39 +0000 (02:57 +1000)]
Fix error in node flag check

3 years ago"Fix" root cause of T51260 Forward compatibility crash fter adding new IDProp type.
Bastien Montagne [Wed, 3 May 2017 15:01:00 +0000 (17:01 +0200)]
"Fix" root cause of T51260 Forward compatibility crash fter adding new IDProp type.

We unfortunately cannot fix this for previous versions of Blender, but
at least the issue (Blender crashing on unknown IDProp types) should now
be addressed for future.

Simply reset unknown IDProp types to integer one, and reset its value to zero.

3 years agoRender API/Cycles: Identify Render Passes by their name instead of a type flag
Lukas Stockner [Tue, 2 May 2017 22:21:18 +0000 (00:21 +0200)]
Render API/Cycles: Identify Render Passes by their name instead of a type flag

Previously, every RenderPass would have a bitfield that specified its type. That limits the number of passes to 32, which was reached a while ago.
However, most of the code already supported arbitrary RenderPasses since they were also used to store Multilayer EXR images.
Therefore, this commit completely removes the passflag from RenderPass and changes all code to use the unique pass name for identification.
Since Blender Internal relies on hardcoded passes and to preserve compatibility, 32 pass names are reserved for the old hardcoded passes.

To support these arbitrary passes, the Render Result compositor node now adds dynamic sockets. For compatibility, the old hardcoded sockets are always stored and just hidden when the corresponding pass isn't available.

To use these changes, the Render Engine API now includes a function that allows render engines to add arbitrary passes to the render result. To be able to add options for these passes, addons can now add their own properties to SceneRenderLayers.
To keep the compositor input node updated, render engine plugins have to implement a callback that registers all the passes that will be generated.

From a user perspective, nothing should change with this commit.

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

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

3 years agoCycles: Split kernel - sort shaders
Hristo Gueorguiev [Wed, 3 May 2017 13:30:45 +0000 (15:30 +0200)]
Cycles: Split kernel - sort shaders

Reduce thread divergence in kernel_shader_eval.

Rays are sorted in blocks of 2048 according to shader->id.

On R9 290 Classroom is ~30% faster, and Pabellon Barcelone is ~8% faster.

No sorting for CUDA split kernel.

Reviewers: sergey, maiself

Reviewed By: maiself

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

3 years agoCycles: Fix OpenCL compilation failure after recent color changes
Sergey Sharybin [Wed, 3 May 2017 12:11:19 +0000 (14:11 +0200)]
Cycles: Fix OpenCL compilation failure after recent color changes

It is really confusing to have some functions available in some devices
and not on another devices.

3 years agoCycles: Use render visibility for duplis when Render Layer option in viewport is...
Sergey Sharybin [Wed, 3 May 2017 10:05:52 +0000 (12:05 +0200)]
Cycles: Use render visibility for duplis when Render Layer option in viewport is used

Previously the logic was different for duplis and regular objects: regular objects
were using render visibility when Render Layer option is enabled which duplis were
always using viewport visibility when rendering from the viewport.

This was quite confusing because caused different results in viewport and render
when artists were expecting them to match 1:1.

3 years agoCycles: Simplify code in SVM image by using new utility function
Sergey Sharybin [Wed, 3 May 2017 09:22:27 +0000 (11:22 +0200)]
Cycles: Simplify code in SVM image by using new utility function

Can not measure any performance difference, so seems the code is identical
and just shorter.

3 years agoCycles: Add utility function to convert float4 color from srgb to linear
Sergey Sharybin [Wed, 3 May 2017 09:19:40 +0000 (11:19 +0200)]
Cycles: Add utility function to convert float4 color from srgb to linear

It will use SSE2 optimized version when is possible.

3 years agoCycles: Remove extra clFinish from driver workaround
Mai Lavelle [Tue, 2 May 2017 17:56:05 +0000 (13:56 -0400)]
Cycles: Remove extra clFinish from driver workaround

These were causing problems with Nvidia OpenCL.

3 years agoCycles: Output split state element size
Mai Lavelle [Sat, 8 Apr 2017 05:35:32 +0000 (01:35 -0400)]
Cycles: Output split state element size

3 years agoCycles: Branched path tracing for the split kernel
Mai Lavelle [Tue, 21 Mar 2017 02:31:54 +0000 (22:31 -0400)]
Cycles: Branched path tracing for the split kernel

This implements branched path tracing for the split kernel.

General approach is to store the ray state at a branch point, trace the
branched ray as normal, then restore the state as necessary before iterating
to the next part of the path. A state machine is used to advance the indirect
loop state, which avoids the need to add any new kernels. Each iteration the
state machine recreates as much state as possible from the stored ray to keep
overall storage down.

Its kind of hard to keep all the different integration loops in sync, so this
needs lots of testing to make sure everything is working correctly. We should
probably start trying to deduplicate the integration loops more now.

Nonbranched BMW is ~2% slower, while classroom is ~2% faster, other scenes
could use more testing still.

Reviewers: sergey, nirved

Reviewed By: nirved

Subscribers: Blendify, bliblubli

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

3 years agoBGE: Fix silly typo that invalidates negative scaling camera feature.
Benoit Bolsee [Tue, 2 May 2017 18:11:02 +0000 (20:11 +0200)]
BGE: Fix silly typo that invalidates negative scaling camera feature.

Negative scale on camera is a nice trick to invert render image on one
axis at no extra CPU cost. It was implemented in the Decklink branch but
I introduced a typo when porting it to master. It is now fixed.

3 years agoCycles: Fix missing type declaration in OpenCL image
Sergey Sharybin [Tue, 2 May 2017 13:39:18 +0000 (15:39 +0200)]
Cycles: Fix missing type declaration in OpenCL image

Spotted by Mai in IRC, thanks!

3 years agoRevert "Depsgraph: Link from material to object shading"
Sergey Sharybin [Tue, 2 May 2017 13:31:49 +0000 (15:31 +0200)]
Revert "Depsgraph: Link from material to object shading"

The change was initially needed for Blender 2.8 branch but the actual
function was reverted in there. So no reason to keep dead unused
placeholder in the dependency graph.

This reverts commit fd69ba225540cde5e4c1fa651fb02df21ea0a143.

3 years agoCycles: Fix CUDA split kernel
Sergey Sharybin [Tue, 2 May 2017 13:03:51 +0000 (15:03 +0200)]
Cycles: Fix CUDA split kernel

Global size y needs to be a multiple of 16.

3 years agoCycles: Cache split kernels in CUDA device
Sergey Sharybin [Tue, 2 May 2017 13:02:49 +0000 (15:02 +0200)]
Cycles: Cache split kernels in CUDA device

This way we don't re-load kernels for every sample in the viewport.
Additionally, we don't risk global size changed inbetween of samples.

3 years agofix typo in WITH_SYSTEM_GFLOG in CMakeLists.txt
lazydodo [Sun, 30 Apr 2017 16:52:38 +0000 (10:52 -0600)]
fix typo in WITH_SYSTEM_GFLOG in CMakeLists.txt

3 years agoCleanup: comment blocks
Campbell Barton [Sat, 29 Apr 2017 16:58:36 +0000 (02:58 +1000)]
Cleanup: comment blocks

3 years agoView3D: support both orbit select & depth
Campbell Barton [Sat, 29 Apr 2017 16:38:38 +0000 (02:38 +1000)]
View3D: support both orbit select & depth

When using both preferences, use cursor depth when nothings selected.

3 years agoCurve Fitting: minor change to re-fitting method
Campbell Barton [Sat, 29 Apr 2017 14:01:16 +0000 (00:01 +1000)]
Curve Fitting: minor change to re-fitting method

Avoid calculating a new split-index when re-fitting.

While checking if a knot can be removed, the index with the highest error
can be used as a candidate to replace the knot
(in the case it can't be removed).

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 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 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 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 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 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.