diff options
author | Kévin Dietrich <kevin.dietrich@mailoo.org> | 2016-09-09 06:30:43 +0300 |
---|---|---|
committer | Kévin Dietrich <kevin.dietrich@mailoo.org> | 2016-09-09 06:30:43 +0300 |
commit | 631af9f930d2fd2c76751204ff22239aa95f761d (patch) | |
tree | b14da01b27eefed9219f756be5dd55d253870bc0 /source/blender/makesrna/intern/rna_scene_api.c | |
parent | 78ea06fea4a74181c25254ed72d50d8a743b6954 (diff) |
Alembic: add option to triangulate meshes upon export.
Diffstat (limited to 'source/blender/makesrna/intern/rna_scene_api.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_scene_api.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/source/blender/makesrna/intern/rna_scene_api.c b/source/blender/makesrna/intern/rna_scene_api.c index 519f28bea24..85c0b01334f 100644 --- a/source/blender/makesrna/intern/rna_scene_api.c +++ b/source/blender/makesrna/intern/rna_scene_api.c @@ -210,7 +210,10 @@ static void rna_Scene_alembic_export( int use_subdiv_schema, int compression_type, int packuv, - float scale) + float scale, + int triangulate, + int quad_method, + int ngon_method) { /* We have to enable allow_threads, because we may change scene frame number * during export. */ @@ -240,6 +243,9 @@ static void rna_Scene_alembic_export( .use_subdiv_schema = use_subdiv_schema, .compression_type = compression_type, .packuv = packuv, + .triangulate = triangulate, + .quad_method = quad_method, + .ngon_method = ngon_method, .global_scale = scale, }; @@ -404,6 +410,9 @@ void RNA_api_scene(StructRNA *srna) RNA_def_enum(func, "compression_type", rna_enum_abc_compression_items, 0, "Compression", ""); RNA_def_boolean(func, "packuv" , 0, "Export with packed UV islands", "Export with packed UV islands"); RNA_def_float(func, "scale", 1.0f, 0.0001f, 1000.0f, "Scale", "Value by which to enlarge or shrink the objects with respect to the world's origin", 0.0001f, 1000.0f); + RNA_def_boolean(func, "triangulate", 0, "Triangulate", "Export Polygons (Quads & NGons) as Triangles"); + RNA_def_enum(func, "quad_method", rna_enum_modifier_triangulate_quad_method_items, 0, "Quad Method", "Method for splitting the quads into triangles"); + RNA_def_enum(func, "ngon_method", rna_enum_modifier_triangulate_quad_method_items, 0, "Polygon Method", "Method for splitting the polygons into triangles"); RNA_def_function_flag(func, FUNC_USE_CONTEXT); #endif |