Code cleanup: replace some manual setting of ob->recalc with DAG_id_tag_update,

is now just as fast anyway with delayed flush.
This commit is contained in:
2011-08-12 18:06:05 +00:00
parent b374ab919a
commit e4bdb6e95a

View File

@@ -246,7 +246,7 @@ static int object_clear_transform_generic_exec(bContext *C, wmOperator *op,
}
/* tag for updates */
ob->recalc |= OB_RECALC_OB;
DAG_id_tag_update(&ob->id, OB_RECALC_OB);
}
}
CTX_DATA_END;
@@ -341,7 +341,8 @@ static int object_origin_clear_exec(bContext *C, wmOperator *UNUSED(op))
negate_v3_v3(v3, v1);
mul_m3_v3(mat, v3);
}
ob->recalc |= OB_RECALC_OB;
DAG_id_tag_update(&ob->id, OB_RECALC_OB);
}
CTX_DATA_END;
@@ -871,7 +872,7 @@ static int object_origin_set_exec(bContext *C, wmOperator *op)
(ob->dup_group==ob_other->dup_group && (ob->transflag|ob_other->transflag) & OB_DUPLIGROUP) )
) {
ob_other->flag |= OB_DONE;
ob_other->recalc= OB_RECALC_OB|OB_RECALC_DATA;
DAG_id_tag_update(&ob_other->id, OB_RECALC_OB|OB_RECALC_DATA);
copy_v3_v3(centn, cent);
mul_mat3_m4_v3(ob_other->obmat, centn); /* ommit translation part */
@@ -890,11 +891,9 @@ static int object_origin_set_exec(bContext *C, wmOperator *op)
}
CTX_DATA_END;
for (tob= bmain->object.first; tob; tob= tob->id.next) {
if(tob->data && (((ID *)tob->data)->flag & LIB_DOIT)) {
tob->recalc= OB_RECALC_OB|OB_RECALC_DATA;
}
}
for (tob= bmain->object.first; tob; tob= tob->id.next)
if(tob->data && (((ID *)tob->data)->flag & LIB_DOIT))
DAG_id_tag_update(&tob->id, OB_RECALC_OB|OB_RECALC_DATA);
if (tot_change) {
DAG_ids_flush_update(bmain, 0);