Commit Graph

133177 Commits

Author SHA1 Message Date
Jesse Yurkovich
0f266ca3c9 Fix #118704: STL batch export used wrong filename
The newly generated filename for batches was not used.

Pull Request: https://projects.blender.org/blender/blender/pulls/118708
2024-02-25 00:01:33 +01:00
Sergey Sharybin
9277377f6b Make update: Show Git LFS download progress
Solves the issue of the script potentially sitting for a long time
without having any progress reported. Confusingly, such behavior
depends on Git version.

In older versions (< 2.33) there will be progress reported, but it
then got changed by the commit in Git:

  7a132c628e

The delayed checkout is exactly how Git LFS integrates into the Git
process. Another affecting factor for the behavior is that submodule
configured to use "checkout" update policy is forced to have quite
flag passed to the "git checkout":

  https://github.com/git/git/blob/v2.43.2/builtin/submodule--helper.c#L2258

This is done to avoid the long message at the end of checkout about
the detached state of HEAD, with instructions how to resolve that.

There are two possible solutions: either use "rebase" update policy
for submodules, or skip Git LFS download during the submodule update.

Changing the update policy is possible, but it needs to be done with
a bit of care, and possible revised process for updating/merging
tests data.

This change follows the second idea of delaying LFS download for a
later step, so the process is the following:
- Run `git submodule update`, but tell Git LFS to not resolve the links
  by using GIT_LFS_SKIP_SMUDGE=1 environment variable.
- Run `git lfs pull` for the submodule, to resolve the links.

Doing so bypasses hardcoded silencing in the Git. It also potentially
allows to recover from an aborted download process.

The `git lfs pull` seems to be a nominal step to resolve the LFS links
after the smudging has been skipped. It is also how in earlier Git
versions some Windows limitations were bypassed:

  https://www.mankier.com/7/git-lfs-faq

The submodule update now also receives the "--progress" flag, which
logs the initial Git repository checkout process, which further
improves the feedback.

The byproduct of this change is that an error during precompiled
libraries and tests data update is not considered to be fatal.
It seems to be more fitting with other update steps, and allows
more easily reuse some code.

There is also a cosmetic change: the messages at the end of the
update process now have their own header, allowing more easily
see them in the wall-of-text.

Pull Request: https://projects.blender.org/blender/blender/pulls/118673
2024-02-23 17:40:59 +01:00
Philipp Oeser
c75d2d09e3 Fix: Cloth could ignore "Shear" vertexgroup
Oversight in e3d31b8dfbdc

While most situations would have other vertexgroups set anyways (so this
probably wasnt noticed, it was only ignored if it is the only
vertexgroup used), at least theoretically it could happen that
`cloth_uses_vgroup` would return false even then `vgroup_shear` is set
(thus skipping actually setting these weights later).
2024-02-23 15:34:12 +01:00
ok_what
8b5f11839e Fix: Copying strip inside meta, copies top-most meta instead
When inside a meta strip, copying and pasting a strip would copy the
top-most meta strip, rather than the intended strip.

Pull Request: https://projects.blender.org/blender/blender/pulls/118090
2024-02-23 15:08:14 +01:00
Weizhen Huang
95d11b0d33 Fix Cycles area light using MIS when the spread is zero
area light with zero spread was introduced in bf18032977. Such paths can
only be sampled with NEE, so MIS should not be used.
This fixes the discrepancy when Direct Light Sampling is set to MIS or NEE.

Pull Request: #118584
2024-02-23 12:40:48 +01:00
Weizhen Huang
f7c94754a0 Tests: Update microfacet hair reference render for changes 2024-02-23 12:36:55 +01:00
Weizhen Huang
c292d4dbee Fix assigning value to nullptr 2024-02-23 12:29:39 +01:00
Weizhen Huang
63dd44c810 Cleanup: avoid implicit conversion from int to float 2024-02-23 12:28:46 +01:00
Weizhen Huang
92c4a5fa09 Fix Principled Hair Huang wrong TIR condition
`cos_theta_t` was not initialized for TIR case

Thanks Christophe Hery for spotting the bug
2024-02-23 12:28:23 +01:00
Weizhen Huang
65d910aef7 Fix wrong roughness in Principled Hair Huang trrt+ component 2024-02-23 12:28:08 +01:00
Sergey Sharybin
63613e431e Fix make update pulling libraries when --no-libraries is provided
Likewise, skip tests update when --use-tests is not provided.

It was a bit of ambiguous situation because libraries and tests
are technically submodules. After some feedback it seems that it
is better to ignore submodule for libraries and tests unless
requested explicitly.

Pull Request: https://projects.blender.org/blender/blender/pulls/118631
2024-02-23 12:24:22 +01:00
Pratik Borhade
80e7c04726 Fix #118475: Regression: NLA/driver data missing in outliner
Caused by 0a633a4e07
NLA and driver tree-elements were not added to the outliner when
"action" is unlinked from the object. This is due to the wrong `if`
condition preventing the excution of `expand_drivers/expand_NLA_tracks`.

Pull Request: https://projects.blender.org/blender/blender/pulls/118597
2024-02-23 12:07:40 +01:00
Philipp Oeser
199f8ad817 Fix #118643: Translation of enum button tooltip not working in cases
Originally caused by 90c4e2e6ec [which did not translate the tooltip
descriptions for enum items at all]
That was fixed in cbc5d861db [which was working fine for the default
translation context -- which is most of the time]

Now 7d7318f6c59c added the `BLT_I18NCONTEXT_ID_ID` translation context
to `buttons_context_items` (rightfully so) but using this context on the
enum item **description** translation does not really make sense. So as
a result, the description was not translated in this case.

To resolve, now dont use a special translation context for the
**description** of enum items at all, this is also what
`property_enum_translate` does.

Pull Request: https://projects.blender.org/blender/blender/pulls/118653
2024-02-23 11:50:30 +01:00
Bastien Montagne
556699ed62 Fix install_linux_packages: not-working git-lfs installation. 2024-02-23 11:12:33 +01:00
Philipp Oeser
8b44c62ce7 Fix #118307: Outliner crash with additional constraint on overridden bone
Since `IDOverrideLibraryProperty` apparently stores its rna_path with
string-based collection keys, we have to make sure we also use string-
based keys elsewhere in `OverrideRNAPathTreeBuilder::build_path` and
down the line, otherwise:
- we get duplicate collection entries ("pose.bones[1].constraints" vs.
"pose.bones["Bone.001"].constraints")
- crashes may occur (we are reading on an already freed `TreeElement`
see #118307 for ASAN output)

So now make sure we are using string-based collection keys when we can
so the TreeElements match /and dont get duplicated).

NOTE: the duplication of entries came with 67b92418ee

Pull Request: https://projects.blender.org/blender/blender/pulls/118573
2024-02-23 09:15:37 +01:00
Aras Pranckevicius
3e232aaac1 Fix #118501: crash opening some projects if Load UI is off
Wrong check for vecscope_rgb array free, introduced in 567455124d
2024-02-23 07:27:57 +02:00
Ray Molenkamp
ced066e0c8 make.bat: add additional messaging for the libs download
git on windows is giving no status updates while git lfs
is downloading the libs, causing people to assume its
stuck and interrupt the download. This change adds a
rather large visual message telling people not to do
that.

also it was not respecting people selecting n on the lib
download so some extra messaging has been added there
as well.
2024-02-22 13:09:34 -07:00
Bastien Montagne
ea10be4dd6 install_linux_packages: Add git-lfs to 'build essentials'.
Also define git package for Suse, not sure why it was left unset.
2024-02-22 20:05:22 +01:00
Bastien Montagne
1dca5af712 Core: Libraries: Fix library parenting when libraries are deleted.
So far, when deleting a library (either explicitely, or through e.g.
relocation), its dependencies would get a `nullptr` parent, and
therefore become 'directly used' libraries.

This commit adds a new util to rebuild the libraries hieararchy, and
calls it when a Library ID is deleted.

NOTE: While logic is somewhat similar to what liboverride resync does to
sort the libraries by indirect levels
(`lib_override_libraries_index_define`), there are some key differences
here, notably the fact that if a library has a valid `parent` pointer,
it is not replaced, even if a 'better' parent (less indirect library)
could be found.
2024-02-22 19:25:59 +01:00
Sergey Sharybin
dc2ec78f1d Update submodule hashes
Point to commit with an update gitignore file.
2024-02-22 19:25:12 +01:00
Alaska
56bfd56735 Fix: Cycles incorrect rendering of certain negative strength lights
This fixes an issue where lights that make use of constant negative strength
emission shaders would render with the absolute of their strength.

Pull Request: https://projects.blender.org/blender/blender/pulls/118541
2024-02-22 19:06:22 +01:00
Ray Molenkamp
f0bbb0266a make.bat: fix make update not working properly
Git escaped a quote and used all of the cli arguments as the
folder name.

Also fixes:
- Progress on the initial clone so it doesn't appear stuck
- re-detect python after updating libs, so you don't have to run
  make update twice on a fresh clone.
- Hide python not found warning unless the lib folder exists (this
  seemingly got lost in one of the merges)
2024-02-22 10:40:25 -07:00
Brecht Van Lommel
5810b6bcde Icons: Update for now toolbar icons blend file location 2024-02-22 18:04:12 +01:00
Sergey Sharybin
ffd68db5f4 Fix file name being stored in the view layers CMakeLists 2024-02-22 16:51:46 +01:00
Falk David
c7f2a0567e Cleanup: Rename ensure_git_lfs_hooks to ensure_git_lfs
Since the function no longer adds hooks and skips the process deliberatly, the function name doesn't make sense.
Rename to `ensure_git_lfs`.

Pull Request: https://projects.blender.org/blender/blender/pulls/118626
2024-02-22 16:43:33 +01:00
Sergey Sharybin
6e26ee822b Tweak mnake update's LFS installation further
Ensure the filters are installed, but not the hooks.
Should fix the original issue of developers using custom
hooks in the repository.
2024-02-22 16:06:11 +01:00
Sergey Sharybin
4f567fdc34 Update tests/data submodule
Point it to an updated state with proper gitignore.
2024-02-22 15:56:44 +01:00
Sergey Sharybin
44e121e8c7 Fix URL in previous commit
Need to use pushURL for comparison, not the pull URL.
2024-02-22 15:51:44 +01:00
Sergey Sharybin
df0e64f7d8 Fix incorrect pushURL set on the submodules 2024-02-22 15:48:41 +01:00
Sergey Sharybin
520a08a286 Fix make update in systems with manually installed hooks
If LFS hooks are installed manually the automatic installation would
fail.

This change makes it so `lfs` is a valid command of `git`, ensuring
that the package is installed. If the installation fails assume it
is due to tricky local setup, and do not fail.

Pull Request: https://projects.blender.org/blender/blender/pulls/118618
2024-02-22 15:16:01 +01:00
Brecht Van Lommel
eadfda30e6 Fix: make format and make deps not using new lib directory 2024-02-22 15:11:44 +01:00
Christoph Lendenfeld
a102d3e454 Fix #99635: Make last frame of motion path range inclusive
The issue described was that the motion path didn't display the last frame
of a scene.

This PR makes the user facing motion path range inclusive on both ends.
E.g. when the user specifies a motion path from 1-24 the will now get all 24
frames, whereas previously the motion path would end at frame 23.

This also makes the `Scene Frame Range` option work properly since that
had the same issue. Now it displays the actual full scene range.

Internally, the `bMotionPath` is still exclusive on the upper bound.
It is just the `bAnimVizSettings` range that has been modified.

Pull Request: https://projects.blender.org/blender/blender/pulls/118611
2024-02-22 14:44:26 +01:00
Sergey Sharybin
bcbd62a57e Clang-Format: Ensure single new line at the end of files
This is similar to PR #118031, but addressed to 4.1 branch to
help mitigating style-specific conflicts.

Additionally, explicitly ensure single new line at the end of
the file.

Pull Request: https://projects.blender.org/blender/blender/pulls/118380
2024-02-22 14:42:10 +01:00
Jacques Lucke
e2d809fa91 Fix: show invalid links when separate group input nodes have different linked menu items
Previously, these invalid links would not show as invalid even though they don't work.

Pull Request: https://projects.blender.org/blender/blender/pulls/118610
2024-02-22 14:40:21 +01:00
Sergey Sharybin
7b472b83a3 Fix make_update for libraries update
- git lfs install was called a bit too late, after the libraries
  has been checked out, leaving the checkout in a non-resolved
  state.

- Update blender code first, allowing proper submodule hash to
  be pulled.

Pull Request: https://projects.blender.org/blender/blender/pulls/118615
2024-02-22 14:38:37 +01:00
Brecht Van Lommel
8dfb87d1af Fix: Update tests data path to new directory 2024-02-22 14:25:54 +01:00
Sebastian Parborg
b5c8505f5a Fix: Always print warnings when file/folder renaming fails
Rewrite the code so that users get an error message when trying to
rename something to an existing file in the file browser. Before this
change Blender would not print any notifications on why the rename
failed if a file with the same name already existed.

Pull Request: https://projects.blender.org/blender/blender/pulls/118571
2024-02-22 14:24:33 +01:00
Sebastian Parborg
b4610f8fc0 Fix #116049, #117754: Renaming fails on linux with certain filesystems
Not all filesystems on linux supports the RENAME_NOREPLACE flag.
If we get a EINVAL return value, retry with a non atomic operation.

RENAME_NOREPLACE was introduced in 050d48edfc, so this is a regression
fix as well.

Pull Request: https://projects.blender.org/blender/blender/pulls/118571
2024-02-22 14:23:54 +01:00
Sergey Sharybin
e5e5591c7e Fix wrong architecture detection on Windows
Windows passes architecture of amd64, which needs to be converted
to x64 for the library names.
2024-02-22 14:01:01 +01:00
Sergey Sharybin
3dc832a904 Switch SVN to Git submodules using Git-LFS
This change makes it so build system and update utilities for Blender builds
are using pre-compiled libraries and other resources attached as Git modules
instead of using checkout of SVN repositories in the parent folder.

The directory layout:
```
  * release/datafiles/
    * assets/        -> blender-assets.git
      * publish/
      * ...
      * README.txt
  * lib/
    * darwin_x64/    -> lib-darwin_x64.git
    * darwin_arm64/  -> lib-darwin_arm64.git
    * linux_x64/     -> lib-linux_x64.git
    * windows_x64/   -> lib-windows_x64.git
  * tests/
    * data/         -> blender-test-data.git
```

The changes about configuring the actual Git sub-modules are not included
into this patch, as those require repository to actually exist before it
can be used.

The assets submodule is enabled by default, and the rest of them are
disabled. This means that if someone runs `git submodule update --init`
they will not get heavy libraries. The platform-specific and tests
related submodules are enabled when using `make update` or `make test`.

All the submodules are tracked: this means that when new commits are
done to the submodule, the blender.git repository is to be updated to
point them to the new hash. This causes some extra manual work, but it
allows to more easily update Blender and its dependencies to known good
state when performing operations like bisect.

Ref #108978

Pull Request: https://projects.blender.org/blender/blender/pulls/117946
2024-02-22 13:50:55 +01:00
Weizhen Huang
0007c7a6b2 Fix #115997: Emission sampling setting ignored when not using light tree
if emission sampling is not set, we do not use MIS weight when sampling
from the BSDF, but we were still drawing samples from the light,
resulting in double contribution.

Pull Request: https://projects.blender.org/blender/blender/pulls/118534
2024-02-22 12:24:12 +01:00
Campbell Barton
20c729b902 Fix missing info space redraw when modal operators report while running 2024-02-22 22:12:02 +11:00
Jacques Lucke
a1b95f69fa Revert "Fix #116082: support changing interface socket bl_socket_idname"
This reverts commit 42faf9d2427bffc4743f00b3e991c76601a77111.

This caused #118529. Better figure out a fix first before committing this again.
2024-02-21 22:23:32 +01:00
Brecht Van Lommel
4c708a8c3e Linux: Avoid XDG_RUNTIME_DIR warnings running headless Blender
Pull Request: https://projects.blender.org/blender/blender/pulls/118530
2024-02-21 18:35:15 +01:00
Brecht Van Lommel
873472b747 Linux: Improve headless EGL initialization messages
When it succeeds, don't print an error message. When it fails, print
errors for both display and headless attempts.

Pull Request: https://projects.blender.org/blender/blender/pulls/118530
2024-02-21 18:35:10 +01:00
Bastien Montagne
243f125fa2 Fix #107946: Blender crashes when relocating a library to another library that uses the same "2nd-level" library.
The issue here is that the `parent` pointer of indirectly linked
libraries would not be propoerly cleared when their current parent was
deleted.

Note that this fix will leave effectively indirectly linked libraries
shown as directly used ones in the UI, until the blendfile is saved and
reloaded. This is not a new issue though, deleting a parent library in
the Outliner has the same effect.
2024-02-21 18:17:27 +01:00
Jacques Lucke
8ea425d95d Fix #118402: enforce expected minimum alignment in MEM_CXX_CLASS_ALLOC_FUNCS
This `operator new` added in ecc3e78d787cce8a3f202e7de26575e2d47baea2
are only called if the alignment is greater than `__STDCPP_DEFAULT_NEW_ALIGNMENT__`.
This is generally 8 or 16 depending on the platform. `MEM_mallocN` does
guarantee 16 byte alignment currently (in fact it's usually not 16 byte aligned
because of `MemHead`). Now `MEM_mallocN_aligned` is used with the default
alignment, even if we don't know that the type does not require it.

An alternative would be to pass the alignment to `MEM_CXX_CLASS_ALLOC_FUNCS`,
but that would be more intrusive.

Pull Request: https://projects.blender.org/blender/blender/pulls/118568
2024-02-21 18:14:11 +01:00
Michael Kowalski
1d0bbefbb7 USD: Fix varying interpolation import
This addresses issue #93052.

Now converting the USD "varying" interpolation type to
the "point" domain type when importing USD attributes.

There have been some inconsistent opinions in the USD
developer community about whether "varying" interpolation
is equivalent to "corner" or "point" domains for meshes.
However, DCCs such as Unity and Houdini assume that the
number of entries for attributes with "varying" interpolation
is the same as the number of points, and this change allows
Blender to import such assets without error.

Pull Request: https://projects.blender.org/blender/blender/pulls/118539
2024-02-21 16:07:17 +01:00
Germano Cavalcante
bdc9767e09 Fix: wrong index returned for edge endpoints snapping
This value is not currently being used.
But it can cause problems for those who use Snap Gizmo in Python.
2024-02-21 10:31:18 -03:00
Enrique-de-la-Calle
bd783c8c1b Fix #113812: disabled Bake simulation if cache is not enabled
Currently, baking to disk does not work when caching is disabled. So better
force the user to enable the cache before attempting to bake.

Pull Request: https://projects.blender.org/blender/blender/pulls/114601
2024-02-21 14:12:55 +01:00