MCPcopy Create free account
hub / github.com/NatronGitHub/Natron / loadBuiltinFormats

Method loadBuiltinFormats

Engine/AppManagerPrivate.cpp:379–422  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

377}
378
379void
380AppManagerPrivate::loadBuiltinFormats()
381{
382 // Initializing list of all Formats available by default in a project, the user may add formats to this list via Python in the init.py script, see
383 // example here: http://natron.readthedocs.io/en/workshop/startupscripts.html#init-py
384 std::vector<std::string> formatNames;
385 struct BuiltinFormat
386 {
387 const char *name;
388 int w;
389 int h;
390 double par;
391 };
392
393 // list of formats: the names must match those in ofxsFormatResolution.h
394 BuiltinFormat formats[] = {
395 { "PC_Video", 640, 480, 1 },
396 { "NTSC", 720, 486, 0.91 },
397 { "PAL", 720, 576, 1.09 },
398 { "NTSC_16:9", 720, 486, 1.21 },
399 { "PAL_16:9", 720, 576, 1.46 },
400 { "HD_720", 1280, 720, 1 },
401 { "HD", 1920, 1080, 1 },
402 { "UHD_4K", 3840, 2160, 1 },
403 { "1K_Super_35(full-ap)", 1024, 778, 1 },
404 { "1K_Cinemascope", 914, 778, 2 },
405 { "2K_Super_35(full-ap)", 2048, 1556, 1 },
406 { "2K_Cinemascope", 1828, 1556, 2 },
407 { "2K_DCP", 2048, 1080, 1 },
408 { "4K_Super_35(full-ap)", 4096, 3112, 1 },
409 { "4K_Cinemascope", 3656, 3112, 2 },
410 { "4K_DCP", 4096, 2160, 1 },
411 { "square_256", 256, 256, 1 },
412 { "square_512", 512, 512, 1 },
413 { "square_1K", 1024, 1024, 1 },
414 { "square_2K", 2048, 2048, 1 },
415 { NULL, 0, 0, 0 }
416 };
417
418 for (BuiltinFormat* f = &formats[0]; f->name != NULL; ++f) {
419 Format _frmt(0, 0, f->w, f->h, f->name, f->par);
420 _formats.push_back(_frmt);
421 }
422} // loadBuiltinFormats
423
424//
425// only used for Natron internal plugins (ViewerGroup, Dot, DiskCache, BackDrop, Roto)

Callers 1

Calls 1

push_backMethod · 0.45

Tested by

no test coverage detected