Age | Commit message (Collapse) | Author |
|
|
|
|
|
Nearly all byte-color functions use 'uchar'
causing casts when then colors were passed in.
Declare as uchar to remove the need for casts.
|
|
|
|
It is very similar to `ED_view3d_select_id_read_rect`.
|
|
|
|
Changing the global state would obviously cause issues for async
execution. This is the simplest solution for a simple problem.
Reviewers: fclem, brecht
Differential Revision: https://developer.blender.org/D5413
|
|
It is a very common need to create drivers that set the value of
a property to the value of some other property, but it currently
requires multiple actions: Copy Data Path on the input property,
adding a driver to the output property, selecting the input ID
reference, and pasting the path.
This adds a new Copy As Driver context menu option, which creates
a complete driver in the clipboard that reads the current property,
so all that remains is to paste it to the output property. It is
also possible to paste just the new driver variable into an existing
driver to combine multiple inputs.
Reviewers: brecht, billreynish
Differential Revision: https://developer.blender.org/D5382
|
|
|
|
No need to use BKE_object_where_is_calc() in this case: there is no
parenting or constraint system involved on object add.
So simply use direct object matrix calculation from it's local
transform. No need in dependency graph either in this case.
|
|
|
|
While these aren't currently used, its strange to have
extended versions of a function without the non-extended versions
it also avoids callers needing to add them back if they need -
or duplicating the same boiler plate when calling the '_ex' versions.
Reverts 11da3b132aff1, 11da3b132aff1, adds depsgraph argument
so the caller is responsible for the evaluation state.
|
|
|
|
T68045 by @luzpaz
|
|
T68035 by @luzpaz
|
|
This change ensures that operators which needs access to evaluated data
first makes sure there is a dependency graph.
Other accesses to the dependency graph made it more explicit about
whether they just need a valid dependency graph pointer or whether they
expect the graph to be already evaluated.
This replaces OPTYPE_USE_EVAL_DATA which is now removed.
Some general rules about usage of accessors:
- Drawing is expected to happen from a fully evaluated dependency graph.
There is now a function to access it, which will in the future control
that dependency graph is actually evaluated.
This check is not yet done because there are some things to be taken
care about first: for example, post-update hooks might leave scene in
a state where something is still tagged for update.
- All operators which needs to access evaluated state must use
CTX_data_ensure_evaluated_depsgraph().
This function replaces OPTYPE_USE_EVAL_DATA.
The call is generally to be done in the very beginning of the
operator, prior other logic (unless this is some comprehensive
operator which might or might not need access to an evaluated state).
This call is never to be used from a loop.
If some utility function requires evaluated state of dependency graph
the graph is to be passed as an explicit argument. This way it is
clear that no evaluation happens in a loop or something like this.
- All cases which needs to know dependency graph pointer, but which
doesn't want to actually evaluate it can use old-style function
CTX_data_depsgraph_pointer(), assuming that underlying code will
ensure dependency graph is evaluated prior to accessing it.
- The new functions are replacing OPTYPE_USE_EVAL_DATA, so now it is
explicit and local about where dependency graph is being ensured.
This commit also contains some fixes of wrong usage of evaluation
functions on original objects. Ideally should be split out, but in
reality with all the APIs being renamed is quite tricky.
Fixes T67454: Blender crash on rapid undo and select
Speculation here is that sometimes undo and selection operators are
sometimes handled in the same event loop iteration, which leaves
non-evaluated dependency graph.
Fixes T67973: Crash on Fix Deforms operator
Fixes T67902: Crash when undo a loop cut
Reviewers: brecht
Reviewed By: brecht
Subscribers: lichtwerk
Maniphest Tasks: T67454
Differential Revision: https://developer.blender.org/D5343
|
|
|
|
Use explicit boolean flag to indicate whether flush to original data
is needed or not. Makes it possible to avoid confusion on whether an
evaluated or any depsgraph can be passed to the API.
Allows to remove depsgraph from bAnimContext as well.
Reviewers: brecht
Differential Revision: https://developer.blender.org/D5379
|
|
It was used to access evaluated object and pose and was done prior
to implementation of flushing values back to original data for an
active dependency graph.
Removing the argument allows to simplify API and solve issues with
accessing missing dependency graph on redo.
|
|
|
|
|
|
|
|
There was a fixed limit to the number of points available in a buffer stroke.
Now, the array is expanded as needed using a predefined number of points for each expansion, instead to add one by one. This is done to reduce the number of times the memory allocation is required.
As part of the fix, some variables have been renamed to reflect better their use.
|
|
This commit moves the API of selecting faces, vertices and edges to a DRW manager engine.
Reviewers: campbellbarton, fclem
Subscribers: jbakker, brecht
Differential Revision: https://developer.blender.org/D5090
|
|
This is useful when popovers are launched from operators
instead of as button popover types.
Where the connection between the button and the popover is useful to keep.
|
|
|
|
This fix relies on 2.7x logic, only de-selecting other armature objects,
making multiple armatures in weight paint mode usable.
|
|
`layer_used` runtime data, which controls the drawing of dots in the UI was not getting refreshed properly.
This used to happen in the drawing code, but was no longer working for reasons explained in:
{rB2b09062defa093a243b5fe64b099accb07b440a3}
The solution was to update each layer manually in the operators:
* ARMATURE_OT_bone_primitive_add
* ARMATURE_OT_delete
* ARMATURE_OT_dissolve
* ARMATURE_OT_fill
* ARMATURE_OT_merge
* ARMATURE_OT_separate
* ARMATURE_OT_bone_layers
* POSE_OT_bone_layers
Differential Revision: https://developer.blender.org/D5281
|
|
Applying/undoing incremental changes didn't fit well when
mixed with periodic snapshots from mem-file undo.
This moves to a much simpler undo system.
- Uses array storage with de-duplication from `BLI_array_store`.
- Loads the buffer into existing text data,
for better performance on large files.
- Has the advantage that Python operators can be supported
since we don't depend on hard coded undo operations.
Solves T67045, T66695, T65909.
|
|
|
|
When a mesh is pinned in the properties panel, Blender crashes when you
click the "Add Custom Split Normals Data".
The code calls `ob = ED_object_context(C)` which returns NULL when the
mesh is pinned in the properties panel, causing a segfault when trying
to get the mesh via `ob->data`.
A new function `ED_mesh_context(C)` avoids this by first checking
whether a mesh was pinned in the context. If not, it checks the pinned
object's data. If that's not there, or it's not a mesh, it returns the
active object's mesh. Finally it returns NULL if there is no active
object, or if the active object is not a mesh object.
Reviewed By: brecht, mont29
Differential Revision: https://developer.blender.org/D5223
|
|
|
|
Now that the development fund image will disappear from the splash, this
draws a little more attention to this link.
|
|
|
|
|
|
This can be useful for filtering some of the returns.
|
|
Differential Revision: https://developer.blender.org/D5086
|
|
|
|
Changing the brush size for example,
was adding redundant undo steps in paint-modes.
For now, don't store undo steps for property changes
in paint & edit modes.
While not ideal, this is similar to 2.7x behavior.
|
|
|
|
|
|
|
|
Not visible yet, but it should draw in the offscreen. The way this is
now, we don't depend on the Window->Workspace->bScreen->... chain. We
simply draw an offscreen viewport in the draw callback of the XR session
surface.
The drawing also uses view and projection matrices from OpenXR (or
calculated from OpenXR data).
|
|
Now the modes are reset for grease pencil objects.
Differential Revision: http://developer.blender.org/D5138
Reviewers: @dfelinto
|
|
When parent a Grease Pencil object to Lattice, automatically a Lattice modifier is added.
|
|
These are duplicates of HIDE_ON/OFF.
|
|
|
|
view3d.
This solution checks if `persp_mat` has changed. If positive, the selection buffer is redrawn.
Differential Revision: https://developer.blender.org/D5081
|
|
When we delete a scene, we need to update to new scene pointer all main
widows that might be using it, not only the active one from the context...
|
|
This adds the icon intended for Grease Pencil layer data, in SVG but currently marked as blank
Differential Revision: https://developer.blender.org/D5073
|