The grid layout for UI lists wasn't used in practice from all we can
tell. It was badly maintained for a long time (bugs went unnoticed). I
think it was added for an earlier version of the asset UI design.
This was planned for removal in 5.0, see blender/blender#110461.
Usages in bundled scripts were already removed in efa8d942b8.
Pull Request: https://projects.blender.org/blender/blender/pulls/146656
"Use Nodes" was removed in the compositor to simplify the compositing
workflow. This introduced a slight inconsistency with the Shader Node
Editor.
This PR removes "Use Nodes" for object materials.
For Line Style, no changes are planned (not sure how to preserve
compatibility yet).
This simplifies the state of objects; either they have a material or
they don't.
Backward compatibility:
- If Use Nodes is turned Off, new nodes are added to the node tree to
simulate the same material:
- DNA: Only `use_nodes` is marked deprecated
- Python API:
- `material.use_nodes` is marked deprecated and will be removed in
6.0. Reading it always returns `True` and setting it has no effect.
- `material.diffuse_color`, `material.specular` etc.. Are not used by
EEVEE anymore but are kept because they are used by Workbench.
Forward compatibility:
Always enable 'Use Nodes' when writing blend files.
Known Issues:
Some UI tests are failing on macOS
Pull Request: https://projects.blender.org/blender/blender/pulls/141278
This makes the shader node inlining from #141936 available to external renderers
which use the Python API. Existing external renderer add-ons need to be updated
to get the inlined node tree from a material like below instead of using the
original node tree of the material directly.
The main contribution are these three methods: `Material.inline_shader_nodes()`,
`Light.inline_shader_nodes()` and `World.inline_shader_nodes()`.
In theory, there could be an inlining API for node trees more generally, but
some aspects of the inlining are specific to shader nodes currently. For example
the detection of output nodes and implicit input handling. Furthermore, having
the method on e.g. `Material` instead of on the node tree might be more future
proof for the case when we want to store input properties of the material on the
`Material` which are then passed into the shader node tree.
Example from API docs:
```python
import bpy
# The materials should be retrieved from the evaluated object to make sure that
# e.g. edits of Geometry Nodes are applied.
depsgraph = bpy.context.view_layer.depsgraph
ob = bpy.context.active_object
ob_eval = depsgraph.id_eval_get(ob)
material_eval = ob_eval.material_slots[0].material
# Compute the inlined shader nodes.
# Important: Do not loose the reference to this object while accessing the inlined
# node tree. Otherwise there will be a crash due to a dangling pointer.
inline_shader_nodes = material_eval.inline_shader_nodes()
# Get the actual inlined `bpy.types.NodeTree`.
tree = inline_shader_nodes.node_tree
for node in tree.nodes:
print(node.name)
```
Pull Request: https://projects.blender.org/blender/blender/pulls/145811
Fix several documentation related typos.
Found via `codespell -S "*.desktop,*.diff,./intern,./extern,./locale,./AUTHORS,./source/blender/blenlib/tests/BLI_string_utf8_test.cc,./doc/license/bf-members.txt" -L accessort,abd,aci,alo,ans,ba,bording,childrens,clen,constructin,datas,dependees,domin,eary,ege,eiter,elemt,eles,endianess,enew,espace,finded,fiter,fpt,groupd,hist,implementating,indext,ine,infront,inout,inouts,inpt,ist,lene,listenter,lod,maks,masia,mata,mis,mke,nam,nd,ned,opose,ot,outlow,parm,parms,passt,pinter,pixelx,poin,pres,ptd,re-usable,re-use,re-used,re-uses,re-using,ridiculus,schem,soler,strack,suh,te,tesselate,tham,ue,vai,varius,wew`
Pull Request: https://projects.blender.org/blender/blender/pulls/145824
Methods for `bpy_struct` such as `get()` & `items()` noted that only
some types support custom-properties.
Since these docs were written many more types support custom properties.
Replace the inline list with a link to a generated list since there are
now too many to include inline.
Resolves#141450.
Deprecation meta-data support for RNA properties.
- Properties may have a deprecated note and version.
- Warnings shown when these are accessed from Python.
- A note is included in the generated documentation.
Support for marking functions as deprecated can be added in the future.
Ref !139487
While this was an intentional change in [0],
it seemed like an error to removing quoting (based on #141853).
Restore the quotes while keeping the string literals.
[0]: 0fb80f698a
Add an optional init function which operators
An alternative to [0] which missed Python API support (causing #140451).
While that could be resolved, tracking which "slots" have been set
would have to be flagged on every map/hash insertion which seems
excessive and is prone to bmesh operators failing if the flag is ever
missed. Prefer a simpler init function so dissolve edges doesn't have
a zero threshold.
Also support multi-line comment blocks in the generated API docs.
[0]: bd3a66a416
Added the following notes to documentation:
- `msgbus` interaction with undo system that particularly makes
it not completely reliable, since users they easily skip it's effect.
- Details on when and how often message bus updates are triggered.
Pull Request: https://projects.blender.org/blender/blender/pulls/138557
- Place doc-strings before arguments (avoid over long lines).
- Enable clang-format for BMesh operator definitions.
- Remove invalid comments (likely left in from copy-paste).
- Use double back-ticks for RST.
- Use full sentences.
No functional changes.