blender.git
2 years agoFix strict compiler warning in BGE when linking directly to SDL
Sergey Sharybin [Fri, 21 Jul 2017 14:07:59 +0000 (16:07 +0200)]
Fix strict compiler warning in BGE when linking directly to SDL

2 years agoFix T52134: New depsgraph crashes when evaluating several psys on from object
Sergey Sharybin [Fri, 21 Jul 2017 09:12:34 +0000 (11:12 +0200)]
Fix T52134: New depsgraph crashes when evaluating several psys on from object

2 years agoFix strict compiler error after recent UI changes
Sergey Sharybin [Fri, 21 Jul 2017 08:52:36 +0000 (10:52 +0200)]
Fix strict compiler error after recent UI changes

2 years agoFix T52136: Blender segfault (stack overflow most certainly) when converting to mesh.
Bastien Montagne [Fri, 21 Jul 2017 08:24:20 +0000 (10:24 +0200)]
Fix T52136: Blender segfault (stack overflow most certainly) when converting to mesh.

Stupid mistake in own recent refactor.

2 years agoUI/floats: Reduce our UI_PRECISION_FLOAT_MAX by one to avoid most rounding issues.
Bastien Montagne [Fri, 21 Jul 2017 08:10:36 +0000 (10:10 +0200)]
UI/floats: Reduce our UI_PRECISION_FLOAT_MAX by one to avoid most rounding issues.

The way we use it, UI_PRECISION_FLOAT_MAX is actually + 1 to get total
number of digits, and float only has 7 meaningful digits, so that define
shall be at 6.

2 years agoFix a few harmless maybe uninitialized warnings with GCC 5.4.
Brecht Van Lommel [Thu, 20 Jul 2017 21:51:15 +0000 (23:51 +0200)]
Fix a few harmless maybe uninitialized warnings with GCC 5.4.

GCC seems to detect uninitialized into function calls now, but then isn't
always smart enough to see that it is actually initialized. Disabling this
warning entirely seems a bit too much, so initialize a bit more now.

2 years agoFix T46560: 2D paint smear and soften brushes not working with alpha.
Brecht Van Lommel [Thu, 20 Jul 2017 22:16:59 +0000 (00:16 +0200)]
Fix T46560: 2D paint smear and soften brushes not working with alpha.

Interpolate rather than do alpha over mix, matching projection paint.

2 years agoFix T52135: Cycles should not keep generated/packed images in memory after render.
Brecht Van Lommel [Thu, 20 Jul 2017 20:31:46 +0000 (22:31 +0200)]
Fix T52135: Cycles should not keep generated/packed images in memory after render.

2 years agoFix potential memory leak in Cycles loading of packed/generated images.
Brecht Van Lommel [Thu, 20 Jul 2017 20:31:02 +0000 (22:31 +0200)]
Fix potential memory leak in Cycles loading of packed/generated images.

2 years agoFix T52125: principled BSDF missing with macOS OpenCL.
Brecht Van Lommel [Thu, 20 Jul 2017 13:15:43 +0000 (15:15 +0200)]
Fix T52125: principled BSDF missing with macOS OpenCL.

2 years agoCycles: fixed the SM_2x CUDA kernel build that I broke in my previous commit
Stefan Werner [Thu, 20 Jul 2017 11:28:34 +0000 (13:28 +0200)]
Cycles: fixed the SM_2x CUDA kernel build that I broke in my previous commit

2 years agoFix T52107: Color management difference when using multiple and different GPUs together
Stefan Werner [Thu, 20 Jul 2017 08:03:27 +0000 (10:03 +0200)]
Fix T52107: Color management difference when using multiple and different GPUs together

This commit unifies the flattened texture slot names for bindless and regular CUDA textures. Texture indices are now identical across all CUDA architectures, where before Fermi used different indices, which lead to problems when rendering on multi-GPU setups mixing Fermi with newer hardware.

2 years agoFix topology mirror ignoring center verts
Campbell Barton [Wed, 19 Jul 2017 17:29:08 +0000 (03:29 +1000)]
Fix topology mirror ignoring center verts

Caused select-mirror to fail with edges & faces.

2 years agoFix (unreported) seldom crash when using previews in filebrowser.
Bastien Montagne [Wed, 19 Jul 2017 10:55:05 +0000 (12:55 +0200)]
Fix (unreported) seldom crash when using previews in filebrowser.

Hopefully fix it actually, at least could not reproduce it anymore with
that changen, but Was already quite hard to trigger before.
We need a memory barrier at this allocation, otherwise it might happen
after preview gets added to done queue, so preview could end up being
freed twice, leading to crash.

2 years agoFix T52116: Blender internal BVH build crash in degenerate cases.
Brecht Van Lommel [Wed, 19 Jul 2017 09:04:04 +0000 (11:04 +0200)]
Fix T52116: Blender internal BVH build crash in degenerate cases.

2 years agoFix T52092: Crash un-grouping nodes
Campbell Barton [Wed, 19 Jul 2017 04:32:31 +0000 (14:32 +1000)]
Fix T52092: Crash un-grouping nodes

2 years agoFix T49498: continuous grab issues on macOS, particularly with gaming mouses.
Brecht Van Lommel [Tue, 18 Jul 2017 14:00:07 +0000 (16:00 +0200)]
Fix T49498: continuous grab issues on macOS, particularly with gaming mouses.

Change the implementation so it no longer takes over the mouse cursor motion
from the OS, instead only move it when warping, similar to Windows and X11.
Probably the reason it was not done this way originally is that you then get
a 500ms delay after warping, but we can use a trick to avoid that and get much
smoother mouse motion than before.

2 years agoFix T52109: Folder search won't work when selecting animation output folder.
Bastien Montagne [Tue, 18 Jul 2017 14:01:28 +0000 (16:01 +0200)]
Fix T52109: Folder search won't work when selecting animation output folder.

Text search would not run in case there was no 'type' enabled in filter
buttons. Now instead consider that no types enabled == all types
enabled.

2 years agoFix bad loss of precision when manually editing values in numbuttons.
Bastien Montagne [Mon, 17 Jul 2017 16:22:12 +0000 (18:22 +0200)]
Fix bad loss of precision when manually editing values in numbuttons.

While drawing nice 'rounded' values is OK also for 'low precision'
editing like dragging and such, it's quite an issue when you type in a
precise value, validate, edit again the value, and find a rounded
version of it instead of what you typed in!

So now, *only when entering textedit of num buttons*, we always get the highest
reasonable precision for floats (and use exponential notation when
values are too low or too high, to avoid tremendous amounts of zero's).

2 years agoCleanup: use WM_event prefix for modal_tweak_exit
Campbell Barton [Tue, 18 Jul 2017 08:09:26 +0000 (18:09 +1000)]
Cleanup: use WM_event prefix for modal_tweak_exit

2 years agoWM: move WM_event_is_last_mousemove to the WM API
Campbell Barton [Tue, 18 Jul 2017 08:06:21 +0000 (18:06 +1000)]
WM: move WM_event_is_last_mousemove to the WM API

2 years agoFix T52021: Shadow catcher renders wrong when catcher object is behind transparent...
Sergey Sharybin [Tue, 18 Jul 2017 07:25:58 +0000 (09:25 +0200)]
Fix T52021: Shadow catcher renders wrong when catcher object is behind transparent object

Tweaked the path radiance summing and alpha to accommodate for possible contribution of
light by transparent surface bounces happening prior to shadow catcher intersection.

This commit will change the way how shadow catcher results looks when was behind semi
transparent object, but the old result seemed to be fully wrong: there were big artifacts
when alpha-overing the result on some actual footage.

2 years agoCycles: Remove meaningless camera ray check
Sergey Sharybin [Mon, 17 Jul 2017 10:09:13 +0000 (12:09 +0200)]
Cycles: Remove meaningless camera ray check

In branched path tracing main loop is always a camera ray, with varying
number of transparent bounces.

2 years agoCleanup: quiet picky warnings
Campbell Barton [Tue, 18 Jul 2017 02:12:40 +0000 (12:12 +1000)]
Cleanup: quiet picky warnings

2 years agoTransform: avoid possible uninitialized var
Campbell Barton [Tue, 18 Jul 2017 02:10:23 +0000 (12:10 +1000)]
Transform: avoid possible uninitialized var

2 years agoWork around small DPI resulting in blurry fonts, clamping auto DPI to minimum 96.
Brecht Van Lommel [Mon, 17 Jul 2017 12:10:57 +0000 (14:10 +0200)]
Work around small DPI resulting in blurry fonts, clamping auto DPI to minimum 96.

Since we added auto DPI on Linux, on some systems the UI draws smaller than before
due to the monitor reporting DPI values like 88. Blender font drawing gives quite
blurry results for such slightly smaller DPI, apparently because the builtin font
isn't really designed for such small font sizes. As a workaround this clamps the
auto DPI to minimum 96, since the main case we are interested in supporting is
high DPI displays anyway.

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

2 years agoFix T52090: clarify meaning of EnumProperty number when using ENUM_FLAG.
Brecht Van Lommel [Mon, 17 Jul 2017 11:56:51 +0000 (13:56 +0200)]
Fix T52090: clarify meaning of EnumProperty number when using ENUM_FLAG.

2 years agoFix T51971: IK non-uniform scale regression.
Brecht Van Lommel [Wed, 5 Jul 2017 21:15:12 +0000 (23:15 +0200)]
Fix T51971: IK non-uniform scale regression.

This is a different fix for the issue from D2088, preserving backwards compatibility
for IK stretching. The main problem with this patch is that this new behavior has
been there for a year, so it may break rigs created since then which rely on the new
IK stretch behavior.

Test file for various cases:
https://developer.blender.org/diffusion/BL/browse/trunk/lib/tests/animation/IK.blend

Reviewers: campbellbarton

Subscribers: maverick, pkrime

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

2 years agofix T52065: Joint ID was generated wrong for bone animation exports
Gaia Clary [Mon, 17 Jul 2017 14:39:33 +0000 (16:39 +0200)]
fix T52065: Joint ID was generated wrong for bone animation exports

2 years agoFix T39925: Set Origin to Geometry on a new text object moves the origin away from...
Bastien Montagne [Mon, 17 Jul 2017 10:56:12 +0000 (12:56 +0200)]
Fix T39925: Set Origin to Geometry on a new text object moves the origin away from the object

No need to take into account font size here...

2 years agoPy API doc generation: remove reference to "Blender/Python Add-on Tutorial"
Bastien Montagne [Mon, 17 Jul 2017 09:36:27 +0000 (11:36 +0200)]
Py API doc generation: remove reference to "Blender/Python Add-on Tutorial"

That one has been moved to wiki!

2 years agoBuildbot: Switch to GCC-7 for Linux build slaves
Sergey Sharybin [Mon, 17 Jul 2017 07:32:19 +0000 (09:32 +0200)]
Buildbot: Switch to GCC-7 for Linux build slaves

This is GCC version was used for Testbuild1 and Testbuild2.

2 years agoPyDoc: minor change to recent workaround
Campbell Barton [Mon, 17 Jul 2017 03:16:37 +0000 (13:16 +1000)]
PyDoc: minor change to recent workaround

- Isolate workaround in single string and link to issue.
- Quiet unused file warning (since it's an include).

2 years agoPyAPI: don't use deprecated PyModule_GetFilename
Campbell Barton [Mon, 17 Jul 2017 02:44:03 +0000 (12:44 +1000)]
PyAPI: don't use deprecated PyModule_GetFilename

Allows compiling with newer Python versions.
Also add missing decref when compiling as a py-module.

2 years agoBPY API: Fix broken ref link
Aaron Carlisle [Sun, 16 Jul 2017 22:11:58 +0000 (18:11 -0400)]
BPY API: Fix broken ref link

2 years agoBPY API: Fix usless links leading to compile errors
Aaron Carlisle [Sun, 16 Jul 2017 21:05:29 +0000 (17:05 -0400)]
BPY API: Fix usless links leading to compile errors

See https://github.com/sphinx-doc/sphinx/issues/3866 for more information

2 years agoFix T52058: Jumping to keyframe causes Blender to freeze indefinitely
Joshua Leung [Sun, 16 Jul 2017 14:24:45 +0000 (02:24 +1200)]
Fix T52058: Jumping to keyframe causes Blender to freeze indefinitely

Revise the logic here to be more robust when keyframes with
similar-but-different frame numbers (e.g. 70.000000 vs 70.000008)
would cause the search to go into an infinite loop, as the same
keyframe was repeatedly found (and skipped).

2 years agoFix T52034: cell noise renders different.
Brecht Van Lommel [Thu, 13 Jul 2017 10:47:41 +0000 (12:47 +0200)]
Fix T52034: cell noise renders different.

Tweak the bias from the previous fix a bit to be more backwards compatible in
some scene. In the end which way we round is quite arbitrary, but keeping the
case where the texture coordinate is exactly zero the same seems better.

2 years agoFix T52066: Grid Mesh UV's aren't correct
Campbell Barton [Sat, 15 Jul 2017 14:02:09 +0000 (00:02 +1000)]
Fix T52066: Grid Mesh UV's aren't correct

2 years agoSnap System: Fixed index of objects used to make `snap to volume`
mano-wii [Fri, 14 Jul 2017 20:25:16 +0000 (17:25 -0300)]
Snap System: Fixed index of objects used to make `snap to volume`

*note: make a complete test scene

2 years agoSnap System: Use function that does the interactor instead of Macro
mano-wii [Fri, 14 Jul 2017 19:52:31 +0000 (16:52 -0300)]
Snap System: Use function that does the interactor instead of Macro

Macro makes debugging difficult. And in that case I was escaping from the style used in Blender

2 years agoSnap System: missing change
mano-wii [Fri, 14 Jul 2017 14:20:28 +0000 (11:20 -0300)]
Snap System: missing change

2 years agoSnap System: fix rename `ob` to `obj`
mano-wii [Fri, 14 Jul 2017 13:41:47 +0000 (10:41 -0300)]
Snap System: fix rename `ob` to `obj`

This would bring problems with dupli objects

2 years agoFix unit test error on Windows
Sybren A. Stüvel [Fri, 14 Jul 2017 07:53:20 +0000 (09:53 +0200)]
Fix unit test error on Windows

2 years agoSnap System: Replace creation and destruction of the object list by a Macro
mano-wii [Thu, 13 Jul 2017 22:39:17 +0000 (19:39 -0300)]
Snap System: Replace creation and destruction of the object list by a Macro

The macro got a little strange, but it's better than using the MEM_mallocN inside a loop, or repeat the lines

2 years agoCleanup: Fix MSVC warning message
Antonio Vazquez [Thu, 13 Jul 2017 15:54:24 +0000 (17:54 +0200)]
Cleanup: Fix MSVC warning message

The const key is required by compiler to avoid warning

2 years agoSequence editor: Renamed "Override" to "Overwrite" in "Set Selected Strip Proxies"
Sybren A. Stüvel [Thu, 13 Jul 2017 14:26:19 +0000 (16:26 +0200)]
Sequence editor: Renamed "Override" to "Overwrite" in "Set Selected Strip Proxies"

The option has always (un)set the "Overwrite" flag on all strips. Calling
it "Override" seems misleading, since even when unchecking it, it overrides
whatever was set on the selected strips. It really just (un)sets the
"Overwrite" flag, and now it is also labeled as such.

2 years agoFix texture paint crash when painting onto stencil
Campbell Barton [Thu, 13 Jul 2017 10:48:55 +0000 (20:48 +1000)]
Fix texture paint crash when painting onto stencil

2 years agoRevert T44320: UV island overlap considered linked
Campbell Barton [Thu, 13 Jul 2017 04:32:04 +0000 (14:32 +1000)]
Revert T44320: UV island overlap considered linked

In the reported example it seemed reasonable to apply this change.
But it causes a much more common case (selecting projections)
to be split into 2x islands.

Resolves T50970

2 years agoFix T51100: Vertex pick fails after extrude
Campbell Barton [Thu, 13 Jul 2017 04:13:59 +0000 (14:13 +1000)]
Fix T51100: Vertex pick fails after extrude

2 years agoSnap System: remove unused function
mano-wii [Wed, 12 Jul 2017 23:43:28 +0000 (20:43 -0300)]
Snap System: remove unused function

2 years agoBMesh: move safe loop-normal-calc to own function
Campbell Barton [Wed, 12 Jul 2017 13:06:59 +0000 (23:06 +1000)]
BMesh: move safe loop-normal-calc to own function

This makes sense when we want to avoid float precision error
for near co-linear edges. OTOH, this is an arbitrary decision,
so keep functions separate.

2 years agoCycles: Enable SSS from Principled BSDF only when actually in use
Mai Lavelle [Wed, 12 Jul 2017 08:36:46 +0000 (04:36 -0400)]
Cycles: Enable SSS from Principled BSDF only when actually in use

This gives speed up for the split kernel in scenes using the principled BSDF
but without subsurface scattering.

2 years agoCleanup: unused vars
Campbell Barton [Wed, 12 Jul 2017 03:54:20 +0000 (13:54 +1000)]
Cleanup: unused vars

2 years agoCycles: Fix comparison in principled BSDF
Mai Lavelle [Wed, 12 Jul 2017 03:41:22 +0000 (23:41 -0400)]
Cycles: Fix comparison in principled BSDF

Could have lead to black pixels.

2 years agoFix T52027: OSL getattribute() crash, when optimizer calls it before rendering.
Brecht Van Lommel [Tue, 11 Jul 2017 20:39:51 +0000 (22:39 +0200)]
Fix T52027: OSL getattribute() crash, when optimizer calls it before rendering.

2 years agoFix [T51595]: Snap to edge does not work with high zoom level
mano-wii [Tue, 11 Jul 2017 20:03:49 +0000 (17:03 -0300)]
Fix [T51595]: Snap to edge does not work with high zoom level

That problem occurs because of the imprecision of `short int` (16 bits).
The 3d coordinates are converted to 2d, and when they are off the screen, their values can exceed 32767! (max short int value)

One quick solution is to use float instead of short

The snap code is actually a little tricky. I want to make some arithmetic simplifications in it

2 years agoStyle (remove characters that caused "a binary file")
mano-wii [Tue, 11 Jul 2017 17:22:07 +0000 (14:22 -0300)]
Style (remove characters that caused "a binary file")

2 years agoSnap System: Separate raycast functions from nearest2d functions
mano-wii [Tue, 11 Jul 2017 16:47:28 +0000 (13:47 -0300)]
Snap System: Separate raycast functions from nearest2d functions

The only similarity between these functions is that both serve to snap.
However their codes are totally different from one another.
So by separating these functions, it:
- removes the need to put several conditions;
- simplifies and
- optimizes the code

2 years agoFix T52022 Alembic Inherits transform not taken into account
Sybren A. Stüvel [Tue, 11 Jul 2017 14:16:56 +0000 (16:16 +0200)]
Fix T52022 Alembic Inherits transform not taken into account

Alembic's "inherits transform" flag wasn't taken into account when
constructing the parent object relations.

2 years agoA bunch of fixes for Pose Library while checking on T51607
Joshua Leung [Tue, 11 Jul 2017 13:33:08 +0000 (01:33 +1200)]
A bunch of fixes for Pose Library while checking on T51607

* Display a warning above the pose list if the pose library is in an invalid
  state (i.e. when it has keyframes but no pose-markers associated with those
  keyframes). This warning prompts users to run the "Sanitize Pose Library Action"
  operator, which should fix up such issues.

* "Sanitize" operator now creates unique names for each newly create pose
  marker it generates, including the frame on which it found the pose

2 years agoFix: Accidentally left debug print in last commit
Joshua Leung [Tue, 11 Jul 2017 11:39:35 +0000 (23:39 +1200)]
Fix: Accidentally left debug print in last commit

2 years agoFix T52009: F-Curve "Stepped interpolation" modifier "restrict frame-range" IN and...
Joshua Leung [Tue, 11 Jul 2017 06:07:11 +0000 (18:07 +1200)]
Fix T52009: F-Curve "Stepped interpolation" modifier "restrict frame-range" IN and OUT parameters cannot be edited

The problem here was that the "frame_start" and "frame_end" RNA properties of
the Stepped FModifier were shadowing/overriding "frame_start" and "frame_end"
properties of the base FModifier. As a result, when the range() callback
for the In/Out parameters (defined as part of the base FModifier) checked
it's start/end properties, they were always still zero, meaning that the
acceptable range for the In/Out parameters was 0 -> 0 = 0.

Note:
If you've got old files with this problem, you'll need to manually click on
the frame_start/end properties to flush out the old values. It's probably
not worth the effort of applying a version patch for this (given that this
modifier is not one of the most often used ones AFAIK).

2 years agoFix T51879: NLA Influence can not be autokeyed
Joshua Leung [Tue, 4 Jul 2017 03:35:27 +0000 (15:35 +1200)]
Fix T51879: NLA Influence can not be autokeyed

As with Strip Time, the updates here would get triggered before the
autokeying had a chance to record the unkeyed values, making it impossible
to autokey.

2 years agoCycles: Disable OpenCL clFlush workarounds
Sergey Sharybin [Tue, 11 Jul 2017 10:16:58 +0000 (12:16 +0200)]
Cycles: Disable OpenCL clFlush workarounds

This is something which was reported to work fine by Mai, Benjamin and
confirmed by myself. Disabling this workaround gains us some speedup:

                      Before           Now
bmw27                04:28.42        04:07.79
classroom            09:26.48        08:54.53
fishy_cat            08:44.01        08:18.70
koro                 09:17.98        08:57.18
pavillon_barcelone   12:26.64        11:52.81

Test environment is:
- Ubuntu 16.04, with all updates installed
- AMD RX 480 GPU
- amdgpu pro driver version 17.10-450821

2 years agoTheme Flatty Light
Pablo Vazquez [Tue, 11 Jul 2017 09:17:36 +0000 (11:17 +0200)]
Theme Flatty Light

Color GraphEditor tabs, brighter 3D viewport gradient

2 years agoFix memory leak caused by node clipboard
Sergey Sharybin [Tue, 11 Jul 2017 09:06:36 +0000 (11:06 +0200)]
Fix memory leak caused by node clipboard

The issue was caused by combination of following factors:

- Clipboard cleanup function will pass node tree as NULL to node free
  function.

  This is fine on it's own, we don't have tree in clipboard.

- Node free function will call node storage cleanup only when there is
  a non-NULL node tree.

  This is somewhat weird, because storage cleanup does not take node
  tree as argument.

So the solution here: move node storage cleanup outside of check that
node tree is not NULL.

2 years agoOpensubdiv: Fix compilation error with older Opensubdiv versions
Sergey Sharybin [Tue, 11 Jul 2017 09:05:21 +0000 (11:05 +0200)]
Opensubdiv: Fix compilation error with older Opensubdiv versions

2 years agoFix T49034: multi-drag crashes when UI forces exit
Campbell Barton [Tue, 11 Jul 2017 09:07:37 +0000 (19:07 +1000)]
Fix T49034: multi-drag crashes when UI forces exit

2 years agoResolve T51745: Mesh extrude keep-orig needs edges
Campbell Barton [Tue, 11 Jul 2017 04:48:55 +0000 (14:48 +1000)]
Resolve T51745: Mesh extrude keep-orig needs edges

Document to avoid confusion when called from Python.

2 years agoFix T51761: wpaint select depth limit fails
Campbell Barton [Tue, 11 Jul 2017 04:05:59 +0000 (14:05 +1000)]
Fix T51761: wpaint select depth limit fails

Limit select fails with circle and border select.

Regression in 2.76

2 years agoFix (unreported) broken uvsculpt in Scene's toolsettings' copying.
Bastien Montagne [Mon, 10 Jul 2017 19:16:48 +0000 (21:16 +0200)]
Fix (unreported) broken uvsculpt in Scene's toolsettings' copying.

This was serious bug actually, probably a crasher in case you free
original or copy after duplication...

2 years agoFix (unreported) Scene's copying toolsettings' clone and canvas, and particles' scene...
Bastien Montagne [Mon, 10 Jul 2017 19:12:42 +0000 (21:12 +0200)]
Fix (unreported) Scene's copying toolsettings' clone and canvas, and particles' scene and object pointers.

imapaint's clone and canvas are refcounting Image usages.

And particle's editsettings' object and scene seem to be pure runtime
data (they are reset to NULL in readcode), so resetting them to NULL
here as well.

2 years agoFix strict compiler warning
Sergey Sharybin [Mon, 10 Jul 2017 15:43:27 +0000 (17:43 +0200)]
Fix strict compiler warning

2 years agoFix (unreported) Scene copying doing very stupid things with World and LineStyle...
Bastien Montagne [Mon, 10 Jul 2017 13:10:17 +0000 (15:10 +0200)]
Fix (unreported) Scene copying doing very stupid things with World and LineStyle usercounts.

Really, really, really need to get rid of this usercount handling
everywhere, hopefully incomming ID copying rewrite will help sanitize
that mess. But fix was needed for 2.79 release!

2 years agoPartial fix of T51989: Don't set image user offset for movie files
Sergey Sharybin [Mon, 10 Jul 2017 12:22:33 +0000 (14:22 +0200)]
Partial fix of T51989: Don't set image user offset for movie files

While this is handy for image sequences, it's totally meaningless for movie files.

2 years agoFix T52011: Border render is incorrect with multiple scenes
Sergey Sharybin [Mon, 10 Jul 2017 10:17:13 +0000 (12:17 +0200)]
Fix T52011: Border render is incorrect with multiple scenes

The code was somewhat weird: it was first copying border/crop settings from
the "source" scene, then was checking border settings of the current scene
and only then was copying border from "source" scene.

Now we first copy border/crop flags, then copy border from source and then
check whether border is a full-frame.

2 years agoError in last commit
Campbell Barton [Mon, 10 Jul 2017 07:44:49 +0000 (17:44 +1000)]
Error in last commit

2 years agoFix T51998: Anim player uses 100% CPU
Campbell Barton [Mon, 10 Jul 2017 07:37:00 +0000 (17:37 +1000)]
Fix T51998: Anim player uses 100% CPU

The loop running with no events didn't sleep.
Now wait for events when paused.

2 years agoFix T51052: CacheFile Open crashes from Python
Campbell Barton [Mon, 10 Jul 2017 07:06:25 +0000 (17:06 +1000)]
Fix T51052: CacheFile Open crashes from Python

Note that bpy.data access makes more sense here,
but better not crash when called from Python.

2 years agoCurve: add assert for invalid next/prev use
Campbell Barton [Mon, 10 Jul 2017 06:27:15 +0000 (16:27 +1000)]
Curve: add assert for invalid next/prev use

2 years agoFix T51665: No orientation for nurbs, polygons
Campbell Barton [Mon, 10 Jul 2017 04:37:20 +0000 (14:37 +1000)]
Fix T51665: No orientation for nurbs, polygons

2 years agoFix T52007: Cancel bezier curve transform fails
Campbell Barton [Mon, 10 Jul 2017 03:38:28 +0000 (13:38 +1000)]
Fix T52007: Cancel bezier curve transform fails

Auto & aligned handles wouldn't restore to their correct locations.

Note that a more direct fix for the bug is possible
(storing the handle locations to restore on cancel).

But that still gives some odd behavior, see code-comments for details.

2 years agoFix T51898: missing sequence strip color space validation on load.
Brecht Van Lommel [Sun, 9 Jul 2017 23:03:20 +0000 (01:03 +0200)]
Fix T51898: missing sequence strip color space validation on load.

2 years agoFix T52001: material draw mode principled BSDF artifacts at some angles.
Brecht Van Lommel [Sat, 8 Jul 2017 21:37:16 +0000 (23:37 +0200)]
Fix T52001: material draw mode principled BSDF artifacts at some angles.

The default anisotropic tangent computation could fail in some cases,
leading to NaNs and artifacts. Use a simpler formulation that doesn't
suffer from this.

2 years agoFix T51959: Windows + Intel GPU offset between UI drawing and mouse.
Brecht Van Lommel [Sat, 8 Jul 2017 20:08:38 +0000 (22:08 +0200)]
Fix T51959: Windows + Intel GPU offset between UI drawing and mouse.

Unfortunately this means disabling the code that ensures the title
bar is properly scaled with DPI, however better to have that as a
cosmetic issue than Blender being unusable with a lot of Intel GPUs.

2 years agoFix T51967: OSL crash after rendering finished (mainly on Windows).
Brecht Van Lommel [Sat, 8 Jul 2017 00:46:06 +0000 (02:46 +0200)]
Fix T51967: OSL crash after rendering finished (mainly on Windows).

2 years agoFix build after previous commit.
Brecht Van Lommel [Sat, 8 Jul 2017 00:07:39 +0000 (02:07 +0200)]
Fix build after previous commit.

2 years agoFix T51889: new file or load factory settings results in broken UI.
Brecht Van Lommel [Fri, 7 Jul 2017 22:44:31 +0000 (00:44 +0200)]
Fix T51889: new file or load factory settings results in broken UI.

Fix some cases that still assumed there to be a global DPI, instead of a per
window DPI that needs to be set before reading U.dpi.

2 years agoFix T51977: New depsgraph removes the grass in victor scene
Sergey Sharybin [Fri, 7 Jul 2017 14:38:56 +0000 (16:38 +0200)]
Fix T51977: New depsgraph removes the grass in victor scene

For now just make new depsgraph do similar updates to the old one.

See bug report for more detailed information about what was going on.

2 years agoFix T51991: Disabled for viewport particle system becomes visible after BI render
Sergey Sharybin [Fri, 7 Jul 2017 14:13:50 +0000 (16:13 +0200)]
Fix T51991: Disabled for viewport particle system becomes visible after BI render

Move check for psys render data before it is actually requested for creation.

2 years agoFix T50973: Directional blur node doesn't clamp value if using driver
Sergey Sharybin [Fri, 7 Jul 2017 10:08:14 +0000 (12:08 +0200)]
Fix T50973: Directional blur node doesn't clamp value if using driver

The issue was caused by combination of following factors:

- Blender Internal viewport render can not distinguish between which parts of
  main database changed, so it does full database re-sync when anything is
  tagged for an update.

  This way, if any NodeTree (including compositor) is changed, Blender Internal
  viewport is tagged for full render database update.

- With old dependency graph, scene-level drivers are evaluated on every
  iteration of scene_update_tagged, even if nothing is tagged for an update.

  This causes compositor drivers be evaluated quite often.

- Driver evaluation checks whether value was changed, and if so it tags
  corresponding ID type as updated (this is what was telling viewport to do
  render database update).

  This check was quite stupid: current property value was checked against the
  one coming from driver expression. This means, if driver value is outside
  of the hard limit range of the property, the property will always be
  considered updated.

The fix is to compare current property value against clamped value from the
driver.

2 years agoCycles: Fix ambiguity in call of min() function
Sergey Sharybin [Fri, 7 Jul 2017 08:40:19 +0000 (10:40 +0200)]
Cycles: Fix ambiguity in call of min() function

2 years agoFix T51978: Setup Tracking Scene after Motion Tracking fails the first time
Sergey Sharybin [Fri, 7 Jul 2017 07:36:25 +0000 (09:36 +0200)]
Fix T51978: Setup Tracking Scene after Motion Tracking fails the first time

2 years agoFix T51980: Motion Tracking - png image files appear in the Blender program directory...
Sergey Sharybin [Fri, 7 Jul 2017 07:27:24 +0000 (09:27 +0200)]
Fix T51980: Motion Tracking - png image files appear in the Blender program directory when using refine

Residue of debug code remained form some older bug fix.

2 years agoAdd option to OpenImage operator not to detect sequences.
Bastien Montagne [Thu, 6 Jul 2017 12:50:10 +0000 (14:50 +0200)]
Add option to OpenImage operator not to detect sequences.

Otherwise, there would be no way to load a bunch of pictures with
'sequence pattern' in name in a single operation.

Related to T51778.

2 years agoFix T51955: Changing Auto-IK length crashes Blender (with new-depsgraph)
Sergey Sharybin [Wed, 5 Jul 2017 15:52:42 +0000 (17:52 +0200)]
Fix T51955: Changing Auto-IK length crashes Blender (with new-depsgraph)

New dependency graph is tacking root bone into account when building the graph.
This is required in order to get proper dependencies between bones. so we can
reliably use bones as targets from the same rig (and even indirect relations
via external objects). This forces us to tag relations for update when we change
root IK chain bone.

Since relations rebuild is not fully trivial operation, we only do it for
the new dependency graph. In the future it'll be nice to avoid whole graph
rebuild for such cases, but that's mentioned as a TODO.

2 years agoFix T51015: Pack all into blend automatically leaves checkbox enabled.
Bastien Montagne [Thu, 6 Jul 2017 09:52:44 +0000 (11:52 +0200)]
Fix T51015: Pack all into blend automatically leaves checkbox enabled.

Makes absolutely no sense to forcefully enable that automatic packing option here,
user can do this himself if they likes, from the very same menu...

2 years agoCycles: Add artificial memory limit debug option for OpenCL
Mai Lavelle [Thu, 6 Jul 2017 00:16:41 +0000 (20:16 -0400)]
Cycles: Add artificial memory limit debug option for OpenCL

2 years agoRevert "Cycles: use std::min and max for extra overloads"
Mai Lavelle [Thu, 6 Jul 2017 08:21:29 +0000 (04:21 -0400)]
Revert "Cycles: use std::min and max for extra overloads"

We already have this in util_algorithm.h

This reverts commit cff172c7621d89773baa99a9460f19056efb5f1e.