- Wed Aug 12, 2015 10:44 am
#387662
Thanks Jeremy for implementing a feature to control the Maxwell Sea time via command line.
We've written a script to export an animation with bongo and Maxwell Sea, if somebody ever needs that ...
We've written a script to export an animation with bongo and Maxwell Sea, if somebody ever needs that ...
Code: Select all
Option Explicit
Sub Maxwell_SeaStudy()
Dim Maxwell
Dim x
Dim y
Dim framerate
Dim frames
framerate = 25
frames = 50
' create the ScriptObject
Set Maxwell = CreateObject("Maxwell.Script.ScriptObject")
' successfully created?
If Maxwell Is Nothing Then
Rhino.Print("Unable to create Maxwell.Script.ScriptObject.")
Exit Sub
End If
' successfully connected?
If Not Maxwell.IsConnected Then
Rhino.Print("Unable to connect to the current Maxwell scene.")
Exit Sub
End If
Maxwell.Rendering.BeginAnimation()
x = 0
' loop
While x < frames
' Bongo Tick
Rhino.Command "_BongoSetCurrentTick " & x, False
' Maxwell Sea Time
y = x / framerate
Rhino.Command "Maxwell_SetMaxwellSeaReferenceTime " & y, False
Call Rhino.Sleep(0)
' increment
x = x + 1
' write frame to disk
Maxwell.Rendering.RenderToMxs()
Wend
' done
'Maxwell.Rendering.EndAnimation()
End Sub
Maxwell_SeaStudy
nightnurse images, Zürich
http://www.nightnurse.ch
http://www.nightnurse.ch