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

Comparing ray/src/rt/m_alias.c (file contents):
Revision 2.5 by schorsch, Tue Mar 30 16:13:01 2004 UTC vs.
Revision 2.6 by greg, Wed Jul 12 05:47:05 2006 UTC

# Line 39 | Line 39 | m_alias(                       /* transfer shading to alias target */
39                                          /* else replace alias */
40          if (m->oargs.nsargs != 1)
41                  objerror(m, INTERNAL, "bad # string arguments");
42 <        aobj = lastmod(objndx(m), m->oargs.sarg[0]);
43 <        if (aobj < 0)
44 <                objerror(m, USER, "bad reference");
45 <        aop = objptr(aobj);
42 >        aop = m;
43 >        aobj = objndx(aop);
44 >        do {                            /* follow alias trail */
45 >                if (aop->oargs.nsargs == 1)
46 >                        aobj = lastmod(aobj, aop->oargs.sarg[0]);
47 >                else
48 >                        aobj = aop->omod;
49 >                if (aobj < 0)
50 >                        objerror(aop, USER, "bad reference");
51 >                aop = objptr(aobj);
52 >        } while (aop->otype == MOD_ALIAS);
53 >                                        /* copy struct */
54          arec = *aop;
55                                          /* irradiance hack */
56          if (do_irrad && !(r->crtype & ~(PRIMARY|TRANS)) &&

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines