diff options
Diffstat (limited to 'source/blender/python/intern/bpy_app.c')
-rw-r--r-- | source/blender/python/intern/bpy_app.c | 193 |
1 files changed, 85 insertions, 108 deletions
diff --git a/source/blender/python/intern/bpy_app.c b/source/blender/python/intern/bpy_app.c index cbd57b28242..043b31007f1 100644 --- a/source/blender/python/intern/bpy_app.c +++ b/source/blender/python/intern/bpy_app.c @@ -81,49 +81,46 @@ extern char build_system[]; static PyTypeObject BlenderAppType; static PyStructSequence_Field app_info_fields[] = { - {(char *)"version", (char *)"The Blender version as a tuple of 3 numbers. eg. (2, 50, 11)"}, - {(char *)"version_string", (char *)"The Blender version formatted as a string"}, - {(char *)"version_char", (char *)"The Blender version character (for minor releases)"}, - {(char *)"version_cycle", (char *)"The release status of this build alpha/beta/rc/release"}, - {(char *)"binary_path", - (char *)"The location of Blender's executable, useful for utilities that open new instances"}, - {(char *)"background", - (char *)"Boolean, True when blender is running without a user interface (started with -b)"}, - {(char *)"factory_startup", - (char *)"Boolean, True when blender is running with --factory-startup)"}, + {"version", "The Blender version as a tuple of 3 numbers. eg. (2, 50, 11)"}, + {"version_string", "The Blender version formatted as a string"}, + {"version_char", "The Blender version character (for minor releases)"}, + {"version_cycle", "The release status of this build alpha/beta/rc/release"}, + {"binary_path", + "The location of Blender's executable, useful for utilities that open new instances"}, + {"background", + "Boolean, True when blender is running without a user interface (started with -b)"}, + {"factory_startup", "Boolean, True when blender is running with --factory-startup)"}, /* buildinfo */ - {(char *)"build_date", (char *)"The date this blender instance was built"}, - {(char *)"build_time", (char *)"The time this blender instance was built"}, - {(char *)"build_commit_timestamp", - (char *)"The unix timestamp of commit this blender instance was built"}, - {(char *)"build_commit_date", (char *)"The date of commit this blender instance was built"}, - {(char *)"build_commit_time", (char *)"The time of commit this blender instance was built"}, - {(char *)"build_hash", (char *)"The commit hash this blender instance was built with"}, - {(char *)"build_branch", (char *)"The branch this blender instance was built from"}, - {(char *)"build_platform", (char *)"The platform this blender instance was built for"}, - {(char *)"build_type", (char *)"The type of build (Release, Debug)"}, - {(char *)"build_cflags", (char *)"C compiler flags"}, - {(char *)"build_cxxflags", (char *)"C++ compiler flags"}, - {(char *)"build_linkflags", (char *)"Binary linking flags"}, - {(char *)"build_system", (char *)"Build system used"}, + {"build_date", "The date this blender instance was built"}, + {"build_time", "The time this blender instance was built"}, + {"build_commit_timestamp", "The unix timestamp of commit this blender instance was built"}, + {"build_commit_date", "The date of commit this blender instance was built"}, + {"build_commit_time", "The time of commit this blender instance was built"}, + {"build_hash", "The commit hash this blender instance was built with"}, + {"build_branch", "The branch this blender instance was built from"}, + {"build_platform", "The platform this blender instance was built for"}, + {"build_type", "The type of build (Release, Debug)"}, + {"build_cflags", "C compiler flags"}, + {"build_cxxflags", "C++ compiler flags"}, + {"build_linkflags", "Binary linking flags"}, + {"build_system", "Build system used"}, /* submodules */ - {(char *)"alembic", (char *)"Alembic library information backend"}, - {(char *)"ffmpeg", (char *)"FFmpeg library information backend"}, - {(char *)"ocio", (char *)"OpenColorIO library information backend"}, - {(char *)"oiio", (char *)"OpenImageIO library information backend"}, - {(char *)"opensubdiv", (char *)"OpenSubdiv library information backend"}, - {(char *)"openvdb", (char *)"OpenVDB library information backend"}, - {(char *)"sdl", (char *)"SDL library information backend"}, - {(char *)"build_options", - (char *)"A set containing most important enabled optional build features"}, - {(char *)"handlers", (char *)"Application handler callbacks"}, - {(char *)"translations", (char *)"Application and addons internationalization API"}, + {"alembic", "Alembic library information backend"}, + {"ffmpeg", "FFmpeg library information backend"}, + {"ocio", "OpenColorIO library information backend"}, + {"oiio", "OpenImageIO library information backend"}, + {"opensubdiv", "OpenSubdiv library information backend"}, + {"openvdb", "OpenVDB library information backend"}, + {"sdl", "SDL library information backend"}, + {"build_options", "A set containing most important enabled optional build features"}, + {"handlers", "Application handler callbacks"}, + {"translations", "Application and addons internationalization API"}, /* Modules (not struct sequence). */ - {(char *)"icons", (char *)"Manage custom icons"}, - {(char *)"timers", (char *)"Manage timers"}, + {"icons", "Manage custom icons"}, + {"timers", "Manage timers"}, {NULL}, }; @@ -141,9 +138,9 @@ PyDoc_STRVAR(bpy_app_doc, " bpy.app.translations.rst\n"); static PyStructSequence_Desc app_info_desc = { - (char *)"bpy.app", /* name */ - bpy_app_doc, /* doc */ - app_info_fields, /* fields */ + "bpy.app", /* name */ + bpy_app_doc, /* doc */ + app_info_fields, /* fields */ ARRAY_SIZE(app_info_fields) - 1, }; @@ -416,145 +413,125 @@ static int bpy_app_use_override_library_set(PyObject *UNUSED(self), } static PyGetSetDef bpy_app_getsets[] = { - {(char *)"debug", + {"debug", bpy_app_debug_get, bpy_app_debug_set, bpy_app_debug_doc, (void *)G_DEBUG}, + {"debug_ffmpeg", bpy_app_debug_get, bpy_app_debug_set, - (char *)bpy_app_debug_doc, - (void *)G_DEBUG}, - {(char *)"debug_ffmpeg", - bpy_app_debug_get, - bpy_app_debug_set, - (char *)bpy_app_debug_doc, + bpy_app_debug_doc, (void *)G_DEBUG_FFMPEG}, - {(char *)"debug_freestyle", + {"debug_freestyle", bpy_app_debug_get, bpy_app_debug_set, - (char *)bpy_app_debug_doc, + bpy_app_debug_doc, (void *)G_DEBUG_FREESTYLE}, - {(char *)"debug_python", + {"debug_python", bpy_app_debug_get, bpy_app_debug_set, - (char *)bpy_app_debug_doc, + bpy_app_debug_doc, (void *)G_DEBUG_PYTHON}, - {(char *)"debug_events", + {"debug_events", bpy_app_debug_get, bpy_app_debug_set, - (char *)bpy_app_debug_doc, + bpy_app_debug_doc, (void *)G_DEBUG_EVENTS}, - {(char *)"debug_handlers", + {"debug_handlers", bpy_app_debug_get, bpy_app_debug_set, - (char *)bpy_app_debug_doc, + bpy_app_debug_doc, (void *)G_DEBUG_HANDLERS}, - {(char *)"debug_wm", - bpy_app_debug_get, - bpy_app_debug_set, - (char *)bpy_app_debug_doc, - (void *)G_DEBUG_WM}, - {(char *)"debug_depsgraph", + {"debug_wm", bpy_app_debug_get, bpy_app_debug_set, bpy_app_debug_doc, (void *)G_DEBUG_WM}, + {"debug_depsgraph", bpy_app_debug_get, bpy_app_debug_set, - (char *)bpy_app_debug_doc, + bpy_app_debug_doc, (void *)G_DEBUG_DEPSGRAPH}, - {(char *)"debug_depsgraph_build", + {"debug_depsgraph_build", bpy_app_debug_get, bpy_app_debug_set, - (char *)bpy_app_debug_doc, + bpy_app_debug_doc, (void *)G_DEBUG_DEPSGRAPH_BUILD}, - {(char *)"debug_depsgraph_eval", + {"debug_depsgraph_eval", bpy_app_debug_get, bpy_app_debug_set, - (char *)bpy_app_debug_doc, + bpy_app_debug_doc, (void *)G_DEBUG_DEPSGRAPH_EVAL}, - {(char *)"debug_depsgraph_tag", + {"debug_depsgraph_tag", bpy_app_debug_get, bpy_app_debug_set, - (char *)bpy_app_debug_doc, + bpy_app_debug_doc, (void *)G_DEBUG_DEPSGRAPH_TAG}, - {(char *)"debug_depsgraph_time", + {"debug_depsgraph_time", bpy_app_debug_get, bpy_app_debug_set, - (char *)bpy_app_debug_doc, + bpy_app_debug_doc, (void *)G_DEBUG_DEPSGRAPH_TIME}, - {(char *)"debug_depsgraph_pretty", + {"debug_depsgraph_pretty", bpy_app_debug_get, bpy_app_debug_set, - (char *)bpy_app_debug_doc, + bpy_app_debug_doc, (void *)G_DEBUG_DEPSGRAPH_PRETTY}, - {(char *)"debug_simdata", + {"debug_simdata", bpy_app_debug_get, bpy_app_debug_set, - (char *)bpy_app_debug_doc, + bpy_app_debug_doc, (void *)G_DEBUG_SIMDATA}, - {(char *)"debug_gpumem", + {"debug_gpumem", bpy_app_debug_get, bpy_app_debug_set, - (char *)bpy_app_debug_doc, + bpy_app_debug_doc, (void *)G_DEBUG_GPU_MEM}, - {(char *)"debug_io", - bpy_app_debug_get, - bpy_app_debug_set, - (char *)bpy_app_debug_doc, - (void *)G_DEBUG_IO}, + {"debug_io", bpy_app_debug_get, bpy_app_debug_set, bpy_app_debug_doc, (void *)G_DEBUG_IO}, - {(char *)"use_override_library", + {"use_override_library", bpy_app_use_override_library_get, bpy_app_use_override_library_set, - (char *)bpy_app_use_override_library_doc, + bpy_app_use_override_library_doc, NULL}, - {(char *)"use_event_simulate", + {"use_event_simulate", bpy_app_global_flag_get, bpy_app_global_flag_set__only_disable, - (char *)bpy_app_global_flag_doc, + bpy_app_global_flag_doc, (void *)G_FLAG_EVENT_SIMULATE}, - {(char *)"use_userpref_skip_save_on_exit", + {"use_userpref_skip_save_on_exit", bpy_app_global_flag_get, bpy_app_global_flag_set, - (char *)bpy_app_global_flag_doc, + bpy_app_global_flag_doc, (void *)G_FLAG_USERPREF_NO_SAVE_ON_EXIT}, - {(char *)"binary_path_python", + {"binary_path_python", bpy_app_binary_path_python_get, NULL, - (char *)bpy_app_binary_path_python_doc, + bpy_app_binary_path_python_doc, NULL}, - {(char *)"debug_value", + {"debug_value", bpy_app_debug_value_get, bpy_app_debug_value_set, - (char *)bpy_app_debug_value_doc, - NULL}, - {(char *)"tempdir", bpy_app_tempdir_get, NULL, (char *)bpy_app_tempdir_doc, NULL}, - {(char *)"driver_namespace", - bpy_app_driver_dict_get, - NULL, - (char *)bpy_app_driver_dict_doc, + bpy_app_debug_value_doc, NULL}, + {"tempdir", bpy_app_tempdir_get, NULL, bpy_app_tempdir_doc, NULL}, + {"driver_namespace", bpy_app_driver_dict_get, NULL, bpy_app_driver_dict_doc, NULL}, - {(char *)"render_icon_size", + {"render_icon_size", bpy_app_preview_render_size_get, NULL, - (char *)bpy_app_preview_render_size_doc, + bpy_app_preview_render_size_doc, (void *)ICON_SIZE_ICON}, - {(char *)"render_preview_size", + {"render_preview_size", bpy_app_preview_render_size_get, NULL, - (char *)bpy_app_preview_render_size_doc, + bpy_app_preview_render_size_doc, (void *)ICON_SIZE_PREVIEW}, /* security */ - {(char *)"autoexec_fail", - bpy_app_global_flag_get, - NULL, - NULL, - (void *)G_FLAG_SCRIPT_AUTOEXEC_FAIL}, - {(char *)"autoexec_fail_quiet", + {"autoexec_fail", bpy_app_global_flag_get, NULL, NULL, (void *)G_FLAG_SCRIPT_AUTOEXEC_FAIL}, + {"autoexec_fail_quiet", bpy_app_global_flag_get, NULL, NULL, (void *)G_FLAG_SCRIPT_AUTOEXEC_FAIL_QUIET}, - {(char *)"autoexec_fail_message", bpy_app_autoexec_fail_message_get, NULL, NULL, NULL}, + {"autoexec_fail_message", bpy_app_autoexec_fail_message_get, NULL, NULL, NULL}, {NULL, NULL, NULL, NULL, NULL}, }; |