Lightlink increasing file size

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

THREAD CLOSED
 
Thread Tools Search this Thread Display Modes
Old 04 April 2009   #1
Lightlink increasing file size

Hey!

I have a BIG issue with quite simple files that become huge due to multiple referencing or imports. Maya 2008 with sp1 is the version i use. The lighlinker bug is a very old problem that apparently was fixed in maya 5 but strangely enough, it surfaced in my files. I have searched the net for a fix and found 4 working scripts and a compiled tool that kind of fix the problem (files opened, imported, saved and exported in a seccond) BUT they generate another one...NOTHING would render..the light-linking gets completely disconnected.

It wouldn't be a problem to reconnect that by hand BUT when it comes to more files, well, i think some scripting would be very helpful. Here are a few examples of the lighlink nodes that get stored within the files (i saved the file in ASCII format although i use .mb):

connectAttr ":defaultLightSet.msg" "lightLinker1.lnk[13109].llnk";
connectAttr ":hyperGraphLayout.msg" "lightLinker1.lnk[13109].olnk";
connectAttr ":defaultLightSet.msg" "lightLinker1.lnk[13110].llnk";
connectAttr ":hyperGraphLayout.msg" "lightLinker1.lnk[13110].olnk";
connectAttr ":defaultLightSet.msg" "lightLinker1.lnk[13111].llnk";
connectAttr ":hyperGraphLayout.msg" "lightLinker1.lnk[13111].olnk";
connectAttr ":defaultLightSet.msg" "lightLinker1.lnk[13112].llnk";
connectAttr ":hyperGraphLayout.msg" "lightLinker1.lnk[13112].olnk";
connectAttr ":defaultLightSet.msg" "lightLinker1.lnk[13113].llnk";
connectAttr ":hyperGraphLayout.msg" "lightLinker1.lnk[13113].olnk";
connectAttr ":defaultLightSet.msg" "lightLinker1.lnk[13114].llnk";

and the list goes on and on and on (few thousands entryes)


and here are the scripts i have found (for their authors-see the links):
************************************************** **
script 01
http://forums.cgsociety.org/archive...p/t-181747.html
************************************************** *

string $xt_dos[] = `listConnections -s 1 -p 1 defaultObjectSet.message`;
for ( $invalue in $xt_dos ){
disconnectAttr defaultObjectSet.message $invalue;
}
string $xt_dls[] = `listConnections -s 1 -p 1 defaultLightSet.message`;
for ( $invalue in $xt_dls ){
disconnectAttr defaultLightSet.message $invalue;
}
string $xt_isg[] = `listConnections -s 1 -p 1 initialShadingGroup.message`;
for ( $invalue in $xt_isg ){
if($invalue != "initialMaterialInfo.shadingGroup"){
disconnectAttr initialShadingGroup.message $invalue;
}
}
string $xt_ipse[] = `listConnections -s 1 -p 1 initialParticleSE.message`;
for ( $invalue in $xt_ipse ){
disconnectAttr initialParticleSE.message $invalue;
}


script 02:
http://www.3dbuzz.com/vbforum/showthread.php?p=1442506
************************************************** **



string $xt_dos[] = `listConnections -s 1 -p 1 defaultObjectSet.message`;
for ( $invalue in $xt_dos ){

}
string $xt_dls[] = `listConnections -s 1 -p 1 defaultLightSet.message`;
for ( $invalue in $xt_dls ){
}
string $xt_isg[] = `listConnections -s 1 -p 1 initialShadingGroup.message`;
for ( $invalue in $xt_isg ){
if($invalue != "initialMaterialInfo.shadingGroup"){
disconnectAttr initialShadingGroup.message $invalue;
}
}
string $xt_ipse[] = `listConnections -s 1 -p 1 initialParticleSE.message`;
for ( $invalue in $xt_ipse ){
}



script 03:
http://forums.cgsociety.org/archive...p/t-258889.html
*********************************************


global proc cleanUpLightLinker()
{
string $destinations[] = `connectionInfo -dfs hyperGraphLayout.msg`;
string $dst;

print ("\n\n--------- Cleaning up hyperGraphLayout Connections -----------\n");
for ( $dst in $destinations )
{
disconnectAttr hyperGraphLayout.msg $dst;
}
print ("\n\n--------- Cleaning up initialShadingGroup Connections -----------\n");
$destinations = `connectionInfo -dfs initialShadingGroup.msg`;
for ( $dst in $destinations )
{
disconnectAttr initialShadingGroup.msg $dst;
print("Disconnected initialShadingGroup and " + $dst + "\n");
}
print ("\n\n--------- Cleaning up initialParticleSE Connections -----------\n");
$destinations = `connectionInfo -dfs initialParticleSE.msg`;
for ( $dst in $destinations )
{
disconnectAttr initialParticleSE.msg $dst;
print("Disconnected initialParticleSE and " + $dst + "\n");
}

print ("\n\n--------- Cleaning up defaultLightSet Connections -----------\n");
$destinations = `connectionInfo -dfs defaultLightSet.msg`;
for ( $dst in $destinations )
{
disconnectAttr defaultLightSet.msg $dst;
print("Disconnected defaultLightSet and " + $dst + "\n");
}
print ("\n\n--------- Done -----------\n\n");
};



script04:
(can't find the author, sorry)


{
string $destinations[] = `connectionInfo -dfs hyperGraphLayout.msg`;
string $dst;
for ( $dst in $destinations ) {
disconnectAttr hyperGraphLayout.msg $dst;
}
$destinations = `connectionInfo -dfs defaultLightSet.msg`;
for ( $dst in $destinations ) {
disconnectAttr defaultLightSet.msg $dst;
}
}


Any help would be greatly appreciated!

kind regards
gagiu
__________________
I suffer from global awareness.

Last edited by gagiu : 04 April 2009 at 09:59 AM.
 
Old 04 April 2009   #2
im not sure I understand what you want to do. do you want something that reconnects the default light links? or are you planning on modifying one of the scripts to detach the links then reconnect them after something has been exported?
__________________
- elenerville
 
Old 04 April 2009   #3
Maya has an unsupported script that might help remove those extra links:
runTime/scripts/unsupported/cleanUpSpuriousLightLinks.mel

If you have this kind of connection bloat in the child references as well, you might need to run it on those files separately.
 
Old 04 April 2009   #4
Thread automatically closed

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.
 
Thread Closed share thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
CGSociety
Society of Digital Artists
www.cgsociety.org

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump
Miscellaneous

All times are GMT. The time now is 09:01 AM.


Powered by vBulletin
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.