Commit Graph

91 Commits

Author SHA1 Message Date
Christoph Lendenfeld
3b900048f1 Animation: Move Graph Editor settings to User Preferences
Move two settings that were previously in the "View" menu of the Graph Editor into User Preferences.

It has been mentioned in the meeting by Luciano Muñoz Sessarego that it would be good to move that to the preferences so you can set it once and then forget about it.

The Settings moved are:

    Only Selected Curve Keyframes
    Use High Quality Display

Pull Request: https://projects.blender.org/blender/blender/pulls/104532
2023-03-09 14:15:23 +01:00
Hans Goudey
5876573e14 Mesh: Move face shade smooth flag to a generic attribute
Currently the shade smooth status for mesh faces is stored as part of
`MPoly::flag`. As described in #95967, this moves that information
to a separate boolean attribute. It also flips its status, so the
attribute is now called `sharp_face`, which mirrors the existing
`sharp_edge` attribute. The attribute doesn't need to be allocated
when all faces are smooth. Forward compatibility is kept until
4.0 like the other mesh refactors.

This will reduce memory bandwidth requirements for some operations,
since the array of booleans uses 12 times less memory than `MPoly`.
It also allows faces to be stored more efficiently in the future, since
the flag is now unused. It's also possible to use generic functions to
process the values. For example, finding whether there is a sharp face
is just `sharp_faces.contains(true)`.

The `shade_smooth` attribute is no longer accessible with geometry nodes.
Since there were dedicated accessor nodes for that data, that shouldn't
be a problem. That's difficult to version automatically since the named
attribute nodes could be used in arbitrary combinations.

**Implementation notes:**
- The attribute and array variables in the code use the `sharp_faces`
  term, to be consistent with the user-facing "sharp faces" wording,
  and to avoid requiring many renames when #101689 is implemented.
- Cycles now accesses smooth face status with the generic attribute,
  to avoid overhead.
- Changing the zero-value from "smooth" to "flat" takes some care to
  make sure defaults are the same.
  - Versioning for the edge mode extrude node is particularly complex.
    New nodes are added by versioning to propagate the attribute in its
    old inverted state.
- A lot of access is still done through the `CustomData` API rather
  than the attribute API because of a few functions. That can be
  cleaned up easily in the future.
- In the future we would benefit from a way to store attributes as a
  single value for when all faces are sharp.

Pull Request: https://projects.blender.org/blender/blender/pulls/104422
2023-03-08 15:36:18 +01:00
Brecht Van Lommel
e67c27e172 Merge branch 'blender-v3.5-release' 2023-03-08 01:50:08 +01:00
Damien Picard
02fb607520 Fix Freestyle fill range by selection error when there is no active camera
When trying to use the Fill Range by Selection operator, in the
Distance from Camera Freestyle modifier, the operator fails if no
camera is active in the scene.

Before getting the data from the camera, check that it is defined, and
return otherwise.

Pull Request: https://projects.blender.org/blender/blender/pulls/105475
2023-03-08 01:46:51 +01:00
Tarek Yasser
da65b21e2e Sculpt: Add Transform, Trim, and Mesh Filter operators to Sculpt menu
Hello, this is a small PR to check that my understanding of #102427 is correct before moving on to the rest of the issue.
This PR contains the updated UI of the `Sculpt` menu only. Other menus will be submitted for review later.

Currently exposed operators:
* Move
* Rotate
* Scale
* Box Trim (Trim Mode ="Difference")
* Lasso Trim (Trim Mode ="Difference")
* Box Add (Trim Mode ="Join")
* Lasso Add (Trim Mode ="Join")
* Line Project
* Smooth
* Surface Smooth
* ~~Scale (Could be left out?)~~
* Inflate
* Random
* Relax Topology
* Relax Face Set Boundaries
* Sharpen
* Enhance Details
* Erase Displacement

The original issue specifies `Relax Face Set Boundaries` and `Erase Displacement`. I'm not quite sure if this is done in the UI code or somewhere else.

Reviewed By: Joseph Eagar & Julian Kaspar
Pull Request: https://projects.blender.org/blender/blender/pulls/104718
2023-03-08 01:18:21 +01:00
Bastien Montagne
d11874bf21 Merge branch 'blender-v3.5-release' 2023-03-07 18:29:30 +01:00
Harley Acheson
d0918c5c7f Assets: Add License and Copyright meta-data
As per #105300, this adds optional "license" and "copyright" meta-data
to assets.

Pull Request: https://projects.blender.org/blender/blender/pulls/105318
2023-03-07 18:22:43 +01:00
Weizhen Huang
6fbc52bdca Viewport: draw light icons using the light colors
Indicating light colors by coloring the light icons.
Task: #104280
Pull Request: #105236

- Added a checkbox under overlay extra to enable/disable light coloring. Disabled by default.
- The outer ring and the sun rays are colored.
- Only the base color is shown, colors in nodes are not considered.
2023-03-07 15:17:59 +01:00
Philipp Oeser
891eb4938c UI: add parenting (Keep Transform Without Inverse) to menu
Since db6287873cd2, we added parenting (Keep Transform Without Inverse)
to the parent_set operator and exposed this in the UI in the invoke menu
of that operator.

This however never made it to the `Object` > `Parent` menu.

Since this is quite useful (and otherwise a bit hidden in the Adjust
Last Operation panel) and parent inverse can cause confusion in many
cases (see e.g. #105276 or #103969), now add this as an explicit entry
in the `Object` > `Parent` menu as well.
2023-03-07 15:14:00 +01:00
Brecht Van Lommel
7f5d1fb05a Merge branch 'blender-v3.5-release' into main 2023-03-07 13:23:43 +01:00
Damien Picard
a668e3b73a I18n: do not translate a message already translated using iface_()
This follows #105417, which allowed detection of this message.

Pull Request #105420
2023-03-07 12:32:00 +01:00
Damien Picard
ae530592fe I18n: disambiguate messages
- "Lines" in the sense of number of lines
- "Number" can mean "amount, count" or "index, offset"
- "Second" can be an ordinal number or a unit
- "Root": add the brush curve to the "square root falloff" sense
- "Strip" can be a sequence or a type of hair rendering
- "Constant" in the sense of a value, for the Geometry Nodes add
  submenu (#105447).

Additionally, extract:
- "Press a key" from the Keymap preferences.
- "MaskLayer", upon new mask layer creation

Ref #43295, #105447
2023-03-07 12:31:59 +01:00
Brecht Van Lommel
1658de6769 Merge branch 'blender-v3.5-release' 2023-03-06 23:14:18 +01:00
Damien Picard
214b24e025 Cleanup: Fix incorrectly formatted multi-line docstring
This has the effect that the message is cut off at the end of the
first line. I copied the solution from other similar docstrings
elsewhere in the code.

As far as my regex-fu can tell, there are no other occurrences of this
in the codebase.

Issue reported by Joan Pujolar in #43295.

Pull Request #105474
2023-03-06 14:09:44 +01:00
Damien Picard
049027d697 Cleanup: Fix a few messages in the UI
Issues reported by Joan Pujolar in #43295.

- uv -> UV everywhere.
- Wrong plurals.

Pull Request #105473
2023-03-05 21:32:23 -08:00
Damien Picard
f3c5fda899 Cleanup: Fix a few messages in the UI
Issues reported by Joan Pujolar in #43295.

- uv -> UV everywhere.
- Wrong plurals.

Pull Request #105473
2023-03-05 23:16:26 +01:00
Aras Pranckevicius
a30abe9c2e IO: minor tweaks to the new C++ PLY importer/exporter
Address some issues discussed in PR #104404:
- Vertex color options changed to None/sRGB/Linear, default is sRGB
  to match the existing Python addon.
- Change name to "Stanford PLY" from "PLY" in the menu item.
- Default "Export UVs" to on.
- After importing vertex colors, they are set as enabled for render.
2023-03-05 20:44:53 +02:00
Nathan Rozendaal
43e9c90061 IO: New C++ PLY importer/exporter
New (experimental) Stanford PLY importer and exporter written in C++.

Handles: vertices, faces, edges, vertex colors, normals, UVs. Both
binary and ASCII formats are supported.

Usually 10-20x faster than the existing Python based PLY
importer/exporter.

Additional notes compared to the previous Python addon:
- Importing point clouds with vertex colors now works
- Importing PLY files with non standard line endings
- Exporting multiple objects (previous exporter didn't take the vertex
  indices into account)
- The importer has the option to merge vertices
- The exporter supports exporting loose edges and vertices along with
  UV map data

This is squashed commit of PR #104404
Reviewed By: Hans Goudey, Aras Pranckevicius

Co-authored-by: Arjan van Diest
Co-authored-by: Lilith Houtjes
Co-authored-by: Bas Hendriks
Co-authored-by: Thomas Feijen
Co-authored-by: Yoran Huzen
2023-03-05 20:44:53 +02:00
bonj
dcad51dfc3 DRW: Retopology Overlay
Add overlay option for retopology, which hides the shaded mesh akin to Hidden Wire, and offsets the edit mesh overlay towards the view.

Related Task #70267
Pull Request #104599
2023-03-03 00:35:45 +01:00
f5c56b4cd6 Animation: Remove the 'Weight Paint: Fix Deforms' operator
The code of the 'Fix Deforms' operator was hard to read and inefficient, doing `O(num_vertices * num_vertex_groups)` evaluations of the mesh. It caused multiple issues and got in the way of improvements to Blender, and seems to be used very little (if ever).

It was decided in [last week's module meeting](https://devtalk.blender.org/t/2023-02-23-animation-rigging-meeting/27757#patch-review-decision-time-5) that this operator should be removed.

Pull Request #105237
2023-03-02 16:58:14 +01:00
Philipp Oeser
1d3a2fb5bb Merge branch 'blender-v3.5-release' 2023-03-02 15:15:11 +01:00
Philipp Oeser
422f3d0b0f Fix #105278: IDProperty UI missing library overridable toggle
The toggle (for anything but float and int types) was swallowed in
bf948b2cef. Also seems ef68a37e5d55e17adf4c discarded
`property_overridable_library_set` for bools.

Now treat the overridable toggle as a general property for all property
types.

Pull Request #105370
2023-03-02 15:13:52 +01:00
Campbell Barton
e1ab9e352c Cleanup: autopep8 2023-03-01 22:12:18 +11:00
Bastien Montagne
0ade3dfc14 Merge branch 'blender-v3.5-release' 2023-02-27 15:23:56 +01:00
Damien Picard
c5bbc5db6f I18n: disambiguate a few messages
- "Value" in the sense of color lightness is not the same word in
  Japanese as other usages. See #105113.
- "Double" as a data type vs. a value.

Also extract "Custom Color Presets" in the tracking UI.
Run clang-format as well.

Pull Request #105187
2023-02-27 15:21:00 +01:00
Antonio Vazquez
b558fff5b8 Outliner: New Grease Pencil filter
Actually is impossible to filter the Grease Pencil object type in the Outliner because only Meshes, Cameras and Lights are supported. This patch adds the Grease Pencil filter that allows artists to select only this type of objects. This filter is very handy for storyboarding.

Pull Request #104473
2023-02-27 13:07:14 +01:00
Bastien Montagne
0c67a90e4f #99807: USD IO: Add support for exporting to USDZ
This commit adds the default .usdz export capability.

The importer already supports usdz so no change is required other than updating the text in menu to match the updated exporter text.

On export, a .usd/a/c file has to be created first, and then converted to .usdz. A weird change of directory is required because of a quirk with the USD conversion to usdz. If an absolute filepath is passed into the `UsdUtilsCreateNewUsdzPackage` function, the usd files inside the usdz archive will have the same directory structure, i.e. if one tries to create a file at `C:\code\BlenderProjects\file.usdz`, when the usdz file is created, inside it will have the structure `\code\BlenderProjects\file.usdc`.

This is counteracted by setting the current working directory to the temporary session directory where both the usdc and usdz files are created, and just passing the file name to `UsdUtilsCreateNewUsdzPackage` without any filepath. Once the usdz file is created it is moved to the intended directory.

There is a separate `UsdUtilsCreateNewARKitUsdzPackage` capability for exporting usdz for iOS devices that will be implemented in a follow up patch as it will require some more small UI changes.

Co-authored-by: Charles Wardlaw (@CharlesWardlaw)
Co-authored-by: Sonny Campbell (@SonnyCampbell_Unity)
Co-authored-by: Bastien Montagne (@mont29)

Pull Request #105185, based on #104556.

Pull Request #105223
2023-02-27 11:59:57 +01:00
Bastien Montagne
54f672cbfa #99807: USD IO: Add support for exporting to USDZ
This commit adds the default .usdz export capability.

The importer already supports usdz so no change is required other than updating the text in menu to match the updated exporter text.

On export, a .usd/a/c file has to be created first, and then converted to .usdz. A weird change of directory is required because of a quirk with the USD conversion to usdz. If an absolute filepath is passed into the `UsdUtilsCreateNewUsdzPackage` function, the usd files inside the usdz archive will have the same directory structure, i.e. if one tries to create a file at `C:\code\BlenderProjects\file.usdz`, when the usdz file is created, inside it will have the structure `\code\BlenderProjects\file.usdc`.

This is counteracted by setting the current working directory to the temporary session directory where both the usdc and usdz files are created, and just passing the file name to `UsdUtilsCreateNewUsdzPackage` without any filepath. Once the usdz file is created it is moved to the intended directory.

There is a separate `UsdUtilsCreateNewARKitUsdzPackage` capability for exporting usdz for iOS devices that will be implemented in a follow up patch as it will require some more small UI changes.

Co-authored-by: Charles Wardlaw (@CharlesWardlaw)
Co-authored-by: Sonny Campbell (@SonnyCampbell_Unity)
Co-authored-by: Bastien Montagne (@mont29)

Pull Request #105185, based on #104556.
2023-02-26 16:36:49 +01:00
Joseph Eagar
0f09678036 Merge branch 'blender-v3.5-release' 2023-02-24 11:47:39 -08:00
Joseph Eagar
a843a9c9bb Sculpt: Add trim orientation to sculpt box trim UI 2023-02-24 11:28:23 -08:00
Brecht Van Lommel
8e50539f1b Merge branch 'blender-v3.5-release' into main 2023-02-23 17:26:52 +01:00
Brecht Van Lommel
a1f899754b Fix #105106: inconsistent order of settings in 3D viewport shading popover
Put compositing settings at the bottom for both Cycles and Eevee.
2023-02-23 17:24:45 +01:00
Falk David
78a54f23db Merge branch 'blender-v3.5-release' 2023-02-23 13:30:53 +01:00
Falk David
059ba28b29 Fix #105026: Texture space operators in transform menu
In curves edit mode, the "Move Texture Space" and "Scale Texture Space"
operators where shown in the "Curves > Transform" menu.

Since these are not implemented, the fix removes these operators
from the menu.
2023-02-23 13:30:15 +01:00
Bastien Montagne
4cd00b1a71 Merge branch 'blender-v3.5-release' 2023-02-23 10:44:54 +01:00
Damien Picard
e410fb4d3c Fix #105067: Error drawing Copy Rotation Constraint UI
The translation contexts module wasn't imported after c7611d61e8,
which caused an error and prevented some constraints' UI from being
displayed.

Pull Request #105095
2023-02-23 10:42:03 +01:00
Christoph Lendenfeld
8756671084 Animation: Add Slider operators to hotkey menu
Before that patch, the slider operators for the Graph Editor are not easily accessible since they don't have a hotkey.
This adds the "d" hotkey for the already existing slider operator menu.

Using the popup menu means that your last used operator will always be under the cursor, so it's quick to access.

Pull Request #104530
2023-02-23 09:29:18 +01:00
Pablo Vazquez
cbb4f8a9ba UI: Add color selector to Bone Groups list
Expose the color selector on each item in the list, so it's easier to see
at a glance the Bone Groups color theme and change it.

Also avoids having color widgets grayed out when not in Custom Colors mode.

Pull Request #105036
2023-02-22 17:34:44 +01:00
Richard Antalik
e1f6587f12 VSE: Add retiming tool
This tools allows to change strip playback speed by manipulating
retiming handles. More handles can be added to single strip to create
variable playback speed.

This tool replaces Speed Factor property in time panel, with exception
of sound strips. Support for sound strips is still in review.

Pull Request #104523
2023-02-22 13:16:32 +01:00
Sergey Sharybin
ecb88eff7e Merge branch 'blender-v3.5-release' 2023-02-21 16:41:47 +01:00
Sergey Sharybin
03806d0b67 Re-design of submodules used in blender.git
This commit implements described in the #104573.

The goal is to fix the confusion of the submodule hashes change, which are not
ideal for any of the supported git-module configuration (they are either always
visible causing confusion, or silently staged and committed, also causing
confusion).

This commit replaces submodules with a checkout of addons and addons_contrib,
covered by the .gitignore, and locale and developer tools are moved to the
main repository.

This also changes the paths:
- /release/scripts are moved to the /scripts
- /source/tools are moved to the /tools
- /release/datafiles/locale is moved to /locale

This is done to avoid conflicts when using bisect, and also allow buildbot to
automatically "recover" wgen building older or newer branches/patches.

Running `make update` will initialize the local checkout to the changed
repository configuration.

Another aspect of the change is that the make update will support Github style
of remote organization (origin remote pointing to thy fork, upstream remote
pointing to the upstream blender/blender.git).

Pull Request #104755
2023-02-21 16:39:58 +01:00