ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/util/ranimove.c
(Generate patch)

Comparing ray/src/util/ranimove.c (file contents):
Revision 3.11 by schorsch, Fri Mar 26 23:34:23 2004 UTC vs.
Revision 3.14 by greg, Wed Nov 3 05:05:21 2010 UTC

# Line 1 | Line 1
1   #ifndef lint
2 < static const char RCSid[] = "$Id";
2 > static const char RCSid[] = "$Id$";
3   #endif
4   /*
5   *  Radiance object animation program
# Line 188 | Line 188 | eputs(                         /* put string to stderr */
188   }
189  
190  
191 + void
192 + quit(ec)                        /* make sure exit is called */
193 + int     ec;
194 + {
195 +        if (ray_pnprocs > 0)    /* close children if any */
196 +                ray_pclose(0);          
197 +        exit(ec);
198 + }
199 +
200 +
201   static void
202   setdefaults(void)                       /* set default values */
203   {
# Line 604 | Line 614 | getoctspec(                    /* get octree for the given frame */
614   )
615   {
616          static char     combuf[1024];
617 <        int             cfm = 0;
617 >        static int      cfm = 0;
618          int     uses_inline;
619          FILE    *fp;
620          int     i;
621                                          /* is octree static? */
622          if (!vdef(MOVE))
623                  return(vval(OCTREEF));
624 <                                        /* done already */
624 >                                        /* done already? */
625          if (n == cfm)
626                  return(combuf);
627                                          /* else create object file */
628 <        strcpy(objtmpf, "movinobj.rad");
619 <        fp = fopen(objtmpf, "w");
628 >        fp = fopen(mktemp(strcpy(objtmpf, TEMPLATE)), "w");
629          if (fp == NULL) {
630                  sprintf(errmsg, "cannot write to moving objects file '%s'",
631                                  objtmpf);
# Line 647 | Line 656 | getoctspec(                    /* get octree for the given frame */
656                                  vdef(OCONV) ? vval(OCONV) : "",
657                                  vval(OCTREEF), objtmpf);
658          else
659 <                sprintf(combuf, "!xform -f %s | oconv -f -i '%s' -",
660 <                                objtmpf, vval(OCTREEF));
659 >                sprintf(combuf, "!xform -f %s | oconv %s -f -i '%s' -",
660 >                                objtmpf, vdef(OCONV) ? vval(OCONV) : "",
661 >                                vval(OCTREEF));
662          return(combuf);
663   }
664  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines