Frame_set polutes the console

Hi all,

why does the console spit out “post NUMBER NUMBER”?

I was wondering if this can be turned of, i kinda polutes the console for no reason or does it have a reason?

If you test this code, you get a print of all those frames

import bpy
scn = bpy.context.scene
curr = 0
for curr in range(1,25):
    scn.frame_set(curr)

This is the printout from the console then

post 1 1
post 2 2
post 3 3
post 4 4
post 5 5
post 6 6
post 7 7
post 8 8
post 9 9
post 10 10
post 11 11
post 12 12
post 13 13
post 14 14
post 15 15
post 16 16
post 17 17
post 18 18
post 19 19
post 20 20
post 21 21
post 22 22
post 23 23
post 24 24

Im working on an addon which sets the frame to cache mesh data of that frame. I would like to know if there is a method of not showing this. I doubt there is since this is done internally as it seems.

Is there perhaps a better approach to this?

The print seems to come from an application handler you’ve registered, presumably appended to bpy.app.handlers.frame_change_post().

1 Like

I tried looking but for me default scene also shows it. The issue is on Windows i cant do proper search it doesnt like . in the name.

I doubt its cause by a frame_change_post. I did a search in user addon folder, no results, then tried blender addon folder and get 5 hits. None of these handlers send a print with matches this ie post 10 10

Perhaps on which does pre? Ill try that one as well. Its like finding a needle in a haystack :wink:

EDIT
Nothing for frame_change_pre
So i guess i should go over more handler types right?

I got some options here, i dont know all, but i guess i can filter out a couple of them, they are none-related

'depsgraph_update_post',
'depsgraph_update_pre',
'frame_change_post',
'frame_change_pre',
'load_post',
'load_pre',
'persistent',
'render_post',
'render_pre',
'render_stats',
'render_write'

I doubt its cause by a frame_change_post. I did a search in user addon folder, no results, then tried blender addon folder and get 5 hits. None of these handlers send a print with matches this ie post 10 10

I might be stating the obvious, but presumably the code generates the string based on the current frame (bpy.context.scene.frame_current) or a counter, so searching for “post 10 10” won’t find any results. If you haven’t already I would search for just the “post” string in the user installed add-ons.

In order to limit the output to relevant results you could try to search for print(f"post and print("post.