Multi-Object Editing

This adds initial multi-object editing support.

- Selected objects are used when entering edit & pose modes.
- Selection & tools work on all objects however many tools need porting
  See: T54641 for remaining tasks.

Indentation will be done separately.

See patch: D3101
This commit is contained in:
2018-04-16 16:27:55 +02:00
parent 80bb4254c6
commit bfc9d426bb
58 changed files with 3786 additions and 1486 deletions

View File

@@ -530,6 +530,15 @@ bool BKE_object_is_in_editmode(const Object *ob)
return false;
}
bool BKE_object_is_in_editmode_and_selected(const Object *ob)
{
if ((ob->flag & SELECT) && (BKE_object_is_in_editmode(ob))) {
return true;
}
return false;
}
bool BKE_object_is_in_editmode_vgroup(const Object *ob)
{
return (OB_TYPE_SUPPORT_VGROUP(ob->type) &&
@@ -548,6 +557,36 @@ bool BKE_object_is_in_wpaint_select_vert(const Object *ob)
return false;
}
bool BKE_object_has_mode_data(const struct Object *ob, eObjectMode object_mode)
{
if (object_mode & OB_MODE_EDIT) {
if (BKE_object_is_in_editmode(ob)) {
return true;
}
}
else if (object_mode & OB_MODE_VERTEX_PAINT) {
if (ob->sculpt && (ob->sculpt->mode_type == OB_MODE_VERTEX_PAINT)) {
return true;
}
}
else if (object_mode & OB_MODE_WEIGHT_PAINT) {
if (ob->sculpt && (ob->sculpt->mode_type == OB_MODE_WEIGHT_PAINT)) {
return true;
}
}
else if (object_mode & OB_MODE_SCULPT) {
if (ob->sculpt && (ob->sculpt->mode_type == OB_MODE_SCULPT)) {
return true;
}
}
else if (object_mode & OB_MODE_POSE) {
if (ob->pose != NULL) {
return true;
}
}
return false;
}
/**
* Return if the object is visible, as evaluated by depsgraph
*/