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 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: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 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 [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 [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: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.
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.
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.
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: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.
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 [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 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: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).
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.
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: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 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 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:27:33 +0000 (16:27 +0200)]
Fix T52209: New Depsgraph - animated follow curve constraint sometimes freaks out when the curve has a parent
Sergey Sharybin [Tue, 22 Aug 2017 14:24:58 +0000 (16:24 +0200)]
Depsgraph: Cleanup, make code friendlier to be edited in columns
Sergey Sharybin [Tue, 22 Aug 2017 14:10:52 +0000 (16:10 +0200)]
Depsgraph: Remove placeholder for path evaluation
Wasn't used in years, if it really needs to be dedicated operation it needs to
be revisited anyway.
Sergey Sharybin [Tue, 22 Aug 2017 13:50:05 +0000 (15:50 +0200)]
Fix threading conflict when doing Cycles background render
It is possible to have same image used multiple times at different frames,
which means we can not free it's buffers without any guard. From quick tests
this seems to be doing what it is supposed to.
Need more testing and port this to 2.79.
Sergey Sharybin [Tue, 22 Aug 2017 10:52:28 +0000 (12:52 +0200)]
Fix T52454: Crash in DEG_graph_on_visible_update when activating scene layer
Most likely needs in 2.79 final release.
Campbell Barton [Tue, 22 Aug 2017 08:02:58 +0000 (18:02 +1000)]
PyAPI: replace PyC_FromArray with typed functions
This was meant to be generic but introduced possible type errors
and unnecessary complication.
Replace with typed PyC_Tuple_PackArray_* functions.
Also add PyC_Tuple_Pack_* macro which replaces some uses of
Py_BuildValue, with the advantage of not having to parse a string.
Brecht Van Lommel [Mon, 21 Aug 2017 20:50:24 +0000 (22:50 +0200)]
Fix panorama render crash with split kernel, due to incorrect buffer pointer.
Also some refactoring to clarify variable usage scope.
Brecht Van Lommel [Mon, 21 Aug 2017 13:09:03 +0000 (15:09 +0200)]
Cycles: reorganize Performance panel layout, move viewport BVH type to debug.
Brecht Van Lommel [Mon, 21 Aug 2017 17:03:32 +0000 (19:03 +0200)]
Fix for recent fix in
fc890cd, cstdint is c++11 only so don't use it yet.
Sergey Sharybin [Mon, 21 Aug 2017 15:23:42 +0000 (17:23 +0200)]
Fix T52479: Regression: Motion Tracking no longer works
Campbell Barton [Mon, 21 Aug 2017 05:37:38 +0000 (15:37 +1000)]
Cleanup: uneven/double indentation
Campbell Barton [Mon, 21 Aug 2017 05:24:40 +0000 (15:24 +1000)]
Modify menu from last commit
Also correct tool-tip.
Campbell Barton [Mon, 21 Aug 2017 05:06:07 +0000 (15:06 +1000)]
Fix T52434: Restore mesh center of mass calculation
The new method while improved for solid objects
doesn't work for non-manifold meshes, keep both.
Brecht Van Lommel [Sun, 20 Aug 2017 20:44:17 +0000 (22:44 +0200)]
Cycles: attempt to recover from crashing CUDA/OpenCL drivers on Windows.
I don't know if this will actually work, needs testing. Ref T52064.
Brecht Van Lommel [Sun, 20 Aug 2017 21:12:59 +0000 (23:12 +0200)]
Fix Windows build error after recent Python changes in
a10a7f42.
Brecht Van Lommel [Sun, 20 Aug 2017 22:05:07 +0000 (00:05 +0200)]
Fix T52473: blender internal Fresnel and Layer Weight only work with linked normal.
Please backport this to 2.79.
Brecht Van Lommel [Sun, 20 Aug 2017 21:46:05 +0000 (23:46 +0200)]
Revert "Cycles: remove square samples option."
This reverts commit
757c24b6bceaeeae95f743b72b6a7040880a0ebf.
We'll revisit this when doing deeper sampling changes.
Brecht Van Lommel [Sun, 20 Aug 2017 21:16:25 +0000 (23:16 +0200)]
Fix T52470: cycles OpenCL hair rendering not working after recent changes.
Brecht Van Lommel [Sun, 20 Aug 2017 15:36:16 +0000 (17:36 +0200)]
Code cleanup: deduplicate some bsdf node methods.
Bastien Montagne [Sun, 20 Aug 2017 15:16:58 +0000 (17:16 +0200)]
Fix T52439: Crash after adjusting lenght of hair particles.
Regression from rBfed853ea78221, calling this inside thread worker was
not really good idea anyway, and we already have all the code we need in
pre-threading init function, was just disabled for vertex particles
before.
To be backported to 2.79.
Brecht Van Lommel [Sun, 20 Aug 2017 01:25:13 +0000 (03:25 +0200)]
Cycles: support baking normals plugged into BSDFs, averaged with closure weight.
Brecht Van Lommel [Sun, 20 Aug 2017 12:02:16 +0000 (14:02 +0200)]
Code cleanup: remove copy of shader graph for bump, no longer needed.
Campbell Barton [Sun, 20 Aug 2017 11:14:33 +0000 (21:14 +1000)]
Replace BLI_INLINE w/ Py_LOCAL_INLINE for Python
Recent inclusion caused build error with the BGE.
Campbell Barton [Sun, 20 Aug 2017 09:04:16 +0000 (19:04 +1000)]
Fix bpy library load: invalid function signature
Campbell Barton [Sun, 20 Aug 2017 05:44:54 +0000 (15:44 +1000)]
PyAPI: Make use of PyC_LongAs... API
Avoids setting exceptions inline,
also use Matrix_ParseAny for bmesh.ops.
Some inline exceptions are kept because they show useful details.
Campbell Barton [Sun, 20 Aug 2017 05:39:08 +0000 (15:39 +1000)]
PyAPI: Integer conversion functions
Python's C-API doesn't provide functions to get
int's at specific integer sizes.
Leaving the caller to check for overflow,
which ended up being ignored in practice.
Add API functions that convert int/uint 8/16/32/64, also bool.
Raising overflow exception for unsupported ranges.
Campbell Barton [Sun, 20 Aug 2017 05:28:06 +0000 (15:28 +1000)]
PyAPI: avoid redundant PyLong_AsLong call
Assigning to an RNA array converted from Python to C twice.
Ray Molenkamp [Sat, 19 Aug 2017 18:00:30 +0000 (12:00 -0600)]
[windows/make.bat] add option to automatically download libs.
The thing that most often still goes wrong for new users building blender on windows is checking out the libraries, some skip over the wiki, some check out to the wrong folder, in an effort to reduce the time i spend on this, I added detection of svn and misisng libs to make.bat .
When the user has svn installed, and the libdir is missing he'll be asked if he wants to download them
if svn is not installed, or the user chooses 'no' the current error message is shown.
Reviewers: Blendify, sergey, juicyfruit
Reviewed By: sergey
Differential Revision: https://developer.blender.org/D2782
Brecht Van Lommel [Sat, 19 Aug 2017 13:42:43 +0000 (15:42 +0200)]
Fix T52452: OSL trace broken after shadow catcher recent changes.
We should only early out with any hit in BVH traversal if the only visibility
bits used are opaque shadow. Not when opaque shadow is one of multiple bits.
Brecht Van Lommel [Sat, 19 Aug 2017 10:09:28 +0000 (12:09 +0200)]
Cycles tests: pass Blender custom arguments from CYCLESTEST_ARGS.
This is useful for testing with different devices, split kernel, OSL,
impact of integrator settings, etc.
Brecht Van Lommel [Sat, 19 Aug 2017 02:11:25 +0000 (04:11 +0200)]
Code cleanup: move rng into path state.
Also pass by value and don't write back now that it is just a hash for seeding
and no longer an LCG state. Together this makes CUDA a tiny bit faster in my
tests, but mainly simplifies code.
Campbell Barton [Sat, 19 Aug 2017 11:36:50 +0000 (21:36 +1000)]
PyAPI: expose matrix parsing function
Brecht Van Lommel [Fri, 18 Aug 2017 21:50:54 +0000 (23:50 +0200)]
Fix T52443: Cycles OpenCL build error after recent mesh lights changes.
Brecht Van Lommel [Fri, 18 Aug 2017 15:09:12 +0000 (17:09 +0200)]
Cycles tests: add light type tests.
Brecht Van Lommel [Thu, 17 Aug 2017 22:37:45 +0000 (00:37 +0200)]
Cycles tests: make page less wide, use relative URLs for serving through http.
Campbell Barton [Fri, 18 Aug 2017 08:29:27 +0000 (18:29 +1000)]
PyAPI: Fix memory leak w/ empty, allocated enums
Campbell Barton [Thu, 17 Aug 2017 14:52:45 +0000 (00:52 +1000)]
Fix leak in Python BGE filter & image types
Stefan Werner [Thu, 17 Aug 2017 13:05:48 +0000 (15:05 +0200)]
Cycles: Fix for a division by zero that could happen with solid angle triangle light sampling
Joshua Leung [Thu, 17 Aug 2017 13:03:28 +0000 (01:03 +1200)]
Fix T52401: "Export Keying Set" operator generated incorrect ID's for shapekeys
To be backported.
Stefan Werner [Thu, 17 Aug 2017 10:44:09 +0000 (12:44 +0200)]
Improved triangle sampling for mesh lights
This implements Arvo's "Stratified sampling of spherical triangles". Similar to how we sample rectangular area lights, this is sampling triangles over their solid angle. It does significantly improve sampling close to the triangle, but doesn't do much for more distant triangles. So I added a simple heuristic to switch between the two methods. Unfortunately, I expect this to add render time in any case, even when it does not make any difference whatsoever. It'll take some benchmarking with various scenes and hardware to estimate how severe the impact is and if it is worth the change.
Reviewers: #cycles, brecht
Reviewed By: #cycles, brecht
Subscribers: Vega-core, brecht, SteffenD
Tags: #cycles
Differential Revision: https://developer.blender.org/D2730