Age | Commit message (Collapse) | Author |
|
Copy animation for strips that are inside metas.
|
|
The comparison between dot products of each point of the poly were
not taking into consideration negative values. FLT_MIN was used rather
than -FLT_MAX due to a misunderstanding of the FLT_MIN definition.
Maniphest Tasks: T98718
Differential Revision: https://developer.blender.org/D15161
|
|
PBVH draw has an optimization where it only sends the
active attribute to the GPU in workbench mode. This
fails if multiple viewports are open with a mix of
workbench and EEVEE mode; it also causes severe lag
if any workbench viewport is in material mode.
There are two solutions: either add the code in sculpt-dev
that checks for EEVEE viewports at the beginning of each frame,
or integrate pbvh draw properly inside the draw manager
and let it handle which attributes should go to the GPU.
|
|
Retrieving a mutable custom data layer from a const ID
should not be possible.
|
|
Don't show an error if no operator property is set at all that can be
used to find an image file or ID for dropping. The caller can decide if
this is an error that needs reporting or a valid case, like it is here.
|
|
Caused by oversight in 7afcfe111aac - code relied on fact, that strip
boundary holds old value until updated.
Calculate new offsets based on stored orignal offsets.
|
|
|
|
It's potentially possible that the attribute duplication could fail,
for whetever reason. There is no great reason not to be safe in
this high-level code.
|
|
Use a name argument, for the same reasons as 6eea5f70e3b79e3c668.
Also reuse the layer and unique name creation in `BKE_id_attribute_new`
instead of reimplementing it. Also include a few miscellaneous cleanups
like using const variables and `std::string`.
|
|
The `update_active_strip_from_listbase()` function took meta-strips in
the "source" list into account, but didn't recurse into the
corresponding meta-strip of the "destination" list. This is now fixed.
`update_active_strip_from_listbase()` needed a few changes to resolve
the issue:
- It was renamed to `find_active_strip_from_listbase()` to limit its
reponsibility to just finding the active strip. It now leaves the
assignment to the caller. This reduces the number of parameters by 1
and makes recursion simpler.
- The destination strips are now, like the source strips, passed as
`ListBase`, so that both source & dest can be recursed simultaneously.
|
|
The callback would just assume that it's only called on materials, which
may in fact not be the case. It could also be called for other ID types
and layer collections (see `outliner_do_libdata_operation()`). Properly
check this now.
Also avoid faling silently when the object or object-data to unlink from
couldn't be determined. Report this to the user. Operators that just do
nothing are confusing.
|
|
This issue was only exposed by ba49345705a3. The ID pointer of the
material's parent tree-element wasn't actually pointing to an ID, but to
the list-base containing the IDs. It was just unlikely to cause issues
in practice, although an assert was thrown.
Just don't do anything if the object or object-data to unlink the
material from could not be found. The following commit will introduce a
error message about this.
|
|
The internal function relies on `CustomData_copy_data_layer` currently,
which doesn't work for BMesh. Support could be added as a special case
for BMesh, but in the meantime avoid bugs by just changing the poll.
|
|
Instancing with geometry nodes uses just the evaluated Mesh, and ignores the
Object that it came from. That meant that it would try to look up the subsurf
modifier on the instancer object which does not have the subsurf modifier.
Instead of storing a session UUID and looking up the modifier data, store a
point to the subsurf modifier runtime data. Unlike the modifier data, this
runtime data is preserved across depsgraph CoW. It must be for the subdiv
descriptor contained in it to stay valid along with the draw cache.
As a bonus, this moves various Mesh_Runtime variables into the subsurf runtime
data, reducing memory usage for meshes not using subdivision surfaces.
Also fixes T98693, issues with subdivision level >= 8 due to integer overflow.
Differential Revision: https://developer.blender.org/D15184
|
|
Ensure the "null" node graph, which is the root node of the export
graph, always exists.
The crash occured when "Use Settings For" was set to Render, "Visible
Objects Only" was ticked, and a single parent object is in the scene but
disabled for render.
Because the only object attached to the root of the project was disabled
for export, there was no "null" root node added to the export graph.
This change will always add an empty "null" node with no children to the
graph at the start. Other objects will get added to its children as
required.
Reviewed By: sybren
Maniphest Tasks: T85729
Differential Revision: https://developer.blender.org/D15182
|
|
Designate private variable names as described by the style guide,
and also add `num` at the end of variable names rather than at
the beginning, as discussed in T85728.
|
|
The value of disabled buttons shouldn't be changed through dropping onto
it. Check for the disabled state in the drop operator poll, so the
dragging code will change the cursor to show that dropping isn't
possible at the given cursor location.
|
|
platforms
|
|
* Add a new keymap for `curves.*` operators. This is mainly for
edit mode operators, but since we don't have edit mode yet,
these operators are also exposed in sculpt mode currently.
* Fix the naming of the "sculpt curves" keymap.
|
|
Some OBJ files out there (see T98782) have face definitions that
contain vertex normal indices, but the files themselves don't
contain any vertex normals. The code was doing a "hey, that's an
invalid index" and skipping these faces. But the old python importer
was silently ignoring these normal indices, so do the same here.
Reviewed By: Howard Trickey
Differential Revision: https://developer.blender.org/D15177
|
|
Adds support for vertex colors to OBJ I/O.
Importer:
- Supports both "xyzrgb" and "MRGB" vertex color formats.
- Whenever vertex color is present in the file for a model, it is
imported and a Color attribute is created (per-vertex, full float
color data type). Color coming from the file is assumed to be sRGB,
and is converted to linear upon import.
Exporter:
- Option to export the vertex colors. Defaults to "off", since not
all 3rd party software supports vertex colors.
- When the option is "on", if a mesh has a color attribute layer,
the active one is exported in "xyzrgb" form. If the mesh has
per-face-corner colors, they are averaged on the vertices.
Colors are converted from linear to sRGB upon export.
Reviewed By: Howard Trickey
Differential Revision: https://developer.blender.org/D15159
|
|
|
|
|
|
Scaling an image shouldn't depend on the current context.
|
|
|
|
The BMesh case was missing when extracting the loose edges flags used for
display, so the code was crashing on unitialized `MEdge` pointer.
|
|
Before this, we would build the sub-trees of some elements, just to
remove them afterwards. In big files, this would sometimes build ten
thousands of elements unnecessarily. Now support not building those
sub-trees in the first place.
Performance tests in a Sprite Fright production file (release build):
- View Layer display mode, reduced Outliner tree rebuilding from ~45ms
to 12-17ms
- Library Overrides display mode, Hierarchies view, reduced tree
rebuilding from 5-6s(!) to 220ms
|
|
Caused by `seq_open_anim_file` early returning if anim struct exists,
exen if it's not initialized. To ensure `anim` struct is initialized
when `openfile` argument is true, don't do early return.
|
|
The knife BVH raycast functionality was missing a check to discard
points which were clipped.
|
|
Apply scale factor when preview aspect ratio is not 1:1.
|
|
Length was set properly when added, but it was clamped by function
`seq_time_effect_range_set`
Add early return for generator effects where offsets can be used
normally.
|
|
The "bl_order" property on add-on UI panels can be used to put
them in a specific order regardless of the order of registering.
This patch makes this ordering also possible for panels inside panels.
Differential Revision: https://developer.blender.org/D15174
|
|
The documentation for `HierarchyIterator::weak_export` mentions a feature
that was removed at some point. Another example is used to illustrate its
functionality.
No functional changes.
|
|
The problem with T98683 is that sampling interval can be set to very small,
resulting in very dense points. This patch attempts to optimize that a little bit.
Reviewed By: Antonio Vazquez (antoniov)
Differential Revision: https://developer.blender.org/D15180
|
|
- Use uintxx_t for all 8/16/64 bit integer types.
- Removed prepend_edge_direct thingy which is no longer needed in current edge iterator model.
- Minor code path adjustments like only copies view vector when necessary etc.
- Correctly handle ies==NULL in edge cutting function.
- White spaces and comments etc.
Reviewed By: Sebastian Parborg (zeddb)
Differential Revision: https://developer.blender.org/D15181
|
|
Also remove unused includes in some cases.
This should make these files recompile less often.
|
|
Found via codespell -q 3 -S ./intern,./extern -L ans,ba,bording,datas,eiter,fiter,hist,inout,lod,ot,parm,parms,pixelx,pres,te
Contributed by luzpaz.
Differential Revision: https://developer.blender.org/D15155
|
|
|
|
Moves code for managing dragging data from buttons to a separate file.
This way all this closely related code is in one location, making it
easier to see how it all relates, and easier to find.
|
|
The normals flags were not setup properly which made normals for all
elements (vertices, faces) to be drawn when using the normals overlay.
Also remove usage of uints for the flag in the APIs.
|
|
|
|
Moved gpu vert format checking outside of pbvh_update_draw_buffers,
which isn't called in every code path of BKE_pbvh_draw_cb. This led
to the draw cache being partially populated by old draw buffers
that were subsequently freed, causing a crash.
|
|
|
|
This mostly affects large rotation gizmos at high DPI.
Without this patch, they appear as 32-gons instead of circles.
|
|
|
|
The delaunay2d function, with mode CDT_CONSTRAINTS_VALID_BMESH_WITH_HOLES
sometimes didn't eat away all of the edges. Doing a prepass to remove
the outer edges until they hit the constraints solves this problem.
|
|
Ensuring that relative paths to textures in exported USDs use
forward slash separators, for cross-platform compatibility.
|
|
This patch does code clean ups in `LineartRenderBuffer` because it's
grown kinda big and we need better way to organize those variables inside.
Reviewed By: Sebastian Parborg (zeddb)
Differential Revision: https://developer.blender.org/D15172
|
|
This is a partial fix for T90535.
Added Material Name Collision USD import menu option, to specify
the behavior when USD materials in different namespaces have the
same name.
The Material Name Collision menu options are
- Make Unique: Import each USD material as a unique Blender material.
- Reference Existing: If a material with the same name already
exists, reference that instead of importing.
Previously, the default behavior was to always keep the existing
material. This was causing an issue in the ALab scene, where
dozens of different USD materials all have the same name,
usdpreviewsurface1, so that only one instance of these materials
would be imported.
Reviewed by: Sybren
Differential Revision: https://developer.blender.org/D14869
|
|
override' ones in the Outliner.
Conceptually animated/driven properties are not controlled by the
liboverride system anymore, even though they may generate override
operations. So consider them as part of the 'system overrides' category,
and hide them by default in the Outliner.
|