PDA

View Full Version : a problem about saving and impoting file


andekujing
05-03-2009, 08:04 PM
hey guys,I am a chinese boy,First i wanna say Sorry for my poor English

I have a maya(mb) file.when I save it,maya worked like dead . may calculating some wrong thing

even after serval hours,the file can be saved.I almost crazy.

did anyone can help me?!! I need a answer even it was "I have no idear" :cry: :cry: :cry: :cry: :cry: http://bbs.hxsd.com/attachment.php?attachmentid=640582&d=1241339194 http://bbs.hxsd.com/attachment.php?attachmentid=640582&d=1241339194
is the adress of my mb file,you can download it
the adress is from a chinese website,if you can't download,just tell me

andekujing
05-04-2009, 09:03 AM
hey guys,I am a chinese boy,First i wanna say Sorry for my poor English

I have a maya(mb) file.when I save it,maya worked like dead . may calculating some wrong thing

even after serval hours,the file can be saved.I almost crazy.

did anyone can help me?!! I need a answer even it was "I have no idear" :cry: :cry: :cry: :cry: :cry: http://bbs.hxsd.com/attachment.php?attachmentid=640582&d=1241339194 http://bbs.hxsd.com/attachment.php?attachmentid=640582&d=1241339194
is the adress of my mb file,you can download it
the adress is from a chinese website,if you can't download,just tell me
hey guy i check your file find the problem-----there's too mch light link,you can use thie mel to clean it


///////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////
// SCRIPT: kwLightLinksCleanUp.mel
// VERSION: o.9
// AUTHOR: Kurt Wong
// OnFootBuG@hotmail.com
// UPDATE: 2005-9-22 13:19
//
// DESCRIPTION: This handy script removes all the redundant lightlinks in the current scene.
// Inspired by Crow Yeh's 'MerlinOptimize.mel', I implemented it in a different way
// which is more efficient.
//
// MAIN PROC: kwLightLinksCleanUp()
///////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////

global proc kwLightLinksCleanUp()
{
float $startTime = `timerX`;
float $elaspedTime;
int $min;
int $sec;

string $lightLinker[] = `ls -typ lightLinker`;

int $numOfLinker = size($lightLinker);
int $numOfbadLinks = 0;
int $numOfAllLinks = 0;
string $linkedPair[] = {};
print "\nkwLightLinksCleanUp:\n";
print "-------------------------------\n";
for ($i=0; $i<size($lightLinker); $i++) {
progressWindow -t ("Checking '" + $lightLinker[$i] + "' (" + ($i+1) + "/" + $numOfLinker + ") ...") -ii 1 -st ("Querying LightLinks, Plase Wait... ");
if ( `progressWindow -query -isCancelled` ) break;

string $connections[] = `listConnections -c 1 -p 1 -d 0 -s 1 $lightLinker[$i]`;
string $tmpPair = "";
int $numOfcons = size($connections);

if (!$numOfcons) {
print ("- Cleaning Up '" + $lightLinker[$i] + "': No links were found!\n");
progressWindow -ep;
continue;
}
else {
print ("- Cleaning Up '" + $lightLinker[$i] + "', All " + ($numOfcons/2) + " Connections\n");
}

int $progress = 0;
int $percentage = 0;
progressWindow -e -t ("'" + $lightLinker[$i] + "' (" + ($i+1) + "/" + $numOfLinker + ")" + ", " + ($numOfcons/2) + " Connections...") -pr $progress -ii 1 -min 0 -max $numOfcons;

int $j = 0;
while ($j<$numOfcons) {
if ( `progressWindow -query -isCancelled` ) {
warning "User Canceled!\n";
break;
}

$numOfAllLinks ++;

$progress = $j;
$percentage = $progress * 100 / $numOfcons;
progressWindow -e -pr $progress -st ("Processing LightLinks (" + $percentage + "%) ... ");

string $LinkIgnoreLit = match("(link){0,1}(ignore){0,1}\\[[0-9]+\\]", $connections[$j]);
string $LinkIgnoreObj = match("(link){0,1}(ignore){0,1}\\[[0-9]+\\]", $connections[$j+2]);
if ($LinkIgnoreLit == $LinkIgnoreObj) {
// if (size(match("(\\.light){0,1}(\\.lightIgnored){0,1}$", $LinkIgnoreLit))) {
$tmpPair = $connections[$j+1] + ":" + $connections[$j+3];
// }
// else {
// $tmpPair = $connections[$j+3] + ":" + $connections[$j+1];
// }

if (stringArrayCount($tmpPair, $linkedPair)) {
disconnectAttr $connections[$j+1] $connections[$j];
disconnectAttr $connections[$j+3] $connections[$j+2];
$numOfbadLinks ++;
}
else {
$linkedPair[size($linkedPair)] = $connections[$j+1] + ":" + $connections[$j+3];
}

$j += 4;
}
else {
disconnectAttr $connections[$j+1] $connections[$j];
$numOfbadLinks ++;
$j += 2;
}

}

progressWindow -ep;
}

$elaspedTime = `timerX -st $startTime`;
$min = $elaspedTime/60;
$sec = $elaspedTime%60;
print "\nkwLightLinksCleanUp Summary:\n";
print "-------------------------------\n";
print ("- Removed " + $numOfbadLinks + " Redundant Links in All " + $numOfAllLinks + " LightLinks. (Total Elasped Time: " + $min + " Min, " + $sec + " Sec)\n");

}

// end of script

CGTalk Moderation
05-04-2009, 09:03 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.