Guest User

Untitled

a guest
May 22nd, 2018
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. fn fnmatidassign matidvalue=
  2.     (
  3.         try
  4.         (
  5.             obj =selection[1]          
  6.  
  7.             num_faces = 0
  8.             if classof obj == polymeshobject then
  9.             (
  10.                 polyop.getfaceselection obj
  11.                 num_faces = polyop.getNumFaces obj
  12.                
  13.             )
  14.             else
  15.             (
  16.                 getfaceselection obj
  17.                 num_faces = getNumFaces obj
  18.             )
  19.            
  20.        
  21.             if num_faces > 0 then
  22.                 for f = 1 to num_faces do
  23.                     setFaceMatID obj f matidvalue
  24.  
  25.             update obj
  26.         )
  27.        
  28.         catch
  29.         (
  30.             messagebox "Please select an object that  :\n- Is a collapsed mesh\n- With a  Multi/Sub-Object Material applied "
  31.         )
  32.     )
  33.    
  34.    
  35.     fnmatidassign 20    -- TEST
Add Comment
Please, Sign In to add comment