Notifications
Clear all

[Closed] "setVC" problem

Hi,I got some confusing with this

 
 
box name:"box"
Addmodifier $box (Unwrap_UVW name:"ColorBaker" )
 
$box.modifiers[#ColorBaker].setVC true

—–this create a box ,and then add Unwrap_UVW modifier, at last set channel to vertex color channel
the “$box.modifiers[#ColorBaker].setVC true ” doesn’t work in this situation But “$box.modifiers[#ColorBaker].setmapchannel 4 ” work well

Only if “$box” is existed first and then “$box.modifiers[#ColorBaker].setVC true” work fine

i hope i had describe my question clearly, sorry for my poor english

3 Replies

try assigning your object to a variable as you create it


 myBox = box name:"box"
 Addmodifier myBox (Unwrap_UVW name:"ColorBaker" )
  
 myBox.modifiers[#ColorBaker].setVC true

thank you ,Vsai vbmenu_register(“postmenu_5349639”, true);

but it still cant work , maybe it’s a max script bug

I fount it just work when the object is being selected