This commit adds a new experimental node "Sample Volume".
It's purpose is to be able to sample values from a volume grid given
a position field.
The 'Grid' input accepts a named attribute input with the name
of the volume grid to sample. Values will be implicitly converted
from the grid type to the specified value type.
Pull Request: #107656
Since a generic snap cursor was implemented (which can be used by Tools and by DragDrop), the Placement Settings are no longer a settings of the "VIEW3D_OT_interactive_add" Operator.
With that implementation, those properties started to be defined in a
static struct, filled in at runtime and accessed in the UI through
workarrounds.
As they are properties initialized at runtime, they are not saved in
the file.
The solution is to move the Placement Settings to `ToolSettings`.
Co-authored-by: Germano Cavalcante <germano.costa@ig.com.br>
Pull Request: blender/blender#107951
Node group sockets have user-exposed data types, and sometimes
subtypes for some data types (e.g. Percentage or Angle for floats).
The UI to select these types and subtypes use an operator menu with a
text depending on the current type or subtype.
This button needs to be manually translated since its label is
manually defined.
Additionally, some subtypes need to be extracted from the Property
class's RNA_ENUM_PROPERTY_SUBTYPE_NUMBER_ITEMS, so this commit also
removes Property from the extraction blacklist in
bl_extract_messages.py. This has the side effect that it introduces a
few dozens translations, which are probably not used anywhere.
Pull Request: blender/blender#107100
- "Out" meaning "one end of a bone". Same as in 9120c86c3f.
- "Canvas" meaning a painting support for Dynamic Paint.
- "Twist" meaning an action verb, as opposed to an amount.
- "Solid" meaning a textureless, single-color material.
- "Blend mode" meaning material opacity blending, as opposed to color
blending.
- "Pixel Size" meaning "a size measured using pixels as the unit".
- "Light" meaning "not dark", as in "Light Theme".
Ref #43295
Some node sockets get their names from a "label", instead of the
declaration. These labels are not necessarily the same as the
declaration, so they need to be extracted to the translation files.
They are always in a `node_sock_label()` function. It has two args,
the second of which is the string we want to extract.
The node socket declarations use the `N_()` macro to extract the name
and description of the socket.
This is quite redundant because since the syntax is always the same,
the extraction can be done automatically from the Python translation
module using regexes.
Four new regexes are introduced in bl_i18n_utils.settings:
- one extracts contextless messages from `add_input()` and
`add_output()`, the basic socket declarations with the names;
- one does the same, but for those sockets which declare a context
through `.translation_context()`;
- one extracts descriptions and error messages;
- one extracts geometry nodes field inputs.
In addition to making the code simpler and more legible, this change
extracts a few dozen messages which were not tagged with the proper
macro.
The Quick Fur operator creates a curves object with hair modifiers and
a material.
These modifiers' and material's names can be translated if the user
chose to translate data in the preferences.
Only the modifier names are translated, the node groups are not
because they may be reused instead of appended again.
Pull Request: blender/blender#107909
Asset tags are data and should not be translated, even if they are
built-in data such as hair nodes.
Issue reported by @SatoshiYamasaki in #43295.
Pull Request: blender/blender#107907
Many messages were no longer needed since Blender 2.80.
Those messages appeared in the operator search menu and described what
category each operator belonged to. After Blender 2.80, this was
replaced by a place in the UI from where the operator can be called.
Pull Request: blender/blender#107700
Some language names were confirmed by native speakers to be
incorrectly spelled (Dutch and Hindi).
Two others were simply capitalized (Vietnamese and Kazakh).
Suspicions remain for other language names, see #105461 for details.
Pull Request: blender/blender#107707
When adding a new simulation zone, the input and output would be
accessed by their name, however the name can be translated if the user
has enabled translation of data.
Instead, get the first socket of type 'GEOMETRY' in the simulation
input and output nodes.
Pull Request: blender/blender#107819
Add a new flag that determines whether root bones (i.e. bones without a
parent) should be translated to the armature object's origin. This can
be found in the Armature's IK properties panel.
By default this flag is disabled, so new rigs will not see this 'locking
to the origin' behaviour. Versioning code ensures that the flag is
enabled on older files, to preserve the behaviour of existing rigs.
This also bumps the Blender subversion and at the same time fixes an
incorrect bump in ee08b2ddff (where the
'minimum compatible version' was updated instead of the current Blender
version).
Pull request: blender/blender#107869
- "... (matches pythons ...)": capitalize and use possessive ('s).
- "Layer Proxy Protection": replace proxy by override, following 2.80.
- "Enable Plane Trim": expand description.
- "Make curve path children to rotate along the path": remove "to".
- "Option for curve-deform: make deformed child to stretch along
entire path": remove "to".
- "... apply the curve radius with path following it and deforming":
rephrase unclear description.
- "Custom light falloff curve" : unrelated to lights, used in Grease
Pencil modifiers.
- "Grease Pencil layer assigned to the generated strokes": rephrase
because a GP stroke is assigned to a layer, not the other way
around.
- "Attribute domain where the attribute domain is stored in the
simulation state": remove second "domain" (typo).
Pull Request: blender/blender#107916
This makes the URL links to blender.org to have more information than
just utm_source=blender
For example:
* utm_source=blender-3.6.0-alpha
* utm_source=blender-3.3.16-release
Pull Request #107849
This fuctionality allow the Blender project to know if users
are reaching our websites from within Blender:
* User Manual
* Python API
* Release Notes
* Development Fund
Pull Request #107849
Adds an input node Signed Distance that can
be used to refer to the distance-grid of an SDF volume.
Right now it's experimental and can be enabled by enabling
"New Volume Nodes" in the preferences.
It returns a float AttributeFieldInput called 'distance' which
can tell Volume nodes which grid to get.
See #103248.
For realtime use cases, storing the geometry's state in memory at every
frame can be prohibitively expensive. This commit adds an option to
disable the caching, stored per object and accessible in the baking
panel. The default is still to enable caching.
Pull Request: blender/blender#107767
Adds a new operator that resets caches and then iterates from the start
frame to the current frame in order to update caches.
Pull Request: blender/blender#107627
- The official spelling of FFMPEG is FFmpeg (upper, then lower case).
- The normal vector copy and paste operators shoud be singular because
they can only be used on a single element.
- The "Parent File" file browser operator goes up one level in the
file hierarchy. It should be called "Parent Directory", like the
current description "Go to the parent directory".
- "Mass Vertex Group" used to define the mass, but was reused at some
point and now actually defines cloth pinning so it should be called
"Pin Vertex Group", as in the UI.
- The Transformation constraint's Map To Type suffered from a
typo (probably of -> on).
- "Fall-off" is more commonly spelled "Falloff".
- "Effected" should really be "Affected" in this case.
- Rephrase the descriptions for the curve painting tools drawing
plane, which did not seem to match what the settings do. Namely,
they allow selecting in which plane to draw curves using the Curve
Draw tool.
Reported by @Joan-Pujolar in #43295:
- Force exporting animation on every objects [objects singular]
- Color of the interface widgets text insertion cursor (caret) [delete
interface widgets]
- Index of active aov [AOV in uppercase everywhere else]
- Does this tool use an painting canvas [an]
- This script was written Blender version %d.%d.%d ["for" missing
before "Blender"]
- [fcurve -> F-curve]
- unknown error stating file [statting]
- Offset into each stroke before the beginning of the dashed segment
generation [Two spaces between of and the]
- Find the nearest element in the a group. [either "the" or "a"]
Pull Request: blender/blender#107699
This patch will add support to select all channels between active channel
and last-clicked channel without deselecting previous selection. `Shift` key is
now assigned for the range selection and `ctrl` key to extend the selection. This
changes will make multi-selection similar as outliner tree-elements. New function is
created `animchannel_select_range` to handle the range selection of channels.
Old Differential revision: https://archive.blender.org/developer/D17079
Pull Request: blender/blender#104565
Rather than forcing the user to initiate a transform operation to edit the `Proportional Size`, allow editing of the `Proportional Size` through the UI.
The affected headers are:
- View 3D
- Dop Sheet
- Image Editor
- Graph Editor
- Mask Editor
Pull Request: blender/blender#107507
* remove "Keyframe" label from the Key menu
* "Jump To Keyframe" -> "Jump to Selected"
* added a new menu "Density" with Decimate, Sample and Clean operators
* removed the "Clean Channels" entry. It does the same as the "Clean" operator but also removes channels IF the remaining keys are at the default value. The feature is still available in the redo panel
* Split the slider operators out by functionality
* Move Euler filter to Channel menu
* Remove "Add F-Curve modifier" from Key menu (it already is in the Channel menu)
* Move Bake/Unbake Curve functions to Channel menu
* Move "Bake Sound to FCurves" to Channel menu
Pull Request: blender/blender#106113
This adds support for building simulations with geometry nodes. A new
`Simulation Input` and `Simulation Output` node allow maintaining a
simulation state across multiple frames. Together these two nodes form
a `simulation zone` which contains all the nodes that update the simulation
state from one frame to the next.
A new simulation zone can be added via the menu
(`Simulation > Simulation Zone`) or with the node add search.
The simulation state contains a geometry by default. However, it is possible
to add multiple geometry sockets as well as other socket types. Currently,
field inputs are evaluated and stored for the preceding geometry socket in
the order that the sockets are shown. Simulation state items can be added
by linking one of the empty sockets to something else. In the sidebar, there
is a new panel that allows adding, removing and reordering these sockets.
The simulation nodes behave as follows:
* On the first frame, the inputs of the `Simulation Input` node are evaluated
to initialize the simulation state. In later frames these sockets are not
evaluated anymore. The `Delta Time` at the first frame is zero, but the
simulation zone is still evaluated.
* On every next frame, the `Simulation Input` node outputs the simulation
state of the previous frame. Nodes in the simulation zone can edit that
data in arbitrary ways, also taking into account the `Delta Time`. The new
simulation state has to be passed to the `Simulation Output` node where it
is cached and forwarded.
* On a frame that is already cached or baked, the nodes in the simulation
zone are not evaluated, because the `Simulation Output` node can return
the previously cached data directly.
It is not allowed to connect sockets from inside the simulation zone to the
outside without going through the `Simulation Output` node. This is a necessary
restriction to make caching and sub-frame interpolation work. Links can go into
the simulation zone without problems though.
Anonymous attributes are not propagated by the simulation nodes unless they
are explicitly stored in the simulation state. This is unfortunate, but
currently there is no practical and reliable alternative. The core problem
is detecting which anonymous attributes will be required for the simulation
and afterwards. While we can detect this for the current evaluation, we can't
look into the future in time to see what data will be necessary. We intend to
make it easier to explicitly pass data through a simulation in the future,
even if the simulation is in a nested node group.
There is a new `Simulation Nodes` panel in the physics tab in the properties
editor. It allows baking all simulation zones on the selected objects. The
baking options are intentially kept at a minimum for this MVP. More features
for simulation baking as well as baking in general can be expected to be added
separately.
All baked data is stored on disk in a folder next to the .blend file. #106937
describes how baking is implemented in more detail. Volumes can not be baked
yet and materials are lost during baking for now. Packing the baked data into
the .blend file is not yet supported.
The timeline indicates which frames are currently cached, baked or cached but
invalidated by user-changes.
Simulation input and output nodes are internally linked together by their
`bNode.identifier` which stays the same even if the node name changes. They
are generally added and removed together. However, there are still cases where
"dangling" simulation nodes can be created currently. Those generally don't
cause harm, but would be nice to avoid this in more cases in the future.
Co-authored-by: Hans Goudey <h.goudey@me.com>
Co-authored-by: Lukas Tönne <lukas@blender.org>
Pull Request: blender/blender#104924
This adds the ability for users to assign sub-types to `Float` type custom properties (e.g., distance, angle, time, power etc.)
Pull Request: blender/blender#106700
While RMB was canceling, the check for Escape was overridden by the
modal keymap, causing Escape to confirm.
Resolve by:
- Removing Escape binding from the modal keymap, rely on hard coded
check as Escape to cancel is an assumption made in many places.
- Move RMB hard-coded check into the modal keymap since it's non-default
keymaps may use mouse buttons differently.
These operators already check for release events matching the event
that launched them.
Also remove hard-coded model keys (rely on the default key-map).
This option is true by default, but it can be changed for
any asset library (that may be using Link as import method).
This also fix "Reset to Default Value" for the Import Method
since this was originally not using the defaults.
Pull Request: blender/blender#107345
Caused by 3a1cf838ca.
Smooth view transitions only work when an operator is **invoked** (wont
work from **exec**, see `WM_operator_smooth_viewtx_get`).
Now 3a1cf838ca changed the `operator_context` for some other operators
in the menu to 'EXEC_REGION_WIN' (for good reason). But setting
`operator_context` on a `uiLayout` will set context on the **root**
layout (not the actual sublayout alone), so all following operators
"inherited" the [changed] context.
Now make sure following operators get properly invoked again by giving
the right context.
Pull Request: blender/blender#107296
When pressing F3 to bring up the Search Menu, an error appeared
because the MoveModifierToNodes operator's poll method did not
consider the context where no object was selected.
Pull Request: blender/blender#107310
Introduce `BKE_fcurve_deduplicate_keys()` to merge keys that are on the
same time, or within the time comparison threshold (1/100th of a frame).
When merging two consecutive keys, the last one 'wins' and determines
the final key *value*. The first key's *time* is retained, to ensure the
reference point for the next comparisons is stable. The only exception
here is when there is a key exactly on an integer frame number, in which
case that one is preferred.
The function is exposed in RNA as `fcurve.keyframe_points.deduplicate()`
This commit also introduces a new function `BKE_fcurve_bezt_shrink(fcu,
new_totvert);` that can reallocate the `bezt` array to ensure removed
keys no longer take up memory.
The RNA function `fcurve.update()` currently performs two steps, which
are now exposed to RNA as well, as `keyframe_points.sort()` and
`keyframe_points.handles_recalc()`. This is so that Python code can
sort, deduplicate, and then recalculate the handles only once (calling
`update` + `deduplicate` would do the latter twice).
In Blender 4.0 the deduplication will also be part of `fcurve.update()`,
see #107126.
Reviewed on blender/blender#107089
The node outputs the index of the closest element to itself. See #102387
for the original design.
This is different from the Sample Nearest node in two important ways:
* It does not have a geometry input, instead the geometry is taken from the
field evaluation context.
* The node can exclude the "current" element from the search.
* The group id input can be used to build subsets of elements that only
consider each other as neighbors and ignore elements with other ids.
Pull Request: blender/blender#104619
An operator to allow interactive text selection for 3D Text Objects.
This is from the code of Yash Dabhade (yashdabhade) for GSoC 2022
with corrections and simplifications. Also includes double-click for
word selection.
Pull Request: blender/blender#106915
This patch adds several tools and options to the weight paint mode of Grease Pencil.
* Blur tool: smooths out vertex weights, by calculating a gaussian blur of adjacent vertices.
* Average tool: painting the average weight from all weights under the brush.
* Smear tool: smudges weights by grabbing the weights under the brush and 'dragging' them.
* With the + and - icons in the toolbar, the user can easily switch between adding and subtracting weight while drawing weights.
* With shortcut `D` you can toggle between these two.
* The auto-normalize options ensures that all bone-deforming vertex groups add up to 1.0 while weight painting.
* With `Ctrl-F` a radial control for weight is invoked (in addition to the radial controls for brush size and strength).
* With `Ctrl-RMB` the user can sample the weight. This sets the brush Weight from the weight under the cursor.
* When painting weights in vertex groups for bones, the user can quickly switch to another vertex group by clicking on a bone with `Ctrl-LMB`.
For this to work, follow these steps:
* Select the armature and switch to Pose Mode.
* Select your Grease Pencil object and switch immediately to Weight Paint Mode.
* Select a bone in the armature with `Ctrl-LMB`. The corresponding vertex group is automatically activated.
Pull Request: blender/blender#106663
Do not show asset metadata "description", "license", "copyright", or
"author" if they are empty AND read-only, since they can't be edited
and contain no useful information to show.
Pull Request: blender/blender#105812
This adds new movement types TEXT_BEGIN and TEXT_END to allow
FONT_OT_move and FONT_OT_move_select operators move the text
cursor (caret) to the top and bottom of the text.
Pull Request: blender/blender#106196
This allows toggling of text styles of selected text and at the current
mouse cursor position if nothing is selected.
Pull Request: blender/blender#107048
Adds a submenu to the File Browser selected item context menu that
allows opening the item or viewing the location in an OS browsing
window. On Win32 also allows other actions like editing, searching,
opening command prompt, etc.
Pull Request: blender/blender#104531