Age | Commit message (Collapse) | Author |
|
|
|
This add code needed to map a CD data layout from source mesh towards destination one,
and code needed to actually transfer data, using BKE's mesh remap generated data.
This allows to transfer most CD layers (vgroups, vcols, uvs...) as well as fake, boolean ones
(like smooth/sharp edges/faces, etc.). Some types are not yet transferable, mainly
shape keys, this is known TODO.
Data transfer can also use some advanced mixing in some cases (mostly, vgroups and vcols).
Notes:
* New transfer operators transfer data from active object towards selected ones.
* Modifier will be committed separately.
* Old weight transfer code (for vgroups) is kept for now, mostly because it is the only
usable one in weightpaint mode (it transfers from selected object to active one,
this is not sensible in Object mode, but needed in WeightPaint one). This will be addressed soon.
Again, heavily reviewed and enhanced by Campbell, thanks!
|
|
CustomData_duplicate_referenced_layer_n not used in master currently, but need it
in mesh tranfer branch.
|
|
UVLayers
This is only an indirect fix, in fact: this commit adds a public API to check
the maximum number of a given layer type (`CustomData_layertype_layers_max()`),
and uses it to forbid too much layer creation in `CustomData_merge()`.
This only affects UVs/VCol data though, but merge behavior in itself is not a bug
actually, how user managed to get thousands of different UV layer names remain
rather mysterious...
|
|
|
|
|
|
|
|
|
|
consideration
(which is also "[#36749] Joining objects with more than one uv map depends on list order")
Thanks Bastien Montagne and Brecht van Lommel for reviewing and some advice.
|
|
Neede for next commit (split normals API).
|
|
|
|
remove MEM_sys_types.h which was a duplicate.
|
|
nothing is changed (happens quite often that there is nothing to do).
|
|
when the block would be immediately allocated again.
|
|
vert/edge/face/loop if there are no free functions for the customdata
layers.
|
|
|
|
note: that this intentionally removes check to exit vpaint mode when a vertex color layer is removed,
since being in vertex-paint mode without a vertex color layer is supported.
also minor change to drawing camera limits while picking from previous commit.
|
|
the active layer, matching CustomData_get()
|
|
each UV and vertex color, gives overall ~9.5% drawing speedup in my tests.
was also doing NULL checks on UV's which are never NULL in this case.
|
|
unless they are needed.
configurable in 'Geometry Data' panel, will be added when running crease edges transform for example.
|
|
if vertex colors had no seams - it would interpolate the UV's too, now interpolate per-layer.
|
|
Issue was customdata wasnt being initialized for layers in the destination BMesh but not in the source data.
|
|
|
|
CustomData_has_interp() for vert & edges.
|
|
and vertex colors).
|
|
C with gcc.
helps for finding unused functions and making functions static, also did some minor code cleanup.
|
|
|
|
- replace (strcmp(vfont->name, FO_BUILTIN_NAME) == 0) with (BKE_vfont_is_builtin(vfont)).
- reduce some double promotions.
|
|
Issue was caused by do_versions being used pdata as reference for active/render/
stencil/clone layer indices instead of fdata.
Added some utility functions used only by do_versions to be sure this indices
are set from fdata for pre-bmesh files.
|
|
|
|
|
|
- bm.*.layers.*.verify()
- bm.*.layers.*.is_singleton
- bm.*.layers.*.copy_from(other)
also added api functons
- BM_data_layer_copy(...)
- CustomData_layertype_is_singleton(type)
|
|
Object has vertex group
Another crash with array caps, was caused by not making a deep enough
copy of CD field.
Also fixed the type of the 'mask' parameter, was int where it should
be 64-bit.
|
|
match BM_ function naming conventions
|
|
|
|
|
|
also remove large, duplicate comments from sunsky.h
|
|
|
|
* double default edge allocation size (double the number of verts/faces).
* CustomData_bmesh_init_pool was using allocsize & chunksize as the same variable. Now use type specific chunk size.
* bmesh copy and editmode conversion now allocate the BMesh mempool size needed for the entire vert/edge/loop/face arrays since its known already.
|
|
added some missing functions too - which are not used yep but should be there for api completeness.
* CDDM_set_mloop
* CDDM_set_mpoly
* BLI_mempool_count
|
|
- copy & rename EditMesh stricts for use with scanfill (remove unused members)
|
|
|
|
without the underscores these clogged up the namespace for autocompleation which was annoying.
|
|
|
|
operand's type for the result, so cast 1 to CustomDataMask.
|
|
|
|
index values in a typemap.
|
|
|
|
|
|
|