macros for rectangle center and size

This commit is contained in:
2012-08-20 15:29:02 +00:00
parent 831eaf2d7f
commit 26f073b327
29 changed files with 106 additions and 97 deletions

View File

@@ -5548,8 +5548,8 @@ static void createTransObject(bContext *C, TransInfo *t)
static void NodeToTransData(TransData *td, TransData2D *td2d, bNode *node)
{
/* hold original location */
float locxy[2] = {(node->totr.xmax + node->totr.xmin) / 2.0f,
(node->totr.ymax + node->totr.ymin) / 2.0f};
float locxy[2] = {BLI_RCT_CENTER_X(&node->totr),
BLI_RCT_CENTER_Y(&node->totr)};
copy_v2_v2(td2d->loc, locxy);
td2d->loc[2] = 0.0f;