Age | Commit message (Collapse) | Author |
|
|
|
|
|
|
|
|
|
Code would manually do the same things in a couple of places, obvious case of
unnecessary code duplication.
|
|
|
|
|
|
|
|
This adds a viewer node similar to the one in the compositor.
The icon in the headers of nodes is removed because it served
the same purpose and is not necessary anymore.
Node outputs can be connected to the active viewer using
ctrl+shift+LMB, just like in the compositor. Right now this collides
with the shortcut used in the node wrangler addon, which will
be changed separately.
As of now, the viewed geometry is only visible in the spreadsheet.
Viewport visualization will be added separately.
There are a couple of benefits of using a viewer node compared
to the old approach with the icon in the node header:
* Better support for nodes that have more than one geometry output.
* It's more consistent with the compositor.
* If attributes become decoupled from geometry in the future,
the viewer can have a separate input for the attribute to visualize.
* The viewer node could potentially have visualization settings.
* Allows to keep "visualization points" around by having multiple
viewer nodes.
* Less visual clutter in node headers.
Differential Revision: https://developer.blender.org/D11470
|
|
Using BMesh operators through the edit-mesh API created a full copy
of the mesh so it was possible to restore the mesh in case
one of the operators raised an error.
Remove support for automatic backup/restore from the EDBM_op_* API's
as it adds significant overhead and was rarely used.
Operators that need this can use the BMBackup API to backup & restore
the mesh in case of failure.
Add warning levels to BMO_error_raise so operators can report problems
without it being interpreted as a request to cancel the operation.
For high-poly meshes creating and freeing a full copy is an expensive
operation, removing this gives a speedup of ~1.77x for most operators
except for "connect_verts" / "connect_vert_pair"
which still uses this functionality.
|
|
The evaluated meshes no longer store a copy of the edit-mesh
so tagging when a BMesh operator fails can be removed.
|
|
- Replace '[mce]' with "Mike Erwin".
- Remove references to turn-table author as it isn't useful information,
the author was credited in the commit message.
|
|
|
|
|
|
Also use doxy style function reference `#` prefix chars when
referencing identifiers.
|
|
Also resolve a warning from the previous commit. The next blocker to
using const is `BKE_mesh_wrapper_ensure_mdata`.
|
|
|
|
This code was written for the File Browser together with the Asset Engine
design, that is not part of the Asset Browser/System design anymore. Updated
comments accordingly.
`FileDirEntryRevision` was actually used, but I removed it and moved the used
members to the parent `FileDirEntry`, since there is no concept of revisions
currently.
There should be no functional changes.
|
|
Add a new transformation space choice for bone constraints, which
represent the local transformation of the target bone in the constraint
owner's local space.
The use case for this is transferring the local (i.e. excluding the
effect of parents) motion of one bone to another one, while ignoring
the difference between their rest pose orientations.
The new option replaces the following setup:
* A `child` bone of the `target`, rotated the same as `owner` in rest pose.
* A `sibling` bone of the `target`, positioned same as `child` in rest
pose and using Copy Transforms in World Space from `child`.
* The `owner` bone constraint uses Local Space of `sibling`.
(This analogy applies provided both bones use Local Location)
Differential Revision: https://developer.blender.org/D9493
|
|
This constraint can be naturally viewed as a prototype for a future
4x4 matrix math node (or subset thereof), since its basic semantics
already is matrix assignment. Thus it makes sense to add math options
to this constraint to increase flexibility in the meantime.
This patch adds support for several operations that would be useful:
- An option to remove shear in the incoming target matrix.
Shear is known to cause issues for various mathematical operations,
so an option to remove it at key points is useful.
Constraints based on Euler like Copy Rotation and Limit Rotation
already have always enabled shear removal built in, because their
math doesn't work correctly with shear.
In the future node system shear removal would be a separate node
(and currently Limit Rotation can be used as a Remove Shear constraint).
However removing shear from the result of the target space conversion
before mixing (similar to Copy Rotation) has to be built into
Copy Transforms itself as an option.
- More ways to combine the target and owner matrices.
Similar to multiple Inherit Scale modes for parenting, there are
multiple ways one may want to combine matrices based on context.
This implements 3 variants for each of the Before/After modes
(one of them already existing).
- Full implements regular matrix multiplication as the most basic
option. The downside is the risk of creating shear.
- Aligned emulates the 'anti-shear' Aligned Inherit Scale mode,
and basically uses Full for location, and Split for rotation/scale.
(This choice already existed.)
- Split Channels combines location, rotation and scale separately.
Looking at D7547 there is demand for Split Channels in some cases,
so I think it makes sense to include it in Copy Transforms too, so that
the Mix menu items can be identical for it and the Action constraint.
Differential Revision: https://developer.blender.org/D9469
|
|
To some degree these are changes in preparation of further Asset Browser
related changes, see D11119. But also, the current UUID design was written for
the old Asset Engine design, which isn't part of the current Asset
Browser/System design anymore.
And lastly, "UUID" are a well established standard
(https://en.wikipedia.org/wiki/Universally_unique_identifier) which this
implementation didn't follow. What we have here is more of an index, or a
unique identifier (https://en.wikipedia.org/wiki/Unique_identifier).
So this does the following changes:
* Renames "UUID" to "UID"
* Changes the type of the UID to (a typedef'ed) `uint32_t`, which is more than
enough for our current asset system design and simplifies things.
* Due to the new type, we can avoid allocations for hash-table storage.
* Add/use functions for UID handling
Note that I am working on a major rewrite of the file-list code. Meanwhile we
want to keep things sensible.
|
|
his new modifier allows to generate weights base on:
* Angle of the stroke relative to object or world orientation. For example, if the value is 90, the maximum weights will be for vertical lines and minimum for horizontal lines.
* Distance to Target object. The distance calculated is normalized to get valid weights between 0 and 1.0.
The weights are created in an existing vertex group and the data can be replaced or mixed with the existing value to combine different weight effects. The minimum parameter, allows to define the minimum weight generated. This is useful to avoid very low weights.
The generated weights can be used in any modifier. For example, the angle weight value can be used to mimic FreeStyle Caligraphy modifier using the weight with the thickness modifier.
Also some modifier has been changed to inlude a new option to use the weights as factor of the effect.
As result of this change, the fading option has been removed from Thickness and Opacity modifiers because this can be done using the new modifier, it's not logic to repeat the same.
Reviewed By: mendio, filedescriptor
Differential Revision: https://developer.blender.org/D11604
|
|
Generally the evaluated mesh should not be changed, since that is the
job of the modifier stack. Current code is far from const correct in
that regard. This commit uses a const variable for the reult of
`BKE_object_get_evaluated_mesh` in some cases. The most common
remaining case is retrieving a BVH tree from the mesh.
|
|
|
|
|
|
Handle width calculation was incorrect in drawing code. This caused
handles to be invisible when zoomed out.
After fixing math, handles become too large, so now they are constrained
to quarter of strip width, which feels more natural and represents
clickable area more closely.
`sequence_handle_size_get_clamped()` did not return size in pixels, but
in 2D-View space, this comment was corrected.
|
|
SeqCollection wasn't freed.
It wasn't easy to find culprit so added argument to
SEQ_collection_create() to pass function name.
Reviewed By: sergey
Differential Revision: https://developer.blender.org/D11746
|
|
Address initial feedback:
- Use checkboxes instead of radio buttons
- Hide snapping distance control from UI
- Tweak snapping line color - use selected strip color, 50% transparency. Similar to other editors
- Draw 2px thick line, since strip outline is also 2px thick
Reviewed By: HooglyBoogly
Differential Revision: https://developer.blender.org/D11759
|
|
When multiple File or Asset Browsers would load at once (e.g. when loading a
file with two File Browsers open) and they would load multiple directories or
.blend files (using the Recursions option in the File Browser or loading an
asset library with multiple .blends), often only one File/Asset Browser would
correctly load all files. Others would be incomplete or entirely empty. That
was because of a race condition, where the directories or .blend files would be
loaded concurrently and the first one that finished would cancel the other
ones. This again happened because they used the job system with the same
"owner", which by design makes all jobs with the same owner cancel as soon as
the first is finished.
Address this by making sure they have different owners. That is, not the scene
anymore, but the filelist the job belongs to. Doesn't make much sense to use
the scene as owner for scene-unrelated file loading anyway.
Steps to reproduce were:
* Open two File Browsers as regular editors.
* In the Display Settings popover, set "Recursions" to 2 or 3 levels.
* Navigate to a directory with plenty of subdirectories in both File Browsers.
* Save the file.
* Reload the file, one of the File Browsers likely has an incomplete file list.
Alternatively, use Asset Browsers and open an asset library containing multiple
.blends.
|
|
|
|
strips
This patch writes the timecode in the .srt file relative to the start
frame of the scene. If the timecode is global but scene does not start
at frame 0 the subtitles don't match if they get loaded in an external
video player. Muted strips will be ignored. Don't allow negative
timecodes in .srt.
Reviewed By: Richard Antalik
Differential Revision: http://developer.blender.org/D11762
|
|
Edit-mesh partial update logic assumed translate didn't need normals
to be recalculated (for faces with all vertices being transformed).
However translate can optionally rotate which requires
all transformed normals to be updated.
Check for this case and use the previous partial-update method
when it modified extra geometry, so the normals are properly reset.
Further updates need not recalculate them.
|
|
|
|
Supporting both object & edit-mode is more involved.
Both cases are now supported with object mode tracking the last-used
state for rotation so it's only reset once when rotation is disabled.
|
|
|
|
|
|
|
|
|
|
|
|
This changes `UI_but_func_tooltip_set` so that it allows passing a custom free function, which has two benefits:
* The caller can pass `null` to indicate that the value should not be freed.
* Arbitrary c++ data can be passed to the callback (before the struct had to be trivially destructible).
I added `uiFreeArgFunc` and used it in other places where appropriate.
Differential Revision: https://developer.blender.org/D11738
|
|
This was being called for every element in some situations.
|
|
Use the term 'mat_final' for calculated matrices used for transforming.
Also rename 'pivot' to 'pivot_local'.
|
|
|
|
|
|
Multi-threading support for transform modes: bevel-weight, crease,
push-pull, rotate, shear, shrink-fatten, skin-resize, to-sphere,
trackball & translate.
This is done using a parallel loop over transform data.
From testing a 1.5million polygon mesh on a 32 core system
the overall performance gains were between ~20-28%
To ensure the code is thread-safe arguments to shared data are const.
Reviewed By: mano-wii
|
|
|
|
|
|
Reserve the term count for values that require calculation
(typically linked lists).
Without this convention it's difficult to know if using a length
accessor function in a loop will be O(N^2) without inspecting the
underlying implementation.
|
|
|
|
The `applySnap` callback of each mode was overwriting the value
calculated in `transform_snap_sequencer_apply`.
|