diff options
author | Bastien Montagne <b.mont29@gmail.com> | 2020-02-13 14:56:10 +0300 |
---|---|---|
committer | Bastien Montagne <b.mont29@gmail.com> | 2020-02-13 18:23:42 +0300 |
commit | f28bb6992fa9773fb1e7918d569f4c88427f4c96 (patch) | |
tree | e69240c9ab26ba00bf4ca1f54636e4e837b8f465 /source/blender/editors/render | |
parent | 0d750d7c064bbb1e1fb5fe2ae14a8496863a890b (diff) |
Refactor libquery ID looper callback to take a single parameter.
Using a struct here allows to change given parameters to the callbacks
without having to edit all callbacks functions, which is always noisy
and time consuming.
Diffstat (limited to 'source/blender/editors/render')
-rw-r--r-- | source/blender/editors/render/render_opengl.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/source/blender/editors/render/render_opengl.c b/source/blender/editors/render/render_opengl.c index 26fd9f14c64..a434ecad48d 100644 --- a/source/blender/editors/render/render_opengl.c +++ b/source/blender/editors/render/render_opengl.c @@ -584,20 +584,23 @@ static void gather_frames_to_render_for_grease_pencil(const OGLRender *oglrender } } -static int gather_frames_to_render_for_id(void *user_data_v, ID *id_self, ID **id_p, int cb_flag) +static int gather_frames_to_render_for_id(LibraryIDLinkCallbackData *cb_data) { - if (id_p == NULL || *id_p == NULL) { + ID **id_p = cb_data->id_pointer; + if (*id_p == NULL) { return IDWALK_RET_NOP; } ID *id = *id_p; + ID *id_self = cb_data->id_self; + const int cb_flag = cb_data->cb_flag; if (cb_flag == IDWALK_CB_LOOPBACK || id == id_self) { /* IDs may end up referencing themselves one way or the other, and those * (the id_self ones) have always already been processed. */ return IDWALK_RET_STOP_RECURSION; } - OGLRender *oglrender = user_data_v; + OGLRender *oglrender = cb_data->user_data; /* Whitelist of datablocks to follow pointers into. */ const ID_Type id_type = GS(id->name); |