2 years agoCMake: Fix copy-paste error
Sergey Sharybin [Thu, 22 Sep 2016 09:01:37 +0000 (11:01 +0200)]
CMake: Fix copy-paste error

2 years agoBring blender_release.cmake uptodate with the changes from D2227
lazydodo [Thu, 15 Sep 2016 12:34:57 +0000 (06:34 -0600)]
Bring blender_release.cmake uptodate with the changes from D2227

2 years ago[windows] add some helpers to make.bat to facilitate making release builds.
lazydodo [Wed, 14 Sep 2016 23:50:16 +0000 (17:50 -0600)]
[windows] add some helpers to make.bat to facilitate making release builds.

New features:
1) Release target that checks for both cuda 7.5 and 8 with WITH_CYCLES_CUDA_BINARIES=ON and CYCLES_CUDA_BINARIES_ARCH=sm_20;sm_21;sm_30;sm_35;sm_37;sm_50;sm_52;sm_60;sm_61 options set.
2) Option to switch between x86 and x64 builds, the default remains (auto detect the architecture) but can be overridden.
3) Option to switch between vs12(2013) and vs14(2015) default is 2013.

Reviewers: juicyfruit, sergey

Reviewed By: sergey

Tags: #platform:_windows

Differential Revision:

2 years agoFix non-finite normalization factor in certain cases
Sergey Sharybin [Thu, 22 Sep 2016 08:04:51 +0000 (10:04 +0200)]
Fix non-finite normalization factor in certain cases

2 years agoFix: Grease Pencil sculpting crashes when sculpting on layers without any strokes
Joshua Leung [Wed, 21 Sep 2016 05:02:17 +0000 (17:02 +1200)]
Fix: Grease Pencil sculpting crashes when sculpting on layers without any strokes

Reported by @loochmunz. I've also gone through checking for and fixing other places
where this was also occurring.

To be included in 2.78

2 years agoGPencil D+W Pie: Don't show editing operators when not in editmode
Joshua Leung [Wed, 21 Sep 2016 03:06:39 +0000 (15:06 +1200)]
GPencil D+W Pie: Don't show editing operators when not in editmode

These operators only operate on the selected strokes, but when not in editmode,
stroke vertices are not shown.

Safe for 2.78

2 years agoregression fix for 1346482d23f167fa57049128384246397fda8d27: The length of leaf bones...
Gaia Clary [Tue, 20 Sep 2016 15:32:44 +0000 (17:32 +0200)]
regression fix for 1346482d23f167fa57049128384246397fda8d27: The length of leaf bones should always be set to the length of the smallest bone. since the mentioned commit the importer did only recalculate the leaf bone length when the 'fix leaf bones' option was also enabled.

2 years agoFix T49386: Blender crashes when told to load an OCIO LUT that does not exist
Sergey Sharybin [Tue, 20 Sep 2016 08:48:25 +0000 (10:48 +0200)]
Fix T49386: Blender crashes when told to load an OCIO LUT that does not exist

2 years agoFix T49375: align rotation with snap target isn't toggleable in edit mode.
Bastien Montagne [Mon, 19 Sep 2016 13:49:43 +0000 (15:49 +0200)]
Fix T49375: align rotation with snap target isn't toggleable in edit mode.

Based on D2237, but fixed patch always hiding 'snap on self' button...

Should be safe for 2.78.

2 years agoLowercase includes for psapi.h and dbghelp.h windows includes.
Martijn Berger [Mon, 19 Sep 2016 12:20:37 +0000 (14:20 +0200)]
Lowercase includes for psapi.h and dbghelp.h windows includes.
This makes cross compilation a little less painful

2 years agoCacheFile: make sure SpinLock is destroyed when exiting Blender.
Kévin Dietrich [Mon, 19 Sep 2016 07:02:31 +0000 (09:02 +0200)]
CacheFile: make sure SpinLock is destroyed when exiting Blender.

Missed in rB62b1cdd6.

2 years agoCycles: Fix typo that would sometimes result in subsurf modifier being disabled
Mai Lavelle [Mon, 19 Sep 2016 02:11:07 +0000 (22:11 -0400)]
Cycles: Fix typo that would sometimes result in subsurf modifier being disabled

2 years agoFix T49245: Adaptive Subdivision with Auto Smooth causes weird mesh appearance
Mai Lavelle [Sun, 18 Sep 2016 17:21:29 +0000 (13:21 -0400)]
Fix T49245: Adaptive Subdivision with Auto Smooth causes weird mesh appearance

2 years agoFix T49384: crash in tangent space calculation with NaN mesh vertices.
Brecht Van Lommel [Sun, 18 Sep 2016 11:06:15 +0000 (13:06 +0200)]
Fix T49384: crash in tangent space calculation with NaN mesh vertices.

2 years agoFix T49372: Fresnel node: difference between 2.76 and 2.78 GLSL output
Sergey Sharybin [Fri, 16 Sep 2016 09:48:42 +0000 (11:48 +0200)]
Fix T49372: Fresnel node: difference between 2.76 and 2.78 GLSL output

2 years agoFix filebrowser not getting back to valid dir in Release builds.
Bastien Montagne [Thu, 15 Sep 2016 10:12:19 +0000 (12:12 +0200)]
Fix filebrowser not getting back to valid dir in Release builds.

Stupid mistake wrapping path validation code inside a BLI_assert, which means it was
only called in Debug builds...

Found by Sergey, thanks.

Should be backported to 2.78.

2 years agoFix crash in some cases when deleting particle systems.
Bastien Montagne [Thu, 15 Sep 2016 09:50:56 +0000 (11:50 +0200)]
Fix crash in some cases when deleting particle systems.

Those 'never null' ID pointers are really a PITA to handle... luckily we don't have much of those around!

Found by Sybren, thanks.

Should be backported to 2.78.

2 years agoFix Py's IDs user mapping: do not consider ShapeKeys' from here.
Bastien Montagne [Thu, 15 Sep 2016 09:12:31 +0000 (11:12 +0200)]
Fix Py's IDs user mapping: do not consider ShapeKeys' from here.

This is internal pointer helper for scene evaluation and tools, though exposed to bpy API,
it can give false 'dependency cycles' in results.

That's followup to rBe007552442634 really, both should be backported to 2.78

2 years agoFix Py's IDs user mapping: do not consider proxy_from here.
Bastien Montagne [Thu, 15 Sep 2016 08:11:47 +0000 (10:11 +0200)]
Fix Py's IDs user mapping: do not consider proxy_from here.

This is internal pointer helper for scene evaluation and tools, it's not exposed to bpy API anyway,
and can give false 'dependency cycles' in results.

Found by sybren in his Splode work.

2 years agoFix T49179: Parts of mesh disappear with adaptive subdivision
Mai Lavelle [Wed, 14 Sep 2016 23:34:43 +0000 (19:34 -0400)]
Fix T49179: Parts of mesh disappear with adaptive subdivision

Problem was zero length normal caused by a precision issue in patch evaluation.
This is somewhat of a quick fix, but is better than allowing possible NaNs to
occur and cause problems elsewhere.

2 years agofix Mac build with Xcode 8
Mike Erwin [Wed, 14 Sep 2016 14:23:48 +0000 (16:23 +0200)]
fix Mac build with Xcode 8

Small issues in GHOST
- use NSApplicationDelegate protocol for our app delegate
- make sure NSApp is initialized before using
(cherry picked from commit df7be04ca6d4b6dccc998445386228699d72d072)

2 years agoFix memory leak in copy pose operator
Sergey Sharybin [Wed, 14 Sep 2016 13:56:23 +0000 (15:56 +0200)]
Fix memory leak in copy pose operator

2 years agoBlender 2.78: Point locales to a new branch hash v2.78-rc2
Sergey Sharybin [Wed, 14 Sep 2016 14:46:07 +0000 (16:46 +0200)]
Blender 2.78: Point locales to a new branch hash

2 years agoCleanup: Fix epic indent failure in previous commit :/
Bastien Montagne [Wed, 14 Sep 2016 14:18:36 +0000 (16:18 +0200)]
Cleanup: Fix epic indent failure in previous commit :/

2 years agoFix missing PaintCurves list in
Bastien Montagne [Wed, 14 Sep 2016 14:13:21 +0000 (16:13 +0200)]
Fix missing PaintCurves list in

Minimal list features for now, no add/remove stuff, that we can add later...

Reported by sybren.

Should be safe for 2.78.

2 years agoFix T49341: Bad motion blur behavior in Cycles when using Speed effect in Sequencer
Sergey Sharybin [Wed, 14 Sep 2016 12:58:55 +0000 (14:58 +0200)]
Fix T49341: Bad motion blur behavior in Cycles when using Speed effect in Sequencer

Cycles was thinking it always rendering integer frame, which is not correct.

2 years agoFix T49342: TypeError when autocompleting
Bastien Montagne [Wed, 14 Sep 2016 13:40:35 +0000 (15:40 +0200)]
Fix T49342: TypeError when autocompleting

Regression from rB036c006cefe471. We can't use self here, self is, not pydescriptor of python path getsetter...

So for now, do not try to replace getsetter by actual value in's dict,
just return static var generated on first run.

Should be safe for 2.78.

2 years agoAttempt to fix broken path remapping in own rB443b3ca9b9cb.
Bastien Montagne [Wed, 14 Sep 2016 10:58:01 +0000 (12:58 +0200)]
Attempt to fix broken path remapping in own rB443b3ca9b9cb.

2 years agoCode Cleanup: Deduplicate undo node freeing code
Joshua Leung [Wed, 7 Sep 2016 11:53:13 +0000 (23:53 +1200)]
Code Cleanup: Deduplicate undo node freeing code

2 years agoFix: GPencil drawing sessions now respect limits for maximum undo steps
Joshua Leung [Wed, 7 Sep 2016 13:09:55 +0000 (01:09 +1200)]
Fix: GPencil drawing sessions now respect limits for maximum undo steps

When drawing with Grease Pencil "continous drawing" for a long time
(i.e. basically, drawing a very large number of strokes), it could be
possible to cause lower-specced machines to run out of RAM and start
swapping. This was because there was no limit on the number of undo
states that the GP undo code was storing; since the undo states grow
exponentially on each stroke (i.e. each stroke results in another undo
state which contains all the existing strokes AND the newest stroke), this
could cause issues when taken to the extreme.

2 years agoBlender 2.78 release: Update addons hash once again
Sergey Sharybin [Wed, 14 Sep 2016 10:39:07 +0000 (12:39 +0200)]
Blender 2.78 release: Update addons hash once again

2 years agoCMake: decouple WITH_CYCLES_OPENSUBDIV from WITH_OPENSUBDIV, and enable on OS X.
Brecht Van Lommel [Tue, 13 Sep 2016 20:55:18 +0000 (22:55 +0200)]
CMake: decouple WITH_CYCLES_OPENSUBDIV from WITH_OPENSUBDIV, and enable on OS X.

Reviewed By: sergey

Differential Revision:

2 years agoFix two issues related to 'partial' .blend files:
Bastien Montagne [Wed, 14 Sep 2016 09:35:16 +0000 (11:35 +0200)]
Fix two issues related to 'partial' .blend files:

I) Filename was not put in temp Main generated to save selected data only,
this was breaking readcode when trying to open partial file, leading to missing
filename in final loaded Main data.

II) Read code would confuse partial .blend files with Undo ones, when they had no screen in them
(which happens to 99.999% of partial .blend files I guess).

Reported by @sybren, thanks.

Should be safe enough for 2.78 release.

2 years agoFix compilation error: Shadowing of variable
Sergey Sharybin [Thu, 8 Sep 2016 07:40:25 +0000 (09:40 +0200)]
Fix compilation error: Shadowing of variable

2 years ago2.78 release: Update splash screen label
Sergey Sharybin [Wed, 14 Sep 2016 08:37:35 +0000 (10:37 +0200)]
2.78 release: Update splash screen label

2 years ago2.78 release: Update hash for addons submodule
Sergey Sharybin [Wed, 14 Sep 2016 08:28:48 +0000 (10:28 +0200)]
2.78 release: Update hash for addons submodule

2 years agoFix T35333: Update some WM/UI API functions docstrings.
Bastien Montagne [Mon, 5 Sep 2016 08:58:33 +0000 (10:58 +0200)]
Fix T35333: Update some WM/UI API functions docstrings.

Based on patch by @codemanx, but with slightly less verbose descriptions.

More detailed behavior etc. rather belongs to doc/python_api/examples/ imho.

2 years agoFix ignoring unused datablocks.
Bastien Montagne [Tue, 13 Sep 2016 11:22:03 +0000 (13:22 +0200)]
Fix ignoring unused datablocks.

Should be backported to 2.78.
Found by Sybren here in studio, thanks!

2 years agoOutliner: Report linked datablock edit failure when trying to rename linked data...
Philipp Oeser [Tue, 13 Sep 2016 11:12:44 +0000 (13:12 +0200)]
Outliner: Report linked datablock edit failure when trying to rename linked data in outliner

2 years agoFix T49323: Ineffective bone roll calculation with low rig scale
Sergey Sharybin [Tue, 13 Sep 2016 10:38:47 +0000 (12:38 +0200)]
Fix T49323: Ineffective bone roll calculation with low rig scale

The code was expecting vector to be normalized, however after
applying inverted object matrix it was possible to have scale
applied to it.

2 years agoFix T49336: Outliner allows to edit restrict flags for linked objects
Sergey Sharybin [Tue, 13 Sep 2016 09:33:55 +0000 (11:33 +0200)]
Fix T49336: Outliner allows to edit restrict flags for linked objects

2 years agoFix T49290: Specific .blend with hair crashes in MacOS 2.78 RC1 on render
Sergey Sharybin [Tue, 13 Sep 2016 08:59:48 +0000 (10:59 +0200)]
Fix T49290: Specific .blend with hair crashes in MacOS 2.78 RC1 on render

The issue was caused by some false-positive empty non-AABB intersection.
Tried to tweak it a bit so it does not record intersection anymore.

Hopefully will work for all platforms. Tested here on iMac and Debian.

2 years agoFix T49327: Cycles OSL Mode: RGB Curves node only outputs gray scale images
Sergey Sharybin [Mon, 12 Sep 2016 14:14:40 +0000 (16:14 +0200)]
Fix T49327: Cycles OSL Mode: RGB Curves node only outputs gray scale images

To be backported to 2.78 release.

2 years agoFix T49296, assert failure in Bevel code.
Howard Trickey [Mon, 12 Sep 2016 11:27:29 +0000 (07:27 -0400)]
Fix T49296, assert failure in Bevel code.

The mesh interpolation function failed to fill a fractions-of-the-way
array properly when the distances are very small but nonzero.

2 years agoCycles: Fix wrong SSS in combination with hair on AVX2 platform
Sergey Sharybin [Mon, 12 Sep 2016 10:48:35 +0000 (12:48 +0200)]
Cycles: Fix wrong SSS in combination with hair on AVX2 platform

Not sure why exactly that happened, need a closer look.

2 years agoCycles: Fix shading and crashes resulting from constant folding on displacement
Mai Lavelle [Sun, 11 Sep 2016 17:39:12 +0000 (13:39 -0400)]
Cycles: Fix shading and crashes resulting from constant folding on displacement

Constant folding was removing all nodes connected to the displacement output
if they evaluated to a constant, causing there to be no valid graph for
displacement even when there was displacement to be applied, and sometimes
caused crashes.

2 years agoCycles: Replace object index hack with actual checks for SD_TRANSFORM_APPLIED
Mai Lavelle [Sat, 3 Sep 2016 01:37:17 +0000 (21:37 -0400)]
Cycles: Replace object index hack with actual checks for SD_TRANSFORM_APPLIED

Using ones complement for detecting if transform has been applied was confusing
and led to several bugs. With this proper checks are made.

Also added a few transforms where they were missing, mostly affecting baking
and displacement when `P` is used in the shader (previously `P` was in the
wrong space for these shaders)

Also removed `TIME_INVALID` as this may have resulted in incorrect
transforms in some cases.

Reviewed By: brecht

Differential Revision:

2 years agoCycles: Fix bump mapping to use object space when used with true displacement
Mai Lavelle [Fri, 2 Sep 2016 04:41:04 +0000 (00:41 -0400)]
Cycles: Fix bump mapping to use object space when used with true displacement

Bump mapping was happening in world space while displacement happens in object
space, causing shading errors when displacement type was used with bump mapping.

To fix this the proper transforms are added to bump nodes. This is only done
for automatic bump mapping however, to avoid visual changes from other uses of
bump mapping. It would be nice to do this for all bump mapping to be consistent
but that will have to wait till we can break compatibility.

Reviewed By: brecht

Differential Revision:

2 years ago[CMAKE/Platform/Windows] Only perform version check if the actual compiler is MSVC
lazydodo [Sat, 10 Sep 2016 23:58:56 +0000 (17:58 -0600)]
[CMAKE/Platform/Windows] Only perform version check if the actual compiler is MSVC

2 years agoFix undefined variable on errors in Cycles ctests.
Dmitry Dygalo [Sat, 10 Sep 2016 20:55:28 +0000 (22:55 +0200)]
Fix undefined variable on errors in Cycles ctests.

Reviewed By: brecht

Differential Revision:

2 years agoFix OpenSubdiv related buffer overrun with multiple FVar channels.
Alexander Gavrilov [Sat, 10 Sep 2016 18:15:52 +0000 (21:15 +0300)]
Fix OpenSubdiv related buffer overrun with multiple FVar channels.

The existing code uses the input value count of the first channel
for all of them. If the first channel is the largest, it leads to
a crash-causing buffer overrun in memcpy below. Likely this was
left since the time when only one channel was supported.

As a crash fix, probably should go into 2.78

2 years agoFix missing 'prop_required' flags in some ID RNA funcs.
Bastien Montagne [Fri, 9 Sep 2016 09:58:18 +0000 (11:58 +0200)]
Fix missing 'prop_required' flags in some ID RNA funcs.

Not critical, but would rather have this in 2.78 (for API doc reasons mostly).

2 years agoFix/Workaround T49297: Crash related to custom data draw (Blender with ASAN)
Sergey Sharybin [Fri, 9 Sep 2016 08:55:22 +0000 (10:55 +0200)]
Fix/Workaround T49297: Crash related to custom data draw (Blender with ASAN)

Root of the issue is that active render index became wrong. This is the actual
thing to be fixed, but as usual this is quite tricky to reproduce. Since such
bad situation might have happened more and fix isn't really difficult or
intruisive let's avoid crash for now.

Can be revisited once we figure out root of the issue.

Nice for 2.78 release.

2 years agoFix T49299: Removing offset object in modifiers doesn't update mesh.
Bastien Montagne [Fri, 9 Sep 2016 08:44:49 +0000 (10:44 +0200)]
Fix T49299: Removing offset object in modifiers doesn't update mesh.

Own fault in new ID management work, thought rebuild the DAG itself was
enough to actually update whole scene, but we actually need to tag datablocks
for update as well, when we change (or remove) one of their ID pointers...

2 years agoCycles: Fix regular BVH nodes refit
Sergey Sharybin [Thu, 8 Sep 2016 13:08:35 +0000 (15:08 +0200)]
Cycles: Fix regular BVH nodes refit

For proper indexing to work we need to use unaligned node with
identity transform instead of aligned nodes when doing refit.

To be backported to 2.78 release.

2 years agoCycles: Add asserts to BVH node packing
Sergey Sharybin [Thu, 8 Sep 2016 12:32:05 +0000 (14:32 +0200)]
Cycles: Add asserts to BVH node packing

2 years agoCycles: Cleanup: line wrapping
Sergey Sharybin [Thu, 8 Sep 2016 12:26:10 +0000 (14:26 +0200)]
Cycles: Cleanup: line wrapping

2 years agoFix T49283: Crash in BKE_ptcache_make_particle_key.
Bastien Montagne [Thu, 8 Sep 2016 08:24:56 +0000 (10:24 +0200)]
Fix T49283: Crash in BKE_ptcache_make_particle_key.

This is really hack-fix actually, not sure why `get_pointcache_keys_for_time()` seems to assume
it will always find key for given part index at least for current frame, and whether this assumption
is wrong or whether bug happens elsewhere...

Anyway, this is to be wiped out in 2.8, so no point loosing too much time on it, for now merely
returning unchanged (i.e. zero'ed) ParticleKeys in case index2 is invalid. Won't hurt anyway,
even if this did not crash in release builds, would be returning giberish values.

2 years agoFix T49286: Compilation error with XCode 7.0
Sergey Sharybin [Thu, 8 Sep 2016 07:27:51 +0000 (09:27 +0200)]
Fix T49286: Compilation error with XCode 7.0

Weirdly enough, this version of XCode seems to have static_assert()
even when NOT using C++11. This is totally weird and counter intuitive
since static_assert() is supposed to be C++11 onlky feature.

Can XCode stop using future, please? :)

2 years agoCycles: Fix OpenCL speed regression introduced with the improved bump mapping
Lukas Stockner [Wed, 7 Sep 2016 23:33:41 +0000 (01:33 +0200)]
Cycles: Fix OpenCL speed regression introduced with the improved bump mapping

The two SVM nodes added with e7ea1ae78c caused a slowdown on AMD cards when rendering with OpenCL, whether displacement was used or not.
In the Barcelona Pavillon scene on a RX480, this would cause a 12% slowdown.

Therefore, this commit adds a additional flag for feature-adaptive compilation so that the new SVM nodes are only enabled when they are needed (Node tree connected to the Displacement output and Displacement type set to Both).

Also, the nodes were also added to shaders when the Displacement Type was set to Bump (the default), which was unneccessary and is fixed now.

Thanks to linda2 on IRC for reporting and testing and to maiself for help with the displacement shader code.

This fix might be relevant for 2.78, but it should be tested further before including it.

2 years agoFix T49273: Crash during access to dupli weights at launch time.
Bastien Montagne [Wed, 7 Sep 2016 10:45:58 +0000 (12:45 +0200)]
Fix T49273: Crash during access to dupli weights at launch time.

See commit's comments for details, but this boils down to: do not try to use
purely runtime cache data as a 'real' ID pointer in readcode, it's likely
doomed to fail in some cases, and is bad practice in any case!

Thix fix implies dupliweight's object will be invalid until first scene update
(i.e. first particles evaluation).

2 years agoOpenSubdiv: Support multiple materials drawing in Cycles textured view
Sergey Sharybin [Wed, 7 Sep 2016 07:47:35 +0000 (09:47 +0200)]
OpenSubdiv: Support multiple materials drawing in Cycles textured view

Consider for inclusion into 2.78.

2 years ago[cmake/cpack] allow override of package name
lazydodo [Tue, 6 Sep 2016 13:21:23 +0000 (07:21 -0600)]
[cmake/cpack] allow override of package name

Cpack generates a standard filename with git information in it, which might not always be wanted for release builds, this patch adds an option to override that default filename.

Reviewers: sergey, juicyfruit

Reviewed By: juicyfruit

Differential Revision:

ammended to fix: wrong variable name in main CMakeLists.txt

2 years agoRevert "Depsgraph: Prioritize evaluation of the new scheduled nodes"
Sergey Sharybin [Tue, 6 Sep 2016 14:43:26 +0000 (16:43 +0200)]
Revert "Depsgraph: Prioritize evaluation of the new scheduled nodes"

This reverts commit 9444cd56db1a4e43d03fa8c735cd893b2e74b913.

This commit caused some flickering in the bones when swapping IK to Fk.

While it's unclear why such change caused any regressions, let's revert
it to unlock the studio.

2 years ago[cmake/cpack] allow override of package name
lazydodo [Tue, 6 Sep 2016 13:21:23 +0000 (07:21 -0600)]
[cmake/cpack] allow override of package name

Cpack generates a standard filename with git information in it, which might not always be wanted for release builds, this patch adds an option to override that default filename.

Reviewers: sergey, juicyfruit

Reviewed By: juicyfruit

Differential Revision:

2 years agoFix T41883: Strip keyframes not respected for scenes rendered by other scenes
Sergey Sharybin [Tue, 6 Sep 2016 12:07:07 +0000 (14:07 +0200)]
Fix T41883: Strip keyframes not respected for scenes rendered by other scenes

2 years agoAdd script which scales splash screen down
Sergey Sharybin [Tue, 6 Sep 2016 10:27:58 +0000 (12:27 +0200)]
Add script which scales splash screen down

Based on reading documentation around. This particular version
is based on the ImageMagic documentation which could be found

Current filter is based on measuring mean error with the current
splash screen and choosing combination of parameters which
gives minimal mean error.

2 years agoFix cast shadows (material option) in the viewport
Mike Erwin [Mon, 5 Sep 2016 17:05:00 +0000 (13:05 -0400)]
Fix cast shadows (material option) in the viewport

Fix cast shadows options (in material tab) not working in the viewport.
An off-by-one error. See D2194 for more.

Committing for Ulysse Martin (youle) who found & fixed this.

2 years agoFix T49252: Crash when image textures used with true displacement
Mai Lavelle [Mon, 5 Sep 2016 16:51:30 +0000 (12:51 -0400)]
Fix T49252: Crash when image textures used with true displacement

2 years agoOpenSubdiv: Fix missing ORCO when enabling OSD but having dependency to the geometry
Sergey Sharybin [Mon, 5 Sep 2016 15:08:09 +0000 (17:08 +0200)]
OpenSubdiv: Fix missing ORCO when enabling OSD but having dependency to the geometry

Was causing huge viewport lags.

Reported by angavrilov in IRC, thanks!

Safe and nice for 2.78.

2 years agoFix T49251: moving smoke domain with additional resolution causes crash.
Alexander Gavrilov [Mon, 5 Sep 2016 12:50:12 +0000 (15:50 +0300)]
Fix T49251: moving smoke domain with additional resolution causes crash.

This is a bug in the multithreaded task manager in negative value range.

The problem here is that if previter is unsigned, the comparison in the
return statement is unsigned, and works incorrectly if stop < 0 &&
iter >= 0. This in turn can happen if stop is close to 0, because this
code is designed to overrun the stop by chunk_size*num_threads as
the threads terminate.

This probably should go into 2.78 as it prevents a crash.

2 years agoFix own mistake in recent rB8b2a45052093, broke saving render results as images in...
Bastien Montagne [Mon, 5 Sep 2016 11:12:05 +0000 (13:12 +0200)]
Fix own mistake in recent rB8b2a45052093, broke saving render results as images in some cases.

Reported by sebastian_k over IRC, thanks.

To be backported to 2.78.

2 years agoAttempt to fix compilation error with static boost on certain platforms
Sergey Sharybin [Mon, 5 Sep 2016 11:10:19 +0000 (13:10 +0200)]
Attempt to fix compilation error with static boost on certain platforms

This was reported in T49231.

2 years agoFix T49226: Incorrect Material viewport shading of Cycles Normal Map node in Edit...
Sergey Sharybin [Fri, 2 Sep 2016 15:50:30 +0000 (17:50 +0200)]
Fix T49226: Incorrect Material viewport shading of Cycles Normal Map node in Edit mode for an object with Array modifier

Was incorrect indexing done in the array. Caused by 5abae51.

Not sure why it needed to be changed here, but array here is supposed to be
a loop data, so bringing back loop index as it originally was. The shading was
wrong in edit mode with BI active as well (so it's not like it's needed for
BI only).

Patch in collaboration with Alexander Gavrilov (angavrilov), thanks!

Should be double-checked and ported to 2.78.

2 years agoFix glUniform called from glBegin/glEnd blocks
Sergey Sharybin [Fri, 2 Sep 2016 14:17:20 +0000 (16:17 +0200)]
Fix glUniform called from glBegin/glEnd blocks

Was causing some invalid operations in OpenGL.

After more testing should be fine for 2.78.

2 years agoFix T49220: Vertex paint doesn't work with OpenSubdiv
Sergey Sharybin [Fri, 2 Sep 2016 13:15:42 +0000 (15:15 +0200)]
Fix T49220: Vertex paint doesn't work with OpenSubdiv

It's a bit tricky to align vertex color data between Blender and OpenSubdiv
so for now we simply disable OpenSubdiv in the paint modes.

Safe for 2.78.

2 years agoCMake: Skip addons_contrib for release candidate builds
Sergey Sharybin [Fri, 2 Sep 2016 12:42:01 +0000 (14:42 +0200)]
CMake: Skip addons_contrib for release candidate builds

Nowadays release candidates are supposed to be as close to the final
release as possible.

Safe for 2.78 release branch.

2 years agoAPI doc update script: Fix generated zipfile name, was broken in 'release' case...
Bastien Montagne [Tue, 13 Sep 2016 06:38:10 +0000 (08:38 +0200)]
API doc update script: Fix generated zipfile name, was broken in 'release' case...

2 years agoAPI doc: add new pure-rsync py script to update API doc on Blender server.
Bastien Montagne [Mon, 5 Sep 2016 07:38:53 +0000 (09:38 +0200)]
API doc: add new pure-rsync py script to update API doc on Blender server.

The other one ( needs an ssh account on the server to work - and I hate bash, too! :P

2 years agoCycles: Fix unreported - Missing node group for the Camera Node
Lukas Stockner [Mon, 5 Sep 2016 02:07:10 +0000 (04:07 +0200)]
Cycles: Fix unreported - Missing node group for the Camera Node

Thanks to linda2 for reporting in IRC.

2 years agoAlembic: fix parenting issues when an object has multiple curves/points
Kévin Dietrich [Mon, 5 Sep 2016 01:46:25 +0000 (03:46 +0200)]
Alembic: fix parenting issues when an object has multiple curves/points

2 years agoFix T49249: Alembic export with multiple hair systems crash blender
Kévin Dietrich [Mon, 5 Sep 2016 01:32:36 +0000 (03:32 +0200)]
Fix T49249: Alembic export with multiple hair systems crash blender

Crash was due to a name collision in Alembic objects caused by the fact
that names derive from the one of the Blender object. An object having
multiple particles system would thus give its name to various

Now use the name of the particles system for the Alembic object.

2 years agoFix a few OpenCL compiler warnings.
Brecht Van Lommel [Sat, 3 Sep 2016 21:06:12 +0000 (23:06 +0200)]
Fix a few OpenCL compiler warnings.

2 years agofix: not initialised variable can crash blender (related to modifiers with cage editi...
Gaia Clary [Sat, 3 Sep 2016 16:00:40 +0000 (18:00 +0200)]
fix: not initialised variable can crash blender (related to modifiers with cage editing enabled)

2 years agoFix T49228: Separate by material, materials dissappear after reload.
Bastien Montagne [Sat, 3 Sep 2016 10:51:50 +0000 (12:51 +0200)]
Fix T49228: Separate by material, materials dissappear after reload.

Yet another mismatch where code would decrease usercount (of Material here) but never increase it again
when re-assigning the datablock...

2 years agoFix T49229: ID user decrement error when deleting group instance twice.
Bastien Montagne [Sat, 3 Sep 2016 09:47:17 +0000 (11:47 +0200)]
Fix T49229: ID user decrement error when deleting group instance twice.

Another great example of inconsistency in usercount handling - dupli_group was considered
as refcounted by readfile.c code (and hence by library_query.c one, which is based on it),
but not by editor/BKE_object code, which never increased group's usercount when creating
an instance of it etc.

To be backported to 2.78.

2 years ago2.78 release: Point locales to a proper updated branch v2.78-rc1
Sergey Sharybin [Fri, 2 Sep 2016 09:54:54 +0000 (11:54 +0200)]
2.78 release: Point locales to a proper updated branch

2 years agoPoint submodules to latest master branches
Sergey Sharybin [Fri, 2 Sep 2016 09:43:36 +0000 (11:43 +0200)]
Point submodules to latest master branches

We did not update them for really long time and the currently used
hashes are quite old and probably wouldn't work without manually
updating all submodules.

Not as if it's something totally crucial (we ask to update submodules
all the times and that's what `make update` does) but updating hashes
will save some cloning/checkout time.

2 years agoBlender 2.78 commit!
Sergey Sharybin [Fri, 2 Sep 2016 09:37:25 +0000 (11:37 +0200)]
Blender 2.78 commit!


- Version bump to 2.78
- Doxy file update
- New splash screen
- Wrapped some do_versions with version check
- Updated template to use proper font

After poking around a lot it seems Droid Sans was used during 2.7x series.
(or at least difference between using this font and comparing to previous
splash screens gives none visible difference).

2 years agoFix T49180: Cycles MIS Map for Animated Environment Texture Movie Doesn't Update...
Sergey Sharybin [Fri, 2 Sep 2016 07:58:41 +0000 (09:58 +0200)]
Fix T49180: Cycles MIS Map for Animated Environment Texture Movie Doesn't Update on Frame Change

Not really ideal fix at all, but we are at RC today, so better to play really safe.

2 years agoCycles: Silence strict compiler warning in release build
Sergey Sharybin [Fri, 2 Sep 2016 07:14:34 +0000 (09:14 +0200)]
Cycles: Silence strict compiler warning in release build

2 years agoFix T49222: Image Save settings are overridden by the File Save Screen ones.
Bastien Montagne [Fri, 2 Sep 2016 06:37:57 +0000 (08:37 +0200)]
Fix T49222: Image Save settings are overridden by the File Save Screen ones.

There were two inconsistencies in how 'save image' op initiated its settings:
* It would always use ImBuf->planes value.
* It would always use Image views settings.

Both of those settings should come from scene->r.im_format (as everything else)
when saving render/compo result...

2 years agoCycles microdisplacement: Improved automatic bump mapping
Mai Lavelle [Sun, 14 Aug 2016 15:44:25 +0000 (11:44 -0400)]
Cycles microdisplacement: Improved automatic bump mapping

Object coordinates can now be used in the displacement shader and will give
correct results, where as before bump mapping was calculated from the displace
positions and resulted in incorrect shading.

This works by evaluating the shader in two parts, first bump then surface, and
setting the shader state to match what it would be if the surface was
undisplaced for the bump shader evaluation. Currently only `P` is set as if
undisplaced, but other shader variables could be set as well, such as `I` or
`time`. Since these aren't set to anything meaningful for displacement I left
them out of this patch, we can decide what to do with them separately.

Reviewed By: brecht

Differential Revision:

2 years agoCycles: Store undisplaced coordinates for meshes when needed
Mai Lavelle [Sat, 13 Aug 2016 16:27:17 +0000 (12:27 -0400)]
Cycles: Store undisplaced coordinates for meshes when needed

Reviewed By: brecht

Differential Revision:

2 years agoCycles: remove duplicate shader storage
Mai Lavelle [Tue, 16 Aug 2016 23:42:08 +0000 (19:42 -0400)]
Cycles: remove duplicate shader storage

Storing multiple copies of a shader was needed when the displacement method was
a mesh option and could be different for each mesh. Now that its a shader option
this is unnecessary.

Reviewed By: brecht

Differential Revision:

2 years agoFix T49215
lazydodo [Thu, 1 Sep 2016 20:00:20 +0000 (14:00 -0600)]
Fix T49215

2 years agoFix T49224: Crash due to dangling value in 'Object.proxy_from' pointer.
Bastien Montagne [Thu, 1 Sep 2016 19:16:54 +0000 (21:16 +0200)]
Fix T49224: Crash due to dangling value in 'Object.proxy_from' pointer.

Why/how this may happen remains a mystery, so for now simply clearing this runtime-only
pointer on Object reading...

2 years agoCurve Fitting: correct initial handle sign
Campbell Barton [Thu, 1 Sep 2016 16:52:46 +0000 (02:52 +1000)]
Curve Fitting: correct initial handle sign

In practice the initial values are almost never used.

2 years agoMath Lib: avoid char > int conversion w/ line plot
Campbell Barton [Tue, 9 Aug 2016 06:57:26 +0000 (16:57 +1000)]
Math Lib: avoid char > int conversion w/ line plot

2 years agoFix crash calling wm.open_mainfile from menu with --debug-memory enabled
Julian Eisel [Thu, 1 Sep 2016 14:55:01 +0000 (16:55 +0200)]
Fix crash calling wm.open_mainfile from menu with --debug-memory enabled

Didn't do any bisecting, but guess it's caused rBb54e95a5c8dcb7 (2.74 is fine, 2.75 isn't).
I think this fix makes some other hacks redundant but need to check details (will do when we're back to bcon1 to avoid regressions).