Ticket #12382: 12382.patch

File 12382.patch, 1.3 KB (added by roed, 9 years ago)
  • sage/plot/plot3d/base.pyx

    # HG changeset patch
    # User David Roe <roed@math.harvard.edu>
    # Date 1327824184 28800
    # Node ID 679fe3f556ec2fcd1605abcb1461b595e827ccc4
    # Parent  3027cde592c4165f1831aad43e357be2a3222b1d
    Sorts texture sets in Graphics3d before creating tachyon and mtl_str.
    
    diff --git a/sage/plot/plot3d/base.pyx b/sage/plot/plot3d/base.pyx
    a b  
    479479            ...
    480480            Texdef texture...
    481481              Ambient 0.333333333333 Diffuse 0.666666666667 Specular 0.0 Opacity 1
    482                Color 1.0 0.0 0.0
     482               Color 1.0 1.0 0.0
    483483               TexFunc 0
    484484            TRI V0 ...
    485485            Sphere center 1.0 -2.0 3.0 Rad 0.5 texture...
     
    521521    %s
    522522
    523523end_scene""" % (render_params.antialiasing,
    524                "\n".join([t.tachyon_str() for t in self.texture_set()]),
     524               "\n".join(sorted([t.tachyon_str() for t in self.texture_set()])),
    525525               "\n".join(flatten_list(self.tachyon_repr(render_params))))
    526526
    527527    def obj(self):
     
    793793            Ns 1
    794794            d 0.500000000000000
    795795        """
    796         return "\n\n".join([t.mtl_str() for t in self.texture_set()]) + "\n"
     796        return "\n\n".join(sorted([t.mtl_str() for t in self.texture_set()])) + "\n"
    797797
    798798    def flatten(self):
    799799        """