Commit Graph

101510 Commits

Author SHA1 Message Date
Sergey Sharybin af35ada2f3 Cleanup: Clang-Tidy, modernize-use-bool-literals 2020-11-06 14:32:51 +01:00
Jacques Lucke dfa027fe09 Refactor: move sequencer modifier .blend I/O to sequencer module
Ref T76372.
2020-11-06 14:28:33 +01:00
Sybren A. Stüvel 94ce248b30 Cleanup: Alembic, simplify expression
Change `1 + current_mat++` to `++current_mat`.

No functional changes.
2020-11-06 14:24:50 +01:00
Sybren A. Stüvel 047819e728 Cleanup: Alembic, simplify material assignment code
Refactor material assignment code such that:
- `build_mat_map()` just returns the built map (instead of relying on
  modifying a map passed as parameter),
- `LISTBASE_FOREACH` is used to loop over a `ListBase` (instead of a
  hand-crafted for-loop),
- just `return` when not enough material slots can be created (instead
  of setting a boolean to false, then doing some useless work, then
  checking the boolean),
- reorder some code for clarity, and
- rename `mat_map` to `matname_to_material` so that the semantics are
  clearer.

No functional changes.
2020-11-06 14:24:50 +01:00
Jacques Lucke c32a5ce17c Refactor: move Paint lib linking to blenkernel
Ref T76372.
2020-11-06 14:10:31 +01:00
Jacques Lucke 62223e9851 Refactor: move color settings .blend I/O to blenkernel
Ref T76372.
2020-11-06 14:10:31 +01:00
Sergey Sharybin 8d5073345d Cleanup: Clang-Tidy, modernize-use-emplace 2020-11-06 14:06:52 +01:00
Sergey Sharybin cee5a41518 Fix compilation error of bf_draw
Similar to previous commit, missing build dependency.
2020-11-06 13:53:47 +01:00
Sergey Sharybin 187adc64b4 Fix compilation error when building from scratch
Make sure the DNA offset files is ready at a time bf_windowmanager
need it.
2020-11-06 13:49:56 +01:00
Sergey Sharybin a331d5c992 Cleanup: Clang-Tidy, modernize-redundant-void-arg 2020-11-06 13:40:46 +01:00
Jacques Lucke 41db8f2fce Refactor: move LightCache .blend I/O to eevee_lightcache.c
Ref T76372.
2020-11-06 13:35:19 +01:00
Jacques Lucke da96389dcb Refactor: move remaining ViewLayer .blend I/O to blenkernel
Ref T76372.
2020-11-06 13:22:10 +01:00
Jacques Lucke 3ee9e3a04f Cleanup: remove unnecessary function 2020-11-06 13:17:31 +01:00
Jacques Lucke 9ad2965921 Refactor: move Paint .blend I/O to blenkernel
Ref T76372.
2020-11-06 13:16:17 +01:00
Jacques Lucke e810a16d75 Refactor: move wmWindowManager .blend I/O to IDTypeInfo callbacks 2020-11-06 13:04:56 +01:00
Philipp Oeser 2de454c514 Merge branch 'blender-v2.91-release' into master 2020-11-06 12:57:27 +01:00
Philipp Oeser 8df84f7be4 Fix T82364: Widget anim state not updated when deleting channel in Graph Editor
So a keyframed e.g. location slider would stay yellow/green even if its
corresponding channel was removed.

Needs a appropriate notifier so the listeners (e.g.
buttons_area_listener, view3d_buttons_region_listener) would cause a
redraw.

Maniphest Tasks: T82364

Differential Revision: https://developer.blender.org/D9438
2020-11-06 12:52:52 +01:00
Dalai Felinto 3310e6d63e Merge remote-tracking branch 'origin/blender-v2.91-release' 2020-11-06 12:29:45 +01:00
Dalai Felinto b35e3f2460 Fix T82457: Python error when clicking on a tool in the viewport
Ths variable was initialized for false, while it was expected to be
true.
2020-11-06 12:29:19 +01:00
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