How to use the yoga.model.options.DEFAULT_OPTIONS function in yoga

To help you get started, we’ve selected a few yoga examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github wanadev / yoga / test / test_model_options.py View on Github external
def test_no_parameter_returns_default_options(self):
        opt = options.normalize_options()

        assert opt is not options.DEFAULT_OPTIONS

        for k, v in options.DEFAULT_OPTIONS.items():
            assert k in opt
            assert opt[k] == v
github wanadev / yoga / test / test_model_options.py View on Github external
def test_no_parameter_returns_default_options(self):
        opt = options.normalize_options()

        assert opt is not options.DEFAULT_OPTIONS

        for k, v in options.DEFAULT_OPTIONS.items():
            assert k in opt
            assert opt[k] == v
github wanadev / yoga / yoga / model / cli.py View on Github external
def add_model_cli_options(parser):
    parser.add_argument(
            "--output-format",
            help="format of the output model (default: %s)" % DEFAULT_OPTIONS["output_format"], # noqa
            metavar="{glb,gltf}",
            choices=["glb", "gltf"],
            default=DEFAULT_OPTIONS["output_format"]
            )
    parser.add_argument(
            "--no-graph-optimization",
            help="disable empty graph nodes merging",
            default=DEFAULT_OPTIONS["no_graph_optimization"],
            action="store_true"
            )
    parser.add_argument(
            "--no-meshes-optimization",
            help="disable meshes optimization",
            default=DEFAULT_OPTIONS["no_meshes_optimization"],
            action="store_true"
            )