Commit Graph

93851 Commits

Author SHA1 Message Date
Aaron Carlisle
ae223ff52b 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 :)
2020-03-05 11:45:22 +11:00
Aaron Carlisle
3da2dc8213 Fix RNA runtime warning from recent commit 2020-03-04 17:43:17 -05:00
Aaron Carlisle
337e861486 UI: Fluid: Fix wrong uses of enabled 2020-03-04 17:41:42 -05:00
Aaron Carlisle
6ab14d971c UI: Fluid: Viewport Display
Cleanup the order of properties and hide sub setting as they were 
confusing before.
2020-03-04 17:41:42 -05:00
Aaron Carlisle
bd0f5fa71f UI: Fluid Group Liquid/Gas Panels
Part of T73617

Differential Revision: https://developer.blender.org/D6994
2020-03-04 17:41:42 -05:00
Aaron Carlisle
55b465f976 UI: Fluid: Use updated preset UI
Part of T73617
2020-03-04 17:41:41 -05:00
Aaron Carlisle
1d18a2a5ec Fix Unreported: Error adding fluid presets 2020-03-04 17:41:41 -05:00
Campbell Barton
1da8ed2a97 Cleanup: redundant casts 2020-03-05 08:38:41 +11:00
Campbell Barton
2fb4de1f8c 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
2020-03-05 08:21:31 +11:00
Campbell Barton
5b0f1e7649 Cleanup: formatting, strip trailing space 2020-03-05 08:05:21 +11:00
Campbell Barton
a297a6c444 Cleanup: replace unnecessary MEM_callocN calls
Use MEM_mallocN when memory is immediately copied over.
2020-03-05 07:59:34 +11:00
Sebastián Barschkis
a5c4a44df6 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).
2020-03-04 18:46:48 +01:00
Sebastián Barschkis
3c74d45c9e Fluid: Added sanity grid initializations in smoke / liquid scripts
Just a sanity check.
2020-03-04 18:46:48 +01:00
Sebastián Barschkis
8f1876b4f0 Fluid: Fix issue with fire emission
Fixes weird behavior at inflow regions. Issue was introduced with d6d44ccc7786.
2020-03-04 18:46:48 +01:00
Sebastián Barschkis
bf8a73b4a7 Fluid: Naming cleanup for flags grid
Use flags instead of obstacle to avoid confusion with obstacle levelset grid.
2020-03-04 18:46:48 +01:00
Sebastián Barschkis
6958ec3f7f 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.
2020-03-04 18:46:48 +01:00
Sebastián Barschkis
b32fd73b24 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.
2020-03-04 18:46:48 +01:00
Philipp Oeser
2a4f350940 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
2020-03-04 17:35:39 +01:00
Jacques Lucke
765f2a1bca Fix T71578: knife tool draws some points incorrectly
D6417 by @fbessou
2020-03-04 16:48:37 +01:00
Julian Eisel
a22573e243 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
2020-03-04 16:45:07 +01:00
Campbell Barton
e7f1de5e11 Cleanup: use MEM_recallocN_id utility function 2020-03-04 23:51:32 +11:00
Campbell Barton
f4463cd865 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.
2020-03-04 23:48:45 +11:00
Pablo Dobarro
d83c0969f6 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
2020-03-04 12:24:02 +01:00
Campbell Barton
6706ae5712 Cleanup: spelling 2020-03-04 21:46:16 +11:00
Bastien Montagne
4bfa256ea4 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...
2020-03-04 11:43:31 +01:00
Bastien Montagne
4e597a5cff 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!
2020-03-04 11:43:30 +01:00
Bastien Montagne
76d8e8693f 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.
2020-03-04 11:43:30 +01:00
Asad-ullah Khan
e4eede8318 UI: rename View Selected" to "Frame Selected"
Addresses T74331
2020-03-04 21:38:23 +11:00
Philipp Oeser
9c62a8c8e5 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
2020-03-04 11:27:56 +01:00
Campbell Barton
a9dc1f6d00 Cleanup: avoid the term old when storing/restoring context variables 2020-03-04 21:13:32 +11:00
Campbell Barton
fb330dd110 Cleanup: remove unused BLI_strncat_utf8
Behaves differently to strncat,
BLI_strncpy_utf8_rlen can be used for a similar purpose.
2020-03-04 15:24:06 +11:00
Campbell Barton
8931c4b18d 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.
2020-03-04 15:17:04 +11:00
Campbell Barton
0baae18375 BLI_string_utils: add BLI_string_join_array_by_sep_char
Utility to join strings into a fixed size buffer.
2020-03-04 15:14:02 +11:00
Campbell Barton
38ed95fe8d Cleanup: replace CLAMP macros with functions 2020-03-04 11:31:51 +11:00
Campbell Barton
89b10b8d42 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.
2020-03-04 11:23:00 +11:00
Campbell Barton
a37dceb139 Cleanup: replace commented code with define check
Avoids duplicated comments,
also quiet warning accessing non-existing variable.
2020-03-04 11:05:08 +11:00
Campbell Barton
a5c984a57d Cleanup: cmake indentation 2020-03-04 11:02:35 +11:00
Campbell Barton
d09c5bdc28 CMake: make OpenVDB depend on OpenEXR
OpenVDB uses 'half' type & fails to link without it.
2020-03-04 10:39:53 +11:00
Tiago Chaves
14c9f64def BLI_math: add clamp_v# and clamp_v#_v#v# utility functions 2020-03-04 10:25:44 +11:00
Philipp Oeser
31aefdeec5 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
2020-03-03 19:38:40 +01:00
Bastien Montagne
059f3c1a7e Modifiers: Wave add invert vgroup option
Adds the invert vgroup option to the Wave modifier.

Differential Revision: https://developer.blender.org/D6893
2020-03-03 18:41:50 +01:00
Brecht Van Lommel
2841b2be39 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
2020-03-03 17:34:21 +01:00
Brecht Van Lommel
19785b96c4 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
2020-03-03 17:22:30 +01:00
Brecht Van Lommel
0c603cffd1 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
2020-03-03 17:21:47 +01:00
Ray Molenkamp
78383f7a9f 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.
2020-03-03 09:04:31 -07:00
Pablo Dobarro
daca00f187 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
2020-03-03 16:16:34 +01:00
Pablo Dobarro
b39273c071 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
2020-03-03 16:12:25 +01:00
4b2b5fe4b8 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.
2020-03-03 15:34:58 +01:00
453be9cc8a Cleanup: USD, marked overridden function with override
No functional changes.
2020-03-03 15:34:58 +01:00
c60e5211d7 Cleanup: USD, removed unused code
Removed an unused forward declaration.

No functional changes.
2020-03-03 15:34:58 +01:00