Age | Commit message (Collapse) | Author |
|
Similar to what we do for constraints and modifiers, except that
currently adding or editing shaderfx in liboverride objects is
completely unsuported.
Fix T88974.
|
|
Mainly:
* Make `ED_operator_object_active_editable_ex` properly report poll
messages on failure.
* Add `ED_operator_object_active_local_editable_posemode_exclusive` for
bone constraints requiring pure local Object (non-override one).
* General cleanup and adding more poll messages on failures.
|
|
Support calculating face normals when tessellating. When this is done
before updating vertex normals it gives ~20% performance improvement.
Now vertex normal calculation only needs to perform a single pass on the
mesh vertices when called after tessellation.
Extended versions of normal & looptri update functions have been added:
- BM_mesh_calc_tessellation_ex
- BM_mesh_normals_update_ex
Most callers don't need to be aware of this detail by using:
- BKE_editmesh_looptri_and_normals_calc
- BKE_editmesh_looptri_and_normals_calc_with_partial
- EDBM_update also takes advantage of this,
where calling EDBM_update with calc_looptri & calc_normals
enabled uses the faster normal updating logic.
|
|
Rename function EDBM_update_generic to EDBM_update, use a parameters
argument for better readability.
Also add calc_normals argument, which will have benefits when
calculating normals and tessellation together is optimized.
|
|
|
|
While in practice this isn't an issue currently, always set
'enter_editmode' in ED_object_add_generic_get_opts
to avoid problems in the future.
|
|
This moves the flash on mode transfer effect option from the overlays to
an operator property of the mode transfer operator.
- This effect is intended to show the target object when no overlays or
a minimal set of overlays is enabled. Making it part of the whole set of
overlays invalidates this use case.
- The effect is not intended to be configurable per viewport, it should
be a global option.
The effect is still implemented using the overlay engine (instead of a
draw modal callback) due to performance and drawing artifacts. Having it
implemented as an overlay with runtime timer data in the objects makes
also possible to run multiple animations at the same time without any
visual glitches.
Reviewed By: campbellbarton, JulienKaspar
Differential Revision: https://developer.blender.org/D11519
|
|
The operator run when dropping objects would duplicate the dropped object and
place that in the scene, even though that was just appended. Addressed by
making the duplication optional for the operator. If the duplication is not
requested, the object is just added to the scene (if needed), repositioned
based on the drop location and selected (deselecting other objects).
This makes the operator work as expected when using it to drop assets.
Reviewed as part of https://developer.blender.org/D11536.
Reviewed by: Bastien Montagne
|
|
Note that these changes are limited simple cases as these kinds of
changes could allow for errors when refactoring code when the known
state is not so obvious.
|
|
Talked with Bastien and we ended up looking into this. Issue is that the
dupliation through drag & drop should also be considered a
"sub-process", like Shift+D duplicating does. Added a comment explaining
why this is needed.
|
|
This implements T87633
This overlay renders a flash animation on the target object when
transfering the mode to it using the mode transfer operator.
This provides visual feedback when switching between objects without
extra overlays that affect the general color and lighting in the scene.
Differences with the design task:
- This uses just a fade out animation instead of a fade in/out animation.
The code is ready for fade in/out, but as the rest of the overlays
(face sets, masks...) change instantly without animation, having a fade
in/out effect gives the impression that the object flashes twice (once
for the face sets, twice for the peak alpha of the flash animation).
- The rendering uses a flat color without fresnel for now, but this can
be improved in the future to make it look more like the shader in the
prototype.
- Not enabled by default (can be enabled in the overlays panel), maybe
the defaults can change for 3.0 to disable fade inactive and enable this
instead.
Reviewed By: jbakker, JulienKaspar
Differential Revision: https://developer.blender.org/D11055
|
|
|
|
There is no need to limit this to sculpt mode,
prepare for key short cut changes, see: T88092.
|
|
When projecting into screen space Z value isn't always needed.
Add 2D projection functions, renaming them to avoid accidents
happening again.
- Add GPU_matrix_project_2fv
- Add ED_view3d_project_v2
- Rename ED_view3d_project to ED_view3d_project_v3
- Use the 2D versions of these functions when the Z value isn't used.
|
|
It wasn't obvious this function cleared the tag as well.
|
|
This patch removes unnecessary calls to `BKE_main_id_tag_all` where the
same job is done by `BKE_main_id_clear_newpoins` on the following line.
Reviewed By: campbellbarton, mont29
Ref D11379
|
|
|
|
Caused by {rB919558854d62}.
Same fix as in {rBdc8a43c8755a} -- let RNA enum item callbacks check
for NULL context.
The NULL context is used to extract items for document generation.
Maniphest Tasks: T88251
Differential Revision: https://developer.blender.org/D11391
|
|
This option is default off when creating line art objects
because line art seldom use lighting and the normal data
would be all over the place anyway.
Reviewed By: Antonio Vazquez (antoniov)
Differential Revision: https://developer.blender.org/D11372
|
|
The `WITH_GEOMETRY_NODES` flag does not make sense anymore,
it is just protecting the `Simulation` data block that is not used
currently.
|
|
This fixes the `Apply Modifier` and `Visual Geometry to Mesh` operator
when a modifier changed materials on the evaluated geometry.
This is necessary since rB1a81d268a19f2f1402f408ad1dadf92c7a399607.
Differential Revision: https://developer.blender.org/D11303
|
|
|
|
As in the old Blender Internal baking code, this still relies on there being a
good mapping to the original vertices.
|
|
This allows extra options (in-front and stroke order) to be shown when adding line art kind of grease pencil object.
Reviewed by: Antonio Vazquez (antoniov)
Diff: https://developer.blender.org/D11130
|
|
|
|
|
|
This allows extra options (in-front and stroke order) to be shown when adding line art kind of grease pencil object.
Reviewed by: Antonio Vazquez (antoniov)
Diff: https://developer.blender.org/D11130
|
|
|
|
Matching Object and Collection line art type objects.
|
|
|
|
All callers replace this with OB_MODE_EDIT_GPENCIL.
|
|
|
|
Mode switching passed through when the mode wasn't supported for all
modes except particle edit-mode.
Add a check to ED_object_mode_compat_test to prevent the error message.
|
|
|
|
The check to include particle edit mode in the object-mode drop-down
didn't match the poll function to edit particle edit mode.
Share the check between both functions.
|
|
|
|
Wrong usage of ED_curve_add_nurbs_primitive from {rBe8f3fa99de81}.
Differential Revision: https://developer.blender.org/D11166
|
|
|
|
This reverts commit f4d5a69cf8512aafcc697d1b09f65489015b6af4.
This causes bpy.ops.object.modifier_apply.poll() to fail as
well as modifier binding operators (breaking tests).
|
|
|
|
None of these generic poll functions had NULL pointer checks,
since all operators that use these functions expect a valid constraint,
modifier .. etc. Add the NULL check to the poll function.
Ref D11126
Reviewed By: mont29, Severin
|
|
If no other object was selected while dragging one in (e.g. from the Outliner
or an object asset from the Asset Browser), all visible objects in the active
view layer would get selected.
Issue was caused by a wrong enum type use.
Mistake in bcdba7c34da0.
|
|
|
|
Local view return argument to ED_object_add_generic_get_opts
was left uninitialized.
|
|
Currently when you try to convert a Text-object to Grease pencil from the Object-menu or via the operator in some other way, the Text-object is only converted to a Curve.
This commit converts that curve to a Grease pencil object.
Differential Revision: https://developer.blender.org/D11117
|
|
|
|
Instead to create only the Blank object, now a new Layer and a simple material is added.
This is a common request of artists.
Reviewed By: mendio, pepeland
Differential Revision: https://developer.blender.org/D11110
|
|
|
|
|
|
Edit mode could leave pose channels in the object that didn't
have an associated bone.
These are now cleared when freeing edit-mode data.
|