Age | Commit message (Collapse) | Author |
|
|
|
Was crashing SculptSession data will not longer be valid if the total
number of polys is modified when rendering the mesh again.
This deletes all face sets in the mesh when slicing the mask. I'll try
to add code to generate a new face set in with faces that are created
when filling the holes, but for now this avoids the crash.
Reviewed By: brecht
Maniphest Tasks: T74500
Differential Revision: https://developer.blender.org/D7049
|
|
While it might be handy to have type-less functionality which is
similar to how C++ math is implemented it can not be easily achieved
with just preprocessor in a way which does not have side-effects on
wrong usage.
There macros where often used on a non-trivial expression, and there
was at least one usage where it was causing an actual side effect/bug
on Windows (see change around square_f(sh[index++]) in studiolight.c).
For such cases it is handy to have a function which is guaranteed to
have zero side-effects. The motivation behind actually removing the
macros is that there is already a way to do similar calculation. Also,
not having such macros is a way to guarantee that its usage is not
changed in a way which have side-effects and that it's not used as an
inspiration for cases where it should not be used.
Differential Revision: https://developer.blender.org/D7051
|
|
Currently, this change does not bring functional changes.
But it is necessary to extend the use of the snap system for gizmos,
since, after a Undo, the `depsgraph` pointed by the `snap_context`
has its memory invalidated.
Reviewed By: campbellbarton
Differential Revision: https://developer.blender.org/D7013
|
|
The old convention was easy to confuse with ScrArea.
Part of https://developer.blender.org/T74432.
This is mostly a batch rename with some manual fixing. Only single word
variable names are changed, no prefixed/suffixed names.
Brecht van Lommel and Campbell Barton both gave me a green light for
this convention change.
Also ran clan clang format on affected files.
|
|
Part of https://developer.blender.org/T74429.
There's a chance that this causes some issues becaue in some cases we
change from getting the window from context to getting it from somewhere
else.
|
|
- Use 'BKE_object_defgroup' prefix for object functions.
- Rename 'defvert_verify_index' to 'defvert_ensure_index'
since this adds the group if it isn't found.
|
|
- Use 'BKE_object_material_*', 'BKE_id_material_*' prefix
for functions that operate on Object and ID types.
- Use '_len' suffix for length (matching BLI naming).
- Use '_p' suffix for functions that return a pointer to values
where the value would typically be returned.
Functions renamed:
- BKE_object_material_resize was BKE_material_resize_object
- BKE_object_material_remap was BKE_material_remap_object
- BKE_object_material_remap_calc was BKE_material_remap_object_calc
- BKE_object_material_array_p was BKE_object_material_array
- BKE_object_material_len_p was BKE_object_material_num
- BKE_id_material_array_p was BKE_id_material_array
- BKE_id_material_len_p was BKE_id_material_num
- BKE_id_material_resize was BKE_material_resize_id
- BKE_id_material_append was BKE_material_append_id
- BKE_id_material_pop was BKE_material_pop_id
- BKE_id_material_clear was BKE_material_clear_id
|
|
Use MEM_mallocN when memory is immediately copied over.
|
|
D6417 by @fbessou
|
|
into account for duplicating actions
Previously actions remained linked after duplication, now this is based
on the User Preferences (PreferencesEdit.use_duplicate_action).
note: default is ON here, so this changes default behavior of separate
operators.
First intuition was to respect _all_ preferences here (e.g. also
duplicating materials if chosen in the User Preferences) but after
consideration this is probably not what the User would expect from such
'modeling' opertions (e.g. separate by loose parts resulting in possibly
many duplicate materials)
Fixes T71038
Maniphest Tasks: T71038
Differential Revision: https://developer.blender.org/D6120
|
|
This is in preparation of new object types. This only changes mesh_eval, we
may do the same for mesh_deform_eval and other areas in the future if there is
a need for it.
This previously caused a bug in T74283, that should be fixed now.
Differential Revision: https://developer.blender.org/D6695
|
|
than mesh"
This reverts commit f2b95b9eae2ee913c99cff7595527b18d8b49d0a.
Fix T74283: modifier display lost when moving object in edit mode.
The cause is not immediately obvious so better to revert and look at this
carefully.
|
|
This is in preparation of new object types. This only changes mesh_eval, we
may do the same for mesh_deform_eval and other areas in the future if there is
a need for it.
Differential Revision: https://developer.blender.org/D6695
|
|
|
|
This is a bug that the recent refactor exposed. Some widgets were drawing
with alpha set to 0.
|
|
|
|
|
|
It's important to refer to "other selected objects" in this case.
|
|
object
|
|
Note that `BKE_library.h`/`library.c` were renamed to
`BKE_lib_id.h`/`lib_id.c` to avoid having a too generic name here.
Part of T72604.
|
|
Dear developers remember to set your coding environment to use clang-format.
|
|
Old Name New Name
========= =========
init_def_material BKE_materials_init
BKE_material_gpencil_default_free BKE_materials_exit
test_object_materials BKE_object_materials_test
test_all_objects_materials BKE_objects_materials_test_all
give_matarar BKE_object_material_array
give_totcolp BKE_object_material_num
give_current_material_p BKE_object_material_get_p
give_current_material BKE_object_material_get
assign_material BKE_object_material_assign
assign_matarar BKE_object_material_array_assign
give_matarar_id BKE_id_material_array
give_totcolp_id BKE_id_material_num
assign_material_id BKE_id_material_assign
clear_matcopybuf BKE_material_copybuf_clear
free_matcopybuf BKE_material_copybuf_free
copy_matcopybuf BKE_material_copybuf_copy
paste_matcopybuf BKE_material_copybuf_paste
BKE_material_init_gpencil_settings BKE_gpencil_material_attr_init
BKE_material_add_gpencil BKE_gpencil_material_add
BKE_material_gpencil_get BKE_gpencil_material
BKE_material_gpencil_default_get BKE_gpencil_material_default
BKE_material_gpencil_settings_get BKE_gpencil_material_settings
|
|
|
|
Resolves crashes when edit-mode undo data wasn't included
because it wasn't visible, also resolves T73416.
|
|
Differential Revision: https://developer.blender.org/D6626
|
|
|
|
This patch applies the original object scale to the coordinates of the
extracted mask mesh. Without this patch, the mesh was no taking the
original object scale into account and the shrinkwrap will fail.
The other solution would be copying the objecty scale to the new
extracted mask object, but I would like to avoid entering sculpt mode
with scaled objects as it may produce wrong behaviors in some tools.
Reviewed By: jbakker
Maniphest Tasks: T71373
Differential Revision: https://developer.blender.org/D6207
|
|
|
|
|
|
|
|
Also rename struct members to 'launch_event', since it's more
descriptive and was called this in some places.
|
|
|
|
'Straight Cut' is actually documented as creating N-Gons. However, the
code was disallowing this. This is probably a mix-up as the "allow N-Gons"
option is documented as a "force quad/tri" option.
|
|
|
|
|
|
|
|
|
|
Differential Revision: https://developer.blender.org/D6615
Reviewed by: Brecht van Lommel
|
|
|
|
|
|
Edge Index display were not showing up after performing
"Select Boundary Loops" when in face selection mode. The operation
tagged the mesh that the selection was changed, but in the end this
didn't do anything within the depsgraph.
The fix changes this to recalc the geometry of the object. What also
syncs the selectmode flags. A better solution would be to update the
select flags only. But that could be done as future work when we have a
performance problems.
|
|
This was causing a crash when the mesh does not have the mask data
initialized. I also added the same check to mask extract as it works the
same way.
Reviewed By: jbakker
Maniphest Tasks: T72830
Differential Revision: https://developer.blender.org/D6513
|
|
Was marked 'FIXME' however this only ever happens in exceptional cases.
Also comment why tagging is needed in this case.
|
|
This avoids a list lookup in Main (recently added), passing in a mesh
instead of an edit-mesh, since the mesh links to the edit-mesh.
|
|
Remove this pointer since it's linking Mesh data back to the object,
where a single edit-mesh may have multiple object users,
causing incorrect assumptions in the code.
Resolves dangling pointer part of the T72667 crash,
although there are other issues which still need to be fixed.
In EDBM_op_finish and EDBM_update_generic,
full Main lookups have been added which should be replaced with mesh
argument or the update tagging moved elsewhere.
|
|
|
|
|
|
|
|
Note that this is a bit clumsy having both edit-mesh and mesh,
BKE_editmesh_ensure_autosmooth & BKE_editmesh_lnorspace_update
are often called together, these could be made into a single functions.
|