diff options
author | Campbell Barton <ideasman42@gmail.com> | 2020-07-28 15:06:44 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2020-07-28 15:06:44 +0300 |
commit | 9d412a92f50972dc41b1dc3b86c48c8889316ff4 (patch) | |
tree | bc73984180a7e560cd7f82b72772d6b232c339e8 /source | |
parent | 2a52c2d001b8d8e7c6865fea4d226a9e2f8ced8a (diff) |
Cleanup: incorrect spelling of 'manhattan'
Diffstat (limited to 'source')
10 files changed, 21 insertions, 20 deletions
diff --git a/source/blender/blenloader/intern/versioning_userdef.c b/source/blender/blenloader/intern/versioning_userdef.c index 50e3b375166..e2dc27d7e88 100644 --- a/source/blender/blenloader/intern/versioning_userdef.c +++ b/source/blender/blenloader/intern/versioning_userdef.c @@ -366,7 +366,7 @@ void BLO_version_defaults_userpref_blend(Main *bmain, UserDef *userdef) } if (!USER_VERSION_ATLEAST(250, 0)) { /* adjust grease-pencil distances */ - userdef->gp_manhattendist = 1; + userdef->gp_manhattandist = 1; userdef->gp_euclideandist = 2; /* adjust default interpolation for new IPO-curves */ diff --git a/source/blender/compositor/operations/COM_InpaintOperation.cpp b/source/blender/compositor/operations/COM_InpaintOperation.cpp index 0967984899d..b8329b1cb29 100644 --- a/source/blender/compositor/operations/COM_InpaintOperation.cpp +++ b/source/blender/compositor/operations/COM_InpaintOperation.cpp @@ -34,7 +34,7 @@ InpaintSimpleOperation::InpaintSimpleOperation() : NodeOperation() this->setComplex(true); this->m_inputImageProgram = NULL; this->m_pixelorder = NULL; - this->m_manhatten_distance = NULL; + this->m_manhattan_distance = NULL; this->m_cached_buffer = NULL; this->m_cached_buffer_ready = false; } @@ -43,7 +43,7 @@ void InpaintSimpleOperation::initExecution() this->m_inputImageProgram = this->getInputSocketReader(0); this->m_pixelorder = NULL; - this->m_manhatten_distance = NULL; + this->m_manhattan_distance = NULL; this->m_cached_buffer = NULL; this->m_cached_buffer_ready = false; @@ -85,7 +85,7 @@ int InpaintSimpleOperation::mdist(int x, int y) ASSERT_XY_RANGE(x, y); - return this->m_manhatten_distance[y * width + x]; + return this->m_manhattan_distance[y * width + x]; } bool InpaintSimpleOperation::next_pixel(int &x, int &y, int &curr, int iters) @@ -108,11 +108,11 @@ bool InpaintSimpleOperation::next_pixel(int &x, int &y, int &curr, int iters) return true; } -void InpaintSimpleOperation::calc_manhatten_distance() +void InpaintSimpleOperation::calc_manhattan_distance() { int width = this->getWidth(); int height = this->getHeight(); - short *m = this->m_manhatten_distance = (short *)MEM_mallocN(sizeof(short) * width * height, + short *m = this->m_manhattan_distance = (short *)MEM_mallocN(sizeof(short) * width * height, __func__); int *offsets; @@ -223,7 +223,7 @@ void *InpaintSimpleOperation::initializeTileData(rcti *rect) MemoryBuffer *buf = (MemoryBuffer *)this->m_inputImageProgram->initializeTileData(rect); this->m_cached_buffer = (float *)MEM_dupallocN(buf->getBuffer()); - this->calc_manhatten_distance(); + this->calc_manhattan_distance(); int curr = 0; int x, y; @@ -258,9 +258,9 @@ void InpaintSimpleOperation::deinitExecution() this->m_pixelorder = NULL; } - if (this->m_manhatten_distance) { - MEM_freeN(this->m_manhatten_distance); - this->m_manhatten_distance = NULL; + if (this->m_manhattan_distance) { + MEM_freeN(this->m_manhattan_distance); + this->m_manhattan_distance = NULL; } this->m_cached_buffer_ready = false; } diff --git a/source/blender/compositor/operations/COM_InpaintOperation.h b/source/blender/compositor/operations/COM_InpaintOperation.h index 2fef7c590ea..76c1ae81b28 100644 --- a/source/blender/compositor/operations/COM_InpaintOperation.h +++ b/source/blender/compositor/operations/COM_InpaintOperation.h @@ -34,7 +34,7 @@ class InpaintSimpleOperation : public NodeOperation { int *m_pixelorder; int m_area_size; - short *m_manhatten_distance; + short *m_manhattan_distance; public: InpaintSimpleOperation(); @@ -65,7 +65,7 @@ class InpaintSimpleOperation : public NodeOperation { rcti *output); private: - void calc_manhatten_distance(); + void calc_manhattan_distance(); void clamp_xy(int &x, int &y); float *get_pixel(int x, int y); int mdist(int x, int y); diff --git a/source/blender/draw/intern/draw_select_buffer.c b/source/blender/draw/intern/draw_select_buffer.c index 84c8d0f861f..ee5561e1e38 100644 --- a/source/blender/draw/intern/draw_select_buffer.c +++ b/source/blender/draw/intern/draw_select_buffer.c @@ -395,7 +395,7 @@ uint DRW_select_buffer_find_nearest_to_point(struct Depsgraph *depsgraph, int center_x = width / 2; int center_y = height / 2; - /* Manhatten distance in keeping with other screen-based selection. */ + /* Manhattan distance in keeping with other screen-based selection. */ *dist = (uint)(abs(hit_x - center_x) + abs(hit_y - center_y)); /* Indices start at 1 here. */ diff --git a/source/blender/editors/gpencil/annotate_paint.c b/source/blender/editors/gpencil/annotate_paint.c index 6f700f6c4b8..3aec1db2587 100644 --- a/source/blender/editors/gpencil/annotate_paint.c +++ b/source/blender/editors/gpencil/annotate_paint.c @@ -200,7 +200,7 @@ typedef struct tGPsdata { /* Macros for accessing sensitivity thresholds... */ /* minimum number of pixels mouse should move before new point created */ -#define MIN_MANHATTEN_PX (U.gp_manhattendist) +#define MIN_MANHATTAN_PX (U.gp_manhattandist) /* minimum length of new segment before new point can be added */ #define MIN_EUCLIDEAN_PX (U.gp_euclideandist) @@ -297,7 +297,7 @@ static bool annotation_stroke_filtermval(tGPsdata *p, const float mval[2], float return false; } - if ((dx > MIN_MANHATTEN_PX) && (dy > MIN_MANHATTEN_PX)) { + if ((dx > MIN_MANHATTAN_PX) && (dy > MIN_MANHATTAN_PX)) { return true; } diff --git a/source/blender/editors/gpencil/gpencil_paint.c b/source/blender/editors/gpencil/gpencil_paint.c index d3ff7f8a4d2..b61baf3d0b1 100644 --- a/source/blender/editors/gpencil/gpencil_paint.c +++ b/source/blender/editors/gpencil/gpencil_paint.c @@ -268,7 +268,7 @@ typedef struct tGPsdata { /* Macros for accessing sensitivity thresholds... */ /* minimum number of pixels mouse should move before new point created */ -#define MIN_MANHATTEN_PX (U.gp_manhattendist) +#define MIN_MANHATTEN_PX (U.gp_manhattandist) /* minimum length of new segment before new point can be added */ #define MIN_EUCLIDEAN_PX (U.gp_euclideandist) diff --git a/source/blender/editors/mesh/editmesh_select.c b/source/blender/editors/mesh/editmesh_select.c index 1ea25353598..d2e9b57e950 100644 --- a/source/blender/editors/mesh/editmesh_select.c +++ b/source/blender/editors/mesh/editmesh_select.c @@ -205,7 +205,7 @@ static BMElem *edbm_select_id_bm_elem_get(Base **bases, const uint sel_id, uint /* -------------------------------------------------------------------- */ /** \name Find Nearest Vert/Edge/Face * - * \note Screen-space manhatten distances are used here, + * \note Screen-space manhattan distances are used here, * since its faster and good enough for the purpose of selection. * * \note \a dist_bias is used so we can bias against selected items. @@ -415,7 +415,7 @@ struct NearestEdgeUserData_Hit { int index; BMEdge *edge; - /* edges only, un-biased manhatten distance to which ever edge we pick + /* edges only, un-biased manhattan distance to which ever edge we pick * (not used for choosing) */ float dist_center; }; diff --git a/source/blender/makesdna/DNA_userdef_types.h b/source/blender/makesdna/DNA_userdef_types.h index e6f6ce1e208..d50c0055499 100644 --- a/source/blender/makesdna/DNA_userdef_types.h +++ b/source/blender/makesdna/DNA_userdef_types.h @@ -733,7 +733,7 @@ typedef struct UserDef { char _pad1[2]; int undomemory; float gpu_viewport_quality DNA_DEPRECATED; - short gp_manhattendist, gp_euclideandist, gp_eraser; + short gp_manhattandist, gp_euclideandist, gp_eraser; /** #eGP_UserdefSettings. */ short gp_settings; char _pad13[4]; diff --git a/source/blender/makesdna/intern/dna_rename_defs.h b/source/blender/makesdna/intern/dna_rename_defs.h index 49fa4f797bb..a73fc747f84 100644 --- a/source/blender/makesdna/intern/dna_rename_defs.h +++ b/source/blender/makesdna/intern/dna_rename_defs.h @@ -91,6 +91,7 @@ DNA_STRUCT_RENAME_ELEM(ParticleSettings, dupliweights, instance_weights) DNA_STRUCT_RENAME_ELEM(Text, name, filepath) DNA_STRUCT_RENAME_ELEM(ThemeSpace, scrubbing_background, time_scrub_background) DNA_STRUCT_RENAME_ELEM(ThemeSpace, show_back_grad, background_type) +DNA_STRUCT_RENAME_ELEM(UserDef, gp_manhattendist, gp_manhattandist) DNA_STRUCT_RENAME_ELEM(VFont, name, filepath) DNA_STRUCT_RENAME_ELEM(View3D, far, clip_end) DNA_STRUCT_RENAME_ELEM(View3D, near, clip_start) diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c index 00bbff5cf51..bfc020afb41 100644 --- a/source/blender/makesrna/intern/rna_userdef.c +++ b/source/blender/makesrna/intern/rna_userdef.c @@ -4988,7 +4988,7 @@ static void rna_def_userdef_edit(BlenderRNA *brna) /* grease pencil */ prop = RNA_def_property(srna, "grease_pencil_manhattan_distance", PROP_INT, PROP_PIXEL); - RNA_def_property_int_sdna(prop, NULL, "gp_manhattendist"); + RNA_def_property_int_sdna(prop, NULL, "gp_manhattandist"); RNA_def_property_range(prop, 0, 100); RNA_def_property_ui_text(prop, "Grease Pencil Manhattan Distance", |