Commit Graph

104948 Commits

Author SHA1 Message Date
Sergey Sharybin fb1265c5cf Tracking: Fix movie file prefetch freezing interface
The issue was caused by the prefetch code having LOCK_MOVIECLIP lock
acquired while reading frames from the movie files. The need of the
lock was coming from the fact that `clip->anim` can not be accessed
from multiple threads, so that was guarded by a lock. The side effect
of this lock was that the main thread (from which drawing is happening)
did not have any chance passing through it in the cache code because
the prefetch happens so quickly.

The solution is to create a local copy of the clip with its own
anim handler, so that read can happen without such lock.

The prefetch is slower by an absolute number in seconds (within 10%
in tests here), but it is interactive now.
2021-03-22 16:27:35 +01:00
Johannes Jakob 4b9c9a7bea Fix missing document icons on macOS 10.4 and earlier
Re-adds a legacy document icon for macOS 10.14 Mojave that is
consistent with the system generated document icon on macOS 11
Big Sur. It uses the old-style document sheet icon, but includes the
file extension underneath the Blender icon (unlike the previous
legacy document icon that was removed in D10267).

Adds the missing description for the exported type identifier.
Finder now correctly displays “Blender File” instead of “data”
for Blender files.

Differential Revision: https://developer.blender.org/D10746
2021-03-22 16:05:10 +01:00
Brecht Van Lommel 3e44221b57 Fix build error on macOS/clang 2021-03-22 16:05:10 +01:00
Antonio Vazquez a31b162c6e GPencil: Hide Interpolate Only Selected in Draw Mode
This option is only valid in Edit mode. Also changed the space between options to improve UI.

Reviewed by: @mendio
2021-03-22 15:58:59 +01:00
Antonio Vazquez 2889d8dca9 GPencil: Move Automerge button position in topbar
This helps to keep animation buttons grouped.
2021-03-22 15:47:59 +01:00
Sergey Sharybin d955ce1170 Fix T86591: Tracking backwards is slower
The root of the issue was caused by the PredictMarkerPosition()
always returning false when tracking backwards. This was making
it so tracker always had to run brute initialization, which is
an expensive operation.

From own timing here:

- Tracking forward takes 0.667637 seconds
- Tracking backward used to take 2.591856 seconds
- Tracking backward now takes 0.827724 seconds

This is a very nice speedup, although the tracking backwards is
still somewhat slower. Will be investigated further as part of
a regular development.
2021-03-22 15:20:13 +01:00
Bastien Montagne e3f2c94d39 Fix T86741: Remapping could create doublons of collections in hierarchy.
Code rebuilding/ensuring the sanity of the collection hierarchy was not
checking for a same collection being child of the same parent multiple
times.

This was already prevented to happen in code adding collections to other
collections, but not for the remapping case.
2021-03-22 15:10:27 +01:00
Bastien Montagne 56dabfac5c Fix (unreported) memleak in collection/viewlayer code.
In collection/viewlayer synchronization code, in some cases, there are
extra unused view layer collections left in old list after all needed
ones have been moved to the new list.

Found while working on T86741.
2021-03-22 15:10:27 +01:00
Jeroen Bakker 7b7b554f94 Fix: wrong use of assert in recent commit. 2021-03-22 14:11:58 +01:00
Hans Goudey 1a7f9b5005 UI: Remove text for add and remove buttons in cryptomatte node
The text is unecessary and it's always cut off anyway.
2021-03-22 08:58:20 -04:00
Jacques Lucke c4c195672d Cleanup: remove unexposed nodes
Those nodes are leftovers from my work on particle nodes and are not needed currently.
They can be added back easily if they become necessary.
2021-03-22 12:23:25 +01:00
Jacques Lucke 77887f95cc Geometry Nodes: make random float node more consistent with other nodes
Previously, different Random Float nodes would generate different values
depending on where they are in the node group hierarchy. This can be useful,
but should definitely not be the default behavior, because it is very inconsistent
with other nodes.
2021-03-22 12:09:06 +01:00
Jacques Lucke 01b6c4b32b Functions: make multi functions smaller and cheaper to construct in many cases
Previously, the signature of a `MultiFunction` was always embedded into the function.
There are two issues with that. First, `MFSignature` is relatively large, because it contains
multiple strings and vectors. Secondly, constructing it can add overhead that should not
be necessary, because often the same signature can be reused.

The solution is to only keep a pointer to a signature in `MultiFunction` that is set during
construction. Child classes are responsible for making sure that the signature lives
long enough. In most cases, the signature is either embedded into the child class or
it is allocated statically (and is only created once).
2021-03-22 12:01:07 +01:00
Campbell Barton ccb372d17c Fix regression in bd79691599
The sequencer header needs to be drawn, even if the returned
variables aren't used.
2021-03-22 21:59:55 +11:00
Jeroen Bakker 36fdbed2f0 LibraryOverrides: Initial Test Case.
Added a first test case for review. This will be the base for future test cases.

The current API is sufficient for what is expected for such a low level API.
One concern is that you need to trigger a save in order to update the library overrides
structure. Not expected from TD/Dev point of view.

Test cases are very important when implementing restrictive mode as it is a second evaluation mode that
has impact on the (current) permissive mode.

Reviewed By: Sebastián Barschkis, Bastien Montagne

Differential Revision: https://developer.blender.org/D10747
2021-03-22 11:51:44 +01:00
Bastien Montagne 7a05ebf84b Fix T86405: Always translate when in `en_US` locale too.
The impact of translations on UI performances is neglectable, and this
gives better handling of some odd cases where original language of an
add-on is not English.
2021-03-22 11:50:15 +01:00
Jacques Lucke 2e213003b8 Cleanup: add comment
See rBb9cd2f4531ca670c196b0b14b1359d0f375103c2 for more info.
2021-03-22 11:35:19 +01:00
Nikhil Shringarpurey 414596cd83 Cleanup, LineArt: Fix MSVC compiler warnings.
Currently 3 of the printf lines use the format specifier "%lu" for data
of type size_t instead of "%zu". While this works, this creates compiler
warnings.

This diff fixes those warnings by using the correct format specifier.
Tested using MSVC, but should be correct on any compliant compiler.

Reviewed By: Sebastian Parborg

Differential Revision: http://developer.blender.org/D10761
2021-03-22 11:30:36 +01:00
Jacques Lucke a506f87c90 Clang Tidy: disable modernize-raw-string-literal again
This check does not work when gtests are enabled yet.
See rBb9cd2f4531ca670c196b0b14b1359d0f375103c2 for more details.
2021-03-22 11:26:48 +01:00
Bastien Montagne 82d3b0f927 Fix UI (and code!) typos. 2021-03-22 10:56:25 +01:00
Campbell Barton 14caab7257 Cleanup: check the space type instead of the operators poll function
The poll function may fail for reasons other than the space type,
as this menu is selected based on space-type, check this instead.
2021-03-22 20:12:08 +11:00
Campbell Barton a05cbc9914 RNA: rename recently added line-art properties
- Use `use_` prefix for boolean properties.
- Use `_all` instead of `_everything`,
  following existing conventions and the properties UI text.
- Use `object_instances` instead of old term `dupli` / `duplication`.
- Use `clip_plane` instead of `clipping_boundaries`,
  matching the RegionView3D property naming.
2021-03-22 18:09:19 +11:00
Campbell Barton 958e3a8cc1 RNA: use boolean array for transarency masks
There is no need to expose this as multiple properties,
also use `use_` prefix for boolean properties.
2021-03-22 18:04:12 +11:00
Campbell Barton cb521bd37b Cleanup: spelling, expand on comments 2021-03-22 14:48:36 +11:00
Campbell Barton f051146ae6 Cleanup: clang-format 2021-03-22 14:39:39 +11:00
Campbell Barton dfbaf96753 Revert "Disable clang-format for objective-C bits in GHOST."
This reverts commit 1cb9612d73.

We can now rely on the clang-format version as it's distributed
with pre-compiled binaries.
2021-03-22 14:38:45 +11:00
Campbell Barton e6cf74515f Cleanup: disable clang-format for 'intern/libmv/third_party' headers 2021-03-22 14:35:20 +11:00
Campbell Barton 544b3ab1de Cleanup: clang-format, trailing space
Minor manual tweak to prevent wrapping an array into columns.
2021-03-22 14:25:42 +11:00
Hans Goudey 2a06657eca Cleanup: Don't use class method to override equality operator
This won't make a difference in this case, but it's consider better
practice since there is no vagueness about implicit conversion.
2021-03-21 20:21:05 -04:00
Jacques Lucke 54bbaa26de Cleanup: compile errors on macos 2021-03-21 19:49:29 +01:00
Jacques Lucke 4fe8d0419c Functions: refactor virtual array data structures
When a function is executed for many elements (e.g. per point) it is often the case
that some parameters are different for every element and other parameters are
the same (there are some more less common cases). To simplify writing such
functions one can use a "virtual array". This is a data structure that has a value
for every index, but might not be stored as an actual array internally. Instead, it
might be just a single value or is computed on the fly. There are various tradeoffs
involved when using this data structure which are mentioned in `BLI_virtual_array.hh`.
It is called "virtual", because it uses inheritance and virtual methods.

Furthermore, there is a new virtual vector array data structure, which is an array
of vectors. Both these types have corresponding generic variants, which can be used
when the data type is not known at compile time. This is typically the case when
building a somewhat generic execution system. The function system used these virtual
data structures before, but now they are more versatile.

I've done this refactor in preparation for the attribute processor and other features of
geometry nodes. I moved the typed virtual arrays to blenlib, so that they can be used
independent of the function system.

One open question for me is whether all the generic data structures (and `CPPType`)
should be moved to blenlib as well. They are well isolated and don't really contain
any business logic. That can be done later if necessary.
2021-03-21 19:33:13 +01:00
Pablo Vazquez 68c31c41e5 UI: Title case for Proxy Setup and fix typo 2021-03-21 18:40:38 +01:00
Jacques Lucke 2ddbb2c64f Functions: move CPPType creation related code to separate header
This does not need to be included everywhere, because it is only
needed in very few translation units that actually define CPPType's.
2021-03-21 15:33:30 +01:00
Jacques Lucke 9e437aabdb Cleanup: fix compiling with older compiler on macos
We cannot use `std::variant` yet, because not all of the compilers
we support have a working version of it yet. For now, I just replaced
it with multiple `std::option` which is good enough, because currently
`CellValue` is only used for the cells that are actually drawn in
the spreadsheet.
2021-03-21 14:29:26 +01:00
Campbell Barton dcf1a1045d Cleanup: move some headers from MOD_lineart.h to source files 2021-03-21 14:51:37 +11:00
Campbell Barton b8cc8b30ec Cleanup: redundant headers in 'source/blender/gpencil_modifiers' 2021-03-21 14:30:08 +11:00
Campbell Barton 9c0eb1700e Cleanup: correct variable name mixup in BLI_str_quoted_substrN
Also expand doc-string for `BLI_str_escape_find_quote`
2021-03-21 14:22:14 +11:00
Campbell Barton dfefafa814 Fix uninitialized memory use loading movie sequence strips
When the movie wasn't found, uninitialized values would be used for
the original width/height.

Also use int instead of float as the image size is stored as an int.
2021-03-21 14:12:58 +11:00
Campbell Barton fce3e6646e Fix failure to set transform rotate around single
Regression in 201ab7c540
2021-03-21 14:01:41 +11:00
Campbell Barton 87b6283918 Cleanup: remove redundant NULL checks 2021-03-21 14:00:40 +11:00
Campbell Barton bf13a4d3ff Cleanup: unused return statements 2021-03-21 14:00:40 +11:00
Campbell Barton 6d97f9a5c1 Cleanup: use static local variables 2021-03-21 14:00:40 +11:00
Campbell Barton 4abafa2062 Cleanup: remove window manager headers from MOD_lineart
This was only used to return success, which is currently never checked.
2021-03-21 13:47:05 +11:00
Campbell Barton dcd9945ebe Cleanup: replace 'unsigned char' with 'uchar' 2021-03-21 13:25:31 +11:00
Campbell Barton 31e7bc6869 Cleanup: remove redundant casts 2021-03-21 13:24:42 +11:00
Campbell Barton 6db1fb197c Cleanup: spelling, doxygen comment formatting 2021-03-21 13:18:20 +11:00
Harley Acheson b4e96550ce Fix T86643: Win32 Entering Full Screen While Maximized
SetWindowPos must be called after SetWindowLongPtr in order to see changes to window frame style.

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

Reviewed by Ray Molenkamp
2021-03-20 17:24:06 -07:00
Clément Foucault 9ca67c47a1 Fix T86660 EEVEE: Undefined behaviour in specular_occlusion
Define visibility error to be 1 by default to avoid undefined behaviour.
2021-03-20 22:00:08 +01:00
Howard Trickey 057292e75a Bevel code: add a null pointer check. 2021-03-20 13:03:43 -04:00
Jacques Lucke 90959c2372 Cleanup: quiet warning 2021-03-20 15:54:52 +01:00