Ejemplo n.º 1
0
    def rename(self, dst, extension=None):
        """
        Rename the current path to the given destination path.

        :type dst: str
        :type extension: bool or None
        :rtype: None
        """
        extension = extension or self.EXTENSION
        if dst and extension not in dst:
            dst += extension

        src = self.path()

        # Rename the path on the filesystem
        dst = studiolibrary.renamePath(src, dst)

        # Rename the path inside the library database
        if self.library():
            self.library().renamePath(src, dst)

        self._path = dst

        self.syncItemData()

        self.renamed.emit(self, src, dst)
Ejemplo n.º 2
0
    def rename(self, dst, extension=None, force=True):
        """
        Rename the current path to given destination path.

        :type dst: str
        :type force: bool
        :type extension: bool or None
        :rtype: None
        """
        self.resetImageSequence()

        src = self.path()

        extension = extension or self.extension()
        if dst and extension not in dst:
            dst += extension

        dst = studiolibrary.renamePath(src, dst)
        self.setPath(dst)

        if self.database():
            self.database().renamePath(src, dst)

        if self.libraryWidget():
            self.libraryWidget().refreshSelection()

        self.renamed.emit(src, dst)
Ejemplo n.º 3
0
    def rename(self, dst, extension=None):
        """
        Rename the current path to the given destination path.

        :type dst: str
        :type extension: bool or None
        :rtype: None
        """
        extension = extension or self.extension()
        if dst and extension not in dst:
            dst += extension

        src = self.path()

        # Rename the path on the filesystem
        dst = studiolibrary.renamePath(src, dst)

        # Rename the path inside the library database
        if self.library():
            self.library().renamePath(src, dst)

        # Update the data for the item
        self.setPath(dst)
        self.saveItemData()

        self.renamed.emit(self, src, dst)

        if self.libraryWindow():
            self.libraryWindow().refresh()
Ejemplo n.º 4
0
    def rename(self, dst, extension=None):
        """
        Rename the current path to the given destination path.

        :type dst: str
        :type extension: bool or None
        :rtype: None
        """
        extension = extension or self.extension()
        if dst and extension not in dst:
            dst += extension

        src = self.path()

        # Rename the path on the filesystem
        dst = studiolibrary.renamePath(src, dst)

        # Rename the path inside the library database
        if self.library():
            self.library().renamePath(src, dst)

        # Update the data for the item
        self.setPath(dst)
        self.saveItemData()

        self.renamed.emit(self, src, dst)
Ejemplo n.º 5
0
    def rename(self, dst, extension=None, force=True):
        """
        Rename the current path to given destination path.

        :type name: str
        :type force: bool
        :type extension: bool or None
        :rtype: None
        """
        self.resetImageSequence()

        src = self.path()

        extension = extension or self.extension()
        if dst and extension not in dst:
            dst += extension

        path = studiolibrary.renamePath(src, dst)
        self.setPath(path)
Ejemplo n.º 6
0
    def rename(self, dst, extension=None):
        """
        Rename the current path to the given destination path.

        :type dst: str
        :type extension: bool or None
        :rtype: None
        """
        extension = extension or self.extension()
        if dst and extension not in dst:
            dst += extension

        src = self.path()
        dst = studiolibrary.renamePath(src, dst)

        self.setPath(dst)

        if self.library():
            self.library().renamePath(src, dst)

        self.renamed.emit(self, src, dst)