Age | Commit message (Collapse) | Author |
|
|
|
The correct type should be set by invoke already, changing it to a non-
matching type (e.g. trying to remap Mesh users with a Camera block) does
not really make sense afaict, reason being that we would be presented
with the "Invalid old/new ID pair" message in such case anyways (code
checks GS(old_id->name) == GS(new_id->name)).
This alone wouldnt be a pressing issue, but since doing this with an
object ID type crashes atm., it seems to make sense to clean this up now
(of course the crash should be looked into, but this is for a separate
patch -- if that is solved, we could also think about adding the "Remap
Users" entry back in the context menu for objects as well [which was
removed in rB17bd5c9d4b1e for some reason]).
Part of T93799.
Differential Revision: https://developer.blender.org/D13512
|
|
The versioning code was accidentally put not at the very bottom.
That lead to a situation where it wasn't run on some files that happened
to be within a specific short time frame.
Since the versioning code is idempotent, it can just run again on existing
files. Therefore, this commit just moves it back to the bottom so that it
is executed on all files again.
Broken Commit: rB5b61737a8f41688699fd1d711a25b7cea86d1530.
|
|
This was an oversight in rB8e2c9f2dd3118bfdb69ccf0ab2b9f968a854aae4.
|
|
SSBOs weren't sorted, but other types were. This was an
oversight when SSBOs were introduced (GPU compute pipeline).
Issue identified by @fclem.
|
|
|
|
This lets the undo history expand as a regular sub-menu
instead of being a popup.
Also disable the active undo step menu item as this is a no-op.
|
|
|
|
|
|
Change the spelling of the QuickTime output video container item from
"Quicktime" to "QuickTime"
Differential Revision: https://developer.blender.org/D10929
Reviewed by Harley Acheson
|
|
|
|
Now that point clouds can be rendered with cycles, it makes sense
to allow assigning a material to them. Note that like volumes, they
only support a single material though.
|
|
I need this for a refactor I'm looking into for bounding boxes.
It may be helpful in the future when using `CurveEval` in more places.
Differential Revision: https://developer.blender.org/D13596
|
|
Fully get rid of `BKE_collection_object_find` in
`lib_override_group_tag_data_object_to_collection_init`, even if only
used a few times this function was still noticeable in profiling data.
Now instead loop over collections' objects to build required
object-to-collections mapping.
Adds an extra 5-10% speed-up compared to previous commit rB0624fad0f3ff.
Related to T94059.
|
|
Operator was erroneously starting edge_slide operation.
Revert part of the changes in rB3fab16fe8eb4 as obedit_type was being
confused with object_mode.
|
|
`BKE_collection_object_find` has extremely bad performances (very high
time complexity). While ideally this should be fixed in that API, for
now cache its results once at the beginning of the resync/creation
process.
This makes loading of complex production files with a lot of
liboverrides to resync three to four times faster.
Thanks to @brecht for the profiling in T94059.
|
|
Not finding subitem when its name and index are invalid/unset is
expected behavior, and does happen when e.g. inserting a new constraint
or modifier at the begining of the stack.
|
|
When selecting the current undo step there is no need to do anything.
Fix and minor refactor to de-duplicate refreshing after running
undo/redo & undo history.
|
|
Both {key Alt} editing behavior as well as `Copy To Selected` were not
working on geometry nodes modifiers (even if these matched exactly -
having the same nodegroup - on multiple objects)
Reason is that code checks pointer equality on the discovered properties
[geometry nodes modifier properties are stored as ID properties], but
these are not the same across objects (since these are fetched from
NodesModifierSettings - which are different on different objects).
note: if general custom properties are "API defined" on existing classes,
this was working, we are getting the exact property for different IDs in
this case
Now be more permissive with ID properties not defined on classes in
general and dont check pointer equality for them. For ID properties on
specific IDs (not the ones defined on classes) this //might// be undesired
(havent spotted issues though, even if equally named ID properies with
different types existed -- this then simply does nothing).
For geometry nodes modifiers, new code also checks if the nodegroups are
the same [since generic naming "Input_XXX" is shared for all modifiers --
and starting to copy over things to unrelated modifiers is not desired
here].
Fixes T93983.
Maniphest Tasks: T93983
Differential Revision: https://developer.blender.org/D13573
|
|
This resolves an old TODO to deduplicate code in copy_to_selected_button
& ui_selectcontext_begin.
This is also in hindsight of adding id-property support [incl. Geometry
Nodes modifier properties] for this in the next commit.
No behavior change expected here.
ref T93983 & D13573
|
|
No functional changes.
|
|
|
|
`<some_id>.keyframe_insert()` now sends a notifier that animation data
was changed, so that animation-related editors can properly refresh.
Since this function is quite high-level (if necessary it creates the
Action and FCurves), I thought this would be a suitable location for the
notifier. If high keyframing speed is required, it is still recommended
to use `FCurveKeyframePoints.insert(options={'FAST'})` instead.
|
|
|
|
Saving with only a filename (from Python) wasn't being prevented,
while it would successfully write the file to the working-directory,
path remapping and setting relative paths wouldn't work afterwards
as `Main.filepath` would have no directory component.
Disallow this since it's a corner case which only ever occurs
when path names without any directories are used from Python,
the overhead of expanding the working-directory for all data saving
operations isn't worthwhile.
The following changes have been made:
- bpy.ops.wm.save_mainfile() without a filepath argument
fails & reports and error when the file hasn't been saved.
Previously it would write to "untitled.blend" and set the
`G.main->filepath` to this as well.
- bpy.ops.wm.save_mainfile(filepath="untitled.blend")
fails & reports and error as the filename has no directory component.
- `BLI_path_is_abs_from_cwd` was added to check if the path would
attempt to expand to the CWD.
|
|
Revert part of the fix from 073669dd8588a3b80dfffee98b4f239b4baee8c8
that initialized the file-path on first save as it's no longer needed.
Also remove relbase argument to BLI_path_normalize as the destination
file paths shouldn't use relative locations.
|
|
Currently, most node buttons are defined in `drawnode.cc` however,
this is inconvenient because it requires editing many files when adding new nodes.
The goal is to minimize the number of files needed to add or update a node.
This commit moves most of the node layout functions for composite nodes into their respected
`source/blender/nodes/composite/nodes` file.
In the future, these functions will be simplified to `node_layout` once files have their own namespace.
See {D13466} for more information.
Reviewed By: HooglyBoogly
Differential Revision: https://developer.blender.org/D13523
|
|
In almost all cases there is no difference between `G.relbase_valid`
and checking `G.main->filepath` isn't an empty string.
In many places a non-empty string is already being used instead of
`G.relbase_valid`.
The only situation where this was needed was when saving from
`wm_file_write` where they temporarily became out of sync.
This has been replaced by adding a new member to `BlendFileWriteParams`
to account for saving an unsaved file for the first time.
Reviewed By: brecht
Ref D13564
|
|
|
|
|
|
|
|
Some nodes didn't check the type of the link's socket for filtering.
Do this with a combination of manually calling the node tree's validate
links function and using the helper function for declarations.
Also clean up a few cases that added geometry sockets manually
when they can use the simpler helper function.
|
|
This was missing from rB11be151d58ec0ca955f.
It uses the same approach as the quadrilateral node.
|
|
We cannot depend on node->id being non-null for group nodes.
|
|
Also slightly change naming to avoid camel case.
|
|
This patch removes no-op node editor preview code (`PR_NODE_RENDER`)
and most calls to `BKE_node_preview_init_tree`. The only remaining call is
in the compositor.
- Shader nodes previews don't seem to do anything.
- In-node previews for the texture node system doesn't work either.
This is a first step to refactoring to remove `preview_xsize`,
`preview_ysize`, and `prvr` from nodes in DNA, aligned with
the general goal of removing runtime/derived data from data
structs.
Differential Revision: https://developer.blender.org/D13578
|
|
This commit adds a search menu when links are dragged above empty
space. When releasing the drag, a menu displays all compatible
sockets with the source link. The "main" sockets (usually the first)
are weighted above other sockets in the search, so they appear first
when you type the name of the node.
A few special operators for creating a reroute or a group input node
are also added to the search.
Translation is started after choosing a node so it can be placed
quickly, since users would likely adjust the position after anyway.
A small "+" is displayed next to the cursor to give a hint about this.
Further improvements are possible after this first iteration:
- Support custom node trees.
- Better drawing of items in the search menu.
- Potential tweaks to filtering of items, depending on user feedback.
Thanks to Juanfran Matheu for developing an initial patch.
Differential Revision: https://developer.blender.org/D8286
|
|
Previously we used a `CellValue` class to hold the data for a cell,
and called a function to fill it whenever necessary. This is an
unnecessary complication when we have virtual generic arrays
and most data is already easily accessible that way anyway.
This patch removes `CellValue` and uses `fn::GVArray` to provide
access to data instead.
In the future, if rows have different types within a single column,
we can use a `GVArray` of `blender::Any` to interface with the drawing.
Along with that, the use of virtual arrays made it easy to do a
few other cleanups:
- Use selection domain interpolations from rB5841f8656d95
for the mesh selection filter.
- Change the row filter to only calculate for necessary indices.
Differential Revision: https://developer.blender.org/D13478
|
|
Differential Revision: https://developer.blender.org/D13585
|
|
The constructor of MemoryProxy initializes 3 of 4 instances variables.
If a MemoryProxy is constructed and MemoryProxy::free is called
on this instance, buffer_ is undefined and 'delete buffer_;' causes errors.
Although this misuse pattern does not exist in the current codebase
it already tripped up the Address Sanitizer on various occasions
while debugging unrelated problems.
Reviewed By: jbakker
Differential Revision: https://developer.blender.org/D13569
|
|
This adds a bool field selection input to the Attribute Statistics node.
This is useful for running calculations on a subset of the input field data
rather that then whole set.
Differential Revision: https://developer.blender.org/D13520
|
|
bda9e4238a07a72c26598ea9025e00f6ca896750 changed smooth-view
not to redraw when there were no changes made.
Redrawing is needed for repositioning the cursor.
Subscribe to changes to the 3d cursor to ensure all view ports
are updated (not just the current one).
|
|
Originally pointcache wasn't supported when the file wasn't saved.
Remove commented code as this hasn't been the case for a long time.
|
|
|
|
Double the allocation size when the limit is reached instead of
increasing by a fixed number.
Also re-allocate to the exact size once complete instead of over
allocating. This gives a minor speedup in my tests ~19% faster
tessellation for ~1million faces.
|
|
This broke "test_undo.view3d_multi_mode_select" test in
"lib/tests/ui_simulate" and is likely exposed by recent changes to
bounding box calculation.
The missing check for DL_INDEX4 dates back to code from 2002 which
intended to check this but was checking for DL_INDEX3 twice
which got removed as part of a cleaned up.
This could be hidden from memory checking tools as meta-balls
over-allocate vertex arrays.
|
|
|
|
|
|
Added support for 1, 2, 3 float channel source images. Destination
images must still be 4 channels.
|
|
This is basically the same as rBee4ed99866fbb7ab04, the fix is
simply to check if the spline has evaluated points when deciding
the offsets into the result points array.
|