Commit Graph

65788 Commits

Author SHA1 Message Date
Bastien Montagne
ce952fd36e Fix T49342: TypeError when autocompleting bpy.app.something.
Regression from rB036c006cefe471. We can't use self here, self is bpy.app, not pydescriptor of python path getsetter...

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

Should be safe for 2.78.
2016-09-14 15:54:54 +02:00
Sergey Sharybin
ab6a3dd6c1 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.
2016-09-14 14:59:39 +02:00
Bastien Montagne
66d4006f51 Attempt to fix broken path remapping in own rB443b3ca9b9cb. 2016-09-14 12:58:01 +02:00
48c4a5a4dd CMake: decouple WITH_CYCLES_OPENSUBDIV from WITH_OPENSUBDIV, and enable on OS X.
Reviewed By: sergey

Differential Revision: https://developer.blender.org/D2227
2016-09-14 12:02:44 +02:00
Bastien Montagne
443b3ca9b9 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.
2016-09-14 11:35:16 +02:00
Bastien Montagne
a2677100fe FileBrowser: Always do full cache refresh while we are still listing...
Does not seem to be a problem with embeded filelisting code, but was breaking with some experimental asset engines.
2016-09-13 19:02:27 +02:00
Sergey Sharybin
0de69e56b4 Cycles: Implement threaded SVM nodes compilation
The title says it all actually. From tests with barber shop scene here
gives 2-3x speedup for shader compilation on my oldie i7 machine. The
gain is mainly due to textures metadata query from jpeg files (which
seems to requite de-compression before metadata can be read). But in
theory could give nice improvements for scenes with huge node trees
as well (i'm talking about node trees of complexity of fractal which
we had reports about in the past).

Reviewers: juicyfruit, dingto, lukasstockner97, brecht

Reviewed By: brecht

Subscribers: monio, Blendify

Differential Revision: https://developer.blender.org/D2215
2016-09-13 13:46:49 +02:00
Bastien Montagne
f38f787448 Fix bpy.data.user_map() ignoring unused datablocks.
Should be backported to 2.78.
Found by Sybren here in studio, thanks!
2016-09-13 13:23:03 +02:00
Philipp Oeser
d82710cc02 Outliner: Report linked datablock edit failure when trying to rename linked data in outliner 2016-09-13 13:12:44 +02:00
Sergey Sharybin
7f67885526 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.
2016-09-13 12:38:47 +02:00
Sergey Sharybin
0307369211 Fix T49336: Outliner allows to edit restrict flags for linked objects 2016-09-13 11:33:55 +02:00
Sergey Sharybin
ecbfa31caa Cycles: Tweak empty boundbox children
The idea here is to make assert failure to fail sooner on an incorrect
node address rather than later with stack overflow.
2016-09-13 11:05:11 +02:00
Sergey Sharybin
52038fd8c7 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.
2016-09-13 10:59:48 +02:00
Bastien Montagne
56c798ee62 API doc update script: Fix generated zipfile name, was broken in 'release' case... 2016-09-13 08:39:01 +02:00
Julian Eisel
620724d5e2 Fix error in --debug-handlers printing
Was missing else block (and also missing newline character). Caused by e672e7a070e698.
2016-09-12 18:39:25 +02:00
Sergey Sharybin
91eb1c2e2a Fix code which was commented by accident
Well, more like some last-minute checks which i did not see before commit.

Let's increase commit ratio!
2016-09-12 16:29:54 +02:00
Sergey Sharybin
ad40ae1e06 Fix T49327: Cycles OSL Mode: RGB Curves node only outputs gray scale images
To be backported to 2.78 release.
2016-09-12 16:14:40 +02:00
Sergey Sharybin
d15899cca7 Cycles: Fix compilation error after recent commits 2016-09-12 16:06:50 +02:00
Sergey Sharybin
98c7e75897 Graph editor: Add channel option to make it persistent on display
The idea is to allow certain animation channels to be always visible in
animation editors. So, for example, one can pin Camera animation to the
editor so it is always possible to refine/tweak camera animation when
animating something else in the scene.

There is probably some more polishing required, and some current
limitations could be solved in the future but should be a good starting
point already.

Currently only works for object without recursing into deeper datablock
(so for example, it's not possible to pin object material animation).

Studio request by Colin Levy.
2016-09-12 15:39:40 +02:00
Howard Trickey
0f8f494d63 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.
2016-09-12 07:29:31 -04:00
Sergey Sharybin
fb2c435d86 Cycles: Fix wrong SSS in combination with hair on AVX2 platform
Not sure why exactly that happened, need a closer look.
2016-09-12 12:48:35 +02:00
Sergey Sharybin
91e0a16f2f Cycles: Use XDG's .cache folder for cached kernels
Basically just moves cached kernels from ~/.config/blender/BLENDER_VERSION to
~/.cache/cycles/kernels. This has following benefits:

- Follows XDG specification more closely,
  not as if it's totally crucial or measurable by users, but still nice.

- Prevents unexpected sizes of config folder, makes disk space used in more
  predictable for users way.

- Allows to share kernels across multiple Blender versions,
  which makes it easier debugging at the times close to release.

- "Copy Previous Settings" operator will no longer be copying possibly
  gigabytes of cached kernels, which used to lead to really nast disk usage
  and annoying delays of copying settings.

- In the future we can have some smart logic to clear old unused cached
  kernels.

Currently only done for Linux and OSX. Windows still follows old "cache"
folder logic, but it's not really important for now because we don't
support kernel compilation on this platform yet.

Reviewers: dingto, juicyfruit, brecht

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D2197
2016-09-12 09:39:05 +02:00
Mai Lavelle
49df5d0980 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.
2016-09-11 13:49:34 -04:00
Mai Lavelle
013b46d6bd 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: https://developer.blender.org/D2192
2016-09-11 13:49:05 -04:00
Mai Lavelle
92a2c49aab 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: https://developer.blender.org/D2191
2016-09-11 11:20:21 -04:00
Antonioya
ac2fe8312b Revert "GPencil: Add IFACE_ macro to some strings"
This reverts commit b50a5b92c15e0f110ca978352c2ba59bc3e97dd3 because BKE_report functions are already automatically handled by translation system.
2016-09-11 13:06:37 +02:00
Antonioya
b50a5b92c1 GPencil: Add IFACE_ macro to some strings 2016-09-11 12:28:09 +02:00
Antonioya
347d759c62 GPencil: Change interpolate stroke factor
Now the factor works similar to other Blender areas to make the factor
more consistent for artists. The value 0% means equal to original
stroke, 100% equal to final stroke (50% means half way). Any value below
0% or greater than 100% create an overshoot of the stroke.
2016-09-11 12:28:09 +02:00
lazydodo
96f28f9b50 [CMAKE/Platform/Windows] Only perform version check if the actual compiler is MSVC 2016-09-10 17:58:56 -06:00
Kai Mach
56064b508b NDOF: allow view movement for modal border and circle select operators.
Reviewed By: brecht

Differential Revision: https://developer.blender.org/D2167
2016-09-10 23:37:53 +02:00
Dmitry Dygalo
9fc1cfc4f1 Fix undefined variable on errors in Cycles ctests.
Reviewed By: brecht

Differential Revision: https://developer.blender.org/D2201
2016-09-10 23:04:14 +02:00
Alexander Gavrilov
d8681c99c4 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
2016-09-10 21:15:52 +03:00
Bastien Montagne
037df2aaa6 Fix T49303: Fix T49314: More issues with new handling of X11 shortcuts.
This commits changes two things:
* It adds more keysyms preferably taken from XLookupKeysym than XLookupString (namely, all numpad ones).
* It falls back to keysyms from XLookupKeysym in other cases, when XLookupString does not produce anything we know of.

Finding the correct balance here is far from easy, but think we are comming rather close to it now...
2016-09-10 12:38:12 +02:00
Sergey Sharybin
2820ab5a8f Cleanup: Indentation 2016-09-09 13:08:21 +02:00
Sergey Sharybin
4c1d40d87e Cycles: Add overall timing log to SVNShaderManager 2016-09-09 12:27:27 +02:00
Bastien Montagne
ff1ba0861d 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).
2016-09-09 12:00:23 +02:00
Sergey Sharybin
70e7c0829e Cycles: Deduplicate QBVH node packing across BVH build and refit 2016-09-09 11:32:05 +02:00
Sergey Sharybin
d205bc3059 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.
2016-09-09 10:57:25 +02:00
Bastien Montagne
b27ba26b44 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...
2016-09-09 10:44:49 +02:00
Kévin Dietrich
2fe0125fcd Smoke viewport: remove dead code.
OCD commit, but cleans the code a bit:
- the first `if 0` block was supposed to draw collision objects but is
vastly outdated as most of the SmokeCollisionSettings member variables
were removed a few years ago and collision objects are drawn like other
objects anyway. Also it was committed already commented out back in
2009.
- the second `if 0` block was doing pretty much the same thing as the
few lines above it.
2016-09-09 06:05:58 +02:00
Kévin Dietrich
0053a91165 Alembic streaming: initial support to interpolate data between frames.
Pretty self-explanatory, allows to get some slow motion type of playback
and animations.
2016-09-09 05:59:20 +02:00
Kévin Dietrich
631af9f930 Alembic: add option to triangulate meshes upon export. 2016-09-09 05:30:43 +02:00
Kévin Dietrich
78ea06fea4 Alembic, cleanup: split archive opening code in their own classes and
files.

Also helps keeping platform specific code in separate from the rest of
the code.
2016-09-09 05:06:06 +02:00
Lukas Stockner
1558f5b660 Cycles: Don't run full shader evaluation for constant emission lamps
Most of the time, Lamps in Cycles are just a constant emission closure, no texturing etc. Therefore, running a full shader evaluation is wasteful.
To avoid that, Cycles now detects these constant emission shaders and stores their value in the lamp data along with a flag in the shader.
Then, at runtime, if this flag is set, the lamp code just uses this value and only runs the full shader evaluation if it is neccessary.

In scenes with a lot of lamps and with "Sample all direct/indirect" enabled, this saves up to 20% of rendering time in my tests.

Reviewers: #cycles

Differential Revision: https://developer.blender.org/D2193
2016-09-09 01:39:09 +02:00
Sergey Sharybin
6de08f6cd1 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.
2016-09-08 15:08:35 +02:00
Sergey Sharybin
27e2317513 Cycles: Add asserts to BVH node packing 2016-09-08 15:03:55 +02:00
Sergey Sharybin
3598a3d1d5 Cycles: Cleanup: line wrapping 2016-09-08 14:26:10 +02:00
Bastien Montagne
45f833c21d 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.
2016-09-08 10:24:56 +02:00
Sergey Sharybin
a2e8b7e216 Fix compilation error: Shadowing of variable 2016-09-08 09:40:25 +02:00
Sergey Sharybin
a6f733310b Fix strict compiler warnings 2016-09-08 09:39:18 +02:00