SubLink: fix ExposeLinkSub command
This commit is contained in:
parent
503388ead3
commit
c1c8d5b569
|
@ -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]
|
||||
|
|
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue
Block a user