Expected format is `%Y-%m-%d %H:%M%z`.
Previous code would not generate the expected format of timestamps for
PO files headers (specifically in the the `POT-Creation-Date` field).
This could lead to some parsers (like e.g. the `sphinx_intl.load_po`
function) failing to load these PO files.
Note: since `datetime` module requires additional gymnastic to get valid
timezone info,switched back to the simpler `time` module here.
All times are expressed in UTC (aka GMT) timezone, since these are also
the values stored for Blender buildtimes.
Reported by @hoanguk in the Blender translations chat, thanks.
This made it seem as if it wasn't possible to load from saved
preferences when running Blender with '--factory-startup'.
This isn't a perfect solution as loading the saved
preferences doesn't clear `bpy.app.factory_startup`.
Even so, it's better not to gray out a menu item which is functional.
The FPS menu was using a cached value which wasn't being refreshed
when translation changed.
Add `bpy.app.handlers.translation_update_post` handler which runs
when translation changes, this can be used to clear any cached UI
values.
Ref !117049
Opacity modifier implementation based on GP2.
Functionality is largely unchanged.
_Color Mode_ is either `Stroke` or `Fill` for modifying color opacity or
`Hardness`.
_Uniform Opacity_ does two things at once (!):
- Sets the same opacity value for every point in a stroke.
- Sets opacity as an absolute value rather than a factor.
_Weight as Factor_ (button to the right of Opacity Factor): Use the
vertex group as opacity __factor__ rather than an overall __influence__.
This is confusing and hard to convey, but copies behavior from GP2.
The _Influence_ panel contains the same filter settings as the GP2
modifier, with some small changes:
- _Layer_ selects only strokes in the respective layer (with an _Invert_
option)
- _Material_ selects only points with the respective material (with an
_Invert_ option)
- _Layer Pass_ and _Material Pass_ select only strokes/points which are
rendered in the respective pass.
_Note 1: Layers don't have UI for setting a pass yet, this will be a
generic layer attribute. This can be set through the API for testing._
_Note 2: In GP2 a pass value of zero was used to disable pass filters.
Since zero is a valid pass ID an explicit flag has been added for the
purpose of turning pass filters on and off._
- _Vertex Group_: This can be used as an additional influence filter on
points. If _Weight as Factor_ is enable the vertex group instead
replaces the opacity factor. In _Fill_ mode the vertex group weight of
the stroke's first point is used as influence for the entire stroke.
- _Custom Curve_ is another possible influence factor per point. The
curve input value is the relative position of a point along its
stroke.
The Influence settings have been moved into a separate DNA struct, which
should help with reusability in various modifiers. Various utility
functions can be found int `MOD_grease_pencil_util.hh` for handling
influence settings and generating `IndexMasks` for modernized C++ code.
Pull Request: https://projects.blender.org/blender/blender/pulls/116946
In 13fac109 the node panels got support for individual option button
callbacks, but these were not included in the node editor side bar.
Only the older top-level buttons are drawn there.
The panel structure is currently not accessible in python since it is
part of the `NodeDeclaration` system. To draw node input sockets and
buttons in the correct panel order as they appear on the node, a new
template function `uiTemplateNodeInputs` has been added. This iterates
over declared panels and their contents in the appropriate order and
draws the buttons before sockets in the same panel.
Pull Request: https://projects.blender.org/blender/blender/pulls/116936
This would raise a SystemExit, showing it's stack trace into Python's
code module, then a syntax error on any input immediately afterwards.
Now exception is printed & the input for the Python console is reset.
Address some issues raised by #109435.
Remove redundant use_all_regions property in the key-map,
while this isn't wrong it causes the properties not to match
the pie menu item, the shortcut then fails to display.
The viscosity panel was confusing for users because viscosity
is defined by the base and exponent properties in the Diffusion panel.
What this setting actually does is use a special solver algorithm that is designed for high viscosity liquids.
See 635694c0ff for details.
The below changes are designed to better represent this to the user.
- Move the "Viscosity" Panel to a sub panel of "Diffusion"
- Rename "Viscosity" to "High Viscosity Solver" to better represent what this property does
- Update `use_viscosity` tooltip to better explain that this uses a different solver algorithm.
Pull Request: https://projects.blender.org/blender/blender/pulls/116118
The previous commit introduced a new `RPT_()` macro to translate
strings which are not tooltips or regular interface elements, but
longer reports or statuses.
This commit uses the new macro to translate many strings all over the
UI.
Most of it is a simple replace from `TIP_()` or `IFACE_()` to
`RPT_()`, but there are some additional changes:
- A few translations inside `BKE_report()` are removed altogether
because they are already handled by the translation system.
- Messages inside `UI_but_disable()` are no longer translated
manually, but they are handled by a new regex in the translation
system.
Pull Request: https://projects.blender.org/blender/blender/pulls/116804
Pull Request: https://projects.blender.org/blender/blender/pulls/116804
Translation of the UI is currently split into 3 preferences:
interface, tooltips, and new data. The distinction between interface
and tooltips is currently unclear as tooltips also include a lot of
messages not displayed in the actual tooltips on mouse hover.
These include reports to the Info Editor, information in editor
headers and footers, and statuses in panels.
In order to limit the use of `TIP_()` to actual tooltips, this commit
introduces a new preference for this extra information: "Reports".
New translation macros are introduced: `RPT_()` and `CTX_RPT_()`, as
well as their equivalent for the Python API, `pgettext_rpt_()`, to be
imported as `rpt_()`.
Pull Request: https://projects.blender.org/blender/blender/pulls/116804
Replaces this search by representing the 3 edge lengths of each triangle
as 3d points and searching with a KD-tree.
On a mesh with ~20k Tris the old method runs in 40s while the new method
takes 0.23s with a difference of <0.001%.
Ref !113720
Add an option to output curves as NURBS instead of Bezier. The same
fitting algorithms are used. The only difference is that the drawing
result is a NURBS curve with Bezier knot mode, instead of a native
Blender Bezier curve.
Pull Request: https://projects.blender.org/blender/blender/pulls/116696
Whenever custom `filter_items` is used, everything regarding filtering
and sorting has to be implemented "by hand" here, this was just not done
for the sorting (which is now added).
Pull Request: https://projects.blender.org/blender/blender/pulls/116629
Regression in [0] & [1]. Resolve by reverting most of [0],
restoring the original logic from 3.6.
The only significant changes kept are the use of selected UV faces
when called from the UV editor.
[0]: e0e3650495
[1]: 7b3e1cbb96
As discussed in #105407, it can be useful to support returning
a fallback value specified by the user instead of failing the driver
if a driver variable cannot resolve its RNA path. This especially
applies to context variables referencing custom properties, since
when the object with the driver is linked into another scene, the
custom property can easily not exist there.
This patch adds an optional fallback value setting to properties
based on RNA path (including ordinary Single Property variables
due to shared code and similarity). When enabled, RNA path lookup
failures (including invalid array index) cause the fallback value
to be used instead of marking the driver invalid.
A flag is added to track when this happens for UI use. It is
also exposed to python for lint type scripts.
When the fallback value is used, the input field containing
the property RNA path that failed to resolve is highlighted in red
(identically to the case without a fallback), and the driver
can be included in the With Errors filter of the Drivers editor.
However, the channel name is not underlined in red, because
the driver as a whole evaluates successfully.
Pull Request: https://projects.blender.org/blender/blender/pulls/110135
Fix the 'Show All' bone collection operator, by making it operate on all
collections instead of just the roots. It also now ensures that all
ancestors of the solo'ed collection are shown (otherwise it's the only
visible one, but given that its parent is hidden, it's still not
visible).
This also fixes a related issue, where calling the operator without
passing the `name` parameter would do nothing. Now it soloes the active
bone collection.
Add a `bone_collection.bones_recursive` property that returns the set of
bones assigned to that bone collection or any of its child collections.
This property is implemented in Python, as that made it considerably
simpler to create the set semantics.
Add custom properties to Action Bake.
objects will bake all animatable custom properties. Armatures will bake all bone custom properties,
as well as object (armature) custom properties.
Pull Request: https://projects.blender.org/blender/blender/pulls/113208
This adds option to bypass the raytracing pipeline
entirely and use a cheaper evaluation option.
This reuse the same evaluation as the Blended materials.
This exhibits some artifacts on Apple hardware due to
synchronization issues.
Pull Request: https://projects.blender.org/blender/blender/pulls/116622
Make it possible to nest bone collections. The data structure on the
armature is still a flat array. It is organised as follows:
- Sibling collections (i.e. ones with the same parent) are stored
sequentially in the array.
- Each bone collection keep track of the number of children, and the
index of the first child.
- Root collections (i.e. ones without parent) are stored as the first
elements in the array.
- The number of root collections is stored on the Armature.
This commit also contains the following:
- Replaced the flat UIList of bone collections with a tree view.
- Updated the M/Shift+M operators (move/assign to collection) to work
with hierarchical bone collections.
- Updated RNA interface to expose only root collections at
`armature.collections`. All collections are available on
`armature.collections.all`, and children at `bonecollection.children`.
- Library override support. Only new roots + their subtrees can be added
via overrides.
See https://projects.blender.org/blender/blender/issues/115934
Co-authored with @nathanvegdahl and @nrupsis.
Pull Request: https://projects.blender.org/blender/blender/pulls/115945