Ejemplo n.º 1
0
def test_get_devshow():
    a = ShotgunQuery.show_id_by_name(conn, 'dev_show')
    assert 'id' in a
    shotlist = ShotgunQuery.shot_list_with_id(a['id'], conn)
    assert len(shotlist) > 0

    assetList = ShotgunQuery.asset_list_with_id(a['id'], conn)
    assert len(assetList) > 0
Ejemplo n.º 2
0
    def set_show(self, show_name, seq_name=""):
        """Set show: load all the assets and/or shots"""

        if show_name in self.get_show_names():
            showobj = self['Shows'][show_name]
            if showobj.get_sequences().nbOfChildren(
            ) == 0 and self._asset_only == False:
                showobj.init_with_shots(
                    sorted(SQ.shot_list_with_id(showobj.id, self.get_conn()),
                           ShotInfoDb.compare))
            if seq_name != None:
                showobj.set_current_sequence(seq_name)
            else:
                showobj.set_current_sequence("")
            if showobj.get_assets().nbOfChildren(
            ) == 0 and self._shot_only == False:
                showobj.init_with_assets(
                    sorted(SQ.asset_list_with_id(showobj.id, self.get_conn()),
                           AssetInfoDb.compare))
            self._currentshow = show_name
            return True
        return False