From c15571263ffa1afa5d07482f8c19f91024907925 Mon Sep 17 00:00:00 2001 From: epoch Date: Tue, 2 Jan 2018 05:59:32 -0600 Subject: made hackvr's export also support colors and added color help to addshape --- src/hackvr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/hackvr.c b/src/hackvr.c index ae7ca8a..5ce9a52 100644 --- a/src/hackvr.c +++ b/src/hackvr.c @@ -145,7 +145,7 @@ int load_stdin() {//this function returns -1 to quit, 0 to not ask for a redraw, fprintf(stderr,"# dump\n"); fprintf(stderr,"# quit\n"); fprintf(stderr,"# set\n"); - fprintf(stderr,"# addshape N x1 y1 z1 ... xN yN zN\n"); + fprintf(stderr,"# addshape color N x1 y1 z1 ... xN yN zN\n"); fprintf(stderr,"# export\n"); fprintf(stderr,"# scaleup x y z\n"); fprintf(stderr,"# move x y z\n"); @@ -335,7 +335,7 @@ int load_stdin() {//this function returns -1 to quit, 0 to not ask for a redraw, if(len > 2) { for(i=0;global.shape[i];i++) {//require a[2], if not it'll segfault. derrrr, epoch. if(a[2][0]=='*' || !strcmp(global.shape[i]->id,a[2])) { - printf("%s_%s addshape %d",id,a[2],global.shape[i]->len); + printf("%s_%s addshape %d %d",id,a[2],global.shape[i]->attrib.col,global.shape[i]->len); for(j=0;j < global.shape[i]->len+(global.shape[i]->len==1);j++) { printf(" %f %f %f",global.shape[i]->p[j].x,global.shape[i]->p[j].y,global.shape[i]->p[j].z); }//possible TODO: should I combine the string and output it all at once instead of throughout a loop? -- cgit v1.2.3