spelling cleanup
This commit is contained in:
parent
e56f714000
commit
4f19c1a995
@ -173,7 +173,7 @@ void BOP_triangulateC(BOP_Mesh* mesh, BOP_Faces* faces, BOP_Face* face, BOP_Inde
|
||||
|
||||
/**
|
||||
* Triangulates the face (v1,v2,v3) in five new faces by two inner points (v4,v5), where
|
||||
* v1 v4 v5 defines the nice triangle and v4 v5 v2 v3 defines the quad to be tesselated.
|
||||
* v1 v4 v5 defines the nice triangle and v4 v5 v2 v3 defines the quad to be tessellated.
|
||||
* @param mesh mesh that contains the faces, edges and vertices
|
||||
* @param faces set of faces that contains face and will contains new faces
|
||||
* @param face input face to be triangulate
|
||||
|
@ -16,7 +16,7 @@ set(SRC
|
||||
buffers.cpp
|
||||
camera.cpp
|
||||
film.cpp
|
||||
# film_response.cpp # XXX, why isnt this in?
|
||||
# film_response.cpp # XXX, why isn't this in?
|
||||
filter.cpp
|
||||
graph.cpp
|
||||
image.cpp
|
||||
@ -41,7 +41,7 @@ set(SRC_HEADERS
|
||||
buffers.h
|
||||
camera.h
|
||||
film.h
|
||||
# film_response.h # XXX, why isnt this in?
|
||||
# film_response.h # XXX, why isn't this in?
|
||||
filter.h
|
||||
graph.h
|
||||
image.h
|
||||
|
@ -65,7 +65,7 @@
|
||||
// #define DEBUG_MEMCOUNTER
|
||||
|
||||
#ifdef DEBUG_MEMCOUNTER
|
||||
#define DEBUG_MEMCOUNTER_ERROR_VAL 0 /* set this to the value that isnt being freed */
|
||||
#define DEBUG_MEMCOUNTER_ERROR_VAL 0 /* set this to the value that isn't being freed */
|
||||
static int _mallocn_count = 0;
|
||||
|
||||
/* breakpoint here */
|
||||
|
@ -185,6 +185,6 @@ void BLF_dir_free(char **dirs, int count);
|
||||
|
||||
/* XXX, bad design */
|
||||
extern int blf_mono_font;
|
||||
extern int blf_mono_font_render; /* dont mess drawing with render threads. */
|
||||
extern int blf_mono_font_render; /* don't mess drawing with render threads. */
|
||||
|
||||
#endif /* __BLF_API_H__ */
|
||||
|
@ -260,7 +260,7 @@ void blf_font_buffer(FontBLF *font, const char *str)
|
||||
}
|
||||
|
||||
if ((chx + g->width) >= 0 && chx < font->bw && (pen_y + g->height) >= 0 && pen_y < font->bh) {
|
||||
/* dont draw beyond the buffer bounds */
|
||||
/* don't draw beyond the buffer bounds */
|
||||
int width_clip = g->width;
|
||||
int height_clip = g->height;
|
||||
int yb_start = g->pitch < 0 ? 0 : g->height-1;
|
||||
|
@ -98,7 +98,7 @@ struct PBVH;
|
||||
#define SUB_ELEMS_FACE 50
|
||||
|
||||
/*
|
||||
* Note: all mface interfaces now officially operate on tesselated data.
|
||||
* Note: all mface interfaces now officially operate on tessellated data.
|
||||
* Also, the mface origindex layer indexes mpolys, not mfaces.
|
||||
*/
|
||||
|
||||
@ -174,7 +174,7 @@ struct DerivedMesh {
|
||||
int (*getNumLoops)(DerivedMesh *dm);
|
||||
int (*getNumPolys)(DerivedMesh *dm);
|
||||
|
||||
/* copy a single vert/edge/tesselated face from the derived mesh into
|
||||
/* copy a single vert/edge/tessellated face from the derived mesh into
|
||||
* *{vert/edge/face}_r. note that the current implementation
|
||||
* of this function can be quite slow, iterating over all
|
||||
* elements (editmesh)
|
||||
|
@ -76,7 +76,7 @@ struct DerivedMesh *CDDM_copy_from_tessface(struct DerivedMesh *dm);
|
||||
|
||||
/* creates a CDDerivedMesh with the same layer stack configuration as the
|
||||
* given DerivedMesh and containing the requested numbers of elements.
|
||||
* elements are initialised to all zeros
|
||||
* elements are initialized to all zeros
|
||||
*/
|
||||
struct DerivedMesh *CDDM_from_template(struct DerivedMesh *source,
|
||||
int numVerts, int numEdges, int numFaces,
|
||||
@ -103,7 +103,7 @@ void CDDM_calc_normals_tessface(struct DerivedMesh *dm);
|
||||
|
||||
/* calculates edges for a CDDerivedMesh (from face data)
|
||||
* this completely replaces the current edge data in the DerivedMesh
|
||||
* builds edges from the tesselated face data.
|
||||
* builds edges from the tessellated face data.
|
||||
*/
|
||||
void CDDM_calc_edges_tessface(struct DerivedMesh *dm);
|
||||
|
||||
|
@ -73,10 +73,11 @@ extern const CustomDataMask CD_MASK_FACECORNERS;
|
||||
|
||||
#define CD_TYPE_AS_MASK(_type) (CustomDataMask)((CustomDataMask)1 << (CustomDataMask)(_type))
|
||||
|
||||
/* Checks if the layer at physical offset layern (in data->layers) support math
|
||||
/**
|
||||
* Checks if the layer at physical offset \a layer_n (in data->layers) support math
|
||||
* the below operations.
|
||||
*/
|
||||
int CustomData_layer_has_math(struct CustomData *data, int layern);
|
||||
int CustomData_layer_has_math(struct CustomData *data, int layer_n);
|
||||
|
||||
/* copies the "value" (e.g. mloopuv uv or mloopcol colors) from one block to
|
||||
* another, while not overwriting anything else (e.g. flags). probably only
|
||||
|
@ -109,7 +109,7 @@ void object_boundbox_flag(struct Object *ob, int flag, int set);
|
||||
void minmax_object(struct Object *ob, float min[3], float max[3]);
|
||||
int minmax_object_duplis(struct Scene *scene, struct Object *ob, float min[3], float max[3]);
|
||||
|
||||
/* sometimes min-max isnt enough, we need to loop over each point */
|
||||
/* sometimes min-max isn't enough, we need to loop over each point */
|
||||
void BKE_object_foreach_display_point(
|
||||
struct Object *ob, float obmat[4][4],
|
||||
void (*func_cb)(const float[3], void *), void *user_data);
|
||||
|
@ -90,7 +90,7 @@ void space_transform_invert(const struct SpaceTransform *data, float *co);
|
||||
* - Normal projection
|
||||
*
|
||||
* ShrinkwrapCalcData encapsulates all needed data for shrinkwrap functions.
|
||||
* (So that you dont have to pass an enormous amount of arguments to functions)
|
||||
* (So that you don't have to pass an enormous amount of arguments to functions)
|
||||
*/
|
||||
|
||||
struct Object;
|
||||
|
@ -1946,8 +1946,8 @@ static void editbmesh_calc_modifiers(Scene *scene, Object *ob, BMEditMesh *em, D
|
||||
|
||||
/* --- */
|
||||
/* BMESH_ONLY, ensure tessface's used for drawing,
|
||||
* but dont recalculate if the last modifier in the stack gives us tessfaces
|
||||
* check if the derived meshes are DM_TYPE_EDITBMESH before calling, this isnt essential
|
||||
* but don't recalculate if the last modifier in the stack gives us tessfaces
|
||||
* check if the derived meshes are DM_TYPE_EDITBMESH before calling, this isn't essential
|
||||
* but quiets annoying error messages since tessfaces wont be created. */
|
||||
if ((*final_r)->type != DM_TYPE_EDITBMESH) {
|
||||
DM_ensure_tessface(*final_r);
|
||||
|
@ -1054,7 +1054,7 @@ short action_get_item_transforms (bAction *act, Object *ob, bPoseChannel *pchan,
|
||||
/* Copy the data from the action-pose (src) into the pose */
|
||||
/* both args are assumed to be valid */
|
||||
/* exported to game engine */
|
||||
/* Note! this assumes both poses are aligned, this isnt always true when dealing with user poses */
|
||||
/* Note! this assumes both poses are aligned, this isn't always true when dealing with user poses */
|
||||
void extract_pose_from_pose(bPose *pose, const bPose *src)
|
||||
{
|
||||
const bPoseChannel *schan;
|
||||
|
@ -373,7 +373,7 @@ int BKE_read_file(bContext *C, const char *filepath, ReportList *reports)
|
||||
BlendFileData *bfd;
|
||||
int retval= BKE_READ_FILE_OK;
|
||||
|
||||
if(strstr(filepath, BLENDER_STARTUP_FILE)==NULL) /* dont print user-pref loading */
|
||||
if(strstr(filepath, BLENDER_STARTUP_FILE)==NULL) /* don't print user-pref loading */
|
||||
printf("read blend: %s\n", filepath);
|
||||
|
||||
bfd= BLO_read_from_file(filepath, reports);
|
||||
|
@ -545,7 +545,7 @@ BVHTree* bvhtree_from_mesh_faces(BVHTreeFromMesh *data, DerivedMesh *mesh, float
|
||||
|
||||
/* Insert BMesh-tessellation triangles into the bvh tree, unless they are hidden
|
||||
* and/or selected. Even if the faces themselves are not selected for the snapped
|
||||
* transform, having a vertex selected means the face (and thus it's tesselated
|
||||
* transform, having a vertex selected means the face (and thus it's tessellated
|
||||
* triangles) will be moving and will not be a good snap targets.*/
|
||||
for (i = 0; i < em->tottri; i++) {
|
||||
BMLoop **tri = em->looptris[i];
|
||||
@ -554,12 +554,12 @@ BVHTree* bvhtree_from_mesh_faces(BVHTreeFromMesh *data, DerivedMesh *mesh, float
|
||||
BMIter iter;
|
||||
int insert;
|
||||
|
||||
/* Each loop of the triangle points back to the BMFace it was tesselated from.
|
||||
/* Each loop of the triangle points back to the BMFace it was tessellated from.
|
||||
* All three should point to the same face, so just use the face from the first
|
||||
* loop.*/
|
||||
f = tri[0]->f;
|
||||
|
||||
/* If the looptris is ordered such that all triangles tesselated from a single
|
||||
/* If the looptris is ordered such that all triangles tessellated from a single
|
||||
* faces are consecutive elements in the array, then we could speed up the tests
|
||||
* below by using the insert value from the previous iteration.*/
|
||||
|
||||
@ -567,14 +567,14 @@ BVHTree* bvhtree_from_mesh_faces(BVHTreeFromMesh *data, DerivedMesh *mesh, float
|
||||
insert = 1;
|
||||
|
||||
if (BM_elem_flag_test(f, BM_ELEM_SELECT) || BM_elem_flag_test(f, BM_ELEM_HIDDEN)) {
|
||||
/* Don't insert triangles tesselated from faces that are hidden
|
||||
/* Don't insert triangles tessellated from faces that are hidden
|
||||
* or selected*/
|
||||
insert = 0;
|
||||
}
|
||||
else {
|
||||
BM_ITER(v, &iter, em->bm, BM_VERTS_OF_FACE, f) {
|
||||
if (BM_elem_flag_test(v, BM_ELEM_SELECT)) {
|
||||
/* Don't insert triangles tesselated from faces that have
|
||||
/* Don't insert triangles tessellated from faces that have
|
||||
* any selected verts.*/
|
||||
insert = 0;
|
||||
}
|
||||
|
@ -465,7 +465,7 @@ static void camera_to_frame_view_cb(const float co[3], void *user_data)
|
||||
data->tot++;
|
||||
}
|
||||
|
||||
/* dont move the camera, just yield the fit location */
|
||||
/* don't move the camera, just yield the fit location */
|
||||
/* only valid for perspective cameras */
|
||||
int camera_view_frame_fit_to_scene(Scene *scene, struct View3D *v3d, Object *camera_ob, float r_co[3])
|
||||
{
|
||||
|
@ -1193,7 +1193,7 @@ static void cdDM_drawMappedFacesGLSL(DerivedMesh *dm,
|
||||
}
|
||||
}
|
||||
else {
|
||||
/* if the buffer was set, dont use it again.
|
||||
/* if the buffer was set, don't use it again.
|
||||
* prevdraw was assumed true but didnt run so set to false - [#21036] */
|
||||
/* prevdraw= 0; */ /* UNUSED */
|
||||
buffer= NULL;
|
||||
|
@ -4575,7 +4575,7 @@ void copy_constraints (ListBase *dst, const ListBase *src, int do_extern)
|
||||
if (cti->copy_data)
|
||||
cti->copy_data(con, srccon);
|
||||
|
||||
/* for proxies we dont want to make extern */
|
||||
/* for proxies we don't want to make extern */
|
||||
if (do_extern) {
|
||||
/* go over used ID-links for this constraint to ensure that they are valid for proxies */
|
||||
if (cti->id_looper)
|
||||
|
@ -2313,9 +2313,9 @@ void *CustomData_bmesh_get_layer_n(const CustomData *data, void *block, int n)
|
||||
return (char *)block + data->layers[n].offset;
|
||||
}
|
||||
|
||||
int CustomData_layer_has_math(struct CustomData *data, int layern)
|
||||
int CustomData_layer_has_math(struct CustomData *data, int layer_n)
|
||||
{
|
||||
const LayerTypeInfo *typeInfo = layerType_getInfo(data->layers[layern].type);
|
||||
const LayerTypeInfo *typeInfo = layerType_getInfo(data->layers[layer_n].type);
|
||||
|
||||
if (typeInfo->equal && typeInfo->add && typeInfo->multiply &&
|
||||
typeInfo->initminmax && typeInfo->dominmax) return 1;
|
||||
|
@ -416,7 +416,7 @@ void defgroup_unique_name(bDeformGroup *dg, Object *ob)
|
||||
|
||||
/* finds the best possible flipped name. For renaming; check for unique names afterwards */
|
||||
/* if strip_number: removes number extensions
|
||||
* note: dont use sizeof() for 'name' or 'from_name' */
|
||||
* note: don't use sizeof() for 'name' or 'from_name' */
|
||||
void flip_side_name(char name[MAX_VGROUP_NAME], const char from_name[MAX_VGROUP_NAME], int strip_number)
|
||||
{
|
||||
int len;
|
||||
@ -540,8 +540,8 @@ float defvert_find_weight(const struct MDeformVert *dvert, const int defgroup)
|
||||
}
|
||||
|
||||
/* take care with this the rationale is:
|
||||
* - if the object has no vertex group. act like vertex group isnt set and return 1.0,
|
||||
* - if the vertex group exists but the 'defgroup' isnt found on this vertex, _still_ return 0.0
|
||||
* - if the object has no vertex group. act like vertex group isn't set and return 1.0,
|
||||
* - if the vertex group exists but the 'defgroup' isn't found on this vertex, _still_ return 0.0
|
||||
*
|
||||
* This is a bit confusing, just saves some checks from the caller.
|
||||
*/
|
||||
@ -645,7 +645,7 @@ void defvert_remove_group(MDeformVert *dvert, MDeformWeight *dw)
|
||||
if (dvert->totweight) {
|
||||
dw_new = MEM_mallocN(sizeof(MDeformWeight)*(dvert->totweight), __func__);
|
||||
if (dvert->dw) {
|
||||
#if 1 /* since we dont care about order, swap this with the last, save a memcpy */
|
||||
#if 1 /* since we don't care about order, swap this with the last, save a memcpy */
|
||||
if (i != dvert->totweight) {
|
||||
dvert->dw[i]= dvert->dw[dvert->totweight];
|
||||
}
|
||||
|
@ -708,7 +708,7 @@ static ModifierData *curve_get_tesselate_point(Scene *scene, Object *ob, int for
|
||||
preTesselatePoint = md;
|
||||
|
||||
/* this modifiers are moving point of tessellation automatically
|
||||
* (some of them even can't be applied on tesselated curve), set flag
|
||||
* (some of them even can't be applied on tessellated curve), set flag
|
||||
* for incformation button in modifier's header */
|
||||
md->mode |= eModifierMode_ApplyOnSpline;
|
||||
} else if(md->mode&eModifierMode_ApplyOnSpline) {
|
||||
|
@ -472,7 +472,7 @@ static int subframe_updateObject(Scene *scene, Object *ob, int flags, float fram
|
||||
DynamicPaintModifierData *pmd = (DynamicPaintModifierData *)modifiers_findByType(ob, eModifierType_DynamicPaint);
|
||||
bConstraint *con;
|
||||
|
||||
/* if other is dynamic paint canvas, dont update */
|
||||
/* if other is dynamic paint canvas, don't update */
|
||||
if (pmd && pmd->canvas)
|
||||
return 1;
|
||||
|
||||
@ -1506,7 +1506,7 @@ int dynamicPaint_resetSurface(DynamicPaintSurface *surface)
|
||||
/* free existing data */
|
||||
if (surface->data) dynamicPaint_freeSurfaceData(surface);
|
||||
|
||||
/* dont reallocate for image sequence types. they get handled only on bake */
|
||||
/* don't reallocate for image sequence types. they get handled only on bake */
|
||||
if (surface->format == MOD_DPAINT_SURFACE_F_IMAGESEQ) return 1;
|
||||
if (numOfPoints < 1) return 0;
|
||||
|
||||
@ -2331,7 +2331,7 @@ int dynamicPaint_createUVSurface(DynamicPaintSurface *surface)
|
||||
int index = tx+w*ty;
|
||||
PaintUVPoint *tPoint = (&tempPoints[index]);
|
||||
|
||||
/* If point isnt't on canvas mesh */
|
||||
/* If point isn't't on canvas mesh */
|
||||
if (tPoint->face_index == -1) {
|
||||
int u_min, u_max, v_min, v_max;
|
||||
int u,v, ind;
|
||||
@ -2635,7 +2635,7 @@ void dynamicPaint_outputSurfaceImage(DynamicPaintSurface *surface, char* filenam
|
||||
}
|
||||
}
|
||||
|
||||
/* Set output format, png in case exr isnt supported */
|
||||
/* Set output format, png in case exr isn't supported */
|
||||
ibuf->ftype= PNG|95;
|
||||
#ifdef WITH_OPENEXR
|
||||
if (format == R_IMF_IMTYPE_OPENEXR) { /* OpenEXR 32-bit float */
|
||||
@ -4931,7 +4931,7 @@ int dynamicPaint_calculateFrame(DynamicPaintSurface *surface, Scene *scene, Obje
|
||||
/* update bake data */
|
||||
dynamicPaint_generateBakeData(surface, scene, cObject);
|
||||
|
||||
/* dont do substeps for first frame */
|
||||
/* don't do substeps for first frame */
|
||||
if (surface->substeps && (frame != surface->start_frame)) {
|
||||
int st;
|
||||
timescale = 1.0f / (surface->substeps+1);
|
||||
|
@ -787,7 +787,7 @@ static void do_texture_effector(EffectorCache *eff, EffectorData *efd, EffectedP
|
||||
tex_co[2] += nabla;
|
||||
multitex_ext(eff->pd->tex, tex_co, NULL, NULL, 0, result+3);
|
||||
|
||||
if(mode == PFIELD_TEX_GRAD || !hasrgb) { /* if we dont have rgb fall back to grad */
|
||||
if(mode == PFIELD_TEX_GRAD || !hasrgb) { /* if we don't have rgb fall back to grad */
|
||||
force[0] = (result[0].tin - result[1].tin) * strength;
|
||||
force[1] = (result[0].tin - result[2].tin) * strength;
|
||||
force[2] = (result[0].tin - result[3].tin) * strength;
|
||||
|
@ -841,7 +841,7 @@ void testhandles_fcurve (FCurve *fcu, const short use_handle)
|
||||
for (a=0, bezt=fcu->bezt; a < fcu->totvert; a++, bezt++) {
|
||||
short flag= 0;
|
||||
|
||||
/* flag is initialised as selection status
|
||||
/* flag is initialized as selection status
|
||||
* of beztriple control-points (labelled 0,1,2)
|
||||
*/
|
||||
if (bezt->f2 & SELECT) flag |= (1<<1); // == 2
|
||||
@ -1446,7 +1446,7 @@ void driver_change_variable_type (DriverVar *dvar, int type)
|
||||
/* store the flags */
|
||||
dtar->flag = flags;
|
||||
|
||||
/* object ID types only, or idtype not yet initialised*/
|
||||
/* object ID types only, or idtype not yet initialized*/
|
||||
if ((flags & DTAR_FLAG_ID_OB_ONLY) || (dtar->idtype == 0))
|
||||
dtar->idtype= ID_OB;
|
||||
}
|
||||
|
@ -515,7 +515,7 @@ static FModifierTypeInfo FMI_ENVELOPE = {
|
||||
* NOTE: this needs to be at the start of the stack to be of use, as it needs to know the extents of the
|
||||
* keyframes/sample-data.
|
||||
*
|
||||
* Possible TODO - store length of cycle information that can be initialised from the extents of the
|
||||
* Possible TODO - store length of cycle information that can be initialized from the extents of the
|
||||
* keyframes/sample-data, and adjusted as appropriate.
|
||||
*/
|
||||
|
||||
|
@ -344,9 +344,9 @@ void group_handle_recalc_and_update(Scene *scene, Object *UNUSED(parent), Group
|
||||
{
|
||||
GroupObject *go;
|
||||
|
||||
#if 0 /* warning, isnt clearing the recalc flag on the object which causes it to run all the time,
|
||||
#if 0 /* warning, isn't clearing the recalc flag on the object which causes it to run all the time,
|
||||
* not just on frame change.
|
||||
* This isnt working because the animation data is only re-evalyated on frame change so commenting for now
|
||||
* This isn't working because the animation data is only re-evalyated on frame change so commenting for now
|
||||
* but when its enabled at some point it will need to be changed so as not to update so much - campbell */
|
||||
|
||||
/* if animated group... */
|
||||
|
@ -91,7 +91,7 @@ static int get_next_free_id(void)
|
||||
while (BLI_ghash_lookup(gIcons, SET_INT_IN_POINTER(startId)) && startId>=gFirstIconId)
|
||||
startId++;
|
||||
|
||||
/* if we found a suitable one that isnt used yet, return it */
|
||||
/* if we found a suitable one that isn't used yet, return it */
|
||||
if (startId>=gFirstIconId)
|
||||
return startId;
|
||||
|
||||
|
@ -74,7 +74,7 @@ IDProperty *IDP_NewIDPArray(const char *name)
|
||||
|
||||
IDProperty *IDP_CopyIDPArray(IDProperty *array)
|
||||
{
|
||||
/* dont use MEM_dupallocN because this may be part of an array */
|
||||
/* don't use MEM_dupallocN because this may be part of an array */
|
||||
IDProperty *narray = MEM_mallocN(sizeof(IDProperty), "IDP_CopyIDPArray"), *tmp;
|
||||
int i;
|
||||
|
||||
@ -608,9 +608,9 @@ IDProperty *IDP_GetProperties(ID *id, int create_if_needed)
|
||||
if (create_if_needed) {
|
||||
id->properties = MEM_callocN(sizeof(IDProperty), "IDProperty");
|
||||
id->properties->type = IDP_GROUP;
|
||||
/* dont overwrite the data's name and type
|
||||
/* don't overwrite the data's name and type
|
||||
* some functions might need this if they
|
||||
* dont have a real ID, should be named elsewhere - Campbell */
|
||||
* don't have a real ID, should be named elsewhere - Campbell */
|
||||
/* strcpy(id->name, "top_level_group");*/
|
||||
}
|
||||
return id->properties;
|
||||
@ -671,7 +671,7 @@ int IDP_EqualsProperties(IDProperty *prop1, IDProperty *prop2)
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* 'val' is never NULL, dont check */
|
||||
/* 'val' is never NULL, don't check */
|
||||
IDProperty *IDP_New(const int type, const IDPropertyTemplate *val, const char *name)
|
||||
{
|
||||
IDProperty *prop=NULL;
|
||||
|
@ -601,7 +601,7 @@ Image *BKE_add_image_size(unsigned int width, unsigned int height, const char *n
|
||||
if (ima) {
|
||||
ImBuf *ibuf;
|
||||
|
||||
/* BLI_strncpy(ima->name, name, FILE_MAX); */ /* dont do this, this writes in ain invalid filepath! */
|
||||
/* BLI_strncpy(ima->name, name, FILE_MAX); */ /* don't do this, this writes in ain invalid filepath! */
|
||||
ima->gen_x= width;
|
||||
ima->gen_y= height;
|
||||
ima->gen_type= uvtestgrid;
|
||||
@ -1832,7 +1832,7 @@ void BKE_image_signal(Image *ima, ImageUser *iuser, int signal)
|
||||
break;
|
||||
}
|
||||
|
||||
/* dont use notifiers because they are not 100% sure to succeeded
|
||||
/* don't use notifiers because they are not 100% sure to succeeded
|
||||
* this also makes sure all scenes are accounted for. */
|
||||
{
|
||||
Scene *scene;
|
||||
|
@ -1119,7 +1119,7 @@ static void fcurve_add_to_list (ListBase *groups, ListBase *list, FCurve *fcu, c
|
||||
}
|
||||
|
||||
/* add F-Curve to group */
|
||||
/* WARNING: this func should only need to look at the stuff we initialised, if not, things may crash */
|
||||
/* WARNING: this func should only need to look at the stuff we initialized, if not, things may crash */
|
||||
action_groups_add_channel(&tmp_act, agrp, fcu);
|
||||
|
||||
if (agrp->flag & AGRP_MUTED) /* flush down */
|
||||
|
@ -1195,7 +1195,7 @@ static int check_for_dupid(ListBase *lb, ID *id, char *name)
|
||||
/* If the original name has no numeric suffix,
|
||||
* rather than just chopping and adding numbers,
|
||||
* shave off the end chars until we have a unique name.
|
||||
* Check the null terminators match as well so we dont get Cube.000 -> Cube.00 */
|
||||
* Check the null terminators match as well so we don't get Cube.000 -> Cube.00 */
|
||||
if (nr==0 && name[left_len]== '\0') {
|
||||
int len = left_len-1;
|
||||
idtest= is_dupid(lb, id, name);
|
||||
@ -1211,7 +1211,7 @@ static int check_for_dupid(ListBase *lb, ID *id, char *name)
|
||||
if(nr > 999 && left_len > (MAX_ID_NAME - 8)) {
|
||||
/* this would overflow name buffer */
|
||||
left[MAX_ID_NAME - 8] = 0;
|
||||
/* left_len = MAX_ID_NAME - 8; */ /* for now this isnt used again */
|
||||
/* left_len = MAX_ID_NAME - 8; */ /* for now this isn't used again */
|
||||
memcpy(name, left, sizeof(char) * (MAX_ID_NAME - 7));
|
||||
continue;
|
||||
}
|
||||
@ -1257,7 +1257,7 @@ int new_id(ListBase *lb, ID *id, const char *tname)
|
||||
}
|
||||
else {
|
||||
/* disallow non utf8 chars,
|
||||
* the interface checks for this but new ID's based on file names dont */
|
||||
* the interface checks for this but new ID's based on file names don't */
|
||||
BLI_utf8_invalid_strip(name, strlen(name));
|
||||
}
|
||||
|
||||
@ -1402,7 +1402,7 @@ void BKE_library_make_local(Main *bmain, Library *lib, int untagged_only)
|
||||
idn= id->next; /* id is possibly being inserted again */
|
||||
|
||||
/* The check on the second line (LIB_PRE_EXISTING) is done so its
|
||||
* possible to tag data you dont want to be made local, used for
|
||||
* possible to tag data you don't want to be made local, used for
|
||||
* appending data, so any libdata already linked wont become local
|
||||
* (very nasty to discover all your links are lost after appending)
|
||||
* */
|
||||
|
@ -533,7 +533,7 @@ static void data_delete_material_index_id(ID *id, short index)
|
||||
curve_delete_material_index((Curve *)id, index);
|
||||
break;
|
||||
case ID_MB:
|
||||
/* meta-elems dont have materials atm */
|
||||
/* meta-elems don't have materials atm */
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -332,7 +332,7 @@ static void mesh_ensure_tessellation_customdata(Mesh *me)
|
||||
* mloopcol and mcol) have the same relative active/render/clone/mask indices.
|
||||
*
|
||||
* note that for undo mesh data we want to skip 'ensure_tess_cd' call since
|
||||
* we dont want to store memory for tessface when its only used for older
|
||||
* we don't want to store memory for tessface when its only used for older
|
||||
* versions of the mesh. - campbell*/
|
||||
static void mesh_update_linked_customdata(Mesh *me, const short do_ensure_tess_cd)
|
||||
{
|
||||
@ -2056,7 +2056,7 @@ void convert_mfaces_to_mpolys(Mesh *mesh)
|
||||
bm_corners_to_loops(mesh, i, mp->loopstart, numTex, numCol);
|
||||
}
|
||||
|
||||
/* note, we dont convert FGons at all, these are not even real ngons,
|
||||
/* note, we don't convert FGons at all, these are not even real ngons,
|
||||
* they have their own UV's, colors etc - its more an editing feature. */
|
||||
|
||||
mesh_update_customdata_pointers(mesh, TRUE);
|
||||
@ -2505,12 +2505,12 @@ int mesh_recalcTessellation(CustomData *fdata,
|
||||
CustomData_add_layer(fdata, CD_MFACE, CD_ASSIGN, mface, totface);
|
||||
|
||||
/* CD_POLYINDEX will contain an array of indices from tessfaces to the polygons
|
||||
* they are directly tesselated from */
|
||||
* they are directly tessellated from */
|
||||
CustomData_add_layer(fdata, CD_POLYINDEX, CD_ASSIGN, mface_to_poly_map, totface);
|
||||
if (mface_orig_index) {
|
||||
/* If polys had a CD_ORIGINDEX layer, then the tesselated faces will get this
|
||||
/* If polys had a CD_ORIGINDEX layer, then the tessellated faces will get this
|
||||
* layer as well, pointing to polys from the original mesh (not the polys
|
||||
* that just got tesselated) */
|
||||
* that just got tessellated) */
|
||||
CustomData_add_layer(fdata, CD_ORIGINDEX, CD_ASSIGN, mface_orig_index, totface);
|
||||
}
|
||||
|
||||
@ -3106,7 +3106,7 @@ void BKE_mesh_tessface_calc(Mesh *mesh)
|
||||
mesh->totface = mesh_recalcTessellation(&mesh->fdata, &mesh->ldata, &mesh->pdata,
|
||||
mesh->mvert,
|
||||
mesh->totface, mesh->totloop, mesh->totpoly,
|
||||
/* calc normals right after, dont copy from polys here */
|
||||
/* calc normals right after, don't copy from polys here */
|
||||
FALSE);
|
||||
|
||||
mesh_update_customdata_pointers(mesh, TRUE);
|
||||
|
@ -590,7 +590,7 @@ int modifiers_indexInObject(Object *ob, ModifierData *md_seek)
|
||||
ModifierData *md;
|
||||
|
||||
for (md=ob->modifiers.first; (md && md_seek!=md); md=md->next, i++);
|
||||
if (!md) return -1; /* modifier isnt in the object */
|
||||
if (!md) return -1; /* modifier isn't in the object */
|
||||
return i;
|
||||
}
|
||||
|
||||
@ -634,7 +634,7 @@ void test_object_modifiers(Object *ob)
|
||||
*
|
||||
* - if the ID is from a library, return library path
|
||||
* - else if the file has been saved return the blend file path.
|
||||
* - else if the file isn't saved and the ID isnt from a library, return the temp dir.
|
||||
* - else if the file isn't saved and the ID isn't from a library, return the temp dir.
|
||||
*/
|
||||
const char *modifier_path_relbase(Object *ob)
|
||||
{
|
||||
|
@ -660,7 +660,7 @@ bNodeTree *ntreeAddTree(const char *name, int type, int nodetype)
|
||||
/* Warning: this function gets called during some rather unexpected times
|
||||
* - this gets called when executing compositing updates (for threaded previews)
|
||||
* - when the nodetree datablock needs to be copied (i.e. when users get copied)
|
||||
* - for scene duplication use ntreeSwapID() after so we dont have stale pointers.
|
||||
* - for scene duplication use ntreeSwapID() after so we don't have stale pointers.
|
||||
*/
|
||||
bNodeTree *ntreeCopyTree(bNodeTree *ntree)
|
||||
{
|
||||
@ -1146,7 +1146,7 @@ bNodeTree *ntreeLocalize(bNodeTree *ntree)
|
||||
bAction *action_backup= NULL, *tmpact_backup= NULL;
|
||||
|
||||
/* Workaround for copying an action on each render!
|
||||
* set action to NULL so animdata actions dont get copied */
|
||||
* set action to NULL so animdata actions don't get copied */
|
||||
AnimData *adt= BKE_animdata_from_id(&ntree->id);
|
||||
|
||||
if(adt) {
|
||||
|
@ -1393,7 +1393,7 @@ void object_make_proxy(Object *ob, Object *target, Object *gob)
|
||||
ob->mat = MEM_dupallocN(target->mat);
|
||||
ob->matbits = MEM_dupallocN(target->matbits);
|
||||
for (i=0; i<target->totcol; i++) {
|
||||
/* dont need to run test_object_materials since we know this object is new and not used elsewhere */
|
||||
/* don't need to run test_object_materials since we know this object is new and not used elsewhere */
|
||||
id_us_plus((ID *)ob->mat[i]);
|
||||
}
|
||||
}
|
||||
|
@ -963,7 +963,7 @@ void BKE_free_ocean_data(struct Ocean *oc)
|
||||
if (oc->_fft_in)
|
||||
MEM_freeN(oc->_fft_in);
|
||||
|
||||
/* check that ocean data has been initialised */
|
||||
/* check that ocean data has been initialized */
|
||||
if (oc->_htilda) {
|
||||
MEM_freeN(oc->_htilda);
|
||||
MEM_freeN(oc->_k);
|
||||
|
@ -1629,7 +1629,7 @@ int psys_particle_dm_face_lookup(Object *ob, DerivedMesh *dm, int index, const f
|
||||
totface = dm->getNumTessFaces(dm);
|
||||
|
||||
if(osface==NULL || origindex==NULL) {
|
||||
/* Assume we dont need osface data */
|
||||
/* Assume we don't need osface data */
|
||||
if (index <totface) {
|
||||
//printf("\tNO CD_ORIGSPACE, assuming not needed\n");
|
||||
return index;
|
||||
@ -4069,7 +4069,7 @@ void psys_get_particle_on_path(ParticleSimulationData *sim, int p, ParticleKey *
|
||||
pind.cache = cached ? psys->pointcache : NULL;
|
||||
pind.epoint = NULL;
|
||||
pind.bspline = (psys->part->flag & PART_HAIR_BSPLINE);
|
||||
/* pind.dm disabled in editmode means we dont get effectors taken into
|
||||
/* pind.dm disabled in editmode means we don't get effectors taken into
|
||||
* account when subdividing for instance */
|
||||
pind.dm = psys_in_edit_mode(sim->scene, psys) ? NULL : psys->hair_out_dm;
|
||||
init_particle_interpolation(sim->ob, psys, pa, &pind);
|
||||
|
@ -1096,7 +1096,7 @@ static int distribute_threads_init_data(ParticleThread *threads, Scene *scene, D
|
||||
|
||||
dm= CDDM_from_mesh((Mesh*)ob->data, ob);
|
||||
|
||||
/* BMESH ONLY, for verts we dont care about tessfaces */
|
||||
/* BMESH ONLY, for verts we don't care about tessfaces */
|
||||
if (from != PART_FROM_VERT) {
|
||||
DM_ensure_tessface(dm);
|
||||
}
|
||||
@ -1515,7 +1515,7 @@ void initialize_particle(ParticleSimulationData *sim, ParticleData *pa, int p)
|
||||
pa->hair_index = 0;
|
||||
/* we can't reset to -1 anymore since we've figured out correct index in distribute_particles */
|
||||
/* usage other than straight after distribute has to handle this index by itself - jahka*/
|
||||
//pa->num_dmcache = DMCACHE_NOTFOUND; /* assume we dont have a derived mesh face */
|
||||
//pa->num_dmcache = DMCACHE_NOTFOUND; /* assume we don't have a derived mesh face */
|
||||
}
|
||||
static void initialize_all_particles(ParticleSimulationData *sim)
|
||||
{
|
||||
|
@ -1050,7 +1050,7 @@ static int ptcache_path(PTCacheID *pid, char *filename)
|
||||
return BLI_add_slash(filename); /* new strlen() */
|
||||
}
|
||||
else if (G.relbase_valid || lib) {
|
||||
char file[MAX_PTCACHE_PATH]; /* we dont want the dir, only the file */
|
||||
char file[MAX_PTCACHE_PATH]; /* we don't want the dir, only the file */
|
||||
|
||||
BLI_split_file_part(blendfilename, file, sizeof(file));
|
||||
i = strlen(file);
|
||||
@ -2546,7 +2546,7 @@ void BKE_ptcache_remove(void)
|
||||
BLI_join_dirfile(path_full, sizeof(path_full), path, de->d_name);
|
||||
BLI_delete(path_full, 0, 0);
|
||||
} else {
|
||||
rmdir = 0; /* unknown file, dont remove the dir */
|
||||
rmdir = 0; /* unknown file, don't remove the dir */
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1064,7 +1064,7 @@ void scene_update_for_newframe(Main *bmain, Scene *sce, unsigned int lay)
|
||||
DAG_ids_flush_tagged(bmain);
|
||||
|
||||
/* Following 2 functions are recursive
|
||||
* so dont call within 'scene_update_tagged_recursive' */
|
||||
* so don't call within 'scene_update_tagged_recursive' */
|
||||
DAG_scene_update_flags(bmain, sce, lay, TRUE); // only stuff that moves or needs display still
|
||||
|
||||
/* All 'standard' (i.e. without any dependencies) animation is handled here,
|
||||
|
@ -658,14 +658,14 @@ void reload_sequence_new_file(Scene *scene, Sequence * seq, int lock_range)
|
||||
{
|
||||
char str[FILE_MAX];
|
||||
int prev_startdisp=0, prev_enddisp=0;
|
||||
/* note: dont rename the strip, will break animation curves */
|
||||
/* note: don't rename the strip, will break animation curves */
|
||||
|
||||
if (ELEM5(seq->type, SEQ_MOVIE, SEQ_IMAGE, SEQ_SOUND, SEQ_SCENE, SEQ_META)==0) {
|
||||
return;
|
||||
}
|
||||
|
||||
if(lock_range) {
|
||||
/* keep so we dont have to move the actual start and end points (only the data) */
|
||||
/* keep so we don't have to move the actual start and end points (only the data) */
|
||||
calc_sequence_disp(scene, seq);
|
||||
prev_startdisp= seq->startdisp;
|
||||
prev_enddisp= seq->enddisp;
|
||||
@ -1998,7 +1998,7 @@ static ImBuf * seq_render_scene_strip_impl(
|
||||
int have_seq= FALSE;
|
||||
Scene *scene;
|
||||
|
||||
/* dont refer to seq->scene above this point!, it can be NULL */
|
||||
/* don't refer to seq->scene above this point!, it can be NULL */
|
||||
if(seq->scene == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
@ -3008,7 +3008,7 @@ int seqbase_isolated_sel_check(ListBase *seqbase)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/* use to impose limits when dragging/extending - so impossible situations dont happen
|
||||
/* use to impose limits when dragging/extending - so impossible situations don't happen
|
||||
* Cant use the SEQ_LEFTSEL and SEQ_LEFTSEL directly because the strip may be in a metastrip */
|
||||
void seq_tx_handle_xlimits(Sequence *seq, int leftflag, int rightflag)
|
||||
{
|
||||
@ -3163,7 +3163,7 @@ int shuffle_seq(ListBase * seqbasep, Sequence *test, Scene *evil_scene)
|
||||
break;
|
||||
}
|
||||
test->machine++;
|
||||
calc_sequence(evil_scene, test); // XXX - I dont think this is needed since were only moving vertically, Campbell.
|
||||
calc_sequence(evil_scene, test); // XXX - I don't think this is needed since were only moving vertically, Campbell.
|
||||
}
|
||||
|
||||
|
||||
@ -3413,7 +3413,7 @@ int seq_swap(Sequence *seq_a, Sequence *seq_b, const char **error_str)
|
||||
|
||||
SWAP(Sequence, *seq_a, *seq_b);
|
||||
|
||||
/* swap back names so animation fcurves dont get swapped */
|
||||
/* swap back names so animation fcurves don't get swapped */
|
||||
BLI_strncpy(name, seq_a->name+2, sizeof(name));
|
||||
BLI_strncpy(seq_a->name+2, seq_b->name+2, sizeof(seq_b->name)-2);
|
||||
BLI_strncpy(seq_b->name+2, name, sizeof(seq_b->name)-2);
|
||||
|
@ -360,7 +360,7 @@ static void shrinkwrap_calc_normal_projection(ShrinkwrapCalcData *calc)
|
||||
|
||||
|
||||
hit.index = -1;
|
||||
hit.dist = 10000.0f; //TODO: we should use FLT_MAX here, but sweepsphere code isnt prepared for that
|
||||
hit.dist = 10000.0f; //TODO: we should use FLT_MAX here, but sweepsphere code isn't prepared for that
|
||||
|
||||
//Project over positive direction of axis
|
||||
if(use_normal & MOD_SHRINKWRAP_PROJECT_ALLOW_POS_DIR)
|
||||
|
@ -817,7 +817,7 @@ void smokeModifier_copy(struct SmokeModifierData *smd, struct SmokeModifierData
|
||||
tsmd->flow->vel_multi = smd->flow->vel_multi;
|
||||
} else if (tsmd->coll) {
|
||||
;
|
||||
/* leave it as initialised, collision settings is mostly caches */
|
||||
/* leave it as initialized, collision settings is mostly caches */
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1055,7 +1055,7 @@ static int sb_detect_aabb_collisionCached( float UNUSED(force[3]), unsigned int
|
||||
(aabbmin[0] > ccdm->bbmax[0]) ||
|
||||
(aabbmin[1] > ccdm->bbmax[1]) ||
|
||||
(aabbmin[2] > ccdm->bbmax[2]) ) {
|
||||
/* boxes dont intersect */
|
||||
/* boxes don't intersect */
|
||||
BLI_ghashIterator_step(ihash);
|
||||
continue;
|
||||
}
|
||||
@ -1126,7 +1126,7 @@ static int sb_detect_face_pointCached(float face_v1[3],float face_v2[3],float fa
|
||||
(aabbmin[0] > ccdm->bbmax[0]) ||
|
||||
(aabbmin[1] > ccdm->bbmax[1]) ||
|
||||
(aabbmin[2] > ccdm->bbmax[2]) ) {
|
||||
/* boxes dont intersect */
|
||||
/* boxes don't intersect */
|
||||
BLI_ghashIterator_step(ihash);
|
||||
continue;
|
||||
}
|
||||
@ -1221,7 +1221,7 @@ static int sb_detect_face_collisionCached(float face_v1[3],float face_v2[3],floa
|
||||
(aabbmin[0] > ccdm->bbmax[0]) ||
|
||||
(aabbmin[1] > ccdm->bbmax[1]) ||
|
||||
(aabbmin[2] > ccdm->bbmax[2]) ) {
|
||||
/* boxes dont intersect */
|
||||
/* boxes don't intersect */
|
||||
BLI_ghashIterator_step(ihash);
|
||||
continue;
|
||||
}
|
||||
@ -1449,7 +1449,7 @@ static int sb_detect_edge_collisionCached(float edge_v1[3],float edge_v2[3],floa
|
||||
(aabbmin[0] > ccdm->bbmax[0]) ||
|
||||
(aabbmin[1] > ccdm->bbmax[1]) ||
|
||||
(aabbmin[2] > ccdm->bbmax[2]) ) {
|
||||
/* boxes dont intersect */
|
||||
/* boxes don't intersect */
|
||||
BLI_ghashIterator_step(ihash);
|
||||
continue;
|
||||
}
|
||||
@ -2217,7 +2217,7 @@ static int _softbody_calc_forces_slice_in_a_thread(Scene *scene, Object *ob, flo
|
||||
compare = (obp->colball + bp->colball);
|
||||
sub_v3_v3v3(def, bp->pos, obp->pos);
|
||||
/* rather check the AABBoxes before ever calulating the real distance */
|
||||
/* mathematically it is completly nuts, but performace is pretty much (3) times faster */
|
||||
/* mathematically it is completly nuts, but performance is pretty much (3) times faster */
|
||||
if ((ABS(def[0]) > compare) || (ABS(def[1]) > compare) || (ABS(def[2]) > compare)) continue;
|
||||
distance = normalize_v3(def);
|
||||
if (distance < compare ) {
|
||||
@ -2588,7 +2588,7 @@ static void softbody_calc_forces(Scene *scene, Object *ob, float forcetime, floa
|
||||
sub_v3_v3v3(def, bp->pos, obp->pos);
|
||||
|
||||
/* rather check the AABBoxes before ever calulating the real distance */
|
||||
/* mathematically it is completly nuts, but performace is pretty much (3) times faster */
|
||||
/* mathematically it is completly nuts, but performance is pretty much (3) times faster */
|
||||
if ((ABS(def[0]) > compare) || (ABS(def[1]) > compare) || (ABS(def[2]) > compare)) continue;
|
||||
|
||||
distance = normalize_v3(def);
|
||||
|
@ -351,7 +351,7 @@ void sound_load(struct Main *bmain, struct bSound* sound)
|
||||
/* load sound */
|
||||
PackedFile* pf = sound->packedfile;
|
||||
|
||||
/* dont modify soundact->sound->name, only change a copy */
|
||||
/* don't modify soundact->sound->name, only change a copy */
|
||||
BLI_strncpy(fullpath, sound->name, sizeof(fullpath));
|
||||
BLI_path_abs(fullpath, ID_BLEND_PATH(bmain, &sound->id));
|
||||
|
||||
|
@ -1038,7 +1038,7 @@ static void ccgDM_copyFinalVertArray(DerivedMesh *dm, MVert *mvert)
|
||||
vd= ccgSubSurf_getEdgeData(ss, e, x);
|
||||
copy_v3_v3(mvert[i].co, vd->co);
|
||||
/* This gives errors with -debug-fpe
|
||||
* the normals dont seem to be unit length.
|
||||
* the normals don't seem to be unit length.
|
||||
* this is most likely caused by edges with no
|
||||
* faces which are now zerod out, see comment in:
|
||||
* ccgSubSurf__calcVertNormals(), - campbell */
|
||||
@ -3064,7 +3064,7 @@ static CCGDerivedMesh *getCCGDerivedMesh(CCGSubSurf *ss,
|
||||
|
||||
#if 0
|
||||
/* this is not in trunk, can gives problems because colors initialize
|
||||
* as black, just dont do it!, it works fine - campbell */
|
||||
* as black, just don't do it!, it works fine - campbell */
|
||||
if (!CustomData_has_layer(&ccgdm->dm.faceData, CD_MCOL))
|
||||
DM_add_tessface_layer(&ccgdm->dm, CD_MCOL, CD_CALLOC, NULL);
|
||||
mcol = DM_get_tessface_data_layer(&ccgdm->dm, CD_MCOL);
|
||||
@ -3190,7 +3190,7 @@ static CCGDerivedMesh *getCCGDerivedMesh(CCGSubSurf *ss,
|
||||
/*copy over poly data, e.g. mtexpoly*/
|
||||
CustomData_copy_data(&dm->polyData, &ccgdm->dm.polyData, origIndex, faceNum, 1);
|
||||
|
||||
/*generate tesselated face data used for drawing*/
|
||||
/*generate tessellated face data used for drawing*/
|
||||
ccg_loops_to_corners(&ccgdm->dm.faceData, &ccgdm->dm.loopData,
|
||||
&ccgdm->dm.polyData, loopindex2-4, faceNum, faceNum,
|
||||
numTex, numCol, hasWCol, hasOrigSpace);
|
||||
|
@ -28,7 +28,7 @@
|
||||
/** \file BLI_bpath.h
|
||||
* \ingroup bli
|
||||
* \attention Based on ghash, difference is ghash is not a fixed size,
|
||||
* so for BPath we dont need to malloc
|
||||
* so for BPath we don't need to malloc
|
||||
*/
|
||||
|
||||
#ifndef __BLI_BPATH_H__
|
||||
|
@ -58,7 +58,7 @@ int BLI_gsqueue_size(GSQueue *gq);
|
||||
* Access the item at the head of the queue
|
||||
* without removing it.
|
||||
*
|
||||
* \param item_r A pointer to an appropriatly
|
||||
* \param item_r A pointer to an appropriately
|
||||
* sized structure (the size passed to BLI_gsqueue_new)
|
||||
*/
|
||||
void BLI_gsqueue_peek (GSQueue *gq, void *item_r);
|
||||
@ -67,7 +67,7 @@ void BLI_gsqueue_peek (GSQueue *gq, void *item_r);
|
||||
* Access the item at the head of the queue
|
||||
* and remove it.
|
||||
*
|
||||
* \param item_r A pointer to an appropriatly
|
||||
* \param item_r A pointer to an appropriately
|
||||
* sized structure (the size passed to BLI_gsqueue_new).
|
||||
* Can be NULL if desired.
|
||||
*/
|
||||
@ -76,7 +76,7 @@ void BLI_gsqueue_pop (GSQueue *gq, void *item_r);
|
||||
/**
|
||||
* Push an element onto the tail of the queue.
|
||||
*
|
||||
* \param item A pointer to an appropriatly
|
||||
* \param item A pointer to an appropriately
|
||||
* sized structure (the size passed to BLI_gsqueue_new).
|
||||
*/
|
||||
void BLI_gsqueue_push (GSQueue *gq, void *item);
|
||||
@ -85,7 +85,7 @@ void BLI_gsqueue_push (GSQueue *gq, void *item);
|
||||
* Push an element back onto the head of the queue (so
|
||||
* it would be returned from the next call to BLI_gsqueue_pop).
|
||||
*
|
||||
* \param item A pointer to an appropriatly
|
||||
* \param item A pointer to an appropriately
|
||||
* sized structure (the size passed to BLI_gsqueue_new).
|
||||
*/
|
||||
void BLI_gsqueue_pushback (GSQueue *gq, void *item);
|
||||
|
@ -167,7 +167,7 @@ MINLINE float signf(float f);
|
||||
|
||||
MINLINE float power_of_2(float f);
|
||||
|
||||
/* these dont really fit anywhere but were being copied about a lot */
|
||||
/* these don't really fit anywhere but were being copied about a lot */
|
||||
MINLINE int is_power_of_2_i(int n);
|
||||
MINLINE int power_of_2_max_i(int n);
|
||||
MINLINE int power_of_2_min_i(int n);
|
||||
|
@ -138,7 +138,7 @@ int BLI_ghash_remove(GHash *gh, void *key, GHashKeyFreeFP keyfreefp, GHashValFre
|
||||
valfreefp(e->val);
|
||||
BLI_mempool_free(gh->entrypool, e);
|
||||
|
||||
/* correct but 'e' isnt used before return */
|
||||
/* correct but 'e' isn't used before return */
|
||||
/* e= n; *//*UNUSED*/
|
||||
if (p)
|
||||
p->next = n;
|
||||
|
@ -45,7 +45,7 @@
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
/* note: copied from BKE_utildefines.h, dont use here because we're in BLI */
|
||||
/* note: copied from BKE_utildefines.h, don't use here because we're in BLI */
|
||||
#ifdef __BIG_ENDIAN__
|
||||
/* Big Endian */
|
||||
# define MAKE_ID(a,b,c,d) ( (int)(a)<<24 | (int)(b)<<16 | (c)<<8 | (d) )
|
||||
@ -237,7 +237,7 @@ void *BLI_mempool_calloc(BLI_mempool *pool)
|
||||
return retval;
|
||||
}
|
||||
|
||||
/* doesnt protect against double frees, dont be stupid! */
|
||||
/* doesnt protect against double frees, don't be stupid! */
|
||||
void BLI_mempool_free(BLI_mempool *pool, void *addr)
|
||||
{
|
||||
BLI_freenode *newhead = addr;
|
||||
|
@ -30,10 +30,10 @@
|
||||
*/
|
||||
|
||||
/* TODO,
|
||||
* currently there are some cases we dont support.
|
||||
* currently there are some cases we don't support.
|
||||
* - passing output paths to the visitor?, like render out.
|
||||
* - passing sequence strips with many images.
|
||||
* - passing directory paths - visitors dont know which path is a dir or a file.
|
||||
* - passing directory paths - visitors don't know which path is a dir or a file.
|
||||
* */
|
||||
|
||||
#include <sys/stat.h>
|
||||
@ -191,7 +191,7 @@ void makeFilesAbsolute(Main *bmain, const char *basedir, ReportList *reports)
|
||||
data.count_tot, data.count_changed, data.count_failed);
|
||||
}
|
||||
|
||||
/* find this file recursively, use the biggest file so thumbnails dont get used by mistake
|
||||
/* find this file recursively, use the biggest file so thumbnails don't get used by mistake
|
||||
* - dir: subdir to search
|
||||
* - filename: set this filename
|
||||
* - filesize: filesize for the file
|
||||
@ -231,7 +231,7 @@ static int findFileRecursive(char *filename_new,
|
||||
BLI_join_dirfile(path, sizeof(path), dirname, de->d_name);
|
||||
|
||||
if (stat(path, &status) != 0)
|
||||
continue; /* cant stat, dont bother with this file, could print debug info here */
|
||||
continue; /* cant stat, don't bother with this file, could print debug info here */
|
||||
|
||||
if (S_ISREG(status.st_mode)) { /* is file */
|
||||
if (strncmp(filename, de->d_name, FILE_MAX) == 0) { /* name matches */
|
||||
|
@ -872,7 +872,7 @@ int isect_line_plane_v3(float out[3], const float l1[3], const float l2[3], cons
|
||||
}
|
||||
}
|
||||
|
||||
/* note: return normal isnt unit length */
|
||||
/* note: return normal isn't unit length */
|
||||
void isect_plane_plane_v3(float r_isect_co[3], float r_isect_no[3],
|
||||
const float plane_a_co[3], const float plane_a_no[3],
|
||||
const float plane_b_co[3], const float plane_b_no[3])
|
||||
|
@ -482,7 +482,7 @@ void BLI_path_rel(char *file, const char *relfile)
|
||||
#endif
|
||||
{
|
||||
++p; ++q;
|
||||
/* dont search beyond the end of the string
|
||||
/* don't search beyond the end of the string
|
||||
* in the rare case they match */
|
||||
if ((*p=='\0') || (*q=='\0')) {
|
||||
break;
|
||||
@ -560,7 +560,7 @@ static int stringframe_chars(char *path, int *char_start, int *char_end)
|
||||
ch_sta = ch_end = 0;
|
||||
for (i = 0; path[i] != '\0'; i++) {
|
||||
if (path[i] == '\\' || path[i] == '/') {
|
||||
ch_end = 0; /* this is a directory name, dont use any hashes we found */
|
||||
ch_end = 0; /* this is a directory name, don't use any hashes we found */
|
||||
} else if (path[i] == '#') {
|
||||
ch_sta = i;
|
||||
ch_end = ch_sta+1;
|
||||
@ -569,7 +569,7 @@ static int stringframe_chars(char *path, int *char_start, int *char_end)
|
||||
}
|
||||
i = ch_end-1; /* keep searching */
|
||||
|
||||
/* dont break, there may be a slash after this that invalidates the previous #'s */
|
||||
/* don't break, there may be a slash after this that invalidates the previous #'s */
|
||||
}
|
||||
}
|
||||
|
||||
@ -681,7 +681,7 @@ int BLI_path_abs(char *path, const char *basepath)
|
||||
|
||||
BLI_strncpy(base, basepath, sizeof(base));
|
||||
|
||||
/* file component is ignored, so dont bother with the trailing slash */
|
||||
/* file component is ignored, so don't bother with the trailing slash */
|
||||
BLI_cleanup_path(NULL, base);
|
||||
|
||||
/* push slashes into unix mode - strings entering this part are
|
||||
@ -694,7 +694,7 @@ int BLI_path_abs(char *path, const char *basepath)
|
||||
BLI_char_switch(base, '\\', '/');
|
||||
|
||||
/* Paths starting with // will get the blend file as their base,
|
||||
* this isnt standard in any os but is used in blender all over the place */
|
||||
* this isn't standard in any os but is used in blender all over the place */
|
||||
if (wasrelative) {
|
||||
char *lslash= BLI_last_slash(base);
|
||||
if (lslash) {
|
||||
@ -747,7 +747,7 @@ int BLI_path_cwd(char *path)
|
||||
|
||||
if (wasrelative==1) {
|
||||
char cwd[FILE_MAX]= "";
|
||||
BLI_current_working_dir(cwd, sizeof(cwd)); /* in case the full path to the blend isnt used */
|
||||
BLI_current_working_dir(cwd, sizeof(cwd)); /* in case the full path to the blend isn't used */
|
||||
|
||||
if (cwd[0] == '\0') {
|
||||
printf( "Could not get the current working directory - $PWD for an unknown reason.");
|
||||
@ -756,7 +756,7 @@ int BLI_path_cwd(char *path)
|
||||
*
|
||||
* cwd should contain c:\ etc on win32 so the relbase can be NULL
|
||||
* relbase being NULL also prevents // being misunderstood as relative to the current
|
||||
* blend file which isnt a feature we want to use in this case since were dealing
|
||||
* blend file which isn't a feature we want to use in this case since were dealing
|
||||
* with a path from the command line, rather than from inside Blender */
|
||||
|
||||
char origpath[FILE_MAX];
|
||||
@ -1672,7 +1672,7 @@ char *BLI_last_slash(const char *string)
|
||||
else return lfslash;
|
||||
}
|
||||
|
||||
/* adds a slash if there isnt one there already */
|
||||
/* adds a slash if there isn't one there already */
|
||||
int BLI_add_slash(char *string)
|
||||
{
|
||||
int len = strlen(string);
|
||||
|
@ -184,7 +184,7 @@ char *BLI_strncpy_utf8(char *dst, const char *src, size_t maxncpy)
|
||||
{
|
||||
char *dst_r= dst;
|
||||
|
||||
/* note: currently we dont attempt to deal with invalid utf8 chars */
|
||||
/* note: currently we don't attempt to deal with invalid utf8 chars */
|
||||
BLI_STR_UTF8_CPY(dst, src, maxncpy)
|
||||
|
||||
return dst_r;
|
||||
@ -210,7 +210,7 @@ char *BLI_strncat_utf8(char *dst, const char *src, size_t maxncpy)
|
||||
size_t BLI_strncpy_wchar_as_utf8(char *dst, const wchar_t *src, const size_t maxcpy)
|
||||
{
|
||||
size_t len = 0;
|
||||
while(*src && len < maxcpy) { /* XXX can still run over the buffer because utf8 size isnt known :| */
|
||||
while(*src && len < maxcpy) { /* XXX can still run over the buffer because utf8 size isn't known :| */
|
||||
len += BLI_str_utf8_from_unicode(*src++, dst+len);
|
||||
}
|
||||
|
||||
@ -284,7 +284,7 @@ size_t BLI_strncpy_wchar_from_utf8(wchar_t *dst_w, const char *src_c, const size
|
||||
/* copied from glib's gutf8.c */
|
||||
|
||||
/* note, glib uses unsigned int for unicode, best we do the same,
|
||||
* though we dont typedef it - campbell */
|
||||
* though we don't typedef it - campbell */
|
||||
|
||||
#define UTF8_COMPUTE(Char, Mask, Len) \
|
||||
if (Char < 128) { \
|
||||
|
@ -235,7 +235,7 @@ struct ID *BLO_library_append_named_part(struct Main *mainl, BlendHandle** bh, c
|
||||
* Link/Append a named datablock from an external blend file.
|
||||
* optionally instance the object in the scene when the flags are set.
|
||||
*
|
||||
* \param C The context, when NULL instancing object in the scene isnt done.
|
||||
* \param C The context, when NULL instancing object in the scene isn't done.
|
||||
* \param mainl The main database to link from (not the active one).
|
||||
* \param bh The blender file handle.
|
||||
* \param idname The name of the datablock (without the 2 char ID prefix)
|
||||
|
@ -1509,7 +1509,7 @@ static void IDP_DirectLinkIDPArray(IDProperty *prop, int switch_endian, FileData
|
||||
array= (IDProperty*) prop->data.pointer;
|
||||
|
||||
/* note!, idp-arrays didn't exist in 2.4x, so the pointer will be cleared
|
||||
* theres not really anything we can do to correct this, at least dont crash */
|
||||
* theres not really anything we can do to correct this, at least don't crash */
|
||||
if(array==NULL) {
|
||||
prop->len= 0;
|
||||
prop->totallen= 0;
|
||||
@ -10110,7 +10110,7 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
|
||||
Scene *sce;
|
||||
for(sce= main->scene.first; sce; sce=sce->id.next) {
|
||||
sce->r.fg_stamp[0] = sce->r.fg_stamp[1] = sce->r.fg_stamp[2] = 0.8f;
|
||||
sce->r.fg_stamp[3] = 1.0f; /* dont use text alpha yet */
|
||||
sce->r.fg_stamp[3] = 1.0f; /* don't use text alpha yet */
|
||||
sce->r.bg_stamp[3] = 0.25f; /* make sure the background has full alpha */
|
||||
}
|
||||
}
|
||||
@ -14679,7 +14679,7 @@ static void library_append_end(const bContext *C, Main *mainl, FileData **fd, in
|
||||
if(scene) {
|
||||
const short is_link= (flag & FILE_LINK) != 0;
|
||||
if(idcode==ID_SCE) {
|
||||
/* dont instance anything when linking in scenes, assume the scene its self instances the data */
|
||||
/* don't instance anything when linking in scenes, assume the scene its self instances the data */
|
||||
}
|
||||
else {
|
||||
give_base_to_objects(mainvar, scene, curlib, idcode, is_link);
|
||||
|
@ -1712,7 +1712,7 @@ static void write_meshs(WriteData *wd, ListBase *idbase)
|
||||
|
||||
#ifdef USE_BMESH_SAVE_WITHOUT_MFACE
|
||||
Mesh backup_mesh = {{0}};
|
||||
/* cache only - dont write */
|
||||
/* cache only - don't write */
|
||||
backup_mesh.mface = mesh->mface;
|
||||
mesh->mface = NULL;
|
||||
/* -- */
|
||||
@ -1737,7 +1737,7 @@ static void write_meshs(WriteData *wd, ListBase *idbase)
|
||||
write_customdata(wd, &mesh->id, mesh->totpoly, &mesh->pdata, -1, 0);
|
||||
|
||||
#ifdef USE_BMESH_SAVE_WITHOUT_MFACE
|
||||
/* cache only - dont write */
|
||||
/* cache only - don't write */
|
||||
mesh->mface = backup_mesh.mface;
|
||||
/* -- */
|
||||
mesh->totface = backup_mesh.totface;
|
||||
@ -2912,7 +2912,7 @@ int BLO_write_file(Main *mainvar, const char *filepath, int write_flags, ReportL
|
||||
/* blend may not have been saved before. Tn this case
|
||||
* we should not have any relative paths, but if there
|
||||
* is somehow, an invalid or empty G.main->name it will
|
||||
* print an error, dont try make the absolute in this case. */
|
||||
* print an error, don't try make the absolute in this case. */
|
||||
makeFilesAbsolute(mainvar, G.main->name, NULL);
|
||||
}
|
||||
}
|
||||
|
@ -220,7 +220,7 @@ LIBEXPORT void de_interlace(struct ImBuf *ib)
|
||||
/* stuff from plugin.h */
|
||||
/* -------------------------------------------------------------------------- */
|
||||
|
||||
/* These three need to be defined in the plugion itself. The plugin
|
||||
/* These three need to be defined in the plugin itself. The plugin
|
||||
* loader looks for these functions to check whether it can use the
|
||||
* plugin. For sequences, something similar exists. */
|
||||
/* int plugin_tex_getversion(void); */
|
||||
|
@ -242,7 +242,7 @@ BM_INLINE void _bm_elem_flag_merge(BMHeader *head_a, BMHeader *head_b);
|
||||
* valid value inline.
|
||||
*
|
||||
* - 'set_dirty!' -- intentionally sets the index to an invalid value,
|
||||
* flagging 'bm->elem_index_dirty' so we dont use it.
|
||||
* flagging 'bm->elem_index_dirty' so we don't use it.
|
||||
*
|
||||
* - 'set_ok' -- this is valid use since the part of the code is low level.
|
||||
*
|
||||
@ -271,7 +271,7 @@ BM_INLINE void _bm_elem_index_set(BMHeader *ele, const int index);
|
||||
* this value is rather arbitrary */
|
||||
#define BM_NGON_STACK_SIZE 32
|
||||
|
||||
/* avoid inf loop, this value is arbtrary
|
||||
/* avoid inf loop, this value is arbitrary
|
||||
* but should not error on valid cases */
|
||||
#define BM_LOOP_RADIAL_MAX 10000
|
||||
#define BM_NGON_MAX 100000
|
||||
|
@ -55,7 +55,7 @@ struct Object;
|
||||
* hold several types of data
|
||||
*
|
||||
* 1: The type of the element (vert, edge, loop or face)
|
||||
* 2: Persistant "header" flags/markings (smooth, seam, select, hidden, ect)
|
||||
* 2: Persistent "header" flags/markings (smooth, seam, select, hidden, ect)
|
||||
* note that this is different from the "tool" flags.
|
||||
* 3: Unique ID in the bmesh.
|
||||
* 4: some elements for internal record keeping.
|
||||
@ -117,7 +117,7 @@ typedef struct BMLoop {
|
||||
struct BMLoop *next, *prev; /* next/prev verts around the face */
|
||||
} BMLoop;
|
||||
|
||||
/* can cast BMFace/BMEdge/BMVert, but NOT BMLoop, since these dont have a flag layer */
|
||||
/* can cast BMFace/BMEdge/BMVert, but NOT BMLoop, since these don't have a flag layer */
|
||||
typedef struct BMElemF {
|
||||
BMHeader head;
|
||||
struct BMFlagLayer *oflags; /* keep after header, an array of flags, mostly used by the operator stack */
|
||||
@ -162,7 +162,7 @@ typedef struct BMesh {
|
||||
/* flag index arrays as being dirty so we can check if they are clean and
|
||||
* avoid looping over the entire vert/edge/face array in those cases.
|
||||
* valid flags are - BM_VERT | BM_EDGE | BM_FACE.
|
||||
* BM_LOOP isnt handled so far. */
|
||||
* BM_LOOP isn't handled so far. */
|
||||
char elem_index_dirty;
|
||||
|
||||
/*element pools*/
|
||||
@ -181,7 +181,7 @@ typedef struct BMesh {
|
||||
|
||||
/* should be copy of scene select mode */
|
||||
/* stored in BMEditMesh too, this is a bit confusing,
|
||||
* make sure the're in sync!
|
||||
* make sure they're in sync!
|
||||
* Only use when the edit mesh cant be accessed - campbell */
|
||||
short selectmode;
|
||||
|
||||
|
@ -500,7 +500,7 @@ void BMO_remove_tagged_verts(BMesh *bm, const short oflag)
|
||||
* api functions that take a filter callback.....
|
||||
* and this new filter type will be for opstack flags.
|
||||
* This is because the BM_remove_taggedXXX functions bypass iterator API.
|
||||
* - Ops dont care about 'UI' considerations like selection state, hide state, ect.
|
||||
* - Ops don't care about 'UI' considerations like selection state, hide state, ect.
|
||||
* If you want to work on unhidden selections for instance,
|
||||
* copy output from a 'select context' operator to another operator....
|
||||
*/
|
||||
|
@ -1161,7 +1161,7 @@ BMFace *bmesh_sfme(BMesh *bm, BMFace *f, BMVert *v1, BMVert *v2,
|
||||
#endif
|
||||
|
||||
/* validate both loop */
|
||||
/* I dont know how many loops are supposed to be in each face at this point! FIXME */
|
||||
/* I don't know how many loops are supposed to be in each face at this point! FIXME */
|
||||
|
||||
/* go through all of f2's loops and make sure they point to it properly */
|
||||
l_iter = l_first = BM_FACE_FIRST_LOOP(f2);
|
||||
|
@ -633,7 +633,7 @@ void BM_loop_interp_from_face(BMesh *bm, BMLoop *target, BMFace *source,
|
||||
|
||||
axis_dominant_v3(&ax, &ay, source->no);
|
||||
|
||||
/* scale source face coordinates a bit, so points sitting directonly on an
|
||||
/* scale source face coordinates a bit, so points sitting directly on an
|
||||
* edge will work. */
|
||||
mul_v3_fl(cent, 1.0f / (float)source->len);
|
||||
for (i = 0; i < source->len; i++) {
|
||||
@ -696,7 +696,7 @@ void BM_vert_interp_from_face(BMesh *bm, BMVert *v, BMFace *source)
|
||||
i++;
|
||||
} while ((l_iter = l_iter->next) != l_first);
|
||||
|
||||
/* scale source face coordinates a bit, so points sitting directonly on an
|
||||
/* scale source face coordinates a bit, so points sitting directly on an
|
||||
* edge will work. */
|
||||
mul_v3_fl(cent, 1.0f / (float)source->len);
|
||||
for (i = 0; i < source->len; i++) {
|
||||
|
@ -606,7 +606,7 @@ void BM_editselection_plane(BMesh *bm, float r_plane[3], BMEditSelection *ese)
|
||||
/* make a fake plane thats at rightangles to the normal
|
||||
* we cant make a crossvec from a vec thats the same as the vec
|
||||
* unlikely but possible, so make sure if the normal is (0, 0, 1)
|
||||
* that vec isnt the same or in the same direction even. */
|
||||
* that vec isn't the same or in the same direction even. */
|
||||
if (eve->no[0] < 0.5f) vec[0] = 1.0f;
|
||||
else if (eve->no[1] < 0.5f) vec[1] = 1.0f;
|
||||
else vec[2] = 1.0f;
|
||||
@ -638,7 +638,7 @@ void BM_editselection_plane(BMesh *bm, float r_plane[3], BMEditSelection *ese)
|
||||
/* make a fake plane thats at rightangles to the normal
|
||||
* we cant make a crossvec from a vec thats the same as the vec
|
||||
* unlikely but possible, so make sure if the normal is (0, 0, 1)
|
||||
* that vec isnt the same or in the same direction even. */
|
||||
* that vec isn't the same or in the same direction even. */
|
||||
if (efa->len < 3) {
|
||||
/* crappy fallback method */
|
||||
if (efa->no[0] < 0.5f) vec[0] = 1.0f;
|
||||
|
@ -58,7 +58,7 @@ static void bm_mempool_init(BMesh *bm, const BMAllocTemplate *allocsize)
|
||||
bm->looplistpool = BLI_mempool_create(sizeof(BMLoopList), allocsize[3], allocsize[3], FALSE, FALSE);
|
||||
#endif
|
||||
|
||||
/* allocate one flag pool that we dont get rid of. */
|
||||
/* allocate one flag pool that we don't get rid of. */
|
||||
bm->toolflagpool = BLI_mempool_create(sizeof(BMFlagLayer), 512, 512, 0);
|
||||
}
|
||||
|
||||
@ -79,7 +79,7 @@ BMesh *BM_mesh_create(BMAllocTemplate *allocsize)
|
||||
/* allocate the memory pools for the mesh elements */
|
||||
bm_mempool_init(bm, allocsize);
|
||||
|
||||
/* allocate one flag pool that we dont get rid of. */
|
||||
/* allocate one flag pool that we don't get rid of. */
|
||||
bm->stackdepth = 1;
|
||||
bm->totflags = 1;
|
||||
|
||||
|
@ -251,7 +251,7 @@ void BM_mesh_bm_from_me(BMesh *bm, Mesh *me, int set_key, int act_key_nr)
|
||||
continue;
|
||||
}
|
||||
|
||||
/* dont use 'i' since we may have skipped the face */
|
||||
/* don't use 'i' since we may have skipped the face */
|
||||
BM_elem_index_set(f, bm->totface - 1); /* set_ok */
|
||||
|
||||
/* transfer flag */
|
||||
|
@ -91,7 +91,7 @@ int BM_vert_dissolve(BMesh *bm, BMVert *v)
|
||||
}
|
||||
}
|
||||
else if (len == 2 && BM_vert_face_count(v) == 1) {
|
||||
/* boundry vertex on a face */
|
||||
/* boundary vertex on a face */
|
||||
return (BM_vert_collapse_edge(bm, v->e, v, TRUE) != NULL);
|
||||
}
|
||||
else {
|
||||
@ -540,7 +540,7 @@ BMEdge *BM_vert_collapse_faces(BMesh *bm, BMEdge *ke, BMVert *kv, float fac,
|
||||
else {
|
||||
/* single face or no faces */
|
||||
/* same as BM_vert_collapse_edge() however we already
|
||||
* have vars to perform this operation so dont call. */
|
||||
* have vars to perform this operation so don't call. */
|
||||
ne = bmesh_jekv(bm, ke, kv, TRUE);
|
||||
/* ne = BM_edge_exists(tv, tv2); */ /* same as return above */
|
||||
|
||||
@ -801,7 +801,7 @@ int BM_face_validate(BMesh *bm, BMFace *face, FILE *err)
|
||||
*
|
||||
* Examples:
|
||||
* - the newly formed edge already exists
|
||||
* - the new face would be degenerate (zero area / concav / bow-tie)
|
||||
* - the new face would be degenerate (zero area / concave / bow-tie)
|
||||
* - may want to measure if the new edge gives improved results topology.
|
||||
* over the old one, as with beauty fill.
|
||||
*
|
||||
@ -824,8 +824,8 @@ void BM_edge_rotate_calc(BMesh *bm, BMEdge *e, int ccw,
|
||||
BM_edge_ordered_verts(e, &v1, &v2);
|
||||
|
||||
/* we could swap the verts _or_ the faces, swapping faces
|
||||
* gives more predictable resuts since that way the next vert
|
||||
* just sitches from face fa / fb */
|
||||
* gives more predictable results since that way the next vert
|
||||
* just stitches from face fa / fb */
|
||||
if (ccw) {
|
||||
SWAP(BMFace *, fa, fb);
|
||||
}
|
||||
@ -833,7 +833,7 @@ void BM_edge_rotate_calc(BMesh *bm, BMEdge *e, int ccw,
|
||||
*r_l1 = BM_face_other_vert_loop(fb, v2, v1);
|
||||
*r_l2 = BM_face_other_vert_loop(fa, v1, v2);
|
||||
|
||||
/* when assert isnt used */
|
||||
/* when assert isn't used */
|
||||
(void)bm;
|
||||
}
|
||||
|
||||
@ -852,7 +852,7 @@ int BM_edge_rotate_check(BMesh *UNUSED(bm), BMEdge *e)
|
||||
la = BM_face_other_vert_loop(fa, e->v2, e->v1);
|
||||
lb = BM_face_other_vert_loop(fb, e->v2, e->v1);
|
||||
|
||||
/* check that the next vert in both faces isnt the same
|
||||
/* check that the next vert in both faces isn't the same
|
||||
* (ie - the next edge doesnt share the same faces).
|
||||
* since we can't rotate usefully in this case. */
|
||||
if (la->v == lb->v) {
|
||||
@ -879,7 +879,7 @@ int BM_edge_rotate_check(BMesh *UNUSED(bm), BMEdge *e)
|
||||
*
|
||||
* Check 2 cases
|
||||
* 1) does the newly forms edge form a flipped face (compare with previous cross product)
|
||||
* 2) does the newly formed edge caise a zero area corner (or close enough to be almost zero)
|
||||
* 2) does the newly formed edge cause a zero area corner (or close enough to be almost zero)
|
||||
*
|
||||
* \param l1,l2 are the loops of the proposed verts to rotate too and should
|
||||
* be the result of calling #BM_edge_rotate_calc
|
||||
@ -972,7 +972,7 @@ int BM_edge_rotate_check_degenerate(BMesh *bm, BMEdge *e,
|
||||
|
||||
return TRUE;
|
||||
|
||||
/* when assert isnt used */
|
||||
/* when assert isn't used */
|
||||
(void)bm;
|
||||
}
|
||||
|
||||
@ -1070,9 +1070,9 @@ BMEdge *BM_edge_rotate(BMesh *bm, BMEdge *e, const short ccw, const short check_
|
||||
return NULL;
|
||||
}
|
||||
else {
|
||||
/* we should reallty be able to know the faces some other way,
|
||||
/* we should really be able to know the faces some other way,
|
||||
* rather then fetching them back from the edge, but this is predictable
|
||||
* where using the return values from face split isnt. - campbell */
|
||||
* where using the return values from face split isn't. - campbell */
|
||||
BMFace *fa, *fb;
|
||||
if (BM_edge_face_pair(e_new, &fa, &fb)) {
|
||||
fa->head.hflag = f_hflag_prev_1;
|
||||
|
@ -93,7 +93,7 @@
|
||||
/*
|
||||
* Vertex Smooth
|
||||
*
|
||||
* Smoothes vertices by using a basic vertex averaging scheme.
|
||||
* Smooths vertices by using a basic vertex averaging scheme.
|
||||
*/
|
||||
static BMOpDefine bmo_vertexsmooth_def = {
|
||||
"vertexsmooth",
|
||||
@ -740,7 +740,7 @@ static BMOpDefine bmo_split_def = {
|
||||
{BMO_OP_SLOT_MAPPING, "boundarymap"},
|
||||
{BMO_OP_SLOT_MAPPING, "isovertmap"},
|
||||
{BMO_OP_SLOT_PNT, "dest"}, /* destination bmesh, if NULL will use current on */
|
||||
{BMO_OP_SLOT_BOOL, "use_only_faces"}, /* when enabled. dont duplicate loose verts/edges */
|
||||
{BMO_OP_SLOT_BOOL, "use_only_faces"}, /* when enabled. don't duplicate loose verts/edges */
|
||||
{0} /* null-terminating sentine */},
|
||||
bmo_split_exec,
|
||||
0
|
||||
|
@ -482,7 +482,7 @@ int BM_edge_is_manifold(BMesh *UNUSED(bm), BMEdge *e)
|
||||
* of a shell (has one face associated with it)
|
||||
*/
|
||||
|
||||
#if 1 /* fast path for checking boundry */
|
||||
#if 1 /* fast path for checking boundary */
|
||||
int BM_edge_is_boundary(BMEdge *e)
|
||||
{
|
||||
const BMLoop *l = e->l;
|
||||
@ -595,7 +595,7 @@ BMLoop *BM_face_vert_share_loop(BMFace *f, BMVert *v)
|
||||
* Returns the verts of an edge as used in a face
|
||||
* if used in a face at all, otherwise just assign as used in the edge.
|
||||
*
|
||||
* Useful to get a determanistic winding order when calling
|
||||
* Useful to get a deterministic winding order when calling
|
||||
* BM_face_create_ngon() on an arbitrary array of verts,
|
||||
* though be sure to pick an edge which has a face.
|
||||
*/
|
||||
@ -680,7 +680,7 @@ void BM_loop_face_tangent(BMesh *UNUSED(bm), BMLoop *l, float r_tangent[3])
|
||||
cross_v3_v3v3(r_tangent, dir, nor);
|
||||
}
|
||||
else {
|
||||
/* prev/next are the same - compare with face normal since we dont have one */
|
||||
/* prev/next are the same - compare with face normal since we don't have one */
|
||||
cross_v3_v3v3(r_tangent, v_next, l->f->no);
|
||||
}
|
||||
|
||||
@ -861,7 +861,7 @@ int BM_face_exists_multi(BMesh *bm, BMVert **varr, BMEdge **earr, int len)
|
||||
}
|
||||
}
|
||||
|
||||
/* now tag all verts and edges in the boundry array as true so
|
||||
/* now tag all verts and edges in the boundary array as true so
|
||||
* we can know if a face-vert is from our array */
|
||||
for (i = 0; i < len; i++) {
|
||||
BM_elem_flag_enable(varr[i], BM_ELEM_INTERNAL_TAG);
|
||||
@ -869,10 +869,10 @@ int BM_face_exists_multi(BMesh *bm, BMVert **varr, BMEdge **earr, int len)
|
||||
}
|
||||
|
||||
|
||||
/* so! boundry is tagged, everything else cleared */
|
||||
/* so! boundary is tagged, everything else cleared */
|
||||
|
||||
|
||||
/* 1) tag all faces connected to edges - if all their verts are boundry */
|
||||
/* 1) tag all faces connected to edges - if all their verts are boundary */
|
||||
tot_tag = 0;
|
||||
for (i = 0; i < len; i++) {
|
||||
BM_ITER(f, &fiter, bm, BM_FACES_OF_EDGE, earr[i]) {
|
||||
@ -886,7 +886,7 @@ int BM_face_exists_multi(BMesh *bm, BMVert **varr, BMEdge **earr, int len)
|
||||
}
|
||||
|
||||
if (ok) {
|
||||
/* we only use boundry verts */
|
||||
/* we only use boundary verts */
|
||||
BM_elem_flag_enable(f, BM_ELEM_INTERNAL_TAG);
|
||||
tot_tag++;
|
||||
}
|
||||
@ -898,19 +898,19 @@ int BM_face_exists_multi(BMesh *bm, BMVert **varr, BMEdge **earr, int len)
|
||||
}
|
||||
|
||||
if (tot_tag == 0) {
|
||||
/* no faces use only boundry verts, quit early */
|
||||
/* no faces use only boundary verts, quit early */
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/* 2) loop over non-boundry edges that use boundry verts,
|
||||
/* 2) loop over non-boundary edges that use boundary verts,
|
||||
* check each have 2 tagges faces connected (faces that only use 'varr' verts) */
|
||||
ok = TRUE;
|
||||
for (i = 0; i < len; i++) {
|
||||
BM_ITER(e, &fiter, bm, BM_EDGES_OF_VERT, varr[i]) {
|
||||
|
||||
if (/* non-boundry edge */
|
||||
if (/* non-boundary edge */
|
||||
BM_elem_flag_test(e, BM_ELEM_INTERNAL_TAG) == FALSE &&
|
||||
/* ...using boundry verts */
|
||||
/* ...using boundary verts */
|
||||
BM_elem_flag_test(e->v1, BM_ELEM_INTERNAL_TAG) == TRUE &&
|
||||
BM_elem_flag_test(e->v2, BM_ELEM_INTERNAL_TAG) == TRUE)
|
||||
{
|
||||
|
@ -121,7 +121,7 @@ enum {
|
||||
/* walk over an island of flagged faces. note, that this doesn't work on
|
||||
* non-manifold geometry. it might be better to rewrite this to extract
|
||||
* boundary info from the island walker, rather then directly walking
|
||||
* over the boundary. raises an error if it encouters nonmanifold
|
||||
* over the boundary. raises an error if it encounters nonmanifold
|
||||
* geometry. */
|
||||
BMW_ISLANDBOUND,
|
||||
/* walk over all faces in an island of tool flagged faces. */
|
||||
|
@ -349,7 +349,7 @@ static void *bmw_IslandWalker_step(BMWalker *walker)
|
||||
|
||||
l = BM_iter_new(&liter, walker->bm, BM_LOOPS_OF_FACE, iwalk->cur);
|
||||
for ( ; l; l = BM_iter_step(&liter)) {
|
||||
/* could skip loop here too, but dont add unless we need it */
|
||||
/* could skip loop here too, but don't add unless we need it */
|
||||
if (walker->mask_edge && !BMO_elem_flag_test(walker->bm, l->e, walker->mask_edge)) {
|
||||
continue;
|
||||
}
|
||||
@ -395,11 +395,11 @@ static void bmw_LoopWalker_begin(BMWalker *walker, void *data)
|
||||
|
||||
lwalk->cur = lwalk->start = e;
|
||||
lwalk->lastv = lwalk->startv = v;
|
||||
lwalk->is_boundry = BM_edge_is_boundary(e);
|
||||
lwalk->is_boundary = BM_edge_is_boundary(e);
|
||||
lwalk->is_single = (vert_edge_count[0] == 2 && vert_edge_count[1] == 2);
|
||||
|
||||
/* could also check that vertex*/
|
||||
if ((lwalk->is_boundry == FALSE) &&
|
||||
if ((lwalk->is_boundary == FALSE) &&
|
||||
(vert_edge_count[0] == 3 || vert_edge_count[1] == 3))
|
||||
{
|
||||
BMIter iter;
|
||||
@ -472,7 +472,7 @@ static void *bmw_LoopWalker_step(BMWalker *walker)
|
||||
lwalk->cur = nexte;
|
||||
lwalk->lastv = v;
|
||||
|
||||
lwalk->is_boundry = owalk.is_boundry;
|
||||
lwalk->is_boundary = owalk.is_boundary;
|
||||
lwalk->is_single = owalk.is_single;
|
||||
lwalk->f_hub = owalk.f_hub;
|
||||
|
||||
@ -492,19 +492,19 @@ static void *bmw_LoopWalker_step(BMWalker *walker)
|
||||
|
||||
/* typical loopiong over edges in the middle of a mesh */
|
||||
/* however, why use 2 here at all? I guess for internal ngon loops it can be useful. Antony R. */
|
||||
((vert_edge_tot == 4 || vert_edge_tot == 2) && owalk.is_boundry == FALSE) ||
|
||||
((vert_edge_tot == 4 || vert_edge_tot == 2) && owalk.is_boundary == FALSE) ||
|
||||
|
||||
/* walk over boundry of faces but stop at corners */
|
||||
(owalk.is_boundry == TRUE && owalk.is_single == FALSE && vert_edge_tot > 2) ||
|
||||
/* walk over boundary of faces but stop at corners */
|
||||
(owalk.is_boundary == TRUE && owalk.is_single == FALSE && vert_edge_tot > 2) ||
|
||||
|
||||
/* initial edge was a boundry, so is this edge and vertex is only apart of this face
|
||||
* this lets us walk over the the boundry of an ngon which is handy */
|
||||
(owalk.is_boundry == TRUE && owalk.is_single == TRUE && vert_edge_tot == 2 && BM_edge_is_boundary(e)))
|
||||
/* initial edge was a boundary, so is this edge and vertex is only apart of this face
|
||||
* this lets us walk over the the boundary of an ngon which is handy */
|
||||
(owalk.is_boundary == TRUE && owalk.is_single == TRUE && vert_edge_tot == 2 && BM_edge_is_boundary(e)))
|
||||
{
|
||||
i = 0;
|
||||
stopi = vert_edge_tot / 2;
|
||||
while (1) {
|
||||
if ((owalk.is_boundry == FALSE) && (i == stopi)) {
|
||||
if ((owalk.is_boundary == FALSE) && (i == stopi)) {
|
||||
break;
|
||||
}
|
||||
|
||||
@ -530,12 +530,12 @@ static void *bmw_LoopWalker_step(BMWalker *walker)
|
||||
|
||||
if (l != NULL) {
|
||||
if (l != e->l && !BLI_ghash_haskey(walker->visithash, l->e)) {
|
||||
if (!(owalk.is_boundry == FALSE && i != stopi)) {
|
||||
if (!(owalk.is_boundary == FALSE && i != stopi)) {
|
||||
lwalk = BMW_state_add(walker);
|
||||
lwalk->cur = l->e;
|
||||
lwalk->lastv = v;
|
||||
|
||||
lwalk->is_boundry = owalk.is_boundry;
|
||||
lwalk->is_boundary = owalk.is_boundary;
|
||||
lwalk->is_single = owalk.is_single;
|
||||
lwalk->f_hub = owalk.f_hub;
|
||||
|
||||
@ -557,7 +557,7 @@ static void *bmw_LoopWalker_step(BMWalker *walker)
|
||||
lwalk->cur = nexte;
|
||||
lwalk->lastv = v;
|
||||
|
||||
lwalk->is_boundry = owalk.is_boundry;
|
||||
lwalk->is_boundary = owalk.is_boundary;
|
||||
lwalk->is_single = owalk.is_single;
|
||||
lwalk->f_hub = owalk.f_hub;
|
||||
|
||||
|
@ -62,7 +62,7 @@ typedef struct BMwLoopWalker {
|
||||
BMEdge *cur, *start;
|
||||
BMVert *lastv, *startv;
|
||||
BMFace *f_hub;
|
||||
short is_boundry; /* boundry looping changes behavior */
|
||||
short is_boundary; /* boundary looping changes behavior */
|
||||
short is_single; /* single means the edge verts are only connected to 1 face */
|
||||
} BMwLoopWalker;
|
||||
|
||||
|
@ -59,7 +59,7 @@ static void calc_corner_co(BMesh *bm, BMLoop *l, const float fac, float r_co[3],
|
||||
copy_v3_v3(l_co, l->v->co);
|
||||
copy_v3_v3(l_co_next, l->next->v->co);
|
||||
|
||||
/* calculate norma */
|
||||
/* calculate normal */
|
||||
sub_v3_v3v3(l_vec_prev, l_co_prev, l_co);
|
||||
sub_v3_v3v3(l_vec_next, l_co_next, l_co);
|
||||
|
||||
@ -551,7 +551,7 @@ void bmo_bevel_exec(BMesh *bm, BMOperator *op)
|
||||
|
||||
/* set edge lengths of cross edges as the average of the cross edges they're based o */
|
||||
if (has_elens) {
|
||||
/* angle happens not to be used. why? - not sure it just isnt - campbell.
|
||||
/* angle happens not to be used. why? - not sure it just isn't - campbell.
|
||||
* leave this in in case we need to use it later */
|
||||
#if 0
|
||||
float ang;
|
||||
|
@ -1257,7 +1257,7 @@ void bmo_edgenet_prepare(BMesh *bm, BMOperator *op)
|
||||
}
|
||||
|
||||
/* This is what runs when pressing the F key
|
||||
* doing the best thing here isnt always easy create vs dissolve, its nice to support
|
||||
* doing the best thing here isn't always easy create vs dissolve, its nice to support
|
||||
* but it it _really_ gives issues we might have to not call dissolve. - campbell
|
||||
*/
|
||||
void bmo_contextual_create_exec(BMesh *bm, BMOperator *op)
|
||||
|
@ -517,7 +517,7 @@ void bmo_dissolve_limit_exec(BMesh *bm, BMOperator *op)
|
||||
e->l->radial_next->f,
|
||||
e); /* join faces */
|
||||
|
||||
/* there may be some errors, we dont mind, just move on */
|
||||
/* there may be some errors, we don't mind, just move on */
|
||||
if (nf == NULL) {
|
||||
BMO_error_clear(bm);
|
||||
}
|
||||
|
@ -34,7 +34,7 @@ enum {
|
||||
* Remove the EDGE_SEAM flag for edges we cant split
|
||||
*
|
||||
* un-tag edges not connected to other tagged edges,
|
||||
* unless they are on a boundry
|
||||
* unless they are on a boundary
|
||||
*/
|
||||
static void bm_edgesplit_validate_seams(BMesh *bm, BMOperator *op)
|
||||
{
|
||||
@ -49,7 +49,7 @@ static void bm_edgesplit_validate_seams(BMesh *bm, BMOperator *op)
|
||||
|
||||
vtouch = MEM_callocN(sizeof(char) * bm->totvert, __func__);
|
||||
|
||||
/* tag all boundry verts so as not to untag an edge which is inbetween only 2 faces [] */
|
||||
/* tag all boundary verts so as not to untag an edge which is inbetween only 2 faces [] */
|
||||
BM_ITER(e, &iter, bm, BM_EDGES_OF_MESH, NULL) {
|
||||
|
||||
/* unrelated to flag assignment in this function - since this is the
|
||||
@ -60,7 +60,7 @@ static void bm_edgesplit_validate_seams(BMesh *bm, BMOperator *op)
|
||||
vt = &vtouch[BM_elem_index_get(e->v1)]; if (*vt < 2) (*vt)++;
|
||||
vt = &vtouch[BM_elem_index_get(e->v2)]; if (*vt < 2) (*vt)++;
|
||||
|
||||
/* while the boundry verts need to be tagged,
|
||||
/* while the boundary verts need to be tagged,
|
||||
* the edge its self can't be split */
|
||||
BMO_elem_flag_disable(bm, e, EDGE_SEAM);
|
||||
}
|
||||
@ -69,7 +69,7 @@ static void bm_edgesplit_validate_seams(BMesh *bm, BMOperator *op)
|
||||
/* single marked edges unconnected to any other marked edges
|
||||
* are illegal, go through and unmark them */
|
||||
BMO_ITER(e, &siter, bm, op, "edges", BM_EDGE) {
|
||||
/* lame, but we dont want the count to exceed 255,
|
||||
/* lame, but we don't want the count to exceed 255,
|
||||
* so just count to 2, its all we need */
|
||||
unsigned char *vt;
|
||||
vt = &vtouch[BM_elem_index_get(e->v1)]; if (*vt < 2) (*vt)++;
|
||||
|
@ -440,7 +440,7 @@ static void calc_solidify_normals(BMesh *bm)
|
||||
}
|
||||
}
|
||||
MEM_freeN(edge_face_count);
|
||||
edge_face_count = NULL; /* dont re-use */
|
||||
edge_face_count = NULL; /* don't re-use */
|
||||
|
||||
BM_ITER(v, &viter, bm, BM_VERTS_OF_MESH, NULL) {
|
||||
if (!BM_vert_is_manifold(bm, v)) {
|
||||
|
@ -432,7 +432,7 @@ void bmo_create_icosphere_exec(BMesh *bm, BMOperator *op)
|
||||
BMO_op_finish(bm, &bmop);
|
||||
}
|
||||
|
||||
/* must transform after becayse of sphere subdivision */
|
||||
/* must transform after because of sphere subdivision */
|
||||
BM_ITER(v, &viter, bm, BM_VERTS_OF_MESH, NULL) {
|
||||
if (BMO_elem_flag_test(bm, v, VERT_MARK)) {
|
||||
mul_m4_v3(mat, v->co);
|
||||
|
@ -155,7 +155,7 @@ void bmo_edgerotate_exec(BMesh *bm, BMOperator *op)
|
||||
|
||||
BMO_elem_flag_enable(bm, e2, EDGE_OUT);
|
||||
|
||||
/* dont touch again */
|
||||
/* don't touch again */
|
||||
BMO_elem_flag_enable(bm, fa, FACE_TAINT);
|
||||
BMO_elem_flag_enable(bm, fb, FACE_TAINT);
|
||||
}
|
||||
@ -702,7 +702,7 @@ static float edge_angle(BMesh *bm, BMEdge *e)
|
||||
BMIter fiter;
|
||||
BMFace *f, *f_prev = NULL;
|
||||
|
||||
/* first edge faces, dont account for 3+ */
|
||||
/* first edge faces, don't account for 3+ */
|
||||
|
||||
BM_ITER(f, &fiter, bm, BM_FACES_OF_EDGE, e) {
|
||||
if (f_prev == NULL) {
|
||||
|
@ -853,7 +853,7 @@ short paste_animedit_keys (bAnimContext *ac, ListBase *anim_data,
|
||||
}
|
||||
}
|
||||
|
||||
/* dont continue if some fcurves were pasted */
|
||||
/* don't continue if some fcurves were pasted */
|
||||
if (totmatch)
|
||||
break;
|
||||
}
|
||||
|
@ -1965,7 +1965,7 @@ float ED_rollBoneToVector(EditBone *bone, const float align_axis[3], const short
|
||||
sub_v3_v3v3(nor, bone->tail, bone->head);
|
||||
vec_roll_to_mat3(nor, 0.0f, mat);
|
||||
|
||||
/* check the bone isnt aligned with the axis */
|
||||
/* check the bone isn't aligned with the axis */
|
||||
if(!is_zero_v3(align_axis) && angle_v3v3(align_axis, mat[2]) > FLT_EPSILON) {
|
||||
float vec[3], align_axis_proj[3], roll;
|
||||
|
||||
@ -2153,7 +2153,7 @@ static void undoBones_to_editBones(void *uarmv, void *armv, void *UNUSED(data))
|
||||
for(newebo= arm->edbo->first; newebo; newebo= newebo->next) {
|
||||
if(newebo->parent) newebo->parent= newebo->parent->temp;
|
||||
}
|
||||
/* be sure they dont hang ever */
|
||||
/* be sure they don't hang ever */
|
||||
for(newebo= arm->edbo->first; newebo; newebo= newebo->next) {
|
||||
newebo->temp= NULL;
|
||||
}
|
||||
@ -3386,7 +3386,7 @@ static int armature_extrude_exec(bContext *C, wmOperator *op)
|
||||
newbone->zwidth= ebone->zwidth;
|
||||
newbone->ease1= ebone->ease1;
|
||||
newbone->ease2= ebone->ease2;
|
||||
newbone->rad_head= ebone->rad_tail; // dont copy entire bone...
|
||||
newbone->rad_head= ebone->rad_tail; // don't copy entire bone...
|
||||
newbone->rad_tail= ebone->rad_tail;
|
||||
newbone->segments= 1;
|
||||
newbone->layer= ebone->layer;
|
||||
|
@ -2256,13 +2256,13 @@ static int smooth_radius_exec(bContext *C, wmOperator *UNUSED(op))
|
||||
/* if endpoints selected, then use them */
|
||||
if (start_sel==0) {
|
||||
start_rad = (nu->bezt+start_sel)->radius;
|
||||
start_sel++; /* we dont want to edit the selected endpoint */
|
||||
start_sel++; /* we don't want to edit the selected endpoint */
|
||||
} else {
|
||||
start_rad = (nu->bezt+start_sel-1)->radius;
|
||||
}
|
||||
if (end_sel==nu->pntsu-1) {
|
||||
end_rad = (nu->bezt+end_sel)->radius;
|
||||
end_sel--; /* we dont want to edit the selected endpoint */
|
||||
end_sel--; /* we don't want to edit the selected endpoint */
|
||||
} else {
|
||||
end_rad = (nu->bezt+end_sel+1)->radius;
|
||||
}
|
||||
@ -2318,13 +2318,13 @@ static int smooth_radius_exec(bContext *C, wmOperator *UNUSED(op))
|
||||
/* if endpoints selected, then use them */
|
||||
if (start_sel==0) {
|
||||
start_rad = (nu->bp+start_sel)->radius;
|
||||
start_sel++; /* we dont want to edit the selected endpoint */
|
||||
start_sel++; /* we don't want to edit the selected endpoint */
|
||||
} else {
|
||||
start_rad = (nu->bp+start_sel-1)->radius;
|
||||
}
|
||||
if (end_sel==nu->pntsu-1) {
|
||||
end_rad = (nu->bp+end_sel)->radius;
|
||||
end_sel--; /* we dont want to edit the selected endpoint */
|
||||
end_sel--; /* we don't want to edit the selected endpoint */
|
||||
} else {
|
||||
end_rad = (nu->bp+end_sel+1)->radius;
|
||||
}
|
||||
|
@ -79,7 +79,7 @@ typedef enum eDrawStrokeFlags {
|
||||
GP_DRAWDATA_ONLYV2D = (1<<2), /* only draw 'canvas' strokes */
|
||||
GP_DRAWDATA_ONLYI2D = (1<<3), /* only draw 'image' strokes */
|
||||
GP_DRAWDATA_IEDITHACK = (1<<4), /* special hack for drawing strokes in Image Editor (weird coordinates) */
|
||||
GP_DRAWDATA_NO_XRAY = (1<<5), /* dont draw xray in 3D view (which is default) */
|
||||
GP_DRAWDATA_NO_XRAY = (1<<5), /* don't draw xray in 3D view (which is default) */
|
||||
} eDrawStrokeFlags;
|
||||
|
||||
|
||||
@ -298,7 +298,7 @@ static void gp_draw_stroke (bGPDspoint *points, int totpoints, short thickness_s
|
||||
|
||||
for (i=0, pt1=points, pt2=points+1; i < (totpoints-1); i++, pt1++, pt2++) {
|
||||
float s0[2], s1[2]; /* segment 'center' points */
|
||||
float t0[2], t1[2]; /* tesselated coordinates */
|
||||
float t0[2], t1[2]; /* tessellated coordinates */
|
||||
float m1[2], m2[2]; /* gradient and normal */
|
||||
float mt[2], sc[2]; /* gradient for thickness, point for end-cap */
|
||||
float pthick; /* thickness at segment point */
|
||||
@ -513,7 +513,7 @@ static void gp_draw_strokes (bGPDframe *gpf, int offsx, int offsy, int winx, int
|
||||
glDepthMask(0);
|
||||
glEnable(GL_DEPTH_TEST);
|
||||
|
||||
/* first arg is normally rv3d->dist, but this isnt available here and seems to work quite well without */
|
||||
/* first arg is normally rv3d->dist, but this isn't available here and seems to work quite well without */
|
||||
bglPolygonOffset(1.0f, 1.0f);
|
||||
#if 0
|
||||
glEnable(GL_POLYGON_OFFSET_LINE);
|
||||
@ -783,7 +783,7 @@ void draw_gpencil_view3d (Scene *scene, View3D *v3d, ARegion *ar, short only3d)
|
||||
gpd= gpencil_data_get_active_v3d(scene); // XXX
|
||||
if (gpd == NULL) return;
|
||||
|
||||
/* when rendering to the offscreen buffer we dont want to
|
||||
/* when rendering to the offscreen buffer we don't want to
|
||||
* deal with the camera border, otherwise map the coords to the camera border. */
|
||||
if ((rv3d->persp == RV3D_CAMOB) && !(G.f & G_RENDER_OGL)) {
|
||||
rctf rectf;
|
||||
|
@ -561,7 +561,7 @@ static short mirror_gpf_xaxis (bGPDframe *gpf, Scene *scene)
|
||||
static short mirror_gpf_marker (bGPDframe *gpf, Scene *scene)
|
||||
{
|
||||
static TimeMarker *marker;
|
||||
static short initialised = 0;
|
||||
static short initialized = 0;
|
||||
int diff;
|
||||
|
||||
/* In order for this mirror function to work without
|
||||
@ -581,16 +581,16 @@ static short mirror_gpf_marker (bGPDframe *gpf, Scene *scene)
|
||||
}
|
||||
else {
|
||||
/* initialization time */
|
||||
if (initialised) {
|
||||
if (initialized) {
|
||||
/* reset everything for safety */
|
||||
marker = NULL;
|
||||
initialised = 0;
|
||||
initialized = 0;
|
||||
}
|
||||
else {
|
||||
/* try to find a marker */
|
||||
marker= ED_markers_get_first_selected(&scene->markers);
|
||||
if(marker) {
|
||||
initialised= 1;
|
||||
initialized= 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -706,7 +706,7 @@ int uiButActiveOnly(const bContext *C, uiBlock *block, uiBut *but)
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* use to check if we need to disable undo, but dont make any changes
|
||||
/* use to check if we need to disable undo, but don't make any changes
|
||||
* returns FALSE if undo needs to be disabled. */
|
||||
static int ui_but_is_rna_undo(uiBut *but)
|
||||
{
|
||||
@ -1880,7 +1880,7 @@ void ui_set_but_soft_range(uiBut *but, double value)
|
||||
{
|
||||
/* ideally we would not limit this but practically, its more then
|
||||
* enough worst case is very long vectors wont use a smart soft-range
|
||||
* which isnt so bad. */
|
||||
* which isn't so bad. */
|
||||
|
||||
if(but->rnaprop) {
|
||||
const PropertyType type= RNA_property_type(but->rnaprop);
|
||||
@ -2957,7 +2957,7 @@ void autocomplete_end(AutoComplete *autocpl, char *autoname)
|
||||
if(autocpl->truncate[0])
|
||||
BLI_strncpy(autoname, autocpl->truncate, autocpl->maxlen);
|
||||
else {
|
||||
if (autoname != autocpl->startname) /* dont copy a string over its self */
|
||||
if (autoname != autocpl->startname) /* don't copy a string over its self */
|
||||
BLI_strncpy(autoname, autocpl->startname, autocpl->maxlen);
|
||||
}
|
||||
MEM_freeN(autocpl->truncate);
|
||||
|
@ -1052,7 +1052,7 @@ void ui_draw_but_COLORBAND(uiBut *but, uiWidgetColors *UNUSED(wcol), rcti *rect)
|
||||
float x1, y1, sizex, sizey;
|
||||
float v3[2], v1[2], v2[2], v1a[2], v2a[2];
|
||||
int a;
|
||||
float pos, colf[4]= {0,0,0,0}; /* initialize in case the colorband isnt valid */
|
||||
float pos, colf[4]= {0,0,0,0}; /* initialize in case the colorband isn't valid */
|
||||
|
||||
coba= (ColorBand *)(but->editcoba? but->editcoba: but->poin);
|
||||
if(coba==NULL) return;
|
||||
|
@ -349,7 +349,7 @@ static void ui_apply_autokey_undo(bContext *C, uiBut *but)
|
||||
else if(but->drawstr[0]) str= but->drawstr;
|
||||
else str= but->tip;
|
||||
|
||||
/* fallback, else we dont get an undo! */
|
||||
/* fallback, else we don't get an undo! */
|
||||
if(str == NULL || str[0] == '\0') {
|
||||
str= "Unknown Action";
|
||||
}
|
||||
@ -1647,7 +1647,7 @@ static void ui_textedit_end(bContext *C, uiBut *but, uiHandleButtonData *data)
|
||||
int strip= BLI_utf8_invalid_strip(but->editstr, strlen(but->editstr));
|
||||
/* not a file?, strip non utf-8 chars */
|
||||
if(strip) {
|
||||
/* wont happen often so isnt that annoying to keep it here for a while */
|
||||
/* wont happen often so isn't that annoying to keep it here for a while */
|
||||
printf("%s: invalid utf8 - stripped chars %d\n", __func__, strip);
|
||||
}
|
||||
}
|
||||
|
@ -1589,7 +1589,7 @@ void uiItemMenuF(uiLayout *layout, const char *name, int icon, uiMenuCreateFunc
|
||||
|
||||
typedef struct MenuItemLevel {
|
||||
int opcontext;
|
||||
/* dont use pointers to the strings because python can dynamically
|
||||
/* don't use pointers to the strings because python can dynamically
|
||||
* allocate strings and free before the menu draws, see [#27304] */
|
||||
char opname[OP_MAX_TYPENAME];
|
||||
char propname[MAX_IDPROP_NAME];
|
||||
|
@ -307,7 +307,7 @@ static int reset_default_button_exec(bContext *C, wmOperator *op)
|
||||
}
|
||||
}
|
||||
|
||||
/* Since we dont want to undo _all_ edits to settings, eg window
|
||||
/* Since we don't want to undo _all_ edits to settings, eg window
|
||||
* edits on the screen or on operator settings.
|
||||
* it might be better to move undo's inline - campbell */
|
||||
if(success) {
|
||||
|
@ -617,7 +617,7 @@ static int get_panel_size_y(Panel *pa)
|
||||
return PNL_HEADER + pa->sizey;
|
||||
}
|
||||
|
||||
/* this function is needed because uiBlock and Panel itself dont
|
||||
/* this function is needed because uiBlock and Panel itself don't
|
||||
* change sizey or location when closed */
|
||||
static int get_panel_real_ofsy(Panel *pa)
|
||||
{
|
||||
@ -1001,7 +1001,7 @@ static void ui_do_drag(const bContext *C, wmEvent *event, Panel *panel)
|
||||
|
||||
|
||||
/* this function is supposed to call general window drawing too */
|
||||
/* also it supposes a block has panel, and isnt a menu */
|
||||
/* also it supposes a block has panel, and isn't a menu */
|
||||
static void ui_handle_panel_header(const bContext *C, uiBlock *block, int mx, int my, int event)
|
||||
{
|
||||
ScrArea *sa= CTX_wm_area(C);
|
||||
|
@ -1282,7 +1282,7 @@ static void ui_block_position(wmWindow *window, ARegion *butregion, uiBut *but,
|
||||
if(dir2==0) if(dir1==UI_LEFT || dir1==UI_RIGHT) dir2= UI_DOWN;
|
||||
if(dir2==0) if(dir1==UI_TOP || dir1==UI_DOWN) dir2= UI_LEFT;
|
||||
|
||||
/* no space at all? dont change */
|
||||
/* no space at all? don't change */
|
||||
if(left || right) {
|
||||
if(dir1==UI_LEFT && left==0) dir1= UI_RIGHT;
|
||||
if(dir1==UI_RIGHT && right==0) dir1= UI_LEFT;
|
||||
|
@ -793,9 +793,9 @@ static uiLayout *draw_modifier(uiLayout *layout, Scene *scene, Object *ob,
|
||||
}
|
||||
} /* tessellation point for curve-typed objects */
|
||||
else if (ELEM3(ob->type, OB_CURVE, OB_SURF, OB_FONT)) {
|
||||
/* some modifiers could work with pre-tesselated curves only */
|
||||
/* some modifiers could work with pre-tessellated curves only */
|
||||
if (ELEM3(md->type, eModifierType_Hook, eModifierType_Softbody, eModifierType_MeshDeform)) {
|
||||
/* add disabled pre-tesselated button, so users could have
|
||||
/* add disabled pre-tessellated button, so users could have
|
||||
* message for this modifiers */
|
||||
but = uiDefIconButBitI(block, TOG, eModifierMode_ApplyOnSpline, 0, ICON_SURFACE_DATA, 0, 0, UI_UNIT_X-2, UI_UNIT_Y, &md->mode, 0.0, 0.0, 0.0, 0.0,
|
||||
TIP_("This modifier could be applied on splines' points only"));
|
||||
@ -1579,7 +1579,7 @@ static void curvemap_buttons_zoom_out(bContext *C, void *cumap_v, void *UNUSED(u
|
||||
CurveMapping *cumap = cumap_v;
|
||||
float d, d1;
|
||||
|
||||
/* we allow 20 times zoom, but dont view outside clip */
|
||||
/* we allow 20 times zoom, but don't view outside clip */
|
||||
if( (cumap->curr.xmax - cumap->curr.xmin) < 20.0f*(cumap->clipr.xmax - cumap->clipr.xmin) ) {
|
||||
d= d1= 0.15f*(cumap->curr.xmax - cumap->curr.xmin);
|
||||
|
||||
|
@ -161,7 +161,7 @@ static void view2d_masks(View2D *v2d)
|
||||
* - for some of these presets, it is expected that the region will have defined some
|
||||
* additional settings necessary for the customisation of the 2D viewport to its requirements
|
||||
* - this function should only be called from region init() callbacks, where it is expected that
|
||||
* this is called before UI_view2d_size_update(), as this one checks that the rects are properly initialised.
|
||||
* this is called before UI_view2d_size_update(), as this one checks that the rects are properly initialized.
|
||||
*/
|
||||
void UI_view2d_region_reinit(View2D *v2d, short type, int winx, int winy)
|
||||
{
|
||||
@ -170,7 +170,7 @@ void UI_view2d_region_reinit(View2D *v2d, short type, int winx, int winy)
|
||||
|
||||
/* initialize data if there is a need for such */
|
||||
if ((v2d->flag & V2D_IS_INITIALISED) == 0) {
|
||||
/* set initialised flag so that View2D doesn't get reinitialised next time again */
|
||||
/* set initialized flag so that View2D doesn't get reinitialised next time again */
|
||||
v2d->flag |= V2D_IS_INITIALISED;
|
||||
|
||||
init= 1;
|
||||
|
@ -1547,7 +1547,7 @@ static int scroller_activate_invoke(bContext *C, wmOperator *op, wmEvent *event)
|
||||
if ( ((vsm->scroller=='h') && (v2d->keepofs & V2D_LOCKOFS_X)) ||
|
||||
((vsm->scroller=='v') && (v2d->keepofs & V2D_LOCKOFS_Y)) )
|
||||
{
|
||||
/* free customdata initialised */
|
||||
/* free customdata initialized */
|
||||
scroller_activate_exit(C, op);
|
||||
|
||||
/* can't catch this event for ourselves, so let it go to someone else? */
|
||||
@ -1559,7 +1559,7 @@ static int scroller_activate_invoke(bContext *C, wmOperator *op, wmEvent *event)
|
||||
if ( ((vsm->scroller=='h') && (v2d->scroll & (V2D_SCROLL_HORIZONTAL_HIDE|V2D_SCROLL_HORIZONTAL_FULLR))) ||
|
||||
((vsm->scroller=='v') && (v2d->scroll & (V2D_SCROLL_VERTICAL_HIDE|V2D_SCROLL_VERTICAL_FULLR))) )
|
||||
{
|
||||
/* free customdata initialised */
|
||||
/* free customdata initialized */
|
||||
scroller_activate_exit(C, op);
|
||||
|
||||
/* can't catch this event for ourselves, so let it go to someone else? */
|
||||
|
@ -421,7 +421,7 @@ void EDBM_select_more(BMEditMesh *em)
|
||||
"regionextend geom=%hvef constrict=%b use_faces=%b",
|
||||
BM_ELEM_SELECT, FALSE, use_faces);
|
||||
BMO_op_exec(em->bm, &bmop);
|
||||
/* dont flush selection in edge/vertex mode */
|
||||
/* don't flush selection in edge/vertex mode */
|
||||
BMO_slot_buffer_hflag_enable(em->bm, &bmop, "geomout", BM_ELEM_SELECT, BM_ALL, use_faces ? TRUE : FALSE);
|
||||
BMO_op_finish(em->bm, &bmop);
|
||||
|
||||
@ -437,7 +437,7 @@ void EDBM_select_less(BMEditMesh *em)
|
||||
"regionextend geom=%hvef constrict=%b use_faces=%b",
|
||||
BM_ELEM_SELECT, TRUE, use_faces);
|
||||
BMO_op_exec(em->bm, &bmop);
|
||||
/* dont flush selection in edge/vertex mode */
|
||||
/* don't flush selection in edge/vertex mode */
|
||||
BMO_slot_buffer_hflag_disable(em->bm, &bmop, "geomout", BM_ELEM_SELECT, BM_ALL, use_faces ? TRUE : FALSE);
|
||||
BMO_op_finish(em->bm, &bmop);
|
||||
|
||||
|
@ -288,7 +288,7 @@ int ED_mesh_uv_loop_reset(struct bContext *C, struct Mesh *me)
|
||||
fuvs += len;
|
||||
}
|
||||
|
||||
/* BMESH_TODO: Copy poly UVs onto CD_MTFACE layer for tesselated faces */
|
||||
/* BMESH_TODO: Copy poly UVs onto CD_MTFACE layer for tessellated faces */
|
||||
|
||||
BLI_array_free(uvs);
|
||||
BLI_array_free(polylengths);
|
||||
@ -762,7 +762,7 @@ void ED_mesh_update(Mesh *mesh, bContext *C, int calc_edges, int calc_tessface)
|
||||
if(mesh->totface > 0 && mesh->totpoly == 0) {
|
||||
convert_mfaces_to_mpolys(mesh);
|
||||
|
||||
/* would only be converting back again, dont bother */
|
||||
/* would only be converting back again, don't bother */
|
||||
tessface_input = TRUE;
|
||||
|
||||
/* it also happens that converting the faces calculates edges, skip this */
|
||||
@ -787,8 +787,8 @@ void ED_mesh_update(Mesh *mesh, bContext *C, int calc_edges, int calc_tessface)
|
||||
* calculate normals only for the mvert's. - campbell */
|
||||
#ifdef USE_BMESH_MPOLY_NORMALS
|
||||
polyindex = CustomData_get_layer(&mesh->fdata, CD_POLYINDEX);
|
||||
/* add a normals layer for tesselated faces, a tessface normal will
|
||||
* contain the normal of the poly the face was tesselated from. */
|
||||
/* add a normals layer for tessellated faces, a tessface normal will
|
||||
* contain the normal of the poly the face was tessellated from. */
|
||||
face_nors = CustomData_add_layer(&mesh->fdata, CD_NORMAL, CD_CALLOC, NULL, mesh->totface);
|
||||
|
||||
mesh_calc_normals_mapping_ex(mesh->mvert, mesh->totvert,
|
||||
@ -870,7 +870,7 @@ static void mesh_add_edges(Mesh *mesh, int len)
|
||||
|
||||
CustomData_free(&mesh->edata, mesh->totedge);
|
||||
mesh->edata= edata;
|
||||
mesh_update_customdata_pointers(mesh, FALSE); /* new edges dont change tessellation */
|
||||
mesh_update_customdata_pointers(mesh, FALSE); /* new edges don't change tessellation */
|
||||
|
||||
/* set default flags */
|
||||
medge= &mesh->medge[mesh->totedge];
|
||||
|
@ -1160,7 +1160,7 @@ static int pose_constraints_clear_exec(bContext *C, wmOperator *UNUSED(op))
|
||||
/* force depsgraph to get recalculated since relationships removed */
|
||||
DAG_scene_sort(bmain, scene); /* sort order of objects */
|
||||
|
||||
/* note, calling BIK_clear_data() isnt needed here */
|
||||
/* note, calling BIK_clear_data() isn't needed here */
|
||||
|
||||
/* do updates */
|
||||
DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
|
||||
|
@ -553,7 +553,7 @@ static int modifier_apply_obdata(ReportList *reports, Scene *scene, Object *ob,
|
||||
}
|
||||
|
||||
cu = ob->data;
|
||||
BKE_report(reports, RPT_INFO, "Applied modifier only changed CV points, not tesselated/bevel vertices");
|
||||
BKE_report(reports, RPT_INFO, "Applied modifier only changed CV points, not tessellated/bevel vertices");
|
||||
|
||||
vertexCos = curve_getVertexCos(cu, &cu->nurb, &numVerts);
|
||||
mti->deformVerts(md, ob, NULL, vertexCos, numVerts, 0, 0);
|
||||
|
@ -224,7 +224,7 @@ static int object_shape_key_mirror(bContext *C, Object *ob)
|
||||
/* half but found up odd value */
|
||||
const int pntsu_half = (lt->pntsu / 2) + (lt->pntsu % 2);
|
||||
|
||||
/* currently editmode isnt supported by mesh so
|
||||
/* currently editmode isn't supported by mesh so
|
||||
* ignore here for now too */
|
||||
|
||||
/* if(lt->editlatt) lt= lt->editlatt->latt; */
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user