Commit Graph

104646 Commits

Author SHA1 Message Date
casey bianco-davis
4dfed520a3 GPv3: Delete operator
Adds the delete operator to edit mode grease pencil, and also adds it to the delete menu.

Pull Request: https://projects.blender.org/blender/blender/pulls/111571
2023-11-17 10:35:56 +01:00
Antonio Vazquez
39f30e848c GPv3: Show All Materials Operator
Adds the Show All Materials operator.

Also includes a refresh of despgraph when the hide prop changes.

Note: The actual render engine does not support hiding by materials.

Related to #114997

Pull Request: https://projects.blender.org/blender/blender/pulls/115001
2023-11-17 10:32:35 +01:00
Hans Goudey
865929d4b1 Cleanup: Retrieve sculpt mask without write access
This may reduce memory usage because the mask data wouldn't
have to be duplicated between the evaluated and original mesh.
2023-11-17 10:29:02 +01:00
Omar Emara
7ea54b7472 Fix #114648: Compositor executes upon editing non-compositor trees
The compositor currently executes when editing node trees that are not
compositor related, like geometry and shader node trees.

That's because the node space listener always tags the compositor to
execute for any node edit notifier. To fix this, we add the ID of the
edited node tree as a reference to the edit notifier and only tag for
an update when the space tree matches the reference one.

Pull Request: https://projects.blender.org/blender/blender/pulls/114978
2023-11-17 08:52:47 +01:00
Jeroen Bakker
54e1ee3905 Vulkan: Combine Data Transfer and Compute Commands
Currently we keep track of 3 command buffers. Data transfer, compute and
graphics. The reason is that data transfer and compute commands cannot
be recorded in a command buffer that has an active render pass.

This PR simplifies the implementation by combining data transfer and
compute commands as there is no need to separate those in individual
command buffers.

This is in preparation of improving submission performance.

Pull Request: https://projects.blender.org/blender/blender/pulls/115033
2023-11-17 08:27:44 +01:00
Jeroen Bakker
35db18af2e Cleanup: Remove Never Failing Check 2023-11-17 07:56:56 +01:00
Harley Acheson
be97ed2828 Fix #115023: Error Measuring Null Menu Item Name
Do not attempt to measure the length of a null string.

Pull Request: https://projects.blender.org/blender/blender/pulls/115027
2023-11-17 06:00:28 +01:00
Hans Goudey
c56912eade Cleanup: Acess geometry bounds more directly
Similar commits:
- 4eeabd274e
- 6301775f48
- ab9716f058
2023-11-17 00:41:37 +01:00
Hans Goudey
da511f5573 Fix: Incorrect freeing in depsgraph RNA objects iterator
Caused by 4d7274b7f4.
The depsgraph iterator was freed twice, and the "custom"
iterator wasn't freed at all. Thanks to Jesse for investigating this.
2023-11-17 00:41:37 +01:00
Harley Acheson
07820b0703 UI: File Browser Display Narrowing
Change the format of columns, and remove columns, as the File Browser
window narrows.

Pull Request: https://projects.blender.org/blender/blender/pulls/112464
2023-11-17 00:11:40 +01:00
Harley Acheson
d3a2673cb8 Fix #102714: Interface Font Selection
When selecting fonts for the interface, show thumbnails
and start in the user-specified fonts directory

Pull Request: https://projects.blender.org/blender/blender/pulls/113259
2023-11-16 22:07:31 +01:00
Harley Acheson
83ce3ef0db Fix #72093: Collapse Wide Enum Lists to One Column
If a multi-column Enum menu gets too wide for the available space,
collapse it to a single column.

Pull Request: https://projects.blender.org/blender/blender/pulls/105386
2023-11-16 21:14:35 +01:00
Hans Goudey
4d7274b7f4 Cleanup: Use C++ types for crazyspace deform storage
Use float3, float3x3, and Array for data used for mesh crazyspace
calculation. Propagate the change wherever necessary to not add
more casting to the old C types.

Because `ObjectRuntime` (and therefore `DEGObjectIterData`) became
non-trivial structs, the code that swaps iterators for RNA depsgraph
object iteration had to be changed a bit to be more friendly to C++
memory semantics.

Pull Request: https://projects.blender.org/blender/blender/pulls/114998
2023-11-16 18:29:52 +01:00
Iliya Katueshenock
6e2fc77e7f Fix #114993: wrong entry in Split to Instances domain dropdown
Pull Request: https://projects.blender.org/blender/blender/pulls/115005
2023-11-16 18:29:34 +01:00
Nate Rupsis
661e7e451a Anim: Rename NLA "Channels" to "Tracks"
Updating "NLA Channel"  to "NLA Tracks" across board, since the terminology "Tracks" is the most prevalent in operators, code, etc.
2023-11-16 17:59:18 +01:00
Philipp Oeser
7f33a743d8 Fix #114963: Image Editor - Fill Tool doesn't work as expected
Caused by 406cfd214a.

Was only filling a single pixel.

Some pointer magic wasnt working after culprit commit.
Now changed to a more common way of accessing.

Pull Request: https://projects.blender.org/blender/blender/pulls/114989
2023-11-16 17:08:13 +01:00
Hans Goudey
807c076e28 Cleanup: Remove unused edit mesh cage bounding box cache
Unused after ffaf3e30ef.
These days there are better ways to cache bounds anyway.
2023-11-16 16:28:06 +01:00
Omar Emara
b71cddb6b4 Fix: Link errors due to different linkage in recent refactor 2023-11-16 16:16:08 +02:00
Jeroen Bakker
782e2e5f9a Vulkan: Make Command Pool, Descriptor Sets Context Specific
In Blender a context should not be shared between threads. In Vulkan a
command pool must not be shared between threads. In the current
implementation the command pool are stored on device level and could
therefore be shared between multiple context which made the implementation
not matching these rules.

This PR moves the command pool from device to command buffers where it
would not conflict between other contexts. This PR doesn't make the Vulkan
backend fully multithreaded. The access to the queue is still missing.

Pull Request: https://projects.blender.org/blender/blender/pulls/114977
2023-11-16 15:03:47 +01:00
Omar Emara
c5eb420c74 Viewport Compositor: Allow access to depth pass
This patch allows access to the depth pass in the Viewport Compositor.

Since the depth information require full precision, making use of the
pass requires the full precision option for now. In the future, this
pass will always be stored using full precision regardless of the
precision option.
2023-11-16 15:04:47 +02:00
Hans Goudey
f27aee857b Cleanup: Remove unnecessary keywords from newly C++ headers 2023-11-16 12:00:26 +01:00
Amelie Fondevilla
d2e40185d3 GPv3: Frame selected channels for grease pencil
Update the code for framing selected channels to take into account grease pencil channels.

Pull Request: https://projects.blender.org/blender/blender/pulls/111512
2023-11-16 11:49:34 +01:00
Hans Goudey
3d57bc4397 Cleanup: Move several blenkernel headers to C++
Mostly focus on areas where we're already using C++ features,
where combining C and C++ APIs is getting in the way.

Pull Request: https://projects.blender.org/blender/blender/pulls/114972
2023-11-16 11:41:55 +01:00
Hans Goudey
451c054d9b Fix #114822: Data transfer modifier doesn't work for face corner normals
In 89e3ba4e25, the preprocess step was removed because the
normals are lazily calculated. But now we need to fetch the source normals
from the correct placed-- they still were looked for in `CD_NORMAL`.
2023-11-16 11:41:33 +01:00
Christoph Lendenfeld
f52d026151 BLI: Two digit ms precision for SCOPED_TIMER macro
When using `SCOPED_TIMER` or `SCOPED_TIMER_AVERAGED`
the display would switch from ns to ms
once the value is over 0.1 ms with a precision of 1.
So when the timer value is hovering in the range of 0.1 - 0.2 ms it is
not giving any useful information.

Fix this by adding another digit to the precision of ms.

Pull Request: https://projects.blender.org/blender/blender/pulls/114724
2023-11-16 10:42:35 +01:00
Sergey Sharybin
5ef5567b82 Fix Strip->Split menu entry not working after recent change
Caused by bfe6128748.

The split frame logic actually became inverted in the update:
when the cursor position is true, then the frame is supposed
to be initialized in the invoke().

The menu does not use cursor position, so the code path where
the frame is retrieved from the RNA properties was used, and
the frame was never initialized in that case.

Pull Request: https://projects.blender.org/blender/blender/pulls/114973
2023-11-16 10:40:37 +01:00
Hans Goudey
31c1207c1a Fix #114830: Sculpt line project inverted
Caused by 44b79af4fc
2023-11-16 10:31:58 +01:00
Pratik Borhade
4ee531cf26 Fix #114848: Crash when adding specular texture slot in texture paint mode
This is because the idname for specular node is changed in 1d265eed5d.
Hence `nodeFindSocket` was returning invalid socket.

Pull Request: https://projects.blender.org/blender/blender/pulls/114884
2023-11-16 09:55:53 +01:00
Philipp Oeser
578b479998 Fix #114892: crash opening old files with text objects
Exposed by 16e4eeb9c0.

In (rare) occasions, a Curve's `CharInfo` can be NULL.
This also crashed going into editmode on affected text objects in
previous versions, however opening and rendering these files was still
fine.

In 4.0, opening those kind of files crashed.

It is not entirely clear how this can happen (there are comments in code
dating back to 97df61a7e5 mentioning "old file", there might be other
reasons, too), still, avoiding the crash on file open seems like good
practice.

Pull Request: https://projects.blender.org/blender/blender/pulls/114916
2023-11-16 09:42:34 +01:00
Hans Goudey
d46d1bbe6a Fix #114948: Parenting crash blender since ObjectRuntime refactor
Caused by 4bcdc57fc8
2023-11-16 09:16:48 +01:00
Harley Acheson
d0c073898a UI: Add Area Split Icons to Header Context Menu
With addition of area splitting icons in #114433,
also use them in Region Context menu.

Pull Request: https://projects.blender.org/blender/blender/pulls/114935
2023-11-15 20:33:49 +01:00
Stefan Heinz
153dd76d22 UI: Icons for Horizontal and Vertical Split
Adding new icons to represent horizontal and vertical area splitting.

Pull Request: https://projects.blender.org/blender/blender/pulls/114433
2023-11-15 20:16:49 +01:00
Harley Acheson
8e691ad5be Cleanup: Arrow Operator Required
Just two changes from dot operator to arrow operator, required because
of recent refactor.
2023-11-15 10:23:45 -08:00
georgiy.m.markelov@gmail.com
d3971628e1 Hydra: Use BKE_camera_params to simplify camera code
Ref #110765

Co-authored-by: Bogdan Nagirniak <bodyan@gmail.com>
Pull Request: https://projects.blender.org/blender/blender/pulls/114370
2023-11-15 19:03:22 +01:00
Harley Acheson
06404082b5 Cleanup: Synchronizing Icons
Mostly just the result of running `blender_icons_update.py` without adding or changing any icon source files. Removal of three unused icons and adding three others to the project to resolve conflicts between them.

Pull Request: https://projects.blender.org/blender/blender/pulls/114874
2023-11-15 18:59:19 +01:00
Hans Goudey
600a133521 Geometry Nodes: Convert four nodes to use rotation socket
Convert the vector socket from four nodes to a rotation socket, adding
versioning to insert the conversion nodes and change the default values
where necessary.
- Distribute Points on Faces
- Instance on Points
- Rotate Instances
- Transform Geometry

Implicit conversions from vectors and floats, and to vectors have been
added, though using rotation sockets directly can be faster, since converting
to and from Euler rotations is slow. Conversion nodes are not inserted
by versioning if the implicit conversions can be used.

This change is not forward compatible with 3.6, and socket values
are lost when opening 4.1 files in 4.0. The correct socket types are
added back in old versions, though newly added conversion nodes
may have to be removed.

Pull Request: https://projects.blender.org/blender/blender/pulls/111482
2023-11-15 18:56:00 +01:00
Hans Goudey
4bcdc57fc8 Refactor: Move object runtime data to separate allocation
Move object runtime data to a separate header and allocate it separately
as `blender::bke::ObjectRuntime`. This is how node, mesh, curves, and
point cloud runtime data is stored.

Benefits:
- Allow using C++ types in object runtime data
- Reduce space required for Object struct in files
- Increase conceptual separation between DNA and runtime data
- Remove the need to add manual padding in runtime data
- Include runtime struct definition only in files that require it

Pull Request: https://projects.blender.org/blender/blender/pulls/113957
2023-11-15 18:46:07 +01:00
Harley Acheson
97d1233bad Cleanup: Make format
Formatting changes resulting from running Make Format
2023-11-15 09:38:01 -08:00
Ray Molenkamp
a277ca3d3d Fix #114906 invalid reuse of shell_link
shell_link was being reused, sometimes returning the previous
data causing links that were not ours to be updated.

Co-authored-by: Harley Acheson <harley.acheson@gmail.com>
Pull Request: https://projects.blender.org/blender/blender/pulls/114924
2023-11-15 18:32:45 +01:00
Hans Goudey
3fcd9c9425 Geometry Nodes: Support node tools in object mode
Extend node tools to display tool assets in object mode as well
as edit and sculpt modes. For consistency with existing Blender
design, selection cannot be set and is just "true" in object mode
because it can't be visualized. The visibility of tools can be
customized per object type in object mode as well.

See #101778

Pull Request: https://projects.blender.org/blender/blender/pulls/114819
2023-11-15 17:01:18 +01:00
Hans Goudey
6d18fe76b5 Fix: Incorrect default used when retrieving material indices 2023-11-15 16:16:22 +01:00
Hans Goudey
9785f2631e Mesh: Add flag to store presence of overlapping topology
For improving performance in the triangulate node (#112264), it's
helpful to know whether the mesh has edges or faces that overlap
each other. If that is known to be false, the node can skip edge de-
duplication.This might apply to the future "Replace Faces" node too.

This information is stored as a flag on the mesh and set in various
places that create "clean" new meshes. It isn't calculated lazily unlike
other other areas, because the point is to improve performance, and
the calculation probably isn't faster than the duplication check it's
meant to replace.

Pull Request: https://projects.blender.org/blender/blender/pulls/113205
2023-11-15 14:02:48 +01:00
Philipp Oeser
bfe6128748 Fix #114891: bpy.ops.sequencer.split ignores passed frame
Caused by 0e01667e25 .

Above commit changed it so that operator properties (set from python)
were ignored for `split_frame` & `split_channel` in case
`use_cursor_position` is False.

Should be the other way around.

Pull Request: https://projects.blender.org/blender/blender/pulls/114905
2023-11-15 12:04:22 +01:00
Bastien Montagne
b416c3da3c Minor cleanup/precision to some comments regarding ID management. 2023-11-15 11:34:09 +01:00
Amine Bensalem
7010a2ee0e Geometry Nodes: Consistent name for points node geometry output
Fixed geometry node socket output name  for issue #113340 to "Points".

Pull Request: https://projects.blender.org/blender/blender/pulls/113353
2023-11-15 11:31:28 +01:00
Hans Goudey
14eb08c3a5 Fix #114870: Object dimensions does not used evaluated geometry
Refactoring of object bounds to make evaluated to original syncing
more explicit wasn't accounted for yet. This was a mistake in the most
recent refactor 1cbd0f5a85.

To fix this, add separate functions to account for `runtime.bb` which
is the data synced from the evalauted object to the original. In future
refactors, `runtime.bb` will be changed more, including a more helpful
name that reflects this purpose.

Pull Request: https://projects.blender.org/blender/blender/pulls/114897
2023-11-15 11:03:04 +01:00
ariva00
d7b7938706 Fix #92287: focal legth not correctly computed when tracking vertial videos
The motion tracking always operates with horizontal sensor mapping, but
conversion code form tracking camera to Blender camera was not setting
the sensor fitting to Horizontal (Python code was leaving sensor fitting
unchanged, C code was setting it to Auto).

Additionally, the Python code was not handling camera shift, making it
so non-centered optical center was not handled correctly.

The reason why the code is written in two places is because C code is
used when conversion from tracking camera to Blender happens after solving
the motion, and the Python code is used for the "Setup Tracking Scene".
It is possible to unify some code, but it is not that much of an importance
at this time.

Pull Request: https://projects.blender.org/blender/blender/pulls/114253
2023-11-15 10:53:30 +01:00
Jesse Yurkovich
3a312babe6 Fix #114847: Skip past more newlines when parsing PLY files
When parsing PLY files it was possible that the buffer would contain
leading newline characters which were not being accounted for.

Ensure we skip past them each time we refill the buffer. Also properly
return an error string when handling such lines in the future.

Pull Request: https://projects.blender.org/blender/blender/pulls/114878
2023-11-15 08:31:55 +01:00
Harley Acheson
5c04b477aa Fix #114855: Crash Loading Win32 Quick Access
Replace use of macro FAILED with explicit checks for S_OK returns. Some
of these functions can return S_FALSE, which indicates a negative
condition that is not failure. It is not caught by the FAILED macro.
Therefore this function will fail in circumstances where the quick
access folder is not found or perhaps empty.

Pull Request: https://projects.blender.org/blender/blender/pulls/114866
2023-11-14 21:16:22 +01:00
Christoph Lendenfeld
dac896edd6 Refactor: code style in keyframes_keylist.cc
No functional changes.

Clean up the code by
* returning early where possible
* removing comments that just repeat what the code does
* Make sure comments follow the style guidelines

Pull Request: https://projects.blender.org/blender/blender/pulls/114851
2023-11-14 16:48:04 +01:00