diff --git a/bodies/fixed_stars/fixed_star.py b/bodies/fixed_stars/fixed_star.py index c60ed07a95baec66404746881ff5a3f249db71f9..a2b6069271d318228d88dc6126c64e9ce9afb492 100644 --- a/bodies/fixed_stars/fixed_star.py +++ b/bodies/fixed_stars/fixed_star.py @@ -65,7 +65,14 @@ class FixedStar(Body): if not os.path.exists(temp_dir): os.mkdir(temp_dir) - save_file = os.path.join(temp_dir, "fixed_star_%s.png" % str(self.__class__.__name__).lower()) + texture_name = os.path.basename(texture). \ + replace(".", "_").replace("/", "_"). \ + replace("\\", "_").replace("__", "_") + + # save_file = os.path.join(temp_dir, "%s_%s.png" % (texture_name, "_".join([str(i) for i in list(self.color)]))) + + save_file = os.path.join(temp_dir, "%s_%s.png" % (texture_name, str(self.__class__.__name__).lower())) + if os.path.exists(save_file): return save_file