Example #1
0
 def init_clips_jsonfile(self):
     global prefs
     in_filepath = str(self.edit_infilepath.text())
     in_jsonfile = util.make_samefname(in_filepath, in_filepath, 'json')
     if not os.path.isfile(in_jsonfile):
         # create an empty json clips file
         open(in_jsonfile, 'w').write('[{"name":"all"}]')
     self.in_jsonfile = in_jsonfile
Example #2
0
 def init_clips_jsonfile(self):
     global prefs
     in_filepath = str(self.edit_infilepath.text())
     in_jsonfile = util.make_samefname(in_filepath, in_filepath, 'json')
     if not os.path.isfile(in_jsonfile):
         # create an empty json clips file
         open(in_jsonfile, 'w').write('[{"name":"all"}]')
     self.in_jsonfile = in_jsonfile
Example #3
0
 def btn_browseinfile_click(self):
     dlg = QFileDialog(self, "Open physics", self.infiledir, \
         "Physx3 files (*.RepX)")
     dlg.setFileMode(QFileDialog.ExistingFile)
     if dlg.exec_():
         files = dlg.selectedFiles()
         self.edit_infilepath.setText(os.path.normpath(str(files[0])))
         self.infiledir = os.path.normpath(str(dlg.directory().path()))
         in_filepath = str(self.edit_infilepath.text())
         out_filepath = str(self.edit_outfilepath.text())
         self.edit_outfilepath.setText(util.make_samefname(out_filepath, in_filepath, "h3dp"))
         self.enum_phxobjects()
Example #4
0
 def btn_browseinfile_click(self):
     dlg = QFileDialog(self, "Open physics", self.infiledir, \
         "Physx3 files (*.RepX)")
     dlg.setFileMode(QFileDialog.ExistingFile)
     if dlg.exec_():
         files = dlg.selectedFiles()
         self.edit_infilepath.setText(os.path.normpath(str(files[0])))
         self.infiledir = os.path.normpath(str(dlg.directory().path()))
         in_filepath = str(self.edit_infilepath.text())
         out_filepath = str(self.edit_outfilepath.text())
         self.edit_outfilepath.setText(
             util.make_samefname(out_filepath, in_filepath, "h3dp"))
         self.enum_phxobjects()
Example #5
0
 def browse_infile_clicked(self, checked):
     global prefs
     dlg = QFileDialog(self, "Open model", self.infile_dir, \
         "Models (*.dae *.obj *.x *.ase *.ms3d *.fbx)")
     dlg.setFileMode(QFileDialog.ExistingFile)
     if dlg.exec_():
         filepath = os.path.normcase(str(dlg.selectedFiles()[0]))
         self.edit_infilepath.setText(filepath)
         self.infile_dir = os.path.abspath(str(dlg.directory().path()))
         self.enum_models()
         # automatically set the name of the output file to the name of the input file
         in_filepath = str(self.edit_infilepath.text())
         out_filepath = str(self.edit_outfilepath.text())
         self.edit_outfilepath.setText(util.make_samefname(out_filepath, in_filepath, "h3dm"))
Example #6
0
 def browse_infile_clicked(self, checked):
     global prefs
     dlg = QFileDialog(self, "Open model", self.infile_dir, \
         "Models (*.dae *.obj *.x *.ase *.ms3d *.fbx)")
     dlg.setFileMode(QFileDialog.ExistingFile)
     if dlg.exec_():
         filepath = os.path.normcase(str(dlg.selectedFiles()[0]))
         self.edit_infilepath.setText(filepath)
         self.infile_dir = os.path.abspath(str(dlg.directory().path()))
         self.enum_models()
         # automatically set the name of the output file to the name of the input file
         in_filepath = str(self.edit_infilepath.text())
         out_filepath = str(self.edit_outfilepath.text())
         self.edit_outfilepath.setText(
             util.make_samefname(out_filepath, in_filepath, "h3dm"))
Example #7
0
    def browse_infile_clicked(self):
        dlg = QFileDialog(self, "Open animation", self.infiledir, \
            "Animation files (*.dae *.obj *.x *.ase *.ms3d)")
        dlg.setFileMode(QFileDialog.ExistingFile)
        if dlg.exec_():
            files = dlg.selectedFiles()
            self.edit_infilepath.setText(os.path.normpath(str(files[0])))
            self.infiledir = os.path.normpath(str(dlg.directory().path()))
            in_filepath = str(self.edit_infilepath.text())
            out_filepath = str(self.edit_outfilepath.text())
            self.edit_outfilepath.setText(util.make_samefname(out_filepath, in_filepath, "h3da"))

            # try to locate clip (json) file in the same directory and same name as input file,
            # if not found, create an empty
            self.init_clips_jsonfile()
Example #8
0
    def browse_infile_clicked(self):
        dlg = QFileDialog(self, "Open animation", self.infiledir, \
            "Animation files (*.dae *.obj *.x *.ase *.ms3d)")
        dlg.setFileMode(QFileDialog.ExistingFile)
        if dlg.exec_():
            files = dlg.selectedFiles()
            self.edit_infilepath.setText(os.path.normpath(str(files[0])))
            self.infiledir = os.path.normpath(str(dlg.directory().path()))
            in_filepath = str(self.edit_infilepath.text())
            out_filepath = str(self.edit_outfilepath.text())
            self.edit_outfilepath.setText(
                util.make_samefname(out_filepath, in_filepath, "h3da"))

            # try to locate clip (json) file in the same directory and same name as input file,
            # if not found, create an empty
            self.init_clips_jsonfile()