parser.add_argument("--media-type", required=True)
    parser.add_argument("--media-width", type=int, required=True)
    parser.add_argument("--media-height", type=int, required=True)
    parser.add_argument("--media-length", type=float, default=24)


    parser.add_argument("--camera-type", required=True)
    parser.add_argument("--style-type", required=True)

    parser.add_argument("--modifier-type", required=True)
    parser.add_argument("--modifier-section-axis", default="Z")
    parser.add_argument("--modifier-section-level", type=float, default=0.5)
    parser.add_argument("--modifier-section-animated")
    parser.add_argument("--modifier-section-animate-progress-from", type=float, default=0)
    parser.add_argument("--modifier-section-animate-progress-to", type=float, default=1)

    custom_args = args[sys.argv.index("--") + 1:]

    return parser.parse_args(custom_args)

options = options_from_args(sys.argv)

version.save_new(options.id)
common.setup_default_scene()
media.setup(options)
update.update_models(options)
style.setup(options)
modifier.setup(options)
camera.setup(options)
version.save_current(options)
Exemple #2
0
    parser.add_argument("--id", required=True)
    parser.add_argument("--blend", default=None)
    parser.add_argument("--min-interval", type=int, default=None)

    custom_args = sys.argv[sys.argv.index('--') + 1:]

    return parser.parse_args(custom_args)


args = parse_custom_args()

common.ensure_addons()

if args.blend:
    common.open_scene(args.blend)
    version.save_new(args.id)
    meta.write_media_info()
else:
    run_updates = True

    if args.min_interval:
        meta = meta.get()
        if "lastUpdate" in meta:
            run_updates = time() - meta["lastUpdate"] < args.min_interval

    if run_updates:
        version.open_latest(args.id)

        # TODO: Find problem: Why does it update although hash stayed the same?
        #       (Happened on update form external sources manually)
        #       (Note 06/03/2016 - not sure if still applies)
    parser.add_argument("--blend", default=None)
    parser.add_argument("--min-interval", type=int, default=None)

    custom_args = sys.argv[sys.argv.index("--") + 1 :]

    return parser.parse_args(custom_args)


args = parse_custom_args()


common.ensure_addons()

if args.blend:
    common.open_scene(args.blend)
    version.save_new(args.id)
    meta.write_media_info()
else:
    run_updates = True

    if args.min_interval:
        meta = meta.get()
        if "lastUpdate" in meta:
            run_updates = time() - meta["lastUpdate"] < args.min_interval

    if run_updates:
        version.open_latest(args.id)

        # TODO: Find problem: Why does it update although hash stayed the same?
        #       (Happened on update form external sources manually)
        #       (Note 06/03/2016 - not sure if still applies)