Cleanup: use term init instead of initialize/initialise

The abbreviation 'init' is brief, unambiguous and already used
in thousands of places, also initialize is often accidentally
written with British spelling.
This commit is contained in:
Campbell Barton 2020-08-01 13:02:21 +10:00
parent 006e850a84
commit 901ee66ea1
111 changed files with 276 additions and 277 deletions

@ -213,7 +213,7 @@ extern const char *(*MEM_name_ptr)(void *vmemh);
/** This should be called as early as possible in the program. When it has been called, information /** This should be called as early as possible in the program. When it has been called, information
* about memory leaks will be printed on exit. */ * about memory leaks will be printed on exit. */
void MEM_initialize_memleak_detection(void); void MEM_init_memleak_detection(void);
/* Switch allocator to slower but fully guarded mode. */ /* Switch allocator to slower but fully guarded mode. */
void MEM_use_guarded_allocator(void); void MEM_use_guarded_allocator(void);

@ -46,7 +46,7 @@ class MemLeakPrinter {
}; };
} // namespace } // namespace
void MEM_initialize_memleak_detection(void) void MEM_init_memleak_detection(void)
{ {
/** /**
* This variable is constructed when this function is first called. This should happen as soon as * This variable is constructed when this function is first called. This should happen as soon as

@ -70,7 +70,7 @@ void BKE_curvemapping_changed(struct CurveMapping *cumap, const bool rem_doubles
void BKE_curvemapping_changed_all(struct CurveMapping *cumap); void BKE_curvemapping_changed_all(struct CurveMapping *cumap);
/* call before _all_ evaluation functions */ /* call before _all_ evaluation functions */
void BKE_curvemapping_initialize(struct CurveMapping *cumap); void BKE_curvemapping_init(struct CurveMapping *cumap);
/* keep these (const CurveMap) - to help with thread safety */ /* keep these (const CurveMap) - to help with thread safety */
/* single curve, no table check */ /* single curve, no table check */

@ -72,7 +72,7 @@ void BKE_curveprofile_create_samples(struct CurveProfile *profile,
bool sample_straight_edges, bool sample_straight_edges,
struct CurveProfilePoint *r_samples); struct CurveProfilePoint *r_samples);
void BKE_curveprofile_initialize(struct CurveProfile *profile, short segments_len); void BKE_curveprofile_init(struct CurveProfile *profile, short segments_len);
/* Called for a complete update of the widget after modifications */ /* Called for a complete update of the widget after modifications */
enum { enum {

@ -580,7 +580,7 @@ void psys_particle_on_dm(struct Mesh *mesh_final,
/* particle_system.c */ /* particle_system.c */
void distribute_particles(struct ParticleSimulationData *sim, int from); void distribute_particles(struct ParticleSimulationData *sim, int from);
void initialize_particle(struct ParticleSimulationData *sim, struct ParticleData *pa); void init_particle(struct ParticleSimulationData *sim, struct ParticleData *pa);
void psys_calc_dmcache(struct Object *ob, void psys_calc_dmcache(struct Object *ob,
struct Mesh *mesh_final, struct Mesh *mesh_final,
struct Mesh *mesh_original, struct Mesh *mesh_original,

@ -2576,7 +2576,7 @@ void BKE_pose_where_is(struct Depsgraph *depsgraph, Scene *scene, Object *ob)
} }
/* 2a. construct the IK tree (standard IK) */ /* 2a. construct the IK tree (standard IK) */
BIK_initialize_tree(depsgraph, scene, ob, ctime); BIK_init_tree(depsgraph, scene, ob, ctime);
/* 2b. construct the Spline IK trees /* 2b. construct the Spline IK trees
* - this is not integrated as an IK plugin, since it should be able * - this is not integrated as an IK plugin, since it should be able

@ -658,7 +658,7 @@ void BKE_pose_eval_init_ik(struct Depsgraph *depsgraph, Scene *scene, Object *ob
return; return;
} }
/* construct the IK tree (standard IK) */ /* construct the IK tree (standard IK) */
BIK_initialize_tree(depsgraph, scene, object, ctime); BIK_init_tree(depsgraph, scene, object, ctime);
/* construct the Spline IK trees /* construct the Spline IK trees
* - this is not integrated as an IK plugin, since it should be able * - this is not integrated as an IK plugin, since it should be able
* to function in conjunction with standard IK. */ * to function in conjunction with standard IK. */

@ -557,7 +557,7 @@ void BKE_gpencil_brush_preset_set(Main *bmain, Brush *brush, const short type)
/* Curve. */ /* Curve. */
custom_curve = brush->gpencil_settings->curve_sensitivity; custom_curve = brush->gpencil_settings->curve_sensitivity;
BKE_curvemapping_set_defaults(custom_curve, 0, 0.0f, 0.0f, 1.0f, 1.0f); BKE_curvemapping_set_defaults(custom_curve, 0, 0.0f, 0.0f, 1.0f, 1.0f);
BKE_curvemapping_initialize(custom_curve); BKE_curvemapping_init(custom_curve);
brush_gpencil_curvemap_reset(custom_curve->cm, 3, GPCURVE_PRESET_INK); brush_gpencil_curvemap_reset(custom_curve->cm, 3, GPCURVE_PRESET_INK);
brush->gpencil_settings->icon_id = GP_BRUSH_ICON_INK; brush->gpencil_settings->icon_id = GP_BRUSH_ICON_INK;
@ -594,7 +594,7 @@ void BKE_gpencil_brush_preset_set(Main *bmain, Brush *brush, const short type)
/* Curve. */ /* Curve. */
custom_curve = brush->gpencil_settings->curve_sensitivity; custom_curve = brush->gpencil_settings->curve_sensitivity;
BKE_curvemapping_set_defaults(custom_curve, 0, 0.0f, 0.0f, 1.0f, 1.0f); BKE_curvemapping_set_defaults(custom_curve, 0, 0.0f, 0.0f, 1.0f, 1.0f);
BKE_curvemapping_initialize(custom_curve); BKE_curvemapping_init(custom_curve);
brush_gpencil_curvemap_reset(custom_curve->cm, 3, GPCURVE_PRESET_INKNOISE); brush_gpencil_curvemap_reset(custom_curve->cm, 3, GPCURVE_PRESET_INKNOISE);
brush->gpencil_settings->icon_id = GP_BRUSH_ICON_INKNOISE; brush->gpencil_settings->icon_id = GP_BRUSH_ICON_INKNOISE;
@ -631,7 +631,7 @@ void BKE_gpencil_brush_preset_set(Main *bmain, Brush *brush, const short type)
/* Curve. */ /* Curve. */
custom_curve = brush->gpencil_settings->curve_sensitivity; custom_curve = brush->gpencil_settings->curve_sensitivity;
BKE_curvemapping_set_defaults(custom_curve, 0, 0.0f, 0.0f, 1.0f, 1.0f); BKE_curvemapping_set_defaults(custom_curve, 0, 0.0f, 0.0f, 1.0f, 1.0f);
BKE_curvemapping_initialize(custom_curve); BKE_curvemapping_init(custom_curve);
brush_gpencil_curvemap_reset(custom_curve->cm, 4, GPCURVE_PRESET_MARKER); brush_gpencil_curvemap_reset(custom_curve->cm, 4, GPCURVE_PRESET_MARKER);
brush->gpencil_settings->icon_id = GP_BRUSH_ICON_MARKER; brush->gpencil_settings->icon_id = GP_BRUSH_ICON_MARKER;
@ -667,12 +667,12 @@ void BKE_gpencil_brush_preset_set(Main *bmain, Brush *brush, const short type)
/* Curve. */ /* Curve. */
custom_curve = brush->gpencil_settings->curve_sensitivity; custom_curve = brush->gpencil_settings->curve_sensitivity;
BKE_curvemapping_set_defaults(custom_curve, 0, 0.0f, 0.0f, 1.0f, 1.0f); BKE_curvemapping_set_defaults(custom_curve, 0, 0.0f, 0.0f, 1.0f, 1.0f);
BKE_curvemapping_initialize(custom_curve); BKE_curvemapping_init(custom_curve);
brush_gpencil_curvemap_reset(custom_curve->cm, 3, GPCURVE_PRESET_CHISEL_SENSIVITY); brush_gpencil_curvemap_reset(custom_curve->cm, 3, GPCURVE_PRESET_CHISEL_SENSIVITY);
custom_curve = brush->gpencil_settings->curve_strength; custom_curve = brush->gpencil_settings->curve_strength;
BKE_curvemapping_set_defaults(custom_curve, 0, 0.0f, 0.0f, 1.0f, 1.0f); BKE_curvemapping_set_defaults(custom_curve, 0, 0.0f, 0.0f, 1.0f, 1.0f);
BKE_curvemapping_initialize(custom_curve); BKE_curvemapping_init(custom_curve);
brush_gpencil_curvemap_reset(custom_curve->cm, 4, GPCURVE_PRESET_CHISEL_STRENGTH); brush_gpencil_curvemap_reset(custom_curve->cm, 4, GPCURVE_PRESET_CHISEL_STRENGTH);
brush->gpencil_settings->icon_id = GP_BRUSH_ICON_CHISEL; brush->gpencil_settings->icon_id = GP_BRUSH_ICON_CHISEL;
@ -2274,7 +2274,7 @@ struct ImBuf *BKE_brush_gen_radial_control_imbuf(Brush *br, bool secondary, bool
int half = side / 2; int half = side / 2;
int i, j; int i, j;
BKE_curvemapping_initialize(br->curve); BKE_curvemapping_init(br->curve);
texcache = BKE_brush_gen_texture_cache(br, half, secondary); texcache = BKE_brush_gen_texture_cache(br, half, secondary);
im->rect_float = MEM_callocN(sizeof(float) * side * side, "radial control rect"); im->rect_float = MEM_callocN(sizeof(float) * side * side, "radial control rect");
im->x = im->y = side; im->x = im->y = side;

@ -1202,7 +1202,7 @@ int BKE_curvemapping_RGBA_does_something(const CurveMapping *cumap)
return 0; return 0;
} }
void BKE_curvemapping_initialize(CurveMapping *cumap) void BKE_curvemapping_init(CurveMapping *cumap)
{ {
int a; int a;

@ -1040,7 +1040,7 @@ void BKE_curveprofile_update(CurveProfile *profile, const int update_flags)
* Also sets the number of segments used for the display preview of the locations * Also sets the number of segments used for the display preview of the locations
* of the sampled points. * of the sampled points.
*/ */
void BKE_curveprofile_initialize(CurveProfile *profile, short segments_len) void BKE_curveprofile_init(CurveProfile *profile, short segments_len)
{ {
if (segments_len != profile->segments_len) { if (segments_len != profile->segments_len) {
profile->flag |= PROF_DIRTY_PRESET; profile->flag |= PROF_DIRTY_PRESET;
@ -1055,7 +1055,7 @@ void BKE_curveprofile_initialize(CurveProfile *profile, short segments_len)
* Gives the distance to the next point in the widgets sampled table, in other words the length * Gives the distance to the next point in the widgets sampled table, in other words the length
* of the \a 'i' edge of the table. * of the \a 'i' edge of the table.
* *
* \note Requires curveprofile_initialize or #BKE_curveprofile_update call before to fill table. * \note Requires #BKE_curveprofile_init or #BKE_curveprofile_update call before to fill table.
*/ */
static float curveprofile_distance_to_next_table_point(const CurveProfile *profile, int i) static float curveprofile_distance_to_next_table_point(const CurveProfile *profile, int i)
{ {
@ -1067,7 +1067,7 @@ static float curveprofile_distance_to_next_table_point(const CurveProfile *profi
/** /**
* Calculates the total length of the profile from the curves sampled in the table. * Calculates the total length of the profile from the curves sampled in the table.
* *
* \note Requires curveprofile_initialize or #BKE_curveprofile_update call before to fill table. * \note Requires #BKE_curveprofile_init or #BKE_curveprofile_update call before to fill table.
*/ */
float BKE_curveprofile_total_length(const CurveProfile *profile) float BKE_curveprofile_total_length(const CurveProfile *profile)
{ {
@ -1082,7 +1082,7 @@ float BKE_curveprofile_total_length(const CurveProfile *profile)
* Samples evenly spaced positions along the curve profile's table (generated from path). Fills * Samples evenly spaced positions along the curve profile's table (generated from path). Fills
* an entire table at once for a speedup if all of the results are going to be used anyway. * an entire table at once for a speedup if all of the results are going to be used anyway.
* *
* \note Requires curveprofile_initialize or #BKE_curveprofile_update call before to fill table. * \note Requires #BKE_curveprofile_init or #BKE_curveprofile_update call before to fill table.
* \note Working, but would conflict with "Sample Straight Edges" option, so this is unused for * \note Working, but would conflict with "Sample Straight Edges" option, so this is unused for
* now. * now.
*/ */
@ -1145,7 +1145,7 @@ void BKE_curveprofile_create_samples_even_spacing(CurveProfile *profile,
* Travels down (length_portion * path) length and returns the position at that point. * Travels down (length_portion * path) length and returns the position at that point.
* *
* \param length_portion: The portion (0 to 1) of the path's full length to sample at. * \param length_portion: The portion (0 to 1) of the path's full length to sample at.
* \note Requires curveprofile_initialize or #BKE_curveprofile_update call before to fill table. * \note Requires #BKE_curveprofile_init or #BKE_curveprofile_update call before to fill table.
*/ */
void BKE_curveprofile_evaluate_length_portion(const CurveProfile *profile, void BKE_curveprofile_evaluate_length_portion(const CurveProfile *profile,
float length_portion, float length_portion,

@ -3942,7 +3942,7 @@ static void image_create_multilayer(Image *ima, ImBuf *ibuf, int framenr)
#endif /* WITH_OPENEXR */ #endif /* WITH_OPENEXR */
/* common stuff to do with images after loading */ /* common stuff to do with images after loading */
static void image_initialize_after_load(Image *ima, ImageUser *iuser, ImBuf *UNUSED(ibuf)) static void image_init_after_load(Image *ima, ImageUser *iuser, ImBuf *UNUSED(ibuf))
{ {
/* Preview is NULL when it has never been used as an icon before. /* Preview is NULL when it has never been used as an icon before.
* Never handle previews/icons outside of main thread. */ * Never handle previews/icons outside of main thread. */
@ -4045,11 +4045,11 @@ static ImBuf *load_sequence_single(
} }
} }
else { else {
image_initialize_after_load(ima, iuser, ibuf); image_init_after_load(ima, iuser, ibuf);
*r_assign = true; *r_assign = true;
} }
#else #else
image_initialize_after_load(ima, iuser, ibuf); image_init_after_load(ima, iuser, ibuf);
*r_assign = true; *r_assign = true;
#endif #endif
} }
@ -4154,7 +4154,7 @@ static ImBuf *image_load_sequence_multilayer(Image *ima, ImageUser *iuser, int e
BKE_imbuf_stamp_info(ima->rr, ibuf); BKE_imbuf_stamp_info(ima->rr, ibuf);
image_initialize_after_load(ima, iuser, ibuf); image_init_after_load(ima, iuser, ibuf);
image_assign_ibuf(ima, ibuf, iuser ? iuser->multi_index : 0, entry); image_assign_ibuf(ima, ibuf, iuser ? iuser->multi_index : 0, entry);
} }
// else printf("pass not found\n"); // else printf("pass not found\n");
@ -4218,7 +4218,7 @@ static ImBuf *load_movie_single(Image *ima, ImageUser *iuser, int frame, const i
ibuf = IMB_makeSingleUser(IMB_anim_absolute(ia->anim, fra, IMB_TC_RECORD_RUN, IMB_PROXY_NONE)); ibuf = IMB_makeSingleUser(IMB_anim_absolute(ia->anim, fra, IMB_TC_RECORD_RUN, IMB_PROXY_NONE));
if (ibuf) { if (ibuf) {
image_initialize_after_load(ima, iuser, ibuf); image_init_after_load(ima, iuser, ibuf);
} }
else { else {
tile->ok = 0; tile->ok = 0;
@ -4363,7 +4363,7 @@ static ImBuf *load_image_single(Image *ima,
else else
#endif #endif
{ {
image_initialize_after_load(ima, iuser, ibuf); image_init_after_load(ima, iuser, ibuf);
*r_assign = true; *r_assign = true;
/* make packed file for autopack */ /* make packed file for autopack */
@ -4477,7 +4477,7 @@ static ImBuf *image_get_ibuf_multilayer(Image *ima, ImageUser *iuser)
if (rpass) { if (rpass) {
ibuf = IMB_allocImBuf(ima->rr->rectx, ima->rr->recty, 32, 0); ibuf = IMB_allocImBuf(ima->rr->rectx, ima->rr->recty, 32, 0);
image_initialize_after_load(ima, iuser, ibuf); image_init_after_load(ima, iuser, ibuf);
ibuf->rect_float = rpass->rect; ibuf->rect_float = rpass->rect;
ibuf->flags |= IB_rectfloat; ibuf->flags |= IB_rectfloat;

@ -58,7 +58,7 @@ static void light_init_data(ID *id)
MEMCPY_STRUCT_AFTER(la, DNA_struct_default_get(Light), id); MEMCPY_STRUCT_AFTER(la, DNA_struct_default_get(Light), id);
la->curfalloff = BKE_curvemapping_add(1, 0.0f, 1.0f, 1.0f, 0.0f); la->curfalloff = BKE_curvemapping_add(1, 0.0f, 1.0f, 1.0f, 0.0f);
BKE_curvemapping_initialize(la->curfalloff); BKE_curvemapping_init(la->curfalloff);
} }
/** /**

@ -241,7 +241,7 @@ static void multires_mdisps_subdivide_hidden(MDisps *md, int new_level)
md->hidden = subd; md->hidden = subd;
} }
static MDisps *multires_mdisps_initialize_hidden(Mesh *me, int level) static MDisps *multires_mdisps_init_hidden(Mesh *me, int level)
{ {
MDisps *mdisps = CustomData_add_layer(&me->ldata, CD_MDISPS, CD_CALLOC, NULL, me->totloop); MDisps *mdisps = CustomData_add_layer(&me->ldata, CD_MDISPS, CD_CALLOC, NULL, me->totloop);
int gridsize = BKE_ccg_gridsize(level); int gridsize = BKE_ccg_gridsize(level);
@ -868,7 +868,7 @@ static void multires_subdivide_legacy(
mdisps = CustomData_get_layer(&me->ldata, CD_MDISPS); mdisps = CustomData_get_layer(&me->ldata, CD_MDISPS);
if (!mdisps) { if (!mdisps) {
mdisps = multires_mdisps_initialize_hidden(me, totlvl); mdisps = multires_mdisps_init_hidden(me, totlvl);
} }
if (mdisps->disps && !updateblock && lvl != 0) { if (mdisps->disps && !updateblock && lvl != 0) {

@ -3871,7 +3871,7 @@ void BKE_particlesettings_clump_curve_init(ParticleSettings *part)
cumap->cm[0].curve[1].x = 1.0f; cumap->cm[0].curve[1].x = 1.0f;
cumap->cm[0].curve[1].y = 1.0f; cumap->cm[0].curve[1].y = 1.0f;
BKE_curvemapping_initialize(cumap); BKE_curvemapping_init(cumap);
part->clumpcurve = cumap; part->clumpcurve = cumap;
} }
@ -3885,7 +3885,7 @@ void BKE_particlesettings_rough_curve_init(ParticleSettings *part)
cumap->cm[0].curve[1].x = 1.0f; cumap->cm[0].curve[1].x = 1.0f;
cumap->cm[0].curve[1].y = 1.0f; cumap->cm[0].curve[1].y = 1.0f;
BKE_curvemapping_initialize(cumap); BKE_curvemapping_init(cumap);
part->roughcurve = cumap; part->roughcurve = cumap;
} }
@ -3899,7 +3899,7 @@ void BKE_particlesettings_twist_curve_init(ParticleSettings *part)
cumap->cm[0].curve[1].x = 1.0f; cumap->cm[0].curve[1].x = 1.0f;
cumap->cm[0].curve[1].y = 1.0f; cumap->cm[0].curve[1].y = 1.0f;
BKE_curvemapping_initialize(cumap); BKE_curvemapping_init(cumap);
part->twistcurve = cumap; part->twistcurve = cumap;
} }

@ -570,7 +570,7 @@ void psys_thread_context_free(ParticleThreadContext *ctx)
} }
} }
static void initialize_particle_texture(ParticleSimulationData *sim, ParticleData *pa, int p) static void init_particle_texture(ParticleSimulationData *sim, ParticleData *pa, int p)
{ {
ParticleSystem *psys = sim->psys; ParticleSystem *psys = sim->psys;
ParticleSettings *part = psys->part; ParticleSettings *part = psys->part;
@ -595,7 +595,7 @@ static void initialize_particle_texture(ParticleSimulationData *sim, ParticleDat
} }
/* set particle parameters that don't change during particle's life */ /* set particle parameters that don't change during particle's life */
void initialize_particle(ParticleSimulationData *sim, ParticleData *pa) void init_particle(ParticleSimulationData *sim, ParticleData *pa)
{ {
ParticleSettings *part = sim->psys->part; ParticleSettings *part = sim->psys->part;
float birth_time = (float)(pa - sim->psys->particles) / (float)sim->psys->totpart; float birth_time = (float)(pa - sim->psys->particles) / (float)sim->psys->totpart;
@ -629,7 +629,7 @@ static void initialize_all_particles(ParticleSimulationData *sim)
LOOP_PARTICLES LOOP_PARTICLES
{ {
if (!(emit_from_volume_grid && (pa->flag & PARS_UNEXIST) != 0)) { if (!(emit_from_volume_grid && (pa->flag & PARS_UNEXIST) != 0)) {
initialize_particle(sim, pa); init_particle(sim, pa);
} }
} }
} }
@ -1092,7 +1092,7 @@ void reset_particle(ParticleSimulationData *sim, ParticleData *pa, float dtime,
* We could only do it now because we'll need to know coordinate * We could only do it now because we'll need to know coordinate
* before sampling the texture. * before sampling the texture.
*/ */
initialize_particle_texture(sim, pa, p); init_particle_texture(sim, pa, p);
if (part->phystype == PART_PHYS_BOIDS && pa->boid) { if (part->phystype == PART_PHYS_BOIDS && pa->boid) {
BoidParticle *bpa = pa->boid; BoidParticle *bpa = pa->boid;

@ -127,7 +127,7 @@ static void scene_init_data(ID *id)
mblur_shutter_curve = &scene->r.mblur_shutter_curve; mblur_shutter_curve = &scene->r.mblur_shutter_curve;
BKE_curvemapping_set_defaults(mblur_shutter_curve, 1, 0.0f, 0.0f, 1.0f, 1.0f); BKE_curvemapping_set_defaults(mblur_shutter_curve, 1, 0.0f, 0.0f, 1.0f, 1.0f);
BKE_curvemapping_initialize(mblur_shutter_curve); BKE_curvemapping_init(mblur_shutter_curve);
BKE_curvemap_reset(mblur_shutter_curve->cm, BKE_curvemap_reset(mblur_shutter_curve->cm,
&mblur_shutter_curve->clipr, &mblur_shutter_curve->clipr,
CURVE_PRESET_MAX, CURVE_PRESET_MAX,
@ -140,13 +140,13 @@ static void scene_init_data(ID *id)
/* grease pencil multiframe falloff curve */ /* grease pencil multiframe falloff curve */
scene->toolsettings->gp_sculpt.cur_falloff = BKE_curvemapping_add(1, 0.0f, 0.0f, 1.0f, 1.0f); scene->toolsettings->gp_sculpt.cur_falloff = BKE_curvemapping_add(1, 0.0f, 0.0f, 1.0f, 1.0f);
CurveMapping *gp_falloff_curve = scene->toolsettings->gp_sculpt.cur_falloff; CurveMapping *gp_falloff_curve = scene->toolsettings->gp_sculpt.cur_falloff;
BKE_curvemapping_initialize(gp_falloff_curve); BKE_curvemapping_init(gp_falloff_curve);
BKE_curvemap_reset( BKE_curvemap_reset(
gp_falloff_curve->cm, &gp_falloff_curve->clipr, CURVE_PRESET_GAUSS, CURVEMAP_SLOPE_POSITIVE); gp_falloff_curve->cm, &gp_falloff_curve->clipr, CURVE_PRESET_GAUSS, CURVEMAP_SLOPE_POSITIVE);
scene->toolsettings->gp_sculpt.cur_primitive = BKE_curvemapping_add(1, 0.0f, 0.0f, 1.0f, 1.0f); scene->toolsettings->gp_sculpt.cur_primitive = BKE_curvemapping_add(1, 0.0f, 0.0f, 1.0f, 1.0f);
CurveMapping *gp_primitive_curve = scene->toolsettings->gp_sculpt.cur_primitive; CurveMapping *gp_primitive_curve = scene->toolsettings->gp_sculpt.cur_primitive;
BKE_curvemapping_initialize(gp_primitive_curve); BKE_curvemapping_init(gp_primitive_curve);
BKE_curvemap_reset(gp_primitive_curve->cm, BKE_curvemap_reset(gp_primitive_curve->cm,
&gp_primitive_curve->clipr, &gp_primitive_curve->clipr,
CURVE_PRESET_BELL, CURVE_PRESET_BELL,

@ -396,7 +396,7 @@ static void curves_apply(struct SequenceModifierData *smd, ImBuf *ibuf, ImBuf *m
float black[3] = {0.0f, 0.0f, 0.0f}; float black[3] = {0.0f, 0.0f, 0.0f};
float white[3] = {1.0f, 1.0f, 1.0f}; float white[3] = {1.0f, 1.0f, 1.0f};
BKE_curvemapping_initialize(&cmd->curve_mapping); BKE_curvemapping_init(&cmd->curve_mapping);
BKE_curvemapping_premultiply(&cmd->curve_mapping, 0); BKE_curvemapping_premultiply(&cmd->curve_mapping, 0);
BKE_curvemapping_set_black_white(&cmd->curve_mapping, black, white); BKE_curvemapping_set_black_white(&cmd->curve_mapping, black, white);
@ -525,7 +525,7 @@ static void hue_correct_apply(struct SequenceModifierData *smd, ImBuf *ibuf, ImB
{ {
HueCorrectModifierData *hcmd = (HueCorrectModifierData *)smd; HueCorrectModifierData *hcmd = (HueCorrectModifierData *)smd;
BKE_curvemapping_initialize(&hcmd->curve_mapping); BKE_curvemapping_init(&hcmd->curve_mapping);
modifier_apply_threaded(ibuf, mask, hue_correct_apply_threaded, &hcmd->curve_mapping); modifier_apply_threaded(ibuf, mask, hue_correct_apply_threaded, &hcmd->curve_mapping);
} }

@ -215,7 +215,7 @@ static void use_values_from_fcurves(StabContext *ctx, bool toggle)
/* Prepare per call private working area. /* Prepare per call private working area.
* Used for access to possibly animated values: retrieve available F-curves. * Used for access to possibly animated values: retrieve available F-curves.
*/ */
static StabContext *initialize_stabilization_working_context(MovieClip *clip) static StabContext *init_stabilization_working_context(MovieClip *clip)
{ {
StabContext *ctx = MEM_callocN(sizeof(StabContext), "2D stabilization animation runtime data"); StabContext *ctx = MEM_callocN(sizeof(StabContext), "2D stabilization animation runtime data");
ctx->clip = clip; ctx->clip = clip;
@ -841,14 +841,14 @@ static int establish_track_initialization_order(StabContext *ctx, TrackInitOrder
* *
* NOTE: when done, this track is marked as initialized * NOTE: when done, this track is marked as initialized
*/ */
static void initialize_track_for_stabilization(StabContext *ctx, static void init_track_for_stabilization(StabContext *ctx,
MovieTrackingTrack *track, MovieTrackingTrack *track,
int reference_frame, int reference_frame,
float aspect, float aspect,
const float average_translation[2], const float average_translation[2],
const float pivot[2], const float pivot[2],
const float average_angle, const float average_angle,
const float average_scale_step) const float average_scale_step)
{ {
float pos[2], angle, len; float pos[2], angle, len;
TrackStabilizationBase *local_data = access_stabilization_baseline_data(ctx, track); TrackStabilizationBase *local_data = access_stabilization_baseline_data(ctx, track);
@ -876,7 +876,7 @@ static void initialize_track_for_stabilization(StabContext *ctx,
local_data->is_init_for_stabilization = true; local_data->is_init_for_stabilization = true;
} }
static void initialize_all_tracks(StabContext *ctx, float aspect) static void init_all_tracks(StabContext *ctx, float aspect)
{ {
size_t track_len = 0; size_t track_len = 0;
MovieClip *clip = ctx->clip; MovieClip *clip = ctx->clip;
@ -936,14 +936,14 @@ static void initialize_all_tracks(StabContext *ctx, float aspect)
&average_angle, &average_angle,
&average_scale_step); &average_scale_step);
} }
initialize_track_for_stabilization(ctx, init_track_for_stabilization(ctx,
track, track,
reference_frame, reference_frame,
aspect, aspect,
average_translation, average_translation,
pivot, pivot,
average_angle, average_angle,
average_scale_step); average_scale_step);
} }
cleanup: cleanup:
@ -1257,9 +1257,9 @@ static float calculate_autoscale_factor(StabContext *ctx, int size, float aspect
*/ */
static StabContext *init_stabilizer(MovieClip *clip, int size, float aspect) static StabContext *init_stabilizer(MovieClip *clip, int size, float aspect)
{ {
StabContext *ctx = initialize_stabilization_working_context(clip); StabContext *ctx = init_stabilization_working_context(clip);
BLI_assert(ctx != NULL); BLI_assert(ctx != NULL);
initialize_all_tracks(ctx, aspect); init_all_tracks(ctx, aspect);
if (ctx->stab->flag & TRACKING_AUTOSCALE) { if (ctx->stab->flag & TRACKING_AUTOSCALE) {
ctx->stab->scale = 1.0; ctx->stab->scale = 1.0;
ctx->stab->scale = calculate_autoscale_factor(ctx, size, aspect); ctx->stab->scale = calculate_autoscale_factor(ctx, size, aspect);

@ -38,7 +38,7 @@
* float angle; * float angle;
* Dial *dial; * Dial *dial;
* *
* dial = BLI_dial_initialize(start_position, threshold); * dial = BLI_dial_init(start_position, threshold);
* *
* angle = BLI_dial_angle(dial, current_position); * angle = BLI_dial_angle(dial, current_position);
* *
@ -52,7 +52,7 @@ extern "C" {
typedef struct Dial Dial; typedef struct Dial Dial;
Dial *BLI_dial_initialize(const float start_position[2], float threshold); Dial *BLI_dial_init(const float start_position[2], float threshold);
float BLI_dial_angle(Dial *dial, const float current_position[2]); float BLI_dial_angle(Dial *dial, const float current_position[2]);

@ -45,7 +45,7 @@ struct Dial {
bool initialized; bool initialized;
}; };
Dial *BLI_dial_initialize(const float start_position[2], float threshold) Dial *BLI_dial_init(const float start_position[2], float threshold)
{ {
Dial *dial = MEM_callocN(sizeof(Dial), "dial"); Dial *dial = MEM_callocN(sizeof(Dial), "dial");

@ -5516,7 +5516,7 @@ static void direct_link_gpencil_modifiers(BlendDataReader *reader, ListBase *lb)
if (gpmd->curve_intensity) { if (gpmd->curve_intensity) {
BKE_curvemapping_blend_read(reader, gpmd->curve_intensity); BKE_curvemapping_blend_read(reader, gpmd->curve_intensity);
/* initialize the curve. Maybe this could be moved to modififer logic */ /* initialize the curve. Maybe this could be moved to modififer logic */
BKE_curvemapping_initialize(gpmd->curve_intensity); BKE_curvemapping_init(gpmd->curve_intensity);
} }
} }
else if (md->type == eGpencilModifierType_Thick) { else if (md->type == eGpencilModifierType_Thick) {
@ -5525,7 +5525,7 @@ static void direct_link_gpencil_modifiers(BlendDataReader *reader, ListBase *lb)
BLO_read_data_address(reader, &gpmd->curve_thickness); BLO_read_data_address(reader, &gpmd->curve_thickness);
if (gpmd->curve_thickness) { if (gpmd->curve_thickness) {
BKE_curvemapping_blend_read(reader, gpmd->curve_thickness); BKE_curvemapping_blend_read(reader, gpmd->curve_thickness);
BKE_curvemapping_initialize(gpmd->curve_thickness); BKE_curvemapping_init(gpmd->curve_thickness);
} }
} }
else if (md->type == eGpencilModifierType_Tint) { else if (md->type == eGpencilModifierType_Tint) {
@ -5534,7 +5534,7 @@ static void direct_link_gpencil_modifiers(BlendDataReader *reader, ListBase *lb)
BLO_read_data_address(reader, &gpmd->curve_intensity); BLO_read_data_address(reader, &gpmd->curve_intensity);
if (gpmd->curve_intensity) { if (gpmd->curve_intensity) {
BKE_curvemapping_blend_read(reader, gpmd->curve_intensity); BKE_curvemapping_blend_read(reader, gpmd->curve_intensity);
BKE_curvemapping_initialize(gpmd->curve_intensity); BKE_curvemapping_init(gpmd->curve_intensity);
} }
} }
else if (md->type == eGpencilModifierType_Smooth) { else if (md->type == eGpencilModifierType_Smooth) {
@ -5542,7 +5542,7 @@ static void direct_link_gpencil_modifiers(BlendDataReader *reader, ListBase *lb)
BLO_read_data_address(reader, &gpmd->curve_intensity); BLO_read_data_address(reader, &gpmd->curve_intensity);
if (gpmd->curve_intensity) { if (gpmd->curve_intensity) {
BKE_curvemapping_blend_read(reader, gpmd->curve_intensity); BKE_curvemapping_blend_read(reader, gpmd->curve_intensity);
BKE_curvemapping_initialize(gpmd->curve_intensity); BKE_curvemapping_init(gpmd->curve_intensity);
} }
} }
else if (md->type == eGpencilModifierType_Color) { else if (md->type == eGpencilModifierType_Color) {
@ -5550,7 +5550,7 @@ static void direct_link_gpencil_modifiers(BlendDataReader *reader, ListBase *lb)
BLO_read_data_address(reader, &gpmd->curve_intensity); BLO_read_data_address(reader, &gpmd->curve_intensity);
if (gpmd->curve_intensity) { if (gpmd->curve_intensity) {
BKE_curvemapping_blend_read(reader, gpmd->curve_intensity); BKE_curvemapping_blend_read(reader, gpmd->curve_intensity);
BKE_curvemapping_initialize(gpmd->curve_intensity); BKE_curvemapping_init(gpmd->curve_intensity);
} }
} }
else if (md->type == eGpencilModifierType_Opacity) { else if (md->type == eGpencilModifierType_Opacity) {
@ -5558,7 +5558,7 @@ static void direct_link_gpencil_modifiers(BlendDataReader *reader, ListBase *lb)
BLO_read_data_address(reader, &gpmd->curve_intensity); BLO_read_data_address(reader, &gpmd->curve_intensity);
if (gpmd->curve_intensity) { if (gpmd->curve_intensity) {
BKE_curvemapping_blend_read(reader, gpmd->curve_intensity); BKE_curvemapping_blend_read(reader, gpmd->curve_intensity);
BKE_curvemapping_initialize(gpmd->curve_intensity); BKE_curvemapping_init(gpmd->curve_intensity);
} }
} }
} }

@ -280,7 +280,7 @@ static void area_add_window_regions(ScrArea *area, SpaceLink *sl, ListBase *lb)
region->v2d.keepzoom |= (V2D_LOCKZOOM_X | V2D_LOCKZOOM_Y | V2D_KEEPASPECT); region->v2d.keepzoom |= (V2D_LOCKZOOM_X | V2D_LOCKZOOM_Y | V2D_KEEPASPECT);
region->v2d.keeptot = V2D_KEEPTOT_STRICT; region->v2d.keeptot = V2D_KEEPTOT_STRICT;
region->v2d.minzoom = region->v2d.maxzoom = 1.0f; region->v2d.minzoom = region->v2d.maxzoom = 1.0f;
// region->v2d.flag |= V2D_IS_INITIALISED; // region->v2d.flag |= V2D_IS_INIT;
break; break;
} }
case SPACE_GRAPH: { case SPACE_GRAPH: {
@ -297,7 +297,7 @@ static void area_add_window_regions(ScrArea *area, SpaceLink *sl, ListBase *lb)
region->v2d.max[0] = MAXFRAMEF; region->v2d.max[0] = MAXFRAMEF;
region->v2d.max[1] = FLT_MAX; region->v2d.max[1] = FLT_MAX;
// region->v2d.flag |= V2D_IS_INITIALISED; // region->v2d.flag |= V2D_IS_INIT;
break; break;
} }
case SPACE_NLA: { case SPACE_NLA: {
@ -355,7 +355,7 @@ static void area_add_window_regions(ScrArea *area, SpaceLink *sl, ListBase *lb)
region->v2d.scroll |= (V2D_SCROLL_BOTTOM | V2D_SCROLL_HORIZONTAL_HANDLES); region->v2d.scroll |= (V2D_SCROLL_BOTTOM | V2D_SCROLL_HORIZONTAL_HANDLES);
region->v2d.scroll |= (V2D_SCROLL_LEFT | V2D_SCROLL_VERTICAL_HANDLES); region->v2d.scroll |= (V2D_SCROLL_LEFT | V2D_SCROLL_VERTICAL_HANDLES);
region->v2d.align = V2D_ALIGN_NO_NEG_Y; region->v2d.align = V2D_ALIGN_NO_NEG_Y;
region->v2d.flag |= V2D_IS_INITIALISED; region->v2d.flag |= V2D_IS_INIT;
break; break;
} }
case SPACE_NODE: { case SPACE_NODE: {

@ -1205,7 +1205,7 @@ void blo_do_versions_260(FileData *fd, Library *UNUSED(lib), Main *bmain)
if (region->regiontype == RGN_TYPE_PREVIEW) { if (region->regiontype == RGN_TYPE_PREVIEW) {
if (region->alignment != RGN_ALIGN_NONE) { if (region->alignment != RGN_ALIGN_NONE) {
region->flag |= RGN_FLAG_HIDDEN; region->flag |= RGN_FLAG_HIDDEN;
region->v2d.flag &= ~V2D_IS_INITIALISED; region->v2d.flag &= ~V2D_IS_INIT;
region->alignment = RGN_ALIGN_NONE; region->alignment = RGN_ALIGN_NONE;
hide = true; hide = true;

@ -1108,7 +1108,7 @@ void blo_do_versions_270(FileData *fd, Library *UNUSED(lib), Main *bmain)
for (scene = bmain->scenes.first; scene != NULL; scene = scene->id.next) { for (scene = bmain->scenes.first; scene != NULL; scene = scene->id.next) {
CurveMapping *curve_mapping = &scene->r.mblur_shutter_curve; CurveMapping *curve_mapping = &scene->r.mblur_shutter_curve;
BKE_curvemapping_set_defaults(curve_mapping, 1, 0.0f, 0.0f, 1.0f, 1.0f); BKE_curvemapping_set_defaults(curve_mapping, 1, 0.0f, 0.0f, 1.0f, 1.0f);
BKE_curvemapping_initialize(curve_mapping); BKE_curvemapping_init(curve_mapping);
BKE_curvemap_reset( BKE_curvemap_reset(
curve_mapping->cm, &curve_mapping->clipr, CURVE_PRESET_MAX, CURVEMAP_SLOPE_POS_NEG); curve_mapping->cm, &curve_mapping->clipr, CURVE_PRESET_MAX, CURVEMAP_SLOPE_POS_NEG);
} }

@ -1958,7 +1958,7 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain)
GP_Sculpt_Settings *gset = &scene->toolsettings->gp_sculpt; GP_Sculpt_Settings *gset = &scene->toolsettings->gp_sculpt;
if ((gset) && (gset->cur_falloff == NULL)) { if ((gset) && (gset->cur_falloff == NULL)) {
gset->cur_falloff = BKE_curvemapping_add(1, 0.0f, 0.0f, 1.0f, 1.0f); gset->cur_falloff = BKE_curvemapping_add(1, 0.0f, 0.0f, 1.0f, 1.0f);
BKE_curvemapping_initialize(gset->cur_falloff); BKE_curvemapping_init(gset->cur_falloff);
BKE_curvemap_reset(gset->cur_falloff->cm, BKE_curvemap_reset(gset->cur_falloff->cm,
&gset->cur_falloff->clipr, &gset->cur_falloff->clipr,
CURVE_PRESET_GAUSS, CURVE_PRESET_GAUSS,
@ -3371,7 +3371,7 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain)
GP_Sculpt_Settings *gset = &scene->toolsettings->gp_sculpt; GP_Sculpt_Settings *gset = &scene->toolsettings->gp_sculpt;
if ((gset) && (gset->cur_primitive == NULL)) { if ((gset) && (gset->cur_primitive == NULL)) {
gset->cur_primitive = BKE_curvemapping_add(1, 0.0f, 0.0f, 1.0f, 1.0f); gset->cur_primitive = BKE_curvemapping_add(1, 0.0f, 0.0f, 1.0f, 1.0f);
BKE_curvemapping_initialize(gset->cur_primitive); BKE_curvemapping_init(gset->cur_primitive);
BKE_curvemap_reset(gset->cur_primitive->cm, BKE_curvemap_reset(gset->cur_primitive->cm,
&gset->cur_primitive->clipr, &gset->cur_primitive->clipr,
CURVE_PRESET_BELL, CURVE_PRESET_BELL,
@ -4767,7 +4767,7 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain)
if (mmd->curve_intensity == NULL) { if (mmd->curve_intensity == NULL) {
mmd->curve_intensity = BKE_curvemapping_add(1, 0.0f, 0.0f, 1.0f, 1.0f); mmd->curve_intensity = BKE_curvemapping_add(1, 0.0f, 0.0f, 1.0f, 1.0f);
if (mmd->curve_intensity) { if (mmd->curve_intensity) {
BKE_curvemapping_initialize(mmd->curve_intensity); BKE_curvemapping_init(mmd->curve_intensity);
} }
} }
break; break;
@ -4778,7 +4778,7 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain)
if (mmd->curve_intensity == NULL) { if (mmd->curve_intensity == NULL) {
mmd->curve_intensity = BKE_curvemapping_add(1, 0.0f, 0.0f, 1.0f, 1.0f); mmd->curve_intensity = BKE_curvemapping_add(1, 0.0f, 0.0f, 1.0f, 1.0f);
if (mmd->curve_intensity) { if (mmd->curve_intensity) {
BKE_curvemapping_initialize(mmd->curve_intensity); BKE_curvemapping_init(mmd->curve_intensity);
} }
} }
break; break;
@ -4788,7 +4788,7 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain)
if (mmd->curve_intensity == NULL) { if (mmd->curve_intensity == NULL) {
mmd->curve_intensity = BKE_curvemapping_add(1, 0.0f, 0.0f, 1.0f, 1.0f); mmd->curve_intensity = BKE_curvemapping_add(1, 0.0f, 0.0f, 1.0f, 1.0f);
if (mmd->curve_intensity) { if (mmd->curve_intensity) {
BKE_curvemapping_initialize(mmd->curve_intensity); BKE_curvemapping_init(mmd->curve_intensity);
} }
} }
break; break;
@ -4798,7 +4798,7 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain)
if (mmd->curve_intensity == NULL) { if (mmd->curve_intensity == NULL) {
mmd->curve_intensity = BKE_curvemapping_add(1, 0.0f, 0.0f, 1.0f, 1.0f); mmd->curve_intensity = BKE_curvemapping_add(1, 0.0f, 0.0f, 1.0f, 1.0f);
if (mmd->curve_intensity) { if (mmd->curve_intensity) {
BKE_curvemapping_initialize(mmd->curve_intensity); BKE_curvemapping_init(mmd->curve_intensity);
} }
} }
break; break;
@ -4808,7 +4808,7 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain)
if (mmd->curve_intensity == NULL) { if (mmd->curve_intensity == NULL) {
mmd->curve_intensity = BKE_curvemapping_add(1, 0.0f, 0.0f, 1.0f, 1.0f); mmd->curve_intensity = BKE_curvemapping_add(1, 0.0f, 0.0f, 1.0f, 1.0f);
if (mmd->curve_intensity) { if (mmd->curve_intensity) {
BKE_curvemapping_initialize(mmd->curve_intensity); BKE_curvemapping_init(mmd->curve_intensity);
} }
} }
break; break;

@ -106,7 +106,7 @@ static void blo_update_defaults_screen(bScreen *screen,
/* Some toolbars have been saved as initialized, /* Some toolbars have been saved as initialized,
* we don't want them to have odd zoom-level or scrolling set, see: T47047 */ * we don't want them to have odd zoom-level or scrolling set, see: T47047 */
if (ELEM(region->regiontype, RGN_TYPE_UI, RGN_TYPE_TOOLS, RGN_TYPE_TOOL_PROPS)) { if (ELEM(region->regiontype, RGN_TYPE_UI, RGN_TYPE_TOOLS, RGN_TYPE_TOOL_PROPS)) {
region->v2d.flag &= ~V2D_IS_INITIALISED; region->v2d.flag &= ~V2D_IS_INIT;
} }
} }
@ -326,7 +326,7 @@ static void blo_update_defaults_scene(Main *bmain, Scene *scene)
if (ts->gp_sculpt.cur_falloff == NULL) { if (ts->gp_sculpt.cur_falloff == NULL) {
ts->gp_sculpt.cur_falloff = BKE_curvemapping_add(1, 0.0f, 0.0f, 1.0f, 1.0f); ts->gp_sculpt.cur_falloff = BKE_curvemapping_add(1, 0.0f, 0.0f, 1.0f, 1.0f);
CurveMapping *gp_falloff_curve = ts->gp_sculpt.cur_falloff; CurveMapping *gp_falloff_curve = ts->gp_sculpt.cur_falloff;
BKE_curvemapping_initialize(gp_falloff_curve); BKE_curvemapping_init(gp_falloff_curve);
BKE_curvemap_reset(gp_falloff_curve->cm, BKE_curvemap_reset(gp_falloff_curve->cm,
&gp_falloff_curve->clipr, &gp_falloff_curve->clipr,
CURVE_PRESET_GAUSS, CURVE_PRESET_GAUSS,
@ -335,7 +335,7 @@ static void blo_update_defaults_scene(Main *bmain, Scene *scene)
if (ts->gp_sculpt.cur_primitive == NULL) { if (ts->gp_sculpt.cur_primitive == NULL) {
ts->gp_sculpt.cur_primitive = BKE_curvemapping_add(1, 0.0f, 0.0f, 1.0f, 1.0f); ts->gp_sculpt.cur_primitive = BKE_curvemapping_add(1, 0.0f, 0.0f, 1.0f, 1.0f);
CurveMapping *gp_primitive_curve = ts->gp_sculpt.cur_primitive; CurveMapping *gp_primitive_curve = ts->gp_sculpt.cur_primitive;
BKE_curvemapping_initialize(gp_primitive_curve); BKE_curvemapping_init(gp_primitive_curve);
BKE_curvemap_reset(gp_primitive_curve->cm, BKE_curvemap_reset(gp_primitive_curve->cm,
&gp_primitive_curve->clipr, &gp_primitive_curve->clipr,
CURVE_PRESET_BELL, CURVE_PRESET_BELL,

@ -2096,7 +2096,7 @@ void blo_do_versions_pre250(FileData *fd, Library *lib, Main *bmain)
if (la->curfalloff == NULL) { if (la->curfalloff == NULL) {
la->curfalloff = BKE_curvemapping_add(1, 0.0f, 1.0f, 1.0f, 0.0f); la->curfalloff = BKE_curvemapping_add(1, 0.0f, 1.0f, 1.0f, 0.0f);
BKE_curvemapping_initialize(la->curfalloff); BKE_curvemapping_init(la->curfalloff);
} }
} }
} }

@ -7156,7 +7156,7 @@ static void set_profile_spacing(BevelParams *bp, ProfileSpacing *pro_spacing, bo
if (custom) { if (custom) {
/* Make sure the curve profile's sample table is full. */ /* Make sure the curve profile's sample table is full. */
if (bp->custom_profile->segments_len != seg || !bp->custom_profile->segments) { if (bp->custom_profile->segments_len != seg || !bp->custom_profile->segments) {
BKE_curveprofile_initialize((CurveProfile *)bp->custom_profile, (short)seg); BKE_curveprofile_init((CurveProfile *)bp->custom_profile, (short)seg);
} }
/* Copy segment locations into the profile spacing struct. */ /* Copy segment locations into the profile spacing struct. */
@ -7185,7 +7185,7 @@ static void set_profile_spacing(BevelParams *bp, ProfileSpacing *pro_spacing, bo
(size_t)(seg_2 + 1) * sizeof(double)); (size_t)(seg_2 + 1) * sizeof(double));
if (custom) { if (custom) {
/* Make sure the curve profile widget's sample table is full of the seg_2 samples. */ /* Make sure the curve profile widget's sample table is full of the seg_2 samples. */
BKE_curveprofile_initialize((CurveProfile *)bp->custom_profile, (short)seg_2); BKE_curveprofile_init((CurveProfile *)bp->custom_profile, (short)seg_2);
/* Copy segment locations into the profile spacing struct. */ /* Copy segment locations into the profile spacing struct. */
for (int i = 0; i < seg_2 + 1; i++) { for (int i = 0; i < seg_2 + 1; i++) {

@ -49,7 +49,7 @@ void TimeNode::convertToOperations(NodeConverter &converter,
fac = (context.getFramenumber() - node->custom1) / (float)(node->custom2 - node->custom1); fac = (context.getFramenumber() - node->custom1) / (float)(node->custom2 - node->custom1);
} }
BKE_curvemapping_initialize((CurveMapping *)node->storage); BKE_curvemapping_init((CurveMapping *)node->storage);
fac = BKE_curvemapping_evaluateF((CurveMapping *)node->storage, 0, fac); fac = BKE_curvemapping_evaluateF((CurveMapping *)node->storage, 0, fac);
operation->setValue(clamp_f(fac, 0.0f, 1.0f)); operation->setValue(clamp_f(fac, 0.0f, 1.0f));
converter.addOperation(operation); converter.addOperation(operation);

@ -35,7 +35,7 @@ CurveBaseOperation::~CurveBaseOperation()
void CurveBaseOperation::initExecution() void CurveBaseOperation::initExecution()
{ {
BKE_curvemapping_initialize(this->m_curveMapping); BKE_curvemapping_init(this->m_curveMapping);
} }
void CurveBaseOperation::deinitExecution() void CurveBaseOperation::deinitExecution()
{ {

@ -1137,7 +1137,7 @@ int ED_curve_updateAnimPaths(Main *bmain, Curve *cu)
/** \name Edit Mode Conversion (Make & Load) /** \name Edit Mode Conversion (Make & Load)
* \{ */ * \{ */
static int *initialize_index_map(Object *obedit, int *r_old_totvert) static int *init_index_map(Object *obedit, int *r_old_totvert)
{ {
Curve *curve = (Curve *)obedit->data; Curve *curve = (Curve *)obedit->data;
EditNurb *editnurb = curve->editnurb; EditNurb *editnurb = curve->editnurb;
@ -1225,7 +1225,7 @@ static void remap_hooks_and_vertex_parents(Main *bmain, Object *obedit)
if ((object->parent) && (object->parent->data == curve) && if ((object->parent) && (object->parent->data == curve) &&
ELEM(object->partype, PARVERT1, PARVERT3)) { ELEM(object->partype, PARVERT1, PARVERT3)) {
if (old_to_new_map == NULL) { if (old_to_new_map == NULL) {
old_to_new_map = initialize_index_map(obedit, &old_totvert); old_to_new_map = init_index_map(obedit, &old_totvert);
} }
if (object->par1 < old_totvert) { if (object->par1 < old_totvert) {
@ -1254,7 +1254,7 @@ static void remap_hooks_and_vertex_parents(Main *bmain, Object *obedit)
int i, j; int i, j;
if (old_to_new_map == NULL) { if (old_to_new_map == NULL) {
old_to_new_map = initialize_index_map(obedit, &old_totvert); old_to_new_map = init_index_map(obedit, &old_totvert);
} }
for (i = j = 0; i < hmd->totindex; i++) { for (i = j = 0; i < hmd->totindex; i++) {

@ -999,7 +999,7 @@ static int gizmo_cage2d_modal(bContext *C,
if (data->dial == NULL) { if (data->dial == NULL) {
MUL_V2_V3_M4_FINAL(test_co, data->orig_matrix_offset[3]); MUL_V2_V3_M4_FINAL(test_co, data->orig_matrix_offset[3]);
data->dial = BLI_dial_initialize(test_co, FLT_EPSILON); data->dial = BLI_dial_init(test_co, FLT_EPSILON);
MUL_V2_V3_M4_FINAL(test_co, data->orig_mouse); MUL_V2_V3_M4_FINAL(test_co, data->orig_mouse);
BLI_dial_angle(data->dial, test_co); BLI_dial_angle(data->dial, test_co);

@ -1817,15 +1817,15 @@ static void gpencil_init_drawing_brush(bContext *C, tGPsdata *p)
changed = true; changed = true;
} }
/* Be sure curves are initializated. */ /* Be sure curves are initializated. */
BKE_curvemapping_initialize(paint->brush->gpencil_settings->curve_sensitivity); BKE_curvemapping_init(paint->brush->gpencil_settings->curve_sensitivity);
BKE_curvemapping_initialize(paint->brush->gpencil_settings->curve_strength); BKE_curvemapping_init(paint->brush->gpencil_settings->curve_strength);
BKE_curvemapping_initialize(paint->brush->gpencil_settings->curve_jitter); BKE_curvemapping_init(paint->brush->gpencil_settings->curve_jitter);
BKE_curvemapping_initialize(paint->brush->gpencil_settings->curve_rand_pressure); BKE_curvemapping_init(paint->brush->gpencil_settings->curve_rand_pressure);
BKE_curvemapping_initialize(paint->brush->gpencil_settings->curve_rand_strength); BKE_curvemapping_init(paint->brush->gpencil_settings->curve_rand_strength);
BKE_curvemapping_initialize(paint->brush->gpencil_settings->curve_rand_uv); BKE_curvemapping_init(paint->brush->gpencil_settings->curve_rand_uv);
BKE_curvemapping_initialize(paint->brush->gpencil_settings->curve_rand_hue); BKE_curvemapping_init(paint->brush->gpencil_settings->curve_rand_hue);
BKE_curvemapping_initialize(paint->brush->gpencil_settings->curve_rand_saturation); BKE_curvemapping_init(paint->brush->gpencil_settings->curve_rand_saturation);
BKE_curvemapping_initialize(paint->brush->gpencil_settings->curve_rand_value); BKE_curvemapping_init(paint->brush->gpencil_settings->curve_rand_value);
/* assign to temp tGPsdata */ /* assign to temp tGPsdata */
p->brush = paint->brush; p->brush = paint->brush;

@ -740,13 +740,13 @@ static void gpencil_primitive_update_strokes(bContext *C, tGPDprimitive *tgpi)
gpencil_session_validatebuffer(tgpi); gpencil_session_validatebuffer(tgpi);
gpencil_init_colors(tgpi); gpencil_init_colors(tgpi);
if (gset->flag & GP_SCULPT_SETT_FLAG_PRIMITIVE_CURVE) { if (gset->flag & GP_SCULPT_SETT_FLAG_PRIMITIVE_CURVE) {
BKE_curvemapping_initialize(ts->gp_sculpt.cur_primitive); BKE_curvemapping_init(ts->gp_sculpt.cur_primitive);
} }
if (brush_settings->flag & GP_BRUSH_USE_JITTER_PRESSURE) { if (brush_settings->flag & GP_BRUSH_USE_JITTER_PRESSURE) {
BKE_curvemapping_initialize(brush_settings->curve_jitter); BKE_curvemapping_init(brush_settings->curve_jitter);
} }
if (brush_settings->flag & GP_BRUSH_USE_STENGTH_PRESSURE) { if (brush_settings->flag & GP_BRUSH_USE_STENGTH_PRESSURE) {
BKE_curvemapping_initialize(brush_settings->curve_strength); BKE_curvemapping_init(brush_settings->curve_strength);
} }
/* get an array of depths, far depths are blended */ /* get an array of depths, far depths are blended */

@ -1188,7 +1188,7 @@ static bool gpencil_sculpt_brush_init(bContext *C, wmOperator *op)
Paint *paint = &ts->gp_sculptpaint->paint; Paint *paint = &ts->gp_sculptpaint->paint;
gso->brush = paint->brush; gso->brush = paint->brush;
BKE_curvemapping_initialize(gso->brush->curve); BKE_curvemapping_init(gso->brush->curve);
/* save mask */ /* save mask */
gso->mask = ts->gpencil_selectmode_sculpt; gso->mask = ts->gpencil_selectmode_sculpt;
@ -1200,7 +1200,7 @@ static bool gpencil_sculpt_brush_init(bContext *C, wmOperator *op)
/* Init multi-edit falloff curve data before doing anything, /* Init multi-edit falloff curve data before doing anything,
* so we won't have to do it again later. */ * so we won't have to do it again later. */
if (gso->is_multiframe) { if (gso->is_multiframe) {
BKE_curvemapping_initialize(ts->gp_sculpt.cur_falloff); BKE_curvemapping_init(ts->gp_sculpt.cur_falloff);
} }
/* initialise custom data for brushes */ /* initialise custom data for brushes */

@ -1500,7 +1500,7 @@ void ED_gpencil_add_defaults(bContext *C, Object *ob)
if (ts->gp_sculpt.cur_falloff == NULL) { if (ts->gp_sculpt.cur_falloff == NULL) {
ts->gp_sculpt.cur_falloff = BKE_curvemapping_add(1, 0.0f, 0.0f, 1.0f, 1.0f); ts->gp_sculpt.cur_falloff = BKE_curvemapping_add(1, 0.0f, 0.0f, 1.0f, 1.0f);
CurveMapping *gp_falloff_curve = ts->gp_sculpt.cur_falloff; CurveMapping *gp_falloff_curve = ts->gp_sculpt.cur_falloff;
BKE_curvemapping_initialize(gp_falloff_curve); BKE_curvemapping_init(gp_falloff_curve);
BKE_curvemap_reset(gp_falloff_curve->cm, BKE_curvemap_reset(gp_falloff_curve->cm,
&gp_falloff_curve->clipr, &gp_falloff_curve->clipr,
CURVE_PRESET_GAUSS, CURVE_PRESET_GAUSS,

@ -727,7 +727,7 @@ static bool gpencil_vertexpaint_brush_init(bContext *C, wmOperator *op)
gso->brush = paint->brush; gso->brush = paint->brush;
srgb_to_linearrgb_v3_v3(gso->linear_color, gso->brush->rgb); srgb_to_linearrgb_v3_v3(gso->linear_color, gso->brush->rgb);
BKE_curvemapping_initialize(gso->brush->curve); BKE_curvemapping_init(gso->brush->curve);
gso->is_painting = false; gso->is_painting = false;
gso->first = true; gso->first = true;
@ -759,7 +759,7 @@ static bool gpencil_vertexpaint_brush_init(bContext *C, wmOperator *op)
/* Init multi-edit falloff curve data before doing anything, /* Init multi-edit falloff curve data before doing anything,
* so we won't have to do it again later. */ * so we won't have to do it again later. */
if (gso->is_multiframe) { if (gso->is_multiframe) {
BKE_curvemapping_initialize(ts->gp_sculpt.cur_falloff); BKE_curvemapping_init(ts->gp_sculpt.cur_falloff);
} }
/* Setup space conversions. */ /* Setup space conversions. */

@ -295,7 +295,7 @@ static bool gpencil_weightpaint_brush_init(bContext *C, wmOperator *op)
gso->bmain = CTX_data_main(C); gso->bmain = CTX_data_main(C);
gso->brush = paint->brush; gso->brush = paint->brush;
BKE_curvemapping_initialize(gso->brush->curve); BKE_curvemapping_init(gso->brush->curve);
gso->is_painting = false; gso->is_painting = false;
gso->first = true; gso->first = true;
@ -326,7 +326,7 @@ static bool gpencil_weightpaint_brush_init(bContext *C, wmOperator *op)
/* Init multi-edit falloff curve data before doing anything, /* Init multi-edit falloff curve data before doing anything,
* so we won't have to do it again later. */ * so we won't have to do it again later. */
if (gso->is_multiframe) { if (gso->is_multiframe) {
BKE_curvemapping_initialize(ts->gp_sculpt.cur_falloff); BKE_curvemapping_init(ts->gp_sculpt.cur_falloff);
} }
/* Setup space conversions. */ /* Setup space conversions. */

@ -73,7 +73,7 @@ void ED_region_exit(struct bContext *C, struct ARegion *region);
void ED_region_remove(struct bContext *C, struct ScrArea *area, struct ARegion *region); void ED_region_remove(struct bContext *C, struct ScrArea *area, struct ARegion *region);
void ED_region_pixelspace(struct ARegion *region); void ED_region_pixelspace(struct ARegion *region);
void ED_region_update_rect(struct ARegion *region); void ED_region_update_rect(struct ARegion *region);
void ED_region_floating_initialize(struct ARegion *region); void ED_region_floating_init(struct ARegion *region);
void ED_region_tag_redraw(struct ARegion *region); void ED_region_tag_redraw(struct ARegion *region);
void ED_region_tag_redraw_partial(struct ARegion *region, const struct rcti *rct, bool rebuild); void ED_region_tag_redraw_partial(struct ARegion *region, const struct rcti *rct, bool rebuild);
void ED_region_tag_redraw_cursor(struct ARegion *region); void ED_region_tag_redraw_cursor(struct ARegion *region);
@ -171,7 +171,7 @@ void ED_spacetypes_keymap(struct wmKeyConfig *keyconf);
int ED_area_header_switchbutton(const struct bContext *C, struct uiBlock *block, int yco); int ED_area_header_switchbutton(const struct bContext *C, struct uiBlock *block, int yco);
/* areas */ /* areas */
void ED_area_initialize(struct wmWindowManager *wm, struct wmWindow *win, struct ScrArea *area); void ED_area_init(struct wmWindowManager *wm, struct wmWindow *win, struct ScrArea *area);
void ED_area_exit(struct bContext *C, struct ScrArea *area); void ED_area_exit(struct bContext *C, struct ScrArea *area);
int ED_screen_area_active(const struct bContext *C); int ED_screen_area_active(const struct bContext *C);
void ED_screen_global_areas_refresh(struct wmWindow *win); void ED_screen_global_areas_refresh(struct wmWindow *win);
@ -221,7 +221,7 @@ ScrArea *ED_screen_areas_iter_next(const bScreen *screen, const ScrArea *area);
vert_name->next) vert_name->next)
/* screens */ /* screens */
void ED_screens_initialize(struct Main *bmain, struct wmWindowManager *wm); void ED_screens_init(struct Main *bmain, struct wmWindowManager *wm);
void ED_screen_draw_edges(struct wmWindow *win); void ED_screen_draw_edges(struct wmWindow *win);
void ED_screen_draw_join_shape(struct ScrArea *sa1, struct ScrArea *sa2); void ED_screen_draw_join_shape(struct ScrArea *sa1, struct ScrArea *sa2);
void ED_screen_draw_split_preview(struct ScrArea *area, const int dir, const float fac); void ED_screen_draw_split_preview(struct ScrArea *area, const int dir, const float fac);

@ -367,7 +367,7 @@ void ED_area_type_hud_ensure(bContext *C, ScrArea *area)
ED_area_update_region_sizes(wm, win, area); ED_area_update_region_sizes(wm, win, area);
} }
ED_region_floating_initialize(region); ED_region_floating_init(region);
ED_region_tag_redraw(region); ED_region_tag_redraw(region);
/* Reset zoom level (not well supported). */ /* Reset zoom level (not well supported). */

@ -759,7 +759,7 @@ uiBlock *ui_popup_block_refresh(bContext *C,
ui_popup_block_scrolltest(block); ui_popup_block_scrolltest(block);
/* adds subwindow */ /* adds subwindow */
ED_region_floating_initialize(region); ED_region_floating_init(region);
/* get winmat now that we actually have the subwindow */ /* get winmat now that we actually have the subwindow */
wmGetProjectionMatrix(block->winmat, &region->winrct); wmGetProjectionMatrix(block->winmat, &region->winrct);

@ -819,7 +819,7 @@ ARegion *ui_searchbox_create_generic(bContext *C, ARegion *butregion, uiBut *but
} }
/* adds subwindow */ /* adds subwindow */
ED_region_floating_initialize(region); ED_region_floating_init(region);
/* notify change and redraw */ /* notify change and redraw */
ED_region_tag_redraw(region); ED_region_tag_redraw(region);

@ -1386,7 +1386,7 @@ static ARegion *ui_tooltip_create_with_data(bContext *C,
} }
/* adds subwindow */ /* adds subwindow */
ED_region_floating_initialize(region); ED_region_floating_init(region);
/* notify change and redraw */ /* notify change and redraw */
ED_region_tag_redraw(region); ED_region_tag_redraw(region);

@ -242,7 +242,7 @@ void UI_view2d_region_reinit(View2D *v2d, short type, int winx, int winy)
bool tot_changed = false, do_init; bool tot_changed = false, do_init;
const uiStyle *style = UI_style_get(); const uiStyle *style = UI_style_get();
do_init = (v2d->flag & V2D_IS_INITIALISED) == 0; do_init = (v2d->flag & V2D_IS_INIT) == 0;
/* see eView2D_CommonViewTypes in UI_view2d.h for available view presets */ /* see eView2D_CommonViewTypes in UI_view2d.h for available view presets */
switch (type) { switch (type) {
@ -375,7 +375,7 @@ void UI_view2d_region_reinit(View2D *v2d, short type, int winx, int winy)
} }
/* set initialized flag so that View2D doesn't get reinitialised next time again */ /* set initialized flag so that View2D doesn't get reinitialised next time again */
v2d->flag |= V2D_IS_INITIALISED; v2d->flag |= V2D_IS_INIT;
/* store view size */ /* store view size */
v2d->winx = winx; v2d->winx = winx;

@ -56,7 +56,7 @@ static bool view2d_poll(bContext *C)
{ {
ARegion *region = CTX_wm_region(C); ARegion *region = CTX_wm_region(C);
return (region != NULL) && (region->v2d.flag & V2D_IS_INITIALISED); return (region != NULL) && (region->v2d.flag & V2D_IS_INIT);
} }
/** \} */ /** \} */

@ -673,7 +673,7 @@ static void build_image_lookup(Main *bmain, Object *ob, BakeImages *bake_images)
/* /*
* returns the total number of pixels * returns the total number of pixels
*/ */
static size_t initialize_internal_images(BakeImages *bake_images, ReportList *reports) static size_t init_internal_images(BakeImages *bake_images, ReportList *reports)
{ {
int i; int i;
size_t tot_size = 0; size_t tot_size = 0;
@ -828,7 +828,7 @@ static int bake(Render *re,
build_image_lookup(bmain, ob_low, &bake_images); build_image_lookup(bmain, ob_low, &bake_images);
if (is_save_internal) { if (is_save_internal) {
num_pixels = initialize_internal_images(&bake_images, reports); num_pixels = init_internal_images(&bake_images, reports);
if (num_pixels == 0) { if (num_pixels == 0) {
goto cleanup; goto cleanup;

@ -4346,7 +4346,7 @@ static int brush_add(const bContext *C, PEData *data, short number)
} }
pa->size = 1.0f; pa->size = 1.0f;
initialize_particle(&sim, pa); init_particle(&sim, pa);
reset_particle(&sim, pa, 0.0, 1.0); reset_particle(&sim, pa, 0.0, 1.0);
point->flag |= PEP_EDIT_RECALC; point->flag |= PEP_EDIT_RECALC;
if (pe_x_mirror(ob)) { if (pe_x_mirror(ob)) {

@ -962,7 +962,7 @@ static void screen_opengl_render_cancel(bContext *C, wmOperator *op)
} }
/* share between invoke and exec */ /* share between invoke and exec */
static bool screen_opengl_render_anim_initialize(bContext *C, wmOperator *op) static bool screen_opengl_render_anim_init(bContext *C, wmOperator *op)
{ {
/* initialize animation */ /* initialize animation */
OGLRender *oglrender; OGLRender *oglrender;
@ -1256,7 +1256,7 @@ static int screen_opengl_render_invoke(bContext *C, wmOperator *op, const wmEven
} }
if (anim) { if (anim) {
if (!screen_opengl_render_anim_initialize(C, op)) { if (!screen_opengl_render_anim_init(C, op)) {
return OPERATOR_CANCELLED; return OPERATOR_CANCELLED;
} }
} }
@ -1292,7 +1292,7 @@ static int screen_opengl_render_exec(bContext *C, wmOperator *op)
bool ret = true; bool ret = true;
if (!screen_opengl_render_anim_initialize(C, op)) { if (!screen_opengl_render_anim_init(C, op)) {
return OPERATOR_CANCELLED; return OPERATOR_CANCELLED;
} }

@ -813,7 +813,7 @@ void ED_workspace_status_text(bContext *C, const char *str)
/* ************************************************************ */ /* ************************************************************ */
static void area_azone_initialize(wmWindow *win, const bScreen *screen, ScrArea *area) static void area_azone_init(wmWindow *win, const bScreen *screen, ScrArea *area)
{ {
AZone *az; AZone *az;
@ -883,7 +883,7 @@ static void area_azone_initialize(wmWindow *win, const bScreen *screen, ScrArea
} }
} }
static void fullscreen_azone_initialize(ScrArea *area, ARegion *region) static void fullscreen_azone_init(ScrArea *area, ARegion *region)
{ {
AZone *az; AZone *az;
@ -1007,10 +1007,10 @@ static bool region_azone_edge_poll(const ARegion *region, const bool is_fullscre
return true; return true;
} }
static void region_azone_edge_initialize(ScrArea *area, static void region_azone_edge_init(ScrArea *area,
ARegion *region, ARegion *region,
AZEdge edge, AZEdge edge,
const bool is_fullscreen) const bool is_fullscreen)
{ {
AZone *az = NULL; AZone *az = NULL;
const bool is_hidden = (region->flag & (RGN_FLAG_HIDDEN | RGN_FLAG_TOO_SMALL)); const bool is_hidden = (region->flag & (RGN_FLAG_HIDDEN | RGN_FLAG_TOO_SMALL));
@ -1033,9 +1033,9 @@ static void region_azone_edge_initialize(ScrArea *area,
} }
} }
static void region_azone_scrollbar_initialize(ScrArea *area, static void region_azone_scrollbar_init(ScrArea *area,
ARegion *region, ARegion *region,
AZScrollDirection direction) AZScrollDirection direction)
{ {
rcti scroller_vert = (direction == AZ_SCROLL_VERT) ? region->v2d.vert : region->v2d.hor; rcti scroller_vert = (direction == AZ_SCROLL_VERT) ? region->v2d.vert : region->v2d.hor;
AZone *az = MEM_callocN(sizeof(*az), __func__); AZone *az = MEM_callocN(sizeof(*az), __func__);
@ -1061,16 +1061,16 @@ static void region_azone_scrollbar_initialize(ScrArea *area,
BLI_rcti_init(&az->rect, az->x1, az->x2, az->y1, az->y2); BLI_rcti_init(&az->rect, az->x1, az->x2, az->y1, az->y2);
} }
static void region_azones_scrollbars_initialize(ScrArea *area, ARegion *region) static void region_azones_scrollbars_init(ScrArea *area, ARegion *region)
{ {
const View2D *v2d = &region->v2d; const View2D *v2d = &region->v2d;
if ((v2d->scroll & V2D_SCROLL_VERTICAL) && ((v2d->scroll & V2D_SCROLL_VERTICAL_HANDLES) == 0)) { if ((v2d->scroll & V2D_SCROLL_VERTICAL) && ((v2d->scroll & V2D_SCROLL_VERTICAL_HANDLES) == 0)) {
region_azone_scrollbar_initialize(area, region, AZ_SCROLL_VERT); region_azone_scrollbar_init(area, region, AZ_SCROLL_VERT);
} }
if ((v2d->scroll & V2D_SCROLL_HORIZONTAL) && if ((v2d->scroll & V2D_SCROLL_HORIZONTAL) &&
((v2d->scroll & V2D_SCROLL_HORIZONTAL_HANDLES) == 0)) { ((v2d->scroll & V2D_SCROLL_HORIZONTAL_HANDLES) == 0)) {
region_azone_scrollbar_initialize(area, region, AZ_SCROLL_HOR); region_azone_scrollbar_init(area, region, AZ_SCROLL_HOR);
} }
} }
@ -1083,16 +1083,16 @@ static void region_azones_add_edge(ScrArea *area,
/* edge code (t b l r) is along which area edge azone will be drawn */ /* edge code (t b l r) is along which area edge azone will be drawn */
if (alignment == RGN_ALIGN_TOP) { if (alignment == RGN_ALIGN_TOP) {
region_azone_edge_initialize(area, region, AE_BOTTOM_TO_TOPLEFT, is_fullscreen); region_azone_edge_init(area, region, AE_BOTTOM_TO_TOPLEFT, is_fullscreen);
} }
else if (alignment == RGN_ALIGN_BOTTOM) { else if (alignment == RGN_ALIGN_BOTTOM) {
region_azone_edge_initialize(area, region, AE_TOP_TO_BOTTOMRIGHT, is_fullscreen); region_azone_edge_init(area, region, AE_TOP_TO_BOTTOMRIGHT, is_fullscreen);
} }
else if (alignment == RGN_ALIGN_RIGHT) { else if (alignment == RGN_ALIGN_RIGHT) {
region_azone_edge_initialize(area, region, AE_LEFT_TO_TOPRIGHT, is_fullscreen); region_azone_edge_init(area, region, AE_LEFT_TO_TOPRIGHT, is_fullscreen);
} }
else if (alignment == RGN_ALIGN_LEFT) { else if (alignment == RGN_ALIGN_LEFT) {
region_azone_edge_initialize(area, region, AE_RIGHT_TO_TOPLEFT, is_fullscreen); region_azone_edge_init(area, region, AE_RIGHT_TO_TOPLEFT, is_fullscreen);
} }
} }
@ -1116,10 +1116,10 @@ static void region_azones_add(const bScreen *screen, ScrArea *area, ARegion *reg
} }
if (is_fullscreen) { if (is_fullscreen) {
fullscreen_azone_initialize(area, region); fullscreen_azone_init(area, region);
} }
region_azones_scrollbars_initialize(area, region); region_azones_scrollbars_init(area, region);
} }
/* dir is direction to check, not the splitting edge direction! */ /* dir is direction to check, not the splitting edge direction! */
@ -1828,7 +1828,7 @@ void ED_area_update_region_sizes(wmWindowManager *wm, wmWindow *win, ScrArea *ar
region_rect_recursive(area, area->regionbase.first, &rect, &overlap_rect, 0); region_rect_recursive(area, area->regionbase.first, &rect, &overlap_rect, 0);
/* Dynamically sized regions may have changed region sizes, so we have to force azone update. */ /* Dynamically sized regions may have changed region sizes, so we have to force azone update. */
area_azone_initialize(win, screen, area); area_azone_init(win, screen, area);
LISTBASE_FOREACH (ARegion *, region, &area->regionbase) { LISTBASE_FOREACH (ARegion *, region, &area->regionbase) {
region_subwindow(region); region_subwindow(region);
@ -1847,7 +1847,7 @@ void ED_area_update_region_sizes(wmWindowManager *wm, wmWindow *win, ScrArea *ar
} }
/* called in screen_refresh, or screens_init, also area size changes */ /* called in screen_refresh, or screens_init, also area size changes */
void ED_area_initialize(wmWindowManager *wm, wmWindow *win, ScrArea *area) void ED_area_init(wmWindowManager *wm, wmWindow *win, ScrArea *area)
{ {
WorkSpace *workspace = WM_window_get_active_workspace(win); WorkSpace *workspace = WM_window_get_active_workspace(win);
const bScreen *screen = BKE_workspace_active_screen_get(win->workspace_hook); const bScreen *screen = BKE_workspace_active_screen_get(win->workspace_hook);
@ -1890,7 +1890,7 @@ void ED_area_initialize(wmWindowManager *wm, wmWindow *win, ScrArea *area)
} }
/* clear all azones, add the area triangle widgets */ /* clear all azones, add the area triangle widgets */
area_azone_initialize(win, screen, area); area_azone_init(win, screen, area);
/* region windows, default and own handlers */ /* region windows, default and own handlers */
for (region = area->regionbase.first; region; region = region->next) { for (region = area->regionbase.first; region; region = region->next) {
@ -1944,7 +1944,7 @@ void ED_region_update_rect(ARegion *region)
} }
/* externally called for floating regions like menus */ /* externally called for floating regions like menus */
void ED_region_floating_initialize(ARegion *region) void ED_region_floating_init(ARegion *region)
{ {
BLI_assert(region->alignment == RGN_ALIGN_FLOAT); BLI_assert(region->alignment == RGN_ALIGN_FLOAT);
@ -1980,7 +1980,7 @@ void ED_region_visibility_change_update(bContext *C, ScrArea *area, ARegion *reg
WM_event_remove_handlers(C, &region->handlers); WM_event_remove_handlers(C, &region->handlers);
} }
ED_area_initialize(CTX_wm_manager(C), CTX_wm_window(C), area); ED_area_init(CTX_wm_manager(C), CTX_wm_window(C), area);
ED_area_tag_redraw(area); ED_area_tag_redraw(area);
} }
@ -2066,8 +2066,8 @@ void ED_area_swapspace(bContext *C, ScrArea *sa1, ScrArea *sa2)
ED_area_data_copy(tmp, sa1, false); ED_area_data_copy(tmp, sa1, false);
ED_area_data_copy(sa1, sa2, true); ED_area_data_copy(sa1, sa2, true);
ED_area_data_copy(sa2, tmp, true); ED_area_data_copy(sa2, tmp, true);
ED_area_initialize(CTX_wm_manager(C), win, sa1); ED_area_init(CTX_wm_manager(C), win, sa1);
ED_area_initialize(CTX_wm_manager(C), win, sa2); ED_area_init(CTX_wm_manager(C), win, sa2);
BKE_screen_area_free(tmp); BKE_screen_area_free(tmp);
MEM_freeN(tmp); MEM_freeN(tmp);
@ -2204,7 +2204,7 @@ void ED_area_newspace(bContext *C, ScrArea *area, int type, const bool skip_regi
} }
} }
ED_area_initialize(CTX_wm_manager(C), win, area); ED_area_init(CTX_wm_manager(C), win, area);
/* tell WM to refresh, cursor types etc */ /* tell WM to refresh, cursor types etc */
WM_event_add_mousemove(win); WM_event_add_mousemove(win);

@ -516,7 +516,7 @@ void ED_screen_refresh(wmWindowManager *wm, wmWindow *win)
ED_screen_areas_iter (win, screen, area) { ED_screen_areas_iter (win, screen, area) {
/* set spacetype and region callbacks, calls init() */ /* set spacetype and region callbacks, calls init() */
/* sets subwindows for regions, adds handlers */ /* sets subwindows for regions, adds handlers */
ED_area_initialize(wm, win, area); ED_area_init(wm, win, area);
} }
/* wake up animtimer */ /* wake up animtimer */
@ -536,7 +536,7 @@ void ED_screen_refresh(wmWindowManager *wm, wmWindow *win)
} }
/* file read, set all screens, ... */ /* file read, set all screens, ... */
void ED_screens_initialize(Main *bmain, wmWindowManager *wm) void ED_screens_init(Main *bmain, wmWindowManager *wm)
{ {
wmWindow *win; wmWindow *win;

@ -5184,7 +5184,7 @@ static void region_blend_end(bContext *C, ARegion *region, const bool is_running
else { else {
if (rgi->hidden) { if (rgi->hidden) {
rgi->region->flag |= rgi->hidden; rgi->region->flag |= rgi->hidden;
ED_area_initialize(CTX_wm_manager(C), CTX_wm_window(C), rgi->area); ED_area_init(CTX_wm_manager(C), CTX_wm_window(C), rgi->area);
} }
/* area decoration needs redraw in end */ /* area decoration needs redraw in end */
ED_area_tag_redraw(rgi->area); ED_area_tag_redraw(rgi->area);
@ -5215,7 +5215,7 @@ void ED_region_visibility_change_update_animated(bContext *C, ScrArea *area, ARe
/* blend in, reinitialize regions because it got unhidden */ /* blend in, reinitialize regions because it got unhidden */
if (rgi->hidden == 0) { if (rgi->hidden == 0) {
ED_area_initialize(wm, win, area); ED_area_init(wm, win, area);
} }
else { else {
WM_event_remove_handlers(C, &region->handlers); WM_event_remove_handlers(C, &region->handlers);

@ -455,7 +455,7 @@ static int load_tex_cursor(Brush *br, ViewContext *vc, float zoom)
} }
buffer = MEM_mallocN(sizeof(GLubyte) * size * size, "load_tex"); buffer = MEM_mallocN(sizeof(GLubyte) * size * size, "load_tex");
BKE_curvemapping_initialize(br->curve); BKE_curvemapping_init(br->curve);
LoadTexData data = { LoadTexData data = {
.br = br, .br = br,

@ -6173,7 +6173,7 @@ static bool texture_paint_image_from_view_poll(bContext *C)
CTX_wm_operator_poll_msg_set(C, "No 3D viewport found to create image from"); CTX_wm_operator_poll_msg_set(C, "No 3D viewport found to create image from");
return false; return false;
} }
if (G.background || !GPU_is_initialized()) { if (G.background || !GPU_is_init()) {
return false; return false;
} }
return true; return true;

@ -920,9 +920,9 @@ PaintStroke *paint_stroke_new(bContext *C,
ups->average_stroke_counter = 0; ups->average_stroke_counter = 0;
/* initialize here to avoid initialization conflict with threaded strokes */ /* initialize here to avoid initialization conflict with threaded strokes */
BKE_curvemapping_initialize(br->curve); BKE_curvemapping_init(br->curve);
if (p->flags & PAINT_USE_CAVITY_MASK) { if (p->flags & PAINT_USE_CAVITY_MASK) {
BKE_curvemapping_initialize(p->cavity_curve); BKE_curvemapping_init(p->cavity_curve);
} }
BKE_paint_set_overlay_override(br->overlay_flags); BKE_paint_set_overlay_override(br->overlay_flags);

@ -811,7 +811,7 @@ static int paint_weight_gradient_exec(bContext *C, wmOperator *op)
VPaint *wp = ts->wpaint; VPaint *wp = ts->wpaint;
struct Brush *brush = BKE_paint_brush(&wp->paint); struct Brush *brush = BKE_paint_brush(&wp->paint);
BKE_curvemapping_initialize(brush->curve); BKE_curvemapping_init(brush->curve);
data.brush = brush; data.brush = brush;
data.weightpaint = BKE_brush_weight_get(scene, brush); data.weightpaint = BKE_brush_weight_get(scene, brush);

@ -2966,7 +2966,7 @@ static void do_draw_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode)
/* XXX - this shouldn't be necessary, but sculpting crashes in blender2.8 otherwise /* XXX - this shouldn't be necessary, but sculpting crashes in blender2.8 otherwise
* initialize before threads so they can do curve mapping. */ * initialize before threads so they can do curve mapping. */
BKE_curvemapping_initialize(brush->curve); BKE_curvemapping_init(brush->curve);
/* Threaded loop over nodes. */ /* Threaded loop over nodes. */
SculptThreadedTaskData data = { SculptThreadedTaskData data = {
@ -3043,7 +3043,7 @@ static void do_draw_sharp_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int to
/* XXX - this shouldn't be necessary, but sculpting crashes in blender2.8 otherwise /* XXX - this shouldn't be necessary, but sculpting crashes in blender2.8 otherwise
* initialize before threads so they can do curve mapping. */ * initialize before threads so they can do curve mapping. */
BKE_curvemapping_initialize(brush->curve); BKE_curvemapping_init(brush->curve);
/* Threaded loop over nodes. */ /* Threaded loop over nodes. */
SculptThreadedTaskData data = { SculptThreadedTaskData data = {
@ -3273,7 +3273,7 @@ static void do_slide_relax_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int t
return; return;
} }
BKE_curvemapping_initialize(brush->curve); BKE_curvemapping_init(brush->curve);
SculptThreadedTaskData data = { SculptThreadedTaskData data = {
.sd = sd, .sd = sd,
@ -6390,7 +6390,7 @@ static void sculpt_update_cache_invariants(
brush = br; brush = br;
cache->saved_smooth_size = BKE_brush_size_get(scene, brush); cache->saved_smooth_size = BKE_brush_size_get(scene, brush);
BKE_brush_size_set(scene, brush, size); BKE_brush_size_set(scene, brush, size);
BKE_curvemapping_initialize(brush->curve); BKE_curvemapping_init(brush->curve);
} }
} }
} }
@ -6458,7 +6458,7 @@ static void sculpt_update_cache_invariants(
#define PIXEL_INPUT_THRESHHOLD 5 #define PIXEL_INPUT_THRESHHOLD 5
if (brush->sculpt_tool == SCULPT_TOOL_ROTATE) { if (brush->sculpt_tool == SCULPT_TOOL_ROTATE) {
cache->dial = BLI_dial_initialize(cache->initial_mouse, PIXEL_INPUT_THRESHHOLD); cache->dial = BLI_dial_init(cache->initial_mouse, PIXEL_INPUT_THRESHHOLD);
} }
#undef PIXEL_INPUT_THRESHHOLD #undef PIXEL_INPUT_THRESHHOLD

@ -680,7 +680,7 @@ static void cloth_brush_apply_brush_foces(Sculpt *sd, Object *ob, PBVHNode **nod
.mat = imat, .mat = imat,
}; };
BKE_curvemapping_initialize(brush->curve); BKE_curvemapping_init(brush->curve);
/* Init the grab delta. */ /* Init the grab delta. */
copy_v3_v3(grab_delta, ss->cache->grab_delta_symmetry); copy_v3_v3(grab_delta, ss->cache->grab_delta_symmetry);

@ -192,7 +192,7 @@ void SCULPT_do_draw_face_sets_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, in
SculptSession *ss = ob->sculpt; SculptSession *ss = ob->sculpt;
Brush *brush = BKE_paint_brush(&sd->paint); Brush *brush = BKE_paint_brush(&sd->paint);
BKE_curvemapping_initialize(brush->curve); BKE_curvemapping_init(brush->curve);
/* Threaded loop over nodes. */ /* Threaded loop over nodes. */
SculptThreadedTaskData data = { SculptThreadedTaskData data = {

@ -255,7 +255,7 @@ void SCULPT_do_paint_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode
return; return;
} }
BKE_curvemapping_initialize(brush->curve); BKE_curvemapping_init(brush->curve);
float area_no[3]; float area_no[3];
float mat[4][4]; float mat[4][4];
@ -468,7 +468,7 @@ void SCULPT_do_smear_brush(Sculpt *sd, Object *ob, PBVHNode **nodes, int totnode
} }
} }
BKE_curvemapping_initialize(brush->curve); BKE_curvemapping_init(brush->curve);
SculptThreadedTaskData data = { SculptThreadedTaskData data = {
.sd = sd, .sd = sd,

@ -1000,7 +1000,7 @@ void SCULPT_pose_brush_init(Sculpt *sd, Object *ob, SculptSession *ss, Brush *br
static void sculpt_pose_do_translate_deform(SculptSession *ss, Brush *brush) static void sculpt_pose_do_translate_deform(SculptSession *ss, Brush *brush)
{ {
SculptPoseIKChain *ik_chain = ss->cache->pose_ik_chain; SculptPoseIKChain *ik_chain = ss->cache->pose_ik_chain;
BKE_curvemapping_initialize(brush->curve); BKE_curvemapping_init(brush->curve);
pose_solve_translate_chain(ik_chain, ss->cache->grab_delta); pose_solve_translate_chain(ik_chain, ss->cache->grab_delta);
} }
@ -1041,7 +1041,7 @@ static void sculpt_pose_do_twist_deform(SculptSession *ss, Brush *brush)
/* Calculate the maximum roll. 0.02 radians per pixel works fine. */ /* Calculate the maximum roll. 0.02 radians per pixel works fine. */
float roll = (ss->cache->initial_mouse[0] - ss->cache->mouse[0]) * ss->cache->bstrength * 0.02f; float roll = (ss->cache->initial_mouse[0] - ss->cache->mouse[0]) * ss->cache->bstrength * 0.02f;
BKE_curvemapping_initialize(brush->curve); BKE_curvemapping_init(brush->curve);
pose_solve_roll_chain(ik_chain, brush, roll); pose_solve_roll_chain(ik_chain, brush, roll);
} }

@ -488,7 +488,7 @@ static UvSculptData *uv_sculpt_stroke_init(bContext *C, wmOperator *op, const wm
op->customdata = data; op->customdata = data;
BKE_curvemapping_initialize(ts->uvsculpt->paint.brush->curve); BKE_curvemapping_init(ts->uvsculpt->paint.brush->curve);
if (data) { if (data) {
int counter = 0, i; int counter = 0, i;

@ -684,7 +684,7 @@ static void clip_refresh(const bContext *C, ScrArea *area)
if (main_visible) { if (main_visible) {
if (region_main && (region_main->flag & RGN_FLAG_HIDDEN)) { if (region_main && (region_main->flag & RGN_FLAG_HIDDEN)) {
region_main->flag &= ~RGN_FLAG_HIDDEN; region_main->flag &= ~RGN_FLAG_HIDDEN;
region_main->v2d.flag &= ~V2D_IS_INITIALISED; region_main->v2d.flag &= ~V2D_IS_INIT;
view_changed = true; view_changed = true;
} }
@ -696,7 +696,7 @@ static void clip_refresh(const bContext *C, ScrArea *area)
else { else {
if (region_main && !(region_main->flag & RGN_FLAG_HIDDEN)) { if (region_main && !(region_main->flag & RGN_FLAG_HIDDEN)) {
region_main->flag |= RGN_FLAG_HIDDEN; region_main->flag |= RGN_FLAG_HIDDEN;
region_main->v2d.flag &= ~V2D_IS_INITIALISED; region_main->v2d.flag &= ~V2D_IS_INIT;
WM_event_remove_handlers((bContext *)C, &region_main->handlers); WM_event_remove_handlers((bContext *)C, &region_main->handlers);
view_changed = true; view_changed = true;
} }
@ -709,7 +709,7 @@ static void clip_refresh(const bContext *C, ScrArea *area)
if (properties_visible) { if (properties_visible) {
if (region_properties && (region_properties->flag & RGN_FLAG_HIDDEN)) { if (region_properties && (region_properties->flag & RGN_FLAG_HIDDEN)) {
region_properties->flag &= ~RGN_FLAG_HIDDEN; region_properties->flag &= ~RGN_FLAG_HIDDEN;
region_properties->v2d.flag &= ~V2D_IS_INITIALISED; region_properties->v2d.flag &= ~V2D_IS_INIT;
view_changed = true; view_changed = true;
} }
if (region_properties && region_properties->alignment != RGN_ALIGN_RIGHT) { if (region_properties && region_properties->alignment != RGN_ALIGN_RIGHT) {
@ -720,7 +720,7 @@ static void clip_refresh(const bContext *C, ScrArea *area)
else { else {
if (region_properties && !(region_properties->flag & RGN_FLAG_HIDDEN)) { if (region_properties && !(region_properties->flag & RGN_FLAG_HIDDEN)) {
region_properties->flag |= RGN_FLAG_HIDDEN; region_properties->flag |= RGN_FLAG_HIDDEN;
region_properties->v2d.flag &= ~V2D_IS_INITIALISED; region_properties->v2d.flag &= ~V2D_IS_INIT;
WM_event_remove_handlers((bContext *)C, &region_properties->handlers); WM_event_remove_handlers((bContext *)C, &region_properties->handlers);
view_changed = true; view_changed = true;
} }
@ -733,7 +733,7 @@ static void clip_refresh(const bContext *C, ScrArea *area)
if (tools_visible) { if (tools_visible) {
if (region_tools && (region_tools->flag & RGN_FLAG_HIDDEN)) { if (region_tools && (region_tools->flag & RGN_FLAG_HIDDEN)) {
region_tools->flag &= ~RGN_FLAG_HIDDEN; region_tools->flag &= ~RGN_FLAG_HIDDEN;
region_tools->v2d.flag &= ~V2D_IS_INITIALISED; region_tools->v2d.flag &= ~V2D_IS_INIT;
view_changed = true; view_changed = true;
} }
if (region_tools && region_tools->alignment != RGN_ALIGN_LEFT) { if (region_tools && region_tools->alignment != RGN_ALIGN_LEFT) {
@ -744,7 +744,7 @@ static void clip_refresh(const bContext *C, ScrArea *area)
else { else {
if (region_tools && !(region_tools->flag & RGN_FLAG_HIDDEN)) { if (region_tools && !(region_tools->flag & RGN_FLAG_HIDDEN)) {
region_tools->flag |= RGN_FLAG_HIDDEN; region_tools->flag |= RGN_FLAG_HIDDEN;
region_tools->v2d.flag &= ~V2D_IS_INITIALISED; region_tools->v2d.flag &= ~V2D_IS_INIT;
WM_event_remove_handlers((bContext *)C, &region_tools->handlers); WM_event_remove_handlers((bContext *)C, &region_tools->handlers);
view_changed = true; view_changed = true;
} }
@ -757,7 +757,7 @@ static void clip_refresh(const bContext *C, ScrArea *area)
if (preview_visible) { if (preview_visible) {
if (region_preview && (region_preview->flag & RGN_FLAG_HIDDEN)) { if (region_preview && (region_preview->flag & RGN_FLAG_HIDDEN)) {
region_preview->flag &= ~RGN_FLAG_HIDDEN; region_preview->flag &= ~RGN_FLAG_HIDDEN;
region_preview->v2d.flag &= ~V2D_IS_INITIALISED; region_preview->v2d.flag &= ~V2D_IS_INIT;
region_preview->v2d.cur = region_preview->v2d.tot; region_preview->v2d.cur = region_preview->v2d.tot;
view_changed = true; view_changed = true;
} }
@ -769,7 +769,7 @@ static void clip_refresh(const bContext *C, ScrArea *area)
else { else {
if (region_preview && !(region_preview->flag & RGN_FLAG_HIDDEN)) { if (region_preview && !(region_preview->flag & RGN_FLAG_HIDDEN)) {
region_preview->flag |= RGN_FLAG_HIDDEN; region_preview->flag |= RGN_FLAG_HIDDEN;
region_preview->v2d.flag &= ~V2D_IS_INITIALISED; region_preview->v2d.flag &= ~V2D_IS_INIT;
WM_event_remove_handlers((bContext *)C, &region_preview->handlers); WM_event_remove_handlers((bContext *)C, &region_preview->handlers);
view_changed = true; view_changed = true;
} }
@ -782,7 +782,7 @@ static void clip_refresh(const bContext *C, ScrArea *area)
if (channels_visible) { if (channels_visible) {
if (region_channels && (region_channels->flag & RGN_FLAG_HIDDEN)) { if (region_channels && (region_channels->flag & RGN_FLAG_HIDDEN)) {
region_channels->flag &= ~RGN_FLAG_HIDDEN; region_channels->flag &= ~RGN_FLAG_HIDDEN;
region_channels->v2d.flag &= ~V2D_IS_INITIALISED; region_channels->v2d.flag &= ~V2D_IS_INIT;
view_changed = true; view_changed = true;
} }
if (region_channels && region_channels->alignment != RGN_ALIGN_LEFT) { if (region_channels && region_channels->alignment != RGN_ALIGN_LEFT) {
@ -793,7 +793,7 @@ static void clip_refresh(const bContext *C, ScrArea *area)
else { else {
if (region_channels && !(region_channels->flag & RGN_FLAG_HIDDEN)) { if (region_channels && !(region_channels->flag & RGN_FLAG_HIDDEN)) {
region_channels->flag |= RGN_FLAG_HIDDEN; region_channels->flag |= RGN_FLAG_HIDDEN;
region_channels->v2d.flag &= ~V2D_IS_INITIALISED; region_channels->v2d.flag &= ~V2D_IS_INIT;
WM_event_remove_handlers((bContext *)C, &region_channels->handlers); WM_event_remove_handlers((bContext *)C, &region_channels->handlers);
view_changed = true; view_changed = true;
} }
@ -804,7 +804,7 @@ static void clip_refresh(const bContext *C, ScrArea *area)
} }
if (view_changed) { if (view_changed) {
ED_area_initialize(wm, window, area); ED_area_init(wm, window, area);
ED_area_tag_redraw(area); ED_area_tag_redraw(area);
} }

@ -235,7 +235,7 @@ static void file_ensure_valid_region_state(bContext *C,
ARegion *region_ui = BKE_area_find_region_type(area, RGN_TYPE_UI); ARegion *region_ui = BKE_area_find_region_type(area, RGN_TYPE_UI);
ARegion *region_props = BKE_area_find_region_type(area, RGN_TYPE_TOOL_PROPS); ARegion *region_props = BKE_area_find_region_type(area, RGN_TYPE_TOOL_PROPS);
ARegion *region_execute = BKE_area_find_region_type(area, RGN_TYPE_EXECUTE); ARegion *region_execute = BKE_area_find_region_type(area, RGN_TYPE_EXECUTE);
bool needs_init = false; /* To avoid multiple ED_area_initialize() calls. */ bool needs_init = false; /* To avoid multiple ED_area_init() calls. */
/* If there's an file-operation, ensure we have the option and execute region */ /* If there's an file-operation, ensure we have the option and execute region */
if (sfile->op && (region_props == NULL)) { if (sfile->op && (region_props == NULL)) {
@ -261,7 +261,7 @@ static void file_ensure_valid_region_state(bContext *C,
} }
if (needs_init) { if (needs_init) {
ED_area_initialize(wm, win, area); ED_area_init(wm, win, area);
} }
} }

@ -3714,7 +3714,7 @@ static void draw_fill_tile(PointerRNA *ptr, uiLayout *layout)
uiItemR(col[1], ptr, "float", 0, NULL, ICON_NONE); uiItemR(col[1], ptr, "float", 0, NULL, ICON_NONE);
} }
static void initialize_fill_tile(PointerRNA *ptr, Image *ima, ImageTile *tile) static void tile_fill_init(PointerRNA *ptr, Image *ima, ImageTile *tile)
{ {
ImageUser iuser; ImageUser iuser;
BKE_imageuser_default(&iuser); BKE_imageuser_default(&iuser);
@ -3827,7 +3827,7 @@ static int tile_add_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(ev
} }
ImageTile *tile = BLI_findlink(&ima->tiles, ima->active_tile_index); ImageTile *tile = BLI_findlink(&ima->tiles, ima->active_tile_index);
initialize_fill_tile(op->ptr, ima, tile); tile_fill_init(op->ptr, ima, tile);
RNA_int_set(op->ptr, "number", next_number); RNA_int_set(op->ptr, "number", next_number);
RNA_int_set(op->ptr, "count", 1); RNA_int_set(op->ptr, "count", 1);
@ -3973,7 +3973,7 @@ static int tile_fill_exec(bContext *C, wmOperator *op)
static int tile_fill_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(event)) static int tile_fill_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(event))
{ {
initialize_fill_tile(op->ptr, CTX_data_edit_image(C), NULL); tile_fill_init(op->ptr, CTX_data_edit_image(C), NULL);
return WM_operator_props_dialog_popup(C, op, 15 * UI_UNIT_X); return WM_operator_props_dialog_popup(C, op, 15 * UI_UNIT_X);
} }

@ -231,12 +231,12 @@ static void sequencer_refresh(const bContext *C, ScrArea *area)
case SEQ_VIEW_SEQUENCE: case SEQ_VIEW_SEQUENCE:
if (region_main && (region_main->flag & RGN_FLAG_HIDDEN)) { if (region_main && (region_main->flag & RGN_FLAG_HIDDEN)) {
region_main->flag &= ~RGN_FLAG_HIDDEN; region_main->flag &= ~RGN_FLAG_HIDDEN;
region_main->v2d.flag &= ~V2D_IS_INITIALISED; region_main->v2d.flag &= ~V2D_IS_INIT;
view_changed = true; view_changed = true;
} }
if (region_preview && !(region_preview->flag & RGN_FLAG_HIDDEN)) { if (region_preview && !(region_preview->flag & RGN_FLAG_HIDDEN)) {
region_preview->flag |= RGN_FLAG_HIDDEN; region_preview->flag |= RGN_FLAG_HIDDEN;
region_preview->v2d.flag &= ~V2D_IS_INITIALISED; region_preview->v2d.flag &= ~V2D_IS_INIT;
WM_event_remove_handlers((bContext *)C, &region_preview->handlers); WM_event_remove_handlers((bContext *)C, &region_preview->handlers);
view_changed = true; view_changed = true;
} }
@ -252,13 +252,13 @@ static void sequencer_refresh(const bContext *C, ScrArea *area)
case SEQ_VIEW_PREVIEW: case SEQ_VIEW_PREVIEW:
if (region_main && !(region_main->flag & RGN_FLAG_HIDDEN)) { if (region_main && !(region_main->flag & RGN_FLAG_HIDDEN)) {
region_main->flag |= RGN_FLAG_HIDDEN; region_main->flag |= RGN_FLAG_HIDDEN;
region_main->v2d.flag &= ~V2D_IS_INITIALISED; region_main->v2d.flag &= ~V2D_IS_INIT;
WM_event_remove_handlers((bContext *)C, &region_main->handlers); WM_event_remove_handlers((bContext *)C, &region_main->handlers);
view_changed = true; view_changed = true;
} }
if (region_preview && (region_preview->flag & RGN_FLAG_HIDDEN)) { if (region_preview && (region_preview->flag & RGN_FLAG_HIDDEN)) {
region_preview->flag &= ~RGN_FLAG_HIDDEN; region_preview->flag &= ~RGN_FLAG_HIDDEN;
region_preview->v2d.flag &= ~V2D_IS_INITIALISED; region_preview->v2d.flag &= ~V2D_IS_INIT;
region_preview->v2d.cur = region_preview->v2d.tot; region_preview->v2d.cur = region_preview->v2d.tot;
view_changed = true; view_changed = true;
} }
@ -281,13 +281,13 @@ static void sequencer_refresh(const bContext *C, ScrArea *area)
* 'full window' views before, though... Better than nothing. */ * 'full window' views before, though... Better than nothing. */
if (region_main->flag & RGN_FLAG_HIDDEN) { if (region_main->flag & RGN_FLAG_HIDDEN) {
region_main->flag &= ~RGN_FLAG_HIDDEN; region_main->flag &= ~RGN_FLAG_HIDDEN;
region_main->v2d.flag &= ~V2D_IS_INITIALISED; region_main->v2d.flag &= ~V2D_IS_INIT;
region_preview->sizey = (int)(height - region_main->sizey); region_preview->sizey = (int)(height - region_main->sizey);
view_changed = true; view_changed = true;
} }
if (region_preview->flag & RGN_FLAG_HIDDEN) { if (region_preview->flag & RGN_FLAG_HIDDEN) {
region_preview->flag &= ~RGN_FLAG_HIDDEN; region_preview->flag &= ~RGN_FLAG_HIDDEN;
region_preview->v2d.flag &= ~V2D_IS_INITIALISED; region_preview->v2d.flag &= ~V2D_IS_INIT;
region_preview->v2d.cur = region_preview->v2d.tot; region_preview->v2d.cur = region_preview->v2d.tot;
region_main->sizey = (int)(height - region_preview->sizey); region_main->sizey = (int)(height - region_preview->sizey);
view_changed = true; view_changed = true;
@ -312,7 +312,7 @@ static void sequencer_refresh(const bContext *C, ScrArea *area)
} }
if (view_changed) { if (view_changed) {
ED_area_initialize(wm, window, area); ED_area_init(wm, window, area);
ED_area_tag_redraw(area); ED_area_tag_redraw(area);
} }
} }

@ -115,7 +115,7 @@ static void userpref_main_region_init(wmWindowManager *wm, ARegion *region)
{ {
/* do not use here, the properties changed in userprefs do a system-wide refresh, /* do not use here, the properties changed in userprefs do a system-wide refresh,
* then scroller jumps back */ * then scroller jumps back */
/* region->v2d.flag &= ~V2D_IS_INITIALISED; */ /* region->v2d.flag &= ~V2D_IS_INIT; */
region->v2d.scroll = V2D_SCROLL_RIGHT | V2D_SCROLL_VERTICAL_HIDE; region->v2d.scroll = V2D_SCROLL_RIGHT | V2D_SCROLL_VERTICAL_HIDE;

@ -104,7 +104,7 @@ void createTransGPencil(bContext *C, TransInfo *t)
/* initialize falloff curve */ /* initialize falloff curve */
if (is_multiedit) { if (is_multiedit) {
BKE_curvemapping_initialize(ts->gp_sculpt.cur_falloff); BKE_curvemapping_init(ts->gp_sculpt.cur_falloff);
} }
/* First Pass: Count the number of data-points required for the strokes, /* First Pass: Count the number of data-points required for the strokes,

@ -43,7 +43,7 @@ struct FreestyleGlobals {
extern struct FreestyleGlobals g_freestyle; extern struct FreestyleGlobals g_freestyle;
/* Rendering */ /* Rendering */
void FRS_initialize(void); void FRS_init(void);
void FRS_set_context(struct bContext *C); void FRS_set_context(struct bContext *C);
int FRS_is_freestyle_enabled(struct ViewLayer *view_layer); int FRS_is_freestyle_enabled(struct ViewLayer *view_layer);
void FRS_init_stroke_renderer(struct Render *re); void FRS_init_stroke_renderer(struct Render *re);

@ -100,7 +100,7 @@ static bCallbackFuncStore load_post_callback_funcstore = {
// Initialization // Initialization
//======================================================= //=======================================================
void FRS_initialize() void FRS_init()
{ {
if (freestyle_is_initialized) { if (freestyle_is_initialized) {
return; return;

@ -264,7 +264,7 @@ static PyObject *Freestyle_evaluateCurveMappingF(PyObject * /*self*/, PyObject *
return NULL; return NULL;
} }
cumap = (CurveMapping *)py_srna->ptr.data; cumap = (CurveMapping *)py_srna->ptr.data;
BKE_curvemapping_initialize(cumap); BKE_curvemapping_init(cumap);
/* disable extrapolation if enabled */ /* disable extrapolation if enabled */
if ((cumap->flag & CUMA_EXTEND_EXTRAPOLATE)) { if ((cumap->flag & CUMA_EXTEND_EXTRAPOLATE)) {
cumap->flag &= ~CUMA_EXTEND_EXTRAPOLATE; cumap->flag &= ~CUMA_EXTEND_EXTRAPOLATE;

@ -69,7 +69,7 @@ static void initData(GpencilModifierData *md)
gpmd->curve_intensity = BKE_curvemapping_add(1, 0.0f, 0.0f, 1.0f, 1.0f); gpmd->curve_intensity = BKE_curvemapping_add(1, 0.0f, 0.0f, 1.0f, 1.0f);
if (gpmd->curve_intensity) { if (gpmd->curve_intensity) {
CurveMapping *curve = gpmd->curve_intensity; CurveMapping *curve = gpmd->curve_intensity;
BKE_curvemapping_initialize(curve); BKE_curvemapping_init(curve);
} }
} }

@ -94,7 +94,7 @@ static void initData(GpencilModifierData *md)
gpmd->falloff_type = eGPHook_Falloff_Smooth; gpmd->falloff_type = eGPHook_Falloff_Smooth;
gpmd->curfalloff = BKE_curvemapping_add(1, 0.0f, 0.0f, 1.0f, 1.0f); gpmd->curfalloff = BKE_curvemapping_add(1, 0.0f, 0.0f, 1.0f, 1.0f);
if (gpmd->curfalloff) { if (gpmd->curfalloff) {
BKE_curvemapping_initialize(gpmd->curfalloff); BKE_curvemapping_init(gpmd->curfalloff);
} }
} }

@ -79,7 +79,7 @@ static void initData(GpencilModifierData *md)
if (gpmd->curve_intensity) { if (gpmd->curve_intensity) {
CurveMapping *curve = gpmd->curve_intensity; CurveMapping *curve = gpmd->curve_intensity;
BKE_curvemap_reset(curve->cm, &curve->clipr, CURVE_PRESET_BELL, CURVEMAP_SLOPE_POSITIVE); BKE_curvemap_reset(curve->cm, &curve->clipr, CURVE_PRESET_BELL, CURVEMAP_SLOPE_POSITIVE);
BKE_curvemapping_initialize(curve); BKE_curvemapping_init(curve);
} }
} }

@ -70,7 +70,7 @@ static void initData(GpencilModifierData *md)
gpmd->curve_intensity = BKE_curvemapping_add(1, 0.0f, 0.0f, 1.0f, 1.0f); gpmd->curve_intensity = BKE_curvemapping_add(1, 0.0f, 0.0f, 1.0f, 1.0f);
if (gpmd->curve_intensity) { if (gpmd->curve_intensity) {
CurveMapping *curve = gpmd->curve_intensity; CurveMapping *curve = gpmd->curve_intensity;
BKE_curvemapping_initialize(curve); BKE_curvemapping_init(curve);
} }
} }

@ -66,7 +66,7 @@ static void initData(GpencilModifierData *md)
gpmd->curve_intensity = BKE_curvemapping_add(1, 0.0f, 0.0f, 1.0f, 1.0f); gpmd->curve_intensity = BKE_curvemapping_add(1, 0.0f, 0.0f, 1.0f, 1.0f);
if (gpmd->curve_intensity) { if (gpmd->curve_intensity) {
CurveMapping *curve = gpmd->curve_intensity; CurveMapping *curve = gpmd->curve_intensity;
BKE_curvemapping_initialize(curve); BKE_curvemapping_init(curve);
} }
} }

@ -65,7 +65,7 @@ static void initData(GpencilModifierData *md)
gpmd->material = NULL; gpmd->material = NULL;
gpmd->curve_thickness = BKE_curvemapping_add(1, 0.0f, 0.0f, 1.0f, 1.0f); gpmd->curve_thickness = BKE_curvemapping_add(1, 0.0f, 0.0f, 1.0f, 1.0f);
if (gpmd->curve_thickness) { if (gpmd->curve_thickness) {
BKE_curvemapping_initialize(gpmd->curve_thickness); BKE_curvemapping_init(gpmd->curve_thickness);
} }
} }

@ -96,7 +96,7 @@ static void initData(GpencilModifierData *md)
gpmd->curve_intensity = BKE_curvemapping_add(1, 0.0f, 0.0f, 1.0f, 1.0f); gpmd->curve_intensity = BKE_curvemapping_add(1, 0.0f, 0.0f, 1.0f, 1.0f);
if (gpmd->curve_intensity) { if (gpmd->curve_intensity) {
CurveMapping *curve = gpmd->curve_intensity; CurveMapping *curve = gpmd->curve_intensity;
BKE_curvemapping_initialize(curve); BKE_curvemapping_init(curve);
} }
} }

@ -32,7 +32,7 @@ extern "C" {
void GPU_init(void); void GPU_init(void);
void GPU_exit(void); void GPU_exit(void);
bool GPU_is_initialized(void); bool GPU_is_init(void);
#ifdef __cplusplus #ifdef __cplusplus
} }

@ -95,7 +95,7 @@ void GPU_exit(void)
initialized = false; initialized = false;
} }
bool GPU_is_initialized(void) bool GPU_is_init(void)
{ {
return initialized; return initialized;
} }

@ -36,7 +36,7 @@ struct bConstraint;
struct bPose; struct bPose;
struct bPoseChannel; struct bPoseChannel;
void BIK_initialize_tree(struct Depsgraph *depsgraph, void BIK_init_tree(struct Depsgraph *depsgraph,
struct Scene *scene, struct Scene *scene,
struct Object *ob, struct Object *ob,
float ctime); float ctime);

@ -80,7 +80,7 @@ static IKPlugin *get_plugin(bPose *pose)
/*----------------------------------------*/ /*----------------------------------------*/
/* Plugin API */ /* Plugin API */
void BIK_initialize_tree(struct Depsgraph *depsgraph, Scene *scene, Object *ob, float ctime) void BIK_init_tree(struct Depsgraph *depsgraph, Scene *scene, Object *ob, float ctime)
{ {
IKPlugin *plugin = get_plugin(ob->pose); IKPlugin *plugin = get_plugin(ob->pose);

@ -3958,7 +3958,7 @@ static void curve_mapping_to_ocio_settings(CurveMapping *curve_mapping,
{ {
int i; int i;
BKE_curvemapping_initialize(curve_mapping); BKE_curvemapping_init(curve_mapping);
BKE_curvemapping_premultiply(curve_mapping, false); BKE_curvemapping_premultiply(curve_mapping, false);
BKE_curvemapping_table_RGBA( BKE_curvemapping_table_RGBA(
curve_mapping, &curve_mapping_settings->lut, &curve_mapping_settings->lut_size); curve_mapping, &curve_mapping_settings->lut, &curve_mapping_settings->lut_size);

@ -651,7 +651,7 @@ BLI_INLINE int DOWNSAMPLE_FLOAT_TO_16BIT(const float _val)
#define COMP_24_CS 1041666 /*Maximum size per color component for 2K & 4K @ 24fps*/ #define COMP_24_CS 1041666 /*Maximum size per color component for 2K & 4K @ 24fps*/
#define COMP_48_CS 520833 /*Maximum size per color component for 2K @ 48fps*/ #define COMP_48_CS 520833 /*Maximum size per color component for 2K @ 48fps*/
static int initialise_4K_poc(opj_poc_t *POC, int numres) static int init_4K_poc(opj_poc_t *POC, int numres)
{ {
POC[0].tile = 1; POC[0].tile = 1;
POC[0].resno0 = 0; POC[0].resno0 = 0;
@ -750,7 +750,7 @@ static void cinema_setup_encoder(opj_cparameters_t *parameters,
else { else {
parameters->cp_rsiz = DCP_CINEMA2K; parameters->cp_rsiz = DCP_CINEMA2K;
} }
parameters->numpocs = initialise_4K_poc(parameters->POC, parameters->numresolution); parameters->numpocs = init_4K_poc(parameters->POC, parameters->numresolution);
break; break;
case OPJ_OFF: case OPJ_OFF:
/* do nothing */ /* do nothing */

@ -669,7 +669,7 @@ static void imb_stereo3d_squeeze_rect(
/*************************** preparing to call the write functions **************************/ /*************************** preparing to call the write functions **************************/
static void imb_stereo3d_data_initialize(Stereo3DData *s3d_data, static void imb_stereo3d_data_init(Stereo3DData *s3d_data,
const bool is_float, const bool is_float,
const size_t x, const size_t x,
const size_t y, const size_t y,
@ -709,7 +709,7 @@ int *IMB_stereo3d_from_rect(ImageFormatData *im_format,
im_format->stereo3d_format.display_mode, false, x, y, &width, &height); im_format->stereo3d_format.display_mode, false, x, y, &width, &height);
r_rect = MEM_mallocN(channels * sizeof(int) * width * height, __func__); r_rect = MEM_mallocN(channels * sizeof(int) * width * height, __func__);
imb_stereo3d_data_initialize( imb_stereo3d_data_init(
&s3d_data, is_float, x, y, channels, rect_left, rect_right, r_rect, NULL, NULL, NULL); &s3d_data, is_float, x, y, channels, rect_left, rect_right, r_rect, NULL, NULL, NULL);
imb_stereo3d_write_doit(&s3d_data, &im_format->stereo3d_format); imb_stereo3d_write_doit(&s3d_data, &im_format->stereo3d_format);
imb_stereo3d_squeeze_rect(r_rect, &im_format->stereo3d_format, x, y, channels); imb_stereo3d_squeeze_rect(r_rect, &im_format->stereo3d_format, x, y, channels);
@ -733,7 +733,7 @@ float *IMB_stereo3d_from_rectf(ImageFormatData *im_format,
im_format->stereo3d_format.display_mode, false, x, y, &width, &height); im_format->stereo3d_format.display_mode, false, x, y, &width, &height);
r_rectf = MEM_mallocN(channels * sizeof(float) * width * height, __func__); r_rectf = MEM_mallocN(channels * sizeof(float) * width * height, __func__);
imb_stereo3d_data_initialize( imb_stereo3d_data_init(
&s3d_data, is_float, x, y, channels, NULL, NULL, NULL, rectf_left, rectf_right, r_rectf); &s3d_data, is_float, x, y, channels, NULL, NULL, NULL, rectf_left, rectf_right, r_rectf);
imb_stereo3d_write_doit(&s3d_data, &im_format->stereo3d_format); imb_stereo3d_write_doit(&s3d_data, &im_format->stereo3d_format);
imb_stereo3d_squeeze_rectf(r_rectf, &im_format->stereo3d_format, x, y, channels); imb_stereo3d_squeeze_rectf(r_rectf, &im_format->stereo3d_format, x, y, channels);
@ -759,7 +759,7 @@ ImBuf *IMB_stereo3d_ImBuf(ImageFormatData *im_format, ImBuf *ibuf_left, ImBuf *i
ibuf_stereo->flags = ibuf_left->flags; ibuf_stereo->flags = ibuf_left->flags;
imb_stereo3d_data_initialize(&s3d_data, imb_stereo3d_data_init(&s3d_data,
is_float, is_float,
ibuf_left->x, ibuf_left->x,
ibuf_left->y, ibuf_left->y,
@ -1286,7 +1286,7 @@ void IMB_ImBufFromStereo3d(Stereo3dFormat *s3d,
&height); &height);
imb_stereo3d_unsqueeze_ImBuf(ibuf_stereo3d, s3d, width, height); imb_stereo3d_unsqueeze_ImBuf(ibuf_stereo3d, s3d, width, height);
imb_stereo3d_data_initialize(&s3d_data, imb_stereo3d_data_init(&s3d_data,
is_float, is_float,
ibuf_left->x, ibuf_left->x,
ibuf_left->y, ibuf_left->y,
@ -1310,7 +1310,7 @@ void IMB_ImBufFromStereo3d(Stereo3dFormat *s3d,
addzbufImBuf(ibuf_right); addzbufImBuf(ibuf_right);
} }
imb_stereo3d_data_initialize(&s3d_data, imb_stereo3d_data_init(&s3d_data,
is_float, is_float,
ibuf_left->x, ibuf_left->x,
ibuf_left->y, ibuf_left->y,

@ -28,7 +28,7 @@
extern "C" { extern "C" {
/* Workaround to make it possible to pass a path at runtime to USD. See creator.c. */ /* Workaround to make it possible to pass a path at runtime to USD. See creator.c. */
void usd_initialise_plugin_path(const char *datafiles_usd_path); void usd_init_plugin_path(const char *datafiles_usd_path);
} }
namespace blender::io::usd { namespace blender::io::usd {
@ -46,7 +46,7 @@ TEST_F(USDStageCreationTest, JSONFileLoadingTest)
char usd_datafiles_dir[FILE_MAX]; char usd_datafiles_dir[FILE_MAX];
BLI_path_join(usd_datafiles_dir, FILE_MAX, release_dir.c_str(), "datafiles", "usd", nullptr); BLI_path_join(usd_datafiles_dir, FILE_MAX, release_dir.c_str(), "datafiles", "usd", nullptr);
usd_initialise_plugin_path(usd_datafiles_dir); usd_init_plugin_path(usd_datafiles_dir);
/* Simply the ability to create a USD Stage for a specific filename means that the extension /* Simply the ability to create a USD Stage for a specific filename means that the extension
* has been recognized by the USD library, and that a USD plugin has been loaded to write such * has been recognized by the USD library, and that a USD plugin has been loaded to write such

@ -137,7 +137,7 @@ enum {
/* apply pixel offsets on y-axis when setting view matrices */ /* apply pixel offsets on y-axis when setting view matrices */
V2D_PIXELOFS_Y = (1 << 3), V2D_PIXELOFS_Y = (1 << 3),
/* view settings need to be set still... */ /* view settings need to be set still... */
V2D_IS_INITIALISED = (1 << 10), V2D_IS_INIT = (1 << 10),
}; };
/* scroller flags for View2D (v2d->scroll) */ /* scroller flags for View2D (v2d->scroll) */

@ -198,8 +198,8 @@ typedef struct wmWindowManager {
/* wmWindowManager.initialized */ /* wmWindowManager.initialized */
enum { enum {
WM_WINDOW_IS_INITIALIZED = (1 << 0), WM_WINDOW_IS_INIT = (1 << 0),
WM_KEYCONFIG_IS_INITIALIZED = (1 << 1), WM_KEYCONFIG_IS_INIT = (1 << 1),
}; };
/* wmWindowManager.outliner_sync_select_dirty */ /* wmWindowManager.outliner_sync_select_dirty */

@ -1548,7 +1548,6 @@ int main(int argc, char **argv)
# pragma GCC poison int8_t # pragma GCC poison int8_t
#endif #endif
#include "DNA_session_uuid_types.h"
#include "DNA_ID.h" #include "DNA_ID.h"
#include "DNA_action_types.h" #include "DNA_action_types.h"
#include "DNA_anim_types.h" #include "DNA_anim_types.h"
@ -1603,6 +1602,7 @@ int main(int argc, char **argv)
#include "DNA_screen_types.h" #include "DNA_screen_types.h"
#include "DNA_sdna_types.h" #include "DNA_sdna_types.h"
#include "DNA_sequence_types.h" #include "DNA_sequence_types.h"
#include "DNA_session_uuid_types.h"
#include "DNA_shader_fx_types.h" #include "DNA_shader_fx_types.h"
#include "DNA_simulation_types.h" #include "DNA_simulation_types.h"
#include "DNA_sound_types.h" #include "DNA_sound_types.h"

@ -5146,7 +5146,7 @@ int main(int argc, char **argv)
{ {
int return_status = 0; int return_status = 0;
MEM_initialize_memleak_detection(); MEM_init_memleak_detection();
MEM_set_error_callback(mem_error_cb); MEM_set_error_callback(mem_error_cb);
CLG_init(); CLG_init();

@ -702,7 +702,7 @@ static float rna_CurveMapping_evaluateF(struct CurveMapping *cumap,
static void rna_CurveMap_initialize(struct CurveMapping *cumap) static void rna_CurveMap_initialize(struct CurveMapping *cumap)
{ {
BKE_curvemapping_initialize(cumap); BKE_curvemapping_init(cumap);
} }
#else #else

@ -146,7 +146,7 @@ static void rna_CurveProfile_evaluate(struct CurveProfile *profile,
static void rna_CurveProfile_initialize(struct CurveProfile *profile, int segments_len) static void rna_CurveProfile_initialize(struct CurveProfile *profile, int segments_len)
{ {
BKE_curveprofile_initialize(profile, (short)segments_len); BKE_curveprofile_init(profile, (short)segments_len);
} }
static void rna_CurveProfile_update(struct CurveProfile *profile) static void rna_CurveProfile_update(struct CurveProfile *profile)

@ -1163,7 +1163,7 @@ static void rna_BevelModifier_update_segments(Main *bmain, Scene *scene, Pointer
BevelModifierData *bmd = (BevelModifierData *)ptr->data; BevelModifierData *bmd = (BevelModifierData *)ptr->data;
if (RNA_enum_get(ptr, "profile_type") == MOD_BEVEL_PROFILE_CUSTOM) { if (RNA_enum_get(ptr, "profile_type") == MOD_BEVEL_PROFILE_CUSTOM) {
short segments = (short)RNA_int_get(ptr, "segments"); short segments = (short)RNA_int_get(ptr, "segments");
BKE_curveprofile_initialize(bmd->custom_profile, segments); BKE_curveprofile_init(bmd->custom_profile, segments);
} }
rna_Modifier_update(bmain, scene, ptr); rna_Modifier_update(bmain, scene, ptr);
} }

@ -231,7 +231,7 @@ static int rna_Area_ui_type_get(PointerRNA *ptr)
* the area type is changing. * the area type is changing.
* So manually do the lookup in those cases, but do not actually change area->type * So manually do the lookup in those cases, but do not actually change area->type
* since that prevents a proper exit when the area type is changing. * since that prevents a proper exit when the area type is changing.
* Logic copied from `ED_area_initialize()`.*/ * Logic copied from `ED_area_init()`.*/
SpaceType *type = area->type; SpaceType *type = area->type;
if (type == NULL || area_changing) { if (type == NULL || area_changing) {
type = BKE_spacetype_from_id(area_type); type = BKE_spacetype_from_id(area_type);

@ -284,7 +284,7 @@ static void deformVerts_do(HookModifierData *hmd,
} }
if (hmd->curfalloff) { if (hmd->curfalloff) {
BKE_curvemapping_initialize(hmd->curfalloff); BKE_curvemapping_init(hmd->curfalloff);
} }
/* Generic data needed for applying per-vertex calculations (initialize all members) */ /* Generic data needed for applying per-vertex calculations (initialize all members) */

@ -236,7 +236,7 @@ static void warpModifier_do(WarpModifierData *wmd,
} }
if (wmd->curfalloff) { if (wmd->curfalloff) {
BKE_curvemapping_initialize(wmd->curfalloff); BKE_curvemapping_init(wmd->curfalloff);
} }
invert_m4_m4(obinv, ob->obmat); invert_m4_m4(obinv, ob->obmat);

@ -83,7 +83,7 @@ void weightvg_do_map(
} }
if (cmap && falloff_type == MOD_WVG_MAPPING_CURVE) { if (cmap && falloff_type == MOD_WVG_MAPPING_CURVE) {
BKE_curvemapping_initialize(cmap); BKE_curvemapping_init(cmap);
} }
/* Map each weight (vertex) to its new value, accordingly to the chosen mode. */ /* Map each weight (vertex) to its new value, accordingly to the chosen mode. */

@ -72,7 +72,7 @@ static void initData(ModifierData *md)
wmd->default_weight = 0.0f; wmd->default_weight = 0.0f;
wmd->cmap_curve = BKE_curvemapping_add(1, 0.0, 0.0, 1.0, 1.0); wmd->cmap_curve = BKE_curvemapping_add(1, 0.0, 0.0, 1.0, 1.0);
BKE_curvemapping_initialize(wmd->cmap_curve); BKE_curvemapping_init(wmd->cmap_curve);
wmd->rem_threshold = 0.01f; wmd->rem_threshold = 0.01f;
wmd->add_threshold = 0.01f; wmd->add_threshold = 0.01f;

@ -73,7 +73,7 @@ void *node_initexec_curves(bNodeExecContext *UNUSED(context),
bNode *node, bNode *node,
bNodeInstanceKey UNUSED(key)) bNodeInstanceKey UNUSED(key))
{ {
BKE_curvemapping_initialize(node->storage); BKE_curvemapping_init(node->storage);
return NULL; /* unused return */ return NULL; /* unused return */
} }

@ -168,7 +168,7 @@ static int gpu_shader_curve_rgb(GPUMaterial *mat,
CurveMapping *cumap = node->storage; CurveMapping *cumap = node->storage;
BKE_curvemapping_initialize(cumap); BKE_curvemapping_init(cumap);
BKE_curvemapping_table_RGBA(cumap, &array, &size); BKE_curvemapping_table_RGBA(cumap, &array, &size);
GPUNodeLink *tex = GPU_color_band(mat, size, array, &layer); GPUNodeLink *tex = GPU_color_band(mat, size, array, &layer);

@ -39,7 +39,7 @@ static void time_colorfn(
fac = (p->cfra - node->custom1) / (float)(node->custom2 - node->custom1); fac = (p->cfra - node->custom1) / (float)(node->custom2 - node->custom1);
} }
BKE_curvemapping_initialize(node->storage); BKE_curvemapping_init(node->storage);
fac = BKE_curvemapping_evaluateF(node->storage, 0, fac); fac = BKE_curvemapping_evaluateF(node->storage, 0, fac);
out[0] = CLAMPIS(fac, 0.0f, 1.0f); out[0] = CLAMPIS(fac, 0.0f, 1.0f);
} }

Some files were not shown because too many files have changed in this diff Show More