blender.git
14 months agoAdd number and memory size formatting throughout the UI
Diego Gangl [Fri, 25 May 2018 20:17:15 +0000 (22:17 +0200)]
Add number and memory size formatting throughout the UI

This commit adds number formatting (thousands separator) to the baking panel. It also adds a new function to format memory sizes (KB/GB/etc) and applies it to the baking panel and scene stats. The new function is unit tested.

Reviewers: Severin
Tags: #user_interface
Differential Revision: https://developer.blender.org/D1248

15 months ago[windows/make.bat] use a more reliable way of locating visual studio 2017.
Ray Molenkamp [Fri, 25 May 2018 16:24:01 +0000 (10:24 -0600)]
[windows/make.bat] use a more reliable way of locating visual studio 2017.

The registry hack we were using wasn't very reliable, the recommended way to locating visual studio is using vswhere (15.2 and up), using it also allows to switch between the regular and pre-release versions.

15 months agoWM: check modal handlers for keymap lookups
Campbell Barton [Fri, 25 May 2018 08:51:05 +0000 (10:51 +0200)]
WM: check modal handlers for keymap lookups

Keep in sync with 2.8x

15 months agoUI: fix assert
Campbell Barton [Fri, 25 May 2018 08:45:48 +0000 (10:45 +0200)]
UI: fix assert

Replace hard-coded button size check with UI_UNIT_X.

Caused icon-only buttons to have strings assigned based on UI-scale.

15 months ago3D View: add pixelsize function w/o UI scale
Campbell Barton [Fri, 25 May 2018 08:00:33 +0000 (10:00 +0200)]
3D View: add pixelsize function w/o UI scale

15 months agoCycles: Cleanup: Remove duplicated atan2f definition for OpenCL
Lukas Stockner [Thu, 24 May 2018 17:06:50 +0000 (19:06 +0200)]
Cycles: Cleanup: Remove duplicated atan2f definition for OpenCL

Turns out that atan2f was already defined for OpenCL.

15 months agoCycles Denoising: Don't use atomics in the accumulation kernel on CPUs
Lukas Stockner [Sun, 1 Apr 2018 00:10:27 +0000 (02:10 +0200)]
Cycles Denoising: Don't use atomics in the accumulation kernel on CPUs

The GPU kernel needs to use atomics for accumulation since all offsets are processed in
parallel, but on CPUs that's not the case, so we can disable them there for a considerable speedup.

15 months agoCycles/Compositor: Add arctan2 operation to the Math node
Lukas Stockner [Thu, 24 May 2018 00:51:41 +0000 (02:51 +0200)]
Cycles/Compositor: Add arctan2 operation to the Math node

The Math node currently has the normal atan() function, but for
actual angles this is fairly useless without additional nodes to handle the signs.

Since the node has two inputs anyways, it only makes sense to add an arctan2 option.

Reviewers: sergey, brecht

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

15 months ago3D View: remove poll 3D view for copy/paste
Campbell Barton [Thu, 24 May 2018 14:40:33 +0000 (16:40 +0200)]
3D View: remove poll 3D view for copy/paste

These operators only need selected objects.

15 months agoFix T55034: Setting duplication group for multiple selected items only
Philipp Oeser [Mon, 14 May 2018 10:54:23 +0000 (12:54 +0200)]
Fix T55034: Setting duplication group for multiple selected items only
affects one item

UI editing multiple selected items missed the case of PROP_POINTER
properties

Reviewed By: campbellbarton

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

15 months agoFix Extend property of Lasso select tool in Mask editor not working
Philipp Oeser [Sun, 13 May 2018 08:46:00 +0000 (10:46 +0200)]
Fix Extend property of Lasso select tool in Mask editor not working

Reviewed By: campbellbarton

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

15 months agoFix T54336: Extend property of Lasso select tool in Node editor does not
Philipp Oeser [Sun, 13 May 2018 07:37:53 +0000 (09:37 +0200)]
Fix T54336: Extend property of Lasso select tool in Node editor does not
work

Reviewed By: campbellbarton

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

15 months agoFix T55137: Compilation failing on non-x86-64 architectures
Lukas Stockner [Wed, 23 May 2018 23:41:18 +0000 (01:41 +0200)]
Fix T55137: Compilation failing on non-x86-64 architectures

Some conversion helper functions were (most likely by accident) contained
inside an ifdef for SSE2 support, so on e.g. ARM they would be undefined
and therefore cause compilation to fail.

15 months agoCleanup: strip trailing space from interface files
Campbell Barton [Wed, 23 May 2018 08:47:12 +0000 (10:47 +0200)]
Cleanup: strip trailing space from interface files

15 months agoFix incorrect size in aligned lockfree realloc
Campbell Barton [Wed, 23 May 2018 05:24:57 +0000 (07:24 +0200)]
Fix incorrect size in aligned lockfree realloc

Thanks to @alikendarfen for finding.

15 months agoblenderplayer: add stubs
Campbell Barton [Tue, 22 May 2018 15:56:56 +0000 (17:56 +0200)]
blenderplayer: add stubs

15 months agoFix T55093: Bisect + fill crash
Campbell Barton [Tue, 22 May 2018 15:22:29 +0000 (17:22 +0200)]
Fix T55093: Bisect + fill crash

15 months agoMemory allocator: use lockfree calls internally
Campbell Barton [Tue, 22 May 2018 06:45:47 +0000 (08:45 +0200)]
Memory allocator: use lockfree calls internally

Was already used in some areas.

15 months agoCMake: only include licences for enabled libs
Campbell Barton [Mon, 21 May 2018 16:41:59 +0000 (18:41 +0200)]
CMake: only include licences for enabled libs

15 months agoCleanup: use const for transform internal API
Campbell Barton [Mon, 21 May 2018 15:24:14 +0000 (17:24 +0200)]
Cleanup: use const for transform internal API

15 months agoRNA: support for PARM_OUTPUT & PARM_RNAPTR
Campbell Barton [Mon, 21 May 2018 10:34:11 +0000 (12:34 +0200)]
RNA: support for PARM_OUTPUT & PARM_RNAPTR

15 months agoFix too much memory usage for Cycles attribute map.
Brecht Van Lommel [Mon, 21 May 2018 09:08:03 +0000 (11:08 +0200)]
Fix too much memory usage for Cycles attribute map.

Thanks to Thomas Krebs for identifying the problem and solution.

15 months agoFix/workaround RNA build error in C++ API.
Brecht Van Lommel [Mon, 21 May 2018 09:13:56 +0000 (11:13 +0200)]
Fix/workaround RNA build error in C++ API.

It seems output parameter needs to be the last one.

15 months agoCleanup: correct variable names
Campbell Barton [Mon, 21 May 2018 08:53:50 +0000 (10:53 +0200)]
Cleanup: correct variable names

15 months agoWM: utility to find a keymap item from an operator
Campbell Barton [Mon, 21 May 2018 08:33:27 +0000 (10:33 +0200)]
WM: utility to find a keymap item from an operator

Also RNA access to WM_keyconfig_update,
needed when generating dynamic keymaps used in menus immediately after.

15 months agoCycles tests: move to render/ folder, to share with Eevee.
Brecht Van Lommel [Fri, 18 May 2018 14:46:48 +0000 (16:46 +0200)]
Cycles tests: move to render/ folder, to share with Eevee.

15 months agoCMake: Add WITH_COMPILER_ASAN option
Campbell Barton [Fri, 18 May 2018 13:21:18 +0000 (15:21 +0200)]
CMake: Add WITH_COMPILER_ASAN option

This supports easy toggling of Address Sanitizer.

15 months agoCleanup: remove deprecated definitions
Campbell Barton [Fri, 18 May 2018 12:26:02 +0000 (14:26 +0200)]
Cleanup: remove deprecated definitions

15 months agoFix T55115: crash when iterating SmokeDomainSettings color_grid property
Philipp Oeser [Fri, 18 May 2018 10:58:46 +0000 (12:58 +0200)]
Fix T55115: crash when iterating SmokeDomainSettings color_grid property
through python

15 months agoFix crash drawing polygon curves
Campbell Barton [Fri, 18 May 2018 12:23:53 +0000 (14:23 +0200)]
Fix crash drawing polygon curves

15 months agoAdd missing header
Campbell Barton [Fri, 18 May 2018 11:43:30 +0000 (13:43 +0200)]
Add missing header

15 months agoLogging: add --show-log-backtrace
Campbell Barton [Fri, 18 May 2018 09:00:47 +0000 (11:00 +0200)]
Logging: add --show-log-backtrace

Useful in debug builds to see a functions callers.

15 months agoColor: Assume Rec 709 in remaining comp nodes
Aaron Carlisle [Thu, 17 May 2018 21:20:32 +0000 (17:20 -0400)]
Color: Assume Rec 709 in remaining comp nodes

Part of T54798

15 months agoRNA: move enums to rna_rna.c
Campbell Barton [Thu, 17 May 2018 17:10:45 +0000 (19:10 +0200)]
RNA: move enums to rna_rna.c

Needed for use in rna non runtime code.

15 months agomakesrna: error check from 2.8
Campbell Barton [Thu, 17 May 2018 17:05:46 +0000 (19:05 +0200)]
makesrna: error check from 2.8

15 months agoFix T55032: Redo w/ file saved in edit-mode failed
Campbell Barton [Tue, 15 May 2018 17:30:59 +0000 (19:30 +0200)]
Fix T55032: Redo w/ file saved in edit-mode failed

It's important edit-mode has a step stored for redo to work,
file load now ensures this in a generic way.

15 months agoFix assert using '//' on an unsaved file
Campbell Barton [Tue, 15 May 2018 15:27:36 +0000 (17:27 +0200)]
Fix assert using '//' on an unsaved file

Annoying for debug builds.

15 months agoCleanup: last spacetype enum name
Campbell Barton [Tue, 15 May 2018 09:12:49 +0000 (11:12 +0200)]
Cleanup: last spacetype enum name

15 months agoUndo System: remove nested edit-mode undo calls
Campbell Barton [Tue, 15 May 2018 08:02:01 +0000 (10:02 +0200)]
Undo System: remove nested edit-mode undo calls

Regression in recent undo system changes,
This caused T55048.

When each mode had its own undo stack it was important
to initialize it when entering edit-mode.

15 months agoFix BMesh bisect not flagging dirty indices
Campbell Barton [Tue, 15 May 2018 07:04:12 +0000 (09:04 +0200)]
Fix BMesh bisect not flagging dirty indices

15 months agoCleanup: quiet GCC -Wtype-limits
Campbell Barton [Mon, 14 May 2018 06:58:09 +0000 (08:58 +0200)]
Cleanup: quiet GCC -Wtype-limits

While the warning can normally be disabled, we don't have have as much
control of warnings when macros are used.

15 months agoBLI_utildefines: re-ordering array delete macro
Campbell Barton [Mon, 14 May 2018 05:37:17 +0000 (07:37 +0200)]
BLI_utildefines: re-ordering array delete macro

15 months agoCleanup: trailing space
Campbell Barton [Sun, 13 May 2018 04:44:03 +0000 (06:44 +0200)]
Cleanup: trailing space

15 months agoCleanup: modifier arg wrapping
Campbell Barton [Sat, 12 May 2018 06:04:56 +0000 (08:04 +0200)]
Cleanup: modifier arg wrapping

15 months agoPlatform: macOS. Allow building on directory with whitespace (For example /Volumes...
Arto Kitula [Fri, 11 May 2018 18:56:13 +0000 (21:56 +0300)]
Platform: macOS. Allow building on directory with whitespace (For example /Volumes/External HD/blender-build)

15 months agoEditMesh: remove duplicate rip macro
Campbell Barton [Fri, 11 May 2018 18:02:12 +0000 (20:02 +0200)]
EditMesh: remove duplicate rip macro

Change the fill setting in the keymap,
this allows tool access the macro with either setting.

15 months agoWM: initialize last used macro properties
Campbell Barton [Fri, 11 May 2018 18:01:51 +0000 (20:01 +0200)]
WM: initialize last used macro properties

15 months agoFix (unreported) broken freeing code for Sequencer.
Bastien Montagne [Fri, 11 May 2018 09:21:30 +0000 (11:21 +0200)]
Fix (unreported) broken freeing code for Sequencer.

Freeing sequencer would always do usercount, which is now forbidden when
called from main ID freeing code.

Annoying in 2.7x, much more critical issue in 2.8!

Also, moved RNA sequencer API functions to proper rna_scene_api.c file.

15 months agoFix (unreported) load image code calling icin/preview update from non-Main thread.
Bastien Montagne [Fri, 11 May 2018 08:48:04 +0000 (10:48 +0200)]
Fix (unreported) load image code calling icin/preview update from non-Main thread.

Icin/preview only works in main thread, while image loading can be done
from others too... This could have generated random crashes and such.

15 months agoFix broken 'check/validate libs' code with indirect libs.
Bastien Montagne [Wed, 9 May 2018 13:46:22 +0000 (15:46 +0200)]
Fix broken 'check/validate libs' code with indirect libs.

Readcode always set relative paths of indirectly linked libs relative to
*current* .blend file, not to the library using it.

But BKE_library_filepath_set was then setting them relative to their
parent library, breaking checking code (and saved files even :((( ).

15 months agoFix T54992: Lattice modifier on another Lattice object does not take the
Philipp Oeser [Tue, 8 May 2018 09:05:42 +0000 (11:05 +0200)]
Fix T54992: Lattice modifier on another Lattice object does not take the
Influence vertexgroup into account

15 months agoFix T54997: simple typo in property description
Philipp Oeser [Wed, 9 May 2018 12:26:47 +0000 (14:26 +0200)]
Fix T54997: simple typo in property description

15 months agoFix (unreported) bug in BVHTree 'free tessfaces' flag setting.
Bastien Montagne [Wed, 9 May 2018 10:33:21 +0000 (12:33 +0200)]
Fix (unreported) bug in BVHTree 'free tessfaces' flag setting.

Could lead to atempt to free NULL pointer, and/or memory leak.

15 months agoMSVC: resolve near/far issue take2
Campbell Barton [Wed, 9 May 2018 09:20:12 +0000 (11:20 +0200)]
MSVC: resolve near/far issue take2

Previous fix failed w/ compositor,
tested on MSVC2015, full build.

15 months agoMSVC: remove hack for near/far name collision
Campbell Barton [Wed, 9 May 2018 08:00:55 +0000 (10:00 +0200)]
MSVC: remove hack for near/far name collision

windows headers define these, conflicting w/ View3D.near/far.

15 months agoColor: Combine/Separate YCbCrA node default to rec. 709
Aaron Carlisle [Wed, 9 May 2018 02:24:58 +0000 (22:24 -0400)]
Color: Combine/Separate YCbCrA node default to rec. 709

This commit is part of T54798

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

15 months agoCleanup: includes
Campbell Barton [Tue, 8 May 2018 16:01:47 +0000 (18:01 +0200)]
Cleanup: includes

15 months agoCleanup: move mesh conversion into own function
Campbell Barton [Tue, 8 May 2018 15:44:54 +0000 (17:44 +0200)]
Cleanup: move mesh conversion into own function

15 months agoFix building with latest versions of ffmpeg.
Bastien Montagne [Tue, 8 May 2018 14:00:52 +0000 (16:00 +0200)]
Fix building with latest versions of ffmpeg.

Some years-old deprecated stuff has now been removed.

Correct solution is probably to use valid defines etc. in own code, but
this is more FFMEPG maintainer task (since it also may change how old
FFMPEG we do support...).

15 months agoFix (unreported) bloody modifiers messing with ID user count in copy.
Bastien Montagne [Tue, 8 May 2018 13:27:10 +0000 (15:27 +0200)]
Fix (unreported) bloody modifiers messing with ID user count in copy.

User count of IDs is handled by higher-level, generic function,
low-level copydata functions *MUST NOT* touch them anymore, ever!

15 months agoCleanup: Nuke empty dummy wrappers around modifier_copyData_generic().
Bastien Montagne [Tue, 8 May 2018 13:04:10 +0000 (15:04 +0200)]
Cleanup: Nuke empty dummy wrappers around modifier_copyData_generic().

This also changes signature of modifier copy callback, first (source)
parameter is now a const, which is saner anyway!

15 months agoModifiers: sanitize/cleanup modifiers' copying & freeing code.
Bastien Montagne [Tue, 8 May 2018 12:21:02 +0000 (14:21 +0200)]
Modifiers: sanitize/cleanup modifiers' copying & freeing code.

Should also fix T55000: Crash with hooks and curves in Cycles render.

15 months agoCleanup: quiet -Warray-bounds warning
Campbell Barton [Tue, 8 May 2018 11:32:52 +0000 (13:32 +0200)]
Cleanup: quiet -Warray-bounds warning

15 months agoTracking: Use bmain from context
Sergey Sharybin [Tue, 8 May 2018 09:58:42 +0000 (11:58 +0200)]
Tracking: Use bmain from context

15 months agoCleanup: remove unused wmReport struct
Campbell Barton [Tue, 8 May 2018 05:52:13 +0000 (07:52 +0200)]
Cleanup: remove unused wmReport struct

15 months agoFix (unreported) memleak when copying object with some modifiers.
Bastien Montagne [Mon, 7 May 2018 15:58:35 +0000 (17:58 +0200)]
Fix (unreported) memleak when copying object with some modifiers.

15 months agoCleanup: rename char/float conversion functions
Campbell Barton [Mon, 7 May 2018 15:31:28 +0000 (17:31 +0200)]
Cleanup: rename char/float conversion functions

- FTOCHAR       -> unit_float_to_uchar_clamp
- F3TOCHAR3     -> unit_float_to_uchar_clamp_v3 (swap args)
- F4TOCHAR4     -> unit_float_to_uchar_clamp_v4 (swap args)
- FTOUSHORT     -> unit_float_to_ushort_clamp
- USHORTTOUCHAR -> unit_ushort_to_uchar

15 months agoCleanup: move unit char/short/float to functions
Campbell Barton [Mon, 7 May 2018 15:14:28 +0000 (17:14 +0200)]
Cleanup: move unit char/short/float to functions

This caused GCC 8.1 to crash at build time,
but was also not very nice use of macros.

15 months agoFix Movieclip editors 'graph' and 'dopesheet' view using themes region
Philipp Oeser [Mon, 7 May 2018 12:57:05 +0000 (14:57 +0200)]
Fix Movieclip editors 'graph' and 'dopesheet' view using themes region
background setting

mentioned in T54942

Reviewed By: campbellbarton

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

15 months agoFix T54525: crash when setting number of frames to use between dupoff
Philipp Oeser [Mon, 7 May 2018 12:49:09 +0000 (14:49 +0200)]
Fix T54525: crash when setting number of frames to use between dupoff
frames

caused division by zero if both dupli_frames_on and dupli_frames_off are
zero. doing this doesnt seem useful, dupliframes can be disabled in
other ways.

Reviewed By: campbellbarton

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

15 months agoMore tweaks to strict compiler flags
Sergey Sharybin [Mon, 7 May 2018 12:28:22 +0000 (14:28 +0200)]
More tweaks to strict compiler flags

15 months agoSilence compilation error around possible fall-through
Sergey Sharybin [Mon, 7 May 2018 12:19:12 +0000 (14:19 +0200)]
Silence compilation error around possible fall-through

15 months agoFix wrong comparison of drop target URI on X11
Sergey Sharybin [Mon, 7 May 2018 12:08:33 +0000 (14:08 +0200)]
Fix wrong comparison of drop target URI on X11

Need to compare, NOT to override passed file name.

15 months agoFix Bevel percent mode bug 54228
Howard Trickey [Mon, 7 May 2018 11:04:12 +0000 (07:04 -0400)]
Fix Bevel percent mode bug 54228

Previous new adjust pass commit should have excluded percent mode.

15 months agoFix T54324: remove stencil entries from weight paint keymap
Philipp Oeser [Mon, 7 May 2018 10:28:15 +0000 (12:28 +0200)]
Fix T54324: remove stencil entries from weight paint keymap

Reviewed By: mont29

Differential Revision: http://developer.blender.org/D3178

15 months agoFix T54594: Lattice with Armature modifier not updating correctly
Sergey Sharybin [Mon, 7 May 2018 10:04:50 +0000 (12:04 +0200)]
Fix T54594: Lattice with Armature modifier not updating correctly

15 months agoFix T54966: mathutils.noise.voronoi Memory leak
Bastien Montagne [Mon, 7 May 2018 09:07:11 +0000 (11:07 +0200)]
Fix T54966: mathutils.noise.voronoi Memory leak

C code was not correctly handling release of temp data, not technically
a memory leak, but indeed rather annoying bug! ;)

15 months agoNodes: show node labels (like image name) in material properties node view.
Brecht Van Lommel [Mon, 19 Feb 2018 13:39:27 +0000 (14:39 +0100)]
Nodes: show node labels (like image name) in material properties node view.

15 months agoCleanup: split rotation_from_view
Campbell Barton [Sun, 6 May 2018 16:32:18 +0000 (18:32 +0200)]
Cleanup: split rotation_from_view

Add a function that takes only a quat, instead of the 3D view.

Allows for using non-view orientations.

15 months agoObject Snap: add object & matrix to view ray cast
Campbell Barton [Sun, 6 May 2018 13:56:09 +0000 (15:56 +0200)]
Object Snap: add object & matrix to view ray cast

Some snap functions already exposed this.

15 months agoWM: include macros in last-properties
Campbell Barton [Sun, 6 May 2018 06:54:58 +0000 (08:54 +0200)]
WM: include macros in last-properties

Needed for 2.8 tool system storage of macro properties.

15 months agoIDProp API: use stored string length for IDP_repr
Campbell Barton [Sun, 6 May 2018 06:45:54 +0000 (08:45 +0200)]
IDProp API: use stored string length for IDP_repr

Also NULL check ID pointers.

15 months agoFix T54801: incorrect render with zero weight transparent BSDFs.
Brecht Van Lommel [Sat, 5 May 2018 23:24:53 +0000 (01:24 +0200)]
Fix T54801: incorrect render with zero weight transparent BSDFs.

15 months agoIDProp API: add native C repr function
Campbell Barton [Sat, 5 May 2018 12:27:54 +0000 (14:27 +0200)]
IDProp API: add native C repr function

Was using Python which wasn't very efficient (even for logging).

15 months agoPyAPI: add pop method to RNA struct types
Campbell Barton [Sat, 5 May 2018 07:53:30 +0000 (09:53 +0200)]
PyAPI: add pop method to RNA struct types

This fits in with existing dict style access.

15 months agoIDProp Py API: Add default argument to pop
Campbell Barton [Sat, 5 May 2018 07:48:06 +0000 (09:48 +0200)]
IDProp Py API: Add default argument to pop

Match dict.pop behavior.

15 months agoIDProp API: Avoid redundant group replace lookup
Campbell Barton [Sat, 5 May 2018 07:31:17 +0000 (09:31 +0200)]
IDProp API: Avoid redundant group replace lookup

15 months agoBKE: bvhuils: remove member `sphere_radius`.
Germano [Fri, 4 May 2018 14:57:01 +0000 (11:57 -0300)]
BKE: bvhuils: remove member `sphere_radius`.

This member currently doubles the value of `ray->radius` or is not even used.

15 months agoFix erroe in previous commit.
Germano [Fri, 4 May 2018 14:22:50 +0000 (11:22 -0300)]
Fix erroe in previous commit.

15 months agoBKE: bvhutils: Unifies static functions oh bvhtrees creation.
Germano [Fri, 4 May 2018 14:15:21 +0000 (11:15 -0300)]
BKE: bvhutils: Unifies static functions oh bvhtrees creation.

15 months agoCleanup: Remove G.main from framechange_poses_clear_unkeyed()
Sergey Sharybin [Fri, 4 May 2018 12:57:31 +0000 (14:57 +0200)]
Cleanup: Remove G.main from framechange_poses_clear_unkeyed()

15 months agoBKE: Smoke: Fix error with implicit declaration of function due recent changes.
Germano [Fri, 4 May 2018 13:11:30 +0000 (10:11 -0300)]
BKE: Smoke: Fix error with implicit declaration of function due recent changes.

15 months agoBKE: BVHtree: Replace all external references of `bvhtree_from_mesh_looptri` with...
Germano [Fri, 4 May 2018 12:21:42 +0000 (09:21 -0300)]
BKE: BVHtree: Replace all external references of `bvhtree_from_mesh_looptri` with `bvhtree_from_mesh_get`.

15 months agoMesh Remap: Face Corner Data: Do not use large epsilon values to create bvhtrees.
Germano [Fri, 4 May 2018 12:01:56 +0000 (09:01 -0300)]
Mesh Remap: Face Corner Data: Do not use large epsilon values to create bvhtrees.

Use ray radius instead.

15 months agoMesh Remap: Face Data: Do not use large epsilon values to create bvhtree.
Germano [Fri, 4 May 2018 11:29:00 +0000 (08:29 -0300)]
Mesh Remap: Face Data: Do not use large epsilon values to create bvhtree.

If you need the approximation, use raycast radius.

15 months agoDepsgraph: Fix extra operations and relations created for shared armatures
Sergey Sharybin [Fri, 4 May 2018 10:49:28 +0000 (12:49 +0200)]
Depsgraph: Fix extra operations and relations created for shared armatures

15 months agoMesh Remap: Change the sphere_radius parameter instead of creating a bvhtree with...
Germano [Fri, 4 May 2018 10:43:08 +0000 (07:43 -0300)]
Mesh Remap: Change the sphere_radius parameter instead of creating a bvhtree with epsilon equal to the value of ray_radius.

This is the desirable behavior.
It also removes one more use of `bvhtree_from_mesh_looptri`.

15 months agoConstraint: Shrink Warp: Replace `bvhtree_from_mesh_looptri` with` bvhtree_from_mesh_...
Germano [Fri, 4 May 2018 10:39:07 +0000 (07:39 -0300)]
Constraint: Shrink Warp: Replace `bvhtree_from_mesh_looptri` with` bvhtree_from_mesh_get`.

The value of epsilon was never used to create this bvhtree because whenever we activate this constraint, a bvhtree with parameter epsilon 0.0 was created and cached.

15 months agoMesh Lapacian: Use `isect_ray_tri_watertight_v3` instead of Epsilons to prevent corne...
Germano [Fri, 4 May 2018 10:33:26 +0000 (07:33 -0300)]
Mesh Lapacian: Use `isect_ray_tri_watertight_v3` instead of Epsilons to prevent corners errors in raycast.

Using FLT_EPSILON can fail with large coordinate values.
This commit also avoids storing bvhtrees with different settings in BVHCache.

15 months agoFix T54935: Particle group instances don't render when hidden in viewport
Sergey Sharybin [Fri, 4 May 2018 09:40:27 +0000 (11:40 +0200)]
Fix T54935: Particle group instances don't render when hidden in viewport

Seems to be only related on linked nature of particles.

This is caused by some conflicting optimization done for viewport, which
does not do particles re-calculation if they do not depend on time
(which is crucial for big layout scene grass fields) and particle render
setting  switch which was relying on fact that render pipeline will do
particle update via time dependency.

Now we extent an old workaround for invisible objects, which now also
deals with particles in the same way as old dependency graph was dealing
with this: tag object data for update if there is particle system.

There shouldn't be any speed difference between old and new depsgraph,
since tagging was already needed and was happening.

In Blender 2.8 such things should be easier to deal with since the whole
depsgraph is to be evaluated for render engine anyway.