Add support for add-ons to define commands using the new argument
`-c` or `--command`.
Commands behave as follows:
- Passing in a command enables background mode without the need to pass
in `--background`.
- All arguments following the command are passed to the command
(without the need to use the `--` argument).
- Add-ons can define their own commands via
`bpy.utils.register_cli_command` (see examples in API docs).
- Passing in `--command help` lists all available commands.
Ref !119115
If hooks are not unregistered Blender will report a leak on exit.
Store the hooks as unique_ptrs to remove manual memory management and
encapsulate the previous global list inside a function. These changes
ensure that everything is cleaned up on termination.
Also makes a small change to the hook documentation for a missing
`import` statement.
Pull Request: https://projects.blender.org/blender/blender/pulls/118294
- "can not" -> "cannot" in many places (ambiguous, also see
Writing Style guide).
- "Bezier" -> "Bézier": proper spelling of the eponym.
- Tool keymaps: make "Uv" all caps.
- "FFMPEG" -> "FFmpeg" (official spelling)
- Use MULTIPLICATION SIGN U+00D7 instead of MULTIPLICATION X U+2715.
- "LClick" -> "LMB", "RClick" -> "RMB": this convention is used
everywhere else.
- "Save rendered the image..." -> "Save the rendered image...": typo.
- "Preserve Current retiming": title case for property.
- Bend status message: punctuation.
- "... class used to define the panel" -> "header": copy-paste error.
- "... class used to define the menu" -> "asset": copy-paste error.
- "Lights user to display objects..." -> "Lights used...": typo.
- "-setaudio require one argument" -> "requires": typo.
Some issues reported by Joan Pujolar and Tamar Mebonia.
Pull Request: https://projects.blender.org/blender/blender/pulls/117856
Added support for defining an on_import() function in
bpy.types.USDHook subclasses. If on_import() is defined
on a given USD hook, it will be invoked in import_endjob().
The implementation closely follows the existing design of
export hooks. USDHook.on_import() takes as an argument
an instance of an internally defined USDSceneImportContext
class which provides an accessor to the USD stage.
Also updated the USDHook documentation with an example
on_import() callback implementation.
Pull Request: https://projects.blender.org/blender/blender/pulls/117822
Exceptions:
* Links to personal wiki pages
* Pages that are not in the new developer docs yet (like Human Interface Guidelines)
* tools\check_wiki\check_wiki_file_structure.py needs a refactor
Added support to Drag and Drop to file handlers, part of #111242.
If file handlers are registered with an import operator they can now be
invoked with drag and drop path data.
Import operators must either declare a `filepath` StringProperty or both
a `directory` StringProperty and a `files` CollectionProperty depending
on if they support single or multiple files respectively.
Multiple FileHandlers could be valid for handling a dropped path. When
this happens a menu is shown so the user can choose which exact handler
to use for the file.
Pull Request: https://projects.blender.org/blender/blender/pulls/116047
Adds a button similar to the user manual at the bottom of each page.
This is done to give people a place to report issues other than the documentation repository which should be limited to the user manual.
With this change also comes a new issue template with helpful text and a redirect for people looking to submit an issue with Blender.
I would also like to add a Documentation label too but that requires configuring with the Gitea project.
Pull Request: https://projects.blender.org/blender/blender/pulls/115865
This effectively reverts [0] which required the installed Blender
along with the `bpy` module to load for the install target to generate
the man-page. It turns out running a full Blender at install time can be
quite involved.
Now the man-page generator runs `blender --help` & `blender --version`,
converting the output into a man-page from a Python script.
Some minor changes have also been made:
- Use PYTHON_EXECUTABLE so the systems Python
(which may not be compatible) isn't used.
- Remove leading blender version from the description
which was unintentionally being included.
[0]: 61d99d450ee1d55e2829dc6adbef2cf8a094989b
Motivation: When discussing with @Jeroen-Bakker and @aras_p about how to
approach sorting when rendering Gaussian splats in Blender, we realised that
compute shaders could help there (and have many other use cases), and that also
due to Blender 4.0 being on OpenGL >= 4.3, we can now rely on compute shaders
existing.
This PR is an initial pass for that functionality. It comes with a Python example, which
runs a compute shader and saves the output to a texture, which is then rendered in the
viewport.
There is no exposed support for storage buffers yet, but I expect I'll be able to work on
them soon if this is accepted.
The newly added parts are:
1. `gpu.compute.dispatch()`
2. a way set the compute source to `GPUShaderCreateInfo`: `shader_info.compute_source()`
3. a way to set the image store for `GPUShaderCreateInfo`: `shader_info.image()`
4. a way to set the `local_group_size` for `GPUShaderCreateInfo`: `shader_info.local_group_size(x,y,z)`
5. a way to get `max_work_group_size` from capabilities: `gpu.capabilities.max_work_group_size_get(index)`
6. a way to get `max_work_group_count` from capabilities: `gpu.capabilities.max_work_group_count_get(index)`
Pull Request: https://projects.blender.org/blender/blender/pulls/114238
The description first described functionality that doesn't work properly.
Prefer text that is to the point with what works well, elaborating on
error prone & partially working solutions afterwards.
Also include a stub example for script authors who prefer to develop &
maintain their scripts outside of Blender.
Address issues raised by #114155.
Also fix sphinx documentation generation using incorrect identifiers
when looking up references from PyStruct types
(was looking for `bpy.app.bpy.app.driver_namespace.py`).
The last good commit was 8474716abb0db3b06838a57f7217bc945638d8df.
After this commits from main were pushed to blender-v4.0-release. These are
being reverted.
Commits a4880576dc from to b26f176d1a that happend afterwards were meant for
4.0, and their contents is preserved.
This adds initial support for rendering Cycles and EEVEE shaders in Hydra
render engines that support MaterialX. Not all nodes are currently
supported, see the detailed compatibility list in #112864.
Co-authored-by: Georgiy Markelov <georgiy.m.markelov@gmail.com>
Co-authored-by: Vasyl Pidhirskyi <vpidhirskyi@gmail.com>
Pull Request: https://projects.blender.org/blender/blender/pulls/111765
This was noted in code comments and checked in Python documentation
generation but not at build time.
Since these enums are identifiers that end up included in various places
enforce the `rna_enum_*_items` convention which was noted as
the convention but not followed strictly.
Partially reverts [0], avoids having to deal with multiple prefix types.
[0]: 3ea7117ed15f7b9fa82d7aba11eb32f6f502ddd5
Updates sphinx and the them to the latest versions
This commit also removes 'babel' from the list of requirements, babel is only important for internationalization.
This commit allows both `rna_enum_` and `rna_node_`to be used for enum prefixes
This also fixes one enum by adding `rna_` to the prefix.
Together these changes fix the API documentation generation.
The recent change to header copyrights [0] unintentionally changed
"Blender Foundation" to "Blender Authors" for the WIN32 file path
which blender is installed into.
Revert lines changed that aren't related to copyright text.
[0]: e955c94ed38595cb12fa6cf517b6ba8033017141
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.