Advertisement
Guest User

Untitled

a guest
Oct 13th, 2019
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.80 KB | None | 0 0
  1. # Aplica user 0 a todos y Fakea los que comienzan
  2. def borrar_mat_tex_imag(lista, test=True):
  3.     if not test:
  4.  
  5.         for mat in bpy.data.materials:
  6.             mat.user_clear()
  7.             for i in lista:
  8.                 if mat.name.startswith(i):
  9.                     mat.use_fake_user = True
  10.        
  11.         for tex in bpy.data.textures:
  12.             tex.user_clear()
  13.             for i in lista:
  14.                 if tex.name.startswith(i):
  15.                     tex.use_fake_user = True
  16.        
  17.         for img in bpy.data.images:
  18.             img.user_clear()
  19.             for i in lista:
  20.                 if img.name.startswith(i):
  21.                     img.use_fake_user = True
  22.     else:
  23.         print('No hay modo no-test')
  24.  
  25. borrar_mat_tex_imag(['vega', 'env', 'video', 'osd', 'item'], True)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement