Skip to content

Commit 7152d0c

Browse files
committed
Merge pull request #1991 from sampsonbryce/utils_creategraphicsmethod_new_methods
Added missing graphics method types to creategraphicsmethod
2 parents 9d06e08 + 9404c34 commit 7152d0c

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

Packages/vcs/vcs/utils.py

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1629,7 +1629,7 @@ def getgraphicsmethod(type, name):
16291629
return copy_mthd
16301630

16311631

1632-
def creategraphicsmethod(gtype, name):
1632+
def creategraphicsmethod(gtype, gname='default', name=None):
16331633
if gtype in ['isoline', 'Gi']:
16341634
func = vcs.createisoline
16351635
elif gtype in ['isofill', 'Gfi']:
@@ -1652,11 +1652,17 @@ def creategraphicsmethod(gtype, name):
16521652
func = vcs.createvector
16531653
elif gtype in ['taylordiagram', 'Gtd']:
16541654
func = vcs.createtaylordiagram
1655-
elif isinstance(type, vcsaddons.core.VCSaddon):
1656-
func = type.creategm
1655+
elif gtype == '3d_scalar':
1656+
func = vcs.create3d_scalar
1657+
elif gtype == '3d_dual_scalar':
1658+
func = vcs.create3d_dual_scalar
1659+
elif gtype == '3d_vector':
1660+
func = vcs.create3d_vector
1661+
elif isinstance(gtype, vcsaddons.core.VCSaddon):
1662+
func = gtype.creategm
16571663
else:
16581664
return None
1659-
copy_mthd = func(source=name)
1665+
copy_mthd = func(name=name, source=gname)
16601666
return copy_mthd
16611667

16621668

0 commit comments

Comments
 (0)