[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gzz-commits] gzz/gfx demo/gldemo.py libpaper/textures.py
From: |
Janne V. Kujala |
Subject: |
[Gzz-commits] gzz/gfx demo/gldemo.py libpaper/textures.py |
Date: |
Wed, 09 Oct 2002 06:32:18 -0400 |
CVSROOT: /cvsroot/gzz
Module name: gzz
Changes by: Janne V. Kujala <address@hidden> 02/10/09 06:32:18
Modified files:
gfx/demo : gldemo.py
gfx/libpaper : textures.py
Log message:
Fix reload; need to reload modules twice
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gfx/demo/gldemo.py.diff?tr1=1.40&tr2=1.41&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/gfx/libpaper/textures.py.diff?tr1=1.19&tr2=1.20&r1=text&r2=text
Patches:
Index: gzz/gfx/demo/gldemo.py
diff -c gzz/gfx/demo/gldemo.py:1.40 gzz/gfx/demo/gldemo.py:1.41
*** gzz/gfx/demo/gldemo.py:1.40 Tue Oct 8 11:12:29 2002
--- gzz/gfx/demo/gldemo.py Wed Oct 9 06:32:17 2002
***************
*** 232,241 ****
# Reload gfx.* modules
mods = sys.modules.keys()
mods.sort()
! for mod in mods:
! if mod[:4] == "gfx." and hasattr(sys.modules[mod], "__file__"):
! print "Reloading", mod
! reload(sys.modules[mod])
try:
exec open(scenefile) in globals(), globals()
--- 232,251 ----
# Reload gfx.* modules
mods = sys.modules.keys()
mods.sort()
!
! # XXX: simply deleting the modules forces a reload,
! # but some modules may want to cache data in globals over reloads
! #for mod in mods:
! # del sys.modules[mod]
!
! # XXX: need to reload twice so that "from foo import bar"
! # in a reloaded module can get the newer version even if
! # foo is later in the list and has not yet been reloaded
! for iter in range(0,2):
! for mod in mods:
! if mod[:4] == "gfx." and hasattr(sys.modules[mod],
"__file__"):
! print "Reloading", mod
! reload(sys.modules[mod])
try:
exec open(scenefile) in globals(), globals()
Index: gzz/gfx/libpaper/textures.py
diff -c gzz/gfx/libpaper/textures.py:1.19 gzz/gfx/libpaper/textures.py:1.20
*** gzz/gfx/libpaper/textures.py:1.19 Tue Oct 8 12:09:54 2002
--- gzz/gfx/libpaper/textures.py Wed Oct 9 06:32:18 2002
***************
*** 79,123 ****
--- 79,132 ----
{"name" : "rgbw1",
"args" : [tres, tres, 0, 3, "RGB", "RGB", "fnoise",
["scale", "2.5", "freq", "1", "df", "2", "bias", "0.5"]],
+ "scale" : 1./8,
},
{"name" : "rgbw2",
"args" : [tres, tres, 0, 3, "RGB", "RGB", "fnoise",
["scale", ".43", "freq", "1", "df", "2", "bias", "0.5",
"seed", "1412"]],
+ "scale" : 1./2,
},
{"name" : "turb",
"args" : [tres, tres, 0, 3, "RGB", "RGB", "fnoise",
["turb", "1", "scale", ".3", "freq", "1",
"freq2", "100", "df", "2", "bias", "0"]],
+ "scale" : 1./8,
},
{"name" : "pyramid",
"args" : [64, 64, 0, 3, "RGB", "RGB", "geometric", ["type", "0"]],
+ "scale" : 1./2,
},
{"name" : "checkerboard",
"args" : [64, 64, 0, 3, "RGB", "RGB", "geometric", ["type", "1"]],
"continuous" : 0,
+ "scale" : 1./64,
},
{"name" : "cone",
"args" : [64, 64, 0, 3, "RGB", "RGB", "geometric", ["type", "2"]],
+ "scale" : 1./2,
},
{"name" : "checkerboard2",
"args" : [64, 64, 0, 3, "RGB", "RGB", "geometric", ["type", "3"]],
"continuous" : 0,
+ "scale" : 1./64,
},
{"name" : "saw",
"args" : [64, 64, 0, 3, "RGB", "RGB", "geometric", ["type", "4"]],
"continuous" : 0,
+ "scale" : 1./64,
},
{"name" : "triangle",
"args" : [64, 64, 0, 3, "RGB", "RGB", "geometric", ["type", "5"]],
+ "scale" : 1./2,
},
])
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gzz-commits] gzz/gfx demo/gldemo.py libpaper/textures.py,
Janne V. Kujala <=