python api: add functionality to remove uv-texture layers.

This commit is contained in:
2013-03-21 20:54:48 +00:00
parent 8ff3fa8ab2
commit b57fc113aa
6 changed files with 77 additions and 46 deletions

View File

@@ -202,7 +202,6 @@ void DPAINT_OT_type_toggle(wmOperatorType *ot)
static int output_toggle_exec(bContext *C, wmOperator *op)
{
Object *ob = ED_object_context(C);
Scene *scene = CTX_data_scene(C);
DynamicPaintSurface *surface;
DynamicPaintModifierData *pmd = (DynamicPaintModifierData *)modifiers_findByType(ob, eModifierType_DynamicPaint);
int output = RNA_enum_get(op->ptr, "output"); /* currently only 1/0 */
@@ -223,7 +222,7 @@ static int output_toggle_exec(bContext *C, wmOperator *op)
/* Vertex Color Layer */
if (surface->type == MOD_DPAINT_SURFACE_T_PAINT) {
if (!exists)
ED_mesh_color_add(C, scene, ob, ob->data, name, 1);
ED_mesh_color_add(ob->data, name, true);
else
ED_mesh_color_remove_named(ob->data, name);
}