What is Python; I won't be able to learn a new language !

Python is an object oriented scripting language. We have interfaced raytressi and Python, so you could write your scripts in Python, in a friendly script editor. Moreover, you won't have to compile your scripts using VisualC++ if you use Python.

More information about Python : www.python.org

Python language isn't difficult to use because it looks like Java or C++ i.e commonly used languages. Have a look at the examples !

One noticeable thing to say about Python, before you start typing around, is that indentation DOES MATTER !

An example :

#this is a comment
#this comment is not indented
print 'neither is this command'
  #this comment IS INDENTED
  print "and so is this command, so you'll probably get an error from Python !!!"
 

If you are curious, here is how you use indentation in Python (you don't need to know this until you try to do complicated things with raytressi !) :

print 'hello, world'
def myFunction():
    print 'you are in myFunction'
    print 'here too...'
print 'but now declaration of function myFunction is ended !'
myFunction()
# the previous line is a call to the function
# notice that you can't put comments at the end of a line

 

To make a script in Python for Raytressi, you don't have to declare a Raytracer object or a Scene object (although you may...). Indeed, two objects are already declared as your script starts executing :