WARNING: Script error: "name 'scene' is not defined"

Discussion about scripting with Python
jobbo
Posts: 36
Joined: Mon Nov 23, 2015 3:40 pm

WARNING: Script error: "name 'scene' is not defined"

Postby jobbo » Fri Apr 01, 2016 11:32 am

Hee guys,

I've got a script running, but some lines should stop ad a given frame. Now I found this example script in the Realflow 2015 documentation, but I get this error:
WARNING: Script error: "name 'scene' is not defined" at line number 1.

This is the example script:
if ( ( scene.currentFrame >= 10 ) and ( scene.currentFrame <= 20 ) ):
scene.message( "Current frame in range is: " + str( scene.currentFrame ) )


What did I do wrong?

Thanks!


Return to “Python-Scripting”

Who is online

Users browsing this forum: No registered users and 2 guests