Skip to content

Commit

Permalink
[Arch] typo fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
luzpaz authored and wwmayer committed Jul 11, 2019
1 parent 752e74c commit 0a893e8
Showing 1 changed file with 17 additions and 17 deletions.
34 changes: 17 additions & 17 deletions src/Mod/Arch/OfflineRenderingUtils.py
Expand Up @@ -449,29 +449,29 @@ def viewer(scene=None,background=(1.0,1.0,1.0)):

def save(document,filename=None,guidata=None,colors=None,camera=None):

"""save(document,filename=None,guidata=None,colors=None,camera=None): Saves the current document. If no filename
is given, the filename stored in the document (document.FileName) is used.
You can provide a guidata dictionary, wich can be obtained by the getGuiData() function, and has the form:
"""save(document,filename=None,guidata=None,colors=None,camera=None): Saves the current document. If no filename
is given, the filename stored in the document (document.FileName) is used.
You can provide a guidata dictionary, which can be obtained by the getGuiData() function, and has the form:
{ "objectName" :
{ "propertyName" :
{ "type" : "App::PropertyString",
"value" : "My Value"
}
}
}
The type of the "value" contents depends on the type (int, string, float,tuple...) see inside the FreeCADGuiHandler
class to get an idea.
If guidata is provided, colors and camera attributes are discarded.
Alternatively, a color dictionary of objName:ShapeColorTuple or obj:DiffuseColorList pairs.can be provided,
in that case the objects will keep their colors when opened in the FreeCAD GUI. If given, camera is a string
Alternatively, a color dictionary of objName:ShapeColorTuple or obj:DiffuseColorList pairs.can be provided,
in that case the objects will keep their colors when opened in the FreeCAD GUI. If given, camera is a string
representing a coin camera node."""

if filename:
if filename:
print("Saving as",filename)
document.saveAs(filename)
else:
Expand Down Expand Up @@ -589,9 +589,9 @@ def buildGuiDocumentFromColors(document,colors,camera=None):
def buildGuiDocumentFromGuiData(document,guidata):

"""buildGuiDocumentFromColors(document,guidata): Returns the path to a temporary GuiDocument.xml for the given document.
GuiData is a dictionary, wich can be obtained by the getGuiData() function, and has the form:
GuiData is a dictionary, which can be obtained by the getGuiData() function, and has the form:
{ "objectName" :
{ "propertyName" :
{ "type" : "App::PropertyString",
Expand Down Expand Up @@ -684,7 +684,7 @@ def buildGuiDocumentFromGuiData(document,guidata):
# although the zipfile module has a writestr() function that should allow us to write the
# string above directly to the zip file, I couldn't manage to make it work.. So we rather
# use a temp file here, which works.

#print(guidoc)

tempxml = tempfile.mkstemp(suffix=".xml")[-1]
Expand Down Expand Up @@ -728,11 +728,11 @@ def getViewProviderClass(obj):


def extract(filename,inputpath,outputpath=None):

"""extract(filename,inputpath,outputpath=None): extracts 'inputpath' which is a filename
stored in infile (a FreeCAD or zip file). If outputpath is given, the file is saved as outputpath and
nothing is returned. If not, the contents of the inputfile are returned and nothing is saved."""

zdoc = zipfile.ZipFile(filename)
if zdoc:
if inputpath in zdoc.namelist():
Expand Down

0 comments on commit 0a893e8

Please sign in to comment.