SubLink: fix ExposeLinkSub command

This commit is contained in:
DeepSOIC 2017-12-13 21:34:08 +03:00
parent 503388ead3
commit c1c8d5b569
2 changed files with 3 additions and 2 deletions

View File

@ -28,12 +28,13 @@ __doc__ = "Tool to expose LinkSub properties of objects, by spawning a SubLink o
from lattice2Common import *
import lattice2SubLink as LSL
import lattice2Executer as Executer
from lattice2Subsequencer import linkSubList_convertToOldStyle
import FreeCAD as App
def ExposeLinkSub(feature, propname):
# read links out into reflist variable
if feature.getTypeIdOfProperty(propname) == 'App::PropertyLinkSubList':
reflist = getattr(feature,propname)
reflist = linkSubList_convertToOldStyle(getattr(feature,propname))
elif feature.getTypeIdOfProperty(propname) == 'App::PropertyLinkSub':
(obj, subnames) = getattr(feature,propname)
reflist = [(obj,subname) for subname in subnames]

View File

@ -184,7 +184,7 @@ class ViewProviderSubLink:
def claimChildren(self):
return []
def CreateSubLink(object, subnames, looping):
def CreateSubLink(object, subnames, looping = 'Single'):
#stabilize links
subnames = list(subnames) #'tuple' object does not support item assignment; SubElementNames of SelectionObject is a tuple
try: