Commit Graph

13488 Commits

Author SHA1 Message Date
e4b6180c4e Sculpt-dev: fix elastic deform brush
* Volume preservation had wrong bounds in
  elastic deform brush leading to wrong
  behavior.
* Fixed unprojected_radius channel not
  being shown in header when scene radius
  unit is on.
* Draw face sets now only fully rebuild draw buffers
  in indexed draw modes that require it.
2021-12-02 16:37:31 -08:00
e21c21bbf9 Sculpt-dev: support area weighted smooth for PBVH_FACES
* This was actually kind of annoying; the
  vertex->face-area-list code is in pbvh and
  relies on edge ordering
  around verts, but that order is non-trivial for
  PBVH_FACES (relying as it does on a vertex->poly
  map).  This ordering was calculated entirely in
  editors/sculpt_paint/sculpt.c, not callable from
  pbvh.
* The solution was to add a helper function to pbvh
  for building vertex->edge lists from vertex->poly
  maps.  This is then used by both sculpt.c and the
  vertex->face-area-list code.

* Also improved boundary bevel smooth a bit.  I'm
  thinking of extracting it from SCULPT_neighbor_coords_average_interior
  into its own function and possibly its own brush.
2021-11-28 01:19:23 -08:00
66d362b464 Sculpt-dev: don't show input mapping
settings in sculpt context menu
2021-11-27 09:02:49 -08:00
1e4b49d3c1 Sculpt-dev: Add brush_eval field to Paint
* Paint now has a brush_eval field which
  is used in leu of ->brush if non-null.
* This lets us get rid of all the annoying:
  `brush = ss->cache ? ss->cache->brush : BKE_paint_brush`
  code.  Now it's just BKE_paint_brush.
* Used by SCULPT_run_command.
* Also fixed nasty scene spacing bug.
2021-11-26 21:10:14 -08:00
8de1899c33 Sculpt-dev: bugfixes
* Fixed PBVH_FACES vcol draw bug.
* Fixed boundary smooth being turned on
  if its temp customdata layer exists.
* Fixed unnesting of brush panels from
  last commit improperly showing up
  in the workspace tab for sculpt
  instead of the brush tab.
2021-11-26 15:39:44 -08:00
f13bedd649 Sculpt-dev: sculpt_init_tool_override_channels
related fixes

Various fixes so sculpt_init_tool_override_channels
for shift-smooth can replicate the prior behavior:

* Brush spacing will now look up brush channel
  spacing directly for sculpt, instead of relying
  on copying the channel data into Brush.
* Brush spacing code will now use brush channel
  pressure for sculpt.  Fixes broken shift-smooth
  pen pressure.
* The falloff_curve channel is now automatically
  added (before it was only used internally by
  command lists, the code was defaulting to
  the Brush field otherwise).
* BrushCurve now has an option for custom curve
  presets to have negative slopes.
* The Falloff panel now puts the type dropbox
  inside the panel header.
* Falloff panel also now uses brush channel data in
  sculpt mode.
* falloff_shape is now a brush channel

In a somewhat unrelated change, I also unnested the
Brush Settings subpanels.  It's been driving me
insane for a very, very long time.  Much more
usable this way.
2021-11-25 11:34:24 -08:00
2255892f5b Sculpt-dev: add random_[hue/sat/value]
color filter options from
	    sculpt-mode-features

* Follows comment in mesh filter's randomize and
  uses BLI_hash_int_3d.
* Added a seed parameter.
* Also renamed SCULPT_get_mdyntopo to SCULPT_get_sculptvert.
2021-11-20 08:49:14 -08:00
e724479ca6 Sculpt-dev: sculpt colors stuff
* Mask by color now works for dyntopo.
* Attribute and vertex color lists in the UI
  now hide temporary CD layers.
* Added a specific op for removing vertex color
  attributes.
* Fixed various bugs.
2021-11-17 03:09:37 -08:00
7a55066b18 Sculpt-dev: Add support for attribute triplets
It simply wasn't maintainable to store active/render
vertex color layer as integer indices into the
global attribute list.  Making that work would've
required a great deal of boilerplate that would
have to be inserted in lots of places.  There
is simply no justification for doing that.

Instead, I've coded an AttributeRef struct that
simply stores a (type, name, domain) triplet to
uniquely reference an attribute layer.

This will be submitted as a patch for master
too.
2021-11-16 21:58:50 -08:00
ddd1af5901 Sculpt-dev: fix crash 2021-11-16 16:23:42 -08:00
cddcc54f32 Sculpt-dev: fix brush input mapping inheritance
* Brush input mappings now have three
  inheritance mode: "always", "never" and
  "channel" (use channel's inheritance mode).
* Note that the UI exposes a single inherit icon,
  which just toggles between "always" and
  "never," to lessen user confusion.
* Brush mappings default to "never" inheritance
  mode.
* Fixed wrong node update flag in bke_pbvh_insert_face_finalize
  leading to disappearing parts of the mesh.
2021-11-16 13:26:39 -08:00
e68c7df94e Sculpt-dev: use standard UI idioms
Thanks to @TonatiuhdeSanJulián on chat
for helping me with this.
2021-11-14 02:37:51 -08:00
e1cf0657d8 Merge branch 'master' into sculpt-dev 2021-11-14 02:35:23 -08:00
Matheus Santos
c4ea5cb1a3 Text Editor: Auto close relevant characters
Support the ability to close relevant characters like '(', '[' and '{'.

It will also delete the pair character if they're empty.

Ref D13119

Reviewed By: campbellbarton
2021-11-13 13:56:31 +11:00
3ca41b7312 Merge branch 'blender-v3.0-release' 2021-11-11 10:16:35 -06:00
Peter Sergay
4bc08b79aa UI: Updated Blender Light theme for Spreadsheet
This patch adds list colors to the light theme for the spreadsheet,
which are needed for the data set region. Addresses T92492.

Differential Revision: https://developer.blender.org/D13090
2021-11-11 10:10:28 -06:00
e1bd4bbb66 UI: Introduce View pie in more editors
#### Motivation

The View pie menu is a convenient way to access operators such as `Frame Selected` and `Frame All` which are usually mapped to `PERIOD` or `HOME` keys on the right side of most keyboard, making it hard hard to reach with the left hand.

The motivation for this patch comes from working with a 75% keyboard (no numpad). Most laptops face a similar problem.

#### Implementation

The View pie menu has been added to the following editors and sub-modes where applicable:

* Node Editor
* Video Sequencer
* Dopesheet
* Graph
* NLA
* Image
* Clip
* Outliner

More options could definitely be added to this menu for convenience, as long as it maintains the common options in the same place (Frame Selected on the left, Frame All on the right).

For positioning I went with the following layout:
{F11791186, size=full}

I've added `Zoom 1:1`to the Image Editor and the VSE Preview since there is no way to reset the zoom on keyboards without numpad (unless Emulate Numpad is turned on).

The Outliner uses `Show Active` and `Show Hierarchy` which are the closest ones to the equivalent in other editors. Should `Show Active` be renamed to `Frame Selected`?

The shortcut assigned is the same as the 3D Viewport (`ACCENT_GRAVE`).

#### Screenshots

Node Editor
{F11778387, size=full}

Dopesheet
{F11778400, size=full}

Graph
{F11778403, size=full}

Image Editor (Paint and View)
{F11791113, size=full}

Image Editor (Mask)
{F11791114, size=full}

UV Editor
{F11791119, size=full}

Clip Editor (Tracking)
{F11791137, size=full}

Clip Editor (Mask)
{F11791140, size=full}

Clip Editor (Graph)
{F11791151, size=full}
View operators are not yet implemented in Clip Editor Dopesheet mode (left a note about this in the menu poll).

Reviewed By: #user_interface, campbellbarton

Differential Revision: https://developer.blender.org/D13169
2021-11-11 01:18:50 +01:00
e9b7e5e0b9 Merge branch 'blender-v3.0-release' 2021-11-10 10:47:09 -06:00
67e5edbaa3 Fix: Incorrect translation search for modifier error messages
This function was renamed in rB2bb9a465e6c0e1ca765, but it looks like
that commit missed changing the corresponding translation regular
expression.

Differential Revision: https://developer.blender.org/D13171
2021-11-10 10:46:49 -06:00
7383f95443 Merge branch 'blender-v3.0-release' 2021-11-09 11:43:18 -05:00
74fe19b193 UI: use plural form of "Gizmo" in Gizmo display menus
Because the menus list several gizmo visibility settings it makes grammatical sense that the panel name is plural.

This also matches the "Overlays" menu.
2021-11-09 11:42:26 -05:00
fb0ae66ee5 Merge branch 'blender-v3.0-release' 2021-11-09 16:10:19 +01:00
Pablo Vazquez
368d794407 Cleanup: Remove SMALL_TRI_RIGHT_VEC icon
Since the recent change to context paths to use the arrow icon instead of the triangle (D13106),
the `SMALL_TRI_RIGHT_VEC`is no longer used. This patch removes the icon and all references.

- Replace `SMALL_TRI_RIGHT_VEC` with `RIGHTARROW` in Freestyle UI
- Remove references to `SMALL_TRI_RIGHT_VEC` and `ICON_SMALL_TRI_RIGHT_VEC`.

Fix for built-in add-ons has been done in rBAcc2f71bfe9b0/rBAa84028f8a89a.

This will be added to the list of breaking changes [[ https://wiki.blender.org/wiki/Reference/Release_Notes/3.0/Python_API#Breaking_Changes | in the Wiki ]].

Reviewed By: Severin

Differential Revision: https://developer.blender.org/D13130
2021-11-09 16:09:53 +01:00
Demeter Dzadik
c092cc35b3 Expose BLI_string_flip_side_name as bpy.utils.flip_name
Expose a new function in `bpy.utils.flip_name(name, strip_number=False)
that allows flipping bone names, eg "Bone.L" -> "Bone.R".

Useful for add-ons to avoid re-implementing Blender's name flipping.

Ref D12322
2021-11-10 01:19:04 +11:00
ad679ee747 Merge branch 'blender-v3.0-release' 2021-11-09 10:07:44 +01:00
Fynn Grotehans
486d1e8510 Fix T92559: Tracking camera presets don't work
New tracking-camera presets d486ee2dbd used wrong code because I
copied them from the camera-presets. Now they set the right properties
again, the values stay the same as before.

Differential Revision: https://developer.blender.org/D13139
2021-11-09 10:06:28 +01:00
0569618578 Sculpt-dev: get vcol render layer working
* Mesh now has a render_color_index member.
  + We really need an attribute ref system
    based on (domain, type, name) triplets.
* RNA uses render_color_index in all three
  cases (loop colors, vert colors, and
         the generic attribute types).
* PBVH draw uses render_color_index too.
2021-11-09 00:11:03 -08:00
f0d0369506 Sculpt-dev: all vertex colors now live in single
UI list.

* Added an index to Mesh for active color attribute.
  This seems janky to me, shouldn't this (along
  with the active attribute index) be a
  domain, name, cdtype triplet?
* Added a little api to preserve the active attribute
  and color indices when changing mesh customdata
  layouts.  See above comment.
* The vertex color panel is now completely unified.
* TODO: allow setting render color layer (not sure how
  to do this).
2021-11-08 21:09:17 -08:00
2772a033c9 Merge branch 'blender-v3.0-release' 2021-11-09 15:49:41 +11:00
b3597f310d Fix T92469: Transform tools inaccessible in weight-paint + pose mode
Expose transform tools when in weight paint mode with pose-mode enabled,
displaying transform tools in the toolbar, as is already done in
object & pose mode.

These are only shown when weight-paint + pose mode are active at once.

This allows single key-strokes to activate tools, needed when
tool-access is set as the default action for G/R/S key bindings.

Reviewed By: JulienKaspar

Ref D13028
2021-11-09 15:43:34 +11:00
78d62d9be7 Merge remote-tracking branch 'origin/temp-sculpt-colors' into sculpt-dev
This was necassary because sculpt colors is currently broken in master,
and temp-sculpt-colors hasn't been approved for merging to master
yet.
2021-11-08 17:55:19 -08:00
6c0da7cc81 Merge branch 'master' into temp-sculpt-colors 2021-11-08 13:17:16 -08:00
a3f4e93497 Merge branch 'master' into sculpt-dev 2021-11-08 13:16:18 -08:00
c55d0ebea5 Merge branch 'blender-v3.0-release' 2021-11-09 00:25:46 +11:00
cd8350764b Docs: improve comments & doc-strings for the tool-system 2021-11-09 00:23:55 +11:00
27b37517f8 Cleanup: use static sets 2021-11-08 17:00:36 +11:00
42df2a7b57 Cleanup: Grammar in comments 2021-11-07 23:20:29 -06:00
c516659b5e Cleanup: use static sets 2021-11-08 14:52:08 +11:00
48841c479f Merge branch 'blender-v3.0-release' 2021-11-05 18:00:01 -04:00
6c83001143 Update RNA to user manual url mappings 2021-11-05 17:59:17 -04:00
3a4dade2f8 Merge branch 'blender-v3.0-release' 2021-11-05 16:04:57 +11:00
9b1882f986 Cleanup: replace face-map reference in gizmo example
Copy-paste error.
2021-11-05 15:52:17 +11:00
556c71a84a GPencil: New option to Merge All layers in active one
This new option allows to combine all layers in the active one. Also the merge down option has been improved.

Reviewed By: mendio, pablo vazquez (UI)

Differential Revision: https://developer.blender.org/D13054
2021-11-04 19:40:55 +01:00
feaf5b95e0 Merge branch 'blender-v3.0-release' 2021-11-04 08:35:46 +01:00
74ef424cb7 Revert "GPencil: Change default template for better contrast in header"
This reverts commit 5d42ea0369.
2021-11-04 08:33:59 +01:00
86fe67d6ed Fix python error 2021-11-03 16:42:04 -07:00
d42acadba5 temp-sculpt-colors: vcol extractor rewrite
Draw cache system now properly uploads all three
vcol types to the gpu.
2021-11-03 14:30:40 -07:00
1a5ea3c8b3 Merge branch 'master' into temp-sculpt-colors 2021-11-03 13:03:43 -07:00
1dcc741f43 temp-sculpt-colors: commit patch 2021-11-03 12:15:13 -07:00
e10caf6fe3 Merge remote-tracking branch 'origin/blender-v3.0-release' 2021-11-03 18:07:36 +01:00