Commit Graph

99603 Commits

Author SHA1 Message Date
Sybren A. Stüvel 8057ab10db Cleanup: Clang-Tidy readability-const-return-type fixes
No functional changes.
2020-09-04 12:04:47 +02:00
Sybren A. Stüvel 371ddda4d0 Cleanup: Clang-Tidy readability-redundant-preprocessor fixes
Remove redundantly nested `#if` and `#ifdef` statements.

One nested `#if 0` block was left untouched, as it's in particle code
that's no longer maintained. Furthermore, that block also has some
explanation as to the differences between the enabled & disabled parts.

One nested `#if 0` construct was completely removed, leaving only the
actually used bit of code. There was no explanation as to the usefulness
of the disabled code, and it hasn't been touched in years.

No functional changes.
2020-09-04 11:26:26 +02:00
Philipp Oeser aa4cf47e40 Fix T80273: Restrict option in weight paint doesn't work with gradient
With the 'Restrict' option, the gradient should be restricted to the
assigned vertex, just like the other weight paint tools.

Maniphest Tasks: T80273

Differential Revision: https://developer.blender.org/D8761
2020-09-04 10:30:06 +02:00
Philipp Oeser 2a24b3aaf4 Fix T78084: Search does not accept text fragments everywhere
This was reported for the "Add Node" search functionality, but is
relevant in other searches as well.

So e.g. when searching for "Separate XYZ", typing "sep", then " " (with
the intention to type "X" next) would clear the search field. Now use
the same method (matching against all search words) as in F3 searching
('menu_search_update_fn') in other searches as well [searching IDs,
property objects, finding nodes,...]

This should give a much nicer search experience in general.

Note: this does not touch other searches in the Dopesheet, Outliner,
Filebrowser or User Preferences that have other search implementations.

Maniphest Tasks: T78084

Differential Revision: https://developer.blender.org/D8232
2020-09-04 10:11:45 +02:00
Aaron Carlisle 92b8d7019b UI: Make UV Editor contextual menu more consistent with 3D View
Follow up on rB12716e6b9fc74bd53be39ec7aab16ca8d43f0593

See also: rB62774badeda7d13fd3c6af57c632ff3167a608d7
2020-09-03 22:27:39 -04:00
Aaron Carlisle f9bd3329e6 Docs: Fix typo in creator args formatting
This was pointed out in D8799
2020-09-03 20:41:25 -04:00
Germano Cavalcante a96283ba51 Fix assert when cleaning constraints in the transform tool
When enabled, the modal key item "Clear Constraint" did not reset
the default orientation.

This does not bring changes in the user's point of view.
2020-09-03 17:57:58 -03:00
Germano Cavalcante ff3a9852a7 Cleanup: Shorten the name of the Auto Constraint modal keymap
It was taking up too much space in the status bar.
2020-09-03 17:57:42 -03:00
Hans Goudey 953a031f15 UI: Fix use after free for instanced panel expansion
The "set_expand_from_list_data" function has to be called after updating
the panels' custom data pointers. Otherwise the wrong information is
retrieved in the best base and it will cause a crash in the worst case.
2020-09-03 14:33:44 -05:00
Julian Eisel 88b6dd1392 Fix missing cursor changes with "Lock Object Modes" disabled
Changing the active object would change the mode, but the necessary
toolsystem update to change the cursor was not run.

Steps to recreate were:
* Duplicate default cube
* Enter sculpt mode with one of the cubes
* Disable Edit > Lock Object Modes
* Select back-and-forth between the objects

Same would happen with other modes.
2020-09-03 21:04:17 +02:00
Ray Molenkamp c7b00ef625 MSVC: Fix cmake warnings with MSVC updates
CMake caches the location of the CRT runtime in the
MSVC_REDIST_DIR variable, and uses it to copy the required
dll's during the install phase.

This variable is only initialized when it does not exist.
Leading to issues when compiler updates are installed and
the compiler version slightly changes, cmake still looks
in the old location for the runtime and warns about the
files not existing.

This change fixes the issue by checking if the redist dir
exists and if not unsets it so InstallRequiredSystemLibraries
can have another go at figuring out where they live.
2020-09-03 12:39:49 -06:00
Antonio Vazquez 19fff96ef5 Fix T80289: GPencil Opacity modifier not working
This error was introduced in the refactor of the modifier panels.
2020-09-03 20:17:09 +02:00
Julian Eisel 6d39fd94b4 Fix copy/paste error in Grease Pencil Draw operator tooltip
Also remove capitalization of the term "object".
2020-09-03 19:36:52 +02:00
OmarSquircleArt 340cbc7f15 Fix T79803: Wrong Distance To Edge 1D Voronoi
The current 1D Voronoi implementation for the Distance to Edge option
computes the distance to the cells instead. This patch fixes that and
compute the distance to the edge.

Reviewed By: JacquesLucke, brecht

Differential Revision: https://developer.blender.org/D8634
2020-09-03 18:56:27 +02:00
Julian Eisel d2c52d4de2 Cleanup: Add/use function to disable buttons with a disabled hint
We do this in a couple of places, so it's worth having the logic wrapped
into a function.
Also, the only way to set the disabled hint for a button from outside of
`interface/` was through `UI_block_lock_set()`/`UI_block_lock_clear()`,
for which the usage isn't obvious when you just try to disable a single
button.
2020-09-03 17:46:23 +02:00
Germano Cavalcante d8a80e5949 Revert "Fix T59358: Wrong status bar keymap for release confirms and right click select."
This reverts commit 17905e89a7.
Fix T80429: Transform Tools cannot be cancelled

rB17905e89 better filtered the key items that should appear in the
status bar.

But it is very restrictive since canceling is still possible in other
cases.


# Conflicts:
#	source/blender/editors/transform/transform.c
2020-09-03 12:33:44 -03:00
Pablo Dobarro afb43b881c Sculpt: Face Set Extract Operator
This implements a Face Set Extract operator, which is similar to mask
extract. This operator uses a picker to select and Face Set in the mesh
and extract the geometry directly to a new object.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D8599
2020-09-03 17:26:12 +02:00
Hans Goudey c8e5924cbb UI: Expose important settings from file browser popovers
We have established a convention of exposing the most important
settings from popovers, then aligning a popover to control more
detailed settings.

The file browser has powerful display / filtering settings, but
they're hidden in popovers at the moment, so it's sometimes a pain
to use them. The "display as" options are now exposed to the left of
the display settings popover, and the "filter" toggle is exposed to
the left of the filter settings popover. This convention is familiar
and intuitive for users and makes interaction faster.

Note that the "show hidden" item in the filter popover still has an
effect if filtering is disabled.

This commit also:
 - Removes the icons in the "Sort By" enum
 - Uses property split for the "Sort By" enum
 - Very slightly increases the default width of the file browser
   window to make room for the new buttons.

Differential Revision: https://developer.blender.org/D8719
2020-09-03 10:02:09 -05:00
Pablo Dobarro eb82b3947e Sculpt: Remove unused code in Clay Strips
This was doing a matrix inversion per vertex per stroke step and it was
unused.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D8791
2020-09-03 16:47:18 +02:00
Pablo Dobarro 38737f780a Fix cloth brush not working with anchored stroke
All brushes except for grab need delta for tip orientation in order to
work with anchored stroke, not only snake hook, which is the one that
needs it always.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D8789
2020-09-03 16:46:36 +02:00
Pablo Dobarro c05715b03f Sculpt: Sculpt Face Set gestures tools
This implements the sculpt gesture lasso and box operators for face
sets. They work the same way as the mask gesture operator and tools.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D8716
2020-09-03 16:44:40 +02:00
Jacques Lucke 10d61f34bb Fix clang tidy errors in tests 2020-09-03 16:26:45 +02:00
Jacques Lucke 519b2f937f BLI: add index_range method for StringRef 2020-09-03 16:26:45 +02:00
Brecht Van Lommel e7d3d0219b Fix T79718: Eevee OpenVDB render error when frames miss part of the grids
Improved fix that handles the distinct cases of missing grids and zero
size grids.
2020-09-03 16:12:30 +02:00
Brecht Van Lommel f0c376a52a Fix T80332: principle volume shader not working for world in Eevee
The handling of missing volume grids for the principled volume shader was
incomplete, different inputs need different default values.
2020-09-03 15:49:41 +02:00
Yevgeny Makarov 96439de784 UI: Reduce limits for the text size theme options
It was possible to increase the text size quite a lot, making text much
bigger than their containing widgets. These new limits makes the maximum
size of text be closer to the widget size.
Note that there needs to be some extra "wiggle room" since fonts may
have quite different glyph sizes. So you can still set the font size to
be slightly bigger than the widgets.

Addresses T80175 and T79059.
2020-09-03 15:42:44 +02:00
Philipp Oeser f00cb93dbe Fix T63125: Gpencil: bones cannot be selected in weightpaint mode
Some underlying functionality was not ready for greasepencil:
- BKE_modifiers_get_virtual_modifierlist (now introduce dedicated BKE_gpencil_modifiers_get_virtual_modifierlist)
- BKE_modifiers_is_deformed_by_armature
- checks in drawing code
- checks in (pose) selection code

A couple of changes to make this work:
- `eGpencilModifierType_Armature` has to be respected (not only `eModifierType_Armature`)
- `OB_MODE_WEIGHT_GPENCIL` has to be respected (not only `OB_MODE_WEIGHT_PAINT`) --  (now use new `OB_MODE_ALL_WEIGHT_PAINT`)
- `gpencil_weightmode_toggle_exec` now shares functionality from `wpaint_mode_toggle_exec` -- moved to new `ED_object_posemode_set_for_weight_paint`

This patch will also set the context member "weight_paint_object" for greasepencil (otherwise some appropriate pose operators wont work when in weightpaint mode)

Reviewed By: campbellbarton

Maniphest Tasks: T63125

Differential Revision: https://developer.blender.org/D8483
2020-09-03 15:01:50 +02:00
Campbell Barton a505a85873 Fix 3D text cursor alignment without any text
Part of fix for T80340.
2020-09-03 21:20:56 +10:00
Philipp Oeser 930021129a Quick effects: avoid error in builds without OpenVDB
Differential Revision: https://developer.blender.org/D8626
2020-09-03 12:56:27 +02:00
Philipp Oeser a04ac5b52d Fix T80391: Overrides: wrong check in constraint poll
Condition was flipped, would allow actions on constraints coming from
library, but prevented actions on local constraints.

Mistake in rBS0b49fdd0ee0.

Maniphest Tasks: T80391

Differential Revision: https://developer.blender.org/D8793
2020-09-03 12:47:54 +02:00
Campbell Barton 09f966ad16 Fix mistake in recent font cleanup
7ff7a9c8fd missed incrementing the pointer used for initializing.
2020-09-03 20:14:55 +10:00
Stefan Werner c8b84a13a5 Make deps: Disabled assembly for GMP on Apple/arm64.
This appears to be a configuration for which GMP has no assembly,
yet the default configure script tries to build it.
2020-09-03 10:11:59 +02:00
Campbell Barton 3cbfe96681 Object: add BKE_object_obdata_to_type utility function
Move functionality to get the object type from an ID
into it's own function.
2020-09-03 16:27:15 +10:00
Campbell Barton c017e1cb67 Fix T80409: Walk rotation speed depends on view size
Use a fixed speed for rotating the view in walk mode,
Keep the current behavior for tablet input and fly mode.
2020-09-03 14:31:26 +10:00
Campbell Barton fc6b0c6f85 Fix crash running remesh modifier without OpenVDB 2020-09-03 13:32:53 +10:00
Campbell Barton 2820f7be76 Fix T80340: Crash with an empty text with Text on Curve
Avoid divide by zero, based on D8780 by @lichtwerk.
2020-09-03 13:28:01 +10:00
Campbell Barton 7ff7a9c8fd Cleanup: remove redundant Y bounds calculation for text on path
Also correct some comments.
2020-09-03 12:28:22 +10:00
Campbell Barton 99c3ac17f2 Modifiers: default to exact boolean method ignoring build options
This change doesn't impact release builds,
in general avoid having defaults depend on build options
since it means files from different builds won't match.
2020-09-03 10:07:39 +10:00
Campbell Barton 14e2596d21 UI: pixel align axis navigation characters to resolve blurry text
Also increase text size from 11 to 12 since the default
font at 1.0 scale was a little fuzzy too.

Reviewed by: @pablovazquez

Ref D8781
2020-09-03 09:33:31 +10:00
Pablo Dobarro 89cdf4f75d Fix Cloth Snake Hook brush not using pressure
The Snake Hook deformation mode was using the same strength as grab (not
supporting pressure), but this deformation mode supports pressure.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D8724
2020-09-02 22:33:24 +02:00
Pablo Dobarro fb09bc3c35 Fix T80311: Sculpt Filters not working when using vertical split
All filters were using prevclicx, which is in screen coordinates and
mval[0], which is in region coordinates to get the filter strength.

This fixes the issue in all filters.

Reviewed By: Severin

Maniphest Tasks: T80311

Differential Revision: https://developer.blender.org/D8776
2020-09-02 22:30:59 +02:00
Hans Goudey ba4a2a4c8b UI: Use instanced panel custom data instead of list index
For modifier shortcuts we added a "custom_data" field to panels.
This commit uses the same system for accessing the list data that
corresponds to each panel. This way the context is only used once
and the modifier for each panel can be accessed more easily later.

This ends up being mostly a cleanup commit with a few small changes
in interface_panel.c. The large changes in the UI functions are due
to the fact that the panel custom data is now passed around as a
single pointer instead of being created again for every panel.

The list_index variable in Panel.runtime is removed as it's now
unnecessary.

Differential Revision: https://developer.blender.org/D8559
2020-09-02 14:13:26 -05:00
Sebastian Parborg ff7d742350 Quiet all warnings when building Bullet 2020-09-02 21:06:02 +02:00
Sebastian Parborg 4446c3a593 Sync Bullet to upstream
This syncs Bullet to the latest upstream git version as of writing this.
(commit 47b0259b9700455022b5cf79b651cc1dc71dd59e).
2020-09-02 20:41:30 +02:00
Sebastian Parborg 6f6f6ee186 Fix missing "extern_bullet" library when building rigidbodies 2020-09-02 19:44:29 +02:00
Jacques Lucke f5e55c3337 Cleanup: use bool instead of int in various places 2020-09-02 19:10:40 +02:00
Sebastian Parborg f20f82ce3e Fix segfaults when deleting objects with upstream bullet lib
Blender tried to free objects twice from the bullet world sometime.

First we would implicity remove all objects when recreating the bullet
world and then explicity try to remove them again from the now empty
world.

This would wouldn't crash older bullet versions, but the recent versions
will as we will try to free objects that no longer exists in the bullet
world.

Also clear the cache on deletion as the object order changes.
Fix T77181: The cache clearing will fix this issue.
2020-09-02 18:35:16 +02:00
Jacques Lucke 9b1f726248 Cleanup: general cleanup of node.c
- reduce variable scope
- use bool instead of int
- use LISTBASE_FOREACH
2020-09-02 18:28:17 +02:00
Hans Goudey a8cf9d2f80 UI: Use property split layout for add torus operator
Continuing the work from D8326, this commit adds a property split
layout to the add torus operator. It also puts the properties common
to all object add operators at the bottom for consistency.

Differential Revision: https://developer.blender.org/D8748
2020-09-02 10:34:44 -05:00
Julian Eisel 4330f147d0 Fix unused variable warning on Windows with WITH_INPUT_IME disabled 2020-09-02 17:32:58 +02:00