17 Commits

Author SHA1 Message Date
Campbell Barton
9567ac1272 Cleanup: quiet python linter warnings 2025-04-16 11:08:40 +10:00
Campbell Barton
be0c9174aa Cleanup: argument wrapping for Python scripts
- Wrap the closing parenthesis onto it's own line
  which makes assignments to the return value
  read better.
- Reduce right-shift with multi-line function calls.
2025-01-14 12:53:32 +11:00
Sean Kim
3e71e6c216 Cleanup: Suppress python console warning after previous commit
Introduced in ee2f2f00bd6e183a32b8c6dbe33d88786f597b8d

Without the `register` function we get the following error in the
console when running blender:

Warning! '<path_to_blender>/scripts/startup/nodeitems_builtins.py'
has no register function, this is now a requirement for registerable
scripts

Pull Request: https://projects.blender.org/blender/blender/pulls/132091
2024-12-19 00:51:45 +01:00
Jacques Lucke
ee2f2f00bd Nodes: remove dead code that was used for node menus
Blender does not use this code anymore and a global search on Github
suggests that this was not used by anyone.

Pull Request: https://projects.blender.org/blender/blender/pulls/132019
2024-12-17 15:30:21 +01:00
Campbell Barton
56388dc8fe Cleanup: reduce right-shift in startup scripts
Also un-wrap lines that fit in the column width.
2024-04-30 12:46:05 +10:00
Campbell Barton
0e3b594edb Refactor: scripts under scripts/startup/ to use str.format
Part of modernizing scripts in Blender, where the previous convention
was to use percentage formatting which has become the "old" way to
format strings in Python.

See proposal for details #120453.

Ref !120552
2024-04-27 16:02:36 +10:00
Campbell Barton
8eb5223663 Cleanup: remove unused variables & imports in scripts/ 2023-11-10 10:06:41 +11:00
Pablo Vazquez
5fac8f822b Texture Nodes: Refactor Add menu
Refactor the Add menu in Texture Nodes, with manually created menus,
inspired by Geometry Nodes and more recently Shader and Compositor.

Minor sorting adjustments by splitting categories in groups, with
separators in between groups, and sorted alphabetically.

Unlike other node editors, this menu will not feature assets for the time
being. Doing so would add (more) burden of maintenance to a system
that is deemed end-of-life, and likely to be rewritten before long.

Part of #111746

Pull Request: https://projects.blender.org/blender/blender/pulls/111838
2023-09-05 21:52:31 +02:00
Campbell Barton
e8c812a307 Cleanup: spelling in comments, update dictionary 2023-09-03 21:35:07 +10:00
Jacques Lucke
8cadeac18b Cleanup: fix node registration
This was broken in 15f5dfd45d14655f715617802f371f7f6b7a26ae.
2023-09-02 09:18:09 +02:00
Hans Goudey
15f5dfd45d Nodes: Remove unused shader and compositor NodeItem definitions
Unused after:
- 577c0b4b4662a960430821edee6b931fea7d66b1
- 9db4c0ca4be17e71cb062e3c489a80780847ea31

See the geometry nodes commit for more background:
- 837144b4577f161baf1625f8a5478c83a088ea0f
2023-09-01 23:07:51 -04:00
Campbell Barton
e955c94ed3 License Headers: Set copyright to "Blender Authors", add AUTHORS
Listing the "Blender Foundation" as copyright holder implied the Blender
Foundation holds copyright to files which may include work from many
developers.

While keeping copyright on headers makes sense for isolated libraries,
Blender's own code may be refactored or moved between files in a way
that makes the per file copyright holders less meaningful.

Copyright references to the "Blender Foundation" have been replaced with
"Blender Authors", with the exception of `./extern/` since these this
contains libraries which are more isolated, any changed to license
headers there can be handled on a case-by-case basis.

Some directories in `./intern/` have also been excluded:

- `./intern/cycles/` it's own `AUTHORS` file is planned.
- `./intern/opensubdiv/`.

An "AUTHORS" file has been added, using the chromium projects authors
file as a template.

Design task: #110784

Ref !110783.
2023-08-16 00:20:26 +10:00
Lukas Stockner
b220ec27d7 Cycles: Update Velvet BSDF to Sheen BSDF with new Microfiber sheen model
This patch extends the old Velvet BSDF node with a new shading model,
and renames it to Sheen BSDF accordingly.

The old model is still available, but new nodes now default to the
"Microfiber" model, which is an implementation of
https://tizianzeltner.com/projects/Zeltner2022Practical/.

Pull Request: https://projects.blender.org/blender/blender/pulls/108869
2023-07-24 15:36:36 +02:00
Campbell Barton
65f99397ec License headers: use SPDX-FileCopyrightText in all sources 2023-06-15 13:35:34 +10:00
Habib Gahbiche
f3cb157452 Compositor: add new node: Kuwahara filter
The filter is used to reduce noise while preserving edges. It can be used to create a cartoon effect from photorealistic images.

It offers two variations:
1) Classic aka isotropic kuwahara filter: simple and faster computation. Algorithm splits an area around a single pixel in four parts and computes the mean of the region with the lowest standard deviation.
2) Anisotropic Kuwahara filter: improves the classical approach by considering the direction of structures of regions

This patch implements both approaches above as multi-threaded operations for the full-frame and tiled compositor.

Co-authored-by: Sergey Sharybin <sergey@blender.org>
Pull Request: https://projects.blender.org/blender/blender/pulls/107015
2023-06-08 16:14:45 +02:00
Lukas Stockner
8cde7d8f8a Cycles: Merge Anisotropic BSDF node into Glossy BSDF node
Used to be https://archive.blender.org/developer/D17123.

Internally these are already using the same code path anyways, there's no point in maintaining two distinct nodes.

The obvious approach would be to add Anisotropy controls to the Glossy BSDF node and remove the Anisotropic BSDF node. However, that would break forward compability, since older Blender versions don't know how to handle the Anisotropy input on the Glossy BSDF node.

Therefore, this commit technically removes the Glossy BSDF node, uses versioning to replace them with an Anisotropic BSDF node, and renames that node to "Glossy BSDF".

That way, when you open a new file in an older version, all the nodes show up as Anisotropic BSDF nodes and render correctly.

This is a bit ugly internally since we need to preserve the old `idname` which now no longer matches the UI name, but that's not too bad.

Also removes the "Sharp" distribution option and replaces it with GGX, sets Roughness to zero and disconnects any input to the Roughness socket.

Pull Request: https://projects.blender.org/blender/blender/pulls/104445
2023-05-18 23:12:20 +02:00
Sergey Sharybin
03806d0b67 Re-design of submodules used in blender.git
This commit implements described in the #104573.

The goal is to fix the confusion of the submodule hashes change, which are not
ideal for any of the supported git-module configuration (they are either always
visible causing confusion, or silently staged and committed, also causing
confusion).

This commit replaces submodules with a checkout of addons and addons_contrib,
covered by the .gitignore, and locale and developer tools are moved to the
main repository.

This also changes the paths:
- /release/scripts are moved to the /scripts
- /source/tools are moved to the /tools
- /release/datafiles/locale is moved to /locale

This is done to avoid conflicts when using bisect, and also allow buildbot to
automatically "recover" wgen building older or newer branches/patches.

Running `make update` will initialize the local checkout to the changed
repository configuration.

Another aspect of the change is that the make update will support Github style
of remote organization (origin remote pointing to thy fork, upstream remote
pointing to the upstream blender/blender.git).

Pull Request #104755
2023-02-21 16:39:58 +01:00