summaryrefslogtreecommitdiff
path: root/megapixels/commands
diff options
context:
space:
mode:
authorJules Laplace <julescarbon@gmail.com>2019-01-28 13:53:44 +0100
committerJules Laplace <julescarbon@gmail.com>2019-01-28 13:53:44 +0100
commit0c0c2ec2ecfd64b16ff6ca0e69142223615f0c36 (patch)
treee67d8519c87ccddb35e449116117b8b085a385de /megapixels/commands
parent80c592a33ca8f1e2e3da9d050df4119e434b7aae (diff)
fix obj2ply, add may and xi
Diffstat (limited to 'megapixels/commands')
-rw-r--r--megapixels/commands/misc/obj2ply.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/megapixels/commands/misc/obj2ply.py b/megapixels/commands/misc/obj2ply.py
index e3e18e54..8d0cec60 100644
--- a/megapixels/commands/misc/obj2ply.py
+++ b/megapixels/commands/misc/obj2ply.py
@@ -7,11 +7,11 @@ Convert an OBJ 3D model (with vertex color) to a PLY file, which can be read by
import click
@click.command()
-@click.add_argument('--float_colors', action='store_true', help='pass if RGB colors are floats, not ints, in the obj')
-@click.add_argument('--unwind', action='store_true', help='pass to reverse winding order on faces (if surface normals are upside down)')
-@click.add_argument('--flip_y', action='store_true', help='flip Y axis')
-@click.add_argument('-i', '--input_fn', required=True, help='input OBJ filename')
-@click.add_argument('-o', '--output_fn', help='output PLY filename')
+@click.option('-c', '--float_colors/--int_colors', 'float_colors', default=False, help='pass if RGB colors are floats, not ints, in the obj')
+@click.option('-u', '--unwind/--wind', 'unwind', default=False, help='pass to reverse winding order on faces (if surface normals are upside down)')
+@click.option('-y', '--flip_y/--no_flip_y', 'flip_y', default=False, help='flip Y axis')
+@click.option('-i', '--input_fn', required=True, help='input OBJ filename')
+@click.option('-o', '--output_fn', help='output PLY filename')
@click.pass_context
def cli(ctx, float_colors, unwind, flip_y, input_fn, output_fn):
"""