Commit Graph

104153 Commits

Author SHA1 Message Date
Falk David
ddd4c2ae76 Fix: GPv3: Crash when drawing
This should fix one of the remaining crashes while drawing.
The issue was that we would try to write to an out-of-bounds
memory location.

This fixes the issue and also cleans up the code a bit more,
adding more comments and using better names.
2023-10-23 19:41:49 +02:00
Falk David
e1c3a00103 GPv3: Draw strokes relative to the object origin
The drawing plane was at the world origin not the object origin.
This still needs to use the correct drawing plane in the future,
but it's a good step in the right direction.
2023-10-23 19:41:49 +02:00
Falk David
a945d938e3 Cleanup: Rename static function
Renames `calculate_mean` to `arithmetic_mean`.
2023-10-23 19:41:49 +02:00
Julian Eisel
5fab6700cd Cleanup: Move 3D View context functions to own file
Such context functions are often separated out to a context file, to
keep files more coherent and focused.
2023-10-23 19:32:56 +02:00
Julian Eisel
da34c70916 Merge branch 'blender-v4.0-release' 2023-10-23 19:19:38 +02:00
Julian Eisel
ad71b77f25 Fix #114024: "Mark as Asset" doesn't work in 3D View sidebar ID selector
Choosing "Mark as Asset" from the context menu of the ID selector (ID
template) would always use the selected objects instead of the ID set in
the ID selector. This is because since f22e2bab72, multiple selected IDs
have priority over a single active ID (to give batch editing priority),
and the 3D view context exposes both.

Adds variants of the mark and clear asset operators that only work on a
single ID ("id" context member). Context menus for buttons representing
an ID use this instead. Using an operator property resulted in too
complicated code. Plus the poll function would succeed in cases where
the operator wouldn't be able to succeed. Separate operators keep things
simple and more reliable.
2023-10-23 19:18:31 +02:00
Brecht Van Lommel
68e06704a6 Merge branch 'blender-v4.0-release' into main 2023-10-23 19:09:12 +02:00
georgiy.m.markelov@gmail.com
132b90651a MaterialX: Implement White Noise node
There is no float hash in MaterialX so this is only approximate.

Ref: #112864
Co-authored-by: Bogdan Nagirniak <bodyan@gmail.com>
Pull Request: https://projects.blender.org/blender/blender/pulls/113495
2023-10-23 17:31:44 +02:00
georgiy.m.markelov@gmail.com
be477f069c Fix #113954: Hydra crash if output node for world light is not found
Also improve update handling of world data.

Pull Request: https://projects.blender.org/blender/blender/pulls/113974
2023-10-23 17:25:11 +02:00
Brecht Van Lommel
38ec7ab51a Merge branch 'blender-v4.0-release' into main 2023-10-23 17:14:05 +02:00
Brecht Van Lommel
34a11f962f Fix Cycles time limit not showing unit when scene units are set to none 2023-10-23 17:12:38 +02:00
Clément Foucault
aa917282a7 Fix EEVEE-Next: NaN in refraction
Refraction direct light is not implemented yet.
2023-10-23 17:07:40 +02:00
Clément Foucault
98fcb8573c Fix EEVEE-Next: Raytrace: NaN in bilateral denoising
This was caused by the last frame's tile_mask being
sampled instead of the current one.
2023-10-23 16:14:32 +02:00
Dalai Felinto
e42281084b GPv3: Named Layer Selection node
This node supports either a Layer or a Layer Group name as input,
and outputs a selection field for it.

Known limitations to be addressed separately:

* We are not warning/keeping track of the named layers.
* There is no lookup for layers (groups) yet.

Ref !113908.

Pull Request: https://projects.blender.org/blender/blender/pulls/113908
2023-10-23 15:49:39 +02:00
Dalai Felinto
6b7d0fe425 GPv3: Layer Selection modifier input
Known limitations to be addressed separately:

* We are not warning/keeping track of the named layers.
* There is no lookup for layers (groups) yet.

Ref !113908.
2023-10-23 15:49:34 +02:00
Dalai Felinto
f312be62ea GPv3: Named Layer Selection field
This field supports either a Layer, or a Layer Group name as input,
and outputs a selection.

The nodes that use this should add the name to the list of Named
Dependencies of the node-tree.

Ref !113908.
2023-10-23 15:49:34 +02:00
Sebastian Parborg
b77209e617 Merge branch 'blender-v4.0-release' 2023-10-23 15:03:43 +02:00
Pratik Borhade
357c213cde Fix #114010: Can't duplicate object data
This is due to missing switch case for new Grease pencil object.

Pull Request: https://projects.blender.org/blender/blender/pulls/114057
2023-10-23 13:10:22 +02:00
Clément Foucault
d91da78b35 Fix #113266: Viewport: Color banding in viewport image render
This was caused by the framebuffer incorrectly being recreated
using a byte buffer. From now on, always use the input format
or guess the format based on the output bitdepth.

Pull Request: https://projects.blender.org/blender/blender/pulls/114061
2023-10-23 13:09:59 +02:00
Pratik Borhade
32638cb4c3 Merge branch 'blender-v4.0-release' 2023-10-23 16:37:37 +05:30
Pratik Borhade
b8705d342f Fix #113112: Loop Cut and Slide from menu is waiting for cursor input
This is because `TRANSFORM_OT_edge_slide` has `OPTYPE_DEPENDS_ON_CURSOR`
flag set. Due to this, invoke call to loop-cut operator was not sent
from function `WM_operator_name_call_ptr_with_depends_on_cursor`.
Since `edge slide` operator does not depend on actual cusor position, we
can remove this operator flag to fix the problem.

Pull Request: https://projects.blender.org/blender/blender/pulls/113140
2023-10-23 13:05:45 +02:00
Falk David
e6ad2b03ee Fix: Vector: print_stats function
When using this function, it wouldn't compile because the `address`
parameter was not `const`.
2023-10-23 13:04:53 +02:00
Bastien Montagne
65a6350250 Merge branch 'blender-v4.0-release' 2023-10-23 12:13:57 +02:00
Damien Picard
c7a6ede996 Fix #113981: ID plural names using spaces instead of underscores
Translation markers `N_()` were added to IDs' plural names in !113912.
I also renamed some of those because I thought there were only display
names.

This commit reverts the renaming, leaving only the addition of the
markers.

Pull Request: https://projects.blender.org/blender/blender/pulls/114030
2023-10-23 12:05:28 +02:00
Julian Eisel
3817c31e82 Fix crash when opening new asset shelf by dragging
Steps to recreate were:
- Open factory startup
- Add armature, switch to Pose Mode
- Drag upwards the little triangle/chevron tab in the lower right of the
  3D View

If the asset shelf would be displayed the first time for an editor, the
asset shelf data isn't valid yet and can't be accessed.
2023-10-23 11:59:03 +02:00
Falk David
567cc7cf9f Fix: GPv3: Make sure to call .save() on attribute writer
In the draw tool in the `process_extension_sample` we would
create an `GSpanAttributeWriter` to initialize the default values for
the new points, but we would return early for curve attributes.
This return needs to happen before we create the `GSpanAttributeWriter`.
2023-10-23 10:44:02 +02:00
Sergey Sharybin
036e494564 Cleanup: Fix outdated comment
Pull Request: https://projects.blender.org/blender/blender/pulls/114051
2023-10-23 09:58:42 +02:00
Campbell Barton
cdac2b813e Merge branch 'blender-v4.0-release' 2023-10-23 12:31:14 +11:00
Campbell Barton
6b4d16363d Merge branch 'blender-v4.0-release' 2023-10-23 12:22:58 +11:00
Campbell Barton
a60de8a940 Merge branch 'blender-v4.0-release' 2023-10-23 12:22:52 +11:00
Campbell Barton
d2b86610f0 Fix animation player continuing to playback audio when paused
Using arrow keys for frame stepping would keep playing back audio.
Also move play/pause to utility functions.
2023-10-23 12:20:44 +11:00
Campbell Barton
25ec651018 Cleanup: clarify naming for the animation player
The animation player used abbreviations in confusing ways:
`wait2` with no `wait1`, `indicator` without noting what was indicated,
`fstep` & `sstep` terms also weren't all that obvious.
Use clearer & more verbose names.
2023-10-23 11:49:17 +11:00
Richard Antalik
86778d4554 Fix VSE retiming speed transition can not be moved
In earlier design, retiming selection was managed outside of retiming
keys struct. This was changed to a flag of the retiming key struct.

Since moving of the transition deletes and re-creates keys, the
selection was lost. Selection is now re-established in
`seq_retiming_transition_offset()`.
2023-10-23 02:38:11 +02:00
Richard Antalik
14827de2a9 Fix #112267: Multiply doesn't multiply alpha channel
After eda58d6419, multiply operation does not affect alpha channel, but
Some users do expect this feature present.

This adds option `multiply_alpha`, so that multiplication (in strip
color panel) will affect alpha channel as well.

Pull Request: https://projects.blender.org/blender/blender/pulls/113791
2023-10-23 02:37:41 +02:00
Campbell Barton
fd212e3f6c Merge branch 'blender-v4.0-release' 2023-10-23 11:28:04 +11:00
Campbell Barton
4b1d185887 Fix crash when the animation player fails to create a texture (take 2)
Alternate fix for [0], a crash when a texture fails to load since this
seems to cause animation playback to fail on WIN32, see #113849.

While I can't redo the error, the main change was setting up
`immVertexFormat` before calling `ocio_transform_ibuf`.

[0]: 34899ec13d.
2023-10-23 11:26:55 +11:00
Campbell Barton
a65f806658 Revert "Fix crash when the animation player fails to create a texture"
This reverts commit 34899ec13d.

This causes issues on WIN32 which I'm unable to reproduce.
Resolving the error with textures failing to load can be done with
fewer changes.
2023-10-23 11:25:13 +11:00
Campbell Barton
dcc6a9d73b Revert "Fix crash when the animation player fails to create a texture"
This reverts commit 34899ec13d.
2023-10-23 10:58:56 +11:00
Campbell Barton
14247f9194 Cleanup: add missing source files to CMake 2023-10-23 10:19:57 +11:00
Campbell Barton
b8d1860d29 Cleanup: use curves_* prefix for curves editor files 2023-10-23 10:17:22 +11:00
Campbell Barton
351e993454 Cleanup: add SPDX-FileCopyrightText to header 2023-10-23 10:10:44 +11:00
Campbell Barton
87a969e7fc Cleanup: sort files in CMake 2023-10-23 10:09:52 +11:00
Campbell Barton
c8c2343b4b Cleanup: spelling in comments 2023-10-23 10:09:05 +11:00
Pratik Borhade
499f898400 Merge branch 'blender-v4.0-release' 2023-10-22 11:12:03 +05:30
Milan Davidović
19b112b11c Fix #112683: Removing the last Annotations layer produces a warning.
After removing the last Annotations layer, the current GPencil block
needs to be freed.

Pull Request: https://projects.blender.org/blender/blender/pulls/113274
2023-10-22 07:39:32 +02:00
Harley Acheson
b53111e935 BLF: Improved Cached Fallback Font Setup
Changes to FontBLF initialization so that the cached fallback fonts,
which remain faceless until needed, get all required setup.
Otherwise they are not kerned and we also don't get metrics from them.

Pull Request: https://projects.blender.org/blender/blender/pulls/114018
2023-10-22 03:54:57 +02:00
Harley Acheson
fd63c01c4f Cleanup: Make format
Formatting changes resulting from Make Format
2023-10-21 18:06:50 -07:00
Dalai Felinto
9453031730 GPv3: Instance on Points
Note: Attributes are not propagated from Curves or points yet. It will be handled separately on main.

Part of #113602.

Ref !113705.
2023-10-21 22:37:51 +02:00
Falk David
eab204b0a4 Fix: GPv3: Radial brush size control broken
Since 07749b38 the hack in the radial control code is no longer needed,
because the brush is in screen space (pixels) anyway.
2023-10-21 17:49:27 +02:00
Falk David
44e2681459 Fix: GPv3: Drawing tool didn't initialize all attributes
Attributes that were not immediatly written to after the `curves.resize(...)` did not get initialized to default values in the new stroke.

Pull Request: https://projects.blender.org/blender/blender/pulls/114005
2023-10-21 17:33:53 +02:00