def poll(cls, context): enabled = (context.space_data.tree_type == BGELogicTree.bl_idname) if enabled and (context.space_data.edit_tree is not None): bge_netlogic._consume_update_tree_code_queue() if not bge_netlogic._tree_code_writer_started: bge_netlogic._tree_code_writer_started = True bpy.ops.bgenetlogic.treecodewriter_operator() return enabled
def modal(self, context, event): if event.type == "TIMER": bge_netlogic._consume_update_tree_code_queue() return {'PASS_THROUGH'}