This patch introduces a new Extension Mode option to the Translate node,
replacing the current repeat option and adding an extra Extend mode when
the nearest boundary pixel is sampled. The option allows choosing from
Zero, Repeat, and Extend for each of the axis independently.
A new generic sample method was added to the Result class for sampling
with arbitrary interpolation and extension modes.
Pull Request: https://projects.blender.org/blender/blender/pulls/140607
The `StringRef` in `MemoryBlobReader` was referencing data
that was freed under some circumstances. While the actual packed
data is shared between the original object and copy-on-eval object,
the name of the blobs are not.
Replace use of bpy.ops.wm.append with the Python equivalent.
This avoids a separate append call for every group.
Also refactor lookups so node-group names only need to be declared once,
then used to populate a named-tuple.
The same logic was duplicated in two places, now factorize it into its
own function.
This code reads (peeks) _some_ ID info from a blendfile, without actually
reading the full ID data. And it also decides if the given ID BHead
should retained, or skipped.
This is mainly used to show a list of available IDs or assets to link or
append.
Pull Request: https://projects.blender.org/blender/blender/pulls/141103
This PR sets the default frame method for camera background images from
the current `Stretch` to `Fit`. For a lot of use cases, `Fit` is the
desired frame method, rarely `Crop` is used, with `Stretch` being even
more rare. This saves the user from having to manually set the frame
method after adding an image. This can also prevent cases where an
artist adds a reference image that's close to the camera aspect ratio
but doesn't match it completely, giving a slight distortion that they
might not immediately notice, and causing confusion down the line.
Pull Request: https://projects.blender.org/blender/blender/pulls/141075
The default nodes were still present in the node tree when Setup
Tracking Scene operator was called.
The issue was that the operator assumed the default tree always has the
same number and types of nodes, which wasn't true anymore after the
default node tree was changed in df6e65dd93
This PR keeps the changes to a minimum by updating the assumption
about the default node tree.
Pull Request: https://projects.blender.org/blender/blender/pulls/141141
- Remove "experimental" label from C++ based FBX importer,
- Make drag-n-drop use the C++ FBX importer,
- Add "Legacy" label to the previous Python FBX importer
Pull Request: https://projects.blender.org/blender/blender/pulls/140703
In most (cases functions returning a PyObject pointer
requires it to be used by the caller, declare functions in the Python
API with the `nodiscard` attribute.
Use a separate index for indexing into `Array<TransDataVertSlideVert>
r_sv`, as that only contains the selected items (and not all items
considered for proportional editing).
Since the introduction of the sorted index map (df6d345bb4) the
selected "transform items" are simply visited first, but not sorted to
the front of the array. This means that these array indices cannot be
used to index into other arrays that only contain sorted data, because
they will overflow.
Ref !140976
Introduced with 96e549c092
While the above commit applied versionings to the related flags, it did
not convert either the UI elements or the underlying grease pencil code
to use the now generic `Brush` properties.
Pull Request: https://projects.blender.org/blender/blender/pulls/141001
The same logic was duplicated in two places, now factorize it into its
own function.
This code reads (peeks) _some_ ID info from a blendfile, without actually
reading the full ID data. And it also decides if the given ID BHead
should retained, or skipped.
This is mainly used to show a list of available IDs or assets to link or
append.
This check was meant to catch unknown failure cases but instead it
meant any attribute with an empty array (e.g. from a mesh with no
faces) would not be loaded. Instead the failure case should only be
when there is no data when the array is not meant to be empty.
Pull Request: https://projects.blender.org/blender/blender/pulls/141096
This adds support for scene assets.
* Scenes can be marked like any other ID as assets (e.g. by right-clicking on a scene ID selector).
* Scenes will generate previews by rendering the view from the active camera in solid view.
Note that this requires the scene to have an active camera.
* When dragging a scene asset onto anywhere in a window (except the asset browser itself),
it will import the asset (or use the local ID) and set the scene as the active one in the window.
Pull Request: https://projects.blender.org/blender/blender/pulls/141081
Alt click works perfect to disable restriction toggle (hide/selection
toogle) on selected object tree elements from outliner. But fails when
re-enabling them. This is because `screen_ctx_selected_editable_objects`
returns a list of selectable bases. When above two restriction toggles
are disabled, `selection` flag is cleared from resepective bases. To avoid
such situation, handle outliner case separately inside
`UI_context_copy_to_selected_list ()`, store list of objects that are selected
in outliner (i.e. `TSE_SELECTED` flag is set).
Also added few findings as comments in #133459
Pull Request: https://projects.blender.org/blender/blender/pulls/133469
The graph.keyframe_jump operator is deprecated. Use the regular
screen.keyframe_jump operator that was recently fixed to work in all
animation editors.
This PR adds several more built-in variables for path templates:
- `scene_name`: name of the current scene.
- `camera_name`: name of the current camera.
- `node_name`: only for paths owned by a node; the name of the node.
- `blend_name_lib`: name of the blend file of the ID the path property
is on, sans file extension.
- `blend_dir`: path up to (but not including) the currently open blend
file.
- `blend_dir_lib`: path up to (but not including) the blend file of the
ID the path property is on.
Additionally, adding support for `node_name` required re-thinking the
"path template type" system a bit:
Previously, the the `PropertyPathTemplateType` of a property completely
dictated what variables were made available to it. However, if we stuck
with that system then we would need to split
`PROP_VARIABLES_RENDER_OUTPUT` into two enum items: one for "normal"
render output paths like the one that lives on the `Scene`, and one for
"node" render output paths like the ones on the File Output node.
Instead of doing that, this PR makes `PropertyPathTemplateType` only
responsible for dictating the "purpose-specific" variables. In this
case, render-specific variables like fps, resolution, etc. Then the
availability of variables like `node_name` are instead based on what
owns the path (a node or not, in this case). There are also general
variables, like `blend_name`, that are now available to all path
templates.
(Part of #133001)
Pull Request: https://projects.blender.org/blender/blender/pulls/139438