Age | Commit message (Collapse) | Author |
|
Also use doxy style function reference `#` prefix chars when
referencing identifiers.
|
|
|
|
When baking some data, we create a new Mesh with edits and modifiers applied.
However, in some cases (e.g. when there is no modifier), the returned Mesh is
actually referencing the original one and its data layers. When autosmooth is
enabled we also split the Mesh. However, since the new Mesh is referencing the
original one, although `BKE_mesh_split_faces` is creating new vertices and edges,
the reallocation of the custom data layers is preempted because of the
reference, so adding the new vertices and edges overwrites valid data
To fix this we duplicate referenced layers before splitting the faces.
Reviewed By: brecht
Differential Revision: https://developer.blender.org/D11703
|
|
|
|
This matches BMesh which also has tessellation in it's own file.
Using a separate file helps with organization when
extracting code into smaller functions.
|
|
|
|
- BKE_mesh_copy_parameters_for_eval to be used for evaluated meshes only
as it doesn't handle ID user-counts.
- BKE_mesh_copy_parameters is a general function for copying parameters
between meshes.
|
|
These were limited to obvious cases. Some less obvious cases
were kept as refactoring might make them necessary in future.
|
|
|
|
This concerns currently only collections (`master_collection` of scenes)
and root node trees. It removes the matching type-specific helpers
(`BKE_collection_master_scene_search` and `BKE_node_tree_find_owner_ID`).
No functional change expected here.
NOTE: Current implementation of `owner_get` is far from optimal, we
could probably do it better, see {T69169}.
NOTE: While it could also have it, shapekeys IDTypeInfo was left out of
this change for now. Mainly because it sould not be used currently, and
we ultimately want to demote shape keys from ID status anyway.
|
|
Approximately 91 spelling corrections, almost all in comments.
Differential Revision: https://developer.blender.org/D10288
Reviewed by Harley Acheson
|
|
`BKE_mesh_new_nomain_from_template_ex()` would duplicate the mesh selection
storage of the destination mesh to the destination mesh. Since that mesh was
default initialized at this point, the selection was `NULL`, so the duplication
call is essentially a no-op.
Mistake in 7efc75c7092b.
Differential Revision: https://developer.blender.org/D10009
Reviewed by: Sybren Stüvel
|
|
Currently this is needed to properly tag PointCache's for info update
(fixes an issue reported in T82503).
Suspect we may need this in more cases in the future though, RNA
assign/update processes are not always 100% enough to deal with
complicated corner cases.
|
|
|
|
This commit removes geometry from meshes and shapekeys, and embedded
files, from liboverride IDs.
This data is never overrideable, there is no reason to store extra
useless copies of it in production files.
See T78944.
Note that we may add more data to be skipped on write for liboverrides
in the future, but this commit should address all the most important
cases already.
Reviewed By: brecht
Differential Revision: https://developer.blender.org/D9810
|
|
|
|
When extracting new objects from a mesh in sculpt mode, it makes sense to keep
the current symmetry options and settings in the new mesh. In previous versions symmetry
options were stored in the tool settings, so this bug was not that obvious.
This also preserves the remember settings in the new object, which is also the desired
behaviour.
Reviewed By: sergey, mont29
Differential Revision: https://developer.blender.org/D9417
|
|
memfile undos
This is essentially adding that new callback, and using it only for already
existing Scene's 3DCursor.
Note that the place where this is called has been moved again, after all
have been lib-linked, such that those callbacks may also work on ID pointers.
Maniphest Tasks: T71759
Differential Revision: https://developer.blender.org/D9237
|
|
This is the same fix that is implemented in rB3791dbea1e79.
|
|
It was rather a huge chunk of code, which started to become
more harder to maintain with the transition to OpenSubdiv based
implementation. Because of this transition, the compatibility was
also rather on a poor side.
Remove compatibility support for pre-2.50.9 multires.
Ref T77107
Reviewed By: brecht, mont29
Differential Revision: https://developer.blender.org/D9238
|
|
Corrects incorrect usages of the words 'then' and 'than'.
Differential Revision: https://developer.blender.org/D9246
Reviewed by Campbell Barton
|
|
Better use higher-level code from common ID management when possible.
Helps to de-duplicate logic, and reduces outside usages of more
'dangerous' functions.
Note that we could get rid of many of those `BKE_<id_type>_add`
functions now, but on the other hand several of those take extra
parameters and perform additional actions, so think we can keep them all
for now as 'non-standard ID specific creation functions'.
|
|
Those were only shallow wrappers around `BKE_id_copy`, barely used (even
fully unused in some cases), and we want to get rid of those ID-specific
helpers for the common ID management tasks. Also prevents weird custom
behaviors (like `BKE_object_copy`, who was the only basic ID copy
function to reset user count of the new copy to zero).
Part of 71219.
|
|
No reasons to keep the new ID pointer as parameter here.
Part of T71219.
|
|
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.
|
|
Add a specific flag for nodetree deep-copy special localization code.
And add a new `LIB_ID_CREATE_LOCALIZE` flag, similar to
`LIB_ID_COPY_LOCALIZE`, for creation purposes.
No behavioral changes expected here.
|
|
Cleanup old tracker task format to the new. e.g: [#34039] to T34039
Ref D8718
|
|
face_set_color_default was not copied when copying meshes, so when
extracting the colors in the draw cache it was using a wrong default
color ID.
Reviewed By: sergey
Differential Revision: https://developer.blender.org/D8957
|
|
Originally was noticed when transforming mesh created by
object.to_mesh() from an object without modifier, in which case the
result references CustomData layers used by the object itself.
The issue goes a bit deeper: mesh.transform() should never modify
referenced layers, hence it should duplicate referenced layers.
This fix changes one specific aspect of the reported behavior. The
case where vertices coordinates are modified manually will still have
affect on the source mesh (as no referenced CustomData layers are being
duplicated). Proper fix for this case is not yet clear to me.
Differential Revision: https://developer.blender.org/D8939
|
|
These were leftovers from the BGE removal.
Differential Revision: https://developer.blender.org/D8862
|
|
Regression in a48d78ce07f4f which caused the meshes CustomData
to be written before it's layer values were updated for writing.
|
|
|
|
I'm also adding `BKE_id_blend_write`, so that it can be accessed
outside of `readfile.c`.
|
|
This is part of T76372.
It adds the `blend_write`, `blend_read_data`, `blend_read_lib`
and `blend_read_expand` which correspond to the various
steps when reading and writing .blend files.
Having these callbacks allows us to decentralize the blenloader
code a lot more. This has the affect that code related to any
specific ID type is less scattered.
Reviewers: mont29
Differential Revision: https://developer.blender.org/D8670
|
|
|
|
|
|
This addresses warnings from Clang-Tidy's `readability-else-after-return`
rule in the `source/blender/blenkernel` module.
No functional changes.
|
|
Also order return matrices last.
|
|
Also order return matrices last.
|
|
|
|
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.
|
|
|
|
|
|
The `BKE_animsys.h` and `anim_sys.c` files already had a an "AnimData
API" section. The code in that section has now been split off, and
placed into `BKE_anim_data.h` and `anim_data.c`.
All files that used to include `BKE_animsys.h` have been adjusted to
only include the animation headers they need (sometimes none).
No functional changes.
|
|
Mpving utils from idcode to idtype proved to be somewhat painful for
some reasons, but now all looks good.
Had to add a fake/empty shell for the special snowflake too,
`ID_LINK_PLACEHOLDER/INDEX_ID_NULL`...
|
|
|
|
|
|
Make it explicit this data mask is added to the default mask.
|
|
This has been long standing TODO...
Note that remaining usages of BKE_xxx_delete should all be carefully
checked for and utilmately nuked in favor of `BKE_id_delete()`, think we
still have quiet a few bugs hidden in those (code seems to usually
assume those functions do a full ID deletion, which is not the case).
|
|
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
|