Dependency building assumes scene.camera is fixed due to #107081.
Thus it is necessary to do a relations update when it does change.
Pull Request #110139
The Adjust Last Operation panel would attempt to use the main region,
even when the operator was initially executed in a different region.
This becomes an issue when the operator relies on context of the region.
For example the pose library gets the active asset from context, which
is only available in the region (e.g. asset shelf) displaying the
assets. In general it seems like redo should restore the region of
invocation.
This uses the region type from the initial operator call context to
lookup a region to restore on redo. While not completely bullet proof
(multiple regions of the same type may be present), this should mitigate
the issue quite a bit.
Required for #104831.
Pull Request: https://projects.blender.org/blender/blender/pulls/108892
Regions that change their size in the layout phase (something that is
supported for a while now) might affect the size of following regions.
For example the asset shelf design forsees that it takes space away from
the tool- and sidebar. When its size changes, tool- and sidebar need to
redraw.
Without this there is a crash in the `asset-shelf` branch:
- Open sidebar
- In the asset shelf Display Settings popover, toggle "Names" twice.
At first the sidebar will be empty, when toggling the second time a
null-dereference will cause a crash. This is because the layout phase of
the sidebar does not run, but after that the region size is updated,
it's tagged for redraw and the draw phase runs (without any layout).
Pull Request: https://projects.blender.org/blender/blender/pulls/110212
- Avoid calling `.finish()` twice, only pass span
- Fix "opcities" typo
- Remove unnecessary "is_empty()" check
- Group creation of "src_data" in one block
- Remove periods after doxygen titles
- Remove unnecessary "curves" argument
- Order mutable argument last
Pull Request: https://projects.blender.org/blender/blender/pulls/110428
Regression in [0] changed the order of execution for the load_post
handler which previously (in 3.5x) ran before driver evaluation.
Calling either load_post/load_post_fail handlers after loading was
changed intentionally to simplify the code-path for calling handlers
however it meant the handler couldn't be used to setup drivers,
so restore the original logic.
[0]: 46be42f6b1
source/blender/freestyle wasn't fillowing Blender's own
conventions for integer types.
This had the down-side of making the code_clean.py utility attempt to
replace `unsigned int` types which always failed.
While this edit could have been manually ignored for all files in
freestyle, add the typedef's to `FreestyleConfig.h` and follow Blender's
convention instead.
Implements part of #101689.
The "poly" name was chosen to distinguish the `MLoop` + `MPoly`
combination from the `MFace` struct it replaced. Those two structures
persisted together for a long time, but nowadays `MPoly` is gone, and
`MFace` is only used in some legacy code like the particle system.
To avoid unnecessarily using a different term, increase consistency
with the UI and with BMesh, and generally make code a bit easier to
read, this commit replaces the `poly` term with `poly`. Most variables
that use the term are renamed too. `Mesh.totface` and `Mesh.fdata` now
have a `_legacy` suffix to reduce confusion. In a next step, `pdata`
can be renamed to `face_data` as well.
Pull Request: https://projects.blender.org/blender/blender/pulls/109819
- "Rename Channels": only one channel can be renamed at a time, use
singular.
- "Copy Markers to Scene": rephrase erroneous operator description.
- "Axis tag names with": grammar.
- "Close or open the selected stroke adding an edge from last to first
point": "segment" is preferred to "edge" elsewhere in the context of
curves or Grease Pencil.
- "Number of subdivisions [points] by edge[s]": replace "by edge" with
"per segment" for the same reason.
- "Compatibility mode for SL, OpenSim...": expand to explain that SL
and OpenSim are respectively Second Life and OpenSimulator.
- "W/m^2" -> "W/m²". This symbol is widely supported and should be
preferred for exponentiation outside of code.
- "Effect on tracks which are tracked less than specified amount of frames",
"Effect on tracks which have a larger reprojection error":
Use "Affect" and "number" instead of "amount".
- "Hull curve" -> "Envelope". This is a calque from German Hüllkurve
meaning envelope.
- "Frquency Cutoff" -> "Frequency Cutoff" (typo)
- "Check if Select Left or Right": rephrase to "Based on Mouse
Position" as it better explains the action of the operator.
- "Make cut event if strip is not selected ..." -> even (typo)
- "Shear selected items along the horizontal screen axis":
Rephrase as this transform operator can act in many different axes.
- Tonemapping compositing node: the two algorithms "R/D Photoreceptor"
and "Rh Simple" only had names, but no description. Add ones
explaining at least the basic principle and where the names come
from.
- In the "Matte dilate/erode side" description for the Keying node's
Dilate/Erode socket, "side" was likely a typo for "size".
Reformulate the description to make it clearer, inspired by similar
ones.
- "Width of the blur edge" -> "Width of the blur for the transition";
"Edge angle" -> "Angle of the transition";
"Wipe direction" -> "Whether to fade in or out":
Better explains the sequencer wipe transition (inspired by the manual).
- OSL shaders now supported on some GPU backends.
- "Add a new repeat input and output nodes " -> "Add new" (typo).
Pull Request: https://projects.blender.org/blender/blender/pulls/110321
Implementation of the stroke mode of the eraser tool for grease pencil.
In this mode, the eraser removes each stroke that it touches, meaning each stroke that either intersects the eraser or that has all points inside of it.
Pull Request: https://projects.blender.org/blender/blender/pulls/110304
Reduce indentation in two armature drawing functions, by flipping
conditions and using `continue` (instead of having the entire `for`-body
inside two nested conditions).
No functional changes.
In order to avoid navigation hotkey conflicts during transform
operations, this commit implements the "Transform Navigation with Alt"
option.
This option is enabled by default and makes navigation hotkeys require
the `Alt` key during a transforming in the 3D View.
Pull Request: https://projects.blender.org/blender/blender/pulls/109754
Adopt the use of structs to enclose and organize operator-specific
navigation data.
With this, we create well-defined boundaries for the navigation data of
individual operators.
This makes the code more flexible and easier to maintain and avoid
errors.
Caused by 0b7d8a20bf
Above commit broke the operation because of this change: `if (do_extrude != 0)`
Earlier True/False/2 were used to determine the point of extrude.
Use enum to fix this and to improve the code readability.
Pull Request: https://projects.blender.org/blender/blender/pulls/110256
This commit refactors the code by converting the data manipulation
functions of 'ViewOpsData' into methods.
This change adopts a more object-oriented approach, resulting in
improved code organization and enhanced reusability.
Pull Request: https://projects.blender.org/blender/blender/pulls/110209
- A `_size` suffixed argument was modified to be come the length,
store in a variable with a `_len` suffix to avoid confusion.
- The enum type for masking characters read like a number
(used Set suffix), add `e` prefix to make it clear it's an enum.
This was caused by 89218b66c2
The removal of the transmission roughness socket messed
with the hardcoded socket indices used to for auto socket
values and optimization detection.
Use defines inbetween sockets declarations to make it more
obvious that it they needs to be updated on socket changes.
This also makes the code a bit more meaningful.
The normals were inverted because they use
geometric normals. These are computed using
partial derivatives (`dFdx` & `dFdy`) and are
dependent on the view orientation. But the
baking views were not all captured from the
same side, which flipped sufels normals in
2 out of the 3 views.
This was already unsupported in combination with Multiscattering GGX,
prevented the Principled BSDF from using microfaced-based Fresnel for
Glass materials, and would have made future improvements even trickier.
Pull Request: https://projects.blender.org/blender/blender/pulls/109950