Advertisement
gr4ph0s

Example of redshift API

Oct 16th, 2017
1,920
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 5.82 KB | None | 0 0
  1. import c4d
  2. import zlib, base64
  3. exec(zlib.decompress(base64.b64decode('eJy9G2tzIkfuu3/FLF8WcoT1a727riMVG7y7VIztMthXqVyKtKENc54HNzPY5n79Sa1WP2YAY+dyqVroltRqtR7dknDCeJ5mRTA+nOyENISvnSJbHu8EGpDJST4L74sd+TyW8wIQc5HnO+MIPoOeohnKvJBZvVjOZQPwo+/iUZ5KmXREFMlJ+6uIcgngjkiIniE/KyaxLGbpZCeYyHugmcnxA1HVx1HehH8XIlZsg/A+gGmrxB4xIGSxyBJCm20AQScJ8Cyt+zCZjOJ0sohkndkizl/UHmYL6bDUUzq8Pu9ZlqWZ4sv8g9GI1DUaebzXMS9xX8c+mGdhUmzLXGvVctcApdjRGLRFDJo/iGwKnz88POGAdZukxVr90k6ObWrsFrWGYxkji2uUfDEH53A9Ba3aaBmRSuKgtkFulwUdhFyuLwvRF0U9vfuXHBco/EU6kZ00SrM2+HHrFqBpVt9tfW7utg7xH3CEBSfZeBa2a+qrAJpFJqIaYrKOyNo1+LgSoGwFKr6LEGD4SfNeMhbJRLZrepCPJZN25b1YREW7BmOZhZppcRpJoMssWAMIO5iJSfqkkIWkiUY8hEm7hp96Dh5QwL70rWGDAQAWd4NFdi/GcjBGJsDY6mcon1/WzxdU0NHBR/jc3f0MSoJVJ5egofguhNNdjsfRIg9TFAQwHRH3xRz1FMsMDDDX4EX2KECXIKIZEuYiDXOAXg/UgGDXIp4jCL8JMoBRhGqCMa7Vc0L+I0S++Pk1g23dE94UYZS/fMaDwy9wvI97h809OOBNcbqI58oQ7ZoZqt0IRVA63I1ygpOiQOc47PIkvFsoO8AC8SAJp0YKdtMlIeCMN7nMuqIQCqCQnTTJC5GAqxzuwn97e/u7Ct4N83kEhmzXeBSTd1mUltnFu7J/zWSeyKhd0wMj/lWaoyx6GBZkTsJdgy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3oJRivTHHWiXNhp8411X6W55i5e+hb3hxkKPz54WvF0Sz0P9XaumqbSelK1YxNT8i/bk7qkU+BYj/AjvnNJ4=')))
  4. # RedshifftWrapper 1.1 (https://github.com/liftoff/pyminifier)
  5.  
  6. def main():
  7.     rs = Redshift()
  8.     if rs is False: return
  9.     mat = doc.GetFirstMaterial()
  10.  
  11.     #Loop trought all materials
  12.     while mat:
  13.         if rs.IsRedshiftMaterial(mat):
  14.             rs.SetMat(mat)
  15.  
  16.             #Get all node and assign color
  17.             listNode = rs.GetAllNodes()
  18.             for node in listNode:
  19.                 node.SetColor()
  20.  
  21.         mat = mat.GetNext()
  22.    
  23.     c4d.EventAdd()
  24.    
  25. if __name__=='__main__':
  26.     main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement