[Bf-extensions-cvs] SVN commit: /data/svn/bf-extensions [2784] contrib/py/scripts/addons/ geodesic_domes/third_domes_panel.py: GD_0.GD will be renamed (if possible) to GD_0.GD.bak
Peter K.H. Gragert
pkhgragert at gmail.com
Sat Dec 17 07:46:49 CET 2011
Revision: 2784
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-extensions&revision=2784
Author: pkhg
Date: 2011-12-17 06:46:36 +0000 (Sat, 17 Dec 2011)
Log Message:
-----------
GD_0.GD will be renamed (if possible) to GD_0.GD.bak
maybe more bak filse should be created?
Modified Paths:
--------------
contrib/py/scripts/addons/geodesic_domes/third_domes_panel.py
Modified: contrib/py/scripts/addons/geodesic_domes/third_domes_panel.py
===================================================================
--- contrib/py/scripts/addons/geodesic_domes/third_domes_panel.py 2011-12-16 01:26:11 UTC (rev 2783)
+++ contrib/py/scripts/addons/geodesic_domes/third_domes_panel.py 2011-12-17 06:46:36 UTC (rev 2784)
@@ -92,9 +92,9 @@
# faceimporttoggle = BoolProperty(name="faceimporttoggle", default = False )
face_use_imported_object = BoolProperty(name="Use: Imported Object",\
description = "Activate faces on your Imported object", default = False)
- facewidth = FloatProperty(name="facewidth", min = -1, soft_min = 0.001, max = 4, default = .50)
+ facewidth = FloatProperty(name="facewidth", min = -8, max = 8, default = .50)
fwtog = BoolProperty(name="fwtog", default = False )
- faceheight = FloatProperty(name="faceheight", min = 0.001, max = 4, default = 1 )
+ faceheight = FloatProperty(name="faceheight", min = -8, max = 8, default = 1 )
fhtog = BoolProperty(name="fhtog", default = False )
face_detach = BoolProperty(name="face_detach", default = False )
fmeshname = StringProperty(name="fmeshname", default = "defaultface")
@@ -173,7 +173,7 @@
description = "scale in z direction", default = 1 )
cyxell= FloatProperty(name="Stretch x", min = 0.001, max = 4,\
description = "stretch in x direction", default = 1 )
- cygap= FloatProperty(name="Gap", min = -2, max = 2,\
+ cygap= FloatProperty(name="Gap", min = -2, max = 2, precision = 4,\
description = "shrink in % around radius", default = 1 )
cygphase= FloatProperty(name="Phase", min = -4, max = 4,\
description = "rotate around pivot x/y", default = 0 )
@@ -189,7 +189,7 @@
paxell= FloatProperty(name="Stretch x", min = 0.001, max = 4,\
description = "stretch in x direction", default = 1 )
pagap= FloatProperty(name="Gap", min = -2, max = 2,\
- description = "shrink in % around radius", default = 1 )
+ description = "shrink in % around radius", precision = 4, default = 1 )
pagphase= FloatProperty(name="Phase", min = -4, max = 4,\
description = "rotate around pivot x/y", default = 0 )
#Torus
@@ -205,13 +205,13 @@
description = "number of faces in z direction", default = 1 )
vellipse= FloatProperty(name="Stretch z", min = 0.001, max = 10,\
description = "number of faces in z direction", default = 1 )
- upart= FloatProperty(name="Gap x/y", min = -4, max = 4,\
+ upart= FloatProperty(name="Gap x/y", min = -4, max = 4, precision = 4,\
description = "shrink faces around x/y", default = 1 )
- vpart= FloatProperty(name="Gap z", min = -4, max = 4,\
+ vpart= FloatProperty(name="Gap z", min = -4, max = 4, precision = 4,\
description = "shrink faces in z direction", default = 1 )
- ugap= FloatProperty(name="Phase x/y", min = -4, max = 4,\
+ ugap= FloatProperty(name="Phase x/y", min = -4, max = 4, precision = 4,\
description = "rotate around pivot x/y", default = 0 )
- vgap= FloatProperty(name="Phase z", min = -4, max = 4,\
+ vgap= FloatProperty(name="Phase z", min = -4, max = 4, precision = 4,\
description = "rotate around pivot z", default = 0 )
uphase= FloatProperty(name="uphase", min = -4, max = 4,\
description = "number of faces in z direction", default = 0 )
@@ -237,9 +237,9 @@
description = "number of faces in z direction", default = 8 )
burad= FloatProperty(name="Radius", min = -4, max = 4,\
description = "overall radius", default = 1 )
- bupart= FloatProperty(name="Gap x/y", min = -4, max = 4,\
+ bupart= FloatProperty(name="Gap x/y", min = -4, max = 4, precision = 4,\
description = "shrink faces around x/y", default = 1 )
- bvpart= FloatProperty(name="Gap z", min = -4, max = 4,\
+ bvpart= FloatProperty(name="Gap z", min = -4, max = 4, precision = 4,\
description = "shrink faces in z direction", default = 1 )
buphase= FloatProperty(name="Phase x/y", min = -4, max = 4,
description = "rotate around pivot x/y", default = 0 )
@@ -309,7 +309,7 @@
vb = FloatProperty(name = 'vb', min = 0, soft_min=0.1, soft_max=5,max = 10,\
description = "to do", default = 1)
- uturn = FloatProperty(name = 'uturn', min = 0, soft_min=0.1, soft_max=5,max = 10,\
+ uturn = FloatProperty(name = 'uturn', min = -5, soft_min=0, soft_max=5,max = 10,\
description = "to do", default = 0)
vturn = FloatProperty(name = 'vturn', min = 0, soft_min=0.1, soft_max=5,max = 10,\
description = "to do", default = 0)
@@ -862,7 +862,8 @@
if last_imported_mesh:
faceobject = vefm_259.facetype(last_imported_mesh, facedata,self.facewidth,self.faceheight,self.fwtog)
else:
- message = "***ERROR***\nno imported message available\n" + "last geodesic used"
+ message = "***ERROR***\nno imported message available\n" + "last geodesic used"
+ self.face_use_imported_object = False
context.scene.error_message = message
bpy.ops.object.dialog_operator('INVOKE_DEFAULT')
print("\n***ERROR*** no imported mesh available")
@@ -880,25 +881,32 @@
if self.save_parameters:
self.save_parameters = False
try:
+ message = ""
scriptpath = bpy.utils.script_paths()[0]
sep = os.path.sep
tmpdir = os.path.join(scriptpath,"addons", "geodesic_domes" , "tmp")
-#scriptpath + sep + "addons" + sep + "geodesic_domes" + sep + "tmp"
+#scriptpath + sep + "addons" + sep + "geodesic_domes" + sep + "tmp"
if not os.path.isdir(tmpdir):
- message = "***ERROR***\n" + tmpdir + "\nnot (yet) available"
+ message += "***ERROR***\n" + tmpdir + "\nnot (yet) available\n"
filename = tmpdir + sep + "GD_0.GD"
+ filename_ren = tmpdir + sep + "GD_0.GD.bak"
+ try:
+ os.rename(filename,filename_ren)
+ except:
+ message += "***INFO***\nbak-file could not be created\n"
+ print(message)
# self.read_file(filename)
try:
self.write_params(filename)
- message = "***OK***\nparameters saved in\n" + filename
+ message += "***OK***\nparameters saved in\n" + filename
print(message)
except:
message = "***ERRROR***\n" + "writing " + filename + "\nnot possible"
#bpy.context.scene.instant_filenames = filenames
except:
- message = "***ERROR***\n Contakt PKHG, something wrong happened"
+ message += "***ERROR***\n Contakt PKHG, something wrong happened"
context.scene.error_message = message
bpy.ops.object.dialog_operator('INVOKE_DEFAULT')
More information about the Bf-extensions-cvs
mailing list