Skip to content

Instantly share code, notes, and snippets.

@freeart
Created June 2, 2020 10:48
Show Gist options
  • Select an option

  • Save freeart/3162f791f1e9083092b37793d67e21e1 to your computer and use it in GitHub Desktop.

Select an option

Save freeart/3162f791f1e9083092b37793d67e21e1 to your computer and use it in GitHub Desktop.
create uvset for unreal 4
string $fileNames[] = sort(`ls -assemblies -v`);
for ($mesh in `ls -typ "transform" -v`)
{
select -r $mesh;
polyUVSet -delete -uvSet "uvSet1" ($mesh + "Shape");
polyAutoProjection -lm 0 -pb 0 -ibd 1 -cm 1 -l 2 -sc 1 -o 1 -p 6 -uvSetName uvSet1 -ps 1 -ws 0;
polyUVSet -currentUVSet -uvSet "uvSet1";
select -r ($mesh + "Shape" + ".f[*]");
unfold -i 5000 -ss 0.001 -gb 0 -gmb 0.5 -pub 0 -ps 0 -oa 2 -us off ($mesh + ".map[*]");
polyCleanupArgList 3 { "0","1","1","0","0","0","0","0","0","1e-05","0","1e-05","0","1e-05","0","1","0" };
u3dLayout -res 256 -scl 1 -spc 0.01953125 -mar 0.009765625 -box 0 1 0 1 ($mesh + "Shape" + ".f[*]");
polyUVSet -luv;
}
select -all -vis;
file -force -options "" -typ "FBX export" -pr -es ("/path/to/folder/" + $fileNames[0] + ".fbx");
file -f -new;
print $fileNames[0];
Import;
@fabb1e
Copy link
Copy Markdown

fabb1e commented May 22, 2022

you are alive?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment