cleanup: Collada exporter renamed 'transrotloc' to 'decomposed'
authorGaia Clary <gaia.clary@machinimatrix.org>
Mon, 27 May 2019 16:35:34 +0000 (18:35 +0200)
committerGaia Clary <gaia.clary@machinimatrix.org>
Mon, 27 May 2019 16:39:06 +0000 (18:39 +0200)
The collada exporter allows to export transforms either as Matrix
or as a decomposition of Translation, Rotation aand Scale.
The decomposition option was falsely named "TransRotLoc".
I renamed it to the much more descriptive word "Decomposed".
The tooltip already contains sufficient information, so there
is no need to change that.

source/blender/collada/ExportSettings.h
source/blender/collada/TransformWriter.cpp
source/blender/editors/io/io_collada.c

index ca118e4d14d11b960d5da6540f29decf1e3a8eff..36f3ea40da94a7b62e811f0d271c20a9652c0234 100644 (file)
@@ -37,7 +37,7 @@ typedef enum BC_export_mesh_type {
 
 typedef enum BC_export_transformation_type {
   BC_TRANSFORMATION_TYPE_MATRIX,
-  BC_TRANSFORMATION_TYPE_TRANSROTLOC,
+  BC_TRANSFORMATION_TYPE_DECOMPOSED,
 } BC_export_transformation_type;
 
 typedef enum BC_export_animation_type {
index fbf75552b85d65dbba18aa2ab0e45cd88115bc29..a80d02ab9a309485da2c404e7c4f3723098227c4 100644 (file)
@@ -92,7 +92,7 @@ void TransformWriter::add_node_transform_ob(COLLADASW::Node &node,
       node.addMatrix("transform", d_obmat);
       break;
     }
-    case BC_TRANSFORMATION_TYPE_TRANSROTLOC: {
+    case BC_TRANSFORMATION_TYPE_DECOMPOSED: {
       float loc[3], rot[3], scale[3];
       bc_decompose(f_obmat, loc, rot, NULL, scale);
       if (limit_precision) {
index fc3bf74f38609eab9f128b9e2873099d1bc1b381..c5c24051299314b810134a84d3d04fc2caed2cf5 100644 (file)
@@ -223,10 +223,10 @@ static int wm_collada_export_exec(bContext *C, wmOperator *op)
 
   if (export_animation_type != BC_ANIMATION_EXPORT_SAMPLES) {
     // When curves are exported then we can not export as matrix
-    export_settings.animation_transformation_type = BC_TRANSFORMATION_TYPE_TRANSROTLOC;
+    export_settings.animation_transformation_type = BC_TRANSFORMATION_TYPE_DECOMPOSED;
   }
 
-  if (export_settings.animation_transformation_type != BC_TRANSFORMATION_TYPE_TRANSROTLOC) {
+  if (export_settings.animation_transformation_type != BC_TRANSFORMATION_TYPE_DECOMPOSED) {
     // Can not export smooth curves when Matrix export is enabled.
     export_settings.keep_smooth_curves = false;
   }
@@ -397,7 +397,7 @@ static void uiCollada_exportSettings(uiLayout *layout, PointerRNA *imfptr)
     uiItemR(row, imfptr, "keep_smooth_curves", 0, NULL, ICON_NONE);
     uiLayoutSetEnabled(row,
                        include_animations &&
-                           (animation_transformation_type == BC_TRANSFORMATION_TYPE_TRANSROTLOC ||
+                           (animation_transformation_type == BC_TRANSFORMATION_TYPE_DECOMPOSED ||
                             animation_type == BC_ANIMATION_EXPORT_KEYS));
 
     row = uiLayoutColumn(box, false);
@@ -496,11 +496,11 @@ void WM_OT_collada_export(wmOperatorType *ot)
        0,
        "Matrix",
        "Use <matrix> representation for exported transformations"},
-      {BC_TRANSFORMATION_TYPE_TRANSROTLOC,
-       "transrotloc",
+      {BC_TRANSFORMATION_TYPE_DECOMPOSED,
+       "decomposed",
        0,
-       "TransRotLoc",
-       "Use <translate>, <rotate>, <scale> representation for exported transformations"},
+       "Decomposed",
+       "Use <rotate>, <translate> and <scale> representation for exported transformations"},
       {0, NULL, 0, NULL, NULL}};
 
   static const EnumPropertyItem prop_bc_export_animation_type[] = {