예제 #1
0
    def renameCollectionNode(self):
        col = lib_state.get_active_collection()
        if col is None:
            LOG.warning('No active collection to rename. Skipping rename.')
            return
        node_name = col.get_node()
        title = 'Rename Collection node'
        msg = 'Enter new node name'
        new_name = lib_maya_utils.prompt_for_new_node_name(
            title, msg, node_name)
        if new_name is not None:
            lib_col.rename_collection(col, new_name)

        self.updateDynamicWindowTitle()
        self.updateStatusWithSolveResult()
        self.updateCollectionModel()
        self.updateObjectToggleButtons()
        self.updateObjectColumnVisibility()
        self.updateObjectModel()
        self.updateAttributeToggleButtons()
        self.updateAttributeColumnVisibility()
        self.updateAttributeModel()
        self.updateSolverModel()
        self.updateSolveValidState()
        return
    def renameActiveNode(self):
        """
        Dialog prompt the user to rename the currently active node.
        """
        col = lib_state.get_active_collection()
        if col is None:
            LOG.warning('No active collection to rename. Skipping rename.')
            return
        node_name = col.get_node()
        title = 'Rename Collection node'
        msg = 'Enter new node name'
        new_name = lib_maya_utils.prompt_for_new_node_name(title, msg, node_name)
        if new_name is not None:
            lib_col.rename_collection(col, new_name)

        self.itemChanged.emit()
        self.nameChanged.emit()
        return
예제 #3
0
    def renameCollectionNode(self):
        col = lib_state.get_active_collection()
        if col is None:
            LOG.warning('No active collection to rename. Skipping rename.')
            return
        node_name = col.get_node()
        title = 'Rename Collection node'
        msg = 'Enter new node name'
        new_name = lib_maya_utils.prompt_for_new_node_name(title, msg, node_name)
        if new_name is not None:
            lib_col.rename_collection(col, new_name)

        self.updateDynamicWindowTitle()
        self.updateCollectionModel()
        self.updateObjectModel()
        self.updateAttributeModel()
        self.updateSolverModel()
        self.updateSolveValidState()

        self.setStatusLine(const.STATUS_READY)
        return