Cleanup: add trailing commas to structs
Needed for clang formatting to workaround bug/limit, see: T53211
This commit is contained in:
@@ -100,7 +100,7 @@ KerningCacheBLF *blf_kerning_cache_new(FontBLF *font)
|
|||||||
/* Cannot fail since it has been added just before. */
|
/* Cannot fail since it has been added just before. */
|
||||||
GlyphBLF *g_prev = blf_glyph_search(font->glyph_cache, j);
|
GlyphBLF *g_prev = blf_glyph_search(font->glyph_cache, j);
|
||||||
|
|
||||||
FT_Vector delta = {.x = 0, .y = 0};
|
FT_Vector delta = { .x = 0, .y = 0, };
|
||||||
if (FT_Get_Kerning(font->face, g_prev->idx, g->idx, kc->mode, &delta) == 0) {
|
if (FT_Get_Kerning(font->face, g_prev->idx, g->idx, kc->mode, &delta) == 0) {
|
||||||
kc->table[i][j] = (int)delta.x >> 6;
|
kc->table[i][j] = (int)delta.x >> 6;
|
||||||
}
|
}
|
||||||
|
@@ -334,7 +334,7 @@ static void ccgSubSurf__calcVertNormals(CCGSubSurf *ss,
|
|||||||
.effectedF = effectedF,
|
.effectedF = effectedF,
|
||||||
.numEffectedV = numEffectedV,
|
.numEffectedV = numEffectedV,
|
||||||
.numEffectedE = numEffectedE,
|
.numEffectedE = numEffectedE,
|
||||||
.numEffectedF = numEffectedF
|
.numEffectedF = numEffectedF,
|
||||||
};
|
};
|
||||||
|
|
||||||
{
|
{
|
||||||
@@ -677,7 +677,7 @@ static void ccgSubSurf__calcSubdivLevel(
|
|||||||
.numEffectedV = numEffectedV,
|
.numEffectedV = numEffectedV,
|
||||||
.numEffectedE = numEffectedE,
|
.numEffectedE = numEffectedE,
|
||||||
.numEffectedF = numEffectedF,
|
.numEffectedF = numEffectedF,
|
||||||
.curLvl = curLvl
|
.curLvl = curLvl,
|
||||||
};
|
};
|
||||||
|
|
||||||
{
|
{
|
||||||
|
@@ -3128,7 +3128,7 @@ bool BKE_animsys_nla_remap_keyframe_value(struct NlaKeyframingContext *context,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Find the evaluation channel for the NLA stack below current strip. */
|
/* Find the evaluation channel for the NLA stack below current strip. */
|
||||||
NlaEvalChannelKey key = { .ptr = *prop_ptr, .prop = prop };
|
NlaEvalChannelKey key = { .ptr = *prop_ptr, .prop = prop, };
|
||||||
NlaEvalData *nlaeval = &context->nla_channels;
|
NlaEvalData *nlaeval = &context->nla_channels;
|
||||||
NlaEvalChannel *nec = nlaevalchan_verify_key(nlaeval, NULL, &key);
|
NlaEvalChannel *nec = nlaevalchan_verify_key(nlaeval, NULL, &key);
|
||||||
int real_index = nlaevalchan_validate_index(nec, index);
|
int real_index = nlaevalchan_validate_index(nec, index);
|
||||||
|
@@ -2641,7 +2641,7 @@ void BKE_armature_cached_bbone_deformation_update(Object *object)
|
|||||||
ArmatureBBoneDefmatsData data = {
|
ArmatureBBoneDefmatsData data = {
|
||||||
.pdef_info_array = pdef_info_array,
|
.pdef_info_array = pdef_info_array,
|
||||||
.dualquats = dualquats,
|
.dualquats = dualquats,
|
||||||
.use_quaternion = use_quaternion
|
.use_quaternion = use_quaternion,
|
||||||
};
|
};
|
||||||
BLI_task_parallel_listbase(&pose->chanbase,
|
BLI_task_parallel_listbase(&pose->chanbase,
|
||||||
&data,
|
&data,
|
||||||
|
@@ -1064,13 +1064,15 @@ static bool cloth_bvh_objcollisions_nearcheck(ClothModifierData * clmd, Collisio
|
|||||||
{
|
{
|
||||||
*collisions = (CollPair *)MEM_mallocN(sizeof(CollPair) * numresult, "collision array");
|
*collisions = (CollPair *)MEM_mallocN(sizeof(CollPair) * numresult, "collision array");
|
||||||
|
|
||||||
ColDetectData data = {.clmd = clmd,
|
ColDetectData data = {
|
||||||
.collmd = collmd,
|
.clmd = clmd,
|
||||||
.overlap = overlap,
|
.collmd = collmd,
|
||||||
.collisions = *collisions,
|
.overlap = overlap,
|
||||||
.culling = culling,
|
.collisions = *collisions,
|
||||||
.use_normal = use_normal,
|
.culling = culling,
|
||||||
.collided = false};
|
.use_normal = use_normal,
|
||||||
|
.collided = false,
|
||||||
|
};
|
||||||
|
|
||||||
ParallelRangeSettings settings;
|
ParallelRangeSettings settings;
|
||||||
BLI_parallel_range_settings_defaults(&settings);
|
BLI_parallel_range_settings_defaults(&settings);
|
||||||
@@ -1083,10 +1085,12 @@ static bool cloth_bvh_objcollisions_nearcheck(ClothModifierData * clmd, Collisio
|
|||||||
static bool cloth_bvh_selfcollisions_nearcheck(ClothModifierData * clmd, CollPair *collisions,
|
static bool cloth_bvh_selfcollisions_nearcheck(ClothModifierData * clmd, CollPair *collisions,
|
||||||
int numresult, BVHTreeOverlap *overlap)
|
int numresult, BVHTreeOverlap *overlap)
|
||||||
{
|
{
|
||||||
SelfColDetectData data = {.clmd = clmd,
|
SelfColDetectData data = {
|
||||||
.overlap = overlap,
|
.clmd = clmd,
|
||||||
.collisions = collisions,
|
.overlap = overlap,
|
||||||
.collided = false};
|
.collisions = collisions,
|
||||||
|
.collided = false,
|
||||||
|
};
|
||||||
|
|
||||||
ParallelRangeSettings settings;
|
ParallelRangeSettings settings;
|
||||||
BLI_parallel_range_settings_defaults(&settings);
|
BLI_parallel_range_settings_defaults(&settings);
|
||||||
|
@@ -1580,7 +1580,7 @@ static void dynamicPaint_setInitialColor(const Scene *scene, DynamicPaintSurface
|
|||||||
DynamicPaintSetInitColorData data = {
|
DynamicPaintSetInitColorData data = {
|
||||||
.surface = surface,
|
.surface = surface,
|
||||||
.mloop = mloop, .mlooptri = mlooptri, .mloopuv = mloopuv, .pool = pool,
|
.mloop = mloop, .mlooptri = mlooptri, .mloopuv = mloopuv, .pool = pool,
|
||||||
.scene_color_manage = scene_color_manage
|
.scene_color_manage = scene_color_manage,
|
||||||
};
|
};
|
||||||
ParallelRangeSettings settings;
|
ParallelRangeSettings settings;
|
||||||
BLI_parallel_range_settings_defaults(&settings);
|
BLI_parallel_range_settings_defaults(&settings);
|
||||||
@@ -1595,7 +1595,7 @@ static void dynamicPaint_setInitialColor(const Scene *scene, DynamicPaintSurface
|
|||||||
DynamicPaintSetInitColorData data = {
|
DynamicPaintSetInitColorData data = {
|
||||||
.surface = surface,
|
.surface = surface,
|
||||||
.mlooptri = mlooptri, .mloopuv = mloopuv,
|
.mlooptri = mlooptri, .mloopuv = mloopuv,
|
||||||
.scene_color_manage = scene_color_manage
|
.scene_color_manage = scene_color_manage,
|
||||||
};
|
};
|
||||||
ParallelRangeSettings settings;
|
ParallelRangeSettings settings;
|
||||||
BLI_parallel_range_settings_defaults(&settings);
|
BLI_parallel_range_settings_defaults(&settings);
|
||||||
@@ -1756,7 +1756,7 @@ static void dynamicPaint_applySurfaceDisplace(DynamicPaintSurface *surface, Mesh
|
|||||||
if (surface->type == MOD_DPAINT_SURFACE_T_DISPLACE) {
|
if (surface->type == MOD_DPAINT_SURFACE_T_DISPLACE) {
|
||||||
MVert *mvert = result->mvert;
|
MVert *mvert = result->mvert;
|
||||||
|
|
||||||
DynamicPaintModifierApplyData data = {.surface = surface, .mvert = mvert};
|
DynamicPaintModifierApplyData data = { .surface = surface, .mvert = mvert, };
|
||||||
ParallelRangeSettings settings;
|
ParallelRangeSettings settings;
|
||||||
BLI_parallel_range_settings_defaults(&settings);
|
BLI_parallel_range_settings_defaults(&settings);
|
||||||
settings.use_threading = (sData->total_points > 10000);
|
settings.use_threading = (sData->total_points > 10000);
|
||||||
@@ -1903,7 +1903,7 @@ static Mesh *dynamicPaint_Modifier_apply(
|
|||||||
/* paint is stored on dry and wet layers, so mix final color first */
|
/* paint is stored on dry and wet layers, so mix final color first */
|
||||||
float (*fcolor)[4] = MEM_callocN(sizeof(*fcolor) * sData->total_points, "Temp paint color");
|
float (*fcolor)[4] = MEM_callocN(sizeof(*fcolor) * sData->total_points, "Temp paint color");
|
||||||
|
|
||||||
DynamicPaintModifierApplyData data = {.surface = surface, .fcolor = fcolor};
|
DynamicPaintModifierApplyData data = { .surface = surface, .fcolor = fcolor, };
|
||||||
{
|
{
|
||||||
ParallelRangeSettings settings;
|
ParallelRangeSettings settings;
|
||||||
BLI_parallel_range_settings_defaults(&settings);
|
BLI_parallel_range_settings_defaults(&settings);
|
||||||
@@ -2007,7 +2007,7 @@ static Mesh *dynamicPaint_Modifier_apply(
|
|||||||
else if (surface->type == MOD_DPAINT_SURFACE_T_WAVE) {
|
else if (surface->type == MOD_DPAINT_SURFACE_T_WAVE) {
|
||||||
MVert *mvert = result->mvert;
|
MVert *mvert = result->mvert;
|
||||||
|
|
||||||
DynamicPaintModifierApplyData data = {.surface = surface, .mvert = mvert};
|
DynamicPaintModifierApplyData data = { .surface = surface, .mvert = mvert, };
|
||||||
ParallelRangeSettings settings;
|
ParallelRangeSettings settings;
|
||||||
BLI_parallel_range_settings_defaults(&settings);
|
BLI_parallel_range_settings_defaults(&settings);
|
||||||
settings.use_threading = (sData->total_points > 1000);
|
settings.use_threading = (sData->total_points > 1000);
|
||||||
@@ -2481,7 +2481,7 @@ static int dynamic_paint_find_neighbour_pixel(
|
|||||||
DynamicPaintFindIslandBorderData bdata = {
|
DynamicPaintFindIslandBorderData bdata = {
|
||||||
.vert_to_looptri_map = vert_to_looptri_map,
|
.vert_to_looptri_map = vert_to_looptri_map,
|
||||||
.w = w, .h = h, .px = px, .py = py,
|
.w = w, .h = h, .px = px, .py = py,
|
||||||
.best_index = NOT_FOUND, .best_weight = 1.0f
|
.best_index = NOT_FOUND, .best_weight = 1.0f,
|
||||||
};
|
};
|
||||||
|
|
||||||
float pixel[2];
|
float pixel[2];
|
||||||
@@ -3236,7 +3236,7 @@ void dynamicPaint_outputSurfaceImage(DynamicPaintSurface *surface, char *filenam
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
DynamicPaintOutputSurfaceImageData data = {.surface = surface, .ibuf = ibuf};
|
DynamicPaintOutputSurfaceImageData data = { .surface = surface, .ibuf = ibuf, };
|
||||||
switch (surface->type) {
|
switch (surface->type) {
|
||||||
case MOD_DPAINT_SURFACE_T_PAINT:
|
case MOD_DPAINT_SURFACE_T_PAINT:
|
||||||
switch (output_layer) {
|
switch (output_layer) {
|
||||||
@@ -4191,7 +4191,7 @@ static int dynamicPaint_paintMesh(Depsgraph *depsgraph, DynamicPaintSurface *sur
|
|||||||
.scene = scene, .timescale = timescale, .c_index = c_index,
|
.scene = scene, .timescale = timescale, .c_index = c_index,
|
||||||
.mesh = mesh, .mvert = mvert, .mloop = mloop, .mlooptri = mlooptri,
|
.mesh = mesh, .mvert = mvert, .mloop = mloop, .mlooptri = mlooptri,
|
||||||
.brush_radius = brush_radius, .avg_brushNor = avg_brushNor, .brushVelocity = brushVelocity,
|
.brush_radius = brush_radius, .avg_brushNor = avg_brushNor, .brushVelocity = brushVelocity,
|
||||||
.treeData = &treeData
|
.treeData = &treeData,
|
||||||
};
|
};
|
||||||
ParallelRangeSettings settings;
|
ParallelRangeSettings settings;
|
||||||
BLI_parallel_range_settings_defaults(&settings);
|
BLI_parallel_range_settings_defaults(&settings);
|
||||||
@@ -5351,7 +5351,7 @@ static void dynamicPaint_doBorderStep(DynamicPaintSurface *surface)
|
|||||||
|
|
||||||
/* Don't use prevPoint, relying on the condition that neighbors are never border pixels. */
|
/* Don't use prevPoint, relying on the condition that neighbors are never border pixels. */
|
||||||
DynamicPaintEffectData data = {
|
DynamicPaintEffectData data = {
|
||||||
.surface = surface
|
.surface = surface,
|
||||||
};
|
};
|
||||||
|
|
||||||
ParallelRangeSettings settings;
|
ParallelRangeSettings settings;
|
||||||
@@ -5907,7 +5907,7 @@ static int dynamicPaint_doStep(
|
|||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
if (dynamic_paint_surface_needs_dry_dissolve(surface)) {
|
if (dynamic_paint_surface_needs_dry_dissolve(surface)) {
|
||||||
DynamicPaintDissolveDryData data = {.surface = surface, .timescale = timescale};
|
DynamicPaintDissolveDryData data = { .surface = surface, .timescale = timescale, };
|
||||||
ParallelRangeSettings settings;
|
ParallelRangeSettings settings;
|
||||||
BLI_parallel_range_settings_defaults(&settings);
|
BLI_parallel_range_settings_defaults(&settings);
|
||||||
settings.use_threading = (sData->total_points > 1000);
|
settings.use_threading = (sData->total_points > 1000);
|
||||||
|
@@ -126,7 +126,7 @@ void BKE_keyconfig_pref_set_select_mouse(UserDef *userdef, int value, bool overr
|
|||||||
wmKeyConfigPref *kpt = BKE_keyconfig_pref_ensure(userdef, WM_KEYCONFIG_STR_DEFAULT);
|
wmKeyConfigPref *kpt = BKE_keyconfig_pref_ensure(userdef, WM_KEYCONFIG_STR_DEFAULT);
|
||||||
IDProperty *idprop = IDP_GetPropertyFromGroup(kpt->prop, "select_mouse");
|
IDProperty *idprop = IDP_GetPropertyFromGroup(kpt->prop, "select_mouse");
|
||||||
if (!idprop) {
|
if (!idprop) {
|
||||||
IDPropertyTemplate tmp = { .i = value };
|
IDPropertyTemplate tmp = { .i = value, };
|
||||||
IDP_AddToGroup(kpt->prop, IDP_New(IDP_INT, &tmp, "select_mouse"));
|
IDP_AddToGroup(kpt->prop, IDP_New(IDP_INT, &tmp, "select_mouse"));
|
||||||
}
|
}
|
||||||
else if (override) {
|
else if (override) {
|
||||||
|
@@ -696,7 +696,7 @@ bool BKE_id_copy_ex(Main *bmain, const ID *id, ID **r_newid, const int flag, con
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Update ID refcount, remap pointers to self in new ID. */
|
/* Update ID refcount, remap pointers to self in new ID. */
|
||||||
struct IDCopyLibManagementData data = {.id_src = id, .id_dst = *r_newid, .flag = flag};
|
struct IDCopyLibManagementData data = {.id_src = id, .id_dst = *r_newid, .flag = flag,};
|
||||||
BKE_library_foreach_ID_link(bmain, *r_newid, id_copy_libmanagement_cb, &data, IDWALK_NOP);
|
BKE_library_foreach_ID_link(bmain, *r_newid, id_copy_libmanagement_cb, &data, IDWALK_NOP);
|
||||||
|
|
||||||
/* Do not make new copy local in case we are copying outside of main...
|
/* Do not make new copy local in case we are copying outside of main...
|
||||||
|
@@ -1465,7 +1465,7 @@ void BKE_maskrasterize_buffer(MaskRasterHandle *mr_handle,
|
|||||||
.x_px_ofs = x_inv * 0.5f,
|
.x_px_ofs = x_inv * 0.5f,
|
||||||
.y_px_ofs = y_inv * 0.5f,
|
.y_px_ofs = y_inv * 0.5f,
|
||||||
.width = width,
|
.width = width,
|
||||||
.buffer = buffer
|
.buffer = buffer,
|
||||||
};
|
};
|
||||||
ParallelRangeSettings settings;
|
ParallelRangeSettings settings;
|
||||||
BLI_parallel_range_settings_defaults(&settings);
|
BLI_parallel_range_settings_defaults(&settings);
|
||||||
|
@@ -324,7 +324,7 @@ void BKE_mesh_calc_normals_poly(
|
|||||||
|
|
||||||
MeshCalcNormalsData data = {
|
MeshCalcNormalsData data = {
|
||||||
.mpolys = mpolys, .mloop = mloop, .mverts = mverts,
|
.mpolys = mpolys, .mloop = mloop, .mverts = mverts,
|
||||||
.pnors = pnors, .lnors_weighted = lnors_weighted, .vnors = vnors
|
.pnors = pnors, .lnors_weighted = lnors_weighted, .vnors = vnors,
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Compute poly normals, and prepare weighted loop normals. */
|
/* Compute poly normals, and prepare weighted loop normals. */
|
||||||
|
@@ -291,9 +291,10 @@ Mesh *BKE_multires_create_mesh(
|
|||||||
Object *ob_eval = DEG_get_evaluated_object(depsgraph, ob);
|
Object *ob_eval = DEG_get_evaluated_object(depsgraph, ob);
|
||||||
Mesh *deformed_mesh = mesh_get_eval_deform(depsgraph, scene, ob_eval, CD_MASK_BAREMESH);
|
Mesh *deformed_mesh = mesh_get_eval_deform(depsgraph, scene, ob_eval, CD_MASK_BAREMESH);
|
||||||
ModifierEvalContext modifier_ctx = {
|
ModifierEvalContext modifier_ctx = {
|
||||||
.depsgraph = depsgraph,
|
.depsgraph = depsgraph,
|
||||||
.object = ob_eval,
|
.object = ob_eval,
|
||||||
.flag = MOD_APPLY_USECACHE | MOD_APPLY_IGNORE_SIMPLIFY};
|
.flag = MOD_APPLY_USECACHE | MOD_APPLY_IGNORE_SIMPLIFY,
|
||||||
|
};
|
||||||
|
|
||||||
const ModifierTypeInfo *mti = modifierType_getInfo(mmd->modifier.type);
|
const ModifierTypeInfo *mti = modifierType_getInfo(mmd->modifier.type);
|
||||||
Mesh *result = mti->applyModifier(&mmd->modifier, &modifier_ctx, deformed_mesh);
|
Mesh *result = mti->applyModifier(&mmd->modifier, &modifier_ctx, deformed_mesh);
|
||||||
@@ -1180,7 +1181,7 @@ static void multiresModifier_disp_run(DerivedMesh *dm, Mesh *me, DerivedMesh *dm
|
|||||||
.gridOffset = gridOffset,
|
.gridOffset = gridOffset,
|
||||||
.gridSize = gridSize,
|
.gridSize = gridSize,
|
||||||
.dGridSize = dGridSize,
|
.dGridSize = dGridSize,
|
||||||
.dSkip = dSkip
|
.dSkip = dSkip,
|
||||||
};
|
};
|
||||||
|
|
||||||
BLI_task_parallel_range(0, totpoly, &data, multires_disp_run_cb, &settings);
|
BLI_task_parallel_range(0, totpoly, &data, multires_disp_run_cb, &settings);
|
||||||
|
@@ -1012,9 +1012,10 @@ bool multiresModifier_reshapeFromDeformModifier(
|
|||||||
multires_mesh, &num_deformed_verts);
|
multires_mesh, &num_deformed_verts);
|
||||||
/* Apply deformation modifier on the multires, */
|
/* Apply deformation modifier on the multires, */
|
||||||
const ModifierEvalContext modifier_ctx = {
|
const ModifierEvalContext modifier_ctx = {
|
||||||
.depsgraph = depsgraph,
|
.depsgraph = depsgraph,
|
||||||
.object = object,
|
.object = object,
|
||||||
.flag = MOD_APPLY_USECACHE | MOD_APPLY_IGNORE_SIMPLIFY};
|
.flag = MOD_APPLY_USECACHE | MOD_APPLY_IGNORE_SIMPLIFY,
|
||||||
|
};
|
||||||
modwrap_deformVerts(
|
modwrap_deformVerts(
|
||||||
md, &modifier_ctx, multires_mesh, deformed_verts,
|
md, &modifier_ctx, multires_mesh, deformed_verts,
|
||||||
multires_mesh->totvert);
|
multires_mesh->totvert);
|
||||||
@@ -1183,16 +1184,18 @@ bool multiresModifier_reshapeFromCCG(
|
|||||||
multires_reshape_ensure_grids(coarse_mesh, top_level);
|
multires_reshape_ensure_grids(coarse_mesh, top_level);
|
||||||
/* Construct context. */
|
/* Construct context. */
|
||||||
ReshapeFromCCGTaskData data = {
|
ReshapeFromCCGTaskData data = {
|
||||||
.reshape_ctx = {
|
.reshape_ctx = {
|
||||||
.subdiv = subdiv,
|
.subdiv = subdiv,
|
||||||
.coarse_mesh = coarse_mesh,
|
.coarse_mesh = coarse_mesh,
|
||||||
.mdisps = mdisps,
|
.mdisps = mdisps,
|
||||||
.grid_paint_mask = grid_paint_mask,
|
.grid_paint_mask = grid_paint_mask,
|
||||||
.top_grid_size = BKE_subdiv_grid_size_from_level(top_level),
|
.top_grid_size = BKE_subdiv_grid_size_from_level(top_level),
|
||||||
.top_level = top_level},
|
.top_level = top_level,
|
||||||
.face_ptex_offset = BKE_subdiv_face_ptex_offset_get(subdiv),
|
},
|
||||||
.key = &key,
|
.face_ptex_offset = BKE_subdiv_face_ptex_offset_get(subdiv),
|
||||||
.grids = subdiv_ccg->grids};
|
.key = &key,
|
||||||
|
.grids = subdiv_ccg->grids,
|
||||||
|
};
|
||||||
/* Initialize propagation to higher levels. */
|
/* Initialize propagation to higher levels. */
|
||||||
MultiresPropagateData propagate_data;
|
MultiresPropagateData propagate_data;
|
||||||
multires_reshape_propagate_prepare(
|
multires_reshape_propagate_prepare(
|
||||||
|
@@ -910,7 +910,7 @@ static void sculptsession_bm_to_me_update_data_only(Object *ob, bool reorder)
|
|||||||
}
|
}
|
||||||
if (reorder)
|
if (reorder)
|
||||||
BM_log_mesh_elems_reorder(ss->bm, ss->bm_log);
|
BM_log_mesh_elems_reorder(ss->bm, ss->bm_log);
|
||||||
BM_mesh_bm_to_me(NULL, ss->bm, ob->data, (&(struct BMeshToMeshParams){.calc_object_remap = false}));
|
BM_mesh_bm_to_me(NULL, ss->bm, ob->data, (&(struct BMeshToMeshParams){.calc_object_remap = false,}));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -3474,7 +3474,7 @@ static ImBuf *do_render_strip_uncached(
|
|||||||
if (BLI_linklist_index(state->scene_parents, seq->scene) != -1) {
|
if (BLI_linklist_index(state->scene_parents, seq->scene) != -1) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
LinkNode scene_parent = {.next = state->scene_parents, .link = seq->scene};
|
LinkNode scene_parent = { .next = state->scene_parents, .link = seq->scene, };
|
||||||
state->scene_parents = &scene_parent;
|
state->scene_parents = &scene_parent;
|
||||||
/* end check */
|
/* end check */
|
||||||
|
|
||||||
|
@@ -410,7 +410,7 @@ static void shrinkwrap_calc_nearest_vertex(ShrinkwrapCalcData *calc)
|
|||||||
nearest.index = -1;
|
nearest.index = -1;
|
||||||
nearest.dist_sq = FLT_MAX;
|
nearest.dist_sq = FLT_MAX;
|
||||||
|
|
||||||
ShrinkwrapCalcCBData data = {.calc = calc, .tree = calc->tree};
|
ShrinkwrapCalcCBData data = { .calc = calc, .tree = calc->tree, };
|
||||||
ParallelRangeSettings settings;
|
ParallelRangeSettings settings;
|
||||||
BLI_parallel_range_settings_defaults(&settings);
|
BLI_parallel_range_settings_defaults(&settings);
|
||||||
settings.use_threading = (calc->numVerts > BKE_MESH_OMP_LIMIT);
|
settings.use_threading = (calc->numVerts > BKE_MESH_OMP_LIMIT);
|
||||||
@@ -676,7 +676,7 @@ static void shrinkwrap_calc_normal_projection(ShrinkwrapCalcData *calc)
|
|||||||
/* After successfully build the trees, start projection vertices. */
|
/* After successfully build the trees, start projection vertices. */
|
||||||
ShrinkwrapCalcCBData data = {
|
ShrinkwrapCalcCBData data = {
|
||||||
.calc = calc, .tree = calc->tree, .aux_tree = aux_tree,
|
.calc = calc, .tree = calc->tree, .aux_tree = aux_tree,
|
||||||
.proj_axis = proj_axis, .local2aux = &local2aux
|
.proj_axis = proj_axis, .local2aux = &local2aux,
|
||||||
};
|
};
|
||||||
ParallelRangeSettings settings;
|
ParallelRangeSettings settings;
|
||||||
BLI_parallel_range_settings_defaults(&settings);
|
BLI_parallel_range_settings_defaults(&settings);
|
||||||
@@ -852,7 +852,7 @@ static bool target_project_solve_point_tri(
|
|||||||
x[2] = (dot_v3v3(tmp, r_hit_no) < 0) ? -dist : dist;
|
x[2] = (dot_v3v3(tmp, r_hit_no) < 0) ? -dist : dist;
|
||||||
|
|
||||||
/* Solve the equations iteratively. */
|
/* Solve the equations iteratively. */
|
||||||
TargetProjectTriData tri_data = { .vtri_co = vtri_co, .vtri_no = vtri_no, .point_co = point_co };
|
TargetProjectTriData tri_data = { .vtri_co = vtri_co, .vtri_no = vtri_no, .point_co = point_co, };
|
||||||
|
|
||||||
sub_v3_v3v3(tri_data.n0_minus_n2, vtri_no[0], vtri_no[2]);
|
sub_v3_v3v3(tri_data.n0_minus_n2, vtri_no[0], vtri_no[2]);
|
||||||
sub_v3_v3v3(tri_data.n1_minus_n2, vtri_no[1], vtri_no[2]);
|
sub_v3_v3v3(tri_data.n1_minus_n2, vtri_no[1], vtri_no[2]);
|
||||||
@@ -1268,7 +1268,7 @@ static void shrinkwrap_calc_nearest_surface_point(ShrinkwrapCalcData *calc)
|
|||||||
nearest.dist_sq = FLT_MAX;
|
nearest.dist_sq = FLT_MAX;
|
||||||
|
|
||||||
/* Find the nearest vertex */
|
/* Find the nearest vertex */
|
||||||
ShrinkwrapCalcCBData data = {.calc = calc, .tree = calc->tree};
|
ShrinkwrapCalcCBData data = { .calc = calc, .tree = calc->tree, };
|
||||||
ParallelRangeSettings settings;
|
ParallelRangeSettings settings;
|
||||||
BLI_parallel_range_settings_defaults(&settings);
|
BLI_parallel_range_settings_defaults(&settings);
|
||||||
settings.use_threading = (calc->numVerts > BKE_MESH_OMP_LIMIT);
|
settings.use_threading = (calc->numVerts > BKE_MESH_OMP_LIMIT);
|
||||||
|
@@ -896,7 +896,7 @@ static void obstacles_from_mesh(
|
|||||||
.tree = &treeData, .obstacle_map = obstacle_map,
|
.tree = &treeData, .obstacle_map = obstacle_map,
|
||||||
.has_velocity = has_velocity, .vert_vel = vert_vel,
|
.has_velocity = has_velocity, .vert_vel = vert_vel,
|
||||||
.velocityX = velocityX, .velocityY = velocityY, .velocityZ = velocityZ,
|
.velocityX = velocityX, .velocityY = velocityY, .velocityZ = velocityZ,
|
||||||
.num_obstacles = num_obstacles
|
.num_obstacles = num_obstacles,
|
||||||
};
|
};
|
||||||
ParallelRangeSettings settings;
|
ParallelRangeSettings settings;
|
||||||
BLI_parallel_range_settings_defaults(&settings);
|
BLI_parallel_range_settings_defaults(&settings);
|
||||||
|
@@ -865,8 +865,8 @@ static void subdiv_ccg_recalc_inner_grid_normals(SubdivCCG *subdiv_ccg)
|
|||||||
CCGKey key;
|
CCGKey key;
|
||||||
BKE_subdiv_ccg_key_top_level(&key, subdiv_ccg);
|
BKE_subdiv_ccg_key_top_level(&key, subdiv_ccg);
|
||||||
RecalcInnerNormalsData data = {
|
RecalcInnerNormalsData data = {
|
||||||
.subdiv_ccg = subdiv_ccg,
|
.subdiv_ccg = subdiv_ccg,
|
||||||
.key = &key
|
.key = &key,
|
||||||
};
|
};
|
||||||
RecalcInnerNormalsTLSData tls_data = {NULL};
|
RecalcInnerNormalsTLSData tls_data = {NULL};
|
||||||
ParallelRangeSettings parallel_range_settings;
|
ParallelRangeSettings parallel_range_settings;
|
||||||
|
@@ -1598,7 +1598,7 @@ ImBuf *BKE_tracking_stabilize_frame(MovieClip *clip,
|
|||||||
|
|
||||||
TrackingStabilizeFrameInterpolationData data = {
|
TrackingStabilizeFrameInterpolationData data = {
|
||||||
.ibuf = ibuf, .tmpibuf = tmpibuf, .mat = mat,
|
.ibuf = ibuf, .tmpibuf = tmpibuf, .mat = mat,
|
||||||
.interpolation = interpolation
|
.interpolation = interpolation,
|
||||||
};
|
};
|
||||||
|
|
||||||
ParallelRangeSettings settings;
|
ParallelRangeSettings settings;
|
||||||
|
@@ -508,7 +508,7 @@ void BM_loop_interp_multires_ex(
|
|||||||
.cd_loop_mdisp_offset = cd_loop_mdisp_offset,
|
.cd_loop_mdisp_offset = cd_loop_mdisp_offset,
|
||||||
.md_dst = md_dst, .f_src_center = f_src_center,
|
.md_dst = md_dst, .f_src_center = f_src_center,
|
||||||
.axis_x = axis_x, .axis_y = axis_y, .v1 = v1, .v4 = v4, .e1 = e1, .e2 = e2,
|
.axis_x = axis_x, .axis_y = axis_y, .v1 = v1, .v4 = v4, .e1 = e1, .e2 = e2,
|
||||||
.res = res, .d = 1.0f / (float)(res - 1)
|
.res = res, .d = 1.0f / (float)(res - 1),
|
||||||
};
|
};
|
||||||
ParallelRangeSettings settings;
|
ParallelRangeSettings settings;
|
||||||
BLI_parallel_range_settings_defaults(&settings);
|
BLI_parallel_range_settings_defaults(&settings);
|
||||||
|
@@ -352,7 +352,7 @@ static void bm_mesh_edges_calc_vectors(BMesh *bm, float (*edgevec)[3], const flo
|
|||||||
|
|
||||||
BMEdgesCalcVectorsData data = {
|
BMEdgesCalcVectorsData data = {
|
||||||
.vcos = vcos,
|
.vcos = vcos,
|
||||||
.edgevec = edgevec
|
.edgevec = edgevec,
|
||||||
};
|
};
|
||||||
|
|
||||||
BM_iter_parallel(bm, BM_EDGES_OF_MESH, mesh_edges_calc_vectors_cb, &data, bm->totedge >= BM_OMP_LIMIT);
|
BM_iter_parallel(bm, BM_EDGES_OF_MESH, mesh_edges_calc_vectors_cb, &data, bm->totedge >= BM_OMP_LIMIT);
|
||||||
@@ -464,7 +464,7 @@ static void bm_mesh_verts_calc_normals(
|
|||||||
.fnos = fnos,
|
.fnos = fnos,
|
||||||
.edgevec = edgevec,
|
.edgevec = edgevec,
|
||||||
.vcos = vcos,
|
.vcos = vcos,
|
||||||
.vnos = vnos
|
.vnos = vnos,
|
||||||
};
|
};
|
||||||
|
|
||||||
BM_iter_parallel(bm, BM_FACES_OF_MESH, mesh_verts_calc_normals_accum_cb, &data, bm->totface >= BM_OMP_LIMIT);
|
BM_iter_parallel(bm, BM_FACES_OF_MESH, mesh_verts_calc_normals_accum_cb, &data, bm->totface >= BM_OMP_LIMIT);
|
||||||
|
@@ -1187,7 +1187,7 @@ void EEVEE_lightbake_update_world_quick(EEVEE_ViewLayerData *sldata, EEVEE_Data
|
|||||||
float filter_quality = scene->eevee.gi_filter_quality;
|
float filter_quality = scene->eevee.gi_filter_quality;
|
||||||
|
|
||||||
EEVEE_LightBake lbake = {
|
EEVEE_LightBake lbake = {
|
||||||
.resource_only = true
|
.resource_only = true,
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Create resources. */
|
/* Create resources. */
|
||||||
|
@@ -820,7 +820,7 @@ void EEVEE_lightbake_render_world(EEVEE_ViewLayerData *UNUSED(sldata), EEVEE_Dat
|
|||||||
{
|
{
|
||||||
EEVEE_BakeRenderData brdata = {
|
EEVEE_BakeRenderData brdata = {
|
||||||
.vedata = vedata,
|
.vedata = vedata,
|
||||||
.face_fb = face_fb
|
.face_fb = face_fb,
|
||||||
};
|
};
|
||||||
|
|
||||||
render_cubemap(lightbake_render_world_face, &brdata, (float[3]){0.0f}, 1.0f, 10.0f);
|
render_cubemap(lightbake_render_world_face, &brdata, (float[3]){0.0f}, 1.0f, 10.0f);
|
||||||
@@ -854,7 +854,7 @@ void EEVEE_lightbake_render_scene(
|
|||||||
EEVEE_BakeRenderData brdata = {
|
EEVEE_BakeRenderData brdata = {
|
||||||
.vedata = vedata,
|
.vedata = vedata,
|
||||||
.sldata = sldata,
|
.sldata = sldata,
|
||||||
.face_fb = face_fb
|
.face_fb = face_fb,
|
||||||
};
|
};
|
||||||
|
|
||||||
render_cubemap(lightbake_render_scene_face, &brdata, pos, near_clip, far_clip);
|
render_cubemap(lightbake_render_scene_face, &brdata, pos, near_clip, far_clip);
|
||||||
|
@@ -1236,7 +1236,7 @@ void EEVEE_draw_shadows(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata)
|
|||||||
Lamp *la = (Lamp *)ob->data;
|
Lamp *la = (Lamp *)ob->data;
|
||||||
BoundSphere bsphere = {
|
BoundSphere bsphere = {
|
||||||
.center = {ob->obmat[3][0], ob->obmat[3][1], ob->obmat[3][2]},
|
.center = {ob->obmat[3][0], ob->obmat[3][1], ob->obmat[3][2]},
|
||||||
.radius = light_attenuation_radius_get(la, light_threshold)
|
.radius = light_attenuation_radius_get(la, light_threshold),
|
||||||
};
|
};
|
||||||
cube_visible[i] = DRW_culling_sphere_test(&bsphere);
|
cube_visible[i] = DRW_culling_sphere_test(&bsphere);
|
||||||
}
|
}
|
||||||
|
@@ -269,7 +269,8 @@ void *get_nearest_bone(
|
|||||||
if (vc.obedit != NULL) {
|
if (vc.obedit != NULL) {
|
||||||
bases = BKE_view_layer_array_from_bases_in_mode(
|
bases = BKE_view_layer_array_from_bases_in_mode(
|
||||||
vc.view_layer, vc.v3d, &bases_len, {
|
vc.view_layer, vc.v3d, &bases_len, {
|
||||||
.object_mode = OB_MODE_EDIT});
|
.object_mode = OB_MODE_EDIT,
|
||||||
|
});
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
bases = BKE_object_pose_base_array_get(vc.view_layer, vc.v3d, &bases_len);
|
bases = BKE_object_pose_base_array_get(vc.view_layer, vc.v3d, &bases_len);
|
||||||
|
@@ -761,10 +761,10 @@ static int gizmo_cage2d_test_select(
|
|||||||
|
|
||||||
/* if gizmo does not have a scale intersection, don't do it */
|
/* if gizmo does not have a scale intersection, don't do it */
|
||||||
if (transform_flag & (ED_GIZMO_CAGE2D_XFORM_FLAG_SCALE | ED_GIZMO_CAGE2D_XFORM_FLAG_SCALE_UNIFORM)) {
|
if (transform_flag & (ED_GIZMO_CAGE2D_XFORM_FLAG_SCALE | ED_GIZMO_CAGE2D_XFORM_FLAG_SCALE_UNIFORM)) {
|
||||||
const rctf r_xmin = {.xmin = -size[0], .ymin = -size[1], .xmax = -size[0] + margin[0], .ymax = size[1]};
|
const rctf r_xmin = { .xmin = -size[0], .ymin = -size[1], .xmax = -size[0] + margin[0], .ymax = size[1], };
|
||||||
const rctf r_xmax = {.xmin = size[0] - margin[0], .ymin = -size[1], .xmax = size[0], .ymax = size[1]};
|
const rctf r_xmax = { .xmin = size[0] - margin[0], .ymin = -size[1], .xmax = size[0], .ymax = size[1], };
|
||||||
const rctf r_ymin = {.xmin = -size[0], .ymin = -size[1], .xmax = size[0], .ymax = -size[1] + margin[1]};
|
const rctf r_ymin = { .xmin = -size[0], .ymin = -size[1], .xmax = size[0], .ymax = -size[1] + margin[1], };
|
||||||
const rctf r_ymax = {.xmin = -size[0], .ymin = size[1] - margin[1], .xmax = size[0], .ymax = size[1]};
|
const rctf r_ymax = { .xmin = -size[0], .ymin = size[1] - margin[1], .xmax = size[0], .ymax = size[1], };
|
||||||
|
|
||||||
if (BLI_rctf_isect_pt_v(&r_xmin, point_local)) {
|
if (BLI_rctf_isect_pt_v(&r_xmin, point_local)) {
|
||||||
if (BLI_rctf_isect_pt_v(&r_ymin, point_local)) {
|
if (BLI_rctf_isect_pt_v(&r_ymin, point_local)) {
|
||||||
|
@@ -795,7 +795,7 @@ void ui_draw_but_HISTOGRAM(ARegion *UNUSED(ar), uiBut *but, const uiWidgetColors
|
|||||||
.xmin = (float)recti->xmin + 1,
|
.xmin = (float)recti->xmin + 1,
|
||||||
.xmax = (float)recti->xmax - 1,
|
.xmax = (float)recti->xmax - 1,
|
||||||
.ymin = (float)recti->ymin + 1,
|
.ymin = (float)recti->ymin + 1,
|
||||||
.ymax = (float)recti->ymax - 1
|
.ymax = (float)recti->ymax - 1,
|
||||||
};
|
};
|
||||||
|
|
||||||
float w = BLI_rctf_size_x(&rect);
|
float w = BLI_rctf_size_x(&rect);
|
||||||
@@ -901,7 +901,7 @@ void ui_draw_but_WAVEFORM(ARegion *UNUSED(ar), uiBut *but, const uiWidgetColors
|
|||||||
.xmin = (float)recti->xmin + 1,
|
.xmin = (float)recti->xmin + 1,
|
||||||
.xmax = (float)recti->xmax - 1,
|
.xmax = (float)recti->xmax - 1,
|
||||||
.ymin = (float)recti->ymin + 1,
|
.ymin = (float)recti->ymin + 1,
|
||||||
.ymax = (float)recti->ymax - 1
|
.ymax = (float)recti->ymax - 1,
|
||||||
};
|
};
|
||||||
|
|
||||||
if (scopes->wavefrm_yfac < 0.5f)
|
if (scopes->wavefrm_yfac < 0.5f)
|
||||||
@@ -1187,7 +1187,7 @@ void ui_draw_but_VECTORSCOPE(ARegion *UNUSED(ar), uiBut *but, const uiWidgetColo
|
|||||||
.xmin = (float)recti->xmin + 1,
|
.xmin = (float)recti->xmin + 1,
|
||||||
.xmax = (float)recti->xmax - 1,
|
.xmax = (float)recti->xmax - 1,
|
||||||
.ymin = (float)recti->ymin + 1,
|
.ymin = (float)recti->ymin + 1,
|
||||||
.ymax = (float)recti->ymax - 1
|
.ymax = (float)recti->ymax - 1,
|
||||||
};
|
};
|
||||||
|
|
||||||
float w = BLI_rctf_size_x(&rect);
|
float w = BLI_rctf_size_x(&rect);
|
||||||
@@ -1639,7 +1639,7 @@ void ui_draw_but_CURVE(ARegion *ar, uiBut *but, const uiWidgetColors *wcol, cons
|
|||||||
.xmin = rect->xmin,
|
.xmin = rect->xmin,
|
||||||
.ymin = rect->ymin,
|
.ymin = rect->ymin,
|
||||||
.xmax = rect->xmax,
|
.xmax = rect->xmax,
|
||||||
.ymax = rect->ymax
|
.ymax = rect->ymax,
|
||||||
};
|
};
|
||||||
rcti scissor_region = {0, ar->winx, 0, ar->winy};
|
rcti scissor_region = {0, ar->winx, 0, ar->winy};
|
||||||
BLI_rcti_isect(&scissor_new, &scissor_region, &scissor_new);
|
BLI_rcti_isect(&scissor_new, &scissor_region, &scissor_new);
|
||||||
@@ -1664,7 +1664,7 @@ void ui_draw_but_CURVE(ARegion *ar, uiBut *but, const uiWidgetColors *wcol, cons
|
|||||||
.xmin = rect->xmin + zoomx * (-offsx),
|
.xmin = rect->xmin + zoomx * (-offsx),
|
||||||
.xmax = grid.xmin + zoomx,
|
.xmax = grid.xmin + zoomx,
|
||||||
.ymin = rect->ymin + zoomy * (-offsy),
|
.ymin = rect->ymin + zoomy * (-offsy),
|
||||||
.ymax = grid.ymin + zoomy
|
.ymax = grid.ymin + zoomy,
|
||||||
};
|
};
|
||||||
|
|
||||||
ui_draw_gradient(&grid, col, UI_GRAD_H, 1.0f);
|
ui_draw_gradient(&grid, col, UI_GRAD_H, 1.0f);
|
||||||
@@ -1876,7 +1876,7 @@ void ui_draw_but_TRACKPREVIEW(ARegion *UNUSED(ar), uiBut *but, const uiWidgetCol
|
|||||||
.xmin = (float)recti->xmin + 1,
|
.xmin = (float)recti->xmin + 1,
|
||||||
.xmax = (float)recti->xmax - 1,
|
.xmax = (float)recti->xmax - 1,
|
||||||
.ymin = (float)recti->ymin + 1,
|
.ymin = (float)recti->ymin + 1,
|
||||||
.ymax = (float)recti->ymax - 1
|
.ymax = (float)recti->ymax - 1,
|
||||||
};
|
};
|
||||||
|
|
||||||
int width = BLI_rctf_size_x(&rect) + 1;
|
int width = BLI_rctf_size_x(&rect) + 1;
|
||||||
@@ -2028,7 +2028,7 @@ void ui_draw_but_NODESOCKET(ARegion *ar, uiBut *but, const uiWidgetColors *UNUSE
|
|||||||
.xmin = recti->xmin,
|
.xmin = recti->xmin,
|
||||||
.ymin = recti->ymin,
|
.ymin = recti->ymin,
|
||||||
.xmax = recti->xmax,
|
.xmax = recti->xmax,
|
||||||
.ymax = recti->ymax
|
.ymax = recti->ymax,
|
||||||
};
|
};
|
||||||
|
|
||||||
rcti scissor_region = {0, ar->winx, 0, ar->winy};
|
rcti scissor_region = {0, ar->winx, 0, ar->winy};
|
||||||
|
@@ -4433,7 +4433,7 @@ eAutoPropButsReturn uiTemplateOperatorPropertyButs(
|
|||||||
else {
|
else {
|
||||||
wmWindowManager *wm = CTX_wm_manager(C);
|
wmWindowManager *wm = CTX_wm_manager(C);
|
||||||
PointerRNA ptr;
|
PointerRNA ptr;
|
||||||
struct uiTemplateOperatorPropertyPollParam user_data = {.C = C, .op = op, .flag = flag};
|
struct uiTemplateOperatorPropertyPollParam user_data = { .C = C, .op = op, .flag = flag, };
|
||||||
|
|
||||||
RNA_pointer_create(&wm->id, op->type->srna, op->properties, &ptr);
|
RNA_pointer_create(&wm->id, op->type->srna, op->properties, &ptr);
|
||||||
|
|
||||||
|
@@ -564,7 +564,7 @@ static void screen_preview_draw_areas(const bScreen *screen, const float scale[2
|
|||||||
.xmin = sa->totrct.xmin * scale[0] + ofs_h,
|
.xmin = sa->totrct.xmin * scale[0] + ofs_h,
|
||||||
.xmax = sa->totrct.xmax * scale[0] - ofs_h,
|
.xmax = sa->totrct.xmax * scale[0] - ofs_h,
|
||||||
.ymin = sa->totrct.ymin * scale[1] + ofs_h,
|
.ymin = sa->totrct.ymin * scale[1] + ofs_h,
|
||||||
.ymax = sa->totrct.ymax * scale[1] - ofs_h
|
.ymax = sa->totrct.ymax * scale[1] - ofs_h,
|
||||||
};
|
};
|
||||||
|
|
||||||
immBegin(GPU_PRIM_TRI_FAN, 4);
|
immBegin(GPU_PRIM_TRI_FAN, 4);
|
||||||
|
@@ -603,7 +603,7 @@ static void nla_draw_strip_text(
|
|||||||
.xmin = xminc,
|
.xmin = xminc,
|
||||||
.ymin = yminc,
|
.ymin = yminc,
|
||||||
.xmax = xmaxc,
|
.xmax = xmaxc,
|
||||||
.ymax = ymaxc
|
.ymax = ymaxc,
|
||||||
};
|
};
|
||||||
|
|
||||||
/* add this string to the cache of texts to draw */
|
/* add this string to the cache of texts to draw */
|
||||||
|
@@ -267,7 +267,7 @@ static int collection_delete_exec(bContext *C, wmOperator *op)
|
|||||||
Main *bmain = CTX_data_main(C);
|
Main *bmain = CTX_data_main(C);
|
||||||
Scene *scene = CTX_data_scene(C);
|
Scene *scene = CTX_data_scene(C);
|
||||||
SpaceOops *soops = CTX_wm_space_outliner(C);
|
SpaceOops *soops = CTX_wm_space_outliner(C);
|
||||||
struct CollectionEditData data = {.scene = scene, .soops = soops};
|
struct CollectionEditData data = {.scene = scene, .soops = soops,};
|
||||||
bool hierarchy = RNA_boolean_get(op->ptr, "hierarchy");
|
bool hierarchy = RNA_boolean_get(op->ptr, "hierarchy");
|
||||||
|
|
||||||
data.collections_to_edit = BLI_gset_ptr_new(__func__);
|
data.collections_to_edit = BLI_gset_ptr_new(__func__);
|
||||||
@@ -488,7 +488,7 @@ static int collection_link_exec(bContext *C, wmOperator *UNUSED(op))
|
|||||||
Scene *scene = CTX_data_scene(C);
|
Scene *scene = CTX_data_scene(C);
|
||||||
Collection *active_collection = CTX_data_layer_collection(C)->collection;
|
Collection *active_collection = CTX_data_layer_collection(C)->collection;
|
||||||
SpaceOops *soops = CTX_wm_space_outliner(C);
|
SpaceOops *soops = CTX_wm_space_outliner(C);
|
||||||
struct CollectionEditData data = {.scene = scene, .soops = soops};
|
struct CollectionEditData data = {.scene = scene, .soops = soops,};
|
||||||
|
|
||||||
data.collections_to_edit = BLI_gset_ptr_new(__func__);
|
data.collections_to_edit = BLI_gset_ptr_new(__func__);
|
||||||
|
|
||||||
@@ -536,7 +536,7 @@ static int collection_instance_exec(bContext *C, wmOperator *UNUSED(op))
|
|||||||
Scene *scene = CTX_data_scene(C);
|
Scene *scene = CTX_data_scene(C);
|
||||||
ViewLayer *view_layer = CTX_data_view_layer(C);
|
ViewLayer *view_layer = CTX_data_view_layer(C);
|
||||||
SpaceOops *soops = CTX_wm_space_outliner(C);
|
SpaceOops *soops = CTX_wm_space_outliner(C);
|
||||||
struct CollectionEditData data = {.scene = scene, .soops = soops};
|
struct CollectionEditData data = {.scene = scene, .soops = soops,};
|
||||||
|
|
||||||
data.collections_to_edit = BLI_gset_ptr_new(__func__);
|
data.collections_to_edit = BLI_gset_ptr_new(__func__);
|
||||||
|
|
||||||
@@ -623,7 +623,7 @@ static bool collections_view_layer_poll(bContext *C, bool clear, int flag)
|
|||||||
}
|
}
|
||||||
|
|
||||||
Scene *scene = CTX_data_scene(C);
|
Scene *scene = CTX_data_scene(C);
|
||||||
struct CollectionEditData data = {.scene = scene, .soops = soops};
|
struct CollectionEditData data = {.scene = scene, .soops = soops,};
|
||||||
data.collections_to_edit = BLI_gset_ptr_new(__func__);
|
data.collections_to_edit = BLI_gset_ptr_new(__func__);
|
||||||
bool result = false;
|
bool result = false;
|
||||||
|
|
||||||
@@ -695,7 +695,7 @@ static int collection_view_layer_exec(bContext *C, wmOperator *op)
|
|||||||
Scene *scene = CTX_data_scene(C);
|
Scene *scene = CTX_data_scene(C);
|
||||||
ViewLayer *view_layer = CTX_data_view_layer(C);
|
ViewLayer *view_layer = CTX_data_view_layer(C);
|
||||||
SpaceOops *soops = CTX_wm_space_outliner(C);
|
SpaceOops *soops = CTX_wm_space_outliner(C);
|
||||||
struct CollectionEditData data = {.scene = scene, .soops = soops};
|
struct CollectionEditData data = {.scene = scene, .soops = soops,};
|
||||||
bool clear = strstr(op->idname, "clear") != NULL;
|
bool clear = strstr(op->idname, "clear") != NULL;
|
||||||
int flag = strstr(op->idname, "holdout") ? LAYER_COLLECTION_HOLDOUT :
|
int flag = strstr(op->idname, "holdout") ? LAYER_COLLECTION_HOLDOUT :
|
||||||
strstr(op->idname, "indirect_only") ? LAYER_COLLECTION_INDIRECT_ONLY :
|
strstr(op->idname, "indirect_only") ? LAYER_COLLECTION_INDIRECT_ONLY :
|
||||||
|
@@ -503,7 +503,7 @@ static ImBuf *make_histogram_view_from_ibuf_byte(ImBuf *ibuf)
|
|||||||
|
|
||||||
memset(bins, 0, sizeof(bins));
|
memset(bins, 0, sizeof(bins));
|
||||||
|
|
||||||
MakeHistogramViewData data = {.ibuf = ibuf, .bins = bins};
|
MakeHistogramViewData data = { .ibuf = ibuf, .bins = bins, };
|
||||||
ParallelRangeSettings settings;
|
ParallelRangeSettings settings;
|
||||||
BLI_parallel_range_settings_defaults(&settings);
|
BLI_parallel_range_settings_defaults(&settings);
|
||||||
settings.use_threading = (ibuf->y >= 256);
|
settings.use_threading = (ibuf->y >= 256);
|
||||||
@@ -588,7 +588,7 @@ static ImBuf *make_histogram_view_from_ibuf_float(ImBuf *ibuf)
|
|||||||
|
|
||||||
memset(bins, 0, sizeof(bins));
|
memset(bins, 0, sizeof(bins));
|
||||||
|
|
||||||
MakeHistogramViewData data = {.ibuf = ibuf, .bins = bins};
|
MakeHistogramViewData data = { .ibuf = ibuf, .bins = bins, };
|
||||||
ParallelRangeSettings settings;
|
ParallelRangeSettings settings;
|
||||||
BLI_parallel_range_settings_defaults(&settings);
|
BLI_parallel_range_settings_defaults(&settings);
|
||||||
settings.use_threading = (ibuf->y >= 256);
|
settings.use_threading = (ibuf->y >= 256);
|
||||||
|
@@ -767,7 +767,7 @@ void view3d_update_depths_rect(ARegion *ar, ViewDepths *d, rcti *rect)
|
|||||||
.xmin = 0,
|
.xmin = 0,
|
||||||
.xmax = ar->winx - 1,
|
.xmax = ar->winx - 1,
|
||||||
.ymin = 0,
|
.ymin = 0,
|
||||||
.ymax = ar->winy - 1
|
.ymax = ar->winy - 1,
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Constrain rect to depth bounds */
|
/* Constrain rect to depth bounds */
|
||||||
|
@@ -454,7 +454,7 @@ static bool raycastMesh(
|
|||||||
retval = data.retval;
|
retval = data.retval;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
BVHTreeRayHit hit = {.index = -1, .dist = local_depth};
|
BVHTreeRayHit hit = { .index = -1, .dist = local_depth, };
|
||||||
|
|
||||||
if (BLI_bvhtree_ray_cast(
|
if (BLI_bvhtree_ray_cast(
|
||||||
treedata->tree, ray_start_local, ray_normal_local, 0.0f,
|
treedata->tree, ray_start_local, ray_normal_local, 0.0f,
|
||||||
@@ -622,7 +622,7 @@ static bool raycastEditMesh(
|
|||||||
retval = data.retval;
|
retval = data.retval;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
BVHTreeRayHit hit = {.index = -1, .dist = local_depth};
|
BVHTreeRayHit hit = { .index = -1, .dist = local_depth, };
|
||||||
|
|
||||||
if (BLI_bvhtree_ray_cast(
|
if (BLI_bvhtree_ray_cast(
|
||||||
treedata->tree, ray_start_local, ray_normal_local, 0.0f,
|
treedata->tree, ray_start_local, ray_normal_local, 0.0f,
|
||||||
|
@@ -1550,7 +1550,7 @@ typedef struct {
|
|||||||
} GPUAttribStack;
|
} GPUAttribStack;
|
||||||
|
|
||||||
static GPUAttribStack state = {
|
static GPUAttribStack state = {
|
||||||
.top = 0
|
.top = 0,
|
||||||
};
|
};
|
||||||
|
|
||||||
#define AttribStack state
|
#define AttribStack state
|
||||||
|
@@ -75,7 +75,7 @@ typedef struct {
|
|||||||
static MatrixState state = {
|
static MatrixState state = {
|
||||||
.model_view_stack = {{MATRIX_4X4_IDENTITY}, 0},
|
.model_view_stack = {{MATRIX_4X4_IDENTITY}, 0},
|
||||||
.projection_stack = {{MATRIX_4X4_IDENTITY}, 0},
|
.projection_stack = {{MATRIX_4X4_IDENTITY}, 0},
|
||||||
.dirty = true
|
.dirty = true,
|
||||||
};
|
};
|
||||||
|
|
||||||
#undef MATRIX_4X4_IDENTITY
|
#undef MATRIX_4X4_IDENTITY
|
||||||
|
@@ -474,12 +474,12 @@ static int convert_i16(short x)
|
|||||||
|
|
||||||
GPUPackedNormal GPU_normal_convert_i10_v3(const float data[3])
|
GPUPackedNormal GPU_normal_convert_i10_v3(const float data[3])
|
||||||
{
|
{
|
||||||
GPUPackedNormal n = { .x = quantize(data[0]), .y = quantize(data[1]), .z = quantize(data[2]) };
|
GPUPackedNormal n = { .x = quantize(data[0]), .y = quantize(data[1]), .z = quantize(data[2]), };
|
||||||
return n;
|
return n;
|
||||||
}
|
}
|
||||||
|
|
||||||
GPUPackedNormal GPU_normal_convert_i10_s3(const short data[3])
|
GPUPackedNormal GPU_normal_convert_i10_s3(const short data[3])
|
||||||
{
|
{
|
||||||
GPUPackedNormal n = { .x = convert_i16(data[0]), .y = convert_i16(data[1]), .z = convert_i16(data[2]) };
|
GPUPackedNormal n = { .x = convert_i16(data[0]), .y = convert_i16(data[1]), .z = convert_i16(data[2]), };
|
||||||
return n;
|
return n;
|
||||||
}
|
}
|
||||||
|
@@ -2840,7 +2840,7 @@ int RNA_property_int_get_default(PointerRNA *UNUSED(ptr), PropertyRNA *prop)
|
|||||||
bool RNA_property_int_set_default(PointerRNA *ptr, PropertyRNA *prop, int value)
|
bool RNA_property_int_set_default(PointerRNA *ptr, PropertyRNA *prop, int value)
|
||||||
{
|
{
|
||||||
if (value != 0) {
|
if (value != 0) {
|
||||||
IDPropertyTemplate val = { .i = value };
|
IDPropertyTemplate val = { .i = value, };
|
||||||
return rna_idproperty_ui_set_default(ptr, prop, IDP_INT, &val);
|
return rna_idproperty_ui_set_default(ptr, prop, IDP_INT, &val);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@@ -3160,7 +3160,7 @@ float RNA_property_float_get_default(PointerRNA *UNUSED(ptr), PropertyRNA *prop)
|
|||||||
bool RNA_property_float_set_default(PointerRNA *ptr, PropertyRNA *prop, float value)
|
bool RNA_property_float_set_default(PointerRNA *ptr, PropertyRNA *prop, float value)
|
||||||
{
|
{
|
||||||
if (value != 0) {
|
if (value != 0) {
|
||||||
IDPropertyTemplate val = { .d = value };
|
IDPropertyTemplate val = { .d = value, };
|
||||||
return rna_idproperty_ui_set_default(ptr, prop, IDP_DOUBLE, &val);
|
return rna_idproperty_ui_set_default(ptr, prop, IDP_DOUBLE, &val);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@@ -7464,7 +7464,7 @@ bool RNA_property_copy(Main *bmain, PointerRNA *ptr, PointerRNA *fromptr, Proper
|
|||||||
IDOverrideStaticPropertyOperation opop = {
|
IDOverrideStaticPropertyOperation opop = {
|
||||||
.operation = IDOVERRIDESTATIC_OP_REPLACE,
|
.operation = IDOVERRIDESTATIC_OP_REPLACE,
|
||||||
.subitem_reference_index = index,
|
.subitem_reference_index = index,
|
||||||
.subitem_local_index = index
|
.subitem_local_index = index,
|
||||||
};
|
};
|
||||||
return rna_property_override_operation_apply(
|
return rna_property_override_operation_apply(
|
||||||
bmain,
|
bmain,
|
||||||
@@ -7937,7 +7937,7 @@ bool RNA_struct_override_matches(
|
|||||||
IDOverrideStaticPropertyOperation opop_tmp = {
|
IDOverrideStaticPropertyOperation opop_tmp = {
|
||||||
.operation = IDOVERRIDESTATIC_OP_REPLACE,
|
.operation = IDOVERRIDESTATIC_OP_REPLACE,
|
||||||
.subitem_reference_index = -1,
|
.subitem_reference_index = -1,
|
||||||
.subitem_local_index = -1
|
.subitem_local_index = -1,
|
||||||
};
|
};
|
||||||
rna_property_override_operation_apply(
|
rna_property_override_operation_apply(
|
||||||
bmain,
|
bmain,
|
||||||
|
@@ -123,19 +123,19 @@ static bToolRef *rna_WorkSpace_tools_from_tkey(WorkSpace *workspace, const bTool
|
|||||||
static bToolRef *rna_WorkSpace_tools_from_space_view3d_mode(
|
static bToolRef *rna_WorkSpace_tools_from_space_view3d_mode(
|
||||||
WorkSpace *workspace, int mode, bool create)
|
WorkSpace *workspace, int mode, bool create)
|
||||||
{
|
{
|
||||||
return rna_WorkSpace_tools_from_tkey(workspace, &(bToolKey){ .space_type = SPACE_VIEW3D, .mode = mode}, create);
|
return rna_WorkSpace_tools_from_tkey(workspace, &(bToolKey){ .space_type = SPACE_VIEW3D, .mode = mode, }, create);
|
||||||
}
|
}
|
||||||
|
|
||||||
static bToolRef *rna_WorkSpace_tools_from_space_image_mode(
|
static bToolRef *rna_WorkSpace_tools_from_space_image_mode(
|
||||||
WorkSpace *workspace, int mode, bool create)
|
WorkSpace *workspace, int mode, bool create)
|
||||||
{
|
{
|
||||||
return rna_WorkSpace_tools_from_tkey(workspace, &(bToolKey){ .space_type = SPACE_IMAGE, .mode = mode}, create);
|
return rna_WorkSpace_tools_from_tkey(workspace, &(bToolKey){ .space_type = SPACE_IMAGE, .mode = mode, }, create);
|
||||||
}
|
}
|
||||||
|
|
||||||
static bToolRef *rna_WorkSpace_tools_from_space_node(
|
static bToolRef *rna_WorkSpace_tools_from_space_node(
|
||||||
WorkSpace *workspace, bool create)
|
WorkSpace *workspace, bool create)
|
||||||
{
|
{
|
||||||
return rna_WorkSpace_tools_from_tkey(workspace, &(bToolKey){ .space_type = SPACE_NODE, .mode = 0}, create);
|
return rna_WorkSpace_tools_from_tkey(workspace, &(bToolKey){ .space_type = SPACE_NODE, .mode = 0, }, create);
|
||||||
}
|
}
|
||||||
|
|
||||||
const EnumPropertyItem *rna_WorkSpace_tools_mode_itemf(
|
const EnumPropertyItem *rna_WorkSpace_tools_mode_itemf(
|
||||||
|
@@ -269,7 +269,7 @@ BLI_INLINE void sortPolyVertsTri(unsigned int *indices, const MLoop * const mloo
|
|||||||
|
|
||||||
BLI_INLINE unsigned int nearestVert(SDefBindCalcData * const data, const float point_co[3])
|
BLI_INLINE unsigned int nearestVert(SDefBindCalcData * const data, const float point_co[3])
|
||||||
{
|
{
|
||||||
BVHTreeNearest nearest = {.dist_sq = FLT_MAX, .index = -1};
|
BVHTreeNearest nearest = { .dist_sq = FLT_MAX, .index = -1, };
|
||||||
const MPoly *poly;
|
const MPoly *poly;
|
||||||
const MEdge *edge;
|
const MEdge *edge;
|
||||||
const MLoop *loop;
|
const MLoop *loop;
|
||||||
@@ -976,18 +976,20 @@ static bool surfacedeformBind(
|
|||||||
smd->numverts = numverts;
|
smd->numverts = numverts;
|
||||||
smd->numpoly = tnumpoly;
|
smd->numpoly = tnumpoly;
|
||||||
|
|
||||||
SDefBindCalcData data = {.treeData = &treeData,
|
SDefBindCalcData data = {
|
||||||
.vert_edges = vert_edges,
|
.treeData = &treeData,
|
||||||
.edge_polys = edge_polys,
|
.vert_edges = vert_edges,
|
||||||
.mpoly = mpoly,
|
.edge_polys = edge_polys,
|
||||||
.medge = medge,
|
.mpoly = mpoly,
|
||||||
.mloop = mloop,
|
.medge = medge,
|
||||||
.looptri = BKE_mesh_runtime_looptri_ensure(target),
|
.mloop = mloop,
|
||||||
.targetCos = MEM_malloc_arrayN(tnumverts, sizeof(float[3]), "SDefTargetBindVertArray"),
|
.looptri = BKE_mesh_runtime_looptri_ensure(target),
|
||||||
.bind_verts = smd->verts,
|
.targetCos = MEM_malloc_arrayN(tnumverts, sizeof(float[3]), "SDefTargetBindVertArray"),
|
||||||
.vertexCos = vertexCos,
|
.bind_verts = smd->verts,
|
||||||
.falloff = smd->falloff,
|
.vertexCos = vertexCos,
|
||||||
.success = MOD_SDEF_BIND_RESULT_SUCCESS};
|
.falloff = smd->falloff,
|
||||||
|
.success = MOD_SDEF_BIND_RESULT_SUCCESS,
|
||||||
|
};
|
||||||
|
|
||||||
if (data.targetCos == NULL) {
|
if (data.targetCos == NULL) {
|
||||||
modifier_setError((ModifierData *)smd, "Out of memory");
|
modifier_setError((ModifierData *)smd, "Out of memory");
|
||||||
|
@@ -202,9 +202,11 @@ static Mesh *applyModifier(
|
|||||||
mloopuv = CustomData_duplicate_referenced_layer_named(&mesh->ldata, CD_MLOOPUV, uvname, numLoops);
|
mloopuv = CustomData_duplicate_referenced_layer_named(&mesh->ldata, CD_MLOOPUV, uvname, numLoops);
|
||||||
MOD_get_vgroup(ctx->object, mesh, umd->vgroup_name, &dvert, &defgrp_index);
|
MOD_get_vgroup(ctx->object, mesh, umd->vgroup_name, &dvert, &defgrp_index);
|
||||||
|
|
||||||
UVWarpData data = {.mpoly = mpoly, .mloop = mloop, .mloopuv = mloopuv,
|
UVWarpData data = {
|
||||||
.dvert = dvert, .defgrp_index = defgrp_index,
|
.mpoly = mpoly, .mloop = mloop, .mloopuv = mloopuv,
|
||||||
.warp_mat = warp_mat, .axis_u = axis_u, .axis_v = axis_v};
|
.dvert = dvert, .defgrp_index = defgrp_index,
|
||||||
|
.warp_mat = warp_mat, .axis_u = axis_u, .axis_v = axis_v,
|
||||||
|
};
|
||||||
ParallelRangeSettings settings;
|
ParallelRangeSettings settings;
|
||||||
BLI_parallel_range_settings_defaults(&settings);
|
BLI_parallel_range_settings_defaults(&settings);
|
||||||
settings.use_threading = (numPolys > 1000);
|
settings.use_threading = (numPolys > 1000);
|
||||||
|
@@ -715,7 +715,7 @@ void ntreeGPUMaterialNodes(bNodeTree *localtree, GPUMaterial *mat, bool *has_sur
|
|||||||
/* TODO(fclem): consider moving this to the gpu shader tree evaluation. */
|
/* TODO(fclem): consider moving this to the gpu shader tree evaluation. */
|
||||||
nTreeTags tags = {
|
nTreeTags tags = {
|
||||||
.ssr_id = 1.0,
|
.ssr_id = 1.0,
|
||||||
.sss_id = 1.0
|
.sss_id = 1.0,
|
||||||
};
|
};
|
||||||
ntree_shader_tag_nodes(localtree, output, &tags);
|
ntree_shader_tag_nodes(localtree, output, &tags);
|
||||||
|
|
||||||
|
@@ -127,7 +127,7 @@ struct ApplicationState app_state = {
|
|||||||
},
|
},
|
||||||
.exit_code_on_error = {
|
.exit_code_on_error = {
|
||||||
.python = 0,
|
.python = 0,
|
||||||
}
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
/* -------------------------------------------------------------------- */
|
/* -------------------------------------------------------------------- */
|
||||||
|
Reference in New Issue
Block a user