4 years agoBLI_rect: Function to calculate a matrix from 2 rctf's
Campbell Barton [Sun, 27 Aug 2017 06:01:06 +0000 (16:01 +1000)]
BLI_rect: Function to calculate a matrix from 2 rctf's

4 years agoMissing from last commit
Campbell Barton [Sun, 27 Aug 2017 05:24:41 +0000 (15:24 +1000)]
Missing from last commit

4 years agoCleanup: use stubs for eigen gtest
Campbell Barton [Sun, 27 Aug 2017 05:19:25 +0000 (15:19 +1000)]
Cleanup: use stubs for eigen gtest

4 years agoMissed last commit
Campbell Barton [Sat, 26 Aug 2017 17:48:18 +0000 (03:48 +1000)]
Missed last commit

4 years agoFix T52515: Crash on BMesh.to_mesh()
Campbell Barton [Sat, 26 Aug 2017 16:38:19 +0000 (02:38 +1000)]
Fix T52515: Crash on BMesh.to_mesh()

4 years agoWM: move theme check out of ED_view3d_draw_select_loop
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.

4 years agoFix minor Mesh -> BMesh conversion issues
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.

4 years agoFix T52478: Error report "Shrinkwrap: out of memory" on invisible target.
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.

4 years agoFix T52538: Outliner crash when displaying groups and using Show Active on editmode...
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.

4 years ago[cycles/ctest] fix failing tests when output folder doesn't exist yet.
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.

4 years agoFix for fix (tm): Residue of the debug code
Sergey Sharybin [Fri, 25 Aug 2017 19:33:44 +0000 (21:33 +0200)]
Fix for fix (tm): Residue of the debug code

4 years agoFix mistake in previous tangent space optimization
Sergey Sharybin [Fri, 25 Aug 2017 19:29:59 +0000 (21:29 +0200)]
Fix mistake in previous tangent space optimization

4 years agoCycles: Cleanup, naming of variable
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.

4 years agoCycles: Add assert to catch possibly wrong logic
Sergey Sharybin [Fri, 25 Aug 2017 19:02:27 +0000 (21:02 +0200)]
Cycles: Add assert to catch possibly wrong logic

4 years agoCycles: Mark pixels with negative values as outliers
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.

4 years agoFix T52481: After making all local, local proxies of linked data get broken after...
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.

4 years agoAnother optimization of tangent space calculation
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.

4 years agoOptimize tangent space calculation by inlining functions
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..

4 years agoCycles: Add utility function to query current value of scoped timer
Sergey Sharybin [Fri, 25 Aug 2017 12:15:51 +0000 (14:15 +0200)]
Cycles: Add utility function to query current value of scoped timer

4 years agoCycles: Correct logging of sued CPU intrisics
Sergey Sharybin [Fri, 25 Aug 2017 12:11:45 +0000 (14:11 +0200)]
Cycles: Correct logging of sued CPU intrisics

4 years agoCycles: Fix stack overflow during traversal caused by floating overflow
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.

4 years agoWM: ensure 3D view theme is used in select-loop
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.

4 years agoWM: initialize WM and deps before handling events
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.

4 years agoThis copyright text (copied to binary distros) had a confusing statement about
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

4 years agoCorrect error in recent use of PyC_Long_*
Campbell Barton [Thu, 24 Aug 2017 16:09:23 +0000 (02:09 +1000)]
Correct error in recent use of PyC_Long_*

Regression in 46cf33bf0

4 years agoFix error using wrong theme settings w/ depth draw
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.

4 years agoFix T51907: New Depsgraph - Camera constraint is not evaluated properly
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.

4 years agoCycles: FIx issue with -0 being considered a non-finite value
Sergey Sharybin [Thu, 24 Aug 2017 12:32:56 +0000 (14:32 +0200)]
Cycles: FIx issue with -0 being considered a non-finite value

4 years agoCycles Bake: Fix overflow when using hundreds of images
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).

4 years agoFix Cycles CUDA transparent shadow error after recent fix in c22b52c.
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.

4 years agoCode cleanup: remove shader context.
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.

4 years agoDocs: rename var and comment how it's used
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.

4 years agoCorrection to last fix
Campbell Barton [Wed, 23 Aug 2017 15:05:20 +0000 (01:05 +1000)]
Correction to last fix

4 years agoFix T52490: NDOF orbit doesn't lock in ortho view
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

4 years agoFix bplayer (c)
Bastien Montagne [Wed, 23 Aug 2017 14:43:10 +0000 (16:43 +0200)]
Fix bplayer (c)

4 years agoFix T52396: Crash loading template w/o config dir
Campbell Barton [Wed, 23 Aug 2017 12:06:42 +0000 (22:06 +1000)]
Fix T52396: Crash loading template w/o config dir

4 years agoCycles: Add maximum depth stat to bvh builder
Mai Lavelle [Wed, 23 Aug 2017 04:40:35 +0000 (00:40 -0400)]
Cycles: Add maximum depth stat to bvh builder

4 years agoFix implementation of atomic update max and move to a central location
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

4 years agoFix T51805: Overlapping volumes renders incorrect on AMD GPU
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.

4 years agoCleanup: mark VA_NARGS_COUNT as public
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.

4 years agoCleanup: move variadic defines to their own header
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.

4 years agoFix T52218: Missing update when reconnecting node
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.

4 years agoRNA: use string-join to simplify operator register
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.

4 years agoBLI_string_utils: string joining utility functions
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.

4 years agoPyAPI: avoid instantiating args twice in macro
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.

4 years agoCleanup: remove space from filenames
Campbell Barton [Wed, 23 Aug 2017 05:50:44 +0000 (15:50 +1000)]
Cleanup: remove space from filenames

4 years agoTests: fix incorrect check for hidden dir
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.

4 years agoRNA: report error on struct naming collision
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.

4 years agoRNA: keep structs_map valid w/ ID duplicate & free
Campbell Barton [Wed, 23 Aug 2017 04:14:55 +0000 (14:14 +1000)]
RNA: keep structs_map valid w/ ID duplicate & free

4 years agoGHash: BLI_ghash_reinsert_key utility function
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.

4 years agoFix T52466: Silence search for button_context menu type.
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

4 years agoFix error in PointerProperty argument list
Campbell Barton [Tue, 22 Aug 2017 16:14:33 +0000 (02:14 +1000)]
Fix error in PointerProperty argument list

Regression in a7b3047

4 years agoFix T52483: Fill is incorrect for interpolated strokes
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.

4 years agoFix T52209: New Depsgraph - animated follow curve constraint sometimes freaks out...
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

4 years agoDepsgraph: Cleanup, make code friendlier to be edited in columns
Sergey Sharybin [Tue, 22 Aug 2017 14:24:58 +0000 (16:24 +0200)]
Depsgraph: Cleanup, make code friendlier to be edited in columns

4 years agoDepsgraph: Remove placeholder for path evaluation
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.

4 years agoFix threading conflict when doing Cycles background render
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.

4 years agoFix T52454: Crash in DEG_graph_on_visible_update when activating scene layer
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.

4 years agoPyAPI: replace PyC_FromArray with typed functions
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.

4 years agoFix panorama render crash with split kernel, due to incorrect buffer pointer.
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.

4 years agoCycles: reorganize Performance panel layout, move viewport BVH type to debug.
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.

4 years agoFix for recent fix in fc890cd, cstdint is c++11 only so don't use it yet.
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.

4 years agoFix T52479: Regression: Motion Tracking no longer works
Sergey Sharybin [Mon, 21 Aug 2017 15:23:42 +0000 (17:23 +0200)]
Fix T52479: Regression: Motion Tracking no longer works

4 years agoCleanup: uneven/double indentation
Campbell Barton [Mon, 21 Aug 2017 05:37:38 +0000 (15:37 +1000)]
Cleanup: uneven/double indentation

4 years agoModify menu from last commit
Campbell Barton [Mon, 21 Aug 2017 05:24:40 +0000 (15:24 +1000)]
Modify menu from last commit

Also correct tool-tip.

4 years agoFix T52434: Restore mesh center of mass calculation
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.

4 years agoCycles: attempt to recover from crashing CUDA/OpenCL drivers on Windows.
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.

4 years agoFix Windows build error after recent Python changes in a10a7f42.
Brecht Van Lommel [Sun, 20 Aug 2017 21:12:59 +0000 (23:12 +0200)]
Fix Windows build error after recent Python changes in a10a7f42.

4 years agoFix T52473: blender internal Fresnel and Layer Weight only work with linked normal.
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.

4 years agoRevert "Cycles: remove square samples option."
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.

4 years agoFix T52470: cycles OpenCL hair rendering not working after recent 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.

4 years agoCode cleanup: deduplicate some bsdf node methods.
Brecht Van Lommel [Sun, 20 Aug 2017 15:36:16 +0000 (17:36 +0200)]
Code cleanup: deduplicate some bsdf node methods.

4 years agoFix T52439: Crash after adjusting lenght of hair particles.
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

To be backported to 2.79.

4 years agoCycles: support baking normals plugged into BSDFs, averaged with closure weight.
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.

4 years agoCode cleanup: remove copy of shader graph for bump, no longer needed.
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.

4 years agoReplace BLI_INLINE w/ Py_LOCAL_INLINE for Python
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.

4 years agoFix bpy library load: invalid function signature
Campbell Barton [Sun, 20 Aug 2017 09:04:16 +0000 (19:04 +1000)]
Fix bpy library load: invalid function signature

4 years agoPyAPI: Make use of PyC_LongAs... API
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.

4 years agoPyAPI: Integer conversion functions
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.

4 years agoPyAPI: avoid redundant PyLong_AsLong call
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.

4 years ago[windows/make.bat] add option to automatically download libs.
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:

4 years agoFix T52452: OSL trace broken after shadow catcher recent changes.
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.

4 years agoCycles tests: pass Blender custom arguments from CYCLESTEST_ARGS.
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.

4 years agoCode cleanup: move rng into path state.
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.

4 years agoPyAPI: expose matrix parsing function
Campbell Barton [Sat, 19 Aug 2017 11:36:50 +0000 (21:36 +1000)]
PyAPI: expose matrix parsing function

4 years agoFix T52443: Cycles OpenCL build error after recent mesh lights changes.
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.

4 years agoCycles tests: add light type tests.
Brecht Van Lommel [Fri, 18 Aug 2017 15:09:12 +0000 (17:09 +0200)]
Cycles tests: add light type tests.

4 years agoCycles tests: make page less wide, use relative URLs for serving through http.
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.

4 years agoPyAPI: Fix memory leak w/ empty, allocated enums
Campbell Barton [Fri, 18 Aug 2017 08:29:27 +0000 (18:29 +1000)]
PyAPI: Fix memory leak w/ empty, allocated enums

4 years agoFix leak in Python BGE filter & image types
Campbell Barton [Thu, 17 Aug 2017 14:52:45 +0000 (00:52 +1000)]
Fix leak in Python BGE filter & image types

4 years agoCycles: Fix for a division by zero that could happen with solid angle triangle light...
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

4 years agoFix T52401: "Export Keying Set" operator generated incorrect ID's for shapekeys
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.

4 years agoImproved triangle sampling for mesh lights
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:

4 years agoCycles: Calculate correct remaining time when using a larger pixel size
Lukas Stockner [Wed, 16 Aug 2017 23:58:48 +0000 (01:58 +0200)]
Cycles: Calculate correct remaining time when using a larger pixel size

4 years agoRemove unnecessary #include "ED_transform.h"
mano-wii [Wed, 16 Aug 2017 22:08:52 +0000 (19:08 -0300)]
Remove unnecessary #include "ED_transform.h"

4 years agoTransform: remove unused function
mano-wii [Wed, 16 Aug 2017 21:55:55 +0000 (18:55 -0300)]
Transform: remove unused function

4 years agoTransform: Move enum `SnapSelect` to `ED_transform_snap_object_context`
mano-wii [Wed, 16 Aug 2017 17:16:30 +0000 (14:16 -0300)]
Transform: Move enum `SnapSelect` to `ED_transform_snap_object_context`

4 years agoSupport MSVSC 2017 15.3.0 (compiler 19.11)
Antonioya [Wed, 16 Aug 2017 13:58:09 +0000 (15:58 +0200)]
Support MSVSC 2017 15.3.0 (compiler 19.11)

The compiler version has changed in the last VS2017 update to 1911 and the old 1910 version is not working anymore.

4 years agoFix T52414: Blender 2.79 crash on object duplication via menu.
Bastien Montagne [Wed, 16 Aug 2017 08:49:02 +0000 (10:49 +0200)]
Fix T52414: Blender 2.79 crash on object duplication via menu.

Caused by own recent changes in handling of verts/edges/etc. arrays storage
for raycasting (rBe324172d9ca6690e8).

Issue was actually even weirder - there is absolutely no reason at all to
release DM here, those finaldm are stored in Object or EditMesh structs and
handled by general update system, other code shall never try to release them!

4 years agomacOS build: simplify python install for new 10.9 libraries.
Brecht Van Lommel [Tue, 15 Aug 2017 13:47:48 +0000 (15:47 +0200)]
macOS build: simplify python install for new 10.9 libraries.

We stop using the .zip file and just have all files now in
lib/darwin/python/lib, along with numpy, numpy headers and requests.
This makes it consistent with Linux and simplifies code.

For old libraries the .zip stays, code for that gets removed when we
fully switch to new libraries.