Grasshopper

algorithmic modeling for Rhino

Good day everyone


im trying to assign a color to a value using a function, the problem is than when i try to assifn the result of the function to a, which in this case is a color, i get NONE.

any ideas about this issue.

thanks in advance

Views: 212

Replies to This Discussion

You don't return any value from the function. try something like

def ok(x):

   if p==x: return u

   else: return v

or in a clean 'pythonic' way

def ok(x):

   return u if p==x else v

Thanks Mostapha, your answer was very helpful.

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service