Cleanup: spelling in comments

This commit is contained in:
Campbell Barton 2021-07-16 11:45:51 +10:00
parent d3c454d66c
commit 09b89da349
7 changed files with 16 additions and 15 deletions

View File

@ -324,8 +324,9 @@ static void action_flip_pchan(Object *ob_arm,
/* The rest pose having an X-axis that is not mapping to a left/right direction (so aligned
* with the Y or Z axis) creates issues when flipping the pose. Instead of a negative scale on
* the X-axis, it turns into a 180 degree rotation over the Y-axis. This has only been observed
* with non-flippable bones, hence the check for `pchan_flip`. */
* the X-axis, it turns into a 180 degree rotation over the Y-axis.
* This has only been observed with bones that can't be flipped,
* hence the check for `pchan_flip`. */
const float unit_x[4] = {1.0f, 0.0f, 0.0f, 0.0f};
const bool is_problematic = pchan_flip == NULL &&
fabsf(dot_v4v4(pchan->bone->arm_mat[0], unit_x)) <= 1e-6;

View File

@ -82,13 +82,13 @@ bool ED_asset_can_make_single_from_context(const bContext *C)
}
/* TODO better place? */
/* TODO What about the setter and the itemf? */
/* TODO What about the setter and the `itemf` callback? */
#include "BKE_preferences.h"
#include "DNA_asset_types.h"
#include "DNA_userdef_types.h"
int ED_asset_library_reference_to_enum_value(const AssetLibraryReference *library)
{
/* Simple case: Predefined repo, just set the value. */
/* Simple case: Predefined repository, just set the value. */
if (library->type < ASSET_LIBRARY_CUSTOM) {
return library->type;
}
@ -109,7 +109,7 @@ AssetLibraryReference ED_asset_library_reference_from_enum_value(int value)
{
AssetLibraryReference library;
/* Simple case: Predefined repo, just set the value. */
/* Simple case: Predefined repository, just set the value. */
if (value < ASSET_LIBRARY_CUSTOM) {
library.type = value;
library.custom_library_index = -1;

View File

@ -60,7 +60,7 @@ class AssetLibraryReferenceWrapper {
const AssetLibraryReference reference_;
public:
/* Intentionally not `explicit`, allow implicit conversion for convienience. Might have to be
/* Intentionally not `explicit`, allow implicit conversion for convenience. Might have to be
* NOLINT */
AssetLibraryReferenceWrapper(const AssetLibraryReference &reference);
~AssetLibraryReferenceWrapper() = default;
@ -348,7 +348,7 @@ void AssetList::tagMainDataDirty() const
void AssetList::remapID(ID * /*id_old*/, ID * /*id_new*/) const
{
/* Trigger full refetch of the file list if main data was changed, don't even attempt remap
/* Trigger full re-fetch of the file list if main data was changed, don't even attempt remap
* pointers. We could give file list types a id-remap callback, but it's probably not worth it.
* Refreshing local file lists is relatively cheap. */
tagMainDataDirty();
@ -605,7 +605,7 @@ int ED_assetlist_size(const AssetLibraryReference *library_reference)
}
/**
* Tag all asset lists in the storage that show main data as needing an update (refetch).
* Tag all asset lists in the storage that show main data as needing an update (re-fetch).
*
* This only tags the data. If the asset list is visible on screen, the space is still responsible
* for ensuring the necessary redraw. It can use #ED_assetlist_listen() to check if the asset-list

View File

@ -770,7 +770,7 @@ static uiAfterFunc *ui_afterfunc_new(void)
* \param context_but: A button from which to get the context from (`uiBut.context`) for the
* operator execution.
*
* \note Ownership over \a properties is moved here. The after-func owns it now.
* \note Ownership over \a properties is moved here. The #uiAfterFunc owns it now.
* \note Can only call while handling buttons.
*/
static void ui_handle_afterfunc_add_operator_ex(wmOperatorType *ot,
@ -1157,7 +1157,7 @@ static void ui_apply_but_ROW(bContext *C, uiBlock *block, uiBut *but, uiHandleBu
}
/**
* \note Ownership of \a properties is moved here. The after-func owns it now.
* \note Ownership of \a properties is moved here. The #uiAfterFunc owns it now.
*
* \param context_but: The button to use context from when calling or polling the operator.
*
@ -9458,10 +9458,10 @@ static int ui_list_handle_click_drag(bContext *C,
activate = true;
}
}
/* KM_CLICK is only sent after an uncaught release event, so the forground button gets all
/* #KM_CLICK is only sent after an uncaught release event, so the foreground button gets all
* regular events (including mouse presses to start dragging) and this part only kicks in if it
* hasn't handled the release event. Note that if there's no overlaid button, the row selects
* on the press event already via regular UI_BTYPE_LISTROW handling. */
* on the press event already via regular #UI_BTYPE_LISTROW handling. */
else if ((event->type == LEFTMOUSE) && (event->val == KM_CLICK)) {
activate = true;
}

View File

@ -852,7 +852,7 @@ static bool ui_view2d_cur_ensure_rect_in_view(View2D *v2d, const rctf *rect)
void UI_but_ensure_in_view(const bContext *C, ARegion *region, const uiBut *but)
{
View2D *v2d = &region->v2d;
/* Unitialized view or region that doesn't use View2D. */
/* Uninitialized view or region that doesn't use View2D. */
if ((v2d->flag & V2D_IS_INIT) == 0) {
return;
}

View File

@ -279,7 +279,7 @@ typedef struct uiListDyn {
int resize;
int resize_prev;
/* Allocated custom data. Free'ed together with the uiList (and when re-assigning). */
/** Allocated custom data. Freed together with the #uiList (and when re-assigning). */
void *customdata;
/* Filtering data. */

View File

@ -154,7 +154,7 @@ void WM_uilisttype_free(void)
/**
* The "full" list-ID is an internal name used for storing and identifying a list. It is built like
* this:
* "{uiListType.idname}_{list_id}", wherby "list_id" is an optional parameter passed to
* "{uiListType.idname}_{list_id}", whereby "list_id" is an optional parameter passed to
* `UILayout.template_list()`. If it is not set, the full list-ID is just "{uiListType.idname}_".
*
* Note that whenever the Python API refers to the list-ID, it's the short, "non-full" one it