Should prevent issue fixed by previous commit to happen again (since
read code, especially in undo case, is not really straight forward to
follow anymore).
Neither Nuke nor Natron support OpenCV's radial distortion model
which makes it impossible to have any kind of interoperability.
The new model is available under the distortion model menu in Lens
settings.
Differential Revision: https://developer.blender.org/D7484
The offsets are applied after toggling positional tracking off, so that
the view does not jump at that moment. But when changing the base pose,
keeping that offset doesn't make sense. Especially with landmarks, which
are supposed to give precise positions/rotations to jump to. For that
part the VR Scene Inspection Add-on will need a little adjustment
though.
Also exposes an explicit function to the Python API to reset the
offsets, to be used by the Add-on.
This is mostly untested since I don't have access to an HMD currently.
- Use `t->spacemtx` as the orientation matrix instead `t->orient_matrix`.
- Unify constraint behavior between modal and non-modal.
- Simplify code to remove old workarounds and rearrange struct members.
This fix T66142 since the actual `orient_type` (in the case
`V3D_ORIENT_NORMAL`) is used during Redo instead of always using
`V3D_ORIENT_CUSTOM_MATRIX`).
Differential Revision: https://developer.blender.org/D7469
used
Caused by {rBa6a9a12e8f32}
Other relevant commits:
rBb8ca806b7798e2f8dd6effca8f0d081b3cd8c23f
rBde530a95dc7b482dc22c933b9b8b2a98c79b5663
The issue is caused by some leftover BONE_TRANSFORM_MIRROR flags on a
bone from previous runs (file in the report had the flag still on
forearm.R).
With these false leftover flags still set, `pose_grab_with_ik()` cannot
work correctly. Culprit commit above removed the early clearing of this
flag on all bones, this should be restored [this happened in
`count_set_pose_transflags()`].
This should only be done in the beginning of the transform process, so
now still clear the flags early in 'createTransPose()' [but dont restore
this in 'count_set_pose_transflags()' -- this will be called from
special_aftertrans_update again, so placing the clearance here only
complicates things (autokeyframe_pose() still needs to work as well)...]
Maniphest Tasks: T75810
Differential Revision: https://developer.blender.org/D7527
The current "Select Linked" operator works based on mouse position and
makes no sense to call from the menus and was removed in rB536055e1ee0b.
This patch adds an operator independent from mouse position that just
selects all bones in relation to selected bones (and adds back menu
entries, adds keymap entry CTRL+L).
The original operator is renamed to 'select_linked_pick' internally
(this is now more in line to how "Select Linked" works for meshes,
curves etc)
ref T76071
Maniphest Tasks: T76071
Differential Revision: https://developer.blender.org/D7542
Done also in 2.83 release branch to avoid too much conflicts on merging
(some of those were already done for nodes in master, and gave me
conflicts yesterday...).
count_set_pose_transflags --> transform_convert_pose_transflags_update
count_bone_select --> armature_bone_transflags_update_recursive
Also don't mix `BONE_TRANSFORM_MIRROR` with `BONE_TRANSFORM` in
transflag. (This was a mess introduced in rBde530a95dc7b).
passes than one in another slot
If a particular pass is not available in a slot we are switching to,
still show the menu, but with a blank name for the currently selected
item so that the user can change it to a valid value.
thx @brecht for providing the standard way Blender deals with these
kinds of situations.
Maniphest Tasks: T76179
Differential Revision: https://developer.blender.org/D7552
Fix T75279: BLI_assert failed when deleting object in debug build
(only).
And all general cases of ID pointer idproperties that would use a
data-block not referenced anywhere else in the depsgraph.
This includes idproperties from:
* All ID types;
* Bones and pose bones;
* Sequences;
* Nodes and sockets.
Differential Revision: https://developer.blender.org/D7551
The problem comes from the fact by no data being modified when switching
viewlayers.
To follow what the external render engines do, we completely reset the
viewport by freeing the GPUViewport to avoid any cached data from being
kept.
This fix case where you have wireframe on top of infront objects but
workbench AA conflicts and they appear to not be occluded.
Also T74923 is still fixed but we extend the fix to not mess the case when
using a mode that does not support infront.
It is just a quick fix for the tooltips in the graph editor, it replaces:
- "F-curve modifiers are disabled" with "Enable F-Curve modifiers"
- "F-curve is visible in graph editor for editing" with "F-Curve visibility in Graph Editor".
Reviewed By: billreynish
Maniphest Tasks: T75519
Differential Revision: https://developer.blender.org/D7387
There was an assert here as well since using the original object to read
from was having an empty runtime curve cache.
Now use BKE_vfont_to_curve_ex instead of BKE_vfont_to_curve, so we can
read from the evaluated object and write to the original curves in order
to have the modified data taken into account on next object evaluation.
(BKE_vfont_to_curve would read and write to/from the same object)
Final solution provided by @sergey in that report, thx!
Adds a wrapper-struct to create and return the three layouts required
for the propery split layout (i.e. `UILayout.use_property_split`). This
gives more flexibility for special treatment.
E.g. needed for adding the arrow icon buttons when there is a hierarchy
of nodes to be represented in the material properties (needs inserting
in the text column to not offset the split layout).
This commit also makes use of the utility for
`uiItemL_respect_property_split()`.
Caused by rBe82827bf6ed5.
DRW_draw_depth_object calls DRW_mesh_batch_cache_create_requested with
NULL scene, but that is accessed later on...
Scene is actually available, so pass that around.
Maniphest Tasks: T76131
Differential Revision: https://developer.blender.org/D7540
Usually items without labels don't use the property split layout and
just use the full layout width. In some cases that is not wanted because
it looks odd if single items within the split layout use the full width.
The option is unused but would be needed for adding decorators to the
material properties.
Seems like this was left out when UV operators were converted to multi-
object-editing, ref T54645.
Maniphest Tasks: T76111, T54645
Differential Revision: https://developer.blender.org/D7537
Previously `UILayout.prop_decorator()` (or `uiItemDecoratorR()` in C)
only worked for single items, not for arrays. The decorators are added
vertically, like `UILayout.prop()` adds them.
This will be needed for adding decorators to material properties, but
will likely have other use-cases as well.
Also, `None` (or `NULL`) can be passed for the data-pointer and property
now to create blank decorators (as already possible for
`uiItemDecoratorR_prop` in C).
During scene copy modifier mask strips are relinked to point to strips in
new scene. If strip used as mask is in different seqbase, this can fail,
if seqbase is not copied yet.
Add SEQ_DUPE_IS_RECURSIVE_CALL flag to avoid relinking modifiers during recursive call.
Reviewed By: brecht
Differential Revision: https://developer.blender.org/D7412
This was in fact completely messed up, but it worked by accident for all
current cases. That is, we always inserted the decorator buttons
immediately after the button they applied to. So the first button
comparision in ui_but_anim_decorate_find_attached_button() would
succeed, because it just compared a few values that all happened to be
NULL and thus the comparison returned true.
Further, avoid NULL-pointer dereferences and incorrect printing.
Depth texture copy using glCopyTexSubImage2D is undefined behavior since
you cannot bind GL_DEPTH_ATTACHMENT to glReadBuffer.
Using glBlitFramebuffer as a fallback.
When using the Stroke mode, the reprojection function add a small offset of 0.5 to +X and +Y. Now this effect is removed subtracting this value before doing the conversion.
When use the Stroke reproject mode, the precission of the conversion makes the line produce a very small noise effect.
Now, if the stroke mode is enabled, a small smooth is done using a factor depending of the input samples.
The values of the smooth effect were provided by @pepeland after several testing.
In some situations the stroke could be tagged and this tag was used to delete the interpolated strokes.
Now, the frames used as interpolated range are untagged before creating the interpolated strokes.
A few outliner operators that modify selection were not tagging for a
selection sync which led to selection inconsistencies. This adds syncing
for the following operators:
* Duplicating and deleting collections
* Selecting/deselecting collection contents
* Drag and drop
* Object select, deselect, delete, and delete hierarchy
Removes statistics from footer and to an (optional) overlay in 3DView.
Differential Revision: https://developer.blender.org/D7410
Reviewed by Campbell Barton
This hides the original metaballs when they are used in
duplifaces/-verts instancing, and still shows the instanced metaballs.
The visibility of the original metaballs is now determined by the
visibility of the instancer. I'm not too thrilled about this, but at
least it gives users the ability to show/hide the metaballs for
viewport/render.
Differential Revision: https://developer.blender.org/D7478
The main use-case for the Track To constraint is camera tracking, so
this sets up a better default for this. That is, track to -Z with Y up.
Agreed on internally with Pablo Vazquez and William Reynish. Should
there be a reason to revert this, that would be fine compatibility-wise.
For newly opened 3D Views, the default would actually be 0.01m. But the
code to update the default for all existing 3D Views in the
startup.blend was missing. So the defaults were out-of-sync.
0.01m is the more reasonable default as agreed on by the UI team.
The old Subdivide button was behaving as if subdivision modifier was
applied on top of the multires. This was the source of shrinkage since
the behavior of the limit surface: limit surface of a sparse point
from another limit surface makes final result appear smaller.
The new behavior is based on propagating delta against base mesh's
limit surface to the top level. Effectively, this is as if we've
sculpted on old top level and then propagated to the new top level.
Differential Revision: https://developer.blender.org/D7505
This new shader is able to emulate smooth wide lines drawing using a
geometry shader.
This shader needs viewportSize and lineWidth uniforms to be set.
There is multiple variants to replace the usage of wide lines for most
shaders.
This patch only fix the gizmo_types files and the navigation gizmo.
Other areas could be fixed afterward, I just limited the patch size.
Fix T57570.
Reviewed By: billreynish
Differential Revision: https://developer.blender.org/D7487
* Rename template parameter N to InlineBufferCapacity
* Expose InlineBufferCapacity parameter for Set and Map
* Add some comments
* Fixed an error that I introduced recently
before rB17bd5c9d4b1e it was "Remove selected objects from all groups"
- `BKE_object_groups_clear` is not checking if a collection is linked
to the current scene...
- rB713010bd7795 did not change that either
So this indeed removes selection from _all_ collections, so account for
that in the operator description/idname.
Reviewers: brecht
https://developer.blender.org/D7500
This fix the issue by introducing a default material only for collection
holdouts. This avoids hash colision when the same material is used in
collections without holdout enabled.
Solve O(n^2) time complexity problem where a dependency graph iterator loops
over all nodes to clear flags, which happened for every object at the start
of transform.
Differential Revision: https://developer.blender.org/D7503
This is not currently used and will take some work to support with TBB, so
remove it until we have a new implementation based on TBB.
Fixes T76005, parallel range pool tests failing.
Ref D7475
This is a regression introduced in rBa0fe22095e6d9b8b194c2cf6f9a7c7b419d7e61c.
I changed it so that the velocity with the highest magnitude is considered and
not the highest value per coordinate.
Reviewers: sebbas
Differential Revision: https://developer.blender.org/D7502
A follow up to T67212. I missed that the rotation interpolation had its
own code path.
The previous rotation push code was actually wrong (but smooth).
Now all of the actions behave correctly and is smoothly interpolated.
Instead of building on top of `BLI::Vector`, just use a raw array
and handle the growing in `BLI::VectorSet`.
After this change, the existing `EdgeSet` can be reimplemented using
`BLI::VectorSet` without performance regressions.
Own error in cleanup from 5dcb6fb22f unintentionally
changed enum values. Although this code violated our own
rules to use explicit values to avoid this happening.
This allow to copy entire texture in a faster way than using framebuffer
blitting.
This uses ARB_copy_image extension if available and fallback to
glCopyTexSubImage2D for older gl version.
Both method should be as fast if not faster than the framebuffer blitting.
Changing from IME-enabled language to English did not turn off IME.
Differential Revision: https://developer.blender.org/D7486
Reviewed by Campbell Barton
Changing from IME-enabled language to English did not turn off IME.
Differential Revision: https://developer.blender.org/D7486
Reviewed by Campbell Barton
Using MAX2 when writing intial velocities into the grid prevents overriding initial velocities when using multiple flow objects that are close to each other.
When using the 'Replay' cache mode the cache needs to be invalidated whenever simulation variables have been changed.
The invalidation will always only affect the according subcaches, e.g. when changing a mesh paramter only the mesh cache will be invalidated, the base cache will remain intact.
Before this change Blender always invalidated the entire cache.
Using MAX2 when writing intial velocities into the grid prevents overriding initial velocities when using multiple flow objects that are close to each other.
cycles
Caused by rB00466e756e33.
While that commit sounds logical, Cycles uses is_updated_transform() to
detect updates.
Now introduce is_updated_shading() and use that on top.
Maniphest Tasks: T75964
Differential Revision: https://developer.blender.org/D7493
There is no user visible difference in standard builds, as there are no
volume modifiers yet. When using WITH_NEW_OBJECT_TYPES some deform only
modifiers are now available for hair and pointcloud objects.
Differential Revision: https://developer.blender.org/D7141
Seems like this was left out when UV operators were converted to multi-
object-editing, ref T54645.
Maniphest Tasks: T75974
Differential Revision: https://developer.blender.org/D7492
The material indices in a mesh can exceed the number of available materials
slots in the object or mesh, sculpt drawing was not taking that into account.
Other draw loops also avoid the overhead of grease pencil drawing when there
are no grease pencil objects in the scene. It's a little faster to skip those
shaders and buffer when not needed.
This code to free shaders by casting a struct to a pointer array is not valid
in general, and particularly when compiling with Clang (on Linux and macOS) it
fails and can read invalid/uninitialized memory .
This adds a simple timer that can be used for performance measurements in C++.
More sophisticated timers are possible (e.g. one that takes averages, logs the results, ...).
However, I found that this simple timer is good enough for 99% of my use cases.
To use it just write `SCOPED_TIMER("my timer name");` or more commonly `SCOPED_TIMER(__func__);`
into some scope.
Reviewers: sergey
Differential Revision: https://developer.blender.org/D7491
We need to re-generate a new session uuid for the UI-related data-blocks
that are kept across file reading, when load UI is disabled. Otherwise
there will be several IDs with same uuid, which is an ensured way to
crash in new undo code.
issue: Painting a texture that is set as a particle system influencer, doesn't
update particles. An external trigger (such as changing influence slider)
is required to update particles.
fix: The root cause is a missing relationship from image to texture in the
dependency graph.
test: Once fixed, image texture painting updates expected dependencies
such as particle system influence or displacement modifier.
Reviewed By: sergey
Maniphest Tasks: T75845
Differential Revision: https://developer.blender.org/D7472
3DCursor is UI data (hence not expected to be affected by undo) that is
stored in actual data (Scene)... So it needs some special care during
undo.
New undo code now re-reads data into existing memory, which means
copying of 3DCursor data has to happen earlier in that case, when we
still have both old and newly read data available.
The value of `new_edge` is `SOLIDIFY_EMPTY_TAG=2^32-1` if the edge is not generated.
The code from D7334 was missing this check.
Reviewed By: mont29
Maniphest Tasks: T75840
Differential Revision: https://developer.blender.org/D7463
This commit adds the initial set of particles nodes. These are fairly
low level and are expected to be put into groups that we ship with Blender.
See D7384 for a description of the individual nodes.
Reviewers: brecht
Differential Revision: https://developer.blender.org/D7384
These socket types will be necessary for particle nodes.
The way these sockets are drawn can be changed separately.
Reviewers: brecht
Differential Revision: https://developer.blender.org/D7349
Those new socket types will be necessary for particle nodes.
The main difficulty with adding these socket types is that they
are the first that reference ID data in their `value`.
Therefore, user counting code had to be added in a couple new places.
Reviewers: brecht, mont29
Differential Revision: https://developer.blender.org/D7347
This adds an embedded node tree to the simulation data block dna.
The UI in the `Simulation Editor` has been updated to show a list
of simulation data blocks, instead of individual node trees.
The new `SpaceNodeEditor.simulation` property wraps the existing
`SpaceNodeEditor.id` property. It allows scripts to get and set
the simulation data block that is being edited.
Reviewers: brecht, mont29
Differential Revision: https://developer.blender.org/D7301
Keep IDType code at head of each ID file, instead of mixing it with more
specific API. Also do not define callbacks when defautl generic handling
is fine.
This implements a new builtin node tree type called `SimulationNodeTree`.
It is not yet embedded in the `Simulation` data block.
The node tree will initially be used for the new particle nodes system.
When the cmake option `WITH_NEW_SIMULATION_TYPE` is enabled, a new
`Simulation Editor` is shown in the editors menu (which is just a node editor).
This patch does not add entries to the Add Node menu, so it is empty.
Reviewers: brecht
Differential Revision: https://developer.blender.org/D7287
This data block will be the container for simulation node trees.
It will be used for the new particle node system (T73324).
The new data block has the type `ID_SIM`.
It is not visible to users and other developers by default yet.
To enable it, activate the cmake option `WITH_NEW_SIMULATION_TYPE`.
New simulation data blocks can be created by running `bpy.data.simulations.new("name")`.
Reviewers: brecht
Differential Revision: https://developer.blender.org/D7225