312
319
/* return values from BKE_imtype_valid_depths, note this is depts per channel */
313
320
#define R_IMF_CHAN_DEPTH_1 (1<<0) /* 1bits (unused) */
314
321
#define R_IMF_CHAN_DEPTH_8 (1<<1) /* 8bits (default) */
315
#define R_IMF_CHAN_DEPTH_12 (1<<2) /* 12bits (uncommon, jp2 supports) */
316
#define R_IMF_CHAN_DEPTH_16 (1<<3) /* 16bits (tiff, halff float exr) */
317
#define R_IMF_CHAN_DEPTH_24 (1<<4) /* 24bits (unused) */
318
#define R_IMF_CHAN_DEPTH_32 (1<<5) /* 32bits (full float exr) */
322
#define R_IMF_CHAN_DEPTH_10 (1<<2) /* 10bits (uncommon, Cineon/DPX support) */
323
#define R_IMF_CHAN_DEPTH_12 (1<<3) /* 12bits (uncommon, jp2/DPX support) */
324
#define R_IMF_CHAN_DEPTH_16 (1<<4) /* 16bits (tiff, halff float exr) */
325
#define R_IMF_CHAN_DEPTH_24 (1<<5) /* 24bits (unused) */
326
#define R_IMF_CHAN_DEPTH_32 (1<<6) /* 32bits (full float exr) */
320
328
/* ImageFormatData.planes */
321
329
#define R_IMF_PLANES_RGB 24
477
496
/* Bake Render options */
478
497
short bake_osa, bake_filter, bake_mode, bake_flag;
479
498
short bake_normal_space, bake_quad_split;
480
float bake_maxdist, bake_biasdist, bake_pad;
499
float bake_maxdist, bake_biasdist;
500
short bake_samples, bake_pad;
482
502
/* path to render output */
483
503
char pic[1024]; /* 1024 = FILE_MAX */
849
876
/* unified strength of brush */
879
/* unified brush weight, [0, 1] */
852
882
/* user preferences for sculpt and paint */
887
/* record movement of mouse so that rake can start at an intuitive angle */
888
float last_x, last_y;
891
float special_rotation;
893
// all this below is used to communicate with the cursor drawing routine
896
float anchored_location[3];
897
float anchored_initial_mouse[2];
899
/* drawing pressure */
901
float pressure_value;
854
902
} UnifiedPaintSettings;
857
905
UNIFIED_PAINT_SIZE = (1<<0),
858
906
UNIFIED_PAINT_ALPHA = (1<<1),
907
UNIFIED_PAINT_WEIGHT = (1<<5),
860
909
/* only used if unified size is enabled, mirros the brush flags
861
910
* BRUSH_LOCK_SIZE and BRUSH_SIZE_PRESSURE */
1111
1163
/* Movie Tracking */
1112
1164
struct MovieClip *clip; /* active movie clip */
1114
uint64_t customdata_mask; /* XXX. runtime flag for drawing, actually belongs in the window, only used by object_handle_update() */
1166
uint64_t customdata_mask; /* XXX. runtime flag for drawing, actually belongs in the window, only used by BKE_object_handle_update() */
1115
1167
uint64_t customdata_mask_modal; /* XXX. same as above but for temp operator use (gl renders) */
1169
/* Color Management */
1170
ColorManagedViewSettings view_settings;
1171
ColorManagedDisplaySettings display_settings;
1172
ColorManagedColorspaceSettings sequencer_colorspace_settings;
1174
/* RigidBody simulation world+settings */
1175
struct RigidBodyWorld *rigidbody_world;
1149
1209
/* Use the same flag for autothreads */
1150
1210
#define R_FIXED_THREADS 0x80000
1152
#define R_SPEED 0x100000
1153
#define R_SSS 0x200000
1154
#define R_NO_OVERWRITE 0x400000 /* skip existing files */
1155
#define R_TOUCH 0x800000 /* touch files before rendering */
1156
#define R_SIMPLIFY 0x1000000
1212
#define R_SPEED 0x100000
1213
#define R_SSS 0x200000
1214
#define R_NO_OVERWRITE 0x400000 /* skip existing files */
1215
#define R_TOUCH 0x800000 /* touch files before rendering */
1216
#define R_SIMPLIFY 0x1000000
1217
#define R_EDGE_FRS 0x2000000 /* R_EDGE reserved for Freestyle */
1218
#define R_PERSISTENT_DATA 0x4000000 /* keep data around for re-render */
1159
1221
#define R_SEQ_GL_PREV 1
1160
#define R_SEQ_GL_REND 2
1222
// #define R_SEQ_GL_REND 2 // UNUSED, opengl render has its own operator now.
1223
#define R_SEQ_SOLID_TEX 4
1162
1225
/* displaymode */
1288
1353
#define TESTBASE(v3d, base) ( \
1289
1354
((base)->flag & SELECT) && \
1290
1355
((base)->lay & v3d->lay) && \
1291
(((base)->object->restrictflag & OB_RESTRICT_VIEW)==0) )
1356
(((base)->object->restrictflag & OB_RESTRICT_VIEW) == 0))
1292
1357
#define TESTBASELIB(v3d, base) ( \
1293
1358
((base)->flag & SELECT) && \
1294
1359
((base)->lay & v3d->lay) && \
1295
((base)->object->id.lib==NULL) && \
1296
(((base)->object->restrictflag & OB_RESTRICT_VIEW)==0) )
1360
((base)->object->id.lib == NULL) && \
1361
(((base)->object->restrictflag & OB_RESTRICT_VIEW) == 0))
1297
1362
#define TESTBASELIB_BGMODE(v3d, scene, base) ( \
1298
1363
((base)->flag & SELECT) && \
1299
1364
((base)->lay & (v3d ? v3d->lay : scene->lay)) && \
1300
((base)->object->id.lib==NULL) && \
1301
(((base)->object->restrictflag & OB_RESTRICT_VIEW)==0) )
1365
((base)->object->id.lib == NULL) && \
1366
(((base)->object->restrictflag & OB_RESTRICT_VIEW) == 0))
1302
1367
#define BASE_EDITABLE_BGMODE(v3d, scene, base) ( \
1303
1368
((base)->lay & (v3d ? v3d->lay : scene->lay)) && \
1304
((base)->object->id.lib==NULL) && \
1305
(((base)->object->restrictflag & OB_RESTRICT_VIEW)==0))
1369
((base)->object->id.lib == NULL) && \
1370
(((base)->object->restrictflag & OB_RESTRICT_VIEW) == 0))
1306
1371
#define BASE_SELECTABLE(v3d, base) ( \
1307
1372
(base->lay & v3d->lay) && \
1308
(base->object->restrictflag & (OB_RESTRICT_SELECT|OB_RESTRICT_VIEW))==0 )
1373
(base->object->restrictflag & (OB_RESTRICT_SELECT | OB_RESTRICT_VIEW)) == 0)
1309
1374
#define BASE_VISIBLE(v3d, base) ( \
1310
1375
(base->lay & v3d->lay) && \
1311
(base->object->restrictflag & OB_RESTRICT_VIEW)==0 )
1376
(base->object->restrictflag & OB_RESTRICT_VIEW) == 0)
1313
1378
#define FIRSTBASE scene->base.first
1314
1379
#define LASTBASE scene->base.last
1315
1380
#define BASACT (scene->basact)
1316
#define OBACT (BASACT? BASACT->object: NULL)
1381
#define OBACT (BASACT ? BASACT->object: NULL)
1318
1383
#define V3D_CAMERA_LOCAL(v3d) ((!(v3d)->scenelock && (v3d)->camera) ? (v3d)->camera : NULL)
1319
1384
#define V3D_CAMERA_SCENE(scene, v3d) ((!(v3d)->scenelock && (v3d)->camera) ? (v3d)->camera : (scene)->camera)
1321
#define ID_NEW(a) if( (a) && (a)->id.newid ) (a)= (void *)(a)->id.newid
1322
#define ID_NEW_US(a) if( (a)->id.newid) {(a)= (void *)(a)->id.newid; (a)->id.us++;}
1323
#define ID_NEW_US2(a) if( ((ID *)a)->newid) {(a)= ((ID *)a)->newid; ((ID *)a)->us++;}
1324
#define CFRA (scene->r.cfra)
1325
#define SUBFRA (scene->r.subframe)
1326
#define SFRA (scene->r.sfra)
1327
#define EFRA (scene->r.efra)
1328
#define PRVRANGEON (scene->r.flag & SCER_PRV_RANGE)
1329
#define PSFRA ((PRVRANGEON)? (scene->r.psfra): (scene->r.sfra))
1330
#define PEFRA ((PRVRANGEON)? (scene->r.pefra): (scene->r.efra))
1331
#define FRA2TIME(a) ((((double) scene->r.frs_sec_base) * (double)(a)) / (double)scene->r.frs_sec)
1332
#define TIME2FRA(a) ((((double) scene->r.frs_sec) * (double)(a)) / (double)scene->r.frs_sec_base)
1333
#define FPS (((double) scene->r.frs_sec) / (double)scene->r.frs_sec_base)
1335
#define RAD_PHASE_PATCHES 1
1336
#define RAD_PHASE_FACES 2
1386
#define CFRA (scene->r.cfra)
1387
#define SUBFRA (scene->r.subframe)
1388
#define SFRA (scene->r.sfra)
1389
#define EFRA (scene->r.efra)
1390
#define PRVRANGEON (scene->r.flag & SCER_PRV_RANGE)
1391
#define PSFRA ((PRVRANGEON) ? (scene->r.psfra) : (scene->r.sfra))
1392
#define PEFRA ((PRVRANGEON) ? (scene->r.pefra) : (scene->r.efra))
1393
#define FRA2TIME(a) ((((double) scene->r.frs_sec_base) * (double)(a)) / (double)scene->r.frs_sec)
1394
#define TIME2FRA(a) ((((double) scene->r.frs_sec) * (double)(a)) / (double)scene->r.frs_sec_base)
1395
#define FPS (((double) scene->r.frs_sec) / (double)scene->r.frs_sec_base)
1338
1397
/* base->flag is in DNA_object_types.h */
1425
1487
SCULPT_SYMMETRY_FEATHER = (1<<6),
1426
1488
SCULPT_USE_OPENMP = (1<<7),
1427
1489
SCULPT_ONLY_DEFORM = (1<<8),
1490
SCULPT_SHOW_DIFFUSE = (1<<9),
1492
/* If set, the mesh will be drawn with smooth-shading in
1493
* dynamic-topology mode */
1494
SCULPT_DYNTOPO_SMOOTH_SHADING = (1<<10),
1496
/* If set, dynamic-topology brushes will collapse short edges in
1497
* addition to subdividing long ones */
1498
SCULPT_DYNTOPO_COLLAPSE = (1<<11)
1430
1501
/* ImagePaintSettings.flag */