當前位置: 首頁>>代碼示例>>Python>>正文


Python Project.fps方法代碼示例

本文整理匯總了Python中oyProjectManager.models.project.Project.fps方法的典型用法代碼示例。如果您正苦於以下問題:Python Project.fps方法的具體用法?Python Project.fps怎麽用?Python Project.fps使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在oyProjectManager.models.project.Project的用法示例。


在下文中一共展示了Project.fps方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: test_save_as_sets_the_fps

# 需要導入模塊: from oyProjectManager.models.project import Project [as 別名]
# 或者: from oyProjectManager.models.project.Project import fps [as 別名]
 def test_save_as_sets_the_fps(self):
     """testing if the save_as method sets the fps value correctly
     """
     
     # create two projects with different fps values
     # first create a new scene and save it under the first project
     # and then save it under the other project
     # and check if the fps follows the project values
     
     project1 = Project("FPS_TEST_PROJECT_1")
     project1.fps = 24
     project1.create()
     
     project2 = Project("FPS_TEST_PROJECT_2")
     project2.fps = 30
     project2.save()
     
     # create assets
     asset1 = Asset(project1, "Test Asset 1")
     asset1.save()
     
     asset2 = Asset(project2, "Test Asset 2")
     asset2.save()
     
     # create versions
     version1 = Version(
         version_of=asset1,
         base_name=asset1.code,
         type=self.asset_vtypes[0],
         created_by=self.user1
     )
     
     version2 = Version(
         version_of=asset2,
         base_name=asset2.code,
         type=self.asset_vtypes[0],
         created_by=self.user1
     )
     
     # save the current scene for asset1
     self.mEnv.save_as(version1)
     
     # check the fps value
     self.assertEqual(
         self.mEnv.get_fps(),
         24
     )
     
     # now save it for asset2
     self.mEnv.save_as(version2)
     
     # check the fps value
     self.assertEqual(
         self.mEnv.get_fps(),
         30
     )
開發者ID:dshlai,項目名稱:oyprojectmanager,代碼行數:58,代碼來源:mayaEnv.py

示例2: test_passing_a_Project_instance_will_fill_the_interface_with_the_project

# 需要導入模塊: from oyProjectManager.models.project import Project [as 別名]
# 或者: from oyProjectManager.models.project.Project import fps [as 別名]
    def test_passing_a_Project_instance_will_fill_the_interface_with_the_project(self):
        """testing if passing a Project instance will fill the interface with
        the data coming from the given Project instance
        """
        
        new_client = Client(name='Client Agency 1', code='CA1')
        new_client.save()
        
        new_project = Project("Test Project")
        new_project.client = new_client
        new_project.width = 720
        new_project.height = 576
        new_project.pixel_aspect = 1.067
        new_project.fps = 30
        new_project.active = True

        dialog = project_properties.MainDialog(project=new_project)
       
        # now check if the interface is filled properly
        self.assertEqual(
            dialog.name_lineEdit.text(), new_project.name
        )
        
        self.assertEqual(
            dialog.code_lineEdit.text(), new_project.code
        )

        # preset name
        preset_name = dialog.resolution_comboBox.currentText()

        self.assertEqual(
            conf.resolution_presets[preset_name][0],
            new_project.width
        )

        self.assertEqual(
            conf.resolution_presets[preset_name][1],
            new_project.height
        )

        self.assertEqual(
            conf.resolution_presets[preset_name][2],
            new_project.pixel_aspect
        )

        self.assertEqual(
            dialog.fps_spinBox.value(), new_project.fps
        )

        self.assertEqual(
            dialog.active_checkBox.isChecked(), True
        )
        
        # Advanced settings
        self.assertEqual(
            dialog.shot_number_prefix_lineEdit.text(),
            new_project.shot_number_prefix
        )
        
        self.assertEqual(
            dialog.shot_number_padding_spinBox.value(),
            new_project.shot_number_padding
        )
        
#        self.assertEqual(
#            dialog.revision_number_prefix_lineEdit.text(),
#            new_project.rev_number_prefix
#        )
        
#        self.assertEqual(
#            dialog.revision_number_padding_spinBox.value(),
#            new_project.rev_number_padding
#        )
        
#        self.assertEqual(
#            dialog.version_number_prefix_lineEdit.text(),
#            new_project.ver_number_prefix
#        )
        
#        self.assertEqual(
#            dialog.version_number_padding_spinBox.value(),
#            new_project.ver_number_padding
#        )
        
        self.assertEqual(
            dialog.structure_textEdit.toPlainText(),
            new_project.structure
        )
開發者ID:dshlai,項目名稱:oyprojectmanager,代碼行數:90,代碼來源:test_project_properties.py


注:本文中的oyProjectManager.models.project.Project.fps方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。