Cleanup: incorrect spelling of 'manhattan'
This commit is contained in:
parent
2a52c2d001
commit
9d412a92f5
@ -109,7 +109,7 @@ const UserDef U_default = {
|
||||
.keyconfigstr = "blender",
|
||||
.undosteps = 32,
|
||||
.undomemory = 0,
|
||||
.gp_manhattendist = 1,
|
||||
.gp_manhattandist = 1,
|
||||
.gp_euclideandist = 2,
|
||||
.gp_eraser = 25,
|
||||
.gp_settings = 0,
|
||||
|
@ -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 */
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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);
|
||||
|
@ -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. */
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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)
|
||||
|
||||
|
@ -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;
|
||||
};
|
||||
|
@ -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];
|
||||
|
@ -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)
|
||||
|
@ -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",
|
||||
|
Loading…
Reference in New Issue
Block a user