Commit Graph

101491 Commits

Author SHA1 Message Date
Sergey Sharybin 3b77c670f0 Clang Tidy: Expand modernize category
Gives an idea of which warnings are affecting Blender code base.
2020-11-06 12:16:02 +01:00
Sebastián Barschkis 311031ecd0 Cleanup: Use nullptr everywhere in fluid code
Switched from NULL to nullptr.
2020-11-06 12:06:05 +01:00
Philipp Oeser 37b155420b Merge branch 'blender-v2.91-release' into master 2020-11-06 12:00:50 +01:00
Julian Eisel 390a0d5624 Fix T82387: Crash loading file saved with recent master in old versions
This fix makes sure new files save `wmWindow.global_areas` under a different
name, so old Blender versions don't recognize and 0-initialize it.

Since enabling global area writing (ef4aa42ea4), loading a file in old
Blender versions would cause `wmWindow.global_areas` to be read, because there
was already reading code for it and `ScrAreaMap` was in SDNA.
However the `ScrArea.global` of the global areas would be NULL, because it was
*not* in SDNA (`ScrGlobalAreaData` was excluded).
Now, issue is that the code assumes that areas in the global area-map have a
valid ScrArea.global pointer.

Think this was a mistake in rB5f6c45498c92. We should have cleared all this data
on reading, until the global area writing was enabled.

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

Reviewed by: Brecht Van Lommel
2020-11-06 11:58:06 +01:00
Philipp Oeser e6739ed91d Fix T82407: Negative number input gives syntax error for velocities and
accelerations

Caused by rB45dbc38a8b15.

Above commit would place parentheses surrounding a block until the next
operator was found.
For velocities and accelerations though, the '/' in 'm/s' or 'ft/s'
should not be considered an operator.

Maniphest Tasks: T82407

Differential Revision: https://developer.blender.org/D9467
2020-11-06 11:56:57 +01:00
Sergey Sharybin 190170d4cc Cleanup: Clang-Tidy, readability-redundant-member-init 2020-11-06 11:54:53 +01:00
Philipp Oeser dae004557a Merge branch 'blender-v2.91-release' into master 2020-11-06 10:45:39 +01:00
Philipp Oeser 28e703b0a1 Fix Outliner editbone selection with 'Sync Selection'
When editbones were selected from the Outliner (and they were connected
to a parent) with the 'Sync Selection' option turned ON, they could not
get duplicated.

For duplication to work, the (connected) parent bone's tip also has to
be selected [which was not the case when selection is done from the
Outliner under above circumstances]. The reason being that
armature_duplicate_selected_exec ->
ED_armature_edit_sync_selection clears the BONE_ROOTSEL flag if the
parent bone's BONE_TIPSEL is not set.

Caused by rB71eb65328078 btw.

The correct "parent-tip-selection" would actually happen in activation
- `tree_element_active_ebone`
-- `tree_element_active_ebone__sel`
but for 'Sync Selection' this happens [also] in
- `outliner_sync_selection_from_outliner`
-- `outliner_select_sync_to_edit_bone`
which did not do the "flushing" to the parent bone's tip

Now use existing dedicated function for this.

ref. T82347

Reviewers: Zachman

Differential Revision: https://developer.blender.org/D9470
2020-11-06 10:42:14 +01:00
Sergey Sharybin 0573f86587 Cleanup: Clang-Tidy warnings 2020-11-06 09:54:02 +01:00
Jeroen Bakker 9c34391e0c Fix compilation error in GHOST
ELEM macro isn't available in GHOST library.
2020-11-06 08:23:13 +01:00
Ankit Meel 84bbdfb8af Cleanup: Fix the order of info_cfg_option. 2020-11-06 12:46:58 +05:30
Aaron Carlisle ec9241cd59 Cleanup: add missing doxygen group 2020-11-06 01:46:50 -05:00
Aaron Carlisle df4935b29b Cleanup: Fix wrong doxygen groups
Was missed in rB9b6088cb9da4df1a893361997fc1a22986bf6f2e
2020-11-06 01:46:50 -05:00
Campbell Barton 9762a0992b CMake: configue_file() to pass strings for build-info
Using configue_file(..) would have avoided the breakage from
1daa3c3f0a, caused by buildinfo not properly escaping quotes.

Rely on CMake to escaping strings instead using configure_file().
2020-11-06 17:26:29 +11:00
Aaron Carlisle 9a7da1242d Fix uninitialized value
Own mistake in rB74188e65028d268af887ab2140e4253087410c1e
2020-11-06 01:10:51 -05:00
Campbell Barton d9e7a42640 Cleanup: use 'BKE_' prefix for initialization functions 2020-11-06 16:43:09 +11:00
Campbell Barton 3c097af51f Cleanup: use doxy sections for node_group.c 2020-11-06 16:25:09 +11:00
Campbell Barton 2f58535b78 Cleanup: use if/else check for property poll 2020-11-06 16:02:42 +11:00
Campbell Barton f38ad4c66b Cleanup: replace STREQLEN with STRPREFIX for constant strings 2020-11-06 15:56:03 +11:00
Campbell Barton 2d803d3f6d Cleanup: use STR_ELEM macro 2020-11-06 15:42:03 +11:00
Hans Goudey 4f140ec7cc Cleanup: Use LISTBASE_FOREACH macro 2020-11-05 22:39:30 -06:00
Hans Goudey 06c030eaa4 Cleanup: Use descriptive variable names 2020-11-05 22:33:01 -06:00
Campbell Barton a51455918c Cleanup: de-duplicate code for instancing objects when linking
Ref D8843
2020-11-06 15:00:07 +11:00
Campbell Barton 605425c006 Cleanup: doxygen comments 2020-11-06 14:35:38 +11:00
Campbell Barton eed6bf22a4 Cleanup: doxygen comments in ghost
Use colon after parameters, use hash to reference symbols.
2020-11-06 14:25:44 +11:00
Campbell Barton f11f7ce08e Cleanup: use ELEM macro (>2 args) 2020-11-06 12:54:19 +11:00
Campbell Barton d89fedf266 Cleanup: clang-format
Missed this last commit.
2020-11-06 12:46:17 +11:00
Campbell Barton aa3a4973a3 Cleanup: use ELEM macro 2020-11-06 12:32:54 +11:00
Campbell Barton 7cb20d841d Cleanup: follow our code style for float literals 2020-11-06 12:32:54 +11:00
Campbell Barton 4a78a2774b Cleanup: use bool argument in BLI_noise 2020-11-06 12:32:54 +11:00
Campbell Barton 29401f8ca2 Cleanup: BLI_noise
Use common prefix as this collided with existing API's (eg BLI_voronoi).

Also expand some non-obvious abbreviations:

- 'g'  -> 'generic'
- 'vl' -> 'variable_lacunarity'
- 'V'  -> 'v3'
2020-11-06 12:32:54 +11:00
Campbell Barton 155f42a12f Cleanup: remove unused BLI_turbulence1
A slightly modified version of BLI_turbulence1, unused for years.
2020-11-06 12:32:54 +11:00
Campbell Barton 548b351647 Cleanup: use snake case for BLI_args API 2020-11-06 12:32:54 +11:00
Campbell Barton c8f2ad0ab9 Cleanup: remove unused BLI_argsArgv 2020-11-06 12:32:54 +11:00
Campbell Barton 2bd8f7e059 Cleanup: use string APPEND/PREPEND
Replace 'set' with 'string(APPEND/PREPEND ...)'.
This avoids duplicating the variable name.
2020-11-06 12:32:54 +11:00
Campbell Barton 7160682b0d Cleanup: transform.h comments, use doxy sections 2020-11-06 12:32:54 +11:00
Campbell Barton 262eeb3e95 Cleanup: sort structs, files 2020-11-06 12:32:54 +11:00
Campbell Barton c19e4b706e Cleanup: clang-format 2020-11-06 12:32:54 +11:00
Campbell Barton 73ea68d0ca Cleanup: unused variable 2020-11-06 12:32:53 +11:00
Yevgeny Makarov c99c02d3ba UI: Tweaks to the Warning Icon
Warning Sign Alert Icon given a more rounded border.

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

Reviewed by Pablo Vazquez
2020-11-05 16:11:59 -08:00
Pablo Dobarro 1682a47876 Merge branch 'blender-v2.91-release' 2020-11-05 23:42:11 +01:00
Pablo Dobarro 02677ec4e0 Fix T81915: Draw Face Sets not working with deformed sculpt mesh
The draw face sets brush uses the poly center when used in meshes to increase
its precision when working in low poly geometry. For this to work with deformed
meshes, the deformed coordinates from the PBVH should be used instead.

Reviewed By: sergey

Maniphest Tasks: T81915

Differential Revision: https://developer.blender.org/D9424
2020-11-05 23:40:30 +01:00
Pablo Dobarro e041d0fc02 Fix memory leaks in sculpt mode trimming tools
BKE_mesh_free() seems to not free the meshes correctly, so using BKE_id_free() instead.
The looptri array was also not freed.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D9426
2020-11-05 23:31:58 +01:00
Pablo Dobarro 057f9caac6 Fix T82400: Dyntopo detail size edit operator visual glitch
Just a missing immUnbindProgram

Reviewed By: sergey

Maniphest Tasks: T82400

Differential Revision: https://developer.blender.org/D9459
2020-11-05 23:28:16 +01:00
Pablo Dobarro e2b3681f09 Fix Dyntopo detail size preview orientation not matching the cursor
Used the sampled cursor normal when available instead of the raycast face normal.
This makes the preview match the previous orientation of the cursor.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D9460
2020-11-05 23:26:18 +01:00
Hans Goudey 00374fbde2 Move "Camera Parent Lock" from preferences to Object Relations
"Camera Parent Lock" can be useful when rigging cameras, but it is not
intuitive, and has also generated a lot of confusion (bug reports).
This is because it breaks the fundamental parent <-> child relationship
conventions in Blender, and there is no indication that it's intended
without diving into the preferences.

This commit moves the setting to the object level, and exposes it in
the relations panel in the property editor. It is exposed for every
object type because any object type can be "View Locked" in the 3D view.
The property description is also updated to reflect this change and be
more specific without getting too long.

In the future this could become a more general feature of the transform
system, but for now it is limited to "Lock Camera to View".

Differential Revision: https://developer.blender.org/D9239
2020-11-05 16:08:00 -06:00
Robert Guetzkow ad481bdd35 Fix T82423: Add modifier key back into keymap
Commit rBf5080c82dd915db6c7b9dd68a52aaaccf2600137
accidentally remove the Shift modifier key from
the `AUTOCONSTRAINPLANE` shortcut.

Differential Revision: https://developer.blender.org/D9480
2020-11-05 23:03:41 +01:00
Germano Cavalcante 1b9d9cb1ed Fix T82164: Knife tool draws huge vertices after using bgl.glPointSize
Since it is possible to have multiple draw callbacks, (some of which
use bgl and others gpu), check and force the reset of the drawing status
at the end of each callback.

Differential Revision: https://developer.blender.org/D9476
2020-11-05 18:34:47 -03:00
Robert Guetzkow 69e567cfe8 Merge branch 'blender-v2.91-release' 2020-11-05 21:35:27 +01:00
Robert Guetzkow 7fed420877 Fix T82423: Replace duplicate name in keymap
The two entries `TFM_MODAL_AUTOCONSTRAINT` and
`TFM_MODAL_AUTOCONSTRAINTPLANE` had the same name
displayed in the UI. The latter is now includes
"plane" in it's name.

Reviewed By: mano-wii

Differential Revision: https://developer.blender.org/D9474
2020-11-05 21:29:15 +01:00