forked from bartvdbraak/blender
Cleanup: spelling in comments
Also minor changes in comments: - Reference BLENDER_HISTORY_FILE instead of the literal file-name (simplifies looking up usage). - Use usernames in tags, as noted in code-style.
This commit is contained in:
parent
ea8fd343eb
commit
27b4916b1a
@ -195,9 +195,9 @@ using sycl::half;
|
||||
#define fmodf(x, y) sycl::fmod((x), (y))
|
||||
#define lgammaf(x) sycl::lgamma((x))
|
||||
|
||||
/* sycl::native::cos precision is not sufficient and -ffast-math lets
|
||||
* the current DPC++ compiler overload sycl::cos with it.
|
||||
* We work around this issue by directly calling the spirv implementation which
|
||||
/* `sycl::native::cos` precision is not sufficient and `-ffast-math` lets
|
||||
* the current DPC++ compiler overload `sycl::cos` with it.
|
||||
* We work around this issue by directly calling the SPIRV implementation which
|
||||
* provides greater precision. */
|
||||
#if defined(__SYCL_DEVICE_ONLY__) && defined(__SPIR__)
|
||||
# define cosf(x) __spirv_ocl_cos(((float)(x)))
|
||||
|
@ -27,11 +27,11 @@ class GHOST_ContextCGL : public GHOST_Context {
|
||||
public:
|
||||
/* Defines the number of simultaneous command buffers which can be in flight.
|
||||
* The default limit of `64` is considered to be optimal for Blender. Too many command buffers
|
||||
* will result in workload fragmnetation and additional system-level overhead. This limit should
|
||||
* will result in workload fragmentation and additional system-level overhead. This limit should
|
||||
* also only be increased if the application is consistently exceeding the limit, and there are
|
||||
* no command buffer leaks.
|
||||
*
|
||||
* If this limit is reached, starting a new command buffer will fail. The Metal backend will
|
||||
* If this limit is reached, starting a new command buffer will fail. The Metal back-end will
|
||||
* therefore stall until completion and log a warning when this limit is reached in order to
|
||||
* ensure correct function of the app.
|
||||
*
|
||||
|
@ -692,7 +692,7 @@ int calculate_evaluated_num(int points_num, bool cyclic, int resolution);
|
||||
void interpolate_to_evaluated(GSpan src, bool cyclic, int resolution, GMutableSpan dst);
|
||||
|
||||
/**
|
||||
* Evaluate the Catmull Rom curve. The placement of each segment in the #dst span is desribed by
|
||||
* Evaluate the Catmull Rom curve. The placement of each segment in the #dst span is described by
|
||||
* #evaluated_offsets.
|
||||
*/
|
||||
void interpolate_to_evaluated(const GSpan src,
|
||||
|
@ -100,6 +100,7 @@ typedef struct MeshElemMap {
|
||||
} MeshElemMap;
|
||||
|
||||
/* mapping */
|
||||
|
||||
UvVertMap *BKE_mesh_uv_vert_map_create(const struct MPoly *mpoly,
|
||||
const bool *hide_poly,
|
||||
const bool *select_poly,
|
||||
|
@ -382,7 +382,7 @@ static void setup_app_data(bContext *C,
|
||||
STRNCPY(bmain->filepath, bfd->filepath);
|
||||
}
|
||||
|
||||
/* baseflags, groups, make depsgraph, etc */
|
||||
/* Base-flags, groups, make depsgraph, etc. */
|
||||
/* first handle case if other windows have different scenes visible */
|
||||
if (mode == LOAD_UI) {
|
||||
wmWindowManager *wm = static_cast<wmWindowManager *>(bmain->wm.first);
|
||||
|
@ -151,7 +151,8 @@ static void brush_make_local(Main *bmain, ID *id, const int flags)
|
||||
BKE_lib_id_make_local_generic_action_define(bmain, id, flags, &force_local, &force_copy);
|
||||
|
||||
if (brush->clone.image) {
|
||||
/* Special case: ima always local immediately. Clone image should only have one user anyway. */
|
||||
/* Special case: `ima` always local immediately.
|
||||
* Clone image should only have one user anyway. */
|
||||
/* FIXME: Recursive calls affecting other non-embedded IDs are really bad and should be avoided
|
||||
* in IDType callbacks. Higher-level ID management code usually does not expect such things and
|
||||
* does not deal properly with it. */
|
||||
|
@ -4528,7 +4528,7 @@ static void damptrack_do_transform(float matrix[4][4], const float tarvec_in[3],
|
||||
}
|
||||
}
|
||||
else if (norm < 0.1f) {
|
||||
/* near 0 and Pi arcsin has way better precision than arccos */
|
||||
/* Near 0 and Pi `arcsin` has way better precision than `arccos`. */
|
||||
rangle = (rangle > M_PI_2) ? M_PI - asinf(norm) : asinf(norm);
|
||||
}
|
||||
|
||||
|
@ -721,7 +721,7 @@ static void bb_combineMaps(FluidObjectBB *output,
|
||||
{
|
||||
int i, x, y, z;
|
||||
|
||||
/* Copyfill input 1 struct and clear output for new allocation. */
|
||||
/* Copy-fill input 1 struct and clear output for new allocation. */
|
||||
FluidObjectBB bb1;
|
||||
memcpy(&bb1, output, sizeof(FluidObjectBB));
|
||||
memset(output, 0, sizeof(FluidObjectBB));
|
||||
@ -3539,7 +3539,7 @@ static int manta_step(
|
||||
|
||||
BLI_mutex_lock(&object_update_lock);
|
||||
|
||||
/* Loop as long as time_per_frame (sum of sub dt's) does not exceed actual framelength. */
|
||||
/* Loop as long as time_per_frame (sum of sub dt's) does not exceed actual frame-length. */
|
||||
while (time_per_frame + FLT_EPSILON < frame_length) {
|
||||
manta_adapt_timestep(fds->fluid);
|
||||
dt = manta_get_timestep(fds->fluid);
|
||||
@ -3582,7 +3582,7 @@ static int manta_step(
|
||||
fds->time_total = time_total;
|
||||
}
|
||||
|
||||
/* Total time must not exceed framecount times framelength. Correct tiny errors here. */
|
||||
/* Total time must not exceed frame-count times frame-length. Correct tiny errors here. */
|
||||
CLAMP_MAX(fds->time_total, time_total_old + fds->frame_length);
|
||||
|
||||
/* Compute shadow grid for gas simulations. Make sure to skip if bake job was canceled early. */
|
||||
@ -4652,7 +4652,7 @@ void BKE_fluid_fields_sanitize(FluidDomainSettings *settings)
|
||||
settings->coba_field = FLUID_DOMAIN_FIELD_DENSITY;
|
||||
}
|
||||
|
||||
/* Gas domains do not support vdb mini precision. */
|
||||
/* Gas domains do not support VDB mini precision. */
|
||||
if (data_depth == VDB_PRECISION_MINI_FLOAT) {
|
||||
settings->openvdb_data_depth = VDB_PRECISION_HALF_FLOAT;
|
||||
}
|
||||
|
@ -1163,17 +1163,17 @@ static int mesh_tessface_calc(Mesh &mesh,
|
||||
CustomData_add_layer(fdata, CD_ORIGINDEX, CD_ASSIGN, mface_to_poly_map, totface);
|
||||
add_mface_layers(mesh, fdata, ldata, totface);
|
||||
|
||||
/* NOTE: quad detection issue - fourth vertidx vs fourth loopidx:
|
||||
/* NOTE: quad detection issue - fourth vertex-index vs fourth loop-index:
|
||||
* Polygons take care of their loops ordering, hence not of their vertices ordering.
|
||||
* Currently, our tfaces' fourth vertex index might be 0 even for a quad.
|
||||
* However, we know our fourth loop index is never 0 for quads
|
||||
* (because they are sorted for polygons, and our quads are still mere copies of their polygons).
|
||||
* So we pass nullptr as MFace pointer, and #mesh_loops_to_tessdata
|
||||
* So we pass nullptr as #MFace pointer, and #mesh_loops_to_tessdata
|
||||
* will use the fourth loop index as quad test. */
|
||||
mesh_loops_to_tessdata(fdata, ldata, nullptr, mface_to_poly_map, lindices, totface);
|
||||
|
||||
/* NOTE: quad detection issue - fourth vertidx vs fourth loopidx:
|
||||
* ...However, most TFace code uses 'MFace->v4 == 0' test to check whether it is a tri or quad.
|
||||
/* NOTE: quad detection issue - fourth vert-index vs fourth loop-index:
|
||||
* ...However, most #TFace code uses `MFace->v4 == 0` test to check whether it is a tri or quad.
|
||||
* BKE_mesh_mface_index_validate() will check this and rotate the tessellated face if needed.
|
||||
*/
|
||||
#ifdef USE_TESSFACE_QUADS
|
||||
|
@ -29,7 +29,6 @@
|
||||
/** \name Mesh Connectivity Mapping
|
||||
* \{ */
|
||||
|
||||
/* ngon version wip, based on BM_uv_vert_map_create */
|
||||
UvVertMap *BKE_mesh_uv_vert_map_create(const MPoly *mpoly,
|
||||
const bool *hide_poly,
|
||||
const bool *select_poly,
|
||||
@ -41,6 +40,8 @@ UvVertMap *BKE_mesh_uv_vert_map_create(const MPoly *mpoly,
|
||||
const bool selected,
|
||||
const bool use_winding)
|
||||
{
|
||||
/* NOTE: N-gon version WIP, based on #BM_uv_vert_map_create. */
|
||||
|
||||
UvVertMap *vmap;
|
||||
UvMapVert *buf;
|
||||
const MPoly *mp;
|
||||
|
@ -104,7 +104,7 @@ struct LinearGrids {
|
||||
LinearGridElement *elements_storage;
|
||||
};
|
||||
|
||||
/* Context which holds all information eeded during propagation and smoothing. */
|
||||
/* Context which holds all information needed during propagation and smoothing. */
|
||||
|
||||
struct MultiresReshapeSmoothContext {
|
||||
const MultiresReshapeContext *reshape_context;
|
||||
|
@ -97,7 +97,7 @@ struct PBVHNode {
|
||||
* marking various updates that need to be applied. */
|
||||
PBVHNodeFlags flag : 32;
|
||||
|
||||
/* Used for raycasting: how close bb is to the ray point. */
|
||||
/* Used for ray-casting: how close the bounding-box is to the ray point. */
|
||||
float tmin;
|
||||
|
||||
/* Scalar displacements for sculpt mode's layer brush. */
|
||||
|
@ -2800,9 +2800,9 @@ static void reference_to_scratch(Object *ob)
|
||||
// printf("reference_to_scratch\n");
|
||||
}
|
||||
|
||||
/*
|
||||
/**
|
||||
* helper function to get proper spring length
|
||||
* when object is rescaled
|
||||
* when object is re-scaled
|
||||
*/
|
||||
static float globallen(float *v1, float *v2, Object *ob)
|
||||
{
|
||||
|
@ -315,7 +315,7 @@ static int ss_sync_from_uv(CCGSubSurf *ss,
|
||||
int nverts = mp->totloop;
|
||||
int j, j_next;
|
||||
CCGFace *origf = ccgSubSurf_getFace(origss, POINTER_FROM_INT(i));
|
||||
/* uint *fv = &mp->v1; */
|
||||
// uint *fv = &mp->v1;
|
||||
MLoop *ml = mloop + mp->loopstart;
|
||||
|
||||
fverts.reinitialize(nverts);
|
||||
|
@ -13,23 +13,23 @@
|
||||
* A word on slot names:
|
||||
*
|
||||
* For geometry input slots, the following are valid names:
|
||||
* - verts
|
||||
* - edges
|
||||
* - faces
|
||||
* - edgefacein
|
||||
* - vertfacein
|
||||
* - vertedgein
|
||||
* - vertfacein
|
||||
* - geom
|
||||
* - `verts`
|
||||
* - `edges`
|
||||
* - `faces`
|
||||
* - `edge_face.in`
|
||||
* - `vert_face.in`
|
||||
* - `vert_edge.in`
|
||||
* - `vert_face.in`
|
||||
* - `geom`
|
||||
*
|
||||
* The basic rules are, for single-type geometry slots, use the plural of the
|
||||
* type name (e.g. edges). for double-type slots, use the two type names plus
|
||||
* "in" (e.g. edgefacein). for three-type slots, use geom.
|
||||
* "in" (e.g. `edge_face.in`). for three-type slots, use geom.
|
||||
*
|
||||
* for output slots, for single-type geometry slots, use the type name plus "out",
|
||||
* (e.g. verts.out), for double-type slots, use the two type names plus "out",
|
||||
* (e.g. vertfaces.out), for three-type slots, use geom. note that you can also
|
||||
* use more esoteric names (e.g. geom_skirt.out) so long as the comment next to the
|
||||
* (e.g. `verts.out`), for double-type slots, use the two type names plus "out",
|
||||
* (e.g. `vert_faces.out`), for three-type slots, use geom. note that you can also
|
||||
* use more esoteric names (e.g. `geom_skirt.out`) so long as the comment next to the
|
||||
* slot definition tells you what types of elements are in it.
|
||||
*/
|
||||
|
||||
|
@ -1385,7 +1385,7 @@ static void offset_meet(BevelParams *bp,
|
||||
copy_v3_v3(meetco, off1a);
|
||||
}
|
||||
else if (fabsf(ang - (float)M_PI) < BEVEL_EPSILON_ANG) {
|
||||
/* Special case: e1 and e2 are antiparallel, so bevel is into a zero-area face.
|
||||
/* Special case: e1 and e2 are anti-parallel, so bevel is into a zero-area face.
|
||||
* Just make the offset point on the common line, at offset distance from v. */
|
||||
float d = max_ff(e1->offset_r, e2->offset_l);
|
||||
slide_dist(e2, v, d, meetco);
|
||||
@ -7600,14 +7600,14 @@ static float geometry_collide_offset(BevelParams *bp, EdgeHalf *eb)
|
||||
}
|
||||
|
||||
/* Now check edge slide cases. */
|
||||
if (kb > 0.0f && ka == 0.0f /*&& bvb->selcount == 1 && bvb->edgecount > 2 */) {
|
||||
if (kb > 0.0f && ka == 0.0f /* `&& bvb->selcount == 1 && bvb->edgecount > 2` */) {
|
||||
float t = BM_edge_calc_length(ea->e);
|
||||
t *= sin1 / kb;
|
||||
if (t >= 0.0f && t < limit) {
|
||||
limit = t;
|
||||
}
|
||||
}
|
||||
if (kb > 0.0f && kc == 0.0f /* && bvc && ec && bvc->selcount == 1 && bvc->edgecount > 2 */) {
|
||||
if (kb > 0.0f && kc == 0.0f /* `&& bvc && ec && bvc->selcount == 1 && bvc->edgecount > 2` */) {
|
||||
float t = BM_edge_calc_length(ec->e);
|
||||
t *= sin2 / kb;
|
||||
if (t >= 0.0f && t < limit) {
|
||||
|
@ -76,8 +76,10 @@ GPU_SHADER_CREATE_INFO(workbench_next_resolve_curvature)
|
||||
|
||||
GPU_SHADER_CREATE_INFO(workbench_next_resolve_cavity)
|
||||
.define("WORKBENCH_CAVITY")
|
||||
.sampler(8, ImageType::FLOAT_2D, "jitter_tx") /* TODO(Miguel Pozo): GPU_SAMPLER_REPEAT is set
|
||||
in CavityEffect, it doesn't work here ? */
|
||||
|
||||
/* TODO(@pragma37): GPU_SAMPLER_REPEAT is set in CavityEffect, it doesn't work here? */
|
||||
.sampler(8, ImageType::FLOAT_2D, "jitter_tx")
|
||||
|
||||
.uniform_buf(5, "vec4", "cavity_samples[512]");
|
||||
|
||||
/* Variations */
|
||||
|
@ -221,7 +221,7 @@ void AntiAliasingPass::setup_view(View &view, int2 resolution)
|
||||
|
||||
setup_taa_weights(sample_offset, weights_, weights_sum_);
|
||||
|
||||
/* TODO(Miguel Pozo): New API equivalent? */
|
||||
/* TODO(@pragma37): New API equivalent? */
|
||||
const DRWView *default_view = DRW_view_default_get();
|
||||
float4x4 winmat, viewmat, persmat;
|
||||
/* Construct new matrices from transform delta */
|
||||
@ -243,7 +243,7 @@ void AntiAliasingPass::draw(Manager &manager,
|
||||
GPUTexture *color_tx)
|
||||
{
|
||||
if (!enabled_) {
|
||||
/* TODO(Miguel Pozo): Should render to the input color_tx and depth_tx in the first place.
|
||||
/* TODO(@pragma37): Should render to the input color_tx and depth_tx in the first place.
|
||||
* This requires the use of TextureRefs with stencil_view() support,
|
||||
* but whether TextureRef will stay is still TBD. */
|
||||
GPU_texture_copy(color_tx, resources.color_tx);
|
||||
@ -274,7 +274,7 @@ void AntiAliasingPass::draw(Manager &manager,
|
||||
if (sample0_depth_tx_.is_valid()) {
|
||||
GPU_texture_copy(sample0_depth_tx_, resources.depth_tx);
|
||||
}
|
||||
/* TODO(Miguel Pozo): Should render to the input depth_tx in the first place
|
||||
/* TODO(@pragma37): Should render to the input depth_tx in the first place
|
||||
* This requires the use of TextureRef with stencil_view() support,
|
||||
* but whether TextureRef will stay is still TBD. */
|
||||
|
||||
|
@ -117,11 +117,15 @@ class Instance {
|
||||
const int draw_as = (part->draw_as == PART_DRAW_REND) ? part->ren_as : part->draw_as;
|
||||
|
||||
if (draw_as == PART_DRAW_PATH) {
|
||||
/* TODO(Miguel Pozo):
|
||||
workbench_cache_hair_populate(
|
||||
wpd, ob, psys, md, object_state.color_type, object_state.texture_paint_mode,
|
||||
part->omat);
|
||||
*/
|
||||
#if 0 /* TODO(@pragma37): */
|
||||
workbench_cache_hair_populate(wpd,
|
||||
ob,
|
||||
psys,
|
||||
md,
|
||||
object_state.color_type,
|
||||
object_state.texture_paint_mode,
|
||||
part->omat);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -131,9 +135,9 @@ class Instance {
|
||||
if (md && BKE_modifier_is_enabled(scene_state.scene, md, eModifierMode_Realtime)) {
|
||||
FluidModifierData *fmd = (FluidModifierData *)md;
|
||||
if (fmd->domain) {
|
||||
/* TODO(Miguel Pozo):
|
||||
#if 0 /* TODO(@pragma37): */
|
||||
workbench_volume_cache_populate(vedata, wpd->scene, ob, md, V3D_SHADING_SINGLE_COLOR);
|
||||
*/
|
||||
#endif
|
||||
if (fmd->domain->type == FLUID_DOMAIN_TYPE_GAS) {
|
||||
return; /* Do not draw solid in this case. */
|
||||
}
|
||||
@ -153,17 +157,17 @@ class Instance {
|
||||
mesh_sync(manager, ob_ref, object_state);
|
||||
}
|
||||
else if (ob->type == OB_CURVES) {
|
||||
/* TODO(Miguel Pozo):
|
||||
#if 0 /* TODO(@pragma37): */
|
||||
DRWShadingGroup *grp = workbench_material_hair_setup(
|
||||
wpd, ob, CURVES_MATERIAL_NR, object_state.color_type);
|
||||
DRW_shgroup_curves_create_sub(ob, grp, NULL);
|
||||
*/
|
||||
#endif
|
||||
}
|
||||
else if (ob->type == OB_VOLUME) {
|
||||
if (scene_state.shading.type != OB_WIRE) {
|
||||
/* TODO(Miguel Pozo):
|
||||
#if 0 /* TODO(@pragma37): */
|
||||
workbench_volume_cache_populate(vedata, wpd->scene, ob, NULL, object_state.color_type);
|
||||
*/
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -174,9 +178,9 @@ class Instance {
|
||||
bool has_transparent_material = false;
|
||||
|
||||
if (object_state.sculpt_pbvh) {
|
||||
/* TODO(Miguel Pozo):
|
||||
#if 0 /* TODO(@pragma37): */
|
||||
workbench_cache_sculpt_populate(wpd, ob, object_state.color_type);
|
||||
*/
|
||||
#endif
|
||||
}
|
||||
else {
|
||||
if (object_state.use_per_material_batches) {
|
||||
@ -348,7 +352,7 @@ class Instance {
|
||||
GPU_TEXTURE_USAGE_SHADER_READ |
|
||||
GPU_TEXTURE_USAGE_ATTACHMENT);
|
||||
if (opaque_ps.gbuffer_in_front_ps_.is_empty()) {
|
||||
/* Clear only if it wont be overwitten by opaque_ps */
|
||||
/* Clear only if it wont be overwritten by `opaque_ps`. */
|
||||
Framebuffer fb = Framebuffer("Workbench.Clear");
|
||||
fb.ensure(GPU_ATTACHMENT_TEXTURE(resources.depth_in_front_tx));
|
||||
fb.bind();
|
||||
@ -665,7 +669,7 @@ static void workbench_render_to_image(void *vedata,
|
||||
|
||||
/* Also we weed to have a correct FBO bound for #DRW_curves_update */
|
||||
// GPU_framebuffer_bind(dfbl->default_fb);
|
||||
// DRW_curves_update(); /* TODO(Miguel Pozo): Check this once curves are implemented */
|
||||
// DRW_curves_update(); /* TODO(@pragma37): Check this once curves are implemented */
|
||||
|
||||
workbench_draw_scene(vedata);
|
||||
|
||||
|
@ -88,7 +88,7 @@ void MeshPass::draw(ObjectRef &ref,
|
||||
}
|
||||
sub_pass->push_constant("isImageTile", tilemap != nullptr);
|
||||
sub_pass->push_constant("imagePremult", image && image->alpha_mode == IMA_ALPHA_PREMUL);
|
||||
/* TODO(Miguel Pozo): This setting should be exposed on the user side,
|
||||
/* TODO(@pragma37): This setting should be exposed on the user side,
|
||||
* either as a global parameter (and set it here)
|
||||
* or by reading the Material Clipping Threshold (and set it per material) */
|
||||
sub_pass->push_constant("imageTransparencyCutoff", 0.1f);
|
||||
|
@ -287,7 +287,7 @@ class ShadowPass {
|
||||
|
||||
UniformBuffer<ShadowPassData> pass_data_ = {};
|
||||
|
||||
/* Draws are added to both passes and the visibily compute shader selects one of them */
|
||||
/* Draws are added to both passes and the visibly compute shader selects one of them */
|
||||
PassMain pass_ps_ = {"Shadow.Pass"};
|
||||
PassMain fail_ps_ = {"Shadow.Fail"};
|
||||
|
||||
|
@ -41,7 +41,7 @@ static bool get_matcap_tx(Texture &matcap_tx, StudioLight &studio_light)
|
||||
|
||||
static float4x4 get_world_shading_rotation_matrix(float studiolight_rot_z)
|
||||
{
|
||||
/* TODO(Miguel Pozo) C++ API ? */
|
||||
/* TODO(@pragma37): C++ API? */
|
||||
float V[4][4], R[4][4];
|
||||
DRW_view_viewmat_get(nullptr, V, false);
|
||||
axis_angle_to_mat4_single(R, 'Z', -studiolight_rot_z);
|
||||
@ -148,7 +148,7 @@ void SceneResources::init(const SceneState &scene_state)
|
||||
world_buf.use_specular = false;
|
||||
}
|
||||
|
||||
/* TODO(Miguel Pozo) volumes_do */
|
||||
/* TODO(@pragma37): volumes_do */
|
||||
|
||||
cavity.init(scene_state, *this);
|
||||
|
||||
|
@ -240,7 +240,7 @@ void ShadowPass::ShadowView::compute_visibility(ObjectBoundsBuf &bounds,
|
||||
}
|
||||
|
||||
if (do_visibility_) {
|
||||
/* TODO(Miguel Pozo): Use regular culling for the caps pass */
|
||||
/* TODO(@pragma37): Use regular culling for the caps pass. */
|
||||
|
||||
if (dynamic_pass_type_shader_ == nullptr) {
|
||||
dynamic_pass_type_shader_ = GPU_shader_create_from_info_name(
|
||||
|
@ -41,7 +41,7 @@ void SceneState::init(Object *camera_ob /*= nullptr*/)
|
||||
|
||||
object_mode = CTX_data_mode_enum_ex(context->object_edit, context->obact, context->object_mode);
|
||||
|
||||
/* TODO(Miguel Pozo):
|
||||
/* TODO(@pragma37):
|
||||
* Check why Workbench Next exposes OB_MATERIAL, and Workbench exposes OB_RENDER */
|
||||
bool is_render_mode = !v3d || ELEM(v3d->shading.type, OB_RENDER, OB_MATERIAL);
|
||||
|
||||
@ -109,7 +109,7 @@ void SceneState::init(Object *camera_ob /*= nullptr*/)
|
||||
}
|
||||
|
||||
float4x4 matrix;
|
||||
/*TODO(Miguel Pozo): New API ?*/
|
||||
/* TODO(@pragma37): New API? */
|
||||
DRW_view_persmat_get(nullptr, matrix.ptr(), false);
|
||||
if (matrix != view_projection_matrix) {
|
||||
view_projection_matrix = matrix;
|
||||
@ -158,7 +158,7 @@ void SceneState::init(Object *camera_ob /*= nullptr*/)
|
||||
}
|
||||
render_finished = sample >= samples_len && samples_len > 1;
|
||||
|
||||
/* TODO(Miguel Pozo) volumes_do */
|
||||
/* TODO(@pragma37): volumes_do */
|
||||
|
||||
draw_cavity = shading.flag & V3D_SHADING_CAVITY &&
|
||||
ELEM(shading.cavity_type, V3D_SHADING_CAVITY_SSAO, V3D_SHADING_CAVITY_BOTH);
|
||||
@ -205,9 +205,8 @@ ObjectState::ObjectState(const SceneState &scene_state, Object *ob)
|
||||
const DRWContextState *draw_ctx = DRW_context_state_get();
|
||||
const Mesh *me = (ob->type == OB_MESH) ? static_cast<Mesh *>(ob->data) : nullptr;
|
||||
const bool is_active = (ob == draw_ctx->obact);
|
||||
/* TODO(Miguel Pozo) Is the double check needed?
|
||||
* If it is, wouldn't be needed for sculpt_pbvh too?
|
||||
*/
|
||||
/* TODO(@pragma37): Is the double check needed?
|
||||
* If it is, wouldn't be needed for sculpt_pbvh too? */
|
||||
const bool is_render = DRW_state_is_image_render() && (draw_ctx->v3d == nullptr);
|
||||
|
||||
color_type = (eV3DShadingColorType)scene_state.shading.color_type;
|
||||
|
@ -2061,7 +2061,7 @@ static int edbm_duplicate_exec(bContext *C, wmOperator *op)
|
||||
BMO_slot_buffer_hflag_enable(
|
||||
bm, bmop.slots_out, "geom.out", BM_ALL_NOLOOP, BM_ELEM_SELECT, true);
|
||||
|
||||
/* rebuild editselection */
|
||||
/* Rebuild edit-selection. */
|
||||
BM_SELECT_HISTORY_RESTORE(bm);
|
||||
|
||||
if (!EDBM_op_finish(em, &bmop, op, true)) {
|
||||
@ -4348,7 +4348,7 @@ static int edbm_knife_cut_exec(bContext *C, wmOperator *op)
|
||||
BMO_edge_flag_set(bm, be, ELE_EDGE_CUT, is_cut);
|
||||
}
|
||||
|
||||
/* free all allocs */
|
||||
/* Free all allocations. */
|
||||
MEM_freeN(screen_vert_coords);
|
||||
MEM_freeN(mouse_path);
|
||||
|
||||
@ -4434,7 +4434,7 @@ static Base *mesh_separate_tagged(
|
||||
&((struct BMeshCreateParams){
|
||||
.use_toolflags = true,
|
||||
}));
|
||||
BM_mesh_elem_toolflags_ensure(bm_new); /* needed for 'duplicate' bmo */
|
||||
BM_mesh_elem_toolflags_ensure(bm_new); /* Needed for 'duplicate' BMO. */
|
||||
|
||||
BM_mesh_copy_init_customdata(bm_new, bm_old, &bm_mesh_allocsize_default);
|
||||
|
||||
|
@ -415,7 +415,9 @@ static int multiresbake_image_exec_locked(bContext *C, wmOperator *op)
|
||||
return OPERATOR_FINISHED;
|
||||
}
|
||||
|
||||
/* Multiresbake adopted for job-system executing */
|
||||
/**
|
||||
* Multi-resolution-bake adopted for job-system executing.
|
||||
*/
|
||||
static void init_multiresbake_job(bContext *C, MultiresBakeJob *bkj)
|
||||
{
|
||||
Scene *scene = CTX_data_scene(C);
|
||||
|
@ -3234,7 +3234,7 @@ static int remove_doubles_exec(bContext *C, wmOperator *op)
|
||||
|
||||
tree = BLI_kdtree_3d_new(psys->totpart);
|
||||
|
||||
/* insert particles into kd tree */
|
||||
/* Insert particles into KD-tree. */
|
||||
LOOP_SELECTED_POINTS {
|
||||
psys_mat_hair_to_object(
|
||||
ob, psmd_eval->mesh_final, psys->part->from, psys->particles + p, mat);
|
||||
|
@ -729,7 +729,8 @@ static bool raycastMesh(SnapObjectContext *sctx,
|
||||
* very far away ray_start values (as returned in case of ortho view3d), see T50486, T38358.
|
||||
*/
|
||||
if (len_diff > 400.0f) {
|
||||
len_diff -= local_scale; /* make temp start point a bit away from bbox hit point. */
|
||||
/* Make temporary start point a bit away from bounding-box hit point. */
|
||||
len_diff -= local_scale;
|
||||
madd_v3_v3fl(ray_start_local, ray_normal_local, len_diff);
|
||||
local_depth -= len_diff;
|
||||
}
|
||||
|
@ -1317,8 +1317,8 @@ static int stitch_process_data(StitchStateContainer *ssc,
|
||||
}
|
||||
}
|
||||
|
||||
/* take mean position here.
|
||||
* For edge case, this can't be done inside the loop for shared uvverts */
|
||||
/* Take mean position here.
|
||||
* For edge case, this can't be done inside the loop for shared UV-verts. */
|
||||
if (ssc->mode == STITCH_EDGE && stitch_midpoints) {
|
||||
for (i = 0; i < state->total_separate_uvs; i++) {
|
||||
final_position[i].uv[0] /= final_position[i].count;
|
||||
|
@ -1037,7 +1037,7 @@ static void weld_poly_loop_ctx_setup_collapsed_and_split(
|
||||
|
||||
/* Setup Poly/Loop. */
|
||||
/* `wpoly.size()` may change during the loop,
|
||||
* so make it clear that we are only working with the original wpolys. */
|
||||
* so make it clear that we are only working with the original `wpoly` items. */
|
||||
IndexRange wpoly_original_range = r_weld_mesh->wpoly.index_range();
|
||||
for (const int i : wpoly_original_range) {
|
||||
WeldPoly &wp = wpoly[i];
|
||||
|
@ -353,7 +353,7 @@ bool MTLShader::finalize(const shader::ShaderCreateInfo *info)
|
||||
shader_library_compute_.label = [NSString stringWithUTF8String:this->name];
|
||||
} break;
|
||||
case ShaderStage::ANY: {
|
||||
/* Supress warnings. */
|
||||
/* Suppress warnings. */
|
||||
BLI_assert_unreachable();
|
||||
} break;
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0-or-later
|
||||
* Copyright 2023 NVIDIA Corportation. All rights reserved. */
|
||||
* Copyright 2023 NVIDIA Corporation. All rights reserved. */
|
||||
|
||||
#include "usd_asset_utils.h"
|
||||
|
||||
@ -29,10 +29,12 @@ static const int UDIM_END_TILE = 1100;
|
||||
|
||||
namespace blender::io::usd {
|
||||
|
||||
/* The following is copied from _SplitUdimPattern() in
|
||||
* USD library source file materialParamsUtils.cpp.
|
||||
* Split a udim file path such as /someDir/myFile.<UDIM>.exr into a
|
||||
* prefix (/someDir/myFile.) and suffix (.exr). */
|
||||
/**
|
||||
* The following is copied from `_SplitUdimPattern()` in
|
||||
* USD library source file `materialParamsUtils.cpp`.
|
||||
* Split a UDIM file path such as `/someDir/myFile.<UDIM>.exr` into a
|
||||
* prefix `/someDir/myFile.` and suffix `.exr`.
|
||||
*/
|
||||
static std::pair<std::string, std::string> split_udim_pattern(const std::string &path)
|
||||
{
|
||||
static const std::vector<std::string> patterns = {UDIM_PATTERN, UDIM_PATTERN2};
|
||||
|
@ -98,9 +98,9 @@ class UsdExportTest : public BlendfileLoadingBaseTest {
|
||||
return pxr::UsdPrim();
|
||||
}
|
||||
|
||||
/*
|
||||
* Loop the sockets on the Blender bNode, and fail if any of their values do
|
||||
* not match the equivalent Attribtue values on the UsdPrim.
|
||||
/**
|
||||
* Loop the sockets on the Blender `bNode`, and fail if any of their values do
|
||||
* not match the equivalent Attribute values on the `UsdPrim`.
|
||||
*/
|
||||
const void compare_blender_node_to_usd_prim(const bNode *bsdf_node,
|
||||
const pxr::UsdPrim &bsdf_prim)
|
||||
|
@ -77,7 +77,7 @@ typedef struct bNodeStack {
|
||||
char _pad[4];
|
||||
} bNodeStack;
|
||||
|
||||
/* ns->datatype, shadetree only */
|
||||
/** #bNodeStack.datatype (shade-tree only). */
|
||||
#define NS_OSA_VECTORS 1
|
||||
#define NS_OSA_VALUES 2
|
||||
|
||||
@ -659,9 +659,9 @@ typedef struct bNodeTree {
|
||||
|
||||
/** #NodeTree.flag */
|
||||
#define NTREE_DS_EXPAND (1 << 0) /* for animation editors */
|
||||
#define NTREE_COM_OPENCL (1 << 1) /* use opencl */
|
||||
#define NTREE_COM_OPENCL (1 << 1) /* Use OPENCL. */
|
||||
#define NTREE_TWO_PASS (1 << 2) /* two pass */
|
||||
#define NTREE_COM_GROUPNODE_BUFFER (1 << 3) /* use groupnode buffers */
|
||||
#define NTREE_COM_GROUPNODE_BUFFER (1 << 3) /* Use group-node buffers. */
|
||||
#define NTREE_VIEWER_BORDER (1 << 4) /* use a border for viewer nodes */
|
||||
/* NOTE: DEPRECATED, use (id->tag & LIB_TAG_LOCALIZED) instead. */
|
||||
|
||||
|
@ -1596,7 +1596,7 @@ typedef struct ToolSettings {
|
||||
/** Keyframe type (see DNA_curve_types.h). */
|
||||
char keyframe_type;
|
||||
|
||||
/* Multires. */
|
||||
/** Multi-resolution meshes. */
|
||||
char multires_subdiv_type;
|
||||
|
||||
/** Edge tagging, store operator settings (no UI access). */
|
||||
|
@ -262,7 +262,7 @@ typedef struct wmWindow {
|
||||
|
||||
struct bScreen *screen DNA_DEPRECATED;
|
||||
|
||||
/** Winid also in screens, is for retrieving this window after read. */
|
||||
/** Window-ID also in screens, is for retrieving this window after read. */
|
||||
int winid;
|
||||
/** Window coords. */
|
||||
short posx, posy, sizex, sizey;
|
||||
@ -512,7 +512,7 @@ enum {
|
||||
|
||||
/**
|
||||
* This is similar to addon-preferences,
|
||||
* however unlike add-ons key-config's aren't saved to disk.
|
||||
* however unlike add-ons key-configurations aren't saved to disk.
|
||||
*
|
||||
* #wmKeyConfigPref is written to DNA,
|
||||
* #wmKeyConfigPrefType_Runtime has the RNA type.
|
||||
|
@ -8,9 +8,7 @@
|
||||
* (including relevant operators).
|
||||
*/
|
||||
|
||||
/* placed up here because of crappy
|
||||
* winsock stuff.
|
||||
*/
|
||||
/* Placed up here because of crappy WINSOCK stuff. */
|
||||
#include <errno.h>
|
||||
#include <fcntl.h> /* for open flags (O_BINARY, O_RDONLY). */
|
||||
#include <stddef.h>
|
||||
@ -377,7 +375,7 @@ static void wm_window_match_replace_by_file_wm(bContext *C,
|
||||
* to avoid clearing the wrong wm. */
|
||||
wm_window_clear_drawable(oldwm);
|
||||
|
||||
/* only first wm in list has ghostwins */
|
||||
/* Only first `wm` in list has GHOST-windows. */
|
||||
LISTBASE_FOREACH (wmWindow *, win, &wm->windows) {
|
||||
LISTBASE_FOREACH (wmWindow *, oldwin, &oldwm->windows) {
|
||||
if (oldwin->winid == win->winid) {
|
||||
@ -1443,7 +1441,7 @@ void wm_history_file_read(void)
|
||||
|
||||
wm_history_files_free();
|
||||
|
||||
/* read list of recent opened files from recent-files.txt to memory */
|
||||
/* Read list of recent opened files from #BLENDER_HISTORY_FILE to memory. */
|
||||
for (l = lines, num = 0; l && (num < U.recent_files); l = l->next) {
|
||||
const char *line = static_cast<const char *>(l->link);
|
||||
/* don't check if files exist, causes slow startup for remote/external drives */
|
||||
@ -1526,7 +1524,7 @@ static void wm_history_file_update(void)
|
||||
}
|
||||
|
||||
recent = static_cast<RecentFile *>(G.recent_files.first);
|
||||
/* refresh recent-files.txt of recent opened files, when current file was changed */
|
||||
/* Refresh #BLENDER_HISTORY_FILE of recent opened files, when current file was changed. */
|
||||
if (!(recent) || (BLI_path_cmp(recent->filepath, blendfile_path) != 0)) {
|
||||
|
||||
recent = wm_file_history_find(blendfile_path);
|
||||
@ -1547,7 +1545,7 @@ static void wm_history_file_update(void)
|
||||
/* add current file to the beginning of list */
|
||||
BLI_addhead(&(G.recent_files), recent);
|
||||
|
||||
/* write current file to recent-files.txt */
|
||||
/* Write current file to #BLENDER_HISTORY_FILE. */
|
||||
wm_history_file_write();
|
||||
|
||||
/* also update most recent files on System */
|
||||
@ -2053,7 +2051,7 @@ void wm_autosave_delete(void)
|
||||
char str[FILE_MAX];
|
||||
BLI_path_join(str, sizeof(str), BKE_tempdir_base(), BLENDER_QUIT_FILE);
|
||||
|
||||
/* if global undo; remove tempsave, otherwise rename */
|
||||
/* For global undo; remove temporarily saved file, otherwise rename. */
|
||||
if (U.uiflag & USER_GLOBALUNDO) {
|
||||
BLI_delete(filepath, false, false);
|
||||
}
|
||||
|
@ -599,7 +599,7 @@ void WM_exit_ex(bContext *C, const bool do_python)
|
||||
(void)do_python;
|
||||
#endif
|
||||
|
||||
ED_file_exit(); /* for fsmenu */
|
||||
ED_file_exit(); /* For file-selector menu data. */
|
||||
|
||||
/* Delete GPU resources and context. The UI also uses GPU resources and so
|
||||
* is also deleted with the context active. */
|
||||
|
@ -1756,7 +1756,7 @@ void wm_test_opengl_deprecation_warning(bContext *C)
|
||||
return;
|
||||
}
|
||||
|
||||
/* Have we already shown a message during this Blender session. bgl calls are done in a draw
|
||||
/* Have we already shown a message during this Blender session. `bgl` calls are done in a draw
|
||||
* handler that will run many times. */
|
||||
if (message_shown) {
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user