blender.git
9 months agoInitial step for IDTypeInfo refactor 'cleanup' project.
Bastien Montagne [Thu, 5 Mar 2020 09:54:00 +0000 (10:54 +0100)]
Initial step for IDTypeInfo refactor 'cleanup' project.

Introduce new IDTypeInfo structure.

Each ID type will have its own, with some minimal basic common info,
and ID management callbacks.

This patch only does it for Object type, for demo/testing purpose.
Moving all existing IDs is a goal of next "cleanup Friday".

Note that BKE_idcode features should then be merged back into BKE_idtype -
but this will have to be done later, once all ID types have been properly
converted to the new system.

Another later TODO might be to try and add callbacks for file read/write,
and lib_query ID usages looper.

This is part of T73719.

Thanks to @brecht for initial idea, and reviewing the patch.

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

9 months agoCleanup: Clarified comment
Sybren A. Stüvel [Thu, 5 Mar 2020 09:46:52 +0000 (10:46 +0100)]
Cleanup: Clarified comment

No functional changes.

9 months agoFix T74431: EEVEE AO Render Pass
Jeroen Bakker [Thu, 5 Mar 2020 07:58:00 +0000 (08:58 +0100)]
Fix T74431: EEVEE AO Render Pass

Missing code-path in recent refactoring.

9 months agoAddons: Allow a user manual url prefix in doc_url
Aaron Carlisle [Thu, 5 Mar 2020 04:24:13 +0000 (23:24 -0500)]
Addons: Allow a user manual url prefix in doc_url

This was raised in T74017, the issue being that we point to `/dev`
version of the manual for the addons when we want to point to a specific
version instead.

Instead of manually updating the URL every release we can do this.

The `bl_info` for addons will need to be updated in the format of
`'doc_url':
{BLENDER_MANUAL_URL}/addons/import_export/scene_gltf2.html",`

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

9 months agoAddons: deprecate 'wiki_url'
Aaron Carlisle [Thu, 5 Mar 2020 00:40:05 +0000 (11:40 +1100)]
Addons: deprecate 'wiki_url'

When running with debug enabled ('-d' argument),
warnings are printed for add-ons which are not yet updated.

Reminder to name things based on what they do,
not the technologies they use :)

9 months agoFix RNA runtime warning from recent commit
Aaron Carlisle [Wed, 4 Mar 2020 22:43:17 +0000 (17:43 -0500)]
Fix RNA runtime warning from recent commit

9 months agoUI: Fluid: Fix wrong uses of enabled
Aaron Carlisle [Wed, 4 Mar 2020 22:41:06 +0000 (17:41 -0500)]
UI: Fluid: Fix wrong uses of enabled

9 months agoUI: Fluid: Viewport Display
Aaron Carlisle [Wed, 4 Mar 2020 22:40:23 +0000 (17:40 -0500)]
UI: Fluid: Viewport Display

Cleanup the order of properties and hide sub setting as they were
confusing before.

9 months agoUI: Fluid Group Liquid/Gas Panels
Aaron Carlisle [Wed, 4 Mar 2020 21:16:40 +0000 (16:16 -0500)]
UI: Fluid Group Liquid/Gas Panels

Part of T73617

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

9 months agoUI: Fluid: Use updated preset UI
Aaron Carlisle [Wed, 4 Mar 2020 21:13:10 +0000 (16:13 -0500)]
UI: Fluid: Use updated preset UI

Part of T73617

9 months agoFix Unreported: Error adding fluid presets
Aaron Carlisle [Wed, 4 Mar 2020 21:12:20 +0000 (16:12 -0500)]
Fix Unreported: Error adding fluid presets

9 months agoCleanup: redundant casts
Campbell Barton [Wed, 4 Mar 2020 21:33:26 +0000 (08:33 +1100)]
Cleanup: redundant casts

9 months agoCleanup: material API naming
Campbell Barton [Wed, 4 Mar 2020 21:08:23 +0000 (08:08 +1100)]
Cleanup: material API naming

- Use 'BKE_object_material_*', 'BKE_id_material_*' prefix
  for functions that operate on Object and ID types.
- Use '_len' suffix for length (matching BLI naming).
- Use '_p' suffix for functions that return a pointer to values
  where the value would typically be returned.

Functions renamed:

- BKE_object_material_resize      was BKE_material_resize_object
- BKE_object_material_remap       was BKE_material_remap_object
- BKE_object_material_remap_calc  was BKE_material_remap_object_calc

- BKE_object_material_array_p     was BKE_object_material_array
- BKE_object_material_len_p       was BKE_object_material_num
- BKE_id_material_array_p         was BKE_id_material_array
- BKE_id_material_len_p           was BKE_id_material_num

- BKE_id_material_resize          was BKE_material_resize_id
- BKE_id_material_append          was BKE_material_append_id
- BKE_id_material_pop             was BKE_material_pop_id
- BKE_id_material_clear           was BKE_material_clear_id

9 months agoCleanup: formatting, strip trailing space
Campbell Barton [Wed, 4 Mar 2020 21:05:21 +0000 (08:05 +1100)]
Cleanup: formatting, strip trailing space

9 months agoCleanup: replace unnecessary MEM_callocN calls
Campbell Barton [Wed, 4 Mar 2020 20:54:52 +0000 (07:54 +1100)]
Cleanup: replace unnecessary MEM_callocN calls

Use MEM_mallocN when memory is immediately copied over.

9 months agoFluid: Bounding boxes for effector objects
Sebastián Barschkis [Wed, 4 Mar 2020 17:44:23 +0000 (18:44 +0100)]
Fluid: Bounding boxes for effector objects

This commit adds bounding box support for emission objects - similarly to flow objects. Before, each effector object had to iterate over the entire domain. Bake times of scenes with multiple obstacles improved significantly with this optimization.

Other improvements that were implemented alongside the bbox feature:
- Option for subframe sampling for effector objects
- Option to enable / disable effectors (can be animated)
- Optimization for static objects. If a flow or effector object does not move and the adaptive domain is not in use, the bake time will be optimized further by reusing the flow / effector grids from the previous frame (no recalculation).

9 months agoFluid: Added sanity grid initializations in smoke / liquid scripts
Sebastián Barschkis [Wed, 4 Mar 2020 16:50:55 +0000 (17:50 +0100)]
Fluid: Added sanity grid initializations in smoke / liquid scripts

Just a sanity check.

9 months agoFluid: Fix issue with fire emission
Sebastián Barschkis [Wed, 4 Mar 2020 16:46:42 +0000 (17:46 +0100)]
Fluid: Fix issue with fire emission

Fixes weird behavior at inflow regions. Issue was introduced with d6d44ccc7786.

9 months agoFluid: Naming cleanup for flags grid
Sebastián Barschkis [Wed, 4 Mar 2020 16:32:47 +0000 (17:32 +0100)]
Fluid: Naming cleanup for flags grid

Use flags instead of obstacle to avoid confusion with obstacle levelset grid.

9 months agoFluid: Added an option to delete fluid inside obstacles
Sebastián Barschkis [Wed, 4 Mar 2020 16:23:09 +0000 (17:23 +0100)]
Fluid: Added an option to delete fluid inside obstacles

Simple checkbox that - if enabled - will tell the solver to clear density or liquid particles in obstacle cells.

9 months agoFluid: Optimization for extrapolation functions in smoke / liquid scripts
Sebastián Barschkis [Wed, 4 Mar 2020 16:20:42 +0000 (17:20 +0100)]
Fluid: Optimization for extrapolation functions in smoke / liquid scripts

Too much extrapolation can become expensive. Reducing it here since extrapolating levelsets into a couple of cells should be sufficient.

9 months agoFix T74434: Video Sequencer: Alt+ clicking (assign to all selected) does
Philipp Oeser [Wed, 4 Mar 2020 14:55:22 +0000 (15:55 +0100)]
Fix T74434: Video Sequencer: Alt+ clicking (assign to all selected) does
not work for unlocking

Special case for when we do this on "lock":
- locked sequences are not in "selected_editable_sequences"
- use "selected_sequences" in that case

Maniphest Tasks: T74434

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

9 months agoFix T71578: knife tool draws some points incorrectly
Jacques Lucke [Wed, 4 Mar 2020 15:47:18 +0000 (16:47 +0100)]
Fix T71578: knife tool draws some points incorrectly

D6417 by @fbessou

9 months agoBuild System: Add OpenXR-SDK dependency and WITH_XR_OPENXR build option
Julian Eisel [Wed, 4 Mar 2020 15:39:00 +0000 (16:39 +0100)]
Build System: Add OpenXR-SDK dependency and WITH_XR_OPENXR build option

The OpenXR-SDK contains utilities for using the OpenXR standard
(https://www.khronos.org/openxr/). Namely C-headers and a so called
"loader" to manage runtime linking to OpenXR platforms ("runtimes")
installed on the user's system.

The WITH_XR_OPENXR build option is disabled by default for now, as there
is no code using it yet. On macOS it will remain disabled for now, it's
untested and there's no OpenXR runtime in sight for it.

Some points on the OpenXR-SDK dependency:
* The repository is located at
  https://github.com/KhronosGroup/OpenXR-SDK (Apache 2).
* Notes on updating the dependency:
  https://wiki.blender.org/wiki/Source/OpenXR_SDK_Dependency
* It contains a bunch of generated files, for which the sources are in a
  separate repository
  (https://github.com/KhronosGroup/OpenXR-SDK-Source).
* We could use that other repo by default, but I'd rather go with the
  simpler solution and allow people to opt in if they want advanced dev
  features.
* We currently use the OpenXR loader lib from it and the headers.
* To use the injected OpenXR API-layers from the SDK (e.g. API
  validation layers), the SDK needs to be compiled from this other
  repository.

The extra "XR_" prefix in the build option is to avoid mix-ups of OpenXR
with OpenEXR.

Most of this comes from the 2019 GSoC project, "Core Support of Virtual
Reality Headsets through OpenXR"
(https://wiki.blender.org/wiki/User:Severin/GSoC-2019/).

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

Reviewed by: Campbell Barton, Sergey Sharybin, Bastien Montagne, Ray
Molenkamp

9 months agoCleanup: use MEM_recallocN_id utility function
Campbell Barton [Wed, 4 Mar 2020 12:51:32 +0000 (23:51 +1100)]
Cleanup: use MEM_recallocN_id utility function

9 months agoRNA: ensure missing calls to RNA_enum_item_end crash in debug mode
Campbell Barton [Wed, 4 Mar 2020 12:46:33 +0000 (23:46 +1100)]
RNA: ensure missing calls to RNA_enum_item_end crash in debug mode

Would have prevented T74227 from slipping through
since it didn't crash on some systems.

9 months agoFix T74426: Crash in the IK Pose Brush preview with null preview chain
Pablo Dobarro [Wed, 4 Mar 2020 11:12:28 +0000 (12:12 +0100)]
Fix T74426: Crash in the IK Pose Brush preview with null preview chain

After switching tools, the active vertex can be the same and the cursor
won't update the previews, so the pose_ik_chain_preview will be null.
This often happens in low poly meshes where chances of hovering the same
vertex are high.

Reviewed By: sergey

Maniphest Tasks: T74426

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

9 months agoCleanup: spelling
Campbell Barton [Wed, 4 Mar 2020 10:45:40 +0000 (21:45 +1100)]
Cleanup: spelling

9 months agoRefactor ID make local to use a single flag parameter.
Bastien Montagne [Wed, 4 Mar 2020 10:42:15 +0000 (11:42 +0100)]
Refactor ID make local to use a single flag parameter.

Instead of using anonymous booleans flags, also allows to keep the same
behavior in all cases, without needing special handling from calling
code for our beloved oddballs object proxies...

9 months agoCleanup: ID make local: remove `id_in_bmain` argument.
Bastien Montagne [Wed, 4 Mar 2020 10:05:41 +0000 (11:05 +0100)]
Cleanup: ID make local: remove `id_in_bmain` argument.

This info is now stored in ID tags themselves, so no need to pass an
extra anonymous boolean parameter around, yay!

9 months agoCleanup: Rename 'make local' functions to new scheme.
Bastien Montagne [Wed, 4 Mar 2020 09:38:30 +0000 (10:38 +0100)]
Cleanup: Rename 'make local' functions to new scheme.

Also removed some only used locally from the header, `BKE_lib_id.h`
is already way too big, no need to overload it with unused things.

9 months agoUI: rename View Selected" to "Frame Selected"
Asad-ullah Khan [Wed, 4 Mar 2020 10:29:23 +0000 (21:29 +1100)]
UI: rename View Selected" to "Frame Selected"

Addresses T74331

9 months agoFix T73797: Selection/Editing after Make Single User for Object Data
Philipp Oeser [Wed, 4 Mar 2020 10:05:17 +0000 (11:05 +0100)]
Fix T73797: Selection/Editing after Make Single User for Object Data
fails

Exposed by rB50d5c03e2d14.

This was only a problem when _only_ 'Object Data' was made local.
If also e.g. 'Object' or 'Materials' was checked, these were already
making sure realations were updated [DEG_relations_tag_update(bmain)].

Now also call DEG_relations_tag_update(bmain) for the 'Object Data'
case.

I assume the underlying issue is that there is some ID_NEW_REMAP
happening in 'single_obdata_users()' -- including that for 'me-
>texcomesh', which might be responsible for the glitches in selection/
editing? Also not entirely sure why this wasnt a problem prior to
rB50d5c03e2d14.(I assume this was somewhat hidden by the fact this was
always called with a default action being nothing, the user would always
need to access the redo panel. So this might have been hidden by an Undo
step involved?)

Maniphest Tasks: T73797

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

9 months agoCleanup: avoid the term old when storing/restoring context variables
Campbell Barton [Wed, 4 Mar 2020 10:10:48 +0000 (21:10 +1100)]
Cleanup: avoid the term old when storing/restoring context variables

9 months agoCleanup: remove unused BLI_strncat_utf8
Campbell Barton [Wed, 4 Mar 2020 04:24:06 +0000 (15:24 +1100)]
Cleanup: remove unused BLI_strncat_utf8

Behaves differently to strncat,
BLI_strncpy_utf8_rlen can be used for a similar purpose.

9 months agoFix possible buffer overflow from incorrect 'strncat' use
Campbell Barton [Wed, 4 Mar 2020 04:12:36 +0000 (15:12 +1100)]
Fix possible buffer overflow from incorrect 'strncat' use

The size argument is the maximum number of bytes to copy,
not the destination buffer size.

Replace with utility function that joins strings.

9 months agoBLI_string_utils: add BLI_string_join_array_by_sep_char
Campbell Barton [Wed, 4 Mar 2020 04:12:06 +0000 (15:12 +1100)]
BLI_string_utils: add BLI_string_join_array_by_sep_char

Utility to join strings into a fixed size buffer.

9 months agoCleanup: replace CLAMP macros with functions
Campbell Barton [Wed, 4 Mar 2020 00:31:51 +0000 (11:31 +1100)]
Cleanup: replace CLAMP macros with functions

9 months agoBLI_math: inline clamp functions
Campbell Barton [Wed, 4 Mar 2020 00:23:00 +0000 (11:23 +1100)]
BLI_math: inline clamp functions

These are used in some per-pixel operations such as image sampling and
color conversion, where replacing existing macro use could add overhead.

9 months agoCleanup: replace commented code with define check
Campbell Barton [Tue, 3 Mar 2020 23:56:56 +0000 (10:56 +1100)]
Cleanup: replace commented code with define check

Avoids duplicated comments,
also quiet warning accessing non-existing variable.

9 months agoCleanup: cmake indentation
Campbell Barton [Tue, 3 Mar 2020 23:47:24 +0000 (10:47 +1100)]
Cleanup: cmake indentation

9 months agoCMake: make OpenVDB depend on OpenEXR
Campbell Barton [Tue, 3 Mar 2020 23:39:53 +0000 (10:39 +1100)]
CMake: make OpenVDB depend on OpenEXR

OpenVDB uses 'half' type & fails to link without it.

9 months agoBLI_math: add clamp_v# and clamp_v#_v#v# utility functions
Tiago Chaves [Tue, 3 Mar 2020 23:24:21 +0000 (10:24 +1100)]
BLI_math: add clamp_v# and clamp_v#_v#v# utility functions

9 months agoFix T72028: Crash switching to vertex paint
Philipp Oeser [Tue, 3 Mar 2020 16:22:52 +0000 (17:22 +0100)]
Fix T72028: Crash switching to vertex paint

This would happen when done from editmode, on a mesh with any modifier,
after adding/removing geometry in editmode.

Similar to rBba0870713b9b (which did this for weightpaint and sculpt
already), ensure an evaluated depsgraph, otherwise
'runtime.mesh_deform_eval' would not be up to date causing problems
later.

Maniphest Tasks: T72028

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

9 months agoModifiers: Wave add invert vgroup option
Bastien Montagne [Tue, 3 Mar 2020 17:41:50 +0000 (18:41 +0100)]
Modifiers: Wave add invert vgroup option

Adds the invert vgroup option to the Wave modifier.

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

9 months agoIDs: change FILTER_ID_* to 64 bit to make space for new ID types
Brecht Van Lommel [Tue, 3 Mar 2020 16:21:28 +0000 (17:21 +0100)]
IDs: change FILTER_ID_* to 64 bit to make space for new ID types

And change file browser to boolean from bitflag enum, which is only 32 bit.

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

9 months agoIDs: modify wm.previews_clear operator to make space for new ID types
Brecht Van Lommel [Tue, 3 Mar 2020 16:21:22 +0000 (17:21 +0100)]
IDs: modify wm.previews_clear operator to make space for new ID types

Use a regular enum, to avoid running out of bits.

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

9 months agoRNA: support 64 bit boolean bitflags in DNA
Brecht Van Lommel [Tue, 3 Mar 2020 16:21:18 +0000 (17:21 +0100)]
RNA: support 64 bit boolean bitflags in DNA

This does not affect the RNA access API, since how the boolean is read from
DNA abstracted away in the API.

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

9 months agoFix: USD Build error on windows
Ray Molenkamp [Tue, 3 Mar 2020 16:04:31 +0000 (09:04 -0700)]
Fix: USD Build error on windows

USD is being included before the blender headers.

USD includes TBB, which includes the windows headers
which define rad2 as a constant conflicting with a field
with that exact name in the MetaElem dna struct.

Added `-DWIN32_LEAN_AND_MEAN` to keep the windows headers
from defining rad2.

9 months agoFix Snake Hook rake on rotated objects
Pablo Dobarro [Tue, 3 Mar 2020 12:30:31 +0000 (13:30 +0100)]
Fix Snake Hook rake on rotated objects

It was missing this local space conversion before calculating the rake
angle.

Reviewed By: jbakker

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

9 months agoFix hardness not resetting when using reset brush
Pablo Dobarro [Mon, 2 Mar 2020 14:45:15 +0000 (15:45 +0100)]
Fix hardness not resetting when using reset brush

Just add it to the list or properties to reset from DNA_brush_defaults

Reviewed By: jbakker

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

9 months agoUSD: Added support for exporting metaballs
Sybren A. Stüvel [Tue, 3 Mar 2020 14:31:45 +0000 (15:31 +0100)]
USD: Added support for exporting metaballs

Metaballs are exported as evaluated polygonal mesh.

USDExporterContext::depsgraph was made non-const to allow calling
`BKE_mesh_new_from_object()`. The alternative was to make the depsgraph
parameter of that function const, but that would be too intrusive as
that would require even more functions to accept a const depsgraph
pointer.

9 months agoCleanup: USD, marked overridden function with `override`
Sybren A. Stüvel [Tue, 3 Mar 2020 14:32:29 +0000 (15:32 +0100)]
Cleanup: USD, marked overridden function with `override`

No functional changes.

9 months agoCleanup: USD, removed unused code
Sybren A. Stüvel [Tue, 3 Mar 2020 14:10:03 +0000 (15:10 +0100)]
Cleanup: USD, removed unused code

Removed an unused forward declaration.

No functional changes.

9 months agoFix T71871: Quadriflow remesh operator don't stack operations
Sebastian Parborg [Tue, 3 Mar 2020 14:28:36 +0000 (15:28 +0100)]
Fix T71871: Quadriflow remesh operator don't stack operations

Made an explicit call to the exec function be a blocking call and a call
from invoke (or otherwise) be nonblocking.

Reviewed By: Bastien

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

9 months agoRemove the "use mesh curvature" option from quadriflow
Sebastian Parborg [Tue, 3 Mar 2020 14:25:49 +0000 (15:25 +0100)]
Remove the "use mesh curvature" option from quadriflow

It sometimes caused the solver to get into an seemingly unrecoverable
state and crash. Therefore I will disable this feature for now.

9 months agoFix delaunay triangulation, bad indices for output faces.
Howard Trickey [Tue, 3 Mar 2020 13:41:26 +0000 (08:41 -0500)]
Fix delaunay triangulation, bad indices for output faces.

If there were merged vertices, sometimes the output faces
had wrong vertex indices. Added a test for this, and fixed.

9 months agoRevert "Fix T74110: EEVEE Shadow Pass"
Jeroen Bakker [Tue, 3 Mar 2020 11:34:36 +0000 (12:34 +0100)]
Revert "Fix T74110: EEVEE Shadow Pass"

This reverts commit 403bb357ae2b1d2561a0d77c96035ba54c197cbd.
The old implementation matches cycles closer. See T74378

9 months agoCleanup: formatting, spelling
Campbell Barton [Tue, 3 Mar 2020 11:06:52 +0000 (22:06 +1100)]
Cleanup: formatting, spelling

9 months agoSubdiv: Fix/Workaround for surface partial derivatives
Sergey Sharybin [Tue, 3 Mar 2020 10:51:29 +0000 (11:51 +0100)]
Subdiv: Fix/Workaround for surface partial derivatives

Both partial derivatives were evaluated to 0 for a special vertex on
Suzanne model: this is happening on a vertex where two adjacent faces
with 2 common edges are connected (in the nose of Suzanne).

This was breaking multires in this point since tangent matrix is all
zeroes, and hence no displacement can be applied in that vertex.

9 months agoSeparate operators (mesh/curve/armature/gpencil): take user preferences
Philipp Oeser [Wed, 23 Oct 2019 10:28:32 +0000 (12:28 +0200)]
Separate operators (mesh/curve/armature/gpencil): take user preferences
into account for duplicating actions

Previously actions remained linked after duplication, now this is based
on the User Preferences (PreferencesEdit.use_duplicate_action).

note: default is ON here, so this changes default behavior of separate
operators.

First intuition was to respect _all_ preferences here (e.g. also
duplicating materials if chosen in the User Preferences) but after
consideration this is probably not what the User would expect from such
'modeling' opertions (e.g. separate by loose parts resulting in possibly
many duplicate materials)

Fixes T71038

Maniphest Tasks: T71038

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

9 months agoFix bone envelopes displaying wrong when armature is scaled
Philipp Oeser [Fri, 28 Feb 2020 12:36:17 +0000 (13:36 +0100)]
Fix bone envelopes displaying wrong when armature is scaled

Object Scale was not taken into account.

This lead to reports like T74247 where the user scaled the envelope
distance and radii to the supposedly right values inthe viewport, but
these were actually 'wrong' under the hood. Assigning weights from bone
envelopes seemed like it would fail, but this code would actually take
the armature scaling into account when checking envelope distance and
weight.

ref T74247

Maniphest Tasks: T74247

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

9 months agoFix T74375: grid levels theme preference reset to default
Brecht Van Lommel [Tue, 3 Mar 2020 08:29:19 +0000 (09:29 +0100)]
Fix T74375: grid levels theme preference reset to default

9 months agoFix dope sheet (Mask mode) keyframe editing not image/clip views
Campbell Barton [Tue, 3 Mar 2020 05:53:32 +0000 (16:53 +1100)]
Fix dope sheet (Mask mode) keyframe editing not image/clip views

Every key-frame edit was updating all grease pencil & mask data-blocks.

Change the logic to only update edited data-blocks.

9 months agoFix T74292: Dope sheet (Mask mode) keyframe editing misses update
Sybren A. Stüvel [Tue, 3 Mar 2020 04:48:00 +0000 (15:48 +1100)]
Fix T74292: Dope sheet (Mask mode) keyframe editing misses update

9 months agoCleanup: Use a utility function to obtain the bvh_cache
Germano Cavalcante [Tue, 3 Mar 2020 03:40:15 +0000 (00:40 -0300)]
Cleanup: Use a utility function to obtain the bvh_cache

9 months agoMissed in the last commit
Germano Cavalcante [Tue, 3 Mar 2020 03:20:25 +0000 (00:20 -0300)]
Missed in the last commit

9 months agoTransform Snap: Clear 'SnapObjectData' after changes in the geometry
Germano Cavalcante [Tue, 3 Mar 2020 03:08:16 +0000 (00:08 -0300)]
Transform Snap: Clear 'SnapObjectData' after changes in the geometry

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

9 months agoRevert "Transform Snap: Clear 'SnapObjectData' after changes in the geometry"
Germano Cavalcante [Tue, 3 Mar 2020 01:12:46 +0000 (22:12 -0300)]
Revert "Transform Snap: Clear 'SnapObjectData' after changes in the geometry"

This reverts commit fe7c4fb4a2d5d48555ebb9178fd5e7a8c1ace1ee.

It does not work because `mesh_eval_cage` and `mesh_eval_final` always is `NULL` in this case.

9 months agoFix error parsing XDG path values
Campbell Barton [Tue, 3 Mar 2020 00:14:02 +0000 (11:14 +1100)]
Fix error parsing XDG path values

Own error in recent changes to parsing.

9 months agoTransform Snap: Clear 'SnapObjectData' after changes in the geometry
Germano Cavalcante [Mon, 2 Mar 2020 23:59:11 +0000 (20:59 -0300)]
Transform Snap: Clear 'SnapObjectData' after changes in the geometry

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

9 months agoFix T74377: Weld Modifier destroys vertex groups
Germano Cavalcante [Mon, 2 Mar 2020 21:44:47 +0000 (18:44 -0300)]
Fix T74377: Weld Modifier destroys vertex groups

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

9 months agoFix: Excessive (re)builds of subprojects
Ray Molenkamp [Mon, 2 Mar 2020 19:42:01 +0000 (12:42 -0700)]
Fix: Excessive (re)builds of subprojects

Recent refactor external dependencies handling (D6642)
improperly linked all library dependencies with public
linkage rather than interface linkage. Causing excessive
(re)builds of subprojects when not needed.

This patch restores the interface linkage.

Reviewed By: brecht sergey

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

9 months agoCycles: add Progressive Multi-Jitter sampling pattern
Stefan Werner [Mon, 2 Mar 2020 14:12:44 +0000 (15:12 +0100)]
Cycles: add Progressive Multi-Jitter sampling pattern

This sampling pattern is particularly suited to adaptive sampling, and will
be used for that upcoming feature.

Based on "Progressive Multi-Jittered Sample Sequences" by Per Christensen,
Andrew Kensler and Charlie Kilpatrick.

Ref D4686

9 months agoCleanup: Use generics properties for arrow keys navigation (walk-select)
Valentin [Mon, 2 Mar 2020 15:05:59 +0000 (16:05 +0100)]
Cleanup: Use generics properties for arrow keys navigation (walk-select)

This patch refactors arrow keys navigation to move properties and enum
to generic ED_select_utils.h and property to
WM_operator_properties_select_walk_direction()

No functional change

Reviewed By: Julian Eisel

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

9 months agoCleanup: make blf header work in C++
Jacques Lucke [Mon, 2 Mar 2020 14:34:17 +0000 (15:34 +0100)]
Cleanup: make blf header work in C++

9 months agoCleanup: make remaining gpu headers work in C++
Jacques Lucke [Mon, 2 Mar 2020 14:28:47 +0000 (15:28 +0100)]
Cleanup: make remaining gpu headers work in C++

9 months agoFix T74278: Light, Image Object, and Compositor Backdrop Viewer Node
Philipp Oeser [Mon, 2 Mar 2020 13:43:20 +0000 (14:43 +0100)]
Fix T74278: Light, Image Object, and Compositor Backdrop Viewer Node
gizmos are too big

Caused by rB9cac5fa681c5 which fixed the handles for the camera border
gizmo (being much too small)-- which in turn was broken by
rB98e4fbc7cc9e.

Camera border gizmo sets up its matrix_space a bit differently [this is
why we are getting very small values in gizmo_calc_rect_view_scale --
needs more investigation], but instead of breaking it for Light, Image
and Compositor Backdrop, lets just compensate by scaling the Camera
Border Gizmo for now.

Maniphest Tasks: T74278

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

9 months agoCleanup: make remaining imbuf headers work in C++
Jacques Lucke [Mon, 2 Mar 2020 14:20:13 +0000 (15:20 +0100)]
Cleanup: make remaining imbuf headers work in C++

9 months agoCleanup: make remaining editor include headers work in C++
Jacques Lucke [Mon, 2 Mar 2020 14:09:10 +0000 (15:09 +0100)]
Cleanup: make remaining editor include headers work in C++

9 months agoCleanup: make remaining blenkernel headers work in C++
Jacques Lucke [Mon, 2 Mar 2020 14:07:49 +0000 (15:07 +0100)]
Cleanup: make remaining blenkernel headers work in C++

9 months agoCleanup: make remaining blenlib headers work in C++
Jacques Lucke [Mon, 2 Mar 2020 14:04:53 +0000 (15:04 +0100)]
Cleanup: make remaining blenlib headers work in C++

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

Reviewers: brecht

9 months agoFix T65568: sewing and self collision issue
Ish Bosamiya [Mon, 2 Mar 2020 13:52:58 +0000 (10:52 -0300)]
Fix T65568: sewing and self collision issue

As explained in T65568 by @LucaRood, the self collision system should exclude triangles that are connected by sewing springs.

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

9 months agoFix T74295: Cloth + Internal springs crashes on a non-polygonal geometry
Sebastian Parborg [Mon, 2 Mar 2020 14:00:33 +0000 (15:00 +0100)]
Fix T74295: Cloth + Internal springs crashes on a non-polygonal geometry

Added check to see if the mesh has any polygons at all.
If there are no polygons, the bvh tree data will consist of null
pointers, so skip internal springs if this is the case.

9 months agoFix crash when compiling renderpass shader on some AMD drivers
Germano Cavalcante [Mon, 2 Mar 2020 13:33:29 +0000 (10:33 -0300)]
Fix crash when compiling renderpass shader on some AMD drivers

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

9 months agoShading: Add invert option to Vector Rotate Node
Charlie Jolly [Tue, 25 Feb 2020 14:52:01 +0000 (14:52 +0000)]
Shading: Add invert option to Vector Rotate Node

Checkbox to invert rotation angle, suggested by @simonthommes

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

9 months agoFix T74362: Material Preview Assert
Jeroen Bakker [Mon, 2 Mar 2020 12:44:25 +0000 (13:44 +0100)]
Fix T74362: Material Preview Assert

When using Material Previews not all uniform blocks were filled. This
patch will add the renderpass_block when drawing the background.

Note that I wasn't able to reproduce the issue on my system, but
according the the backtrace it most likely solves the issue. I let the
reporter test.

9 months agoFix T74334: VSE can't import multiple movie files
Richard Antalik [Mon, 2 Mar 2020 08:23:55 +0000 (09:23 +0100)]
Fix T74334: VSE can't import multiple movie files

Add `directory` RNA property to add operators.

Reviewed By: brecht

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

9 months agoFix T74335: Text.use_module "Online Manual" leads to TextCurve pages.
Bastien Montagne [Mon, 2 Mar 2020 11:04:33 +0000 (12:04 +0100)]
Fix T74335: Text.use_module "Online Manual" leads to TextCurve pages.

9 months agoClay Thumb: Remove hardcoded hardness value
Pablo Dobarro [Sun, 1 Mar 2020 19:13:29 +0000 (20:13 +0100)]
Clay Thumb: Remove hardcoded hardness value

Clay Thumb was using a custom hardness implementation and value to make
it functional. Hardness is now a property of brushes and it is
implemented for all brushes, so this is no longer needed.

Reviewed By: brecht

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

9 months agoCleanup: Correct forward declaration
Sergey Sharybin [Mon, 2 Mar 2020 09:17:38 +0000 (10:17 +0100)]
Cleanup: Correct forward declaration

9 months agoFix T74299: PyGPUOffscreen Color Management
Jeroen Bakker [Mon, 2 Mar 2020 08:24:06 +0000 (09:24 +0100)]
Fix T74299: PyGPUOffscreen Color Management

Color management currently happens after the python handlers. This means
that all common drawing operations needs to happen in SRS. The
PyGPUOffscreen requested that the color management was applied, that
resulted into applying colormanagement twice.

This patch makes sure that PyGPUOffscreen.draw_view3d renders in SRS.
There are more code paths that needs to be checked that the correct
space is being requested.

9 months agoBevel: Z-Up Custom Profile Orientation
Hans Goudey [Mon, 2 Mar 2020 04:19:17 +0000 (22:19 -0600)]
Bevel: Z-Up Custom Profile Orientation

When beveling architectural objects like baseboards or crown mouldings that
may consist of multiple islands, it's useful if the orientation is at least
conistent.

This changes the arbitrary decision of how the orientation should start at a
chain beginning to use the highest side of the profile in the Z direction.

Reviewed By: howardt

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

9 months agoFix T74320: Sound strip waveforms drawing allows negative volume values
Richard Antalik [Mon, 2 Mar 2020 01:49:35 +0000 (02:49 +0100)]
Fix T74320: Sound strip waveforms drawing allows negative volume values

While animating sound strips volume within the graph editor, it is possible to set keyframes to negative values.
The drawing code of waveforms wasn't clamping these values to zero and was instead drawing an "inverted" curve

Author: a.monti

Reviewed By: iss

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

9 months agoFix .arcconfig not working with latest arcanist version
Brecht Van Lommel [Sun, 1 Mar 2020 21:35:31 +0000 (22:35 +0100)]
Fix .arcconfig not working with latest arcanist version

9 months agoFix: Build error on windows.
Ray Molenkamp [Sun, 1 Mar 2020 20:59:51 +0000 (13:59 -0700)]
Fix: Build error on windows.

Use of undefined GSQueue type was causing build errors.

9 months agoSculpt: Hardness brush property
Pablo Dobarro [Sun, 1 Mar 2020 18:57:44 +0000 (19:57 +0100)]
Sculpt: Hardness brush property

The hardness property moves the brush falloff towards the edges, making
the brush sharper.

This should be the intended way to control the brush falloff instead of
tweaking the falloff curve manually, as it can be mapped to pressure to
make the falloff variable during the stroke.
It is also a good idea to show in the UI that the custom curves is an
advance features and it should almost never be modified when sculpting/
painting unless you want to create some advanced effects. By modifying
the curves freely it is really easy to break the brushes and make them
produce artifacts. This needs to be done in a later after merging the
pending projects to reorganize all the brush properties accordingly.

Reviewed By: brecht

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

9 months agoCleanup: Move pose brush to its own file
Pablo Dobarro [Sun, 1 Mar 2020 18:53:40 +0000 (19:53 +0100)]
Cleanup: Move pose brush to its own file

Reviewed By: brecht

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

9 months agoFix T74307: Add missing brushes to versioning_defaults
Pablo Dobarro [Sun, 1 Mar 2020 18:37:25 +0000 (19:37 +0100)]
Fix T74307: Add missing brushes to versioning_defaults

At least a brush under each tool needs to exist by default in the blend
file to reset its properties. If it does not exist, the user needs to
reset it manually.

Reviewed By: brecht

Maniphest Tasks: T74307

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

9 months agoFix T73707: Missing mesh normals update on sculpt undo
Pablo Dobarro [Sun, 1 Mar 2020 18:35:30 +0000 (19:35 +0100)]
Fix T73707: Missing mesh normals update on sculpt undo

When sculpting on multi user data normals needs to be recalculated to
avoid artifacts. I refactored that line to make it more readable.

Reviewed By: brecht

Maniphest Tasks: T73707

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