Inside Sabertooth
Learn how Sabertooth uses 3ds Max to create 3D interactive projects, including HBO Go’s Game of Thrones interactive experience
  • 1/3
You are here: Forum Home / Autodesk 3ds® Max® / MaxScript / problem in auto unwrap
  RSS 2.0 ATOM  

problem in auto unwrap
Rate this thread
 
63808
 
Permlink of this thread  
avatar
  • Total Posts: 3
  • Joined: 23 January 2012 07:27 PM

hi all
i want to create unwrap script to bake texture
bu i write this code and it dose not work :

fn unwrap obj_toUVW 
 (

 
flattenAngle 45
 flattenSpacing 
0.02
 flattenRotate 
true
 flattenFillHoles 
true

 unwrapMod 
unwrap_UVW()
 
unwrapMod.setAlwaysEdit false
 unwrapMod
.setMapChannel 1
 unwrapMod
.setFlattenAngle flattenAngle 
 unwrapMod
.setFlattenSpacing flattenSpacing 
 unwrapMod
.setFlattenNormalize true
 unwrapMod
.setFlattenRotate flattenRotate 
 unwrapMod
.setFlattenFillHoles flattenFillHoles 
 unwrapMod
.setApplyToWholeObject true
 unwrapMod
.name "Automatic Flatten UVs"
 
unwrapMod.setDebugLevel 0
  
 setAppData unwrapMod 0x41dd73d5 
#object
 
addModifier obj_toUVW unwrapMod
   
 unwrapMod
.flattenMapByMatID flattenAngle flattenSpacing true 2 flattenRotate flattenFillHoles
 
 
)


do i any thing else ? or my object?
thank for your help!!!



Replies: 0