Skip to content

Commit

Permalink
bringing back roof_tiles
Browse files Browse the repository at this point in the history
  • Loading branch information
Vladimir Elistratov committed Jul 19, 2020
1 parent 4d0c1f0 commit 82bbc8f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 35 deletions.
2 changes: 1 addition & 1 deletion __init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
bl_info = {
"name": "blender-osm",
"author": "Vladimir Elistratov <[email protected]>",
"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",
Expand Down
38 changes: 4 additions & 34 deletions pml/PythonCoder.py
Original file line number Diff line number Diff line change
Expand Up @@ -425,57 +425,27 @@ 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):
# # <color> has the form like <fff> 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')
if self.smoothContext and text in ('smooth','flat','horizontal','side','all'):
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 )
Expand Down

0 comments on commit 82bbc8f

Please sign in to comment.