<div>OMG!!! Finally!!</div><div>Thanks ^ 100000000</div><div>+1 internets to you Brecht</div><div><br></div><div>This has enabled me to save my tile variations for my tiled game engine...</div><div><br clear="all">John Villar<br>

Cell: (058)(416)926.86.45<br>
<br><br><div class="gmail_quote">2012/1/27 Brecht Van Lommel <span dir="ltr"><<a href="mailto:brechtvanlommel@pandora.be">brechtvanlommel@pandora.be</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

Hi,<br>
<br>
I think Sergey might have actually fixed this issue in latest svn, you<br>
could try using a build from here:<br>
<a href="http://builder.blender.org/" target="_blank">http://builder.blender.org/</a><br>
<br>
This scripts works for me now, while it didn't in the 2.61 release:<br>
<br>
import bpy<br>
<br>
act_ob = bpy.context.active_object<br>
act_scene = bpy.context.scene<br>
<br>
for scene in bpy.data.scenes:<br>
    bpy.context.screen.scene = scene<br>
    for ob in scene.objects:<br>
        scene.objects.active = ob<br>
        if ob.type == 'MESH':<br>
            bpy.ops.object.mode_set(mode='EDIT')<br>
            bpy.ops.mesh.quads_convert_to_tris()<br>
            bpy.ops.object.mode_set(mode='OBJECT')<br>
<br>
bpy.context.screen.scene = act_scene<br>
act_scene.objects.active = act_ob<br>
<div><div class="h5"><br>
On Fri, Jan 27, 2012 at 4:54 PM, John Villar<br>
<<a href="mailto:johnvillarzavatti@gmail.com">johnvillarzavatti@gmail.com</a>> wrote:<br>
> Hello, everyone, i'm currently working on my own format's exporter, and have<br>
> been stumbling upon the same block for some months now (i asked here about<br>
> this some time ago but no response worked correctly).<br>
><br>
> My current exporter can succesfully export Single-scened files, multi-scene<br>
> files are a real problem, because i cannot enter edit mode of my<br>
> "non-current" scenes.<br>
><br>
> Namely, i iterate over each scene like this:<br>
><br>
>>>     arr_tmp = []<br>
>>><br>
>>>     for sce in bpy.data.scenes:<br>
>>><br>
>>>         bpy.context.screen.scene = sce<br>
>>><br>
>>><br>
>>>         if bpy.ops.screen.frame_jump.poll():<br>
>>><br>
>>>             bpy.ops.screen.frame_jump()<br>
>>><br>
>>>             arr_tmp.append(export_scene_json(sce, export_binary))<br>
>>><br>
>>>         else:<br>
>>><br>
>>>             raise Exception("Couldn't poll frame_jump")<br>
><br>
><br>
> And it works flawlessly, but then, inside "export_scene_json" when i iterate<br>
> over the objects an triangulate them, it cannot set the edit mode of the<br>
> objects because it cannot poll "bpy.ops.object.mode_set".<br>
><br>
> I suppose this is because it is the second scene and blender hasn't set the<br>
> current scene yet when i try to mode_set the objects.<br>
><br>
> Is there a way i can solve this? Does blender have a function like "wait for<br>
> the new scene to be settled" or something?<br>
><br>
> I'm pulling out my hair here so please, bear with me :(<br>
><br>
> John Villar<br>
> Cell: (058)(416)926.86.45<br>
><br>
</div></div>> _______________________________________________<br>
> Bf-python mailing list<br>
> <a href="mailto:Bf-python@blender.org">Bf-python@blender.org</a><br>
> <a href="http://lists.blender.org/mailman/listinfo/bf-python" target="_blank">http://lists.blender.org/mailman/listinfo/bf-python</a><br>
><br>
_______________________________________________<br>
Bf-python mailing list<br>
<a href="mailto:Bf-python@blender.org">Bf-python@blender.org</a><br>
<a href="http://lists.blender.org/mailman/listinfo/bf-python" target="_blank">http://lists.blender.org/mailman/listinfo/bf-python</a><br>
</blockquote></div><br></div>