setTitle('View Shot'); $display->setNavElement('navShots'); //$display->setHead(' // '); $display->setHead(''); $display->addNavSubElement('Back to Browsing Shots'); if ( !isset( $_GET['shotName'] ) ) { $display->add('Error: shotName parameter not set.'); $display->printHtml(); exit; } $shotName = $_GET['shotName']; $parent = substr( $shotName, 0, strrpos( $shotName, '/' ) ); try { $shotInfo = $shell->decode($shell->exec('hget attrs -web -name ' . $shotName)); } catch (Exception $e) { $display->add($e->getMessage()); $display->printHtml(); exit; } /* $js = ''); // Show additional thumbnails $sql = 'SELECT * FROM `asset_previews` WHERE `asset_type` = \'shot\' AND `asset_id` = ' . $shot_id . ' ORDER BY `preview_id` ASC'; $result =& $db->query($sql); if ($result->numRows() > 0) { $display->add('
'); while ($preview =& $result->fetchRow()) { if ( file_exists( '/net/anim/public_html/' . $_SESSION['show_name'] . '/images/' . $preview['filename'] ) ) { $extension = strrchr($preview['filename'], '.'); $imgsize = getimagesize(realpath(AM_STILL_PATH) . '/' . $preview['filename']); $stillPath = AM_STILL_PATH . $preview['filename']; // thumbnails of tiffs are stored as jpegs to decrease load time if ($extension == '.tif') { $thumbPath = str_replace('.tif','.jpg',$preview['filename']); } elseif ($extension == '.tiff') { $thumbPath = str_replace('.tiff','.jpg',$preview['filename']); } else { $thumbPath = $preview['filename']; } $thumbPath = AM_THUMB_PATH . $thumbPath; $thumbSize = getimagesize(realpath($thumbPath)); $display->add(' '); $js .= 'var curPreview = new Array(); curPreview[\'previewId\'] = ' . $preview['preview_id'] . '; curPreview[\'thumbPath\'] = \'' . $thumbPath . '\'; curPreview[\'stillPath\'] = \'' . $stillPath . '\'; curPreview[\'width\'] = \'' . $imgsize[0] . '\'; curPreview[\'height\'] = \'' . $imgsize[1] . '\'; curPreview[\'extension\'] = \'' . $extension . '\'; assetPreviews.push( curPreview );'; } else { $display->add('
Unable to find thumb
'); } } $display->add('
'); } $display->add(''); // second column $display->add(''); // row - jobs div. will be updated live and filled in by a js function $display->add(''); $js .= 'getJobs();'; // row - task tree $display->add(''); // second col, second row - shot info $display->add(''); if ($user->can('admin')) { $display->add(''); } $shot['shotinfo'] = array( array( 'title' => 'Shot Name', 'field' => 'name' ), array( 'title' => 'Sequence', 'field' => 'seq_name' ), array( 'title' => 'Shot Type', 'field' => 'shot_type' ), array( 'title' => 'Description', 'field' => 'description' ) ); $display->add(''); // second col, third row - render info $shot['renderinfo'] = array( array( 'title' => 'Active File', 'field' => 'active_file' ), array( 'title' => 'Comp File', 'field' => 'comp_file' ), array( 'title' => 'Maya Extras', 'field' => 'maya_extras' ), array( 'title' => 'Start Frame', 'field' => 'start_frame' ), array( 'title' => 'End Frame', 'field' => 'end_frame' ) ); $display->add(''); // check for dirs in this shot's renders folder, build rendered elements display $renderRoot = '/net/anim/' . $_SESSION['show_name'] . '/renders/' . $shot['seq_name'] . '/' . $shot['name']; $js .= 'renderRoot = \'' . $renderRoot . '\';'; if ( file_exists( $renderRoot ) ) { $folderList = array(); $output = array(); $display->add(''); exec( '/net/anim/global/wc/scripts/helga.tclsh helgaFolderList ' . $renderRoot, $output ); foreach ($output as $folder) { if ( $folder ) { $folderList[] = $folder; } } if ( count( $folderList ) > 0 ) { $display->add(''); // rendered elements browser $display->add(''); } else { $display->add(''); } } else { $display->add(''); } // collate window $display->add(''); // close the col's table, close the main table $display->add('
Display last jobs
'); $sql = 'SELECT * FROM `tasks` t, `assignment_categories` ac WHERE t.`assignment_id` = ' . $shot['assignment_id'] . ' AND t.`category_id` = ac.`category_id`'; $result = $db->query( $sql ); if ( $result->numRows() > 0 ) { $taskArray = array(); while ( $row = $result->fetchRow() ) { $taskArray[] = $row; } $html = parseTaskTree( $taskArray, $shot['shot_id'], 0 ); $display->add($html); } else { $display->add('No task tree has been defined for this shot.'); } $display->add('
'); $display->add('
'); foreach ($shot['shotinfo'] as $shotinfo) { $display->add(''); } $display->add('
' . $shotinfo['title'] . ':
' . manEscapeToHtmlTagsPhp($shot[$shotinfo['field']]) . '
'); // edit shot info div - starts out hidden $display->add(''); $display->add('
'); if ( $user->can('crew') ) { $display->add(''); $display->add(''); $display->add(''); $display->add('
add(' style="display: none;"'); } $display->add('>Render Shot
add(' style="display: none;"'); } $display->add('>Comp Shot
'); } $display->add('
'); foreach ($shot['renderinfo'] as $renderinfo) { $display->add(''); } $display->add('
' . $renderinfo['title'] . ':
' . stripslashes(htmlspecialchars($shot[$renderinfo['field']])) . '
'); // edit render info div, starts out hidden $display->add(''); $display->add('
'); $display->add(''); $display->add('
'); $display->add('
Rendered elements found.
No rendered elements found.
The render directory for this shot does not exist.
'); // Comment-Form Settings and Inclusion $commentAssetType = "shot"; $commentAssetId = $shot_id; $commentAssignmentId = $shot['assignment_id']; $commentShowId = $_SESSION['show_id']; include("commentForm.php"); // hover window $display->addExt(''); $display->addExt(''); $display->addExt(''); $js .= ''; $display->add($js); $display->printHtml(); ?>