Beispiel #1
0
 def mirrorTables(self):
     """
     @rtype:
     """
     return studiolibrary.findPaths(self.path(),
                                    ".mirror",
                                    direction=studiolibrary.Direction.Up)
    def selectionSets(self):
        """
        :rtype: list[studiolibrary.Record]
        """
        paths = studiolibrary.findPaths(self.record().path(), ".set")
        records = []

        for path in paths:
            record = selectionsetplugin.Record(path)
            records.append(record)

        return records
    def selectionSets(self):
        """
        :rtype: list[studiolibrary.Record]
        """
        paths = studiolibrary.findPaths(self.record().path(), ".set")
        records = []

        for path in paths:
            record = selectionsetplugin.Record(path)
            records.append(record)

        return records
Beispiel #4
0
    def mirrorTablePaths(self):
        """
        Return all the mirror table paths for this record.

        :rtype: list[str]
        """
        paths = list(studiolibrary.findPaths(
                self.path(),
                match=lambda path: path.endswith(".mirror"),
                direction=studiolibrary.Direction.Up
            )
        )
        return paths
Beispiel #5
0
 def findRecords(self, path, search=None, direction=studiolibrary.Direction.Down):
     """
     :type path: str
     :type search: str
     :type direction: studiolibrary.Direction
     :rtype: studiolibrary.Records
     """
     records = []
     paths = studiolibrary.findPaths(path, search=search, direction=direction)
     for path in paths:
         record = self.recordFromPath(path)
         if record:
             records.append(record)
     return records
Beispiel #6
0
    def loadRecords(self, path, direction=studiolibrary.Direction.Down, depth=3):
        """
        Load the records for the given path by walking the tree.

        :type path: str
        :type direction: studiolibrary.Direction
        :rtype: list[studiolibrary.Record]
        """
        match = lambda path: self.pluginFromPath(path)

        paths = studiolibrary.findPaths(
            path,
            match=match,
            ignore=[".studioLibrary"],
            direction=direction,
            depth=depth
        )

        return self.recordsFromPaths(paths)
Beispiel #7
0
 def findRecords(self,
                 path,
                 search=None,
                 direction=studiolibrary.Direction.Down):
     """
     :type path: str
     :type search: str
     :type direction: studiolibrary.Direction
     :rtype: studiolibrary.Records
     """
     records = []
     paths = studiolibrary.findPaths(path,
                                     search=search,
                                     direction=direction)
     for path in paths:
         record = self.recordFromPath(path)
         if record:
             records.append(record)
     return records
Beispiel #8
0
    def selectionSets(self):
        """
        :rtype: list[studiolibrary.Record]
        """
        path = self.record().path()
        match = lambda path: path.endswith(".set")

        paths = studiolibrary.findPaths(
            path,
            match=match,
            direction=studiolibrary.Direction.Up,
        )

        paths = list(paths)
        records = []

        for path in paths:
            record = selectionsetplugin.Record(path)
            records.append(record)

        return records
Beispiel #9
0
    def selectionSets(self):
        """
        :rtype: list[setsitem.SetsItem]
        """
        path = self.item().path()
        match = lambda path: path.endswith(".set")

        paths = studiolibrary.findPaths(
            path,
            match=match,
            direction=studiolibrary.Direction.Up,
            depth=10,
        )

        paths = list(paths)
        items = []

        for path in paths:
            item = setsitem.SetsItem(path)
            items.append(item)

        return items
Beispiel #10
0
def findItems(path, direction=studiolibrary.Direction.Down, depth=3):
    """
    Find the items by walking the given path.

    :type path: str
    :type direction: studiolibrary.Direction or str
    :rtype: collections.Iterable[studiolibrary.LibraryItem]
    """
    match = lambda path: itemFromPath(path)

    ignore = [
        ".studiolibrary",
        ".studioLibrary",
    ]

    paths = studiolibrary.findPaths(path,
                                    match=match,
                                    ignore=ignore,
                                    direction=direction,
                                    depth=depth)

    return itemsFromPaths(paths)
Beispiel #11
0
def findItems(path, direction=studiolibrary.Direction.Down, depth=3):
    """
    Find and create new item instances by walking the given path.

    :type path: str
    :type direction: studiolibrary.Direction or str
    :type depth: int
    
    :rtype: collections.Iterable[studiolibrary.LibraryItem]
    """
    ignore = [
        ".studiolibrary",
        ".studioLibrary",
    ]

    paths = studiolibrary.findPaths(
        path,
        match=itemFromPath,
        ignore=ignore,
        direction=direction,
        depth=depth
    )

    return itemsFromPaths(paths)
 def mirrorTables(self):
     """
     :rtype: str
     """
     return studiolibrary.findPaths(self.path(), ".mirror", direction=studiolibrary.Direction.Up)