dimanche 19 janvier 2020

mardi 14 janvier 2020

Blender code : functions

useful for calling several time the same code
import bpy

def funk1(bla,blu):
    print("function with external references")
    print('sum of it =', bla+blu)

def funk2():
    print('basic function')   

bla=3
blu=5
funk1(bla,blu)

bla=20
blu=30
funk1(bla,blu)

funk2()

Result in the console is:
function with external references
sum of it = 8
function with external references
sum of it = 50
basic function