def __init__(self, data=None, trafo=None, duplicate=None): RectangularObject.__init__(self, trafo, duplicate=duplicate) GraphicsObject.__init__(self, duplicate=duplicate) if duplicate is not None: data = duplicate.data self.data = data data.AddUser(self)
def __init__(self, objects=None, duplicate=None): GraphicsObject.__init__(self, duplicate=duplicate) if duplicate is not None: objects = [] for obj in duplicate.objects: objects.append(obj.Duplicate()) self.objects = objects elif objects: self.objects = objects else: self.objects = [] self.changing_children = 0 self.set_parent()
def __init__(self, objects = None, duplicate = None): GraphicsObject.__init__(self, duplicate = duplicate) if duplicate is not None: objects = [] for obj in duplicate.objects: objects.append(obj.Duplicate()) self.objects = objects elif objects: self.objects = objects else: self.objects = [] self.changing_children = 0 self.set_parent()
def SetParent(self, parent): if parent is self.parent: return GraphicsObject.SetParent(self, parent) if parent is not None: self.set_parent() else: self.unset_parent()
def __init__(self, data = None, trafo = None, duplicate = None): RectangularObject.__init__(self, trafo, duplicate = duplicate) GraphicsObject.__init__(self, duplicate = duplicate) if duplicate is not None: data = duplicate.data self.data = data
def SelectionInfo(self, child=None): info = GraphicsObject.SelectionInfo(self) if info and child is not None: path = info[0] return (path + (_sketch.IdIndex(self.objects, child), ), child) return info
def Destroy(self): self.destroy_objects() GraphicsObject.Destroy(self)
def SetDocument(self, doc): for obj in self.objects: obj.SetDocument(doc) GraphicsObject.SetDocument(self, doc) self.set_parent()