Skip to content

Commit

Permalink
Added missing graphics method types to creategraphicsmethod
Browse files Browse the repository at this point in the history
  • Loading branch information
Bryce Sampson committed May 25, 2016
1 parent 9d06e08 commit 9404c34
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions Packages/vcs/vcs/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -1629,7 +1629,7 @@ def getgraphicsmethod(type, name):
return copy_mthd


def creategraphicsmethod(gtype, name):
def creategraphicsmethod(gtype, gname='default', name=None):
if gtype in ['isoline', 'Gi']:
func = vcs.createisoline
elif gtype in ['isofill', 'Gfi']:
Expand All @@ -1652,11 +1652,17 @@ def creategraphicsmethod(gtype, name):
func = vcs.createvector
elif gtype in ['taylordiagram', 'Gtd']:
func = vcs.createtaylordiagram
elif isinstance(type, vcsaddons.core.VCSaddon):
func = type.creategm
elif gtype == '3d_scalar':
func = vcs.create3d_scalar
elif gtype == '3d_dual_scalar':
func = vcs.create3d_dual_scalar
elif gtype == '3d_vector':
func = vcs.create3d_vector
elif isinstance(gtype, vcsaddons.core.VCSaddon):
func = gtype.creategm
else:
return None
copy_mthd = func(source=name)
copy_mthd = func(name=name, source=gname)
return copy_mthd


Expand Down

0 comments on commit 9404c34

Please sign in to comment.