Cleanup: spelling & punctuation in comments
Also remove some unhelpful/redundant comments.
This commit is contained in:
@@ -51,7 +51,7 @@ TReturn metalrt_local_hit(constant KernelParamsMetal &launch_params_metal,
|
||||
|
||||
if ((object != payload.local_object) || context.intersection_skip_self_local(payload.self, prim))
|
||||
{
|
||||
/* Only intersect with matching object and skip self-intersecton. */
|
||||
/* Only intersect with matching object and skip self-intersection. */
|
||||
result.accept = false;
|
||||
result.continue_search = true;
|
||||
return result;
|
||||
|
||||
@@ -788,7 +788,7 @@ ccl_device_forceinline bool mnee_path_contribution(KernelGlobals kg,
|
||||
const int diffuse_bounce = INTEGRATOR_STATE(state, path, diffuse_bounce);
|
||||
const int bounce = INTEGRATOR_STATE(state, path, bounce);
|
||||
|
||||
/* Set diffuse bounce info . */
|
||||
/* Set diffuse bounce info. */
|
||||
INTEGRATOR_STATE_WRITE(state, path, diffuse_bounce) = diffuse_bounce + 1;
|
||||
|
||||
/* Evaluate light sample
|
||||
|
||||
@@ -31,7 +31,7 @@ struct ccl_align(8) LayerClosure
|
||||
ccl_private const OSLClosure *top;
|
||||
};
|
||||
|
||||
/* If we failed to allocate a layerable closure, we need to zero out the albedo
|
||||
/* If we failed to allocate a layer-able closure, we need to zero out the albedo
|
||||
* so that lower layers aren't falsely blocked.
|
||||
* Therefore, to keep the code clean, set it to zero at the start and overwrite
|
||||
* later if it succeeded. */
|
||||
|
||||
@@ -943,7 +943,7 @@ GHOST_TSuccess GHOST_ContextVK::initializeDrawingContext()
|
||||
}
|
||||
extensions_device.push_back("VK_KHR_dedicated_allocation");
|
||||
extensions_device.push_back("VK_KHR_get_memory_requirements2");
|
||||
/* Allow relaxed interface matching between shader stages.*/
|
||||
/* Allow relaxed interface matching between shader stages. */
|
||||
extensions_device.push_back("VK_KHR_maintenance4");
|
||||
/* Enable MoltenVK required instance extensions. */
|
||||
#ifdef VK_MVK_MOLTENVK_EXTENSION_NAME
|
||||
|
||||
@@ -5625,7 +5625,7 @@ GHOST_SystemWayland::GHOST_SystemWayland(bool background)
|
||||
/* Ignore windowing requirements when running in background mode,
|
||||
* as it doesn't make sense to fall back to X11 because of windowing functionality
|
||||
* in background mode, also LIBDECOR is crashing in background mode `blender -b -f 1`
|
||||
* for e.g. while it could be fixed, requiring the library at all makes no sense . */
|
||||
* for e.g. while it could be fixed, requiring the library at all makes no sense. */
|
||||
if (background) {
|
||||
display_->libdecor_required = false;
|
||||
}
|
||||
|
||||
@@ -100,7 +100,7 @@ extern void *(*MEM_callocN)(size_t len, const char *str) /* ATTR_MALLOC */ ATTR_
|
||||
* Allocate a block of memory of size (len * size), with tag name
|
||||
* str, aborting in case of integer overflows to prevent vulnerabilities.
|
||||
* The memory is cleared. The name must be static, because only a
|
||||
* pointer to it is stored ! */
|
||||
* pointer to it is stored! */
|
||||
extern void *(*MEM_calloc_arrayN)(size_t len,
|
||||
size_t size,
|
||||
const char *str) /* ATTR_MALLOC */ ATTR_WARN_UNUSED_RESULT
|
||||
@@ -108,7 +108,7 @@ extern void *(*MEM_calloc_arrayN)(size_t len,
|
||||
|
||||
/**
|
||||
* Allocate a block of memory of size len, with tag name str. The
|
||||
* name must be a static, because only a pointer to it is stored !
|
||||
* name must be a static, because only a pointer to it is stored!
|
||||
*/
|
||||
extern void *(*MEM_mallocN)(size_t len, const char *str) /* ATTR_MALLOC */ ATTR_WARN_UNUSED_RESULT
|
||||
ATTR_ALLOC_SIZE(1) ATTR_NONNULL(2);
|
||||
@@ -116,7 +116,7 @@ extern void *(*MEM_mallocN)(size_t len, const char *str) /* ATTR_MALLOC */ ATTR_
|
||||
/**
|
||||
* Allocate a block of memory of size (len * size), with tag name str,
|
||||
* aborting in case of integer overflow to prevent vulnerabilities. The
|
||||
* name must be a static, because only a pointer to it is stored !
|
||||
* name must be a static, because only a pointer to it is stored!
|
||||
*/
|
||||
extern void *(*MEM_malloc_arrayN)(size_t len,
|
||||
size_t size,
|
||||
@@ -125,7 +125,7 @@ extern void *(*MEM_malloc_arrayN)(size_t len,
|
||||
|
||||
/**
|
||||
* Allocate an aligned block of memory of size len, with tag name str. The
|
||||
* name must be a static, because only a pointer to it is stored !
|
||||
* name must be a static, because only a pointer to it is stored!
|
||||
*/
|
||||
extern void *(*MEM_mallocN_aligned)(size_t len,
|
||||
size_t alignment,
|
||||
|
||||
@@ -3761,7 +3761,7 @@ def km_grease_pencil_stroke_edit_mode(params):
|
||||
# Close strokes
|
||||
("gpencil.stroke_cyclical_set", {"type": 'F', "value": 'PRESS'},
|
||||
{"properties": [("type", 'CLOSE'), ("geometry", True)]}),
|
||||
# Copy + paset
|
||||
# Copy + paste.
|
||||
("gpencil.copy", {"type": 'C', "value": 'PRESS', "ctrl": True}, None),
|
||||
("gpencil.paste", {"type": 'V', "value": 'PRESS', "ctrl": True}, None),
|
||||
# Snap
|
||||
|
||||
@@ -2359,7 +2359,7 @@ def km_grease_pencil_stroke_edit_mode(params):
|
||||
("gpencil.stroke_join", {"type": 'J', "value": 'PRESS', "ctrl": True}, None),
|
||||
("gpencil.stroke_join", {"type": 'J', "value": 'PRESS', "shift": True, "ctrl": True},
|
||||
{"properties": [("type", 'JOINCOPY')]}),
|
||||
# Copy + paset
|
||||
# Copy + paste.
|
||||
("gpencil.copy", {"type": 'C', "value": 'PRESS', "ctrl": True}, None),
|
||||
("gpencil.paste", {"type": 'V', "value": 'PRESS', "ctrl": True}, None),
|
||||
# Snap
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
# panels get subclassed (not registered directly)
|
||||
# menus are referenced `as is`
|
||||
# Panels get sub-classed (not registered directly).
|
||||
# Menus are referenced as-is.
|
||||
|
||||
from bpy.types import Menu, UIList
|
||||
from bpy.app.translations import contexts as i18n_contexts
|
||||
|
||||
@@ -224,7 +224,7 @@ void CTX_wm_gizmo_group_set(bContext *C, struct wmGizmoGroup *gzgroup);
|
||||
* \note This must be called in the same context as the poll function that created it.
|
||||
*/
|
||||
struct bContextPollMsgDyn_Params {
|
||||
/** The result is allocated . */
|
||||
/** The result is allocated. */
|
||||
char *(*get_fn)(bContext *C, void *user_data);
|
||||
/** Optionally free the user-data. */
|
||||
void (*free_fn)(bContext *C, void *user_data);
|
||||
|
||||
@@ -34,11 +34,11 @@ struct ID;
|
||||
typedef uint64_t eCustomDataMask;
|
||||
|
||||
/* These names are used as prefixes for UV layer names to find the associated boolean
|
||||
* layers. They should never be longer than 2 chars, as MAX_CUSTOMDATA_LAYER_NAME
|
||||
* layers. They should never be longer than 2 chars, as #MAX_CUSTOMDATA_LAYER_NAME
|
||||
* has 4 extra bytes above what can be used for the base layer name, and these
|
||||
* prefixes are placed between 2 '.'s at the start of the layer name.
|
||||
* For example The uv vert selection layer of a layer named 'UVMap.001'
|
||||
* will be called '.vs.UVMap.001' . */
|
||||
* For example The uv vert selection layer of a layer named `UVMap.001`
|
||||
* will be called `.vs.UVMap.001`. */
|
||||
#define UV_VERTSEL_NAME "vs"
|
||||
#define UV_EDGESEL_NAME "es"
|
||||
#define UV_PINNED_NAME "pn"
|
||||
|
||||
@@ -434,7 +434,7 @@ typedef struct bNodeTreeType {
|
||||
void (*localize)(struct bNodeTree *localtree, struct bNodeTree *ntree);
|
||||
void (*local_merge)(struct Main *bmain, struct bNodeTree *localtree, struct bNodeTree *ntree);
|
||||
|
||||
/* Tree update. Overrides `nodetype->updatetreefunc` ! */
|
||||
/* Tree update. Overrides `nodetype->updatetreefunc`. */
|
||||
void (*update)(struct bNodeTree *ntree);
|
||||
|
||||
bool (*validate_link)(eNodeSocketDatatype from, eNodeSocketDatatype to);
|
||||
|
||||
@@ -217,7 +217,7 @@ bool BKE_tracking_track_has_enabled_marker_at_frame(struct MovieTrackingTrack *t
|
||||
* \note frame number should be in clip space, not scene space.
|
||||
*/
|
||||
typedef enum eTrackClearAction {
|
||||
/* Clear path from `ref_frame+1` up to the . */
|
||||
/* Clear path from `ref_frame+1` up to the. */
|
||||
TRACK_CLEAR_UPTO,
|
||||
/* Clear path from the beginning up to `ref_frame-1`. */
|
||||
TRACK_CLEAR_REMAINED,
|
||||
|
||||
@@ -1768,9 +1768,9 @@ static float nla_blend_value(const int blendmode,
|
||||
|
||||
default: /* TODO: Do we really want to blend by default? it seems more uses might prefer add...
|
||||
*/
|
||||
/* Do linear interpolation. The influence of the accumulated data (elsewhere, that is called
|
||||
* dstweight) is 1 - influence, since the strip's influence is srcweight.
|
||||
*/
|
||||
/* Do linear interpolation. The influence of the accumulated data
|
||||
* (elsewhere, that is called `dstwegiht`) is 1 - influence,
|
||||
* since the strip's influence is `srcweight`. */
|
||||
return lower_value * (1.0f - influence) + (strip_value * influence);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -790,7 +790,7 @@ Mesh *curve_to_mesh_sweep(const CurvesGeometry &main,
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
/* Add the position attribute later so it can be shared in some cases.*/
|
||||
/* Add the position attribute later so it can be shared in some cases. */
|
||||
Mesh *mesh = BKE_mesh_new_nomain(
|
||||
0, offsets.edge.last(), offsets.face.last(), offsets.loop.last());
|
||||
CustomData_free_layer_named(&mesh->vert_data, "position", 0);
|
||||
|
||||
@@ -1757,7 +1757,7 @@ static const LayerTypeInfo LAYERTYPEINFO[CD_NUMTYPES] = {
|
||||
{sizeof(MRecast), "MRecast", 1, N_("Recast"), nullptr, nullptr, nullptr, nullptr},
|
||||
/* 25: CD_MPOLY */ /* DEPRECATED */
|
||||
{sizeof(MPoly), "MPoly", 1, N_("NGon Face"), nullptr, nullptr, nullptr, nullptr, nullptr},
|
||||
/* 26: CD_MLOOP */ /* DEPRECATED*/
|
||||
/* 26: CD_MLOOP */ /* DEPRECATED */
|
||||
{sizeof(MLoop),
|
||||
"MLoop",
|
||||
1,
|
||||
|
||||
@@ -141,7 +141,7 @@ static void image_buf_fill_checker_slice(
|
||||
rect = rect_orig;
|
||||
rect_float = rect_float_orig;
|
||||
|
||||
/* 2nd pass, colored + */
|
||||
/* 2nd pass, colored `+`. */
|
||||
for (y = offset; y < height + offset; y++) {
|
||||
float hoffs = 0.125f * floorf(y / checkerwidth);
|
||||
|
||||
|
||||
@@ -2040,10 +2040,7 @@ static bool seq_convert_callback(Sequence *seq, void *userdata)
|
||||
return true;
|
||||
}
|
||||
|
||||
/* patch adrcode, so that we can map
|
||||
* to different DNA variables later
|
||||
* (semi-hack (tm) )
|
||||
*/
|
||||
/* Patch `adrcode`, so that we can map to different DNA variables later (semi-hack (tm)). */
|
||||
switch (seq->type) {
|
||||
case SEQ_TYPE_IMAGE:
|
||||
case SEQ_TYPE_META:
|
||||
|
||||
@@ -176,8 +176,8 @@ static int id_free(Main *bmain, void *idv, int flag, const bool use_flag_from_id
|
||||
void BKE_id_free_ex(Main *bmain, void *idv, int flag, const bool use_flag_from_idtag)
|
||||
{
|
||||
/* ViewLayer resync needs to be delayed during Scene freeing, since internal relationships
|
||||
* between the Scene's master collection and its view_layers become invalid (due to remapping .
|
||||
*/
|
||||
* between the Scene's master collection and its view_layers become invalid
|
||||
* (due to remapping). */
|
||||
BKE_layer_collection_resync_forbid();
|
||||
|
||||
flag = id_free(bmain, idv, flag, use_flag_from_idtag);
|
||||
@@ -371,8 +371,8 @@ static size_t id_delete(Main *bmain,
|
||||
BKE_main_unlock(bmain);
|
||||
|
||||
/* ViewLayer resync needs to be delayed during Scene freeing, since internal relationships
|
||||
* between the Scene's master collection and its view_layers become invalid (due to remapping .
|
||||
*/
|
||||
* between the Scene's master collection and its view_layers become invalid
|
||||
* (due to remapping). */
|
||||
BKE_layer_collection_resync_forbid();
|
||||
|
||||
/* In usual reversed order, such that all usage of a given ID, even 'never nullptr' ones,
|
||||
|
||||
@@ -780,7 +780,7 @@ static bool lib_query_unused_ids_tag_recurse(Main *bmain,
|
||||
bmain, tag, do_local_ids, do_linked_ids, id_from, r_num_tagged))
|
||||
{
|
||||
/* Dependency loop case, ignore the `id_from` tag value here (as it should not be considered
|
||||
* as valid yet), and presume that this is a 'valid user' case for now. . */
|
||||
* as valid yet), and presume that this is a 'valid user' case for now. */
|
||||
is_part_of_dependency_loop = true;
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
#if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 201112L)
|
||||
# define CHECK_TYPE_INLINE(val, type) \
|
||||
(void)((void)(((type)0) != (0 ? (val) : ((type)0))), _Generic((val), type : 0, const type : 0))
|
||||
/* NOTE: The NONCONST version is needed for scalar types on CLANG, to avoid warnings. . */
|
||||
/* NOTE: The NONCONST version is needed for scalar types on CLANG, to avoid warnings. */
|
||||
# define CHECK_TYPE_INLINE_NONCONST(val, type) \
|
||||
(void)((void)(((type)0) != (0 ? (val) : ((type)0))), _Generic((val), type : 0))
|
||||
#else
|
||||
|
||||
@@ -290,7 +290,7 @@ MINLINE uint divide_ceil_u(uint a, uint b);
|
||||
MINLINE uint64_t divide_ceil_ul(uint64_t a, uint64_t b);
|
||||
|
||||
/**
|
||||
* Returns \a a if it is a multiple of \a b or the next multiple or \a b after \b a .
|
||||
* Returns \a a if it is a multiple of \a b or the next multiple or \a b after \b a.
|
||||
*/
|
||||
MINLINE uint ceil_to_multiple_u(uint a, uint b);
|
||||
MINLINE uint64_t ceil_to_multiple_ul(uint64_t a, uint64_t b);
|
||||
|
||||
@@ -88,7 +88,7 @@ template<typename T>
|
||||
* \{ */
|
||||
|
||||
/**
|
||||
* Transform \a v by rotation using the quaternion \a q .
|
||||
* Transform \a v by rotation using the quaternion \a q.
|
||||
*/
|
||||
template<typename T>
|
||||
[[nodiscard]] inline VecBase<T, 3> transform_point(const QuaternionBase<T> &q,
|
||||
|
||||
@@ -1054,7 +1054,7 @@ static void version_geometry_nodes_extrude_smooth_propagation(bNodeTree &ntree)
|
||||
}
|
||||
|
||||
/* Change the action strip (if a NLA strip is preset) to HOLD instead of HOLD FORWARD to maintain
|
||||
* backwards compatibility.*/
|
||||
* backwards compatibility. */
|
||||
static void version_nla_action_strip_hold(Main *bmain)
|
||||
{
|
||||
ID *id;
|
||||
|
||||
@@ -150,7 +150,7 @@ void closure_Glossy_indirect_end(ClosureInputGlossy cl_in,
|
||||
#endif
|
||||
/* Apply Ray-trace reflections after occlusion since they are direct, local reflections. */
|
||||
#if defined(RESOLVE_PROBE)
|
||||
/* NO OP - output base radiance*/
|
||||
/* NO OP - output base radiance. */
|
||||
#elif defined(RESOLVE_SSR)
|
||||
/* Output only ray-trace radiance. */
|
||||
cl_out.radiance = cl_eval.raytrace_radiance;
|
||||
|
||||
@@ -25,7 +25,7 @@ uniform sampler2DArray utilTex;
|
||||
#define NOISE_LAYER 2
|
||||
#define LTC_DISK_LAYER 3 /* UNUSED */
|
||||
|
||||
/* Layers 4 to 20 are for BTDF Lut. */
|
||||
/* Layers 4 to 20 are for BTDF LUT. */
|
||||
#define lut_btdf_layer_first 4.0
|
||||
#define lut_btdf_layer_count 16.0
|
||||
|
||||
|
||||
@@ -163,9 +163,9 @@ class IrradianceBake {
|
||||
LightProbeGridCacheFrame *read_result_packed();
|
||||
|
||||
private:
|
||||
/** Read surfel data back to CPU into \a cache_frame . */
|
||||
/** Read surfel data back to CPU into \a cache_frame. */
|
||||
void read_surfels(LightProbeGridCacheFrame *cache_frame);
|
||||
/** Read virtual offset back to CPU into \a cache_frame . */
|
||||
/** Read virtual offset back to CPU into \a cache_frame. */
|
||||
void read_virtual_offset(LightProbeGridCacheFrame *cache_frame);
|
||||
};
|
||||
|
||||
|
||||
@@ -683,7 +683,7 @@ void DeferredProbeLayer::begin_sync()
|
||||
gbuffer_single_sided_ps_->state_set(state | DRW_STATE_CULL_BACK);
|
||||
}
|
||||
|
||||
/* Light eval resources.*/
|
||||
/* Light evaluate resources. */
|
||||
{
|
||||
eGPUTextureUsage usage = GPU_TEXTURE_USAGE_SHADER_READ | GPU_TEXTURE_USAGE_SHADER_WRITE;
|
||||
dummy_light_tx_.ensure_2d(GPU_RGBA16F, int2(1), usage);
|
||||
@@ -827,7 +827,7 @@ void CapturePipeline::sync()
|
||||
surface_ps_.bind_ssbo(CAPTURE_BUF_SLOT, &inst_.irradiance_cache.bake.capture_info_buf_);
|
||||
|
||||
surface_ps_.bind_texture(RBUFS_UTILITY_TEX_SLOT, inst_.pipelines.utility_tx);
|
||||
/* TODO(fclem): Remove. Binded to get the camera data,
|
||||
/* TODO(fclem): Remove. Bind to get the camera data,
|
||||
* but there should be no view dependent behavior during capture. */
|
||||
inst_.bind_uniform_data(&surface_ps_);
|
||||
}
|
||||
|
||||
@@ -121,8 +121,8 @@ bool VelocityModule::step_object_sync(Object *ob,
|
||||
ObjectKey &object_key,
|
||||
ResourceHandle resource_handle,
|
||||
int /*IDRecalcFlag*/ recalc,
|
||||
ModifierData *modifier_data /*= nullptr*/,
|
||||
ParticleSystem *particle_sys /*= nullptr*/)
|
||||
ModifierData *modifier_data /*=nullptr*/,
|
||||
ParticleSystem *particle_sys /*=nullptr*/)
|
||||
{
|
||||
bool has_motion = object_has_velocity(ob) || (recalc & ID_RECALC_TRANSFORM);
|
||||
/* NOTE: Fragile. This will only work with 1 frame of lag since we can't record every geometry
|
||||
|
||||
@@ -155,7 +155,7 @@ void VolumeModule::begin_sync()
|
||||
void VolumeModule::sync_object(Object *ob,
|
||||
ObjectHandle & /*ob_handle*/,
|
||||
ResourceHandle res_handle,
|
||||
MaterialPass *material_pass /*= nullptr*/)
|
||||
MaterialPass *material_pass /*=nullptr*/)
|
||||
{
|
||||
float3 size = math::to_scale(float4x4(ob->object_to_world));
|
||||
/* Check if any of the axes have 0 length. (see #69070) */
|
||||
|
||||
+1
-1
@@ -283,7 +283,7 @@ DofSample dof_amend_history(DofNeighborhoodMinMax bbox, DofSample history, DofSa
|
||||
/* More responsive. */
|
||||
history.color = clamp(history.color, bbox.min.color, bbox.max.color);
|
||||
#endif
|
||||
/* Clamp CoC to reduce convergence time. Otherwise the result is laggy. */
|
||||
/* Clamp CoC to reduce convergence time. Otherwise the result lags. */
|
||||
history.coc = clamp(history.coc, bbox.min.coc, bbox.max.coc);
|
||||
|
||||
return history;
|
||||
|
||||
@@ -45,7 +45,7 @@ vec2 octahedral_uv_to_layer_texture_coords(vec2 octahedral_uv,
|
||||
ReflectionProbeData probe_data,
|
||||
vec2 texel_size)
|
||||
{
|
||||
/* Fix artifacts near edges. Proved one texel on each side.*/
|
||||
/* Fix artifacts near edges. Proved one texel on each side. */
|
||||
octahedral_uv = octahedral_uv * (1.0 - 2.0 * REFLECTION_PROBE_BORDER_SIZE * texel_size) +
|
||||
REFLECTION_PROBE_BORDER_SIZE * texel_size + 0.5 * texel_size;
|
||||
|
||||
|
||||
@@ -70,8 +70,8 @@ vec4 reflection_probe_eval(ClosureReflection reflection,
|
||||
/* Clamped brightness. */
|
||||
/* For artistic freedom this should be read from the scene/reflection probe.
|
||||
* Note: EEVEE-legacy read the firefly_factor from gi_glossy_clamp.
|
||||
* Note: Firefly removal should be moved to a different shader and also take SSR into
|
||||
* account.*/
|
||||
* Note: Firefly removal should be moved to a different shader and also take SSR into account.
|
||||
*/
|
||||
float luma = max(1e-8, max_v3(l_col));
|
||||
const float firefly_factor = 1e16;
|
||||
l_col.rgb *= 1.0 - max(0.0, luma - firefly_factor) / luma;
|
||||
|
||||
@@ -197,8 +197,8 @@ GPU_SHADER_CREATE_INFO(eevee_lightprobe_data)
|
||||
.uniform_buf(IRRADIANCE_GRID_BUF_SLOT,
|
||||
"IrradianceGridData",
|
||||
"grids_infos_buf[IRRADIANCE_GRID_MAX]")
|
||||
/* NOTE: Use uint instead of IrradianceBrickPacked because Metal needs to know the exact
|
||||
* type.*/
|
||||
/* NOTE: Use uint instead of IrradianceBrickPacked because Metal needs to know the exact type.
|
||||
*/
|
||||
.storage_buf(IRRADIANCE_BRICK_BUF_SLOT, Qualifier::READ, "uint", "bricks_infos_buf[]")
|
||||
.sampler(IRRADIANCE_ATLAS_TEX_SLOT, ImageType::FLOAT_3D, "irradiance_atlas_tx");
|
||||
|
||||
|
||||
@@ -97,7 +97,7 @@ class ShaderModule {
|
||||
using ShaderPtr = std::unique_ptr<GPUShader, ShaderDeleter>;
|
||||
|
||||
/** Shared shader module across all engine instances. */
|
||||
static ShaderModule *g_shader_modules[2 /*Selection Instance*/][2 /*Clipping Enabled*/];
|
||||
static ShaderModule *g_shader_modules[2 /* Selection Instance. */][2 /* Clipping Enabled. */];
|
||||
|
||||
const SelectionType selection_type_;
|
||||
/** TODO: Support clipping. This global state should be set by the overlay::Instance and switch
|
||||
|
||||
+4
-4
@@ -169,26 +169,26 @@ void main()
|
||||
output_vert(vec2(0.0), inner_color, world_pos[1], ndc_pos[1]);
|
||||
break;
|
||||
}
|
||||
/* Bottom outline left point*/
|
||||
/* Bottom outline left point. */
|
||||
case 14:
|
||||
case 15:
|
||||
case 18: {
|
||||
output_vert(-offset, outer_color, world_pos[0], ndc_pos[0]);
|
||||
break;
|
||||
}
|
||||
/* Bottom outline right point*/
|
||||
/* Bottom outline right point. */
|
||||
case 17:
|
||||
case 19:
|
||||
case 22: {
|
||||
output_vert(-offset, outer_color, world_pos[1], ndc_pos[1]);
|
||||
break;
|
||||
}
|
||||
/* Bottom transparent border left*/
|
||||
/* Bottom transparent border left. */
|
||||
case 20:
|
||||
case 21: {
|
||||
output_vert(offset * -2.0, vec4(colorActiveSpline.rgb, 0.0), world_pos[0], ndc_pos[0]);
|
||||
}
|
||||
/* Bottom transparent border right*/
|
||||
/* Bottom transparent border right. */
|
||||
case 23: {
|
||||
output_vert(offset * -2.0, vec4(colorActiveSpline.rgb, 0.0), world_pos[1], ndc_pos[1]);
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@ GPU_SHADER_INTERFACE_INFO(workbench_shadow_iface, "vData")
|
||||
.smooth(Type::VEC4, "frontPosition")
|
||||
.smooth(Type::VEC4, "backPosition");
|
||||
GPU_SHADER_INTERFACE_INFO(workbench_shadow_flat_iface, "vData_flat")
|
||||
.flat(Type::VEC3, "light_direction_os"); /*Workbench Next*/
|
||||
.flat(Type::VEC3, "light_direction_os"); /* Workbench Next. */
|
||||
|
||||
/* `workbench_shadow_vert.glsl` only used by geometry shader path.
|
||||
* Vertex output iface not needed by non-geometry shader variants,
|
||||
|
||||
@@ -305,12 +305,12 @@ ShadowPass::~ShadowPass()
|
||||
}
|
||||
}
|
||||
|
||||
PassMain::Sub *&ShadowPass::get_pass_ptr(PassType type, bool manifold, bool cap /*= false*/)
|
||||
PassMain::Sub *&ShadowPass::get_pass_ptr(PassType type, bool manifold, bool cap /*=false*/)
|
||||
{
|
||||
return passes_[type][manifold][cap];
|
||||
}
|
||||
|
||||
GPUShader *ShadowPass::get_shader(bool depth_pass, bool manifold, bool cap /*= false*/)
|
||||
GPUShader *ShadowPass::get_shader(bool depth_pass, bool manifold, bool cap /*=false*/)
|
||||
{
|
||||
GPUShader *&shader = shaders_[depth_pass][manifold][cap];
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
namespace blender::workbench {
|
||||
|
||||
void SceneState::init(Object *camera_ob /*= nullptr*/)
|
||||
void SceneState::init(Object *camera_ob /*=nullptr*/)
|
||||
{
|
||||
bool reset_taa = reset_taa_next_sample;
|
||||
reset_taa_next_sample = false;
|
||||
|
||||
@@ -247,8 +247,7 @@ static void grease_pencil_geom_batch_ensure(GreasePencil &grease_pencil, int cfr
|
||||
|
||||
total_points_num += curves.points_num();
|
||||
|
||||
/* One vertex is stored before and after as padding. Cyclic strokes have one extra
|
||||
* vertex.*/
|
||||
/* One vertex is stored before and after as padding. Cyclic strokes have one extra vertex. */
|
||||
total_verts_num += curves.points_num() + num_cyclic + curves.curves_num() * 2;
|
||||
total_triangles_num += (curves.points_num() + num_cyclic) * 2;
|
||||
total_triangles_num += drawing->triangles().size();
|
||||
|
||||
@@ -294,7 +294,7 @@ float get_homogenous_z_offset(float vs_z, float hs_w, float vs_offset)
|
||||
#define DRW_BASE_FROM_SET (1 << 3)
|
||||
#define DRW_BASE_ACTIVE (1 << 4)
|
||||
|
||||
/* Wire Color Types, matching eV3DShadingColorType.*/
|
||||
/* Wire Color Types, matching eV3DShadingColorType. */
|
||||
#define V3D_SHADING_SINGLE_COLOR 2
|
||||
#define V3D_SHADING_OBJECT_COLOR 4
|
||||
#define V3D_SHADING_RANDOM_COLOR 1
|
||||
|
||||
@@ -138,7 +138,7 @@ static bool actedit_get_context(bAnimContext *ac, SpaceAction *saction)
|
||||
switch (saction->mode) {
|
||||
case SACTCONT_ACTION: /* 'Action Editor' */
|
||||
/* if not pinned, sync with active object */
|
||||
if (/*saction->pin == 0*/ true) {
|
||||
if (/* `saction->pin == 0` */ true) {
|
||||
if (ac->obact && ac->obact->adt) {
|
||||
saction->action = ac->obact->adt->action;
|
||||
}
|
||||
@@ -158,7 +158,7 @@ static bool actedit_get_context(bAnimContext *ac, SpaceAction *saction)
|
||||
ac->data = actedit_get_shapekeys(ac);
|
||||
|
||||
/* if not pinned, sync with active object */
|
||||
if (/*saction->pin == 0*/ true) {
|
||||
if (/* `saction->pin == 0` */ true) {
|
||||
Key *key = (Key *)ac->data;
|
||||
|
||||
if (key && key->adt) {
|
||||
|
||||
@@ -47,7 +47,7 @@ static CLG_LogRef LOG = {"ed.undo.armature"};
|
||||
/* Utility functions. */
|
||||
|
||||
/**
|
||||
* Remaps editbone collection membership.
|
||||
* Remaps edit-bone collection membership.
|
||||
*
|
||||
* This is intended to be used in combination with ED_armature_ebone_listbase_copy()
|
||||
* and ANIM_bonecoll_listbase_copy() to make a full duplicate of both edit
|
||||
|
||||
@@ -3720,7 +3720,7 @@ static void subdividenurb(Object *obedit, View3D *v3d, int number_cuts)
|
||||
}
|
||||
}
|
||||
|
||||
if (sel) { /* V ! */
|
||||
if (sel) { /* V direction. */
|
||||
bpn = bpnew = static_cast<BPoint *>(
|
||||
MEM_mallocN((sel + nu->pntsv) * nu->pntsu * sizeof(BPoint), "subdivideNurb4"));
|
||||
bp = nu->bp;
|
||||
@@ -3768,7 +3768,7 @@ static void subdividenurb(Object *obedit, View3D *v3d, int number_cuts)
|
||||
}
|
||||
}
|
||||
|
||||
if (sel) { /* U ! */
|
||||
if (sel) { /* U direction. */
|
||||
/* Inserting U points is sort of 'default' Flat curves only get
|
||||
* U points inserted in them. */
|
||||
bpn = bpnew = static_cast<BPoint *>(
|
||||
|
||||
@@ -508,7 +508,7 @@ static void gpencil_brush_angle(bGPdata *gpd, Brush *brush, tGPspoint *pt, const
|
||||
/* angle vector of the brush with full thickness */
|
||||
const float v0[2] = {cos(angle), sin(angle)};
|
||||
|
||||
/* Apply to first point (only if there are 2 points because before no data to do it ) */
|
||||
/* Apply to first point (only if there are 2 points because before no data to do it). */
|
||||
if (gpd->runtime.sbuffer_used == 1) {
|
||||
sub_v2_v2v2(mvec, mval, (pt - 1)->m_xy);
|
||||
normalize_v2(mvec);
|
||||
|
||||
@@ -61,7 +61,7 @@ bool mirror_selected_frames(GreasePencil &grease_pencil,
|
||||
const eEditKeyframes_Mirror mode);
|
||||
|
||||
/* Creates duplicate frames for each selected frame in the layer. The duplicates are stored in the
|
||||
* LayerTransformData structure of the layer runtime data. This function also unselects the
|
||||
* LayerTransformData structure of the layer runtime data. This function also deselects the
|
||||
* selected frames, while keeping the duplicates selected. */
|
||||
bool duplicate_selected_frames(GreasePencil &grease_pencil, bke::greasepencil::Layer &layer);
|
||||
|
||||
|
||||
@@ -3341,7 +3341,8 @@ void ui_but_range_set_soft(uiBut *but)
|
||||
if (but->rnaprop) {
|
||||
const PropertyType type = RNA_property_type(but->rnaprop);
|
||||
const PropertySubType subtype = RNA_property_subtype(but->rnaprop);
|
||||
double softmin, softmax /*, step, precision*/;
|
||||
double softmin, softmax;
|
||||
// double step, precision; /* UNUSED. */
|
||||
double value_min;
|
||||
double value_max;
|
||||
|
||||
|
||||
@@ -279,10 +279,10 @@ static void ui_selectcontext_apply(bContext *C,
|
||||
|
||||
/**
|
||||
* Ideally we would only respond to events which are expected to be used for multi button editing
|
||||
* (additionally checking if this is a mouse[wheel] or returnkey event to avoid the ALT conflict
|
||||
* (additionally checking if this is a mouse[wheel] or return-key event to avoid the ALT conflict
|
||||
* with button array pasting, see #108096, but unfortunately wheel events are not part of
|
||||
* win->eventstate with modifiers held down. Instead, the conflict is avoided by specifically
|
||||
* filtering out CTRL ALT V in ui_apply_but(). */
|
||||
* `win->eventstate` with modifiers held down. Instead, the conflict is avoided by specifically
|
||||
* filtering out CTRL ALT V in #ui_apply_but(). */
|
||||
# define IS_ALLSELECT_EVENT(event) (((event)->modifier & KM_ALT) != 0)
|
||||
|
||||
/** just show a tinted color so users know its activated */
|
||||
@@ -2268,9 +2268,9 @@ static void ui_apply_but(
|
||||
{
|
||||
wmWindow *win = CTX_wm_window(C);
|
||||
wmEvent *event = win->eventstate;
|
||||
/* May have been enabled before activating, dont do for array pasting. */
|
||||
/* May have been enabled before activating, don't do for array pasting. */
|
||||
if (data->select_others.is_enabled || IS_ALLSELECT_EVENT(event)) {
|
||||
/* See comment for IS_ALLSELECT_EVENT why this needs to be filtered here. */
|
||||
/* See comment for #IS_ALLSELECT_EVENT why this needs to be filtered here. */
|
||||
const bool is_array_paste = (event->val == KM_PRESS) &&
|
||||
(event->modifier & (KM_CTRL | KM_OSKEY)) &&
|
||||
(event->modifier & KM_SHIFT) == 0 && (event->type == EVT_VKEY);
|
||||
|
||||
@@ -1957,7 +1957,7 @@ static void widget_draw_text(const uiFontStyle *fstyle,
|
||||
}
|
||||
}
|
||||
|
||||
/* If not editing and indeterminate, show dash.*/
|
||||
/* If not editing and indeterminate, show dash. */
|
||||
if (but->drawflag & UI_BUT_INDETERMINATE && !but->editstr &&
|
||||
ELEM(but->type,
|
||||
UI_BTYPE_MENU,
|
||||
|
||||
@@ -593,7 +593,7 @@ static int add_hook_object(const bContext *C,
|
||||
|
||||
/* matrix calculus */
|
||||
/* vert x (obmat x hook->world_to_object) x hook->object_to_world x ob->world_to_object */
|
||||
/* (parentinv ) */
|
||||
/* (parentinv) */
|
||||
Scene *scene_eval = DEG_get_evaluated_scene(depsgraph);
|
||||
Object *object_eval = DEG_get_evaluated_object(depsgraph, ob);
|
||||
BKE_object_transform_copy(object_eval, ob);
|
||||
|
||||
@@ -993,7 +993,7 @@ static void region_azone_edge(const ScrArea *area, AZone *az, const ARegion *reg
|
||||
* the content, so move it a bit. */
|
||||
const int overlap_padding =
|
||||
/* Header-like regions are usually thin and there's not much padding around them,
|
||||
* applying an offset would make the edge overlap buttons.*/
|
||||
* applying an offset would make the edge overlap buttons. */
|
||||
(!RGN_TYPE_IS_HEADER_ANY(region->regiontype) &&
|
||||
/* Is the region background transparent? */
|
||||
region->overlap && region_background_is_transparent(area, region)) ?
|
||||
|
||||
@@ -118,11 +118,11 @@ struct EraseOperationExecutor {
|
||||
float factor = -1.0f;
|
||||
|
||||
/* True if the intersection corresponds to an inside/outside transition with respect to the
|
||||
* circle, false if it corresponds to an outside/inside transition . */
|
||||
* circle, false if it corresponds to an outside/inside transition. */
|
||||
bool inside_outside_intersection = false;
|
||||
|
||||
/* An intersection is considered valid if it lies inside of the segment, i.e. if its factor is
|
||||
* in (0,1)*/
|
||||
/* An intersection is considered valid if it lies inside of the segment, i.e.
|
||||
* if its factor is in (0,1). */
|
||||
bool is_valid() const
|
||||
{
|
||||
return IN_RANGE(factor, 0.0f, 1.0f);
|
||||
|
||||
@@ -1611,7 +1611,7 @@ int paint_stroke_modal(bContext *C, wmOperator *op, const wmEvent *event, PaintS
|
||||
redraw = true;
|
||||
}
|
||||
|
||||
/* Don't update the paint cursor in INBETWEEN_MOUSEMOVE events.*/
|
||||
/* Don't update the paint cursor in #INBETWEEN_MOUSEMOVE events. */
|
||||
if (event->type != INBETWEEN_MOUSEMOVE) {
|
||||
wmWindow *window = CTX_wm_window(C);
|
||||
ARegion *region = CTX_wm_region(C);
|
||||
|
||||
@@ -164,7 +164,8 @@ SeqCollection *all_strips_from_context(bContext *C);
|
||||
*/
|
||||
SeqCollection *selected_strips_from_context(bContext *C);
|
||||
|
||||
/* Externs. */
|
||||
/* Externals. */
|
||||
|
||||
extern EnumPropertyItem sequencer_prop_effect_types[];
|
||||
extern EnumPropertyItem prop_side_types[];
|
||||
|
||||
|
||||
@@ -121,7 +121,7 @@ static void preview_startjob(void *data, bool *stop, bool *do_update, float *pro
|
||||
|
||||
while (true) {
|
||||
/* Wait until there's either a new audio job to process or one of the previously submitted jobs
|
||||
* is done.*/
|
||||
* is done. */
|
||||
BLI_mutex_lock(pj->mutex);
|
||||
|
||||
while (BLI_listbase_is_empty(&pj->previews) && pj->processed != pj->total) {
|
||||
|
||||
@@ -83,7 +83,7 @@ typedef struct StripDrawContext {
|
||||
Sequence *seq;
|
||||
float content_start, content_end, bottom, top; /* Strip boundary in timeline space. */
|
||||
float left_handle, right_handle; /* Position in frames. */
|
||||
float strip_content_top; /* Position in timeline space deliminates content and text overlay. */
|
||||
float strip_content_top; /* Position in timeline space without content and text overlay. */
|
||||
float handle_width; /* Width of strip handle in frames. */
|
||||
float strip_length;
|
||||
|
||||
|
||||
@@ -89,7 +89,7 @@ static const Span<const char *> text_format_py_literals_builtinfunc(
|
||||
text_format_py_literals_builtinfunc_data,
|
||||
ARRAY_SIZE(text_format_py_literals_builtinfunc_data));
|
||||
|
||||
/** Python special name.*/
|
||||
/** Python special name. */
|
||||
static const char *text_format_py_literals_specialvar_data[]{
|
||||
/* Force single column, sorted list. */
|
||||
/* clang-format off */
|
||||
@@ -100,7 +100,7 @@ static const char *text_format_py_literals_specialvar_data[]{
|
||||
static const Span<const char *> text_format_py_literals_specialvar(
|
||||
text_format_py_literals_specialvar_data, ARRAY_SIZE(text_format_py_literals_specialvar_data));
|
||||
|
||||
/** Python bool values.*/
|
||||
/** Python bool values. */
|
||||
static const char *text_format_py_literals_bool_data[]{
|
||||
/* Force single column, sorted list. */
|
||||
/* clang-format off */
|
||||
|
||||
@@ -271,8 +271,8 @@ static void nlatrack_truncate_temporary_tracks(bAnimContext *ac)
|
||||
|
||||
/** Remove bottom tracks that weren't necessary. */
|
||||
LISTBASE_FOREACH_MUTABLE (NlaTrack *, track, nla_tracks) {
|
||||
/** Library override tracks are the first N tracks. They're never temporary and determine
|
||||
* where we start removing temporaries.*/
|
||||
/* Library override tracks are the first N tracks. They're never temporary and determine
|
||||
* where we start removing temporaries. */
|
||||
if ((track->flag & NLATRACK_OVERRIDELIBRARY_LOCAL) == 0) {
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -990,7 +990,7 @@ static PFace *p_face_add(ParamHandle *handle)
|
||||
|
||||
/* allocate */
|
||||
f = (PFace *)BLI_memarena_alloc(handle->arena, sizeof(*f));
|
||||
f->flag = 0; /* init ! */
|
||||
f->flag = 0;
|
||||
|
||||
PEdge *e1 = (PEdge *)BLI_memarena_calloc(handle->arena, sizeof(*e1));
|
||||
PEdge *e2 = (PEdge *)BLI_memarena_calloc(handle->arena, sizeof(*e2));
|
||||
|
||||
@@ -644,7 +644,7 @@ void GPU_offscreen_unbind(GPUOffScreen *offscreen, bool restore);
|
||||
* Read the whole color texture of the a #GPUOffScreen.
|
||||
* The pixel data will be converted to \a data_format but it needs to be compatible with the
|
||||
* attachment type.
|
||||
* IMPORTANT: \a r_data must be big enough for all pixels in \a data_format .
|
||||
* IMPORTANT: \a r_data must be big enough for all pixels in \a data_format.
|
||||
*/
|
||||
void GPU_offscreen_read_color(GPUOffScreen *offscreen, eGPUDataFormat data_format, void *r_data);
|
||||
/**
|
||||
|
||||
@@ -767,7 +767,7 @@ void GPU_texture_update_sub(GPUTexture *texture,
|
||||
* Update the content of a texture's specific mip-map level.
|
||||
* \a data_format is the format of the \a pixels . It needs to be compatible with the internal
|
||||
* texture storage.
|
||||
* The \a data should be the size of the entire \a mip_level .
|
||||
* The \a data should be the size of the entire \a mip_level.
|
||||
*/
|
||||
void GPU_texture_update_mipmap(GPUTexture *texture,
|
||||
int mip_level,
|
||||
@@ -927,12 +927,12 @@ void GPU_texture_swizzle_set(GPUTexture *texture, const char swizzle[4]);
|
||||
int GPU_texture_dimensions(const GPUTexture *texture);
|
||||
|
||||
/**
|
||||
* Return the width of \a tex .
|
||||
* Return the width of \a tex.
|
||||
*/
|
||||
int GPU_texture_width(const GPUTexture *texture);
|
||||
|
||||
/**
|
||||
* Return the height of \a tex . Correspond to number of layers for 1D array texture.
|
||||
* Return the height of \a tex. Correspond to number of layers for 1D array texture.
|
||||
*/
|
||||
int GPU_texture_height(const GPUTexture *texture);
|
||||
|
||||
@@ -943,7 +943,7 @@ int GPU_texture_height(const GPUTexture *texture);
|
||||
int GPU_texture_depth(const GPUTexture *texture);
|
||||
|
||||
/**
|
||||
* Return the number of layers of \a tex . Return 1 if the texture is not layered.
|
||||
* Return the number of layers of \a tex. Return 1 if the texture is not layered.
|
||||
*/
|
||||
int GPU_texture_layer_count(const GPUTexture *texture);
|
||||
|
||||
@@ -953,12 +953,12 @@ int GPU_texture_layer_count(const GPUTexture *texture);
|
||||
int GPU_texture_mip_count(const GPUTexture *texture);
|
||||
|
||||
/**
|
||||
* Return the texture format of \a tex .
|
||||
* Return the texture format of \a tex.
|
||||
*/
|
||||
eGPUTextureFormat GPU_texture_format(const GPUTexture *texture);
|
||||
|
||||
/**
|
||||
* Return the usage flags of \a tex .
|
||||
* Return the usage flags of \a tex.
|
||||
*/
|
||||
eGPUTextureUsage GPU_texture_usage(const GPUTexture *texture);
|
||||
|
||||
@@ -1100,7 +1100,7 @@ void *GPU_pixel_buffer_map(GPUPixelBuffer *pixel_buf);
|
||||
void GPU_pixel_buffer_unmap(GPUPixelBuffer *pixel_buf);
|
||||
|
||||
/**
|
||||
* Return size in bytes of the \a pix_buf .
|
||||
* Return size in bytes of the \a pix_buf.
|
||||
*/
|
||||
size_t GPU_pixel_buffer_size(GPUPixelBuffer *pixel_buf);
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
* (see "7.6.2.2 Standard Uniform Block Layout" from the OpenGL spec for more info about std140
|
||||
* layout)
|
||||
* Rule of thumb: Padding to 16bytes, don't use vec3, don't use arrays of anything that is not vec4
|
||||
* aligned .
|
||||
* aligned.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
@@ -181,7 +181,7 @@ typedef struct GPUNodeGraph {
|
||||
/* The list of layer attributes. */
|
||||
ListBase layer_attrs;
|
||||
|
||||
/** Set of all the GLSL lib code blocks . */
|
||||
/** Set of all the GLSL lib code blocks. */
|
||||
GSet *used_libraries;
|
||||
} GPUNodeGraph;
|
||||
|
||||
|
||||
@@ -327,7 +327,7 @@ void MTLBufferPool::update_memory_pools()
|
||||
{
|
||||
deletion_time_threshold_s = 4;
|
||||
}
|
||||
/* Spare pool memory >= 512MB.*/
|
||||
/* Spare pool memory >= 512MB. */
|
||||
else if (allocations_in_pool_ >= MEMORY_SIZE_512MB) {
|
||||
deletion_time_threshold_s = 15;
|
||||
}
|
||||
|
||||
@@ -223,7 +223,7 @@ struct MSLBufferBlock {
|
||||
std::string name;
|
||||
ShaderStage stage;
|
||||
bool is_array;
|
||||
/* Resource index in buffer*/
|
||||
/* Resource index in buffer. */
|
||||
uint slot;
|
||||
uint location;
|
||||
shader::Qualifier qualifiers;
|
||||
|
||||
@@ -691,7 +691,7 @@ VkImageType to_vk_image_type(const eGPUTextureType type)
|
||||
return VK_IMAGE_TYPE_3D;
|
||||
|
||||
case GPU_TEXTURE_ARRAY:
|
||||
/* GPU_TEXTURE_ARRAY should always be used together with 1D, 2D, or CUBE*/
|
||||
/* GPU_TEXTURE_ARRAY should always be used together with 1D, 2D, or CUBE. */
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -721,7 +721,7 @@ VkImageViewType to_vk_image_view_type(const eGPUTextureType type, const eImageVi
|
||||
VK_IMAGE_VIEW_TYPE_CUBE_ARRAY;
|
||||
|
||||
case GPU_TEXTURE_ARRAY:
|
||||
/* GPU_TEXTURE_ARRAY should always be used together with 1D, 2D, or CUBE*/
|
||||
/* GPU_TEXTURE_ARRAY should always be used together with 1D, 2D, or CUBE. */
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
@@ -211,7 +211,7 @@ void VKVertexAttributeObject::fill_unused_bindings(const VKShaderInterface &inte
|
||||
continue;
|
||||
}
|
||||
|
||||
/* Use dummy binding...*/
|
||||
/* Use dummy binding. */
|
||||
shader::Type attribute_type = interface.get_attribute_type(location);
|
||||
const uint32_t num_locations = to_binding_location_len(attribute_type);
|
||||
for (const uint32_t location_offset : IndexRange(num_locations)) {
|
||||
|
||||
@@ -113,7 +113,7 @@ enum {
|
||||
/** #Light::mode */
|
||||
enum {
|
||||
LA_SHADOW = 1 << 0,
|
||||
// LA_HALO = 1 << 1, /* Deprecated. .*/
|
||||
// LA_HALO = 1 << 1, /* Deprecated. */
|
||||
// LA_LAYER = 1 << 2, /* Deprecated. */
|
||||
// LA_QUAD = 1 << 3, /* Deprecated. */
|
||||
// LA_NEG = 1 << 4, /* Deprecated. */
|
||||
|
||||
@@ -368,7 +368,7 @@ typedef struct bNode {
|
||||
|
||||
char _pad1[2];
|
||||
|
||||
/** Used for some builtin nodes that store properties but don't have a storage struct . */
|
||||
/** Used for some builtin nodes that store properties but don't have a storage struct. */
|
||||
int16_t custom1, custom2;
|
||||
float custom3, custom4;
|
||||
|
||||
|
||||
@@ -1953,7 +1953,7 @@ static void rna_def_armature(BlenderRNA *brna)
|
||||
RNA_def_property_enum_funcs(prop,
|
||||
"rna_Armature_relation_line_position_get",
|
||||
"rna_Armature_relation_line_position_set",
|
||||
/*item function*/ nullptr);
|
||||
nullptr);
|
||||
RNA_define_verify_sdna(true); /* Restore default. */
|
||||
|
||||
prop = RNA_def_property(srna, "show_names", PROP_BOOLEAN, PROP_NONE);
|
||||
|
||||
@@ -3841,13 +3841,13 @@ static void rna_def_sound_equalizer_modifier(BlenderRNA *brna)
|
||||
RNA_def_struct_sdna(srna, "SoundEqualizerModifierData");
|
||||
RNA_def_struct_ui_text(srna, "SoundEqualizerModifier", "Equalize audio");
|
||||
|
||||
/* Sound Equalizers*/
|
||||
/* Sound Equalizers. */
|
||||
prop = RNA_def_property(srna, "graphics", PROP_COLLECTION, PROP_NONE);
|
||||
RNA_def_property_struct_type(prop, "EQCurveMappingData");
|
||||
RNA_def_property_ui_text(
|
||||
prop, "Graphical definition equalization", "Graphical definition equalization");
|
||||
|
||||
/* add band*/
|
||||
/* Add band. */
|
||||
func = RNA_def_function(srna, "new_graphic", "rna_Sequence_SoundEqualizer_Curve_add");
|
||||
RNA_def_function_flag(func, FUNC_USE_CONTEXT);
|
||||
RNA_def_function_ui_description(func, "Add a new EQ band");
|
||||
|
||||
@@ -100,7 +100,7 @@ static void meshcache_do(MeshCacheModifierData *mcmd,
|
||||
float time;
|
||||
|
||||
/* -------------------------------------------------------------------- */
|
||||
/* Interpret Time (the reading functions also do some of this ) */
|
||||
/* Interpret Time (the reading functions also do some of this). */
|
||||
if (mcmd->play_mode == MOD_MESHCACHE_PLAY_CFEA) {
|
||||
const float ctime = BKE_scene_ctime_get(scene);
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
static PyTypeObject BPyUnitsSystemsType;
|
||||
static PyTypeObject BPyUnitsCategoriesType;
|
||||
|
||||
/* XXX Maybe better as externs of BKE_unit.h ? */
|
||||
/* XXX: Maybe better as `extern` of `BKE_unit.h` ? */
|
||||
static const char *bpyunits_usystem_items[] = {
|
||||
"NONE",
|
||||
"METRIC",
|
||||
|
||||
@@ -170,7 +170,7 @@ EQCurveMappingData *SEQ_sound_equalizer_add(SoundEqualizerModifierData *semd,
|
||||
/* It's the same as BKE_curvemapping_add , but changing the name */
|
||||
eqcmd = MEM_cnew<EQCurveMappingData>("Equalizer");
|
||||
BKE_curvemapping_set_defaults(&eqcmd->curve_mapping,
|
||||
1, /* tot*/
|
||||
1, /* Total. */
|
||||
minX,
|
||||
-SOUND_EQUALIZER_DEFAULT_MAX_DB, /* Min x, y */
|
||||
maxX,
|
||||
|
||||
@@ -102,7 +102,7 @@ def round_float_32(f: float) -> float:
|
||||
|
||||
def report_humanly_readable_difference(a: Any, b: Any) -> Optional[str]:
|
||||
"""
|
||||
Compare strings, return None whrn they match,
|
||||
Compare strings, return None when they match,
|
||||
otherwise a humanly readable difference message.
|
||||
"""
|
||||
import unittest
|
||||
@@ -269,7 +269,7 @@ def main() -> None:
|
||||
|
||||
argv = (sys.argv[sys.argv.index("--") + 1:] if "--" in sys.argv else [])
|
||||
|
||||
# Use `argparse` for full arg parsing, for now this is enough.
|
||||
# Use `argparse` for full argument parsing, for now this is enough.
|
||||
relaxed = "--relaxed" in argv
|
||||
|
||||
# NOTE(@ideasman42): Disable add-on items as they may cause differences in the key-map.
|
||||
|
||||
@@ -464,6 +464,7 @@ dict_custom = {
|
||||
"unselected",
|
||||
"unsetting",
|
||||
"unshadowed",
|
||||
"unshared",
|
||||
"unsharp",
|
||||
"unsqueezed",
|
||||
"unstretch",
|
||||
|
||||
Reference in New Issue
Block a user