[Bf-python] Problems : link to scene, some tests

jms jmsoler at free.fr
Sun Aug 17 23:10:07 CEST 2003


Hi,

strange results on win98 with a  script linked to scene in
framechangd mode  on 100 frames (see the coma at the
end of the second line):

#--------------------------------------------------------------------------- 
 import Blender
 print Blender.Get('curframe'),
#---------------------------------------------------------------------------

Results:

 > Using a clean Global Dictionary.
 > 1 1 1 1 1 1 1 1 1 1 3 3 3 3 4 4 4 4 5 5 5 6 6 6 6 7 7 7 28 28 29 29 29
 > 29 30 30
 > 30 30 32 32 32 32 33 33 33 34 34 34 34 35 35 35 36 36 36 36 36 37 37 37
 > 39 39 39
 >  39 39 40 40 40 40 41 41 41 42 42 42 42 43 43 43 43 44 44 44 45 45 45 45
 > 45 47 4
 > 7 47 48 48 48 48 49 49 49 50 50 50 51 51 51 51 52 52 52 52 54 1
 >
 >

#---------------------------------------------------------------------------
 import Blender
 print Blender.Get('curframe')
#---------------------------------------------------------------------------

Results:

 > 1
 > 1
 > 1
 > 1
 > 3
 > 4
 > 5
 > 6
 > 6
 > 7
 > 8
 > 9
 > 11
 > 12
 > 13
 > 14
 > 14
 > 15
 > 16
 > 18
 > 19
 > 20
 > 1
 > 8
 >

 
tested  too:
 
#---------------------------------------------------------------------------
 import Blender
 print Blender.Scene.getCurrent().frameSettings()
#---------------------------------------------------------------------------

Result
    Blender crash...
 
Also tested:

#---------------------------------------------------------------------------
 import Blender
 print Blender.Scene.getCurrent().currentFrame()
#---------------------------------------------------------------------------

Results:
 >
 > 1
 > 1
 > 1
 > 1
 > 3
 > 3
 > 4
 > 5
 > 6
 > 7
 > 8
 > 9
 > 9
 > 11
 > 12
 > 13
 > 14
 > 15
 > 16
 > 18
 > 18
 > 19
 > 20
 > 8
 >

and :

#--------------------------------------------------------------------------- 
 import Blender
 print Blender.Scene.getCurrent().currentFrame(),
#---------------------------------------------------------------------------
 
Results:

 >
 > 8 7 7 7 8 8 8 8 8 10 10 10 10 10 11 11 11 12 12 12 12 35 1 1 1 1 1 1 1 1
 > 1 1 3 3
 >  4 4 4 4 5 5 5 5 6 6 6 6 7 7 7 7 8 8 8 9 9 9 9 11 11 11 11 12 13 14 15
 > 16 16 18
 > 19 20 1 1 1 1 1 1 3 4 5 6 8
 
 
 To see, without  link:


#---------------------------------------------------------------------------
 import Blender
 for n in range(20):
     Blender.Scene.getCurrent().currentFrame(n)
     print Blender.Scene.getCurrent().currentFrame(),
#---------------------------------------------------------------------------

Results:
 
 > Using a clean Global Dictionary.
 >
 >  19 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
 >

#---------------------------------------------------------------------------
 import Blender
 for n in range(20):
     print Blender.Scene.getCurrent().currentFrame(),
     Blender.Scene.getCurrent().currentFrame(n)
#---------------------------------------------------------------------------

Results:

 > Using a clean Global Dictionary.
 >  19 19 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
 >
 >

#---------------------------------------------------------------------------
 import Blender
 for n in range(20):
     Blender.Set('curframe',n+1)
     print Blender.Get('curframe')
#---------------------------------------------------------------------------

Results:
 
 > Using a clean Global Dictionary.
 > 1
 > 2
 > 3
 > 4
 > 5
 > 6
 > 7
 > 8
 > 9
 > 10
 > 11
 > 12
 > 13
 > 14
 > 15
 > 16
 > 17
 > 18
 > 19
 > 20
 >

With regards.
jms.





More information about the Bf-python mailing list