Cleanup: spelling, comments
This commit is contained in:
parent
d5163e06c3
commit
aec9e0e1b6
|
@ -61,7 +61,7 @@ typedef struct PoseTree {
|
|||
int stretch; /* disable stretching */
|
||||
} PoseTree;
|
||||
|
||||
/* Core armature functionality */
|
||||
/* Core armature functionality. */
|
||||
|
||||
struct bArmature *BKE_armature_add(struct Main *bmain, const char *name);
|
||||
struct bArmature *BKE_armature_from_object(struct Object *ob);
|
||||
|
|
|
@ -29,7 +29,7 @@ extern "C" {
|
|||
|
||||
struct ColorBand;
|
||||
|
||||
/* in ColorBand struct */
|
||||
/** #ColorBand.data length. */
|
||||
#define MAXCOLORBAND 32
|
||||
|
||||
void BKE_colorband_init(struct ColorBand *coba, bool rangetype);
|
||||
|
|
|
@ -66,7 +66,7 @@ typedef struct SubdivSettings {
|
|||
|
||||
/* This refers to an adaptive isolation when creating patches for the subdivided surface.
|
||||
*
|
||||
* When is set to to false (aka uniform subdivision) fixed depth of isolation is used, which
|
||||
* When is set to false (aka uniform subdivision) fixed depth of isolation is used, which
|
||||
* allows to iteratively add more subdivisions (uniform subdivision level 2 = uniform subdivision
|
||||
* level 1 + uniform subdivision level 1). Uniform subdivisions will progressively go to a limit
|
||||
* surface.
|
||||
|
|
|
@ -39,7 +39,7 @@ struct Tex;
|
|||
struct TexMapping;
|
||||
struct TexResult;
|
||||
|
||||
/* in ColorBand struct */
|
||||
/** #ColorBand.data length. */
|
||||
#define MAXCOLORBAND 32
|
||||
|
||||
void BKE_texture_default(struct Tex *tex);
|
||||
|
|
|
@ -472,9 +472,9 @@ static void contarget_get_mesh_mat(Object *ob, const char *substring, float mat[
|
|||
|
||||
/* derive the rotation from the average normal:
|
||||
* - code taken from transform_gizmo.c,
|
||||
* calc_gizmo_stats, V3D_ORIENT_NORMAL case
|
||||
*/
|
||||
/* we need the transpose of the inverse for a normal... */
|
||||
* calc_gizmo_stats, V3D_ORIENT_NORMAL case */
|
||||
|
||||
/* We need the transpose of the inverse for a normal. */
|
||||
copy_m3_m4(imat, ob->obmat);
|
||||
|
||||
invert_m3_m3(tmat, imat);
|
||||
|
@ -577,7 +577,7 @@ static void constraint_target_to_mat4(Object *ob,
|
|||
copy_m4_m4(mat, ob->obmat);
|
||||
BKE_constraint_mat_convertspace(ob, NULL, mat, from, to, false);
|
||||
}
|
||||
/* Case VERTEXGROUP */
|
||||
/* Case VERTEXGROUP */
|
||||
/* Current method just takes the average location of all the points in the
|
||||
* VertexGroup, and uses that as the location value of the targets. Where
|
||||
* possible, the orientation will also be calculated, by calculating an
|
||||
|
|
|
@ -144,7 +144,7 @@ static int face_to_vert_index(SGLSLDisplistToTangent *dlt,
|
|||
v += 1;
|
||||
}
|
||||
|
||||
/* Cyclic correction. */
|
||||
/* Cyclic correction. */
|
||||
u = u % dlt->dl->nr;
|
||||
v = v % dlt->dl->parts;
|
||||
|
||||
|
|
|
@ -430,7 +430,7 @@ bool BKE_gpencil_stroke_sample(bGPDstroke *gps, const float dist, const bool sel
|
|||
stroke_interpolate_deform_weights(gps, 0, 0, 0, &new_dv[0]);
|
||||
}
|
||||
|
||||
/* the rest */
|
||||
/* The rest. */
|
||||
while ((next_point_index = stroke_march_next_point(gps,
|
||||
next_point_index,
|
||||
last_coord,
|
||||
|
|
|
@ -952,7 +952,7 @@ static void do_key(const int start,
|
|||
k3 = key_block_get_data(key, actkb, k[2], &freek3);
|
||||
k4 = key_block_get_data(key, actkb, k[3], &freek4);
|
||||
|
||||
/* test for more or less points (per key!) */
|
||||
/* Test for more or less points (per key!) */
|
||||
if (tot != k[0]->totelem) {
|
||||
k1tot = 0.0;
|
||||
flagflo |= 1;
|
||||
|
|
|
@ -182,8 +182,7 @@ static void multires_reshape_vertcos_foreach_vertex_every_edge(
|
|||
multires_reshape_vertcos_foreach_vertex(foreach_context, &ptex_coord, subdiv_vertex_index);
|
||||
}
|
||||
|
||||
/* Set displacement grids values at a reshape level to a object coordinates of the the given
|
||||
* source. */
|
||||
/* Set displacement grids values at a reshape level to a object coordinates of the given source. */
|
||||
bool multires_reshape_assign_final_coords_from_vertcos(
|
||||
const MultiresReshapeContext *reshape_context,
|
||||
const float (*vert_coords)[3],
|
||||
|
|
|
@ -2499,15 +2499,14 @@ static ImBuf *do_transform_effect(const SeqRenderData *context,
|
|||
/*********************** Glow *************************/
|
||||
|
||||
static void RVBlurBitmap2_float(float *map, int width, int height, float blur, int quality)
|
||||
/* MUUUCCH better than the previous blur. */
|
||||
/* We do the blurring in two passes which is a whole lot faster. */
|
||||
/* I changed the math around to implement an actual Gaussian */
|
||||
/* distribution. */
|
||||
/* */
|
||||
/* Watch out though, it tends to misbehaven with large blur values on */
|
||||
/* a small bitmap. Avoid avoid avoid. */
|
||||
/*=============================== */
|
||||
{
|
||||
/* Much better than the previous blur!
|
||||
* We do the blurring in two passes which is a whole lot faster.
|
||||
* I changed the math around to implement an actual Gaussian distribution.
|
||||
*
|
||||
* Watch out though, it tends to misbehave with large blur values on
|
||||
* a small bitmap. Avoid avoid! */
|
||||
|
||||
float *temp = NULL, *swap;
|
||||
float *filter = NULL;
|
||||
int x, y, i, fx, fy;
|
||||
|
|
|
@ -244,7 +244,7 @@ static void image_camera_background_matrix_get(const Camera *cam,
|
|||
unit_m4(scale);
|
||||
unit_m4(translate);
|
||||
|
||||
/* Normalized Object space camera frame corners. */
|
||||
/* Normalized Object space camera frame corners. */
|
||||
float cam_corners[4][3];
|
||||
BKE_camera_view_frame(draw_ctx->scene, cam, cam_corners);
|
||||
float cam_width = fabsf(cam_corners[0][0] - cam_corners[3][0]);
|
||||
|
|
|
@ -742,7 +742,7 @@ static int armature_symmetrize_exec(bContext *C, wmOperator *op)
|
|||
}
|
||||
}
|
||||
|
||||
/* Find the selected bones and duplicate them as needed, with mirrored name */
|
||||
/* Find the selected bones and duplicate them as needed, with mirrored name. */
|
||||
for (ebone_iter = arm->edbo->first; ebone_iter && ebone_iter != ebone_first_dupe;
|
||||
ebone_iter = ebone_iter->next) {
|
||||
if (EBONE_VISIBLE(arm, ebone_iter) && (ebone_iter->flag & BONE_SELECTED) &&
|
||||
|
@ -765,7 +765,7 @@ static int armature_symmetrize_exec(bContext *C, wmOperator *op)
|
|||
}
|
||||
}
|
||||
|
||||
/* Run through the list and fix the pointers */
|
||||
/* Run through the list and fix the pointers. */
|
||||
for (ebone_iter = arm->edbo->first; ebone_iter && ebone_iter != ebone_first_dupe;
|
||||
ebone_iter = ebone_iter->next) {
|
||||
if (ebone_iter->temp.ebone) {
|
||||
|
@ -1116,7 +1116,7 @@ static int armature_bone_primitive_add_exec(bContext *C, wmOperator *op)
|
|||
|
||||
ED_armature_edit_deselect_all(obedit);
|
||||
|
||||
/* Create a bone */
|
||||
/* Create a bone. */
|
||||
bone = ED_armature_ebone_add(obedit->data, name);
|
||||
|
||||
copy_v3_v3(bone->head, curs);
|
||||
|
|
|
@ -280,7 +280,7 @@ int join_armature_exec(bContext *C, wmOperator *op)
|
|||
float mat[4][4], oimat[4][4];
|
||||
bool ok = false;
|
||||
|
||||
/* Ensure we're not in editmode and that the active object is an armature*/
|
||||
/* Ensure we're not in edit-mode and that the active object is an armature. */
|
||||
if (!ob_active || ob_active->type != OB_ARMATURE) {
|
||||
return OPERATOR_CANCELLED;
|
||||
}
|
||||
|
|
|
@ -1003,7 +1003,7 @@ static int armature_de_select_all_exec(bContext *C, wmOperator *op)
|
|||
CTX_DATA_END;
|
||||
}
|
||||
|
||||
/* Set the flags */
|
||||
/* Set the flags. */
|
||||
CTX_DATA_BEGIN (C, EditBone *, ebone, visible_bones) {
|
||||
/* ignore bone if selection can't change */
|
||||
switch (action) {
|
||||
|
|
|
@ -562,7 +562,7 @@ static EditBone *make_boneList_rec(ListBase *edbo,
|
|||
|
||||
BLI_addtail(edbo, eBone);
|
||||
|
||||
/* Add children if necessary */
|
||||
/* Add children if necessary. */
|
||||
if (curBone->childbase.first) {
|
||||
eBoneTest = make_boneList_rec(edbo, &curBone->childbase, eBone, actBone);
|
||||
if (eBoneTest) {
|
||||
|
@ -721,7 +721,7 @@ void ED_armature_from_edit(Main *bmain, bArmature *arm)
|
|||
}
|
||||
}
|
||||
|
||||
/* Copy the bones from the editData into the armature */
|
||||
/* Copy the bones from the edit-data into the armature. */
|
||||
for (eBone = arm->edbo->first; eBone; eBone = eBone->next) {
|
||||
newBone = MEM_callocN(sizeof(Bone), "bone");
|
||||
eBone->temp.bone = newBone; /* Associate the real Bones with the EditBones */
|
||||
|
@ -819,7 +819,7 @@ void ED_armature_edit_free(struct bArmature *arm)
|
|||
{
|
||||
EditBone *eBone;
|
||||
|
||||
/* Clear the editbones list */
|
||||
/* Clear the edit-bones list. */
|
||||
if (arm->edbo) {
|
||||
if (arm->edbo->first) {
|
||||
for (eBone = arm->edbo->first; eBone; eBone = eBone->next) {
|
||||
|
|
|
@ -497,7 +497,7 @@ static int pose_de_select_all_exec(bContext *C, wmOperator *op)
|
|||
|
||||
Object *ob_prev = NULL;
|
||||
|
||||
/* Set the flags */
|
||||
/* Set the flags. */
|
||||
CTX_DATA_BEGIN_WITH_ID (C, bPoseChannel *, pchan, visible_pose_bones, Object *, ob) {
|
||||
bArmature *arm = ob->data;
|
||||
pose_do_bone_select(pchan, action);
|
||||
|
|
|
@ -4249,7 +4249,7 @@ static int gp_stroke_separate_exec(bContext *C, wmOperator *op)
|
|||
if (ED_gpencil_stroke_color_use(ob, gpl, gps) == false) {
|
||||
continue;
|
||||
}
|
||||
/* separate selected strokes */
|
||||
/* Separate selected strokes. */
|
||||
if (gps->flag & GP_STROKE_SELECT) {
|
||||
/* add layer if not created before */
|
||||
if (gpl_dst == NULL) {
|
||||
|
@ -4422,7 +4422,7 @@ static int gp_stroke_split_exec(bContext *C, wmOperator *UNUSED(op))
|
|||
if (ED_gpencil_stroke_color_use(ob, gpl, gps) == false) {
|
||||
continue;
|
||||
}
|
||||
/* split selected strokes */
|
||||
/* Split selected strokes. */
|
||||
if (gps->flag & GP_STROKE_SELECT) {
|
||||
/* make copy of source stroke */
|
||||
bGPDstroke *gps_dst = BKE_gpencil_stroke_duplicate(gps, true);
|
||||
|
|
|
@ -493,8 +493,10 @@ void paintvert_tag_select_update(struct bContext *C, struct Object *ob)
|
|||
WM_event_add_notifier(C, NC_GEOM | ND_SELECT, ob->data);
|
||||
}
|
||||
|
||||
/* note: if the caller passes false to flush_flags,
|
||||
* then they will need to run paintvert_flush_flags(ob) themselves */
|
||||
/**
|
||||
* \note if the caller passes false to flush_flags,
|
||||
* then they will need to run #paintvert_flush_flags(ob) themselves.
|
||||
*/
|
||||
bool paintvert_deselect_all_visible(Object *ob, int action, bool flush_flags)
|
||||
{
|
||||
Mesh *me;
|
||||
|
|
|
@ -460,7 +460,7 @@ static bool pose_face_sets_floodfill_cb(
|
|||
|
||||
if (symmetry_check && !SCULPT_vertex_has_unique_face_set(ss, index)) {
|
||||
|
||||
/* We only add coordiates for calculating the origin when it is possible to go from this
|
||||
/* We only add coordinates for calculating the origin when it is possible to go from this
|
||||
* vertex to another vertex in a valid face set for the next iteration. */
|
||||
bool count_as_boundary = false;
|
||||
|
||||
|
|
|
@ -714,7 +714,7 @@ static UndoImageBuf *ubuf_lookup_from_reference(ImageUndoStep *us_prev,
|
|||
int tile_number,
|
||||
const UndoImageBuf *ubuf)
|
||||
{
|
||||
/* Use name lookup because because the pointer is cleared for previous steps. */
|
||||
/* Use name lookup because the pointer is cleared for previous steps. */
|
||||
UndoImageHandle *uh_prev = uhandle_lookup_by_name(&us_prev->handles, image, tile_number);
|
||||
if (uh_prev != NULL) {
|
||||
UndoImageBuf *ubuf_reference = uhandle_lookup_ubuf(uh_prev, image, ubuf->ibuf_name);
|
||||
|
|
|
@ -69,7 +69,7 @@ struct HierarchyContext {
|
|||
* have weak_export=true, this object (and by recursive reasoning all its descendants) will be
|
||||
* excluded from the export.
|
||||
*
|
||||
* The export hierarchy is kept as close to the the hierarchy in Blender as possible. As such, an
|
||||
* The export hierarchy is kept as close to the hierarchy in Blender as possible. As such, an
|
||||
* object that serves as a parent for another object, but which should NOT be exported itself, is
|
||||
* exported only as transform (i.e. as empty). This happens with objects that are part of a
|
||||
* holdout collection (which prevents them from being exported) but also parent of an exported
|
||||
|
|
|
@ -93,7 +93,7 @@ const EnumPropertyItem rna_enum_object_modifier_type_items[] = {
|
|||
"UV_WARP",
|
||||
ICON_MOD_UVPROJECT,
|
||||
"UV Warp",
|
||||
"Transform the UV map using the the difference between two objects"},
|
||||
"Transform the UV map using the difference between two objects"},
|
||||
{eModifierType_WeightVGEdit,
|
||||
"VERTEX_WEIGHT_EDIT",
|
||||
ICON_MOD_VERTEX_WEIGHT,
|
||||
|
|
|
@ -1144,7 +1144,7 @@ static void deformVert(void *__restrict userdata,
|
|||
const float weight = (data->weights != NULL) ? data->weights[index] : 1.0f;
|
||||
|
||||
/* Check if this vertex will be deformed. If it is not deformed we return and avoid
|
||||
* unneccessary calculations. */
|
||||
* unnecessary calculations. */
|
||||
if (weight == 0.0f) {
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -1047,8 +1047,8 @@ void wm_homefile_read(bContext *C,
|
|||
}
|
||||
|
||||
if (use_userdef) {
|
||||
/* Clear keymaps because the current default keymap may have been initialized
|
||||
* from user preferences, which have been reset. */
|
||||
/* Clear keymaps because the current default keymap may have been initialized
|
||||
* from user preferences, which have been reset. */
|
||||
for (wmWindowManager *wm = bmain->wm.first; wm; wm = wm->id.next) {
|
||||
if (wm->defaultconf) {
|
||||
wm->defaultconf->flag &= ~KEYCONF_INIT_DEFAULT;
|
||||
|
@ -1532,7 +1532,7 @@ void wm_autosave_timer(Main *bmain, wmWindowManager *wm, wmTimer *UNUSED(wt))
|
|||
}
|
||||
}
|
||||
else {
|
||||
/* save as regular blend file */
|
||||
/* Save as regular blend file. */
|
||||
int fileflags = G.fileflags & ~(G_FILE_COMPRESS | G_FILE_HISTORY);
|
||||
|
||||
ED_editors_flush_edits(bmain);
|
||||
|
@ -1665,7 +1665,7 @@ static int wm_homefile_write_exec(bContext *C, wmOperator *op)
|
|||
|
||||
ED_editors_flush_edits(bmain);
|
||||
|
||||
/* force save as regular blend file */
|
||||
/* Force save as regular blend file. */
|
||||
fileflags = G.fileflags & ~(G_FILE_COMPRESS | G_FILE_HISTORY);
|
||||
|
||||
if (BLO_write_file(bmain, filepath, fileflags, op->reports, NULL) == 0) {
|
||||
|
|
|
@ -754,8 +754,8 @@ void wm_xr_draw_view(const GHOST_XrDrawViewInfo *draw_view, void *customdata)
|
|||
* viewport buffers composited together and potentially color managed for display on screen.
|
||||
* It needs a bound frame-buffer to draw into, for which we simply reuse the GPUOffscreen one.
|
||||
*
|
||||
* In a next step, Ghost-XR will use the the currently bound frame-buffer to retrieve the image
|
||||
* to be submitted to the OpenXR swap-chain. So do not un-bind the offscreen yet! */
|
||||
* In a next step, Ghost-XR will use the currently bound frame-buffer to retrieve the image
|
||||
* to be submitted to the OpenXR swap-chain. So do not un-bind the off-screen yet! */
|
||||
|
||||
GPU_offscreen_bind(surface_data->offscreen, false);
|
||||
|
||||
|
|
|
@ -108,7 +108,7 @@
|
|||
|
||||
#include "creator_intern.h" /* own include */
|
||||
|
||||
/* Local Function prototypes */
|
||||
/* Local Function prototypes. */
|
||||
#ifdef WITH_PYTHON_MODULE
|
||||
int main_python_enter(int argc, const char **argv);
|
||||
void main_python_exit(void);
|
||||
|
|
Loading…
Reference in New Issue