Commit Graph

81793 Commits

Author SHA1 Message Date
Campbell Barton 5f1a155a5e Fix T83117: Curve bevel not handle aligned at end-points
Caused by fix for T80742, 4987b7d347.

Keep the fix that calculates the start/end direction
from adjacent points but only use it as a fallback.
2020-12-08 12:20:27 +11:00
Yevgeny Makarov ab9952e55f Spelling: Bit Depth Compound Modifiers
Correct usage of compound modifiers like '32-bit'.

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

Reviewed by Julian Eisel
2020-12-07 14:51:06 -08:00
Yevgeny Makarov 41e236c527 UI: Correct Usage of 'Eevee' Name
Use accepted capitalization of Eevee, not 'EEVEE'.

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

Reviewed by Julian Eisel
2020-12-07 13:46:01 -08:00
Germano Cavalcante c822f66bb8 Fix T83307: Some modal keys of transform operators don't correspond to the expected effect
The transform modes `shrinkfatten` and `seq_slide` have a special way of
handling events.

They use modal events in a different way than expected.

Therefore, this commit adds special event handles for these modes and
removes the keymodal tips from the status bar.

These effects are already described in the header anyway.
2020-12-07 17:36:23 -03:00
Antonio Vazquez 29fb12da58 Fix T83510: Convert Gpencil to curve crash when stroke has zero points
If the stroke had zero points the pointer returned NULL.

Also replaced for loop by FOREACH macro.

This is a corner case of "empty" strokes without points.
2020-12-07 19:08:29 +01:00
Hans Goudey 3e005a3214 Cleanup: Use LISTBASE_FOREACH in node transform code
Also decrease variable scope.
2020-12-07 11:11:03 -06:00
Pablo Dobarro a61febe739 Add comment to clarify the use of mesh::symmetry
Reviewed By: sybren

Differential Revision: https://developer.blender.org/D9776
2020-12-07 17:17:56 +01:00
Brecht Van Lommel 4f25e168a2 Fix DPX image output having invalid float metadata
Casting 0xFFFFFFFF to float does not give NaN as is needed here. Found through
compiler warning which is now fixed.
2020-12-07 17:09:34 +01:00
Sybren A. Stüvel fb82cfb539 Animation: Show Channel Group Colors is now off by default
Change the default for the Show Channel Group Colors preference to OFF.

This option in the user preferences was introduced in rBad85256e7108. It
moved a per-file-per-editor option to the user preferences. As this
option would be frequently turned off by animators, this would now have
to happen only once. This commit takes this one step further, and turns
it off by default, as it can cause major readability issues of the
animation channel list.
2020-12-07 16:58:39 +01:00
Bastien Montagne bab57550b6 LibOverride: Abstract a bit handling of local items of RNA collections.
RNA collections that support insertion of new items in liboverride
data-block need a special way to distiguish between locale and
orig-from-linked items (since some operations are allowed on the forer,
but no the latter).

In future we want a proper solution to abstract that at the
`BKE_lib_override` level, but for now we need to add some code for each
case.

Note that this commit also fixes a few potential issues with GPencil
modifiers, and constraints, regarding their handling of local overrides.
2020-12-07 16:55:51 +01:00
Bastien Montagne 513578b182 Fix (unreported) LibOverride: GPencil local Modifiers not fully editable.
Missing case in `RNA_property_overridable_get`
2020-12-07 16:55:51 +01:00
Sybren A. Stüvel c51a70537b Fix T81745: Auto Weights fails with Mirror mod + Vertex Groups X
Fix the Assign Automatic Weights operator in weight paint mode when the
Vertex Groups X option is enabled. This issue was probably introduced in
rB5502517c3c12 where `me->editflag & ME_EDIT_MIRROR_X` was replaced by
either `me->editflag & ME_EDIT_VERTEX_GROUPS_X_SYMMETRY` or
`me->symmetry & ME_SYMMETRY_X`. In this case, the former wasn't working,
so I replaced it with the latter.
2020-12-07 16:30:14 +01:00
Julian Eisel 2e221de4ce UI Code Quality: Start refactoring Outliner tree-element building (using C++)
Continuation of the work started with 249e4df110. After all display modes
were ported to this new design, this commit starts the (more complex) work on
the individual tree-element types. More concretely it ports animation
tree-elements (action data-blocks, drivers and NLA data).

The commit above explains motivations. In short, we need a better design that's
easier to reason about and better testable.

Changes done here are pretty straight forward and introduce similar class
hierarchy and building patterns as introduced for the display modes already.
I.e. an abstract base class, `AbstractTreeElement` with derived classes for the
concrete types, and a C-API with a switch to create the needed objects from a
type enum. The latter should be replacable with something nicer later on (RAII
based, and type-safer through meta-programming).
Each tree-element type has its own class, with an own header and source file
(okay some closely related types can share a header and source file, like the
NLA ones).

I added some further temporary bits for the transition to the new design, such
as the `TreeElement.type`. It should entirely replace `TreeElement` eventually,
just as `outliner_add_element()` should be quite small by then and easily
replacable by a `TreeBuilder` helper.
2020-12-07 14:51:15 +01:00
Julian Eisel 634b10acbb Fix missing type check for Outliner eyedropper query
Mistake in 35a5dee2ef.

Code would simply assume that the element under the cursor is an Object if it
was an ID (but not a collection).

This wouldn't cause any issues in current code, since the only other ID that
set the direct-data were collections, which are special in that they don't have
a `TreeStoreElem.type` of 0, which is already being checked for here. And if
there was no direct-data set, the object lookup in the View-Layer would
correctly fail too.
2020-12-07 14:35:54 +01:00
Julian Eisel 95734e32bf Cleanup: Avoid setting (unsafe) Outliner tree element data that won't be used
I carefully checked and am quite sure for `TSE_ANIMATION_DATA` and
`TSE_NLA_ACTION` the direct-data isn't used at all. This data is stored and
accessed in unsafe ways based on conventions anyway (`void *`). We should aim
for a safer design but it will be difficult to get there. Any removed
complexity will help.
2020-12-07 14:35:54 +01:00
Julian Eisel 0c0bc61918 Fix access to invalid data in Outliner tree building
Non-ID tree-elements would cast their data pointer to `ID *` and take the name
and ID-Code from there. The name would actually be overridden a few lines
later, so that didn't cause issues. But the ID-Code stored inside the tree
element kept an undefined value. In practice that probably didn't cause many
issues either, since it's just an undefined value that was very unlikely to
take a valid 16-bit ID-code value, meaning ID-Code checks would simply fail as
they should. Further there typically are other checks to see if the element
actually represents an ID.
However, in theory this may have caused a few random crashes or
data-corruptions.
2020-12-07 14:35:54 +01:00
Sybren A. Stüvel d329a6a937 Fix bug in cleanup commit
Fix a copy-paste error in rB11c4066159e
2020-12-07 12:54:46 +01:00
Sybren A. Stüvel 11c4066159 Cleanup: partial Clang-Tidy modernize-loop-convert
Modernize loops by using the `for(type variable : container)` syntax.

Some loops were trivial to fix, whereas others required more attention
to avoid semantic changes. I couldn't address all old-style loops, so
this commit doesn't enable the `modernize-loop-convert` rule.

Although Clang-Tidy's auto-fixer prefers to use `auto` for the loop
variable declaration, I made as many declarations as possible explicit.
To me this increases local readability, as you don't need to fully
understand the container in order to understand the loop variable type.

No functional changes.
2020-12-07 12:41:17 +01:00
Bastien Montagne 2072134faa UI: Fix mistakes in UI messages. 2020-12-07 10:57:27 +01:00
Jeroen Bakker 9ac6ef7036 File Subversion Bump: 2.92.5 2020-12-07 08:07:18 +01:00
Greg Neumiller 3d0b65f89b Fix T83296: Unknown actions no longer perform an undo push
str_len_clip is initialized to 0, so when "Unknown Action"
occurs, set str_len_clip appropriately.
Regression in 0688309988

Ref D9759
2020-12-07 13:44:23 +11:00
Greg Neumiller c2a01a6c11 Fix T83347: Smart UV project crashes with wire edges
Missing NULL check.
Regression in 9296ba8674

Ref D9757
2020-12-07 13:44:17 +11:00
Campbell Barton fff0032a25 Cleanup: spelling 2020-12-07 13:25:53 +11:00
Campbell Barton 5c3fa5a424 Cleanup: correct enum type 2020-12-07 13:25:49 +11:00
Antonio Vazquez ba740ad2ab GPencil: Enable Layer Onion Skin by default 2020-12-06 22:27:28 +01:00
Yevgeny Makarov ee70eb96cf UI: Alert Dialog Helper Function
Shared helper function to create a split layout with an alert icon for popup dialogs.

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

Reviewed by Julian Eisel
2020-12-06 11:17:51 -08:00
Yevgeny Makarov 79eeabafb3 UI: 'About Blender' with Full Logo
New layout for the 'About' dialog featuring the full version of the Blender logo.

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

Reviewed by Hans Goudey
2020-12-06 10:29:26 -08:00
Howard Trickey a90504303e Reorder fields in boolean's ITT_value to save memory. 2020-12-06 10:58:14 -05:00
Julian Eisel 52a6c4f34d Fix crashes with invisible Outliners on fullscreen or window closing
I didn't actually confirm this is caused by invisible Outliners. But I'm pretty
sure the error happens with Outliners that aren't initialized (so were open in
an area before, but another editor is active there currently).
In that case, the runtime data may not be set yet and that is fine.

Fixes T83420.
2020-12-05 14:56:13 +01:00
Antonio Vazquez 237f9da4a0 Fix T83400: GPencil onion skin not visible when Edit Lines is enabled
The Edit Lines flag was not checking if Onion was enabled. In 2D template this is disabled by default, but default template has enabled it.
2020-12-05 13:55:10 +01:00
Howard Trickey 8982a315b7 Add more timing hooks for boolean. 2020-12-05 07:48:41 -05:00
Nathan Craddock 887a602448 Cleanup: Finish porting outliner tree building to C++
No functional changes. This is a few minor cleanups to the remaining C
code for building the outliner tree after parts have been moved to C++.

Differential Revision: https://developer.blender.org/D9741
2020-12-04 17:58:46 -07:00
Nathan Craddock 48acf15f98 Cleanup: Outliner Data API display mode
No functional changes. Moves the data API display building code to C++.

Differential Revision: https://developer.blender.org/D9741
2020-12-04 17:54:19 -07:00
Nathan Craddock aaa02984d3 Cleanup: Outliner scenes display mode
No functional changes. The scene display building code has been moved
to C++.

Differential Revision: https://developer.blender.org/D9741
2020-12-04 17:53:42 -07:00
Nathan Craddock 1db40c29e5 Cleanup: Outliner orphan data display mode
No functional changes. Code is ported to C++ with additional cleanups to
the logic and variable names.

Differential Revision: https://developer.blender.org/D9741
2020-12-04 17:51:51 -07:00
Nathan Craddock 1cc0a59be6 Cleanup: Outliner video sequencer display mode
No functional changes. Code is ported to C++. Variable names and logic
are also improved.

Differential Revision: https://developer.blender.org/D9741
2020-12-04 17:50:46 -07:00
Hans Goudey ea37e4ea5a Fix incorrect variable name after last commit 2020-12-04 14:46:51 -06:00
Hans Goudey 67faa85fb0 Cleanup: Use LISTBASE_FOREACH macro in windowmanager intern
Also decrease the scope of variables related to the loops.
2020-12-04 13:50:53 -06:00
Julian Eisel 3daf28388b Cleanup: Move Outliner runtime hash into internal runtime struct, out of DNA
This way Outliner internal data stays internal, non-Outliner code will not be
able to access and mess with this. Further it allows us to use the real type
(rather than `void *`), change the type to a C++ container if needed and
slightly reduces the size for every Outliner stored in files.

Slightly changed how we set the `SO_TREESTORE_REBUILD` for this, but it should
effectively behave the same way as before.
2020-12-04 20:00:45 +01:00
Bastien Montagne 1d2c70d761 Fix API doc generation.
BMesh auto-extracting API info does not support comments inside BMesh
operators parameters definition.
2020-12-04 16:45:10 +01:00
Germano Cavalcante d07009498a Transform: Don't use Automatic Constraint Plane in 2D editors
Technically it shouldn't have any effect on these editors.

The key tips in the header can be misleading.

The effect it previously had was not intended.
2020-12-04 12:31:30 -03:00
Germano Cavalcante b919511607 Cleanup: Deduplicate constraint event code 2020-12-04 12:31:30 -03:00
Hans Goudey 04d3b54000 Cleanup: Declare variables where initialized 2020-12-04 08:03:14 -06:00
Hans Goudey 4bb5314754 Cleanup: Use typedef for button string info type
Before, it wasn't clear what the int in `uiStringInfo` was supposed to
store. Using a typedef can make this someone more explicit.
2020-12-04 08:01:54 -06:00
Germano Cavalcante 6fda30cc54 Fix T83177: Industry Compatible keymap: MMB-dragging to transform engages axis-constraining on release
With rBc0677b662f4b, we try to track all modal events in order to detect the
one corresponding to the release.

But modifier keys can mask the modal event and thus confirm realease ends up
being skipped.

This resulted in the T83387.

With this commit we now read the actual key drop value in the modal event.

This fixes T83387
2020-12-04 10:49:58 -03:00
Germano Cavalcante 2de49d1ff7 Revert "Fix T83177: Industry Compatible keymap: MMB-dragging to transform engages axis-constraining on release"
This reverts commit c0677b662f.
2020-12-04 10:49:58 -03:00
Sybren A. Stüvel 7f2d356a67 Cleanup: Clang-Tidy, modernize-use-using
Replace `typedef` with `using` in C++ code.

In the case of `typedef struct SomeName { ... } SomeName;` I removed the
`typedef` altogether, as this is unnecessary in C++. Such cases have been
rewritten to `struct SomeName { ... };`

No functional changes.
2020-12-04 12:46:43 +01:00
Sybren A. Stüvel 168909d974 Cleanup: Clang-Tidy, modernize-use-override
No functional changes.
2020-12-04 12:02:52 +01:00
Sybren A. Stüvel 1166110a9d Cleanup: clang-format
Rerun `make format`.

No functional changes.
2020-12-04 11:28:56 +01:00
Sybren A. Stüvel 958df2ed1b Cleanup: Clang-Tidy, modernize-deprecated-headers
No functional changes.
2020-12-04 11:28:09 +01:00