Fix animation player initialization
Updates from 9d30fade3e
weren't applied to the animation player
causing an assert and missing call to IMB_init.
This commit is contained in:
@@ -109,6 +109,7 @@ static bool is_appdir_init = false;
|
|||||||
void BKE_appdir_init(void)
|
void BKE_appdir_init(void)
|
||||||
{
|
{
|
||||||
#ifndef NDEBUG
|
#ifndef NDEBUG
|
||||||
|
BLI_assert(is_appdir_init == false);
|
||||||
is_appdir_init = true;
|
is_appdir_init = true;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
@@ -48,6 +48,7 @@
|
|||||||
# include "BKE_blender_version.h"
|
# include "BKE_blender_version.h"
|
||||||
# include "BKE_context.h"
|
# include "BKE_context.h"
|
||||||
|
|
||||||
|
# include "BKE_appdir.h"
|
||||||
# include "BKE_global.h"
|
# include "BKE_global.h"
|
||||||
# include "BKE_image.h"
|
# include "BKE_image.h"
|
||||||
# include "BKE_lib_id.h"
|
# include "BKE_lib_id.h"
|
||||||
@@ -56,9 +57,7 @@
|
|||||||
# include "BKE_scene.h"
|
# include "BKE_scene.h"
|
||||||
# include "BKE_sound.h"
|
# include "BKE_sound.h"
|
||||||
|
|
||||||
# ifdef WITH_FFMPEG
|
# include "IMB_imbuf.h"
|
||||||
# include "IMB_imbuf.h"
|
|
||||||
# endif
|
|
||||||
|
|
||||||
# ifdef WITH_PYTHON
|
# ifdef WITH_PYTHON
|
||||||
# include "BPY_extern_python.h"
|
# include "BPY_extern_python.h"
|
||||||
@@ -1205,6 +1204,8 @@ static int arg_handle_playback_mode(int argc, const char **argv, void *UNUSED(da
|
|||||||
{
|
{
|
||||||
/* not if -b was given first */
|
/* not if -b was given first */
|
||||||
if (G.background == 0) {
|
if (G.background == 0) {
|
||||||
|
BKE_appdir_init();
|
||||||
|
IMB_init();
|
||||||
# ifdef WITH_FFMPEG
|
# ifdef WITH_FFMPEG
|
||||||
/* Setup FFmpeg with current debug flags. */
|
/* Setup FFmpeg with current debug flags. */
|
||||||
IMB_ffmpeg_init();
|
IMB_ffmpeg_init();
|
||||||
|
Reference in New Issue
Block a user