def _combo_changed(self, index):
     with ticket_ui_context():
         new_publish = self.status.all[index]
         new_path = new_publish['sg_path']
         print '#', self.node, 'to', new_path
         cmds.file(
             new_path,
             loadReference=self.node,
             type='mayaAscii' if new_path.endswith('.ma') else 'mayaBinary',
             options='v=0',
         )
         self.publish = new_publish
         self.path = new_path
         self._updateIcon()
Esempio n. 2
0
 def _combo_changed(self, index):
     with ticket_ui_context():
         new_publish = self.status.all[index]
         new_path = new_publish['sg_path']
         print '#', self.node, 'to', new_path
         cmds.file(
             new_path,
             loadReference=self.node,
             type='mayaAscii' if new_path.endswith('.ma') else 'mayaBinary',
             options='v=0',
         )
         self.publish = new_publish
         self.path = new_path
         self._updateIcon()
 def _do_picker_reference(self, path, namespace):
     with ticket_ui_context():
         print '#', self.node, 'to', path
         cmds.file(
             path,
             loadReference=self.node,
             type='mayaAscii' if path.endswith('.ma') else 'mayaBinary',
             options='v=0',
         )
         self.status = check.check_paths([path])[0]
         # print self.status.used['sg_path']
         # print path
         new_data = self._viewFields()
         for i, v in enumerate(new_data):
             self.setData(i, Qt.DisplayRole, v)
         self._setupGui()
         self.attach_to_tree()
Esempio n. 4
0
 def _do_picker_reference(self, path, namespace):
     with ticket_ui_context():
         print '#', self.node, 'to', path
         cmds.file(
             path,
             loadReference=self.node,
             type='mayaAscii' if path.endswith('.ma') else 'mayaBinary',
             options='v=0',
         )
         self.status = check.check_paths([path])[0]
         # print self.status.used['sg_path']
         # print path
         new_data = self._viewFields()
         for i, v in enumerate(new_data):
             self.setData(i, Qt.DisplayRole, v)
         self._setupGui()
         self.attach_to_tree()
Esempio n. 5
0
    def _do_picker_reference(self, path, namespace):
        with ticket_ui_context():
            print '#', self.node, 'to', path
            cmds.file(
                path,
                loadReference=self.node,
                type='mayaAscii' if path.endswith('.ma') else 'mayaBinary',
                options='v=0',
            )
            self.status = check.check_paths([path])[0]
            self.publish = self.status.used
            new_data = self._viewFields()
            for i, v in enumerate(new_data):
                self.setData(i, Q.DisplayRole, v)

            # This is dangerous to call a second time for some reason.
            # On Mike's home machine, I used to not set self.publish above,
            # which would overwrite the button, and for some reason
            # segfault when the dialog was closed.
            self._setupGui()

            self.attach_to_tree()
Esempio n. 6
0
 def export(self, **kwargs):
     with ticket_ui_context(pass_through=PublishSafetyError):
         return self._export(kwargs)
Esempio n. 7
0
 def export(self, **kwargs):
     with ticket_ui_context(pass_through=PublishSafetyError):
         return self._export(kwargs)