From 82bbc8fb8e4b5067e667c0109546171530c5f10d Mon Sep 17 00:00:00 2001 From: Vladimir Elistratov Date: Sun, 19 Jul 2020 14:27:13 +0300 Subject: [PATCH] bringing back roof_tiles --- __init__.py | 2 +- pml/PythonCoder.py | 38 ++++---------------------------------- 2 files changed, 5 insertions(+), 35 deletions(-) diff --git a/__init__.py b/__init__.py index b8e2e1c2..d0b695b1 100644 --- a/__init__.py +++ b/__init__.py @@ -20,7 +20,7 @@ bl_info = { "name": "blender-osm", "author": "Vladimir Elistratov ", - "version": (2, 4, 19), + "version": (2, 4, 20), "blender": (2, 80, 0), "location": "Right side panel for Blender 2.8x (left side panel for Blender 2.79))> \"osm\" tab", "description": "One click download and import of OpenStreetMap, terrain, satellite imagery, web maps", diff --git a/pml/PythonCoder.py b/pml/PythonCoder.py index f377179e..1ba8b864 100644 --- a/pml/PythonCoder.py +++ b/pml/PythonCoder.py @@ -425,36 +425,6 @@ def enterRGBA(self,rgba): def enterCONST(self,text): text = self.replaceColorsInText(text) - # # is text maybe a color word? - # color_word = self.dictionary.getColor(text) - # if color_word: - # expr = str(color_word) - # if self.alternativesContext or self.conditionalContext: - # self.write(self.alterCommaStack[-1]) - # self.write( self.indent()+"Constant(" + expr + ')' ) - # self.alterCommaStack[-1] = ',\n' - # else: - # self.write('Value(Constant(' + expr + ')' ) - # return - - # # or is it a hex color ? - # if text[0] == '#': - # numCharacters = len(text) - # if numCharacters == 7: - # text = text[1:] - # elif numCharacters in (3,4): - # # has the form like or <#fff> - # text = "".join( 2*letter for letter in (text[-3:] if numCharacters==4 else text) ) - # elif numCharacters != 6: - # raise Exception('Invalid hex number: #'+text) - # expr = str( tuple( c/255. for c in bytes.fromhex("%sff" % text) ) ) - # if self.alternativesContext or self.conditionalContext: - # self.write(self.alterCommaStack[-1]) - # self.write( self.indent()+"Constant(" + expr + ')' ) - # self.alterCommaStack[-1] = ',\n' - # else: - # self.write('Value(Constant(' + expr + ')' ) - # return if self.conditionalContext: self.write(',\n') @@ -462,20 +432,20 @@ def enterCONST(self,text): expr = self.toCamelCase(text) self.write( self.indent()+"Constant(smoothness." + expr + ')' ) else: - expr = self.literalize(text,True) + expr = self.literalize(text,False) self.write( self.indent()+"Constant(" + expr + ')' ) elif self.alternativesContext: self.write(self.alterCommaStack[-1]) - expr = self.literalize(text,True) + expr = self.literalize(text,False) self.write( self.indent()+"Constant(" + expr + ')' ) self.alterCommaStack[-1] = ',\n' else: - expr = self.literalize(text,True) + expr = self.literalize(text,False) self.write('Value(Constant(' + expr + ')' ) def enterNESTED(self, li): li = self.replaceColorsInText(li) - list = self.literalize(li,True) + list = self.literalize(li,False) if self.alternativesContext: self.write(self.alterCommaStack[-1]) self.write( self.indent()+list )