PDA

View Full Version : Errors, same script but different Maya versions (2010, 2011 & 64bit)


aghawa
04-21-2010, 04:33 PM
Hi there, i made a script in Maya 2010 (OSX). Tested also in the trial version of 2011(64Bit, OSX).
It all work ok.
Now i gave the script to a friend of mine, he's on Windows and 2011 32Bit.
The script doesn't work.

Here's the script.
//FerdinandoSuperCustom Script v0.1
global proc FSC()
{
string $edgi[] = `ls -sl`;
select -r $edgi;
$result = `polyToCurve -form 2 -degree 3`;
polyDelEdge -cv true -ch 1 $edgi;
select $result;
DeleteHistory;
$rebuilt = `rebuildCurve -ch 1 -rpo 1 -rt 0 -end 1 -kr 0 -kcp 0 -kep 1 -kt 0 -s 50 -d 3 -tol 0.01`;
select $rebuilt;
arcLengthDimension ($rebuilt[0]+".u[1]");
select $rebuilt;
}

FSC;

If you create a sphere, select an edge loop, and run the script you should end with that edge removed end a curve with an arc length indicator.

Now, FOR ME, it works in 2010, 201164bit in almost every condition.

For what his machines are intended (Win 2011 32bit)
If done on a pre-existing edge loop (ie: create sphere, select edge loop, apply script) it works, but if he uses the cut poly tool, select the new created edgeloop and run the script, OR nothing happens, OR the edgeloop gets destroyed and nothing else, OR it gives an error on the rebuildcurve command, OR it works creating a random curve with the arclength.

It seems strange to me that there is this mismatch of behaviour between my tests and his. The only thing that's different is that he uses the 32bit version of maya, i use 64bit (for 2011). He does not have access to 2010 anyway.

Any suggestions?

GiantG
04-22-2010, 07:08 AM
Works on Windows 7 Ultimate 64Bit Maya 2011 64Bit.
But there seems to be some Errors because sometimes the Lenght is 0

NaughtyNathan
04-22-2010, 08:55 AM
I've just tried it on Maya 2010x32 Windows XP and it doesn't work for me.
I tested it on a default sphere and it runs fine withour errors, it just doesn't produce the right curves. If I select a horizontal edge loop it creates a curve ok, but in the wrong place..? and if I select a vertical edge loop slice it creates a crazy mad curve miles away and hugely distorted...? very odd. I've edited your original code and now it works for me..?

:nathaN

global proc FSC()
{
string $edgi[] = `ls -sl`;
delete -ch `ls -sl -o $edgi`;
string $result[] = `polyToCurve -ch no -form 2 -degree 3`;
polyDelEdge -cv true -ch no $edgi;
string $rebuilt[] = `rebuildCurve -ch no -rpo 1 -rt 0 -end 1 -kr 0 -kcp 0 -kep 1 -kt 0 -s 50 -d 3 -tol 0.01 $result[0]`;
arcLengthDimension ($rebuilt[0]+".u[1]");
select -r $rebuilt;
}

CGTalk Moderation
04-22-2010, 08:55 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.