Commit Graph

65659 Commits

Author SHA1 Message Date
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
Sergey Sharybin
ace92854b2 Fix compilation error: missing forward declaration 2016-09-08 09:38:24 +02:00
Sergey Sharybin
18ae1504ea 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? :)
2016-09-08 09:27:51 +02:00
Lukas Stockner
7e7a9d146c 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.
2016-09-08 01:33:41 +02:00
Joshua Leung
afd3a55e3e GPencil UI: Ensure "Move to Color" can be found from the colors panel dropdwon too 2016-09-08 01:42:16 +12:00
Joshua Leung
19e6321ac0 GP Interpolation: Mark created frames as being "breakdowns"
This brings this tool more in line with the Breakdowner for armature animation,
with which it shares many commonalities.
2016-09-08 01:24:02 +12:00
Joshua Leung
4b65662483 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.
2016-09-08 01:14:53 +12:00
Joshua Leung
5b42e07e18 Code Cleanup: Deduplicate undo node freeing code 2016-09-08 01:14:52 +12:00
Bastien Montagne
bcc863993a 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).
2016-09-07 12:48:22 +02:00
Antonioya
1263965f83 GPencil: New interpolate strokes operators
Two new modal operators to create a grease pencil interpolate drawing
for one frame or a complete sequence between two frames.  For drawing
the temporary strokes in the viewport, two drawing handlers have been
added to manage 3D and 2D stuff.

Video: https://youtu.be/qxYwO5sSg5Y

The operator shortcuts are Ctrl+E and Ctrl+Shift+E. During the modal
operator, the interpolation can be adjusted using the mouse (moving
left/right) or the wheel mouse.
2016-09-07 10:02:52 +02:00
Sergey Sharybin
008afa446f OpenSubdiv: Support multiple materials drawing in Cycles textured view
Consider for inclusion into 2.78.
2016-09-07 09:48:13 +02:00
Bastien Montagne
d0e7c7a032 Add XK_ISO_Left_Tab to ghost's known X11 keydefines... 2016-09-06 22:32:17 +02:00
Bastien Montagne
f298c9ea1a Cleanup previous commit... 2016-09-06 18:01:14 +02:00
Bastien Montagne
87b3faf557 GHOST X11 keyboard: Attempt to fix issues with modifier keys on some systems.
Could not reproduce it here, but since users having the issue claims it comes from
rB16cb9391634dcc50e, let's try to use again ugly `XLookupKeysym()` for those modifier keys too...
2016-09-06 17:54:40 +02:00
lazydodo
049ed1f4e7 [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: https://developer.blender.org/D2199

ammended to fix: wrong variable name in main CMakeLists.txt
2016-09-06 08:47:45 -06:00
Sergey Sharybin
c02f9bc569 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.
2016-09-06 16:45:03 +02:00
lazydodo
abd54f1ed2 [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: https://developer.blender.org/D2199
2016-09-06 07:22:04 -06:00
Sergey Sharybin
b40d1c1903 Fix T41883: Strip keyframes not respected for scenes rendered by other scenes 2016-09-06 14:08:11 +02:00
Sergey Sharybin
e3e8ce08a6 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
there:

  http://www.imagemagick.org/Usage/filter/
  http://www.imagemagick.org/Usage/filter/nicolas/

Current filter is based on measuring mean error with the current
splash screen and choosing combination of parameters which
gives minimal mean error.
2016-09-06 12:27:58 +02:00
Mike Erwin
14e47472fe cleanup: macro whitespace \ alignment
Gotta be careful mixing tabs & spaces. This commit uses 4-space indent
to align the line continuation markers.

Follow-up to 3b52c4056aaf
2016-09-05 13:30:57 -04:00
Mike Erwin
8f509698d7 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.
2016-09-05 13:05:47 -04:00
Mai Lavelle
56d2f4c20a Fix T49252: Crash when image textures used with true displacement 2016-09-05 12:57:33 -04:00
Julian Eisel
718bf8fd9d UI: Ctrl+Tab and Ctrl+Shift+Tab to cycle through space context "tabs"
In User Preferences, Properties Editor and toolshelf, Ctrl+Tab and Ctrl+Shift+Tab now activates the next or previous space context (or category in case of toolshelf tabs), respectively.

For Properties Editor such functionality was completely missing, only toolshelf allowed cycling using ctrl+mousewheel (or only mousewheel while hovering tab region). Ctrl+Tab and Ctrl+Shift+Tab are common web browser shortcuts, so they're a reasonable choice to go with.
Reaching the first/last item doesn't cause the cycling to stop, we continue at the other end of the list then. (I didn't add this to Ctrl+Mousewheel toggling in toolshelf since I wanted to keep its behavior unchanged.)

We could get rid of (Ctrl+)Mousewheel cycling in toolshelf, but this may break user habits.

The cycling happens using a new operator, UI_OT_space_context_cycle, for toolshelf tabs it's hardcoded in panel handling code though.
Generalized rna_property_enum_step a bit and moved it to rna_access.c to allow external reuse.

Reviewed By: venomgfx
Differential Revision: https://developer.blender.org/D2189
2016-09-05 17:28:41 +02:00
Sergey Sharybin
922aefba25 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.
2016-09-05 17:08:09 +02:00
Alexander Gavrilov
a31eca3fdd 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.
2016-09-05 15:50:12 +03:00
Bastien Montagne
c51cfbbc7f 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.
2016-09-05 13:13:49 +02:00
Sergey Sharybin
1df4f792db Attempt to fix compilation error with static boost on certain platforms
This was reported in T49231.
2016-09-05 13:10:19 +02:00
Bastien Montagne
33fcd0444d 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/bpy.ops.x.py imho.
2016-09-05 11:04:33 +02:00
Sergey Sharybin
7f682dd704 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.
2016-09-05 10:20:43 +02:00
Sergey Sharybin
3b52c4056a Fix glUniform called from glBegin/glEnd blocks
Was causing some invalid operations in OpenGL.

After more testing should be fine for 2.78.
2016-09-05 10:14:07 +02:00