Cleanup: various non-functional C++ changes
This commit is contained in:
parent
106d2bb312
commit
e3444fd314
@ -279,7 +279,7 @@ static void ui_tooltip_region_draw_cb(const bContext * /*C*/, ARegion *region)
|
||||
1.0f,
|
||||
float(field->image_size[0]) / float(field->image->x),
|
||||
float(field->image_size[1]) / float(field->image->y),
|
||||
NULL);
|
||||
nullptr);
|
||||
|
||||
GPU_blend(GPU_BLEND_ALPHA);
|
||||
}
|
||||
|
@ -1478,7 +1478,7 @@ static void scale_average_modal_update(bContext *C, wmOperator *op)
|
||||
reset_bezts(gso);
|
||||
const float factor = slider_factor_get_and_remember(op);
|
||||
scale_average_graph_keys(&gso->ac, factor);
|
||||
WM_event_add_notifier(C, NC_ANIMATION | ND_KEYFRAME | NA_EDITED, NULL);
|
||||
WM_event_add_notifier(C, NC_ANIMATION | ND_KEYFRAME | NA_EDITED, nullptr);
|
||||
}
|
||||
|
||||
static int scale_average_invoke(bContext *C, wmOperator *op, const wmEvent *event)
|
||||
@ -1513,7 +1513,7 @@ static int scale_average_exec(bContext *C, wmOperator *op)
|
||||
scale_average_graph_keys(&ac, factor);
|
||||
|
||||
/* Set notifier that keyframes have changed. */
|
||||
WM_event_add_notifier(C, NC_ANIMATION | ND_KEYFRAME | NA_EDITED, NULL);
|
||||
WM_event_add_notifier(C, NC_ANIMATION | ND_KEYFRAME | NA_EDITED, nullptr);
|
||||
|
||||
return OPERATOR_FINISHED;
|
||||
}
|
||||
|
@ -3457,10 +3457,10 @@ static void rna_def_tool_settings(BlenderRNA *brna)
|
||||
RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, nullptr); /* header redraw */
|
||||
|
||||
prop = RNA_def_property(srna, "use_snap_anim", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_sdna(prop, NULL, "snap_flag_anim", SCE_SNAP);
|
||||
RNA_def_property_boolean_sdna(prop, nullptr, "snap_flag_anim", SCE_SNAP);
|
||||
RNA_def_property_ui_text(prop, "Snap", "Enable snapping when transforming keyframes");
|
||||
RNA_def_property_ui_icon(prop, ICON_SNAP_OFF, 1);
|
||||
RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, NULL); /* header redraw */
|
||||
RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, nullptr); /* header redraw */
|
||||
|
||||
prop = RNA_def_property(srna, "use_snap_time_absolute", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_sdna(prop, nullptr, "snap_flag_anim", SCE_SNAP_ABS_TIME_STEP);
|
||||
|
@ -786,7 +786,7 @@ static void bpy_module_free(void *mod);
|
||||
|
||||
/* Defined in 'creator.c' when building as a Python module. */
|
||||
extern int main_python_enter(int argc, const char **argv);
|
||||
extern void main_python_exit(void);
|
||||
extern void main_python_exit();
|
||||
|
||||
static struct PyModuleDef bpy_proxy_def = {
|
||||
/*m_base*/ PyModuleDef_HEAD_INIT,
|
||||
@ -837,7 +837,7 @@ static void bpy_module_delay_init(PyObject *bpy_proxy)
|
||||
* Raise an error and return false if the Python version used to compile Blender
|
||||
* isn't compatible with the interpreter loading the `bpy` module.
|
||||
*/
|
||||
static bool bpy_module_ensure_compatible_version(void)
|
||||
static bool bpy_module_ensure_compatible_version()
|
||||
{
|
||||
/* First check the Python version used matches the major version that Blender was built with.
|
||||
* While this isn't essential, the error message in this case may be cryptic and misleading.
|
||||
@ -891,9 +891,9 @@ static void dealloc_obj_dealloc(PyObject *self)
|
||||
dealloc_obj_Type.tp_free(self);
|
||||
}
|
||||
|
||||
PyMODINIT_FUNC PyInit_bpy(void);
|
||||
PyMODINIT_FUNC PyInit_bpy();
|
||||
|
||||
PyMODINIT_FUNC PyInit_bpy(void)
|
||||
PyMODINIT_FUNC PyInit_bpy()
|
||||
{
|
||||
if (!bpy_module_ensure_compatible_version()) {
|
||||
return nullptr; /* The error has been set. */
|
||||
|
@ -208,7 +208,7 @@ static void callback_clg_fatal(void *fp)
|
||||
|
||||
/* Called in `bpy_interface.cc` when building as a Python module. */
|
||||
int main_python_enter(int argc, const char **argv);
|
||||
void main_python_exit(void);
|
||||
void main_python_exit();
|
||||
|
||||
/* Rename the 'main' function, allowing Python initialization to call it. */
|
||||
# define main main_python_enter
|
||||
@ -599,7 +599,7 @@ int main(int argc,
|
||||
} /* End of `int main(...)` function. */
|
||||
|
||||
#ifdef WITH_PYTHON_MODULE
|
||||
void main_python_exit(void)
|
||||
void main_python_exit()
|
||||
{
|
||||
WM_exit_ex((bContext *)evil_C, true, false);
|
||||
evil_C = nullptr;
|
||||
|
Loading…
Reference in New Issue
Block a user