Cleanup: spelling in comments

This commit is contained in:
Campbell Barton 2021-10-06 09:28:00 +11:00
parent 7b5835c793
commit 6d2b486e43
11 changed files with 38 additions and 37 deletions

View File

@ -249,7 +249,7 @@ static void rtc_filter_func_thick_curve(const RTCFilterFunctionNArguments *args)
const RTCRay *ray = (RTCRay *)args->ray;
RTCHit *hit = (RTCHit *)args->hit;
/* Always ignore backfacing intersections. */
/* Always ignore back-facing intersections. */
if (dot(make_float3(ray->dir_x, ray->dir_y, ray->dir_z),
make_float3(hit->Ng_x, hit->Ng_y, hit->Ng_z)) > 0.0f) {
*args->valid = 0;
@ -262,7 +262,7 @@ static void rtc_filter_occluded_func_thick_curve(const RTCFilterFunctionNArgumen
const RTCRay *ray = (RTCRay *)args->ray;
RTCHit *hit = (RTCHit *)args->hit;
/* Always ignore backfacing intersections. */
/* Always ignore back-facing intersections. */
if (dot(make_float3(ray->dir_x, ray->dir_y, ray->dir_z),
make_float3(hit->Ng_x, hit->Ng_y, hit->Ng_z)) > 0.0f) {
*args->valid = 0;

View File

@ -157,7 +157,7 @@ void Session::run_main_render_loop()
continue;
}
/* Stop rendering if error happenned during scene update or other step of preparing scene
/* Stop rendering if error happened during scene update or other step of preparing scene
* for render. */
if (device->have_error()) {
progress.set_error(device->error_message());
@ -179,7 +179,7 @@ void Session::run_main_render_loop()
/* update status and timing */
update_status_time();
/* Stop rendering if error happenned during path tracing. */
/* Stop rendering if error happened during path tracing. */
if (device->have_error()) {
progress.set_error(device->error_message());
break;

View File

@ -253,13 +253,13 @@ bool BKE_image_is_stereo(struct Image *ima);
struct RenderResult *BKE_image_acquire_renderresult(struct Scene *scene, struct Image *ima);
void BKE_image_release_renderresult(struct Scene *scene, struct Image *ima);
/* for multilayer images as well as for singlelayer */
/* For multi-layer images as well as for single-layer. */
bool BKE_image_is_openexr(struct Image *ima);
/* for multiple slot render, call this before render */
/* For multiple slot render, call this before render. */
void BKE_image_backup_render(struct Scene *scene, struct Image *ima, bool free_current_slot);
/* for singlelayer openexr saving */
/* For single-layer OpenEXR saving */
bool BKE_image_save_openexr_multiview(struct Image *ima,
struct ImBuf *ibuf,
const char *filepath,
@ -285,22 +285,22 @@ void BKE_image_packfiles_from_mem(struct ReportList *reports,
char *data,
const size_t data_len);
/* prints memory statistics for images */
/* Prints memory statistics for images. */
void BKE_image_print_memlist(struct Main *bmain);
/* merge source into dest, and free source */
/* Merge source into dest, and free source. */
void BKE_image_merge(struct Main *bmain, struct Image *dest, struct Image *source);
/* scale the image */
/* Scale the image. */
bool BKE_image_scale(struct Image *image, int width, int height);
/* check if texture has alpha (depth=32) */
/* Check if texture has alpha (depth=32). */
bool BKE_image_has_alpha(struct Image *image);
/* check if texture has gpu texture code */
/* Check if texture has GPU texture code. */
bool BKE_image_has_opengl_texture(struct Image *ima);
/* get tile index for tiled images */
/* Get tile index for tiled images. */
void BKE_image_get_tile_label(struct Image *ima,
struct ImageTile *tile,
char *label,
@ -369,10 +369,10 @@ struct ImBuf *BKE_image_get_first_ibuf(struct Image *image);
/* Not to be use directly. */
struct GPUTexture *BKE_image_create_gpu_texture_from_ibuf(struct Image *image, struct ImBuf *ibuf);
/* Get the GPUTexture for a given `Image`.
/* Get the #GPUTexture for a given `Image`.
*
* `iuser` and `ibuf` are mutual exclusive parameters. The caller can pass the `ibuf` when already
* available. It is also required when requesting the GPUTexture for a render result. */
* available. It is also required when requesting the #GPUTexture for a render result. */
struct GPUTexture *BKE_image_get_gpu_texture(struct Image *image,
struct ImageUser *iuser,
struct ImBuf *ibuf);

View File

@ -565,7 +565,7 @@ static void drw_manager_init(DRWManager *dst, GPUViewport *viewport, const int s
drw_viewport_data_reset(dst->vmempool);
if (size == NULL && viewport == NULL) {
/* Avoid division by 0. Engines will either overide this or not use it. */
/* Avoid division by 0. Engines will either override this or not use it. */
dst->size[0] = 1.0f;
dst->size[1] = 1.0f;
}
@ -1335,7 +1335,7 @@ void DRW_notify_view_update(const DRWUpdateContext *update_ctx)
.object_mode = OB_MODE_OBJECT,
};
/* Custom lightweight init to avoid reseting the mempools. */
/* Custom lightweight initialize to avoid resetting the memory-pools. */
DST.viewport = viewport;
DST.vmempool = drw_viewport_data_ensure(DST.viewport);

View File

@ -512,7 +512,7 @@ typedef struct DRWDebugSphere {
typedef struct DRWData {
/** Instance data. */
DRWInstanceDataList *idatalist;
/** Mempools for drawcalls. */
/** Memory-pools for draw-calls. */
struct BLI_memblock *commands;
struct BLI_memblock *commands_small;
struct BLI_memblock *callbuffers;

View File

@ -47,7 +47,7 @@ DRWTexturePool *DRW_texture_pool_create(void)
void DRW_texture_pool_free(DRWTexturePool *pool)
{
/* Reseting the pool twice will effectively free all textures. */
/* Resetting the pool twice will effectively free all textures. */
DRW_texture_pool_reset(pool);
DRW_texture_pool_reset(pool);
delete pool;
@ -86,7 +86,7 @@ GPUTexture *DRW_texture_pool_query(
if (user_bit & handle.users_bits) {
continue;
}
/* If everthing matches reuse the texture. */
/* If everything matches reuse the texture. */
if ((GPU_texture_format(handle.texture) == format) &&
(GPU_texture_width(handle.texture) == width) &&
(GPU_texture_height(handle.texture) == height)) {
@ -137,4 +137,4 @@ void DRW_texture_pool_reset(DRWTexturePool *pool)
pool->handles.remove_and_reorder(i);
}
}
}
}

View File

@ -5262,7 +5262,7 @@ static void do_projectpaint_thread(TaskPool *__restrict UNUSED(pool), void *ph_v
color_f[3] *= ((float)projPixel->mask) * (1.0f / 65535.0f) * brush_alpha;
if (is_floatbuf) {
/* convert to premultipied */
/* Convert to premutliplied. */
mul_v3_fl(color_f, color_f[3]);
IMB_blend_color_float(
projPixel->pixel.f_pt, projPixel->origColor.f_pt, color_f, ps->blend);

View File

@ -1496,14 +1496,15 @@ static void free_anim_ffmpeg(struct anim *anim)
#endif
/* Try to init the anim struct.
* Returns true on success.*/
/**
* Try to initialize the #anim struct.
* Returns true on success.
*/
static bool anim_getnew(struct anim *anim)
{
BLI_assert(anim->curtype == ANIM_NONE);
if (anim == NULL) {
/* Nothing to init. */
/* Nothing to initialize. */
return false;
}

View File

@ -732,16 +732,16 @@ typedef struct wmXrActionData {
eXrActionType type;
/** State. Set appropriately based on type. */
float state[2];
/** State of the other subaction path for bimanual actions. */
/** State of the other sub-action path for bimanual actions. */
float state_other[2];
/** Input threshold for float/vector2f actions. */
float float_threshold;
/** Controller aim pose corresponding to the action's subaction path. */
/** Controller aim pose corresponding to the action's sub-action path. */
float controller_loc[3];
float controller_rot[4];
/** Controller aim pose of the other subaction path for bimanual actions. */
/** Controller aim pose of the other sub-action path for bimanual actions. */
float controller_loc_other[3];
float controller_rot_other[4];
@ -749,14 +749,14 @@ typedef struct wmXrActionData {
struct wmOperatorType *ot;
struct IDProperty *op_properties;
/** Whether bimanual interaction is occuring. */
/** Whether bimanual interaction is occurring. */
bool bimanual;
} wmXrActionData;
#endif
/** Timer flags. */
typedef enum {
/** Do not attempt to free customdata pointer even if non-NULL. */
/** Do not attempt to free custom-data pointer even if non-NULL. */
WM_TIMER_NO_FREE_CUSTOM_DATA = 1 << 0,
} wmTimerFlags;

View File

@ -3465,7 +3465,7 @@ static void wm_event_free_and_remove_from_queue_if_valid(wmEvent *event)
/**
* Special handling for XR events.
*
* Although XR events are added to regular window queues, they are handled in an "offscreen area"
* Although XR events are added to regular window queues, they are handled in an "off-screen area"
* context that is owned entirely by XR runtime data and not tied to a window.
*/
static void wm_event_handle_xrevent(bContext *C,

View File

@ -37,7 +37,7 @@ typedef struct wmXrSessionState {
/** Copy of XrSessionSettings.base_pose_ data to detect changes that need
* resetting to base pose. */
char prev_base_pose_type; /* eXRSessionBasePoseType */
char prev_base_pose_type; /* #eXRSessionBasePoseType */
Object *prev_base_pose_object;
/** Copy of XrSessionSettings.flag created on the last draw call, stored to detect changes. */
int prev_settings_flag;
@ -52,7 +52,7 @@ typedef struct wmXrSessionState {
bool is_view_data_set;
/** Last known controller data. */
ListBase controllers; /* wmXrController */
ListBase controllers; /* #wmXrController */
/** The currently active action set that will be updated on calls to
* wm_xr_session_actions_update(). If NULL, all action sets will be treated as active and
@ -67,14 +67,14 @@ typedef struct wmXrRuntimeData {
* be an invalid reference, i.e. the window may have been closed. */
wmWindow *session_root_win;
/** Offscreen area used for XR events. */
/** Off-screen area used for XR events. */
struct ScrArea *area;
/** Although this struct is internal, RNA gets a handle to this for state information queries. */
wmXrSessionState session_state;
wmXrSessionExitFn exit_fn;
ListBase actionmaps; /* XrActionMap */
ListBase actionmaps; /* #XrActionMap */
short actactionmap;
short selactionmap;
} wmXrRuntimeData;
@ -87,7 +87,7 @@ typedef struct wmXrViewportPair {
typedef struct {
/** Off-screen buffers/viewports for each view. */
ListBase viewports; /* wmXrViewportPair */
ListBase viewports; /* #wmXrViewportPair */
} wmXrSurfaceData;
typedef struct wmXrDrawData {