Commit Graph

120055 Commits

Author SHA1 Message Date
Jacques Lucke
3eb7e453e4 Nodes: add internal node zone type
The goal is to reduce redundancy by abstracting over the different types of node
tree zones. This makes it easier to add new zone types and makes the intend of
code more clear. For example, now it is more obvious what code deals with zones
in general and what does simulation specific things.

Pull Request: https://projects.blender.org/blender/blender/pulls/112531
2023-09-20 14:40:56 +02:00
Hans Goudey
0fd0539f04 Cleanup: Rename grease pencil function to access layer at index
The plural was confusing when only one layer was returned.
2023-09-20 08:39:30 -04:00
Hans Goudey
774b9607c9 Cleanup: Resolve const correctness in grease pencil API
It was possible to access a mutable drawing from a const GreasePencil
object. This sort of mistake is possible because DNA requires using raw
pointers.
2023-09-20 08:28:08 -04:00
Pratik Borhade
8eb2d193c5 GPv3: Re-evaluate object after deleting keyframes
Missing tag for viewport update when keyframes are deleted

Pull Request: https://projects.blender.org/blender/blender/pulls/112621
2023-09-20 13:43:49 +02:00
Pablo Vazquez
817df98056 UI: Add tooltip to color picker modes
Also no need use title-case in "Gamma Corrected" since it is a
description, not a property label.
2023-09-20 12:39:05 +02:00
Brecht Van Lommel
0706cfeea0 UI: improve vertical spacing in node panels
There was too little in some places, especially at the top of panel headers.

Pull Request: https://projects.blender.org/blender/blender/pulls/112593
2023-09-20 11:56:40 +02:00
Campbell Barton
4f1079c35b Fix error comparing the ID property float sub-type
IDP_FLOAT was compared twice, missing the IDP_DOUBLE check.
2023-09-20 17:56:33 +10:00
Campbell Barton
70dff0670b Fix #112610: Nested pie menu items can't be selected
Regression in [0] caused pie menus that contain layouts with buttons
not to be selectable.

[0]: a8db828618
2023-09-20 17:29:06 +10:00
Campbell Barton
50fa5d348e BLI_string: 2nd attempt to resolve cast error for older versions of GCC 2023-09-20 16:38:56 +10:00
Campbell Barton
3df2856f2d BLI_string: attempt to resolve cast error for older versions of GCC
vdev-doc-api-coordinator gives an error relating to this cast.
2023-09-20 16:03:39 +10:00
Campbell Barton
9ed7d7cb03 UI: add extensions section (shown when extension repos are enabled)
This is a place-holder by default, the work-in-progress extensions
add-on makes use of this.
2023-09-20 15:14:07 +10:00
Campbell Barton
e3b77cf08a ImBuf: calculate the JPEG DPI with double precision
These were calculated as floats then converted to doubles,
loosing precision unnecessarily.
2023-09-20 12:12:49 +10:00
Campbell Barton
bdbf1871ec ImBuf: don't include null bytes for jpeg meta-data markers
JPEG strings aren't null terminated, there is no need to include the
null byte. For reference ImageMagick doesn't do this.
2023-09-20 12:12:40 +10:00
Campbell Barton
a0aed358fa BLI_string: assert the len argument to BLI_strdupn is valid
Ensure the string isn't null terminated before len, if this happens
it's likely an error calculating the length argument. Since the length
is passed to memcpy it could result in reading outside `str` bounds.

There was one case where the string was duplicated then grew by 1 byte
afterwards. Replace this with an allocation since it's an uncommon
operation, not especially useful to support.
2023-09-20 12:11:34 +10:00
Campbell Barton
fb81c37077 Cleanup: avoid redundant strlen calls 2023-09-20 12:11:33 +10:00
Campbell Barton
e6ef1c36f0 Cleanup: use sized integer type for BLF tags
Also replace axis-codes in doc-strings with references to BLF defines
as the meaning of these terms wasn't clear.
2023-09-20 12:11:31 +10:00
Campbell Barton
731fc5d980 Cleanup: use strict flags for string utilities & cursor
Make type conversions explicit so it's clear when char/char32_t/uint
values are being mixed, also use int instead of size_t for cursor
functions because the cursor is an int - which caused many int/size_t
comparisons.
2023-09-20 12:11:30 +10:00
Campbell Barton
f8719abdf4 Cleanup: merge key-map clear & free into one loop 2023-09-20 12:11:28 +10:00
Campbell Barton
53cbdaaa8b WM: ensure wmEvent::utf8_buf isn't treated as a null terminated string
In debug mode, fill remaining bytes so functionality that relies
on null termination will alert developers to incorrect use early on.
2023-09-20 09:50:52 +10:00
Richard Antalik
264c3e7bd7 Revert "Fix: Box select not working with tweak took in VSE"
This reverts commit cabf935afb.

After more investigation I have realized, that this change introduces
another regression and more importantly it is not suited for RCS keymap.
2023-09-19 23:26:05 +02:00
Harley Acheson
8cc91fac90 BLF: Embolden Correction & Comments
Slight corrections to embolden, mostly removing any vertical expansion
and better matching "wght" variable axis. Also improved comments for
all the glyph transform routines.

Pull Request: https://projects.blender.org/blender/blender/pulls/112592
2023-09-19 20:02:02 +02:00
Hans Goudey
a531d19b3d Cleanup: Group forward declarations at top of geometry set header 2023-09-19 13:49:04 -04:00
Iliya Katueshenock
6358c5f97c Cleanup: Support value of rotation socket
No functional changes.

Pull Request: https://projects.blender.org/blender/blender/pulls/112473
2023-09-19 19:42:55 +02:00
Richard Antalik
cabf935afb Fix: Box select not working with tweak took in VSE
Use Select Box tool by default.

After 618f39fca2 box select operator is not run with tweak tool. This
is regression for sequencer, but the new behavior is consistent with
other editors.
2023-09-19 17:59:16 +02:00
Sybren A. Stüvel
b48031df8e Anim: armature edit mode, make Shift+M consistent with pose mode
Replace the 'armature layers' operator (which would toggle visibility of
armature layers) with the 'bone collections' menu (which allows assigning
to and unassigning from bone collections). The functionality of these
operators is quite different, but it unifies the behaviour between
armature pose and edit modes.

Selecting which bone collections are visible in the 3D Viewport may be
reintroduced after nestable bone collections are implemented. Otherwise
the list of bone collections will likely become unwieldy.
2023-09-19 17:43:26 +02:00
Jason Fielder
70e99ee8b6 Fix #112258: Resolve broken volumetric world materials in Metal
Ensures correct BuiltinBits Layer flag was specified for materials
using volumetrics.

Authored by Apple: Michael Parkin-White

Pull Request: https://projects.blender.org/blender/blender/pulls/112577
2023-09-19 16:49:00 +02:00
Julian Eisel
974d70918b RNA/BPY: Replace asset_library_ref with asset_library_reference
This is a compatibility breaking change to rename all usages of the name
`asset_library_ref` with `asset_library_reference`. Brecht recently
suggested that such abbreviations should be avoided in public API names.
2023-09-19 16:27:07 +02:00
Julian Eisel
ca58f97cda Refactor: Use asset representation for asset browser context query
There's no need to use the asset handle type here anymore, it can just
use the asset representation type that is supposed to replace it.

Part of #102877 and #108806.
2023-09-19 15:56:11 +02:00
Julian Eisel
f73adee453 Cleanup: Remove unnecessary forward declaration
Missed this in e6f4e62ea0.
2023-09-19 15:55:31 +02:00
Julian Eisel
e6f4e62ea0 Cleanup: Remove unnecessary asset temporary ID consumer override
The override from 733e4d827a makes this one unnecessary.
2023-09-19 15:46:42 +02:00
Julian Eisel
733e4d827a Refactor: Use asset representation from context instead of asset handle
f6a6b27ac1 made the asset representation type available through context
wherever asset handle was previously. This moves us closer to replacing
the asset handle type.

Part of #102877 and #108806.
2023-09-19 15:43:56 +02:00
ChengduLittleA
954ae19b2b Fix #100596: Use sequencer override camera for line art in render
Line art doesn't take sequencer scene override camera into account when
computing line results, now it will try to get override camera info from
render and use that camera if line art override camera itself isn't set.

This will however not fix VSE preview line art result, since the preview
render doesn't give actual camera object, but rather uses a set of clip
planes and matrix info, thus it's probably not possible to do preview
camera override under current architecture.

Pull Request: https://projects.blender.org/blender/blender/pulls/110287
2023-09-19 15:27:47 +02:00
Julian Eisel
dd23e957ea Assets/BPY: Remove unnecessary asset file handle context member
See d973cc7992.
2023-09-19 15:23:45 +02:00
Julian Eisel
d973cc7992 Assets/BPY: Remove unnecessary asset handle related RNA members
The asset handle type is supposed to be replaced by the asset
representation type. It is designed for the asset system as opposed to
the file browser backend. With d421ebac5e, d04cd3f3e6 and f6a6b27ac1, it
can now do everything that is needed in Python to be a replacement.
591a1ae323 removed all usages of these members in the asset handle and
the file entry wrapped by the asset handle. All this should now be
accessed via the `bpy.types.AssetRepresentation` type instead, which is
available everywhere the `AssetHandle` type was available before.

Part of #102877 and #108806.
2023-09-19 15:16:23 +02:00
Julian Eisel
f6a6b27ac1 Assets: Expose asset representation in context RNA/BPY
Makes the asset representation type available in RNA/BPY context
whenever the asset handle type is, so that it can be used instead. See
d04cd3f3e6. With this change we can now replace virtually all usages of
the asset handle type in Python with the asset representation. (Only for
the asset view template we require a collection property taking asset
handles still, for internal reasons.)

Idea is now to first get rid of all usages of asset handle in Python,
so that there's almost no need for further compatibility breaking
changes (unsure if the asset view template can be removed for 4.0
already though). Internal hacks related to it can be removed at any time
still.

Part of #102877 and #108806.
2023-09-19 14:40:01 +02:00
Jeroen Bakker
3a4c238d50 Command Line: Remove Disabling SSBO
Blender has the option to disable SSBO support. This was accessible
as a command line option `--debug-gpu-disable-ssbo`.

Blender 4.0 has a hard requirement for OpenGL 4.3 which includes
SSBO support by default.

This PR removes the command line option as it makes no sense to
have it anymore.

Related to #112224

Pull Request: https://projects.blender.org/blender/blender/pulls/112571
2023-09-19 14:22:32 +02:00
Campbell Barton
5815a00acf Fix duplicate items in edit-mesh select similar enum
The enum contained two instances of NORMAL & FACE,
prefix with VERT/EDGE/FACE for clarity.
2023-09-19 21:26:57 +10:00
Campbell Barton
82be70a95f Fix crashes for some operators poll functions in background mode 2023-09-19 21:19:20 +10:00
Campbell Barton
221182c204 Fix assert accessing bone collection enum
Enum functions shouldn't return null,
use rna_enum_dummy_NULL_items instead.
2023-09-19 21:09:27 +10:00
Julian Eisel
d04cd3f3e6 Assets: Expose more data in the asset representation RNA/BPY
The asset handle type is supposed to be replaced by the asset
representation type. It is designed for the asset system as opposed to
the file browser backend. This commit adds more members to its RNA type
to query data, so more usages of the asset handle type in Python can be
converted.

Part of #102877 and #108806.
2023-09-19 12:24:34 +02:00
Jeroen Bakker
39e6776689 Fix: GPU Incorrect Padding For Globals
A float array use different alignment and reservation rules on
GPU versus CPU. Before this change the _pad1 was aligned to 16 bytes as
it was defined as an array, but on CPU this alignment doesn't
happen.

This is fixed by using 3 floats in stead of a float array for padding.

Pull Request: https://projects.blender.org/blender/blender/pulls/112565
2023-09-19 12:10:31 +02:00
Jeroen Bakker
2d70f46265 Fix: Vulkan Grid Overlay
In Vulkan the grid overlay wasn't rendering correctly. The reason was
a mis alignment in the std430 layout. This PR fixes the std430 layout
so the grid overlay (and perhaps also other sections) would work.

Root cause is that the reserve size if an nVec3 is different when used
as an array versus a single attribute. This was not taken into account
where the overlay flag was read from uninitialized memory.

Pull Request: https://projects.blender.org/blender/blender/pulls/112564
2023-09-19 11:52:59 +02:00
Campbell Barton
a288ab45b7 Fix Python exceptions from RNA methods showed twice
When RNA classes called into their Python methods,
exceptions would display twice once when reported and again from
PyErr_Print. This could happen when a Python defined poll method raised
an exception.

It also wasn't possible to suppress by redirecting `sys.stderr` for
example, because reporting printed directly to the stdout.

Resolve these issues by suppressing the reports output,
leaving PyErr_Print to output errors to sys.stderr.
2023-09-19 19:47:40 +10:00
Sybren A. Stüvel
62639080bc Anim: armature edit mode, replace 'bone layers' operator with collections
In armature edit mode, replace the 'bone layers' operator with the 'move
to bone collection' operator. This operator now works in both pose mode
and edit mode, and is available with the 'M' hotkey in either mode.
2023-09-19 11:45:40 +02:00
Lukas Tönne
78315faf8f Fix #112490: Always draw socket icons in "hidden" nodes
In #112326 the socket visibility functions were updated to take the
open/closed state of panels into account for visibility of the socket
icon. However, in "hidden" (collapsed) nodes the panels should be
ignored entirely, drawing all sockets on the root level. This requires
looking at the node flags to determine socket icon visibility, so a
simple method of `bNodeSocket` is not sufficient.

This patch moves the more complex visibility queries for sockets into
`bNode`, where both node and socket flags can be accessed. These should
be used for actual visibility rather than the plain flag accessors on
`bNodeSocket`.

Renamed `is_visible_or_panel_closed` back to just `is_visible`, the
other `is_visible` variant is now integrated in `bNode::is_socket_drawn`.

Pull Request: https://projects.blender.org/blender/blender/pulls/112520
2023-09-19 10:47:21 +02:00
Campbell Barton
75748f9d7a Fix error displaying exceptions in some cases
Replacing PyErr_Print with PyErr_Display in [0] caused string errors
not to display because PyErr_Display doesn't normalize the exception.

Normalizing before displaying the error resolves this.

[0]: 6a0f98aeef
2023-09-19 18:25:28 +10:00
Campbell Barton
097b97518c Fix crash running "Operator Cheat Sheet" 2023-09-19 17:27:42 +10:00
Campbell Barton
9f06aec32f Cleanup: de-duplicate sequencer modifier enum items 2023-09-19 17:22:49 +10:00
Campbell Barton
6b1b41bbd6 Fix #112541: Tooltip for "Set Tool by Name" crashes in operator search 2023-09-19 16:16:17 +10:00
Campbell Barton
d8b8089630 Cleanup: spelling & typo in last commit 2023-09-19 15:53:51 +10:00