WIP: Vulkan: Workbench #107886
|
@ -98,9 +98,9 @@ void legacy_gpencil_frame_to_grease_pencil_drawing(const bGPDframe &gpf,
|
|||
/* Write curve attributes. */
|
||||
stroke_cyclic.span[stroke_i] = (gps->flag & GP_STROKE_CYCLIC) != 0;
|
||||
/* TODO: This should be a `double` attribute. */
|
||||
stroke_init_times.span[stroke_i] = static_cast<float>(gps->inittime);
|
||||
stroke_start_caps.span[stroke_i] = static_cast<int8_t>(gps->caps[0]);
|
||||
stroke_end_caps.span[stroke_i] = static_cast<int8_t>(gps->caps[1]);
|
||||
stroke_init_times.span[stroke_i] = float(gps->inittime);
|
||||
stroke_start_caps.span[stroke_i] = int8_t(gps->caps[0]);
|
||||
stroke_end_caps.span[stroke_i] = int8_t(gps->caps[1]);
|
||||
stroke_hardnesses.span[stroke_i] = gps->hardeness;
|
||||
stroke_point_aspect_ratios.span[stroke_i] = gps->aspect_ratio[0] /
|
||||
max_ff(gps->aspect_ratio[1], 1e-8);
|
||||
|
@ -207,7 +207,7 @@ void legacy_gpencil_to_grease_pencil(Main &bmain, GreasePencil &grease_pencil, b
|
|||
(gpl->onion_flag & GP_LAYER_ONIONSKIN),
|
||||
GP_LAYER_TREE_NODE_USE_ONION_SKINNING);
|
||||
|
||||
new_layer.blend_mode = static_cast<int8_t>(gpl->blend_mode);
|
||||
new_layer.blend_mode = int8_t(gpl->blend_mode);
|
||||
|
||||
/* Convert the layer masks. */
|
||||
LISTBASE_FOREACH (bGPDlayer_Mask *, mask, &gpl->mask_layers) {
|
||||
|
|
|
@ -67,7 +67,7 @@ static std::string get_default_collection_name(const Object *object,
|
|||
}
|
||||
|
||||
char name[MAX_ID_NAME];
|
||||
BLI_snprintf(name, sizeof(name), format, object->id.name + 2);
|
||||
SNPRINTF(name, format, object->id.name + 2);
|
||||
|
||||
return name;
|
||||
}
|
||||
|
|
|
@ -4098,8 +4098,8 @@ void blo_do_versions_280(FileData *fd, Library * /*lib*/, Main *bmain)
|
|||
|
||||
UnitSettings *unit = &scene->unit;
|
||||
if (unit->system == USER_UNIT_NONE) {
|
||||
unit->length_unit = (char)USER_UNIT_ADAPTIVE;
|
||||
unit->mass_unit = (char)USER_UNIT_ADAPTIVE;
|
||||
unit->length_unit = char(USER_UNIT_ADAPTIVE);
|
||||
unit->mass_unit = char(USER_UNIT_ADAPTIVE);
|
||||
}
|
||||
|
||||
RenderData *render_data = &scene->r;
|
||||
|
|
|
@ -4480,7 +4480,7 @@ void blo_do_versions_300(FileData *fd, Library * /*lib*/, Main *bmain)
|
|||
}
|
||||
FOREACH_NODETREE_END;
|
||||
|
||||
BKE_animdata_main_cb(bmain, version_liboverride_nla_frame_start_end, NULL);
|
||||
BKE_animdata_main_cb(bmain, version_liboverride_nla_frame_start_end, nullptr);
|
||||
|
||||
/* Store simulation bake directory in geometry nodes modifier. */
|
||||
LISTBASE_FOREACH (Object *, ob, &bmain->objects) {
|
||||
|
|
|
@ -99,21 +99,21 @@ static void SELECT_next_instance_free(void *instance_)
|
|||
static const DrawEngineDataSize SELECT_next_data_size = DRW_VIEWPORT_DATA_SIZE(SELECT_NextData);
|
||||
|
||||
DrawEngineType draw_engine_select_next_type = {
|
||||
NULL,
|
||||
NULL,
|
||||
nullptr,
|
||||
nullptr,
|
||||
N_("Select-Next"),
|
||||
&SELECT_next_data_size,
|
||||
&SELECT_next_engine_init,
|
||||
NULL,
|
||||
nullptr,
|
||||
&SELECT_next_instance_free,
|
||||
&SELECT_next_cache_init,
|
||||
&SELECT_next_cache_populate,
|
||||
&SELECT_next_cache_finish,
|
||||
&SELECT_next_draw_scene,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
nullptr,
|
||||
nullptr,
|
||||
nullptr,
|
||||
nullptr,
|
||||
};
|
||||
|
||||
/** \} */
|
||||
|
|
|
@ -2466,7 +2466,7 @@ static float x_axis_name[4][2] = {
|
|||
{-0.9f * S_X, 1.0f * S_Y},
|
||||
{1.0f * S_X, -1.0f * S_Y},
|
||||
};
|
||||
#define X_LEN (sizeof(x_axis_name) / sizeof(float[2]))
|
||||
#define X_LEN (ARRAY_SIZE(x_axis_name))
|
||||
#undef S_X
|
||||
#undef S_Y
|
||||
|
||||
|
@ -2480,7 +2480,7 @@ static float y_axis_name[6][2] = {
|
|||
{0.0f * S_X, -0.1f * S_Y},
|
||||
{0.0f * S_X, -1.0f * S_Y},
|
||||
};
|
||||
#define Y_LEN (sizeof(y_axis_name) / sizeof(float[2]))
|
||||
#define Y_LEN (ARRAY_SIZE(y_axis_name))
|
||||
#undef S_X
|
||||
#undef S_Y
|
||||
|
||||
|
@ -2498,7 +2498,7 @@ static float z_axis_name[10][2] = {
|
|||
{-1.00f * S_X, -1.00f * S_Y},
|
||||
{1.00f * S_X, -1.00f * S_Y},
|
||||
};
|
||||
#define Z_LEN (sizeof(z_axis_name) / sizeof(float[2]))
|
||||
#define Z_LEN (ARRAY_SIZE(z_axis_name))
|
||||
#undef S_X
|
||||
#undef S_Y
|
||||
|
||||
|
@ -2525,7 +2525,7 @@ static float axis_marker[8][2] = {
|
|||
{-S_X, 0.0f}
|
||||
#endif
|
||||
};
|
||||
#define MARKER_LEN (sizeof(axis_marker) / sizeof(float[2]))
|
||||
#define MARKER_LEN (ARRAY_SIZE(axis_marker))
|
||||
#define MARKER_FILL_LAYER 6
|
||||
#undef S_X
|
||||
#undef S_Y
|
||||
|
|
|
@ -1969,7 +1969,7 @@ static eV3D_OpMode view3d_navigation_type_from_idname(const char *idname)
|
|||
ViewOpsData *ED_view3d_navigation_init(bContext *C)
|
||||
{
|
||||
if (!CTX_wm_region_view3d(C)) {
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
ViewOpsData *vod = MEM_cnew<ViewOpsData>(__func__);
|
||||
|
@ -2069,7 +2069,7 @@ bool ED_view3d_navigation_do(bContext *C, ViewOpsData *vod, const wmEvent *event
|
|||
/* Although #ED_view3d_update_viewmat is already called when redrawing the 3D View, do it here
|
||||
* as well, so the updated matrix values can be accessed by the operator. */
|
||||
ED_view3d_update_viewmat(
|
||||
vod->depsgraph, vod->scene, vod->v3d, vod->region, NULL, NULL, NULL, false);
|
||||
vod->depsgraph, vod->scene, vod->v3d, vod->region, nullptr, nullptr, nullptr, false);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -1160,7 +1160,7 @@ static void snap_multipoints_free(TransInfo *t)
|
|||
if (t->tsnap.status & SNAP_MULTI_POINTS) {
|
||||
BLI_freelistN(&t->tsnap.points);
|
||||
t->tsnap.status &= ~SNAP_MULTI_POINTS;
|
||||
t->tsnap.selectedPoint = NULL;
|
||||
t->tsnap.selectedPoint = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue