Age | Commit message (Collapse) | Author |
|
|
|
|
|
As in the old Blender Internal baking code, this still relies on there being a
good mapping to the original vertices.
|
|
Regression in 2b723abea02c868d94623f4dd9e9b6775cb3aaab
|
|
Rename BKE_object_runtime_free -> BKE_object_runtime_free_data,
since the runtime pointer is part of the object, only the data is freed.
Leave the data cleared to avoid accidental use,
this is in keeping with other `*_free_data()` functions.
|
|
While fa7ddd0f43ea15dd19d81e7808de2bfe8cfc89ee fixed the reported issue,
the possibility of reusing runtime data during curve-to-mesh conversion
remained. Instead of treating the bounding-box as a special case,
clear all run-time data for temporary objects.
Ref D11026
Reviewed By: sergey
|
|
|
|
|
|
|
|
|
|
|
|
Required changes to make it compile with clang tidy:
* Use c++ includes like (e.g. climits instead limits.h).
* Insert type casts when casting from void* to something else.
* Replace NULL with nullptr.
* Insert casts from int to enum.
* Replace designed initializers (not supported in C++ yet).
* Use blender::Vector instead of BLI_array_staticdeclare (does not compile with C++).
* Replace typedef statements.
Ref T83357.
|
|
|
|
When using Optimal Display, some edges are not flagged `ME_EDGEDRAW` |
`ME_EDGERENDER`.
When the modifier is applied through the UI in the modifier stack this is
not an issue because the `modifyMesh` callback is run with
`MOD_APPLY_TO_BASE_MESH` (this will effectively turn of Optimal
Display).
When converting to mesh though, this will just get an evaluated mesh
(where the edge flags are still the same as with the subdivision
modifier).
Now ensure every edge is flagged to draw after conversion.
Maniphest Tasks: T81997
Differential Revision: https://developer.blender.org/D9331
|
|
|
|
|
|
|
|
Follow our code style guide by using C-comments for text descriptions.
|
|
Note that possibility to pass the new ID pointer as parameter was kept,
as this is needed for some rather specific cases (like in depsgraph/COW,
when copying into already allocated memory).
Part of T71219.
|
|
Just converts verts to points and vice versa.
Materials and Attribute layers are preserved (so for example if you set
custom radii on the pointcloud, convert to mesh, then convert back to
pointcloud, this will be preserved).
Also not add a Radius layer by default (it is still added and
filled when adding a pointcloud object from the menu), a global Radius
property that will be used if there is no radius attribute can be added
later. A Radius attribute can also be added in the pointcloud data
properties (and filled via python).
This will also add a new utility function that copies materials between
datablocks: BKE_id_materials_copy
ref T75717
Differential Revision: https://developer.blender.org/D7391
|
|
|
|
Functions `mesh_create_eval_final_view()` and
`mesh_create_eval_final_render()` were doing the exact same thing,
except for a hack introduced in d3eb9dddd6b4 (2012-10-08, Better fix for
T32846: dupligroup messes up particle instancing on rendering) that
appears to be no longer necessary. Besides that, these functions had
confusing names. Their functionality changed over time, and whether to
do for-render or for-viewport evaluation is now actually determined by
the depsgraph evaluation mode. This means that the `..._render` function
could evaluate a mesh with viewport settings, and vice versa.
The functions are now merged into `mesh_create_eval_final()`, and the
hack has been removed. The `OB_NO_PSYS_UPDATE` flag has been removed
entirely (instead of keeping it around as deprecated flag), because it
was always only temporarily set on objects during mesh evaluation and
thus not saved to the blend file.
No expected functional changes as far as users are concerned.
|
|
Also order sizeof(..) first to promote other values to size_t.
|
|
|
|
|
|
This resolves a performance regression in 2.8x where every edit-mode
update performed an edit-mesh to mesh conversion.
Now the conversion will be lazily initialized if/when it's required.
New BKE_mesh_wrapper_* functions abstract over mesh data access.
Currently only edit-mesh and regular meshes are supported.
In the future sub-surface meshes may be supported too.
|
|
|
|
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
|
|
|
|
The root of the issue was caused by mesh which was a result of to_mesh()
had the same edit_mesh pointer as the input object, causing double-free
error.
This fix makes it so result mesh does not have edit mesh pointer.
Motivation part behind this is to make the result of to_mesh() to be
somewhat independent from the input.
Differential Revision: https://developer.blender.org/D7361
|
|
Show control edges stores the control edges in the mesh which is
picked up by the draw manager. When applyng a subsurf (or multires) we
don't want that data present in the base mesh. Any rebuilding of the mesh
would overwrite the data anyway.
This patch introduces a new flag for applying modifiers
that can be checked to ignore storing display specific data in
the base mesh.
Reviewed By: Brecht van Lommel
Differential Revision: https://developer.blender.org/D7163
|
|
|
|
not in Main.
|
|
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
|
|
Using a struct here allows to change given parameters to the callbacks
without having to edit all callbacks functions, which is always noisy
and time consuming.
|
|
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.
|
|
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
|
|
Remove the use UV for mapping option.
|
|
|
|
These were only strictly valid for texture space calculation, don't store them
since they should not be used after that. Only store a flag to indicate if the
auto texture space has been evaluated.
In the future it might make sense to store bounding boxes at the mesh level to
speed up bounding box computation for multiple objects using the same mesh, but
then it will need to be implemented differently.
|
|
|
|
UVMap is now named 'UVMap'
|
|
|
|
|
|
This also splits vertex access and allocation so it's possible
to copy coordinates into an existing array without allocating it.
|
|
|
|
Does not make sense in the use-cases of that function, especially since
we don't know whether it is actually due to an error, or some glitch
(like an empty curve).
Think we always want to get a mesh when using either operator
conversion, or the `bpy.data.meshes.new_from_object` function.
Note that an assert was also added to ensure we do try to convert from a
valid 'geometry' object type.
|
|
|