Browse Source

Add more useful dump info for shapes

Godzil 4 years ago
parent
commit
13cc2c0ff9
1 changed files with 13 additions and 3 deletions
  1. 13 3
      source/shapes/shape.cpp

+ 13 - 3
source/shapes/shape.cpp

@@ -104,7 +104,17 @@ void Shape::dumpMe(FILE *fp)
         fprintf(fp, "},\n");
     }
     fprintf(fp, "\"DropShadow\": %d,\n", this->dropShadow);
-    fprintf(fp, "\"BoundingBox\": {\n");
-    this->getBounds().dumpMe(fp);
-    fprintf(fp, "},\n");
+    fprintf(fp, "\"Locked\": %d,\n", this->locked);
+    fprintf(fp, "\"MaterialSet\": %d,\n", this->materialSet);
+    if (this->haveFiniteBounds())
+    {
+        fprintf(fp, "\"BoundingBox\": {\n");
+        this->getBounds().dumpMe(fp);
+        fprintf(fp, "},\n");
+    }
+    fprintf(fp, "\"id\": %p,\n", this);
+    if (this->parent)
+    {
+        fprintf(fp, "\"parentId\": %p,\n", this->parent);
+    }
 }