Age | Commit message (Collapse) | Author |
|
Use the same partial-update functions used by transform when
editing vertex locations with the number buttons.
This avoids unnecessary calculations for normals and tessellation.
This gives around 1.44x overall speedup on high poly meshes.
|
|
Support for begin/update/end callbacks allowing state to be cached
and reused while dragging a number button or slider.
This is done using `UI_block_interaction_set` to set callbacks.
- Dragging multiple buttons at once is supported,
passing multiple unique events into the update function.
- Update is only called once even when multiple buttons are edited.
- The update callback can detect the difference between click & drag
actions so situations to support skipping cache creation and
freeing for situations where it's not beneficial.
Reviewed by: Severin, HooglyBoogly
Ref D11861
|
|
In most cases the undo system was loading undo steps twice.
This was needed since some undo systems (sculpt, paint, text)
require stepping out of the current undo step.
Use a flag to limit this to the undo systems that need it.
This improves performance for other undo systems.
This gives around 1.96x speedup in edit-mesh for high-poly objects.
Reviewed by: mont29
Ref D11893
|
|
- Tag the object data instead of the object when decoding
(this avoids duplicating mesh object-data on each undo-step).
- Calculate face normals as part of multi-threaded tessellation.
This gives ~11% speedup with 1.5x million polygons.
|
|
|
|
Replace with brief note in warning.
|
|
Rename:
- EDBM_mesh_free -> EDBM_mesh_free_data
BKE_editmesh_free -> BKE_editmesh_free_data
Since this doesn't free the edit-mesh pointer.
- BKE_editmesh_free_derivedmesh -> BKE_editmesh_free_derived_caches
Since this no longer uses derived-mesh, match naming for the related
object function BKE_object_free_derived_caches.
Also remove `do_tessellate` argument from BKE_editmesh_create,
since the caller can explicitly do this if it's needed,
with the advantage that it can be combined with normal calculation
which is faster on high-poly meshes.
|
|
Docs: https://docs.microsoft.com/en-us/cpp/preprocessor/predefined-macros
Differential Revision: https://developer.blender.org/D11460
|
|
Regression in d25747ee751096de2e417a7da1316bf5bf81c25a
|
|
|
|
During a mesh transformation in edit mode (Move, Rotate...), only part of
the batch cache needs to be updated.
This commit allows only update only the drawn batches seen in
`BKE_object_data_eval_batch_cache_deform_tag` if the new
`ID_RECALC_GEOMETRY_DEFORM` flag is used.
This new flag is used in the transforms operation for edit-mesh and
results in 1.6x overall speedup in heavy subdiv cube.
Differential Revision: https://developer.blender.org/D11599
|
|
This commit adds a curve primitive node for creating squares,
rectangles, trapezoids, kites, and parallelograms. It also includes
a mode where the four points are just vector inputs.
Differential Revision: https://developer.blender.org/D11665
|
|
In this bug report it resulted in rendering animations stopping too early,
but this affected more areas.
After the previous cleanup commit, it becomes clear that frame and ctime
values were mixed up.
|
|
Confusingly, BKE_scene_frame_get did not match the frame number as expected by
BKE_scene_frame_set. Instead it return the value after time remapping, which
is commonly named "ctime".
* Rename BKE_scene_frame_get to BKE_scene_ctime_get
* Add a new BKE_scene_frame_get that matches BKE_scene_frame_set
* Use int/float depending if fractional frame is expected
|
|
Sorry, missed this in 53cf8e83b37d.
|
|
Under some circumstances (e.g. when rendering) the geometry
nodes logger is not used. This was missing a simple null check.
|
|
It always bothered me that we'd do the `BLI_assert(... || !"message")` trick to
print a message alongside the assert, while it should be trivial to have a way
to pass an extra string as additional argument.
This adds `BLI_assert_msg()` with a second argument for a message. E.g.:
```
BLI_assert_msg(
params->rename_id == NULL,
"File rename handling should immediately clear rename_id when done, because otherwise it will keep taking precedence over renamefile.");
```
On failure this will print like this:
```
0 Blender 0x00000001140647a3 BLI_system_backtrace + 291
[...]
13 Blender 0x00000001092647a6 main + 3814
14 libdyld.dylib 0x00007fff203d8f5d start + 1
BLI_assert failed: source/blender/editors/space_file/file_ops.c:2352, file_directory_new_exec(), at 'params->rename_id == ((void*)0)'
File rename handling should immediately clear rename_id when done, because otherwise it will keep taking precedence over renamefile.
```
Reviewed by: Sybren Stüvel, Jacques Lucke, Sergey Sharybin, Campbell Barton
Differential Revision: https://developer.blender.org/D11827
|
|
The 'collection' property is flagged PROP_ID_REFCOUNT, so the
modifiers foreachIDLink functions should walk with IDWALK_CB_USER
(instead of IDWALK_CB_NOP).
Otherwise the modifier wont be included as a user for the collection
(e.g. on file read); removing the collection from the modifier will
decrement usercount though (which in worst case scenario makes the
collection orphan and will result in data loss)
Maniphest Tasks: T89765
Differential Revision: https://developer.blender.org/D11877
|
|
|
|
When editing vertices with number buttons, tag the mesh, not the object.
This prevents the evaluated mesh being re-created for the object
and is correct as the mesh is being edited not the object.
Note that all tags for updating object geometry should be checked
to see if this change should be applied there too.
From a simple test on a high-poly mesh this gives around 1.3x
overall speedup.
|
|
The name was mistakenly written as `use_cached_result`. Fixed.
|
|
After cache implementation line art apply will not show strokes properly, now fixed.
# Conflicts:
# source/blender/gpencil_modifiers/intern/MOD_gpencillineart.c
|
|
Channel packed images should not have their RGB affected by alpha.
rendering in Cycles and Eevee was fine already, but displaying these was
not right in the Image and Node editors.
Not 100% sure what to do for the "Color and Alpha" mode, but I guess
this should stay like it was before (applying the alpha).
"Color", "R", "G", and "B" modes were changed to not have color be
affected by alpha though.
ref. T89034
Maniphest Tasks: T89034
Differential Revision: https://developer.blender.org/D11871
|
|
Differential Revision: https://developer.blender.org/D11872
|
|
For some reason, the Windows compiler didn't like the
static function being used in the parallel_reduece.
|
|
|
|
Fly navigation has always had this option. They is particularly useful
when users use "Trackball" as their orbit method.
For walk navigation this works as a one off option. Not as a toggle like
for fly navigation.
Differential Revision: https://developer.blender.org/D11863
|
|
Correctly reset `prev` and `next` pointers of action group FCurves when
separating them into distinct `ListBase`s per `bActionGroup`.
These `NULL` pointers are necessary to temporarily demarcate the start &
end of the `bActionGroup::channels` list. Having them still point to
other FCurves caused ordering issues when moving curves towards the
start/end of a group.
This commit corrects the above issue and adds versioning code to rectify
any ordering issues that may have been caused. For this purpose the
`BKE_action_groups_reconstruct()` function is rewritten to avoid relying
on the `bAction::curves` list order or `prev` link integrity.
Differential Revision: https://developer.blender.org/D11811
|
|
WALK_MODAL_TOGGLE > WALK_MODAL_GRAVITY_TOGGLE
|
|
The bug was always around and was introduced with the original code
e2a7168e9680f (2009).
|
|
The node group interface panels were still implemented in C.
Now they ported over to python for easier maintenance.
Differential Revision: https://developer.blender.org/D11834
|
|
In addition to _object_ animation, now _object data_ (mesh, curve, ...)
animation can now be made single user as well.
This came up in T89369 and while it is possible to do this via the
Outliner [where all actions have to be selected individually], this
seems to be more convenient to be done from the 3DView.
note: usercount of the action is checked now, if it single-user already,
no copy takes place (same thing could/should be done for
single_object_action_users as well).
note2: obdata is made single user as well (otherwise duplicated actions
will be assigned to the same shared obdata - which does not result in
unique animadata which is what we are after here)
ref. T89369
Maniphest Tasks: T89369
Differential Revision: https://developer.blender.org/D11683
|
|
|
|
|
|
Use the term `ensure` as existing data is used when present.
|
|
Previously, this did not compile in VS 2017, because
`new T(initializer_())` would try to call the copy constructor of `T`.
Now, `initializer_` will construct the `T` inplace.
|
|
panel
Renaming compositor node in search panel "View Switch" to "Switch View"
for better consistency.
Reviewed By: dfelinto
Differential Revision: https://developer.blender.org/D11717
|
|
Using the "Camera Fit Frame to Selected" operator didn't work for Grease Pencil
objects. The same issue caused grease pencil preview thumbnails to be useless
(e.g. when using "Mark Asset" on a Grease Pencil object).
Reason was that there was no logic to handle grease pencil data and its strokes
for the object display-point iterators used for the "Frame Selected" logic.
Addresses T89656.
Reviewed by: Antonio Vazquez, Campbell Barton
Differential Revision: https://developer.blender.org/D11833
|
|
The original assumption that the `modifyMesh` function is only
called when the modifier is applied was wrong. There are still a
couple of other places calling it through `BKE_modifier_modify_mesh`.
Now there is an extra check that makes sure instances are only
realized when the modifier is actually applied.
|
|
The backdrop image gizmo was not following the backdrop image, it
needs to be refreshed whenever the view changes. The region init
callback is executed whenever the region size changes, so that should be
a reliable place to do that.
Reported as part of T87591.
|
|
In a collapsed hierarchy, some type of data are listed as one icon per
item (2.79 did this for all data),
others are 'compacted' as a single icon with a counter (also indicating
if the active item is down that collapsed hierarchy) from 2.80 on.
Not quite sure if {rB92dfc8f2673e} was meant to do this (if it was, this
was not working though because relevant code would only get executed for
object hierarchies it seems), so now this is done for bones as well.
Fixes T88413.
Maniphest Tasks: T88413
Differential Revision: https://developer.blender.org/D11404
|
|
|
|
|
|
Regression in 45d54ea67f9440d1c4ef89b3257ee92159de2599
|
|
This patch fixes the incorrect syntax in documentations.
Reviewed By: Blendify
Differential Revision: https://developer.blender.org/D11822
|
|
Walk rotate speed for tablets was being modified at runtime by scaling
the user preference mouse_speed by a constant factor; this consolidates
scaling into the the compile time tablet scale factor in walkApply.
No change in behavior.
|
|
Accidentally included this in rB01e1944cd455, it came from a merge
conflict.
|
|
Comment was based on an older version of the patch.
|
|
When renaming an ID somewhere in the UI after marking it as asset, it would
often get lost in the Asset Browser (scrolled out of view). It would also get
deactivated.
This patch makes sure that if an asset is active whose ID gets renamed, it is
kept active and visible. That is important for a fast, uninterrupted asset
creation workflow, where users often rename assets while working in the asset
browser.
Old code stored the new file-name to identify a file after re-reading the
file-list after the rename. For assets that doesn't work because there may be
multiple assets with the same name. Here the simple solution of just storing
the pointer to the renamed ID is chosen, rather than relying on the file-name
in this case. (Should be fine with undo, since the ID * reference is short
lived, it's not stored over possible undo steps. If it turns out to have
issues, I rather switch to a rename_id_uuid, but keep that separate from the
file->uid).
Reviewed by: Sybren Stüvel
Differential Revision: https://developer.blender.org/D11119
|
|
TBB includes in windows.h which will by
default define min/max macro's by default,
which collide with stl's min/mac functions.
this change instructs windows.h not to
add the offending macros
|