[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [24608] trunk/blender/release/scripts/ modules/rna_prop_ui.py: fix for error editing a string property with quotes
Campbell Barton
ideasman42 at gmail.com
Tue Nov 17 14:18:26 CET 2009
Revision: 24608
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=24608
Author: campbellbarton
Date: 2009-11-17 14:18:26 +0100 (Tue, 17 Nov 2009)
Log Message:
-----------
fix for error editing a string property with quotes
Modified Paths:
--------------
trunk/blender/release/scripts/modules/rna_prop_ui.py
Modified: trunk/blender/release/scripts/modules/rna_prop_ui.py
===================================================================
--- trunk/blender/release/scripts/modules/rna_prop_ui.py 2009-11-17 12:59:55 UTC (rev 24607)
+++ trunk/blender/release/scripts/modules/rna_prop_ui.py 2009-11-17 13:18:26 UTC (rev 24608)
@@ -76,10 +76,7 @@
val_draw = val = val.convert_to_pyobject()
val_draw = str(val_draw)
else:
- if type(val)==str:
- val_draw = '"' + val + '"'
- else:
- val_draw = val
+ val_draw = val
box = row.box()
@@ -170,9 +167,12 @@
try:
value = eval(global_value)
except:
- value = '"' + global_value + '"' # keep as a string
+ value = global_value
+ if type(value) == str:
+ value = '"' + value + '"'
+
# First remove
exec_str = "del context.%s['%s']" % (global_path, self.property)
# print(exec_str)
More information about the Bf-blender-cvs
mailing list