Module ImportFrom alias alias alias Import alias Import alias Expr Call AttributeLoad AttributeLoad NameLoad attr attr Num Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str Assign NameStore Str Assign NameStore Str Import alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias Assign NameStore Num Assign NameStore Num Assign NameStore NameLoad Assign NameStore NameLoad Assign NameStore NameLoad Assign NameStore NameLoad Assign NameStore Num FunctionDef arguments args NameParam defaults body Global identifier identifier identifier Expr Call NameLoad Str Expr Call NameLoad BinOpMod Str NameLoad Expr Call NameLoad Str Call NameLoad AttributeLoad NameLoad attr Assign NameStore AttributeLoad NameLoad attr If CompareIs NameLoad NameLoad body Assign NameStore Str orelse If CompareIs NameLoad NameLoad body Assign NameStore Str orelse If CompareIs NameLoad NameLoad body Assign NameStore Str orelse Assign NameStore Str Expr Call NameLoad Str NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Global identifier identifier identifier identifier AugAssignAdd NameStore NameLoad If CompareNotEq NameLoad AttributeLoad NameLoad attr body Assign NameStore AttributeLoad NameLoad attr Expr Call NameLoad NameLoad If BoolOpAnd CompareEq NameLoad Str CompareGt NameLoad Num body Assign NameStore Str Expr Call NameLoad BinOpMod Str TupleLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad Num orelse If BoolOpAnd CompareEq NameLoad Str CompareGt NameLoad Num body Assign NameStore Str Expr Call NameLoad BinOpMod Str TupleLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Call NameLoad SubscriptLoad AttributeLoad NameLoad attr Index Num Num decorator_list ClassDef bases NameLoad body FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr decorator_list decorator_list ClassDef bases NameLoad body FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr decorator_list decorator_list ClassDef bases NameLoad body FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr decorator_list decorator_list Assign NameStore Str Assign NameStore Str ClassDef bases AttributeLoad AttributeLoad NameLoad attr attr body FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr NameLoad decorator_list decorator_list FunctionDef arguments args defaults body Global identifier identifier identifier identifier identifier Expr Call NameLoad NameLoad Expr Call NameLoad Str Expr Call AttributeLoad NameLoad attr keyword NameLoad Assign NameStore Call NameLoad Expr Call AttributeLoad NameLoad attr Call NameLoad Num Num Num Num Assign NameStore Call NameLoad Expr Call AttributeLoad NameLoad attr Call NameLoad Num Num Num Num Assign NameStore Str Expr Call NameLoad BinOpMod Str TupleLoad Num NameLoad Expr Call NameLoad Num Assign NameStore Str Expr Call NameLoad BinOpMod Str TupleLoad Num NameLoad Expr Call AttributeLoad NameLoad attr NameLoad decorator_list If CompareEq NameLoad Str body Expr Call NameLoad
N/A __future__ division print_function unicode_literals N/A sys N/A os N/A N/A N/A N/A sys path insert 0 N/A N/A N/A os path join N/A N/A N/A os path dirname __file__ .. N/A testinfo s, t 2.5, s, t 3, s, t 5, s, t 5.5, dt 0.016, s, q N/A tags transitions with pop, unschedule, schedule, on_enter, on_exit N/A cocos cocos.director director cocos.actions * cocos.layer * cocos.scenes * N/A t0 0.0 N/A time_x 0.0 N/A scene1 None N/A scene2 None N/A scene3 None N/A stage None N/A last_current_scene 123 report N/A N/A t N/A N/A N/A stage scene1 scene2 N/A N/A print 
scene change N/A N/A print N/A time:%4.3f t N/A N/A print len(director.scene_stack): N/A len N/A director scene_stack N/A current_scene N/A director scene N/A N/A current_scene None N/A N/A s_scene None N/A N/A N/A current_scene scene1 N/A N/A s_scene scene1 N/A N/A N/A current_scene scene2 N/A N/A s_scene scene2 N/A N/A s_scene transition scene N/A N/A print current scene: s_scene current_scene N/A sequencer N/A N/A dt N/A N/A N/A time_x t0 stage last_current_scene N/A time_x dt N/A N/A last_current_scene N/A director scene N/A N/A last_current_scene N/A director scene N/A N/A report time_x N/A N/A N/A stage run scene1 N/A time_x 2.0 N/A N/A stage transition to scene2 N/A N/A print N/A 
%4.3f begin %s N/A time_x stage N/A N/A N/A director push N/A FadeTransition scene2 0.5 N/A N/A N/A N/A stage transition to scene2 N/A time_x 5.0 N/A N/A stage transition to the top scene in the stack N/A N/A print N/A 
%4.3f begin %s N/A time_x stage N/A N/A N/A director replace N/A FadeTransitionWithPop N/A N/A director scene_stack N/A 0 0.5 N/A FadeTransitionWithPop N/A FadeTransition N/A finish N/A N/A self N/A N/A N/A N/A N/A director pop N/A N/A ZoomTransitionWithPop N/A ZoomTransition N/A finish N/A N/A self N/A N/A N/A N/A N/A director pop N/A N/A FlipX3DTransitionWithPop N/A FlipX3DTransition N/A finish N/A N/A self N/A N/A N/A N/A N/A director pop N/A N/A N/A TransitionWithPop 
TransitionWithPop recipe

While you can apply any cocos transition scene to the scene changes
director.run
director.replace
director.push

they are not builtin scene transitions to apply when doing director.pop

But is easy to implement in your app with the following recipe:

    1. select one of the stock scene transitions, to be found in
       cocos/scenes/transitions.py, say ZzzTransition

    2. define a subclass
        class ZzzTransitionWithPop(ZzzTransition):
            def finish():
                director.pop()

    3. instead of director.pop(), use
            director.replace( ZzzTransitionWithPop(
                              director.scene_stack[0], <other params>))
       where <other params> are the ones needed in the original transition,
       excluding the 'dst' argument

 N/A description 
    A demo for the recipe TransitionWithPop, which shows how to replace a dry
    director.pop() with a more appealing transition to the same scene.
    There is a short multiline string in the code telling the recipe.

    Along the time you will see :

    around t=0.000 : scene1 shows (screen full green)
    around t=2.000 : begins normal transition to scene2 (director.push(...))
    around t=2.500 : transitions ends, scene2 in full view (screen full violet)
    around t=5.000 : starts transition with pop
    around t=5.500 : transition ends, scene1 in full view (screen full green)

    In the console a report about current scene and director.scene_stack changes
    The final scene should be scene1 and len(director.scene_stack) should be the
    same as before the first transition initiated; that's 0 for cocos rev>1066
     TestScene N/A N/A N/A cocos scene Scene N/A on_enter N/A N/A self N/A N/A N/A N/A N/A N/A super TestScene self on_enter N/A N/A N/A self schedule sequencer N/A on_exit N/A N/A self N/A N/A N/A N/A N/A self unschedule sequencer N/A N/A main N/A N/A N/A N/A N/A t0 scene1 scene2 scene3 stage N/A N/A print description N/A N/A print 
actual timeline: N/A N/A N/A director init resizable True N/A scene1 N/A TestScene N/A N/A N/A scene1 add N/A ColorLayer 80 160 32 255 N/A scene2 N/A TestScene N/A N/A N/A scene2 add N/A ColorLayer 120 32 120 255 N/A stage before director.run N/A N/A print N/A 
%4.3f %s N/A 0.0 stage N/A N/A report 0 N/A stage run scene1 N/A N/A print N/A 
%4.3f begin %s N/A 0.0 stage N/A N/A N/A director run scene1 N/A N/A N/A __name__ __main__ N/A N/A N/A main