Try

bpy.context.scene.frame_set()

Operators rely on context so it can get hard to satisfy them (you could also 
try making a timeline window visible). You can override context by paying an 
optional dict to the operator but I've found this tricky to get right in 
practice.
Oh, and welcome to this blender thing,
Bassam

 "Cook, Rich" <[email protected]> wrote:

>Hi,I'mnewtothishereblenderthingie.Iwastryingsomecodeouttoimportafewmeshesfromasciencerun,andamgettinganerrorIcannotgetpast.Iwasgoingtoimportthetimestepsasseparatemeshes,thensetkeyframesonvisibilityforeachmeshatdifferenttimestepsinordertoanimatethem.Perhttp://blenderscripting.blogspot.de/2011/07/scripted-keyframing-of-hide-hide-render.htmlIamgettingthefollowingerror:bpy.ops.anim.change_frame(frame=5)Traceback(mostrecentcalllast):Fileblender_console,line1,inmoduleFile/Volumes/MacProHD/cook47-stuff/Programs/graphics/Blender/blender.app/Contents/MacOS/2.68/scripts/modules/bpy/ops.py,line188,in__call__ret=op_call(self.idname_py(),None,kw)RuntimeError:Operatorbpy.ops.anim.change_frame.poll()Expectedantimeline/animationareatobeactiveIdohaveatimelinevisibleintheGUI.I'mnotsurewhatblenderistryingtotellme.I'mprobablygoingtochangeapproachesandjustloadonemeshatatime,setupthescene,render,andmovetothenext,etc.However,mytechnicalcuriosityhasthebestofmehere.I'dliketounderstandwhyIcannotsetatimestephere.Thanks!<spanclass="Apple-style-span"style="border-collapse:separate;-webkit-border-horizontal-spacing:0px;-webkit-border-vertical-spacing:0px;color:rgb(0,0,0);font-family:Monaco;font-size:13px;font
_______________________________________________
Bf-python mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-python

Reply via email to