Transfer Data: add main core code and operators.

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!
This commit is contained in:
2015-01-09 19:11:40 +01:00
parent 67b1412bc9
commit ee4453f083
17 changed files with 3023 additions and 16 deletions

View File

@@ -100,6 +100,13 @@ class VIEW3D_PT_tools_object(View3DPanel, Panel):
row.operator("object.shade_smooth", text="Smooth")
row.operator("object.shade_flat", text="Flat")
if obj_type in {'MESH'}:
col = layout.column(align=True)
col.label(text="Data Transfer:")
row = col.row(align=True)
row.operator("object.data_transfer", text="Data")
row.operator("object.datalayout_transfer", text="Data Layout")
class VIEW3D_PT_tools_add_object(View3DPanel, Panel):
bl_category = "Create"