mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-05-28 08:26:32 +02:00
[graph] List: multiple children attribute deletion + remove edges if any
This commit is contained in:
parent
0fa23edc82
commit
7d4c006e68
1 changed files with 7 additions and 2 deletions
|
@ -298,8 +298,13 @@ class ListAttribute(Attribute):
|
|||
if self.node.graph:
|
||||
self.node.graph.update()
|
||||
|
||||
def remove(self, index):
|
||||
self._value.removeAt(index)
|
||||
def remove(self, index, count=1):
|
||||
if self.node.graph:
|
||||
for i in range(index, index + count):
|
||||
attr = self[i]
|
||||
if attr.isLink:
|
||||
self.node.graph.removeEdge(attr) # delete edge if the attribute is linked
|
||||
self._value.removeAt(index, count)
|
||||
if self.node.graph:
|
||||
self.node.graph.update()
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue