blender.git
2 years agoCycles: Make all #include statements relative to cycles source directory
Sergey Sharybin [Tue, 28 Mar 2017 18:39:14 +0000 (20:39 +0200)]
Cycles: Make all #include statements relative to cycles source directory

The idea is to make include statements more explicit and obvious where the
file is coming from, additionally reducing chance of wrong header being
picked up.

For example, it was not obvious whether bvh.h was refferring to builder
or traversal, whenter node.h is a generic graph node or a shader node
and cases like that.

Surely this might look obvious for the active developers, but after some
time of not touching the code it becomes less obvious where file is coming
from.

This was briefly mentioned in T50824 and seems @brecht is fine with such
explicitness, but need to agree with all active developers before committing
this.

Please note that this patch is lacking changes related on GPU/OpenCL
support. This will be solved if/when we all agree this is a good idea to move
forward.

Reviewers: brecht, lukasstockner97, maiself, nirved, dingto, juicyfruit, swerner

Reviewed By: lukasstockner97, maiself, nirved, dingto

Subscribers: brecht

Differential Revision: https://developer.blender.org/D2586

2 years agoCycles: Attempt to workaround compilation error on new CUDA toolkit and sm_2x
Sergey Sharybin [Wed, 29 Mar 2017 09:49:50 +0000 (11:49 +0200)]
Cycles: Attempt to workaround compilation error on new CUDA toolkit and sm_2x

2 years agoRemove non-bmesh case from test
Campbell Barton [Wed, 29 Mar 2017 09:10:46 +0000 (20:10 +1100)]
Remove non-bmesh case from test

2 years agoFix skin mark operator
Campbell Barton [Wed, 29 Mar 2017 08:32:57 +0000 (19:32 +1100)]
Fix skin mark operator

Accessed custom-data layer offset before creating.

2 years agoFix crash closing window in background mode
Campbell Barton [Wed, 29 Mar 2017 08:25:34 +0000 (19:25 +1100)]
Fix crash closing window in background mode

2 years agoFix missing NULL check in gpencil poll
Campbell Barton [Wed, 29 Mar 2017 08:19:25 +0000 (19:19 +1100)]
Fix missing NULL check in gpencil poll

Also de-duplicate poll functions

2 years agoUse 'empty' option for clearing factory settings
Campbell Barton [Wed, 29 Mar 2017 08:18:09 +0000 (19:18 +1100)]
Use 'empty' option for clearing factory settings

2 years agoOption to load startup file with empty-data
Campbell Barton [Wed, 29 Mar 2017 08:07:21 +0000 (19:07 +1100)]
Option to load startup file with empty-data

Useful for batch conversion and tests.

2 years agoBuildbot: Revert previous change, older toolkit has same exact behavior
Sergey Sharybin [Wed, 29 Mar 2017 08:46:53 +0000 (10:46 +0200)]
Buildbot: Revert previous change, older toolkit has same exact behavior

2 years agoBuildbot: Use older NVCC on 32bit linux
Sergey Sharybin [Wed, 29 Mar 2017 08:21:17 +0000 (10:21 +0200)]
Buildbot: Use older NVCC on 32bit linux

Newer toolkit has some weird issue with cross0-compiling 32bit kernels
from 64bit environment.

2 years agoBuildbot: Remove global hardcoded NVCC path
Sergey Sharybin [Wed, 29 Mar 2017 08:16:41 +0000 (10:16 +0200)]
Buildbot: Remove global hardcoded NVCC path

This was initially needed for heterogeneous setup of two toolkits which
we no longer need.

2 years agoCycles: Bring back preview AA samples when using BPT
Sergey Sharybin [Wed, 29 Mar 2017 07:12:26 +0000 (09:12 +0200)]
Cycles: Bring back preview AA samples when using BPT

This was removed in 93426cb. Please be more accurate when
changing interface.

2 years agoPyAPI: minor path init simplification
Campbell Barton [Wed, 29 Mar 2017 04:07:41 +0000 (15:07 +1100)]
PyAPI: minor path init simplification

2 years agoFix 'bl_app_override' wrapping multiple times.
Campbell Barton [Wed, 29 Mar 2017 03:29:18 +0000 (14:29 +1100)]
Fix 'bl_app_override' wrapping multiple times.

Calling `SomeClass.draw(self, context)` instead of `self.draw()`
would try to wrap the argument `self` multiple times, causing an error.

2 years agoFix memory leak re-registering operators
Campbell Barton [Wed, 29 Mar 2017 02:26:34 +0000 (13:26 +1100)]
Fix memory leak re-registering operators

Re-registering an operator used by the keymap would lead memory.
Reload scripts for eg leaked over ~1600 blocks.

2 years agoPyAPI: check modules are registered before unregister
Campbell Barton [Wed, 29 Mar 2017 01:35:00 +0000 (12:35 +1100)]
PyAPI: check modules are registered before unregister

Needed since templates may unregister classes.

Also replace old modules on reloading.

2 years agoFix T51068: Place props in their own row
Aaron Carlisle [Tue, 28 Mar 2017 20:29:20 +0000 (16:29 -0400)]
Fix T51068: Place props in their own row

This allows the props to extend into the blank space that is to the right.

2 years agoCycles: Switch to reformulated Pluecker ray/triangle intersection
Sergey Sharybin [Mon, 27 Mar 2017 15:06:37 +0000 (17:06 +0200)]
Cycles: Switch to reformulated Pluecker ray/triangle intersection

The intention of this commit it to address issues mentioned in the
reports T43865,T50164 and T50452.

The code is based on Embree code with some extra vectorization
to speed up single ray to single triangle intersection.

Unfortunately, such a fix is not coming for free. There is some
slowdown for AVX2 processors, mainly due to different vectorization
code, which caused different number of instructions to be executed
and different instructions-per-cycle counters. But on another hand
this commit makes pre-AVX2 platforms such as AVX and SSE4.1 a bit
faster. The prerformance goes as following:

              2.78c AVX2   2.78c AVX   Patch AVX2         Patch AVX
BMW            05:21.09     06:05.34    05:32.97 (+3.5%)   05:34.97 (-8.5%)
Classroom      16:55.36     18:24.51    17:10.41 (+1.4%)   17:15.87 (-6.3%)
Fishy Cat      08:08.49     08:36.26    08:09.19 (+0.2%)   08:12.25 (-4.7%
Koro           11:22.54     11:45.24    11:13.25 (-1.5%)   11:43.81 (-0.3%)
Barcelone      14:18.32     16:09.46    14:15.20 (-0.4%)   14:25.15 (-10.8%)

On GPU the performance is about 1.5-2% slower in my tests on GTX1080
but afraid we can't do much as a part of this chaneg here and
consider it a price to pay for more proper intersection check.

Made in collaboration with Maxym Dmytrychenko, big thanks to him!

Reviewers: brecht, juicyfruit, lukasstockner97, dingto

Differential Revision: https://developer.blender.org/D1574

2 years agoForgot those IDP_LibLinkProperty call on node sockets IDProps in previous commit...
Bastien Montagne [Tue, 28 Mar 2017 12:37:18 +0000 (14:37 +0200)]
Forgot those IDP_LibLinkProperty call on node sockets IDProps in previous commit...

2 years agoFix: Icon offset for pie buttons
raa [Tue, 28 Mar 2017 10:44:02 +0000 (13:44 +0300)]
Fix: Icon offset for pie buttons

2 years agoCycles: Pass m128 vectors by const reference
Sergey Sharybin [Tue, 28 Mar 2017 09:01:11 +0000 (11:01 +0200)]
Cycles: Pass m128 vectors by const reference

2 years agoFix lib_link_cachefile.
Bastien Montagne [Tue, 28 Mar 2017 08:15:52 +0000 (10:15 +0200)]
Fix lib_link_cachefile.

That one was:
* Resetting non-ID pointers (lib_link_xxx funcs should only affect ID
  pointers, everything else shall be done in direct_link_xxx func).
* Even worse, always calling lib_link_animdata, even when
  LIB_TAG_NEED_LINK tag was unset...

2 years agoBring back `lib_link_mesh()` in 'order' with other libdata liblink functions.
Bastien Montagne [Tue, 28 Mar 2017 08:10:15 +0000 (10:10 +0200)]
Bring back `lib_link_mesh()` in 'order' with other libdata liblink functions.

We do not need any special handling anymore for usercount of images used
by faces/polygons (tpage stuff), since we have the 'real_user' handling,
which will gracefully cope with all possible situations.

So better not keep that ugly confusing useless special case.

2 years agoreadfile.c: Cleanup lib_link code a bit.
Bastien Montagne [Tue, 28 Mar 2017 08:03:59 +0000 (10:03 +0200)]
readfile.c: Cleanup lib_link code a bit.

Mainly:
* Add missing `IDP_LibLinkProperty()` calls for many ID types
  (harmless currently, but better be consistent here!).
* Bring lib_link_xxx functions more in line with each other.
* Replace some long if/else by switch.

2 years agoCorrect splash size check
Campbell Barton [Tue, 28 Mar 2017 06:07:11 +0000 (17:07 +1100)]
Correct splash size check

2 years agoFix columns with fixed width
raa [Mon, 27 Mar 2017 21:07:31 +0000 (00:07 +0300)]
Fix columns with fixed width

2 years agoCleanup: Use upper case consistently in adaptive feature compile logging.
Thomas Dinges [Mon, 27 Mar 2017 20:52:33 +0000 (22:52 +0200)]
Cleanup: Use upper case consistently in adaptive feature compile logging.

2 years agoCleanup: Resolve todo in CUDA voxel image code.
Thomas Dinges [Mon, 27 Mar 2017 20:36:26 +0000 (22:36 +0200)]
Cleanup: Resolve todo in CUDA voxel image code.

2 years agoCycles UI: Avoid abreviation for Hair Extension.
Thomas Dinges [Mon, 27 Mar 2017 19:59:29 +0000 (21:59 +0200)]
Cycles UI: Avoid abreviation for Hair Extension.

Since 2.5x we should try to avoid such abreviations in the UI, except for common terms like Min / Max as much as possible.

2 years agoCycles: Move Shadow Catcher UI option next to Ray Visibility.
Thomas Dinges [Mon, 27 Mar 2017 19:51:56 +0000 (21:51 +0200)]
Cycles: Move Shadow Catcher UI option next to Ray Visibility.

Previously it was beneath the Performance UI label, which was incorrect. It's better suited next to Ray Visibility.

2 years agoCycles: Correct ifdef around float3 intrinsics
Sergey Sharybin [Mon, 27 Mar 2017 14:08:39 +0000 (16:08 +0200)]
Cycles: Correct ifdef around float3 intrinsics

2 years agoCorrect for Py3.5
Campbell Barton [Mon, 27 Mar 2017 10:33:51 +0000 (21:33 +1100)]
Correct for Py3.5

2 years agoCycles: Make shadow catcher an optional feature for OpenCL
Sergey Sharybin [Tue, 21 Mar 2017 12:55:27 +0000 (13:55 +0100)]
Cycles: Make shadow catcher an optional feature for OpenCL

Solves majority of speed regression on AMD OpenCL.

2 years agoCycles: Add OpenCL support for shadow catcher feature
Hristo Gueorguiev [Tue, 21 Mar 2017 11:27:12 +0000 (12:27 +0100)]
Cycles: Add OpenCL support for shadow catcher feature

The title says it all actually.

2 years agoCycles: Remove ccl_addr_space from RNG passed to functions
Hristo Gueorguiev [Tue, 21 Mar 2017 11:24:47 +0000 (12:24 +0100)]
Cycles: Remove ccl_addr_space from RNG passed to functions

Simplifies code quite a bit, making it shorter and easier to extend.
Currently no functional changes for users, but is required for the
upcoming work of shadow catcher support with OpenCL.

2 years agoCycles: First implementation of shadow catcher
Sergey Sharybin [Thu, 9 Feb 2017 13:19:01 +0000 (14:19 +0100)]
Cycles: First implementation of shadow catcher

It uses an idea of accumulating all possible light reachable across the
light path (without taking shadow blocked into account) and accumulating
total shaded light across the path. Dividing second figure by first one
seems to be giving good estimate of the shadow.

In fact, to my knowledge, it's something really similar to what is
happening in the denoising branch, so we are aligned here which is good.

The workflow is following:

- Create an object which matches real-life object on which shadow is
  to be catched.

- Create approximate similar material on that object.

  This is needed to make indirect light properly affecting CG objects
  in the scene.

- Mark object as Shadow Catcher in the Object properties.

Ideally, after doing that it will be possible to render the image and
simply alpha-over it on top of real footage.

2 years agoCycles: Optimize shaders earlier to skip unneccessary attributes for noninteractive...
Lukas Stockner [Wed, 14 Dec 2016 22:47:39 +0000 (23:47 +0100)]
Cycles: Optimize shaders earlier to skip unneccessary attributes for noninteractive rendering

Before, Cycles would first sync the shader exactly as shown in the UI, then determine and sync the used attributes and later optimize the shader.
Therefore, even completely unconnected nodes would cause unneccessary attributes to be synced.

The reason for this is to avoid frequent resyncs when editing shaders interactively, but it can still be avoided for noninteractive renders - which is what this commit does.

Reviewed by: sergey

Differential Revision: https://developer.blender.org/D2285

2 years agoCMake: WITH_PYTHON_SECURITY=OFF was ignored
Campbell Barton [Mon, 27 Mar 2017 02:02:41 +0000 (13:02 +1100)]
CMake: WITH_PYTHON_SECURITY=OFF was ignored

Allow auto-execution to be enabled,
also move this to user-prefs versioning code.

2 years agoAdd back missing include
Campbell Barton [Sun, 26 Mar 2017 22:14:40 +0000 (09:14 +1100)]
Add back missing include

2 years agoFix padding and align calculation for box layouts
raa [Sun, 26 Mar 2017 15:02:11 +0000 (18:02 +0300)]
Fix padding and align calculation for box layouts

2 years agoCleanup: line length, assignment
Campbell Barton [Sun, 26 Mar 2017 10:51:12 +0000 (21:51 +1100)]
Cleanup: line length, assignment

2 years agoFix: Ignore min flag for rows that require all available width
raa [Sun, 26 Mar 2017 09:19:01 +0000 (12:19 +0300)]
Fix: Ignore min flag for rows that require all available width

2 years agoFix: Use "round" instead of "floor" in snapping UI to pixels
raa [Sun, 26 Mar 2017 09:16:04 +0000 (12:16 +0300)]
Fix: Use "round" instead of "floor" in snapping UI to pixels

2 years agoFix: Button's label can be NULL
raa [Sun, 26 Mar 2017 09:04:16 +0000 (12:04 +0300)]
Fix: Button's label can be NULL

2 years agore-adds the include "BLI_math.h" to custondata
Germano Cavalcante [Sun, 26 Mar 2017 07:08:16 +0000 (04:08 -0300)]
re-adds the include "BLI_math.h" to custondata

It was removed here rBd52191616b5f

2 years agoCleanup: simplify script path assignment
Campbell Barton [Sun, 26 Mar 2017 00:19:31 +0000 (11:19 +1100)]
Cleanup: simplify script path assignment

2 years agoPyAPI: add missing class registration
Campbell Barton [Sun, 26 Mar 2017 00:20:46 +0000 (11:20 +1100)]
PyAPI: add missing class registration

2 years agoPyAPI: debug-python check for missing class register
Campbell Barton [Sun, 26 Mar 2017 00:14:47 +0000 (11:14 +1100)]
PyAPI: debug-python check for missing class register

Moving to manual class registration means its easier to accidentally
miss registering classes.

Now detect missing class registration
and warn when running with `--debug-python`

2 years agoFix GHOST crash on X11 with recent DPI changes on some systems.
Brecht Van Lommel [Sat, 25 Mar 2017 18:29:37 +0000 (19:29 +0100)]
Fix GHOST crash on X11 with recent DPI changes on some systems.

2 years agoAutomatic DPI for all platforms, per monitor DPI for Windows.
Wouter [Sat, 11 Mar 2017 02:27:08 +0000 (03:27 +0100)]
DPI for all platforms, per monitor DPI for Windows.

For Windows 8.1 and X11 (Linux, BSD) now use the DPI specified by the operating
system, which previously only worked on macOS. For Windows this is handled per
monitor, for X11 this is based on Xft.dpi or xrandr --dpi. This should result
in appropriate font and button sizes by default in most cases.

The UI has been simplified to a single UI Scale factor relative to the automatic
DPI, instead of two DPI and Virtual Pixel Size settings. There is forward and
backwards compatibility for existing user preferences.

Reviewed By: brecht, LazyDodo

Differential Revision: https://developer.blender.org/D2539

2 years agoRemove support for py app-templates
Campbell Barton [Sat, 25 Mar 2017 07:05:19 +0000 (18:05 +1100)]
Remove support for py app-templates

Only zip-files make sense here.

2 years agoCleanup: imports, indentation, long lines
Campbell Barton [Sat, 25 Mar 2017 00:07:05 +0000 (11:07 +1100)]
Cleanup: imports, indentation, long lines

2 years agoFix unreported: inaccuracy of interpolation of custom color layers due to float trunc...
Germano Cavalcante [Fri, 24 Mar 2017 23:06:43 +0000 (20:06 -0300)]
Fix unreported: inaccuracy of interpolation of custom color layers due to float truncation

Same solution from rBd23459f51640 but now in `layerInterp_mcol`
Also a cleaning was done in the includes

2 years agoWM: Application Templates
Campbell Barton [Fri, 24 Mar 2017 22:29:51 +0000 (09:29 +1100)]
WM: Application Templates

This adds the ability to switch between different application-configurations
without interfering with Blender's normal operation.

This commit doesn't include any templates,
so its mostly to allow collaboration for the Blender 101 project
and other custom configurations.

Application templates can be installed & selected from the file menu.

Other details:

- The `bl_app_template_utils` module handles template activation
  (similar to `addon_utils`).
- The `bl_app_override` module is a general module
  to assist scripts overriding parts of Blender in reversible way.

See docs:
https://docs.blender.org/manual/en/dev/advanced/app_templates.html

See patch: D2565

2 years agoFix various i18n ambiguous issues reported in T43295.
Bastien Montagne [Fri, 24 Mar 2017 19:01:32 +0000 (20:01 +0100)]
Fix various i18n ambiguous issues reported in T43295.

2 years agoFix UI message issue, and style cleanup (!)
Bastien Montagne [Fri, 24 Mar 2017 18:59:14 +0000 (19:59 +0100)]
Fix UI message issue, and style cleanup (!)

2 years agoCycles: Remove obsolete variable from the TileManager
Lukas Stockner [Fri, 24 Mar 2017 18:43:39 +0000 (19:43 +0100)]
Cycles: Remove obsolete variable from the TileManager

2 years agoАшч T50995: Wrong freestyle render with new depgraph
Sergey Sharybin [Fri, 24 Mar 2017 15:33:26 +0000 (16:33 +0100)]
Ашч T50995: Wrong freestyle render with new depgraph

The iossue was caused by 0371ef1/

2 years agoCycles: Correct isfinite check used in integrator
Sergey Sharybin [Fri, 24 Mar 2017 14:22:27 +0000 (15:22 +0100)]
Cycles: Correct isfinite check used in integrator

Use fast-math friendly version of this function.

We should probably avoid unsafe fast math, but this is to be done with
real care with all the benchmarks properly done.

For now comitting much safer fix.

2 years agoFix/workaround T51007: Material viewport mode crash on node with more than 64 outputs
Sergey Sharybin [Fri, 24 Mar 2017 13:36:00 +0000 (14:36 +0100)]
Fix/workaround T51007: Material viewport mode crash on node with more than 64 outputs

Ideally we need to find a way to remove such a static limit here, but it's not so
trivial to implement for texture nodes. Requires some bigger system redesign there.

Just raising limit for now, which is fine for modern systems.

2 years agoFix T50238: Cycles: difference in texture position between OpenGL and Cycles render
Sergey Sharybin [Fri, 24 Mar 2017 11:24:14 +0000 (12:24 +0100)]
Fix T50238: Cycles: difference in texture position between OpenGL and Cycles render

2 years agoBuildbot: Use proper NVCC path
Sergey Sharybin [Fri, 24 Mar 2017 09:27:41 +0000 (10:27 +0100)]
Buildbot: Use proper NVCC path

In fact, we could probably remove this option all together.

2 years agoCycles: Workaround incorrect SSS with CUDA toolkit 8.0.61
Sergey Sharybin [Fri, 24 Mar 2017 09:08:18 +0000 (10:08 +0100)]
Cycles: Workaround incorrect SSS with CUDA toolkit 8.0.61

2 years agoUpdate CLERW to the latest version
Sergey Sharybin [Fri, 24 Mar 2017 08:42:50 +0000 (09:42 +0100)]
Update CLERW to the latest version

2 years agoFix for last fix of fix: (unsigned)char is limited to 255
Germano Cavalcante [Fri, 24 Mar 2017 07:35:17 +0000 (04:35 -0300)]
Fix for last fix of fix: (unsigned)char is limited to 255

setting char as value outside its range will wrap

2 years agoFix of last commit. Clamp values that will be used!
Germano Cavalcante [Fri, 24 Mar 2017 07:13:16 +0000 (04:13 -0300)]
Fix of last commit. Clamp values that will be used!

2 years agoFix T51038: `layerInterp_mloopcol` was casting instead of rounding the interpolated...
Germano Cavalcante [Fri, 24 Mar 2017 07:06:30 +0000 (04:06 -0300)]
Fix T51038: `layerInterp_mloopcol` was casting instead of rounding the interpolated RGBA channels

Casting to int truncates a floating-point number, that is, it loose the fractional part.

2 years agoCleanup: minor edits to path test
Campbell Barton [Fri, 24 Mar 2017 06:48:22 +0000 (17:48 +1100)]
Cleanup: minor edits to path test

No need for redundant ID's and correct arg order

2 years agoBLI_path_util: Add BLI_path_join
Campbell Barton [Fri, 24 Mar 2017 06:29:48 +0000 (17:29 +1100)]
BLI_path_util: Add BLI_path_join

There weren't any convenient ways to join multiple paths in C
that accounted for corner cases.

2 years agoAdd: BKE_appdir_folder_id_ex
Campbell Barton [Thu, 23 Mar 2017 23:35:58 +0000 (10:35 +1100)]
Add: BKE_appdir_folder_id_ex

Allows getting the path without using a static string.

2 years agoCleanup: line-length
Campbell Barton [Thu, 23 Mar 2017 23:11:01 +0000 (10:11 +1100)]
Cleanup: line-length

2 years agobpy.path.display_name: strip spaces
Campbell Barton [Thu, 23 Mar 2017 19:48:24 +0000 (06:48 +1100)]
bpy.path.display_name: strip spaces

Useful for Python module paths that can't start with numbers.

2 years agoBLI_path_util: Add string versions of SEP, ALTSEP
Campbell Barton [Thu, 23 Mar 2017 18:23:03 +0000 (05:23 +1100)]
BLI_path_util: Add string versions of SEP, ALTSEP

This allows for adding separators in string literals.

2 years agoaddon_utils: add disable_all function
Campbell Barton [Thu, 23 Mar 2017 18:20:26 +0000 (05:20 +1100)]
addon_utils: add disable_all function

2 years agoCycles: Remove old non-optimized triangle intersection function
Sergey Sharybin [Thu, 23 Mar 2017 16:59:34 +0000 (17:59 +0100)]
Cycles: Remove old non-optimized triangle intersection function

It is unused now and if we want similar function we should use
Pluecker intersection which is same performance with SSE optimization
but which is more watertight.

2 years agoCycles: Remove unused macro
Sergey Sharybin [Thu, 23 Mar 2017 16:59:02 +0000 (17:59 +0100)]
Cycles: Remove unused macro

2 years agoCycles: Use SSE-optimized version of triangle intersection for motion triangles
Sergey Sharybin [Thu, 23 Mar 2017 15:16:05 +0000 (16:16 +0100)]
Cycles: Use SSE-optimized version of triangle intersection for motion triangles

The title says it all actually. Gives up to 10% speedup on test scenes here
on i7-6800K.

Render times on GPU are unreliable here, but there might be some slowdown
caused by watertight nature of intersections.

2 years agoCycles: Fix speed regression on GPU
Sergey Sharybin [Thu, 23 Mar 2017 16:15:54 +0000 (17:15 +0100)]
Cycles: Fix speed regression on GPU

Avoid construction of temporary array and make utility function force-inlined.
Additionally avoid calling float4_to_float3 twice.

This brings render times to the same values as before current patch series.

2 years agoCycles: Use utility function for SSS triangle intersection
Sergey Sharybin [Thu, 23 Mar 2017 14:17:26 +0000 (15:17 +0100)]
Cycles: Use utility function for SSS triangle intersection

This effectively de-duplicates triangle intersection logic implemented
for both regular triangle and SSS triangle.

2 years agoCycles: Move watertight triangle intersection to an utility file
Sergey Sharybin [Thu, 23 Mar 2017 12:30:18 +0000 (13:30 +0100)]
Cycles: Move watertight triangle intersection to an utility file

This way the code can be reused more easily.

2 years agoCycles: Move triangle intersection precalc to an util file
Sergey Sharybin [Thu, 23 Mar 2017 12:01:42 +0000 (13:01 +0100)]
Cycles: Move triangle intersection precalc to an util file

This is a preparation work for the followup commit which wil l move
remaining parts of Woop intersection logic to an utility file.

Doing it as a separate commit to keep changes more atomic and easier
to bisect when/if needed.

2 years agoCycles: Cleanup, move utility function to utility file
Sergey Sharybin [Thu, 23 Mar 2017 11:55:51 +0000 (12:55 +0100)]
Cycles: Cleanup, move utility function to utility file

Was an old TODO, this function is handy for some math utilities as well.

2 years agoCycles: Cleanup, code style and comments
Sergey Sharybin [Thu, 23 Mar 2017 11:53:45 +0000 (12:53 +0100)]
Cycles: Cleanup, code style and comments

2 years agoCycles: Move intersection math to own header file
Sergey Sharybin [Thu, 23 Mar 2017 11:47:27 +0000 (12:47 +0100)]
Cycles: Move intersection math to own header file

There are following benefits:

- Modifying intersection algorithm will not cause so much re-compilation.
- It works around header dependency hell and allows us to use vectorization
  types much easier in there.

2 years agoCycles: Cleanup, inline AVX register construction from kernel global data
Sergey Sharybin [Thu, 23 Mar 2017 11:41:33 +0000 (12:41 +0100)]
Cycles: Cleanup, inline AVX register construction from kernel global data

Currently should be no functional changes, preparing for some upcoming refactor.

2 years agoCycles: Cleanup, remove unused function
Sergey Sharybin [Thu, 23 Mar 2017 11:04:49 +0000 (12:04 +0100)]
Cycles: Cleanup, remove unused function

2 years agoFix player stubs (tm)
Jens Verwiebe [Thu, 23 Mar 2017 14:47:23 +0000 (15:47 +0100)]
Fix player stubs (tm)

2 years agoCollada - Export: now use bind_mat and rest_mat custom properties (when the use_bind_...
Gaia Clary [Thu, 23 Mar 2017 13:11:55 +0000 (14:11 +0100)]
Collada - Export: now use bind_mat and rest_mat custom properties (when the use_bind_info option is enabled and the properties exist)

2 years agoCollada - Import: now add bind_mat and rest_mat as custom properties (when the use_bi...
Gaia Clary [Thu, 23 Mar 2017 13:10:57 +0000 (14:10 +0100)]
Collada - Import: now add bind_mat and rest_mat as custom properties (when the use_bind_info option is enabled)

2 years agoCollada - remove no longer used functions (moved to collada_utils)
Gaia Clary [Thu, 23 Mar 2017 13:09:00 +0000 (14:09 +0100)]
Collada - remove no longer used functions (moved to collada_utils)

2 years agoCollada - Added support for custom bind matrix (using new bind_mat custom property)
Gaia Clary [Thu, 23 Mar 2017 11:53:56 +0000 (12:53 +0100)]
Collada - Added support for custom bind matrix (using new bind_mat custom property)

2 years agoCollada - removed TransformBase baseclass (not needed for anything)
Gaia Clary [Thu, 23 Mar 2017 11:45:40 +0000 (12:45 +0100)]
Collada - removed TransformBase baseclass (not needed for anything)

2 years agoCollada - Added some helper functions into collada_utils, for common usage in the...
Gaia Clary [Thu, 23 Mar 2017 11:38:41 +0000 (12:38 +0100)]
Collada - Added some helper functions into collada_utils, for common usage in the collada module

2 years agoAdded new option for storing bindpose matrix, see T50412
Gaia Clary [Wed, 22 Mar 2017 23:07:05 +0000 (00:07 +0100)]
Added new option for storing bindpose matrix, see T50412

2 years agocollada: Simplify reading Node Matrix
Gaia Clary [Tue, 21 Mar 2017 17:05:10 +0000 (18:05 +0100)]
collada: Simplify reading Node Matrix

2 years agocollada: Make sure that bone use_conncet is set to false when connect type is not...
Gaia Clary [Tue, 21 Mar 2017 16:49:21 +0000 (17:49 +0100)]
collada: Make sure that bone use_conncet is set to false when connect type is not defined in Import

2 years agocollada: add extern 'C' for c header includes
Gaia Clary [Tue, 21 Mar 2017 16:42:34 +0000 (17:42 +0100)]
collada: add extern 'C' for c header includes

2 years agofix: collada - Connected bones get their tails set to wrong location when fix leaf...
Gaia Clary [Tue, 21 Mar 2017 16:24:39 +0000 (17:24 +0100)]
fix: collada - Connected bones get their tails set to wrong location when fix leaf nodes option is enabled

2 years agocollada: use local variable to avoid repeated call of bone chain_length_calculator
Gaia Clary [Tue, 21 Mar 2017 16:13:31 +0000 (17:13 +0100)]
collada: use local variable to avoid repeated call of bone chain_length_calculator

2 years agocollada: use vector copy function instead of direct assigning
Gaia Clary [Tue, 21 Mar 2017 16:10:19 +0000 (17:10 +0100)]
collada: use vector copy function instead of direct assigning