Commit Graph

121743 Commits

Author SHA1 Message Date
Philipp Oeser
2753cc6e39 Fix: python error in Particle Properties without a psys
Code added in 94a54ab5549b wasnt checking if there was a particle system
on the object at all.

Pull Request #104819
2023-02-17 16:32:37 +01:00
Germano Cavalcante
9b129e5533 Fix #104347: Loop Cut Tool becomes impressive with GPU Subdivision
When updating a mesh, the GPU Subdivision code makes calls to
`GPU_indexbuf_bind_as_ssbo()`.

This may cause the current VAO index buffer to change due to calls from
`glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, ibo_id_)` in
`GPU_indexbuf_bind_as_ssbo()`.

The solution is to unbind the VAO (by calling `glBindVertexArray(0)`)
before creating the index buffer IBO.

Co-authored-by: Germano Cavalcante <grmncv@gmail.com>
Pull Request #104873
2023-02-17 10:53:39 -03:00
Sergey Sharybin
54b1e71dda Make update: Allow amd64 architecture
Apparently, the 65bit Intel architecture is presented differently
on Linux and Windows.

Allow both variants for the command line, so that semantically the
command line argument can be seen as a lower case platform.machine.
2023-02-17 14:35:53 +01:00
Sergey Sharybin
60abeddc55 Make update: Add --architecture command line attribute
Possible values are x86_64 and arm64.

Allows to use make_update.py in a cross-compile environment, like
building x86_64 macOS Blender from Apple Silicon machine.

Pull Request #104863
2023-02-17 13:42:15 +01:00
Christoph Lendenfeld
6ffaee8d9a Fix #95400: Crash when running Euler Filter on baked Curves
Fix a crash when using the Euler Filter from the Graph Editor on baked curves.

The crash happened because baked curves have no bezt array.
Skipping any curves where that was missing fixes the issue.

Co-authored-by: Christoph Lendenfeld <chris.lenden@gmail.com>
Pull Request #104858
2023-02-17 11:45:11 +01:00
Sergey Sharybin
a4b92a6814 Fix #104829: Clip editor has poor performance when Metadata panel is closed
According to the report it is a regression since 3.2, but it is tricky
to pin-point which exact commit caused it.

The root of the issue is that under certain circumstances frame might
be read and processed twice, depending on the order in which panels and
the main area is drawn: the footage information panel skips cache, so
it it is drawn prior to the main area it leads to 2 frame reads. Opening
the Metadata panel triggers code path which forces frame to be put to
the cache, solving the double frame read.

Solution is simple: do not skip cache when acquiring image buffer for
the footage information: the same frame will be needed for the main
area as well.

Pull Request #104860
2023-02-17 10:56:10 +01:00
Sergey Sharybin
09b9106e3d Make update: Use BKE_blender_version to detect release branches
On a user level there are no expected changes, other than being able
to update submodules and libraries from a main repository at a detached
HEAD situation (which did not work before).

On the infrastructure level of things this moves us closer to ability
to use the main make_update.py for the buildbot update-code stage, and
to remove the update-code section from the pipeline_config.yaml.

The initial idea of switching make_update to the pipeline config did
not really work, causing duplicated work done on blender side and the
buildbot side. Additionally, it is not easy to switch make_update.py
to use pipeline_config.yaml because the YAML parser is not included
into default package of Python.

There will be few more steps of updates to this script before we can
actually clean-up the pipeline_config: the changes needs to be also
applied on the buildbot side to switch it to the actual make_update.

Switching buildbot to the official make_update.py allows to much more
easily apply the submodules change as per #104573.
2023-02-17 10:04:37 +01:00
Philipp Oeser
c624e56ffc Fix #104810: Appending a camera does not pull in background movie clip
This was broken even before 0649e6371629 and was always expanding the
`Image`, not the movie clip (even if the source was set to
`CAM_BGIMG_SOURCE_MOVIE`)

Now the rule here seems to be to always expand unconditionally, so
remove checking the source and always expand image and movie clip.

Co-authored-by: Philipp Oeser <philipp@blender.org>
Pull Request #104815
2023-02-17 09:36:16 +01:00
Hans Goudey
efc2e5134f Fix #104841: Split function for Cycles for sharp edges ignores attribute
Cycles uses the "split faces" mesh function to support sharp edges
and auto-smooth. However, 75ad8da1ea6799e3983e updated that
function to ignore the edges that are explicitly tagged as sharp and
only use the edge angle. Fix by taking the attribute into account too.
2023-02-16 16:59:58 -05:00
Hans Goudey
4ebb66864a Fix #104826: Mesh to BMesh with shape keys can corrupt layers
The custom data layer mappings from dfacaf4f409287baa1c8 were created
*before* the BMesh shape key layers were added, invalidating the BMesh
data offsets they stored. Fix by creating the mappings after all layers
have been created.
2023-02-16 16:30:59 -05:00
Iliya Katueshenock
eb5fead5ac Fix: Use proper types in compare node link drag search options
Clean up logic to make it more clear and formalize the way to choose
fixed node data type based on operation. This make possible to more
easily fix wrong node data type for color type and less than ops.

Pull Request #104617
2023-02-16 15:18:56 -05:00
Hans Goudey
9f41f95c8e Fix #104785: Quick fur keeps asset status of appended node groups
Use the recently added "clear_asset_data" option in the append operator.

Pull Request #104828
2023-02-16 18:14:47 +01:00
Hans Goudey
81b53aa507 WM: Add option for clearing asset data to append operator
When appending assets it often isn't expected for the asset tags and
meta-data to be included. Add an option to the append operator to
disable appending the asset data, exposing existing internal options.
2023-02-16 11:17:02 -05:00
Colin Marmond
9edb1d0a7c Fix #104166: Add redraw for asset marking and unmarking
When the users click the "Mark as Asset" with the mouse hover the fake
user button, the button was not refreshed. In fact, the areas are not
listening to the "NC_ID NA_EDITED", which is the signal emitted after
an asset is marked/unmarked. Because of this, the areas aren't redrawn
(especially the ID buttons).

This little patch adds the event listening for the areas where this
problem is happening  node editor and properties editor.

Pull Request #104694
2023-02-16 16:26:23 +01:00
Falk David
47934b5c2b Curves: Add remove_selection function
This adds a `remove_selection` function that can be used by other
objects that make use of `CurvesGeometry`.

Pull Request #104813
2023-02-16 15:26:13 +01:00
Pablo Vazquez
c785e7431e Themes: Fix several issues in Blender Light theme
* Fix #92539: Hard to read the breadcrumbs.
* Fix View Item active, hover, and text color (e.g. count numbers in the
  Spreadsheet were almost unreadable).
* Fix mismatching node type colors with the default theme.
  Blender Light is meant to be simply a brighter version of the default,
  so screenshots and tutorials can be followed with both themes.
* Use the same outline color for widgets, so they match when aligned in a row.
* Make panels standout (not fully transparent), like in the default theme.
2023-02-16 14:39:41 +01:00
Hans Goudey
9d15b3f424 Fix #104697: Curves Sculpt: Setting brush shortcuts does not work
The active tools in `_defs_curves_sculpt` don't use names that are
exactly the same as the corresponding brush name with "builtin_brush."
at the beginning, instead they use more standard identifiers without
capitals or spaces.

The "brush_select" utility operator assumed the names matched though.
That can be fixed by manually mapping the brushes to the active tools.

Pull Request #104792
2023-02-16 13:48:39 +01:00
Hans Goudey
c9285f83ab Fix #104698: Assert and failure adding shortcuts to curves sculpt tools
The keymap name in `WM_keymap_guess_from_context` didn't match the
name of the keymap in the Blender default keymap (`km_sculpt_curves`).
Fix by changing the utility function to match the keymap name.

Before right clicking on any tool in curves sculpt mode gave an assert,
now it shows a context menu.

Pull Request #104791
2023-02-16 13:47:13 +01:00
Richard Antalik
4cb119f533 Fix #104584: Reassigning effect strip input does not update its position
Lookup cache was not invalidated, to update attached effects position, a handle
of a input strip is touched.

To update attached effects, currently the code only does that when strip
position is changed. This is, because effect strip updating is done internally
in sequencer module code and ideally shouldn't be done at all. A TODO comment
with further explanation is added.
2023-02-16 00:48:52 +01:00
Miguel Pozo
7a76f2ae77 Fix #104370: Draw: Don't request the same attribute more than once
Avoid running out of attributes when multiple material slots use the same one.

Cleanup:
Removes the return value from drw_attributes_add_request since it shouldn't be modified afterward and it's never used.
Avoid making copies of DRW_AttributeRequest in drw_attributes_has_request.

Co-authored-by: Miguel Pozo <pragma37@gmail.com>
Pull Request #104709
2023-02-15 23:54:51 +01:00
Hans Goudey
d465b92823 Cleanup: Make format, fix missing static warning 2023-02-15 17:39:53 -05:00
Colin Marmond
c59d2f3f2d Fix #102529: De-duplicate add node search items with assets
Fix a little omission. The id name has a 2 char prefix which has
to be removed in order to compare to the real name.

Pull Request #104793
2023-02-15 16:10:37 -05:00
Hans Goudey
72a2229848 Fix #104690: Evaluated positions user-after-free for copied poly curves
The evaluated positions cache can live longer than a specific
`CurvesGeometry`, but for only-poly curves, it pointed to the positions,
which are freed when the curves are. Instead, use the same pattern
as the evaluated offsets and don't store the positions span, just return
it when retrieving evaluated positions.
2023-02-15 13:26:06 -05:00
Hans Goudey
b7e39acfcd Fix #104789: uv_layers.remove() always raises error
A simple typo from 6c774feba2c9a1eb583. Also return
so nothing happens when the UV map isn't found.
2023-02-15 13:25:46 -05:00
Julian Eisel
1116d821dc Fix weird icon padding in asset library selector menu button
Since the menu doesn't automatically align the labels like other menus
and pulldowns in Blender, I manually made them align using the blank
icon. However the menu button would also include this blank icon now.

This is a specific fix for the 3.5 release. In the main branch I will
replace it with proper support for automatically aligning labels in such
menus.
2023-02-15 15:59:12 +01:00
Julian Eisel
a7ccb3df3e Fix possible compiler warning and linker error
Type was forward declared as class, but is a struct. GCC is quiet about this
Clang gives a warning about potential linker errors on MSVC.
2023-02-15 15:37:30 +01:00
Thomas Dinges
a0b4da2bd0 Splash screen for Blender 3.5
Credits: Nicole Morena
2023-02-15 14:14:14 +01:00
Thomas Dinges
904b7e4e41 Blender 3.5 Beta:
* BLENDER_VERSION_CYCLE set to beta
* Update pipeline_config.yaml to point to 3.5 branches and svn tags
* Update and uncomment BLENDER_VERSION in download.cmake
2023-02-15 13:56:14 +01:00
Julian Eisel
5bac672e1a Asset Browser: Add separator line & icon padding for import method menu
Usually when a menu item displays an icon, we indent all other items
with an empty icon so items align nicely. Now with more built-in asset
libraries (the new "Essentials" library), this inconsistency becomes
more apparent.

Also add a separator line between the "All" asset library and the
others, makes the menu look more organized.
2023-02-15 13:11:10 +01:00
Julian Eisel
e3b5a2ae15 Asset Browser: Hide import method menu for essentials
Essentials always use "Append (Reuse Data)", displaying the menu to
change that doesn't make sense.
2023-02-15 13:03:36 +01:00
Julian Eisel
0d798ef57c Assets/UI: Use UI-list for asset library preferences UI
The Preferences for asset libraries are becoming more than a simple name
+ path. E.g. there is now an Import Method options, and we previously
also considered a Relative Paths option (which we may still want to
add). The previous UI, while consistent with the Auto Run Python Scripts
UI isn't well suited for less than trivial cases. Using UI lists makes
the UI more scalable and follows usual list UI patterns more. There is
also more space for the path button now.

Part of #104686.
2023-02-15 13:00:17 +01:00
Julian Eisel
972f58c482 Asset Browser: Rename "Import Type" to "Import Method"
"Type" sounds like you're selecting a thing, not a behavior. So "Method"
should be better. Part of 104686.
2023-02-15 12:58:15 +01:00
Julian Eisel
ae84a2956e Assets: Preference for default import method for an asset library
The default import method for an asset library can now be determined in
the Preferences. The Asset Browser has a new "Follow Preferences" option
for the importing. The essentials asset library still only uses "Append
(Reuse Data)".

This is part of #104686, which aims at improving the import method
selection, especially for the introduction of the new essentials library
(which doesn't support certain import methods). Further changes are
coming to improve the UI, see #104686.

Pull Request: #104688
2023-02-15 12:51:23 +01:00
Hans Goudey
4387dbf03e Curves: Replace quick fur operator, add to add menu
The quick fur operator now uses the new hair system. It adds a new
curves object for every selected mesh, and adds geometry nodes
modifiers from the essentials assets that generate curves. A few
settings are exposed in the redo panel, including an option for whether
to apply the modifier to generate the initial curves so that there is
original editable data.

The point of the operator is to give people a sense of how to use the
node groups and to give a very fast way to build a basic setup for
further tweaking.

Pull Request #104764
2023-02-15 12:13:34 +01:00
Sergey Sharybin
837ba82402 Fix #90629: VSE: Split selection is determined by menu position
Use the right hand side selection, as it fits the typical workflow
the best.

Arguably, the same would need to be done for the k-shortcut, but
that is another issue to be tackled. As well as making the selection
active.

Pull Request #104777
2023-02-15 12:05:37 +01:00
Antonio Vazquez
1a94457586 Fix #104760: GPencil Fill Gap circles no longer disappear when blue line appear
The problem was the alpha channel was set wrongly and the original 0 value was replaced with 1 by error.
2023-02-15 11:55:32 +01:00
Jacques Lucke
35cde8b5fd Curves: move edit mode out of experimental
We (Dalai, Hans, Falk, Simon and me) decided that the curves edit mode
is useful enough to justify moving it out of experimental now. So far it
supports the following features:
* Various selection tools. The selections are synced with sculpt mode.
* Transform tools.
* Delete curves/points.

More functionality of the old curve edit mode will be ported over in
future releases.
2023-02-15 11:43:55 +01:00
YimingWu
ef46f735f3 Cleanup: LineArt: Remove lineart_cpp_bridge.cc
Removed this file because lineart_cpu.cc is already c++.

Pull Request #104736
2023-02-15 11:33:37 +01:00
Jason Fielder
7481a36d51 EEVEE: Remove unnecessary material optimization assertion.
Fix unreported assert in basic scenes.

Authored by Apple: Michael Parkin-White

Pull Request #104775
2023-02-15 11:27:25 +01:00
Hans Goudey
3807a0981e Curves: Add delete operator to edit mode
This implements the delete operator in curves edit mode. The behavior
is similar to the delete operator in the edit mode of legacy curves,
i.e. it's actually dissolving and doesn't split curves. This is also
the behavior that we generally want for the hair use case.

The operator is added to the `Curves` menu and can be accessed via
the keyboard using `X` or `Del`.

Pull Request #104765
2023-02-15 10:50:01 +01:00
Jacques Lucke
ddc6815b1a Curves: add Curve Parameter Falloff to comb brush
This adds a new `Curve Falloff` popover to the comb brush tool settings.
The curve control allows changing the brush weight along the curve to
e.g. affect the tip more than the root. This is a relative way to get
something like stiffness for short hair.

This functionality could potentially be added to some other brushes,
but the comb brush is the most important one, so that is added first.

I did add the buttons add the buttons to choose a curve map preset.
However, I did not add the preset dropdown, because that just adds
some unnecessary complexity in the code now and is redundant.

Pull Request #104589
2023-02-15 10:42:30 +01:00
Campbell Barton
fc6d13eced Cleanup: extract the check to save a blend file into a function
Part of D11422 by @filedescriptor, makes it convenient to run a funciton
when the file cannot be saved.
2023-02-15 16:19:49 +11:00
Campbell Barton
e424931cf7 Cleanup: rename Byte to Bytes in Python string utilities
These functions operate on byte arrays, not a single byte,
match naming for CPython's PyBytes_AS_STRING.
2023-02-15 16:19:14 +11:00
Hans Goudey
6661342dc5 Mesh: Set active attribute values edit mode operator
This patch adds a simple operator to set values of the active
attribute for the selected element. The aim is to give simple control
over attribute values in edit mode rather than to provide the fastest
workflow for most cases. Eventually this operator might be less
important compared to more advanced attribute editing tools, but for
now, exposing a little bit of functionality is low hanging fruit and
will help to see the possibilities.

The implementation mostly consists of boilerplate to register the
necessary property types for the operator and draw their UI.
Beyond that, we just loop over selected elements and set a value.

Pull Request #104426
2023-02-15 04:34:53 +01:00
Campbell Barton
02c3889b1c Cleanup: quiet clang warnings
Quiet unused argument, shadow, array-bounds & range-loop-bind-reference
warnings.
2023-02-15 13:26:54 +11:00
Campbell Barton
8d35b28f2a Cleanup: spelling in comments 2023-02-15 13:11:14 +11:00
Campbell Barton
00a7344f27 Cleanup: quiet warnings from shellcheck, correct indentation 2023-02-15 13:11:06 +11:00
Campbell Barton
8de121ffc6 Cleanup: use 'show_' prefix for RNA sculpt booleans
Follow naming conventions from
https://wiki.blender.org/wiki/Source/Architecture/RNA
2023-02-15 13:11:04 +11:00
Richard Antalik
c3b53abc10 Fix #84057: Delete operator removes unexpected strip
Caused by strips being flagged for removal, but the flag was never
cleared. As far as I can tell, this issue is not reproducible anymore,
but there may be files with this flag still set.
2023-02-15 01:25:38 +01:00
Jorijn de Graaf
dcc80748d3 Fix overlay_uniform_color_clipped inheritance
overlay_uniform_color_clipped was inheriting from overlay_depth_only, which doesn't
make much sense.
I've changed it to inherit from overlay_uniform_color instead, which is consistent
with other \*\_clipped variants of shaders.

Pull Request #104761
2023-02-14 22:21:59 +01:00