Commit Graph

86726 Commits

Author SHA1 Message Date
Campbell Barton 41d4a19865 ClangFormat: format '#if 0' code in source/ 2019-04-17 08:24:14 +02:00
Campbell Barton 108045faa0 ClangFormat: format '#if 0' code in intern/ 2019-04-17 08:17:13 +02:00
Campbell Barton 3076d95ba4 Cleanup: use 2 space indentation for CMake 2019-04-17 06:35:54 +02:00
Campbell Barton 91a9cd0a94 ClangFormat: manually format sobol.cpp
Disabled because it uses a lot of memory and is mostly data.
2019-04-17 06:35:07 +02:00
Campbell Barton e12c08e8d1 ClangFormat: apply to source, most of intern
Apply clang format as proposed in T53211.

For details on usage and instructions for migrating branches
without conflicts, see:

https://wiki.blender.org/wiki/Tools/ClangFormat
2019-04-17 06:21:24 +02:00
Campbell Barton b3dabc200a editorconfig: update for new clang-format config 2019-04-17 06:12:55 +02:00
Campbell Barton 18e4a4c48a ClangFormat: add configuration files
Prepare for applying clang-format, see: T53211
2019-04-17 06:11:16 +02:00
Campbell Barton 53e3fcdce4 Cleanup: use 2 space indentation for shell scripts
Already used by install_deps.sh
2019-04-17 06:08:01 +02:00
Campbell Barton ca245b2b40 ClangFormat: disable for most of sobol.cpp 2019-04-17 06:00:20 +02:00
William Reynish 5d8030b8f3 Industry Compat keymap: Fix loop selection
- Extending loops wasn't working correctly. This is now fixed.
- Also added ability to deselect loops by holding Ctrl and double-clicking
2019-04-16 22:13:25 +02:00
Dalai Felinto d29bd6c6b7 Selecing a pose bone in outliner deselect others
This mimics what is now the behaviour for edit bones as well.
See e6151bc4c1.

And it also matches what we do in the viewport when selecting bones.
2019-04-16 16:10:04 -03:00
Dalai Felinto e6151bc4c1 Fix T63066: Outliner crash when selecting object being in armature editmode
While fixing it, also reproducing multi-object selection logic we have
in the viewport. If you select one bone from an armature, it deselects all
bones from the other armatures currently in edit mode.

Inspired by proposed fix by Philipp Oeser (lichtwerk).

Code explanation
================

CTX_data_edit_object(C) may be NULL here. In the few cases where it is
not we use it for the notifier (in the other cases we call the notifier
with NULL, so no harm done).

This code is called during outliner drawing, and it is called, for
instance every time you mouse hover a bone.

If you have a mesh object in edit mode and mouse hover the bones of an armature
it is plain obvious we can't rely on CTX_data_edit_object() for anything
armature related. And that the original assert was asking for troubles.
2019-04-16 15:42:32 -03:00
Campbell Barton e2e3a61310 Cleanup: avoid adjacent C-style comments
Causes clang-format to give different results on a second run.
2019-04-16 17:55:11 +02:00
Campbell Barton 58233e980e Cleanup: avoid adjacent C-style comments
Causes clang-format to give different results on a second run.
2019-04-16 17:50:17 +02:00
Alexander Gavrilov ad9275ed4e Spline IK: support changing individual bone length via Y scaling.
Previously Spline IK provided only two choices: either scale the
length of the bone chain to fit the length of the curve, or don't
scale the bone in the Y dimension at all (ignoring effects of
actually fitting to the curve due to curvature and curve object
scale).

This patch adds a new option to use the pre-IK Y scale of the
bones to adjust their length when fitted to the curve, allowing
individual posing control over the length of the segments.

Reviewers: brecht

Differential Revision: https://developer.blender.org/D4687
2019-04-16 18:41:57 +03:00
Campbell Barton 752edc0a15 Cleanup: simplify comments
clang-format reformatted when running a second time.
2019-04-16 17:37:04 +02:00
Sergey Sharybin 2a891842af Clang-format: Speed up detection of clang-format
Don't construct the full build environment, following
feedback from Ray.
2019-04-16 17:10:02 +02:00
Campbell Barton 49e4182b6c ClangFormat: add comments to ignore formatting 2019-04-16 17:03:11 +02:00
Jeroen Bakker 24edd49818 Fix T63312: Crash XRay + clipping
Outline shaders were only selected when no checker depth was available.

Reviewed By: fclem

Maniphest Tasks: T63312

Differential Revision: https://developer.blender.org/D4661
2019-04-16 17:02:07 +02:00
Campbell Barton 2986bc1d6e ClangFormat: add comments to ignore formatting 2019-04-16 16:57:47 +02:00
Bastien Montagne e0fe719997 Fix BLI_path test of BLI_path_frame_strip.
Ensure that returned string buffer is always properly initialized with
NULL char...
2019-04-16 16:52:20 +02:00
Campbell Barton 65aebd0c11 GNUmakefile: move clang format utility
Makes more sense to place in 'utils_maintenance'.
2019-04-16 16:49:32 +02:00
Campbell Barton dbc058301b Cleanup: trailing commas 2019-04-16 16:40:47 +02:00
Campbell Barton d217b23f73 Cleanup: use keyword only args to rna_idprop_ui_create 2019-04-16 16:00:24 +02:00
Alexander Gavrilov 40dd91561d Python: add a utility function for creating custom properties.
Creating a fully functional custom property requires also setting up
its limits, description, default value and static override status.
It is complex enough to warrant providing an official utility.

Currently boolean properties are technically int, but the utility
pretends they are separate in case that eventually they are.

Reviewers: campbellbarton

Differential Revision: https://developer.blender.org/D4620
2019-04-16 16:49:00 +03:00
Campbell Barton d5a76451c0 GNUmakefile: add 'make format'
Convenience access to clang_format_paths.py utility.
2019-04-16 15:43:42 +02:00
Sergey Sharybin fc32f98bbc Initial support of `make format` for Windows
There are couple of caviats currently:

- The script requires system-wide Python 3 available in the current
  search PATH as python.exe.

  This will get addressed soon by distributing unpacked Python binary
  in our libraries.

- Since the libraries folder is to be known, this requires to have
  MSVC detected. Not too bad, since formatting is still way slower
  than detection, but still doesn't feel ideal.
2019-04-16 15:41:32 +02:00
Brecht Van Lommel f45b91a1c5 Fix tool system Python errors if there is no active object. 2019-04-16 15:33:20 +02:00
Brecht Van Lommel 0ca9ce21ab Fix T63641: transform snap invert keymap item has an effect when disabled. 2019-04-16 15:33:20 +02:00
Philipp Oeser 11175eb8a8 Fix T63617: Bone groups (de)select operators not immediately refreshing
was missing DEG updates

Reviewers: brecht

Maniphest Tasks: T63617

Differential Revision: https://developer.blender.org/D4691
2019-04-16 15:21:01 +02:00
Dalai Felinto e017d89eae Fix T63204: Toggle collection visibility with shift
Shift was always turning the collection visible. It now toggles, similar
to what we had in 2.79.
2019-04-16 09:58:44 -03:00
Campbell Barton 157872922a CMake: fix building WITH_CYCLES_LOGGING=ON 2019-04-16 14:56:34 +02:00
William Reynish a12bc43b26 UI: Move Collection Visibility popover from 3D View header into the Sidebar
It's more practical to use this from the Sidebar, and takes away one item from the crowded header.

See T63527
2019-04-16 14:52:44 +02:00
Bastien Montagne b53728b1d2 Fix broken build when using system Glew on linux. 2019-04-16 14:44:14 +02:00
Jacques Lucke 7fdffd735f UI: Refactor View2D number drawing
This also fixes alignment issues in many editors.
E.g. the frame numbers were badly aligned to the grid lines
in the timeline.

Checkout the images in D4681 for more examples.

Reviewers: brecht

Differential Revision: https://developer.blender.org/D4681
2019-04-16 14:19:06 +02:00
Campbell Barton 45055199a2 CMake: fix building without libmv 2019-04-16 14:11:17 +02:00
Philipp Oeser 8535f4d073 Fix T63619: Fill Tool is misaligned when 'Gradient' is enabled
Reviewers: brecht

Maniphest Tasks: T63619

Differential Revision: https://developer.blender.org/D4692
2019-04-16 14:03:08 +02:00
Campbell Barton e7e05ba5fa CMake: fix linking with gtest & cycles enabled 2019-04-16 13:57:33 +02:00
Sebastian Parborg 423d9086e6 Fix T63429: Random deselect function lost
Add back the ability to choose the select operation for random select.
Now we allow the operator to specify if the select operation should be
visible in the GUI or not.

Reviewed By: Brecht

Differential Revision: http://developer.blender.org/D4665
2019-04-16 13:16:04 +02:00
Antonioya 2e3bc99590 GPencil: New Normalize All operator
This operator works similar to mesh operator but for Stroke and Points data.

Also minor cleanup in Normalize operator.
2019-04-16 13:10:10 +02:00
Antonioya 5494926ee5 GPencil: Add lock icon to Vertex Groups list
Also check this flag in operators.

Note: This is required for the development of the new Normalize All operator.
2019-04-16 13:10:04 +02:00
Antonioya a8852ade8a GPencil: New Normalize Weights operator
This works similar to mesh operator, but using Stroke and Points data.
2019-04-16 13:09:58 +02:00
Campbell Barton 31c2e69d49 CMake: remove BLENDER_SORTED_LIBS
Use CMake's target_link_libraries instead of manually maintaining
library dependencies in a single list.

In practice adding new libraries often ended up being guess-work,
now each library lists the libraries it uses.

This was used for the game player executable so libraries
could optionally link to stubs.

If we need this functionality it can be done using target-properties
as described in T46725.
2019-04-16 12:36:44 +02:00
Sergey Sharybin 616597e7ea CMake: fix WIN32 linking without sorted libs 2019-04-16 12:35:57 +02:00
Campbell Barton 758bb8c70d Clenaup: odd use of ternary operators 2019-04-16 12:09:34 +02:00
Campbell Barton f37a27b074 Cleanup: comment 2019-04-16 12:01:55 +02:00
William Reynish c9b8db74dc Industry Compat Keymap: Use F-keys for viewpoints
Following user suggestion

  - Similar to some apps
  - Works better on laptops and desktops without numpads
  - Also fix some small inconsistencies with select more/less in Dopesheet
2019-04-16 11:01:23 +02:00
Antonioya 0d686ccc52 GPencil: Disable G/R/S transformations in Sculpt and Weight Paint mode
These transformations must be only available in Object and Edit mode.

Reviewed by: @mendio @pepeland
2019-04-16 10:04:20 +02:00
Philipp Oeser 777446ed7d Fix T63492: CTRL+click on an image in a UV or Image Editor crashes
Blender

Crash was introduced in rB48e48653c297, rB90f4ff95ed3a

`image_sample_invoke` is used for both `IMAGE_OT_sample` and
`IMAGE_OT_curves_point_set`. IMAGE_OT_curves_point_set didnt have
property `size` defined...

Now defines `size` for `IMAGE_OT_curves_point_set` as well

Reviewers: brecht

Maniphest Tasks: T63492

Differential Revision: https://developer.blender.org/D4675
2019-04-16 09:38:01 +02:00
Campbell Barton 8a9b5e644e Fix T63642: Light Probe object.data defined as UNKNOWN 2019-04-16 09:15:39 +02:00