138
139
/* local protos ---------------*/
139
140
void snap_curs_to_firstsel(void);
141
/* flag==2 only border, flag==3 cross+border */
142
/* flag==2 only border, flag==3 cross+border
143
flag==5 cross + border + start&end frame
142
145
int get_border(rcti *rect, short flag)
144
147
float dvec[4], fac1, fac2;
227
230
sdrawXORline4(1, x1, mvalo[1], mvalo[0], mvalo[1]);
228
231
sdrawXORline4(2, mvalo[0], mvalo[1], mvalo[0], y1);
229
232
sdrawXORline4(3, mvalo[0], y1, x1, y1);
233
236
getmouseco_areawin(mval);
285
288
areamouseco_to_ipoco(&sipo->v2d, mval, dvec, dvec+1);
286
289
areamouseco_to_ipoco(&sipo->v2d, mvalo+2, dvec+2, dvec+3);
288
sprintf(str, "Time: %.4f Y %.4f", dvec[0]-dvec[2], dvec[1]-dvec[3]);
289
glRasterPos2i(30, 30);
290
glColor3f(0.0, 0.0, 0.0);
291
BMF_DrawString(G.fonts, str);
292
glRasterPos2i(31, 31);
293
glColor3f(0.9, 0.9, 0.9);
292
/* setting preview range */
293
if (dvec[0] < dvec[2])
294
sprintf(str, "Preview Range: %d to %d", (int)dvec[0], (int)dvec[2]);
296
sprintf(str, "Preview Range: %d to %d", (int)dvec[2], (int)dvec[0]);
299
sprintf(str, "Time: %.4f Y %.4f", dvec[0]-dvec[2], dvec[1]-dvec[3]);
301
BIF_ThemeColor(TH_BACK);
302
glRecti(14, 24, 165, 38);
304
glColor3f(0.0, 0.0, 0.0);
305
glRasterPos2i(15, 27);
306
BMF_DrawString(G.fonts, str);
307
glColor3f(0.8, 0.8, 0.8);
308
glRasterPos2i(16, 28);
309
BMF_DrawString(G.fonts, str);
311
else if ((ELEM3(curarea->spacetype, SPACE_ACTION, SPACE_NLA, SPACE_TIME)) && flag==5) {
312
/* only while setting preview range */
315
switch (curarea->spacetype)
319
SpaceAction *saaction= curarea->spacedata.first;
325
SpaceNla *snla= curarea->spacedata.first;
336
areamouseco_to_ipoco(v2d, mval, dvec, dvec+1);
337
areamouseco_to_ipoco(v2d, mvalo+2, dvec+2, dvec+3);
339
if (dvec[0] < dvec[2])
340
sprintf(str, "Preview Range: %d to %d", (int)dvec[0], (int)dvec[2]);
342
sprintf(str, "Preview Range: %d to %d", (int)dvec[2], (int)dvec[0]);
344
BIF_ThemeColor(TH_BACK);
345
glRecti(14, 24, 165, 38);
347
glColor3f(0.0, 0.0, 0.0);
348
glRasterPos2i(15, 27);
349
BMF_DrawString(G.fonts, str);
350
glColor3f(0.8, 0.8, 0.8);
351
glRasterPos2i(16, 28);
294
352
BMF_DrawString(G.fonts, str);
299
357
mvalo[0]= mval[0];
300
358
mvalo[1]= mval[1];
512
int tot=0, totf=0, subsurf;
514
576
switch(ob->type) {
519
ModifierData *md = modifiers_findByType(ob, eModifierType_Subsurf);
520
int totvert, totface;
524
SubsurfModifierData *smd = (SubsurfModifierData*) md;
525
if(smd->modifier.mode & eModifierMode_Realtime)
526
subsurf= 1<<(2*smd->levels);
529
totvert= subsurf*me->totvert*totob;
530
totface= subsurf*me->totface*totob;
535
G.totvertsel+= totvert;
536
G.totfacesel+= totface;
581
int totvert, totedge, totface;
582
dm = mesh_get_derived_final(ob, get_viewedit_datamask());
583
totvert = dm->getNumVerts(dm);
584
totedge = dm->getNumEdges(dm);
585
totface = dm->getNumFaces(dm);
587
G.totvert+= totvert*totob;
588
G.totedge+= totedge*totob;
589
G.totface+= totface*totob;
591
G.totvertsel+= totvert;
592
G.totfacesel+= totface;
542
598
G.totlamp+=totob;
1790
1846
if ELEM5(G.obedit->type, OB_ARMATURE, OB_LATTICE, OB_MESH, OB_SURF, OB_CURVE)
1791
1847
make_trans_verts(bmat[0], bmat[1], 0);
1792
if(tottrans==0) return;
1848
if(tottrans==0) return 0;
1794
1850
Mat3CpyMat4(bmat, G.obedit->obmat);