forked from blender/blender
index-of-nearest-104619 #2
@ -1379,7 +1379,7 @@ const char *BLI_path_extension_or_end(const char *filepath)
|
||||
{
|
||||
/* NOTE(@ideasman42): Skip the extension when there are no preceding non-extension characters in
|
||||
* the file name. This ignores extensions at the beginning of a string or directly after a slash.
|
||||
* Only using trailing extension characters has the advantage that stripping the extenion
|
||||
* Only using trailing extension characters has the advantage that stripping the extension
|
||||
* never leads to a blank string (which can't be used as a file path).
|
||||
* Matches Python's `os.path.splitext`. */
|
||||
const char *ext = NULL;
|
||||
|
@ -846,7 +846,7 @@ static bool gpencil_weightpaint_brush_init(bContext *C, wmOperator *op)
|
||||
/* Get boolean array of vertex groups deformed by bones. */
|
||||
gso->vgroup_bone_deformed = gpencil_vgroup_bone_deformed_map_get(ob, gso->vgroup_tot);
|
||||
if (gso->vgroup_bone_deformed != NULL) {
|
||||
/* Get boolean array of locked vertext groups. */
|
||||
/* Get boolean array of locked vertex groups. */
|
||||
gso->vgroup_locked = BKE_object_defgroup_lock_flags_get(ob, gso->vgroup_tot);
|
||||
if (gso->vgroup_locked == NULL) {
|
||||
gso->vgroup_locked = (bool *)MEM_callocN(sizeof(bool) * gso->vgroup_tot, __func__);
|
||||
|
@ -208,7 +208,7 @@ static void ruler_item_as_string(
|
||||
}
|
||||
else {
|
||||
BKE_unit_value_as_string(
|
||||
numstr, numstr_size, (double)ruler_angle, prec, B_UNIT_ROTATION, unit, false);
|
||||
numstr, numstr_size, double(ruler_angle), prec, B_UNIT_ROTATION, unit, false);
|
||||
}
|
||||
}
|
||||
else {
|
||||
@ -220,7 +220,7 @@ static void ruler_item_as_string(
|
||||
else {
|
||||
BKE_unit_value_as_string(numstr,
|
||||
numstr_size,
|
||||
(double)(ruler_len * unit->scale_length),
|
||||
double(ruler_len * unit->scale_length),
|
||||
prec,
|
||||
B_UNIT_LENGTH,
|
||||
unit,
|
||||
|
@ -1464,7 +1464,7 @@ static void gizmo_3d_setup_draw_modal(wmGizmo *axis, const int axis_idx, const i
|
||||
case MAN_AXIS_SCALE_Z: {
|
||||
|
||||
float end, start_co[3] = {0.0f, 0.0f, 0.0f};
|
||||
gizmo_line_range(twtype, axis_type, NULL, &end);
|
||||
gizmo_line_range(twtype, axis_type, nullptr, &end);
|
||||
RNA_float_set(axis->ptr, "length", end);
|
||||
RNA_enum_set(axis->ptr,
|
||||
"draw_options",
|
||||
@ -1797,7 +1797,7 @@ static void gizmo_refresh_from_matrix(wmGizmo *axis,
|
||||
copy_m4_m4(axis->matrix_basis, twmat);
|
||||
if (scale) {
|
||||
float end;
|
||||
gizmo_line_range(twtype, axis_type, NULL, &end);
|
||||
gizmo_line_range(twtype, axis_type, nullptr, &end);
|
||||
RNA_float_set(axis->ptr, "length", end * scale[aidx_norm]);
|
||||
}
|
||||
|
||||
|
@ -243,9 +243,9 @@ static void memfile_undosys_step_decode(struct bContext *C,
|
||||
* modified IDs should already have other depsgraph update tags anyway.
|
||||
* However, for the sake of consistency, it's better to effectively use it,
|
||||
* since content of that ID pointer does have been modified. */
|
||||
unsigned int recalc_flags = id->recalc | ((id->tag & LIB_TAG_UNDO_OLD_ID_REREAD_IN_PLACE) ?
|
||||
ID_RECALC_COPY_ON_WRITE :
|
||||
IDRecalcFlag(0));
|
||||
uint recalc_flags = id->recalc | ((id->tag & LIB_TAG_UNDO_OLD_ID_REREAD_IN_PLACE) ?
|
||||
ID_RECALC_COPY_ON_WRITE :
|
||||
IDRecalcFlag(0));
|
||||
/* Tag depsgraph to update data-block for changes that happened between the
|
||||
* current and the target state, see direct_link_id_restore_recalc(). */
|
||||
if (recalc_flags != 0) {
|
||||
|
@ -198,7 +198,7 @@ void PackIsland::calculate_pre_rotation_(const UVPackIsland_Params ¶ms)
|
||||
}
|
||||
|
||||
const float(*source)[2] = reinterpret_cast<const float(*)[2]>(coords.data());
|
||||
float angle = -BLI_convexhull_aabb_fit_points_2d(source, (int)coords.size());
|
||||
float angle = -BLI_convexhull_aabb_fit_points_2d(source, int(coords.size()));
|
||||
|
||||
if (1) {
|
||||
/* "Stand-up" islands. */
|
||||
|
@ -375,7 +375,7 @@ static bool wm_init_splash_show_on_startup_check()
|
||||
else {
|
||||
/* A less common case, if there is no user preferences, show the splash screen
|
||||
* so the user has the opportunity to restore settings from a previous version. */
|
||||
const char *const cfgdir = BKE_appdir_folder_id(BLENDER_USER_CONFIG, NULL);
|
||||
const char *const cfgdir = BKE_appdir_folder_id(BLENDER_USER_CONFIG, nullptr);
|
||||
if (cfgdir) {
|
||||
char userpref[FILE_MAX];
|
||||
BLI_path_join(userpref, sizeof(userpref), cfgdir, BLENDER_USERPREF_FILE);
|
||||
|
Loading…
Reference in New Issue
Block a user