Sergey Sharybin [Mon, 28 Aug 2017 09:27:50 +0000 (11:27 +0200)]
Merge branch 'master' into blender2.8
Sergey Sharybin [Mon, 28 Aug 2017 09:19:58 +0000 (11:19 +0200)]
Make GS macro return proper IDType type
Previously it was returning short, which was really easy to (a) compare against
non-ID type value (b) forget to handle some specific value in switch statement.
Both issues happened in the nearest past, so it's time to tighten some nuts
here.
Most of the change related on silencing strict compiler warning now, but there
is also one tricky aspect: ID_NLA is not in the IDType enum. So there is still
cast to short to handle that switch. If someone has better ideas how to deal
with this please go ahead :)
Sergey Sharybin [Mon, 28 Aug 2017 09:06:15 +0000 (11:06 +0200)]
Atomics: Use system headers directly, without bad level dependency to BLI
This will make it easier to re-use library as-is in other projects,
such as Cycles standalone repo for example.
Sergey Sharybin [Mon, 28 Aug 2017 09:00:42 +0000 (11:00 +0200)]
Depsgraph: Pass copy-on-write pointer to material update
Unfortunately, there is something else wrong going on here, which makes objects
black after tweaking material settings.
Sergey Sharybin [Mon, 28 Aug 2017 08:33:29 +0000 (10:33 +0200)]
Merge branch 'master' into blender2.8
Sergey Sharybin [Mon, 28 Aug 2017 07:12:53 +0000 (09:12 +0200)]
Buildbot: Tweak nightly schedule of builds
Basically, schedule linux 64 earlier on, so builds are ready for nightly benchmarks.
Campbell Barton [Mon, 28 Aug 2017 06:28:50 +0000 (16:28 +1000)]
Missing from last commit (missed manually resolving)
Campbell Barton [Mon, 28 Aug 2017 06:04:42 +0000 (16:04 +1000)]
Merge branch 'master' into blender2.8
Campbell Barton [Mon, 28 Aug 2017 06:00:28 +0000 (16:00 +1000)]
Transform: center override
Hidden option to override transform center.
Needed for manipulators that define their own center.
Campbell Barton [Mon, 28 Aug 2017 04:25:10 +0000 (14:25 +1000)]
Merge branch 'master' into blender2.8
Campbell Barton [Mon, 28 Aug 2017 03:01:11 +0000 (13:01 +1000)]
EditMesh: set edge-rin subdiv minimum to 1
This only made sense for bridge tool.
D2785 by @mbjorkegren
Campbell Barton [Mon, 28 Aug 2017 02:40:36 +0000 (12:40 +1000)]
Docs: BMesh.from_mesh behavior w/ multiple calls
Campbell Barton [Mon, 28 Aug 2017 02:18:39 +0000 (12:18 +1000)]
Fix T51400: Pasting hex code fails
The # prefix is supported,
the button didn't give enough space to paste it.
D2812 by @candreacchio
Bastien Montagne [Sun, 27 Aug 2017 10:20:21 +0000 (12:20 +0200)]
Fix T52498: Deleting force field doesn't remove "Surface" from modifier stack.
Logic in `ED_object_check_force_modifiers` was inconsistent between add
and remove modifier cases.
Should be safe enough for 2.79.
Campbell Barton [Mon, 28 Aug 2017 03:01:11 +0000 (13:01 +1000)]
EditMesh: set edge-rin subdiv minimum to 1
This only made sense for bridge tool.
D2785 by @mbjorkegren
Campbell Barton [Mon, 28 Aug 2017 02:40:36 +0000 (12:40 +1000)]
Docs: BMesh.from_mesh behavior w/ multiple calls
Campbell Barton [Mon, 28 Aug 2017 02:18:39 +0000 (12:18 +1000)]
Fix T51400: Pasting hex code fails
The # prefix is supported,
the button didn't give enough space to paste it.
D2812 by @candreacchio
Julian Eisel [Mon, 28 Aug 2017 00:08:47 +0000 (02:08 +0200)]
Fix blenderplayer compilation
Campbell Barton [Sun, 27 Aug 2017 14:48:43 +0000 (00:48 +1000)]
Manipulator: support operator per-part
A single manipulator could only assign a single operator to each part.
Now each part can have it's own.
Also modify 2D selection callback, 2D started at 1, 3D at 0.
Now use -1 for unset value, start both at 0.
Bastien Montagne [Sun, 27 Aug 2017 10:20:21 +0000 (12:20 +0200)]
Fix T52498: Deleting force field doesn't remove "Surface" from modifier stack.
Logic in `ED_object_check_force_modifiers` was inconsistent between add
and remove modifier cases.
Should be safe enough for 2.79.
Campbell Barton [Sun, 27 Aug 2017 06:35:51 +0000 (16:35 +1000)]
Merge branch 'master' into blender2.8
Campbell Barton [Sun, 27 Aug 2017 06:01:06 +0000 (16:01 +1000)]
BLI_rect: Function to calculate a matrix from 2 rctf's
Campbell Barton [Sun, 27 Aug 2017 05:24:41 +0000 (15:24 +1000)]
Missing from last commit
Campbell Barton [Sun, 27 Aug 2017 05:19:25 +0000 (15:19 +1000)]
Cleanup: use stubs for eigen gtest
Campbell Barton [Sun, 27 Aug 2017 01:22:31 +0000 (11:22 +1000)]
Correct matrix stack assert
Campbell Barton [Sat, 26 Aug 2017 17:48:18 +0000 (03:48 +1000)]
Missed last commit
Campbell Barton [Sat, 26 Aug 2017 16:38:19 +0000 (02:38 +1000)]
Fix T52515: Crash on BMesh.to_mesh()
Campbell Barton [Sat, 26 Aug 2017 14:51:54 +0000 (00:51 +1000)]
Merge branch 'master' into blender2.8
Campbell Barton [Sat, 26 Aug 2017 14:48:52 +0000 (00:48 +1000)]
WM: move theme check out of ED_view3d_draw_select_loop
In 2.8x this needs to be in view3d_opengl_select,
so simplest to make in master too.
Campbell Barton [Sat, 26 Aug 2017 11:59:54 +0000 (21:59 +1000)]
Fix minor Mesh -> BMesh conversion issues
- Vertex only meshes never restored their selection history.
- Select history was cleared on the source instead of the target.
Simple Optimizations:
- Avoid O(n^2) linked list looping that checked the entire list before
adding elements (NULL values in the source array to prevent dupes).
- Re-use vert & edge lookup tables instead of allocating new ones.
Bastien Montagne [Sat, 26 Aug 2017 12:46:59 +0000 (14:46 +0200)]
Fix T52478: Error report "Shrinkwrap: out of memory" on invisible target.
Shrinkwrap must check it does have valid target data.
Safe for 2.79 release.
Bastien Montagne [Sat, 26 Aug 2017 10:27:37 +0000 (12:27 +0200)]
Fix T52538: Outliner crash when displaying groups and using Show Active on editmode bone not in any groups
There's no guaranty that given ID is found in current outliner tree...
Safe for 2.79, though not a regression.
Ray Molenkamp [Fri, 25 Aug 2017 23:17:49 +0000 (17:17 -0600)]
[cycles/ctest] fix failing tests when output folder doesn't exist yet.
Sergey Sharybin [Fri, 25 Aug 2017 19:33:44 +0000 (21:33 +0200)]
Fix for fix (tm): Residue of the debug code
Sergey Sharybin [Fri, 25 Aug 2017 19:29:59 +0000 (21:29 +0200)]
Fix mistake in previous tangent space optimization
Sergey Sharybin [Fri, 25 Aug 2017 19:03:50 +0000 (21:03 +0200)]
Cycles: Cleanup, naming of variable
Always use b_ prefix for C++ RNA data.
Sergey Sharybin [Fri, 25 Aug 2017 19:02:27 +0000 (21:02 +0200)]
Cycles: Add assert to catch possibly wrong logic
Lukas Stockner [Thu, 24 Aug 2017 21:15:30 +0000 (23:15 +0200)]
Cycles: Mark pixels with negative values as outliers
If a pixel has negative components, something already went wrong, so the best option is to just ignore it.
Should be good for 2.79.
Bastien Montagne [Fri, 25 Aug 2017 14:11:35 +0000 (16:11 +0200)]
Fix T52481: After making all local, local proxies of linked data get broken after file save and reload.
Issue was nasty hidden one, the dual status (mix of local and linked)
of proxies striking again.
Here, remapping process was considering obdata pointer of proxies as
indirect usage, hence clearing the 'LIB_TAG_EXTERN' of obdata pointer.
That would make savetoblend code not store any 'lib placeholder' for
obdata data-block, which was hence lost on next file read.
Another (probably better) solution here would be to actually consider
obdata of proxies are fully indirect usage, and simply reassign proxies
from their linked object's obdata on file read...
However, that change shall be safer for now, probably good for 2.79 too.
Dalai Felinto [Fri, 25 Aug 2017 13:37:27 +0000 (15:37 +0200)]
Revert "material Glsl: Fix tangent with new orco."
This reverts commit
3888227a7bfdb6b3867680ea237152d2929e1bc5.
This "Fix" was made while ORCO was broken. Now that orco itself is fixed
this is no longer required, otherwise Tangent node produces different
results in Cycles and Eevee.
Sergey Sharybin [Fri, 25 Aug 2017 12:54:44 +0000 (14:54 +0200)]
Another optimization of tangent space calculation
Don't use quick sort for small arrays, bubble sort works way faster for small
arrays due to cache coherency. This is what qsort() from libc is doing actually.
We can also experiment unrolling some extra small arrays, for example 3 and 4
element arrays.
This reduces tangent space calculation for dragon from 3.1sec to 2.9sec.
Campbell Barton [Fri, 25 Aug 2017 12:53:37 +0000 (22:53 +1000)]
Cleanup: missing break (harmless for now)
Sergey Sharybin [Fri, 25 Aug 2017 12:50:04 +0000 (14:50 +0200)]
Optimize tangent space calculation by inlining functions
Brings tangent space calculation from 4.6sec to 3.1sec for dragon model in BI.
Cycles is also somewhat faster, but it has other bottlenecks.
Funny thing, using simple `static inline` already gives a lot of speedup here.
That's just answering question whether it's OK to leave decision on what to
inline up to a compiler..
Sergey Sharybin [Fri, 25 Aug 2017 12:15:51 +0000 (14:15 +0200)]
Cycles: Add utility function to query current value of scoped timer
Sergey Sharybin [Fri, 25 Aug 2017 12:11:45 +0000 (14:11 +0200)]
Cycles: Correct logging of sued CPU intrisics
Sergey Sharybin [Fri, 25 Aug 2017 12:00:33 +0000 (14:00 +0200)]
Cycles: Fix stack overflow during traversal caused by floating overflow
Would be nice to be able to catch this with assert as well, will see what would
be the best way to do this/.\
Need to verify with Mai that this solves crash for her and maybe consider
porting this to 2.79.
Dalai Felinto [Fri, 25 Aug 2017 12:19:27 +0000 (14:19 +0200)]
Fix T52528: generated texture mismatch between Cycles and Eevee
Finally orco should be working 100% on Eevee now. Thanks for Sergey
Sharybin for reporting this.
Dalai Felinto [Fri, 25 Aug 2017 12:16:47 +0000 (14:16 +0200)]
Revert "Eevee: Fix generated coordinates when no texture coordinates connected"
This reverts commit
0e29a97813d2a2df77afe64d49d1683687ed37ab.
Dalai Felinto [Fri, 25 Aug 2017 12:16:31 +0000 (14:16 +0200)]
Fix ORCO never used for draw manager (Eevee)
Related to T52528.
Campbell Barton [Fri, 25 Aug 2017 12:22:50 +0000 (22:22 +1000)]
Merge branch 'master' into blender2.8
Campbell Barton [Fri, 25 Aug 2017 12:10:27 +0000 (22:10 +1000)]
WM: ensure 3D view theme is used in select-loop
Yet another case where theme could be used uninitialized.
Campbell Barton [Fri, 25 Aug 2017 10:45:16 +0000 (20:45 +1000)]
Merge branch 'master' into blender2.8
Campbell Barton [Fri, 25 Aug 2017 10:26:52 +0000 (20:26 +1000)]
WM: initialize WM and deps before handling events
This avoids obscure bugs where operators could run from
events that happen before the UI and depsgraph have been initialized.
See: D2809 for details.
Dalai Felinto [Fri, 25 Aug 2017 09:25:53 +0000 (11:25 +0200)]
Eevee: Fix generated coordinates when no texture coordinates connected
Orco should behave the same if it comes from unconnected vec inputs, or
from the Texture Coordinate -> Generated node output.
Fixup for
11e7e0769a4c.
This is related to T52528. The coordinates are still different between
Eevee and Cycles, but at least it behaves consistent within itself.
In fact the shader should now be correct, but the orco attributes we are
passing the shader seems to be where the problem is. But it's to be
tackled separately.
Ton Roosendaal [Fri, 25 Aug 2017 09:11:19 +0000 (11:11 +0200)]
This copyright text (copied to binary distros) had a confusing statement about
scripts being "Artwork" which is your sole property and free to license.
I've removed the reference to scripts in this text.
This was from 2002! With our Python scripts becoming part of how Blender runs,
such scripts now are officially required to be compliant with GNU GPL.
For more information; check the FAQ or consult foundation@blender.org
https://www.blender.org/support/faq/
Campbell Barton [Fri, 25 Aug 2017 05:19:30 +0000 (15:19 +1000)]
Fix manipulator remove tag, it cleared all groups
Campbell Barton [Fri, 25 Aug 2017 05:13:11 +0000 (15:13 +1000)]
Manipulator: zero grab offset w/o target property
Some manipulators are used like on-screen buttons,
in this case it doesn't make sense to keep track of their state,
so zero the offset when its unused.
Needed for lamp-target manipulator.
Campbell Barton [Thu, 24 Aug 2017 16:09:23 +0000 (02:09 +1000)]
Correct error in recent use of PyC_Long_*
Regression in
46cf33bf0
Campbell Barton [Thu, 24 Aug 2017 14:03:45 +0000 (00:03 +1000)]
Fix crash handling manipulator events before drawing
Sergey Sharybin [Thu, 24 Aug 2017 14:01:08 +0000 (16:01 +0200)]
Depsgraph: Fix crash editing mesh in edit mode
Sergey Sharybin [Thu, 24 Aug 2017 13:52:52 +0000 (15:52 +0200)]
Depsgraph: Cleanup typo
Campbell Barton [Thu, 24 Aug 2017 13:19:27 +0000 (23:19 +1000)]
Fix error using wrong theme settings w/ depth draw
Clicks events before first draw would assert,
unlikely to cause user visible errors but
would assert in UI_ThemeGetColorPtr.
Sergey Sharybin [Thu, 24 Aug 2017 12:35:48 +0000 (14:35 +0200)]
Fix T51907: New Depsgraph - Camera constraint is not evaluated properly
This is more a workaround for until we've got proper visibility flush, which
will likely happen in blender2.8 branch.
Sergey Sharybin [Thu, 24 Aug 2017 12:32:56 +0000 (14:32 +0200)]
Cycles: FIx issue with -0 being considered a non-finite value
Dalai Felinto [Thu, 24 Aug 2017 08:41:59 +0000 (10:41 +0200)]
Merge remote-tracking branch 'origin/master' into blender2.8
Dalai Felinto [Thu, 24 Aug 2017 08:34:50 +0000 (10:34 +0200)]
Cycles Bake: Fix overflow when using hundreds of images
We have a hardcored limit of 1000 images to be baked.
However anything anove 100 would be leading to overflow in the code.
Caught by warning from builder bot (my compiler doesn't even complain
about this, but it should).
Campbell Barton [Thu, 24 Aug 2017 07:04:28 +0000 (17:04 +1000)]
Manipulator: modal callback can now cancel & pass events
Re-use operator return flags for manipulator modal & invoke,
this means manipulators can allow navigation or other events to be
handled as they run - see T52499
Campbell Barton [Thu, 24 Aug 2017 02:02:08 +0000 (12:02 +1000)]
Manipulator: remove unused event hack
Brecht Van Lommel [Thu, 24 Aug 2017 01:33:33 +0000 (03:33 +0200)]
Fix Cycles CUDA transparent shadow error after recent fix in
c22b52c.
Fishy cat benchmark was rendering with wrong shadows. Cause is unclear,
adding printf or rearranging code seems to avoid this issue, possibly a
compiler bug. This reverts the fix and solves the OSL bug elsewhere.
Brecht Van Lommel [Tue, 22 Aug 2017 13:00:52 +0000 (15:00 +0200)]
Code cleanup: remove shader context.
This was needed when we accessed OSL closure memory after shader evaluation,
which could get overwritten by another shader evaluation. But all closures
are immediatley converted to ShaderClosure now, so no longer needed.
Campbell Barton [Wed, 23 Aug 2017 16:05:11 +0000 (02:05 +1000)]
Docs: rename var and comment how it's used
switch_from_camera wasn't right since it was used for auto-perspective.
Dalai Felinto [Wed, 23 Aug 2017 15:55:50 +0000 (17:55 +0200)]
Fix blenderplayer (tm)
Campbell Barton [Wed, 23 Aug 2017 15:07:09 +0000 (01:07 +1000)]
Merge branch 'master' into blender2.8
Campbell Barton [Wed, 23 Aug 2017 15:05:20 +0000 (01:05 +1000)]
Correction to last fix
Campbell Barton [Wed, 23 Aug 2017 14:47:47 +0000 (00:47 +1000)]
Fix T52490: NDOF orbit doesn't lock in ortho view
Regression in
af3f7db caused by own fix for T51324
Bastien Montagne [Wed, 23 Aug 2017 14:43:10 +0000 (16:43 +0200)]
Fix bplayer (c)
Campbell Barton [Wed, 23 Aug 2017 12:06:42 +0000 (22:06 +1000)]
Fix T52396: Crash loading template w/o config dir
Mai Lavelle [Wed, 23 Aug 2017 04:40:35 +0000 (00:40 -0400)]
Cycles: Add maximum depth stat to bvh builder
Mai Lavelle [Wed, 23 Aug 2017 04:40:04 +0000 (00:40 -0400)]
Fix implementation of atomic update max and move to a central location
While unlikely to have had any serious effects because of limited use, the
previous implementation was not actually atomic due to a data race and
incorrectly coded CAS loop. We also had duplicates of this code in a few
places, it's now been moved to a single location with all other atomic
operations.
Sergey Sharybin [Wed, 23 Aug 2017 10:32:48 +0000 (12:32 +0200)]
Fix T51805: Overlapping volumes renders incorrect on AMD GPU
We need to make sure we can store all volume closures for all objects in volume
stack. This is a bit tricky to detect what would be the "nestness" level of
volumes so for now use maximum possible stack depth. Might cause some slowdown,
but better to give reliable render output than to fail quickly.
Should be safe for 2.79 after extra eyes.
Campbell Barton [Wed, 23 Aug 2017 10:16:47 +0000 (20:16 +1000)]
Merge branch 'master' into blender2.8
Campbell Barton [Wed, 23 Aug 2017 10:04:26 +0000 (20:04 +1000)]
Cleanup: mark VA_NARGS_COUNT as public
Was already used in two other headers, remove underscore prefix.
Campbell Barton [Wed, 23 Aug 2017 10:00:48 +0000 (20:00 +1000)]
Cleanup: move variadic defines to their own header
So we can use in headers without pulling in many other defines.
Sergey Sharybin [Wed, 23 Aug 2017 09:47:47 +0000 (11:47 +0200)]
Fix T52218: Missing update when reconnecting node
If node was connected to output, we tag tree for update no matter where
the node was re-plugged to.
Should be safe for 2.79.
Campbell Barton [Wed, 23 Aug 2017 09:40:48 +0000 (19:40 +1000)]
RNA: use string join functions as with operators
Campbell Barton [Wed, 23 Aug 2017 09:21:52 +0000 (19:21 +1000)]
Merge branch 'master' into blender2.8
Campbell Barton [Wed, 23 Aug 2017 08:17:42 +0000 (18:17 +1000)]
RNA: use string-join to simplify operator register
Also sanity check macro-operator ID's.
Campbell Barton [Wed, 23 Aug 2017 08:16:46 +0000 (18:16 +1000)]
BLI_string_utils: string joining utility functions
Includes a version that takes a separator and macros for convenience.
Campbell Barton [Wed, 23 Aug 2017 08:44:58 +0000 (18:44 +1000)]
PyAPI: avoid instantiating args twice in macro
Would cause problems if args included function calls.
Campbell Barton [Wed, 23 Aug 2017 06:22:48 +0000 (16:22 +1000)]
RNA: check for duplicate manipulator names
Campbell Barton [Wed, 23 Aug 2017 06:10:45 +0000 (16:10 +1000)]
Merge branch 'master' into blender2.8
Campbell Barton [Wed, 23 Aug 2017 05:50:44 +0000 (15:50 +1000)]
Cleanup: remove space from filenames
Campbell Barton [Wed, 23 Aug 2017 05:36:39 +0000 (15:36 +1000)]
Tests: fix incorrect check for hidden dir
Copy-pasted mistake in tests and tools.
Campbell Barton [Wed, 23 Aug 2017 04:59:14 +0000 (14:59 +1000)]
RNA: report error on struct naming collision
Fixes T52463, error instead of crash.
Campbell Barton [Wed, 23 Aug 2017 04:14:55 +0000 (14:14 +1000)]
RNA: keep structs_map valid w/ ID duplicate & free
Campbell Barton [Wed, 23 Aug 2017 02:43:05 +0000 (12:43 +1000)]
GHash: BLI_ghash_reinsert_key utility function
Useful when ghash keys are reallocated.
Thomas Beck [Tue, 22 Aug 2017 19:33:58 +0000 (21:33 +0200)]
Fix T52466: Silence search for button_context menu type.
We were showing "search for unknown menutype WM_MT_button_context" messages in terminal which were not helpful for users, so now they are disabled.
To be backported to 2.79
Campbell Barton [Tue, 22 Aug 2017 16:14:33 +0000 (02:14 +1000)]
Fix error in PointerProperty argument list
Regression in
a7b3047
Antonio Vazquez [Tue, 22 Aug 2017 15:42:53 +0000 (17:42 +0200)]
Fix T52483: Fill is incorrect for interpolated strokes
The recalc flag must be enabled for new interpolated strokes.
Sergey Sharybin [Tue, 22 Aug 2017 14:31:33 +0000 (16:31 +0200)]
Merge branch 'master' into blender2.8