Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/python/intern')
-rw-r--r--source/blender/python/intern/bpy_app.c193
-rw-r--r--source/blender/python/intern/bpy_app_alembic.c12
-rw-r--r--source/blender/python/intern/bpy_app_build_options.c70
-rw-r--r--source/blender/python/intern/bpy_app_ffmpeg.c12
-rw-r--r--source/blender/python/intern/bpy_app_handlers.c55
-rw-r--r--source/blender/python/intern/bpy_app_ocio.c11
-rw-r--r--source/blender/python/intern/bpy_app_oiio.c14
-rw-r--r--source/blender/python/intern/bpy_app_opensubdiv.c13
-rw-r--r--source/blender/python/intern/bpy_app_openvdb.c12
-rw-r--r--source/blender/python/intern/bpy_app_sdl.c20
-rw-r--r--source/blender/python/intern/bpy_app_translations.c24
-rw-r--r--source/blender/python/intern/bpy_rna.c20
-rw-r--r--source/blender/python/intern/bpy_utils_units.c12
13 files changed, 214 insertions, 254 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},
};
diff --git a/source/blender/python/intern/bpy_app_alembic.c b/source/blender/python/intern/bpy_app_alembic.c
index 6032e062d09..c02bb546553 100644
--- a/source/blender/python/intern/bpy_app_alembic.c
+++ b/source/blender/python/intern/bpy_app_alembic.c
@@ -35,16 +35,16 @@
static PyTypeObject BlenderAppABCType;
static PyStructSequence_Field app_alembic_info_fields[] = {
- {(char *)"supported", (char *)"Boolean, True when Blender is built with Alembic support"},
- {(char *)"version", (char *)"The Alembic version as a tuple of 3 numbers"},
- {(char *)"version_string", (char *)"The Alembic version formatted as a string"},
+ {"supported", "Boolean, True when Blender is built with Alembic support"},
+ {"version", "The Alembic version as a tuple of 3 numbers"},
+ {"version_string", "The Alembic version formatted as a string"},
{NULL},
};
static PyStructSequence_Desc app_alembic_info_desc = {
- (char *)"bpy.app.alembic", /* name */
- (char *)"This module contains information about Alembic blender is linked against", /* doc */
- app_alembic_info_fields, /* fields */
+ "bpy.app.alembic", /* name */
+ "This module contains information about Alembic blender is linked against", /* doc */
+ app_alembic_info_fields, /* fields */
ARRAY_SIZE(app_alembic_info_fields) - 1,
};
diff --git a/source/blender/python/intern/bpy_app_build_options.c b/source/blender/python/intern/bpy_app_build_options.c
index 7d2645e7776..39fcfa8b7bf 100644
--- a/source/blender/python/intern/bpy_app_build_options.c
+++ b/source/blender/python/intern/bpy_app_build_options.c
@@ -28,45 +28,45 @@ static PyTypeObject BlenderAppBuildOptionsType;
static PyStructSequence_Field app_builtopts_info_fields[] = {
/* names mostly follow CMake options, lowercase, after WITH_ */
- {(char *)"bullet", NULL},
- {(char *)"codec_avi", NULL},
- {(char *)"codec_ffmpeg", NULL},
- {(char *)"codec_sndfile", NULL},
- {(char *)"compositor", NULL},
- {(char *)"cycles", NULL},
- {(char *)"cycles_osl", NULL},
- {(char *)"freestyle", NULL},
- {(char *)"image_cineon", NULL},
- {(char *)"image_dds", NULL},
- {(char *)"image_hdr", NULL},
- {(char *)"image_openexr", NULL},
- {(char *)"image_openjpeg", NULL},
- {(char *)"image_tiff", NULL},
- {(char *)"input_ndof", NULL},
- {(char *)"audaspace", NULL},
- {(char *)"international", NULL},
- {(char *)"openal", NULL},
- {(char *)"opensubdiv", NULL},
- {(char *)"sdl", NULL},
- {(char *)"sdl_dynload", NULL},
- {(char *)"jack", NULL},
- {(char *)"libmv", NULL},
- {(char *)"mod_oceansim", NULL},
- {(char *)"mod_remesh", NULL},
- {(char *)"collada", NULL},
- {(char *)"opencolorio", NULL},
- {(char *)"openmp", NULL},
- {(char *)"openvdb", NULL},
- {(char *)"alembic", NULL},
- {(char *)"usd", NULL},
- {(char *)"fluid", NULL},
+ {"bullet", NULL},
+ {"codec_avi", NULL},
+ {"codec_ffmpeg", NULL},
+ {"codec_sndfile", NULL},
+ {"compositor", NULL},
+ {"cycles", NULL},
+ {"cycles_osl", NULL},
+ {"freestyle", NULL},
+ {"image_cineon", NULL},
+ {"image_dds", NULL},
+ {"image_hdr", NULL},
+ {"image_openexr", NULL},
+ {"image_openjpeg", NULL},
+ {"image_tiff", NULL},
+ {"input_ndof", NULL},
+ {"audaspace", NULL},
+ {"international", NULL},
+ {"openal", NULL},
+ {"opensubdiv", NULL},
+ {"sdl", NULL},
+ {"sdl_dynload", NULL},
+ {"jack", NULL},
+ {"libmv", NULL},
+ {"mod_oceansim", NULL},
+ {"mod_remesh", NULL},
+ {"collada", NULL},
+ {"opencolorio", NULL},
+ {"openmp", NULL},
+ {"openvdb", NULL},
+ {"alembic", NULL},
+ {"usd", NULL},
+ {"fluid", NULL},
{NULL},
};
static PyStructSequence_Desc app_builtopts_info_desc = {
- (char *)"bpy.app.build_options", /* name */
- (char *)"This module contains information about options blender is built with", /* doc */
- app_builtopts_info_fields, /* fields */
+ "bpy.app.build_options", /* name */
+ "This module contains information about options blender is built with", /* doc */
+ app_builtopts_info_fields, /* fields */
ARRAY_SIZE(app_builtopts_info_fields) - 1,
};
diff --git a/source/blender/python/intern/bpy_app_ffmpeg.c b/source/blender/python/intern/bpy_app_ffmpeg.c
index d1aa7817538..7f12f7be7ab 100644
--- a/source/blender/python/intern/bpy_app_ffmpeg.c
+++ b/source/blender/python/intern/bpy_app_ffmpeg.c
@@ -36,13 +36,13 @@
static PyTypeObject BlenderAppFFmpegType;
#define DEF_FFMPEG_LIB_VERSION(lib) \
- {(char *)(#lib "_version"), (char *)("The " #lib " version as a tuple of 3 numbers")}, \
+ {(#lib "_version"), ("The " #lib " version as a tuple of 3 numbers")}, \
{ \
- (char *)(#lib "_version_string"), (char *)("The " #lib " version formatted as a string") \
+ (#lib "_version_string"), ("The " #lib " version formatted as a string") \
}
static PyStructSequence_Field app_ffmpeg_info_fields[] = {
- {(char *)"supported", (char *)("Boolean, True when Blender is built with FFmpeg support")},
+ {"supported", "Boolean, True when Blender is built with FFmpeg support"},
DEF_FFMPEG_LIB_VERSION(avcodec),
DEF_FFMPEG_LIB_VERSION(avdevice),
@@ -55,9 +55,9 @@ static PyStructSequence_Field app_ffmpeg_info_fields[] = {
#undef DEF_FFMPEG_LIB_VERSION
static PyStructSequence_Desc app_ffmpeg_info_desc = {
- (char *)"bpy.app.ffmpeg", /* name */
- (char *)"This module contains information about FFmpeg blender is linked against", /* doc */
- app_ffmpeg_info_fields, /* fields */
+ "bpy.app.ffmpeg", /* name */
+ "This module contains information about FFmpeg blender is linked against", /* doc */
+ app_ffmpeg_info_fields, /* fields */
ARRAY_SIZE(app_ffmpeg_info_fields) - 1,
};
diff --git a/source/blender/python/intern/bpy_app_handlers.c b/source/blender/python/intern/bpy_app_handlers.c
index 2fbefe3be74..01618f0184a 100644
--- a/source/blender/python/intern/bpy_app_handlers.c
+++ b/source/blender/python/intern/bpy_app_handlers.c
@@ -44,42 +44,41 @@ void bpy_app_generic_callback(struct Main *main,
static PyTypeObject BlenderAppCbType;
static PyStructSequence_Field app_cb_info_fields[] = {
- {(char *)"frame_change_pre", (char *)"on frame change for playback and rendering (before)"},
- {(char *)"frame_change_post", (char *)"on frame change for playback and rendering (after)"},
- {(char *)"render_pre", (char *)"on render (before)"},
- {(char *)"render_post", (char *)"on render (after)"},
- {(char *)"render_write",
- (char *)"on writing a render frame (directly after the frame is written)"},
- {(char *)"render_stats", (char *)"on printing render statistics"},
- {(char *)"render_init", (char *)"on initialization of a render job"},
- {(char *)"render_complete", (char *)"on completion of render job"},
- {(char *)"render_cancel", (char *)"on canceling a render job"},
- {(char *)"load_pre", (char *)"on loading a new blend file (before)"},
- {(char *)"load_post", (char *)"on loading a new blend file (after)"},
- {(char *)"save_pre", (char *)"on saving a blend file (before)"},
- {(char *)"save_post", (char *)"on saving a blend file (after)"},
- {(char *)"undo_pre", (char *)"on loading an undo step (before)"},
- {(char *)"undo_post", (char *)"on loading an undo step (after)"},
- {(char *)"redo_pre", (char *)"on loading a redo step (before)"},
- {(char *)"redo_post", (char *)"on loading a redo step (after)"},
- {(char *)"depsgraph_update_pre", (char *)"on depsgraph update (pre)"},
- {(char *)"depsgraph_update_post", (char *)"on depsgraph update (post)"},
- {(char *)"version_update", (char *)"on ending the versioning code"},
- {(char *)"load_factory_preferences_post", (char *)"on loading factory preferences (after)"},
- {(char *)"load_factory_startup_post", (char *)"on loading factory startup (after)"},
+ {"frame_change_pre", "on frame change for playback and rendering (before)"},
+ {"frame_change_post", "on frame change for playback and rendering (after)"},
+ {"render_pre", "on render (before)"},
+ {"render_post", "on render (after)"},
+ {"render_write", "on writing a render frame (directly after the frame is written)"},
+ {"render_stats", "on printing render statistics"},
+ {"render_init", "on initialization of a render job"},
+ {"render_complete", "on completion of render job"},
+ {"render_cancel", "on canceling a render job"},
+ {"load_pre", "on loading a new blend file (before)"},
+ {"load_post", "on loading a new blend file (after)"},
+ {"save_pre", "on saving a blend file (before)"},
+ {"save_post", "on saving a blend file (after)"},
+ {"undo_pre", "on loading an undo step (before)"},
+ {"undo_post", "on loading an undo step (after)"},
+ {"redo_pre", "on loading a redo step (before)"},
+ {"redo_post", "on loading a redo step (after)"},
+ {"depsgraph_update_pre", "on depsgraph update (pre)"},
+ {"depsgraph_update_post", "on depsgraph update (post)"},
+ {"version_update", "on ending the versioning code"},
+ {"load_factory_preferences_post", "on loading factory preferences (after)"},
+ {"load_factory_startup_post", "on loading factory startup (after)"},
/* sets the permanent tag */
#define APP_CB_OTHER_FIELDS 1
- {(char *)"persistent",
- (char *)"Function decorator for callback functions not to be removed when loading new files"},
+ {"persistent",
+ "Function decorator for callback functions not to be removed when loading new files"},
{NULL},
};
static PyStructSequence_Desc app_cb_info_desc = {
- (char *)"bpy.app.handlers", /* name */
- (char *)"This module contains callback lists", /* doc */
- app_cb_info_fields, /* fields */
+ "bpy.app.handlers", /* name */
+ "This module contains callback lists", /* doc */
+ app_cb_info_fields, /* fields */
ARRAY_SIZE(app_cb_info_fields) - 1,
};
diff --git a/source/blender/python/intern/bpy_app_ocio.c b/source/blender/python/intern/bpy_app_ocio.c
index 9dcadbac2af..750fe93d1de 100644
--- a/source/blender/python/intern/bpy_app_ocio.c
+++ b/source/blender/python/intern/bpy_app_ocio.c
@@ -32,18 +32,17 @@
static PyTypeObject BlenderAppOCIOType;
static PyStructSequence_Field app_ocio_info_fields[] = {
- {(char *)"supported",
- (char *)("Boolean, True when Blender is built with OpenColorIO support")},
- {(char *)("version"), (char *)("The OpenColorIO version as a tuple of 3 numbers")},
- {(char *)("version_string"), (char *)("The OpenColorIO version formatted as a string")},
+ {"supported", "Boolean, True when Blender is built with OpenColorIO support"},
+ {"version", "The OpenColorIO version as a tuple of 3 numbers"},
+ {"version_string", "The OpenColorIO version formatted as a string"},
{NULL},
};
static PyStructSequence_Desc app_ocio_info_desc = {
/* name */
- (char *)"bpy.app.ocio",
+ "bpy.app.ocio",
/* doc */
- (char *)"This module contains information about OpenColorIO blender is linked against",
+ "This module contains information about OpenColorIO blender is linked against",
/* fields */
app_ocio_info_fields,
ARRAY_SIZE(app_ocio_info_fields) - 1,
diff --git a/source/blender/python/intern/bpy_app_oiio.c b/source/blender/python/intern/bpy_app_oiio.c
index 05c192f6e2e..44ffce2ad07 100644
--- a/source/blender/python/intern/bpy_app_oiio.c
+++ b/source/blender/python/intern/bpy_app_oiio.c
@@ -32,18 +32,16 @@
static PyTypeObject BlenderAppOIIOType;
static PyStructSequence_Field app_oiio_info_fields[] = {
- {(char *)"supported",
- (char *)("Boolean, True when Blender is built with OpenImageIO support")},
- {(char *)("version"), (char *)("The OpenImageIO version as a tuple of 3 numbers")},
- {(char *)("version_string"), (char *)("The OpenImageIO version formatted as a string")},
+ {"supported", "Boolean, True when Blender is built with OpenImageIO support"},
+ {"version", "The OpenImageIO version as a tuple of 3 numbers"},
+ {"version_string", "The OpenImageIO version formatted as a string"},
{NULL},
};
static PyStructSequence_Desc app_oiio_info_desc = {
- (char *)"bpy.app.oiio", /* name */
- (char
- *)"This module contains information about OpeImageIO blender is linked against", /* doc */
- app_oiio_info_fields, /* fields */
+ "bpy.app.oiio", /* name */
+ "This module contains information about OpeImageIO blender is linked against", /* doc */
+ app_oiio_info_fields, /* fields */
ARRAY_SIZE(app_oiio_info_fields) - 1,
};
diff --git a/source/blender/python/intern/bpy_app_opensubdiv.c b/source/blender/python/intern/bpy_app_opensubdiv.c
index e6e84ac30c0..2b3c2f18e43 100644
--- a/source/blender/python/intern/bpy_app_opensubdiv.c
+++ b/source/blender/python/intern/bpy_app_opensubdiv.c
@@ -32,17 +32,16 @@
static PyTypeObject BlenderAppOpenSubdivType;
static PyStructSequence_Field app_opensubdiv_info_fields[] = {
- {(char *)"supported", (char *)("Boolean, True when Blender is built with OpenSubdiv support")},
- {(char *)("version"), (char *)("The OpenSubdiv version as a tuple of 3 numbers")},
- {(char *)("version_string"), (char *)("The OpenSubdiv version formatted as a string")},
+ {"supported", "Boolean, True when Blender is built with OpenSubdiv support"},
+ {"version", "The OpenSubdiv version as a tuple of 3 numbers"},
+ {"version_string", "The OpenSubdiv version formatted as a string"},
{NULL},
};
static PyStructSequence_Desc app_opensubdiv_info_desc = {
- (char *)"bpy.app.opensubdiv", /* name */
- (char
- *)"This module contains information about OpenSubdiv blender is linked against", /* doc */
- app_opensubdiv_info_fields, /* fields */
+ "bpy.app.opensubdiv", /* name */
+ "This module contains information about OpenSubdiv blender is linked against", /* doc */
+ app_opensubdiv_info_fields, /* fields */
ARRAY_SIZE(app_opensubdiv_info_fields) - 1,
};
diff --git a/source/blender/python/intern/bpy_app_openvdb.c b/source/blender/python/intern/bpy_app_openvdb.c
index a3d02294c07..80732b7fecb 100644
--- a/source/blender/python/intern/bpy_app_openvdb.c
+++ b/source/blender/python/intern/bpy_app_openvdb.c
@@ -35,16 +35,16 @@
static PyTypeObject BlenderAppOVDBType;
static PyStructSequence_Field app_openvdb_info_fields[] = {
- {(char *)"supported", (char *)("Boolean, True when Blender is built with OpenVDB support")},
- {(char *)("version"), (char *)("The OpenVDB version as a tuple of 3 numbers")},
- {(char *)("version_string"), (char *)("The OpenVDB version formatted as a string")},
+ {"supported", "Boolean, True when Blender is built with OpenVDB support"},
+ {"version", "The OpenVDB version as a tuple of 3 numbers"},
+ {"version_string", "The OpenVDB version formatted as a string"},
{NULL},
};
static PyStructSequence_Desc app_openvdb_info_desc = {
- (char *)"bpy.app.openvdb", /* name */
- (char *)"This module contains information about OpenVDB blender is linked against", /* doc */
- app_openvdb_info_fields, /* fields */
+ "bpy.app.openvdb", /* name */
+ "This module contains information about OpenVDB blender is linked against", /* doc */
+ app_openvdb_info_fields, /* fields */
ARRAY_SIZE(app_openvdb_info_fields) - 1,
};
diff --git a/source/blender/python/intern/bpy_app_sdl.c b/source/blender/python/intern/bpy_app_sdl.c
index 7e3d02076f2..1bc3d07473a 100644
--- a/source/blender/python/intern/bpy_app_sdl.c
+++ b/source/blender/python/intern/bpy_app_sdl.c
@@ -46,20 +46,20 @@
static PyTypeObject BlenderAppSDLType;
static PyStructSequence_Field app_sdl_info_fields[] = {
- {(char *)"supported", (char *)("Boolean, True when Blender is built with SDL support")},
- {(char *)"version", (char *)("The SDL version as a tuple of 3 numbers")},
- {(char *)"version_string", (char *)("The SDL version formatted as a string")},
- {(char *)"available",
- (char *)("Boolean, True when SDL is available. This is False when "
- "either *supported* is False, or *dynload* is True and "
- "Blender cannot find the correct library.")},
+ {"supported", ("Boolean, True when Blender is built with SDL support")},
+ {"version", ("The SDL version as a tuple of 3 numbers")},
+ {"version_string", ("The SDL version formatted as a string")},
+ {"available",
+ ("Boolean, True when SDL is available. This is False when "
+ "either *supported* is False, or *dynload* is True and "
+ "Blender cannot find the correct library.")},
{NULL},
};
static PyStructSequence_Desc app_sdl_info_desc = {
- (char *)"bpy.app.sdl", /* name */
- (char *)"This module contains information about SDL blender is linked against", /* doc */
- app_sdl_info_fields, /* fields */
+ "bpy.app.sdl", /* name */
+ "This module contains information about SDL blender is linked against", /* doc */
+ app_sdl_info_fields, /* fields */
ARRAY_SIZE(app_sdl_info_fields) - 1,
};
diff --git a/source/blender/python/intern/bpy_app_translations.c b/source/blender/python/intern/bpy_app_translations.c
index fffa43c1dcd..2e88a9ccca7 100644
--- a/source/blender/python/intern/bpy_app_translations.c
+++ b/source/blender/python/intern/bpy_app_translations.c
@@ -402,9 +402,9 @@ static BLT_i18n_contexts_descriptor _contexts[] = BLT_I18NCONTEXTS_DESC;
static PyStructSequence_Field app_translations_contexts_fields[ARRAY_SIZE(_contexts)] = {{NULL}};
static PyStructSequence_Desc app_translations_contexts_desc = {
- (char *)"bpy.app.translations.contexts", /* name */
- (char *)"This named tuple contains all pre-defined translation contexts", /* doc */
- app_translations_contexts_fields, /* fields */
+ "bpy.app.translations.contexts", /* name */
+ "This named tuple contains all pre-defined translation contexts", /* doc */
+ app_translations_contexts_fields, /* fields */
ARRAY_SIZE(app_translations_contexts_fields) - 1,
};
@@ -453,12 +453,12 @@ PyDoc_STRVAR(app_translations_contexts_C_to_py_doc,
"A readonly dict mapping contexts' C-identifiers to their py-identifiers.");
static PyMemberDef app_translations_members[] = {
- {(char *)"contexts",
+ {"contexts",
T_OBJECT_EX,
offsetof(BlenderAppTranslations, contexts),
READONLY,
app_translations_contexts_doc},
- {(char *)"contexts_C_to_py",
+ {"contexts_C_to_py",
T_OBJECT_EX,
offsetof(BlenderAppTranslations, contexts_C_to_py),
READONLY,
@@ -508,16 +508,8 @@ static PyObject *app_translations_locales_get(PyObject *UNUSED(self), void *UNUS
static PyGetSetDef app_translations_getseters[] = {
/* {name, getter, setter, doc, userdata} */
- {(char *)"locale",
- (getter)app_translations_locale_get,
- NULL,
- app_translations_locale_doc,
- NULL},
- {(char *)"locales",
- (getter)app_translations_locales_get,
- NULL,
- app_translations_locales_doc,
- NULL},
+ {"locale", (getter)app_translations_locale_get, NULL, app_translations_locale_doc, NULL},
+ {"locales", (getter)app_translations_locales_get, NULL, app_translations_locales_doc, NULL},
{NULL},
};
@@ -865,7 +857,7 @@ PyObject *BPY_app_translations_struct(void)
/* We really populate the contexts' fields here! */
for (ctxt = _contexts, desc = app_translations_contexts_desc.fields; ctxt->c_id;
ctxt++, desc++) {
- desc->name = (char *)ctxt->py_id;
+ desc->name = ctxt->py_id;
desc->doc = NULL;
}
desc->name = desc->doc = NULL; /* End sentinel! */
diff --git a/source/blender/python/intern/bpy_rna.c b/source/blender/python/intern/bpy_rna.c
index d49e782c317..6c2896db703 100644
--- a/source/blender/python/intern/bpy_rna.c
+++ b/source/blender/python/intern/bpy_rna.c
@@ -4771,29 +4771,25 @@ static PyObject *pyrna_struct_get_rna_type(BPy_PropertyRNA *self)
/*****************************************************************************/
static PyGetSetDef pyrna_prop_getseters[] = {
- {(char *)"id_data",
+ {"id_data",
(getter)pyrna_struct_get_id_data,
(setter)NULL,
- (char *)pyrna_struct_get_id_data_doc,
+ pyrna_struct_get_id_data_doc,
NULL},
- {(char *)"data",
- (getter)pyrna_struct_get_data,
- (setter)NULL,
- (char *)pyrna_struct_get_data_doc,
- NULL},
- {(char *)"rna_type",
+ {"data", (getter)pyrna_struct_get_data, (setter)NULL, pyrna_struct_get_data_doc, NULL},
+ {"rna_type",
(getter)pyrna_struct_get_rna_type,
(setter)NULL,
- (char *)pyrna_struct_get_rna_type_doc,
+ pyrna_struct_get_rna_type_doc,
NULL},
{NULL, NULL, NULL, NULL, NULL} /* Sentinel */
};
static PyGetSetDef pyrna_struct_getseters[] = {
- {(char *)"id_data",
+ {"id_data",
(getter)pyrna_struct_get_id_data,
(setter)NULL,
- (char *)pyrna_struct_get_id_data_doc,
+ pyrna_struct_get_id_data_doc,
NULL},
{NULL, NULL, NULL, NULL, NULL} /* Sentinel */
};
@@ -4801,7 +4797,7 @@ static PyGetSetDef pyrna_struct_getseters[] = {
static PyObject *pyrna_func_doc_get(BPy_FunctionRNA *self, void *closure);
static PyGetSetDef pyrna_func_getseters[] = {
- {(char *)"__doc__", (getter)pyrna_func_doc_get, (setter)NULL, NULL, NULL},
+ {"__doc__", (getter)pyrna_func_doc_get, (setter)NULL, NULL, NULL},
{NULL, NULL, NULL, NULL, NULL} /* Sentinel */
};
diff --git a/source/blender/python/intern/bpy_utils_units.c b/source/blender/python/intern/bpy_utils_units.c
index 645b7e1c7af..fb9a28be430 100644
--- a/source/blender/python/intern/bpy_utils_units.c
+++ b/source/blender/python/intern/bpy_utils_units.c
@@ -73,15 +73,15 @@ static PyStructSequence_Field bpyunits_systems_fields[ARRAY_SIZE(bpyunits_usyste
static PyStructSequence_Field bpyunits_categories_fields[ARRAY_SIZE(bpyunits_ucategorie_items)];
static PyStructSequence_Desc bpyunits_systems_desc = {
- (char *)"bpy.utils.units.systems", /* name */
- (char *)"This named tuple contains all pre-defined unit systems", /* doc */
- bpyunits_systems_fields, /* fields */
+ "bpy.utils.units.systems", /* name */
+ "This named tuple contains all pre-defined unit systems", /* doc */
+ bpyunits_systems_fields, /* fields */
ARRAY_SIZE(bpyunits_systems_fields) - 1,
};
static PyStructSequence_Desc bpyunits_categories_desc = {
- (char *)"bpy.utils.units.categories", /* name */
- (char *)"This named tuple contains all pre-defined unit names", /* doc */
- bpyunits_categories_fields, /* fields */
+ "bpy.utils.units.categories", /* name */
+ "This named tuple contains all pre-defined unit names", /* doc */
+ bpyunits_categories_fields, /* fields */
ARRAY_SIZE(bpyunits_categories_fields) - 1,
};