From 13cc2c0ff93d948ab7167cbc173a149dece2a823 Mon Sep 17 00:00:00 2001 From: Godzil Date: Wed, 11 Mar 2020 16:56:38 +0000 Subject: [PATCH] Add more useful dump info for shapes --- source/shapes/shape.cpp | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/source/shapes/shape.cpp b/source/shapes/shape.cpp index 142243f..6e39a0b 100644 --- a/source/shapes/shape.cpp +++ b/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); + } } \ No newline at end of file