Cleanup: use own username in code-comment tags

This commit is contained in:
Campbell Barton 2022-08-09 14:18:18 +10:00
parent eab988c9f6
commit c7a7aee004
78 changed files with 102 additions and 103 deletions

View File

@ -287,7 +287,7 @@ uint8_t GHOST_SystemX11::getNumDisplays() const
void GHOST_SystemX11::getMainDisplayDimensions(uint32_t &width, uint32_t &height) const
{
if (m_display) {
/* NOTE(campbell): for this to work as documented,
/* NOTE(@campbellbarton): for this to work as documented,
* we would need to use Xinerama check r54370 for code that did this,
* we've since removed since its not worth the extra dependency. */
getAllDisplayDimensions(width, height);

View File

@ -1595,7 +1595,7 @@ static void editbmesh_calc_modifiers(struct Depsgraph *depsgraph,
/* Add orco coordinates to final and deformed mesh if requested. */
if (final_datamask.vmask & CD_MASK_ORCO) {
/* FIXME(Campbell): avoid the need to convert to mesh data just to add an orco layer. */
/* FIXME(@campbellbarton): avoid the need to convert to mesh data just to add an orco layer. */
BKE_mesh_wrapper_ensure_mdata(mesh_final);
add_orco_mesh(ob, em_input, mesh_final, mesh_orco, CD_ORCO);

View File

@ -144,7 +144,7 @@ static float color_sample_remove_cost(const struct ColorResampleElem *c)
return area;
}
/* TODO(campbell): create BLI_math_filter? */
/* TODO(@campbellbarton): create `BLI_math_filter` ? */
static float filter_gauss(float x)
{
const float gaussfac = 1.6f;

View File

@ -1559,7 +1559,7 @@ static void followpath_evaluate(bConstraint *con, bConstraintOb *cob, ListBase *
/* un-apply scaling caused by path */
if ((data->followflag & FOLLOWPATH_RADIUS) == 0) {
/* XXX(campbell): Assume that scale correction means that radius
/* XXX(@campbellbarton): Assume that scale correction means that radius
* will have some scale error in it. */
float obsize[3];

View File

@ -2470,7 +2470,7 @@ static void make_bevel_list_segment_2D(BevList *bl)
static void make_bevel_list_2D(BevList *bl)
{
/* NOTE(campbell): `bevp->dir` and `bevp->quat` are not needed for beveling but are
/* NOTE(@campbellbarton): `bevp->dir` and `bevp->quat` are not needed for beveling but are
* used when making a path from a 2D curve, therefore they need to be set. */
BevPoint *bevp0, *bevp1, *bevp2;

View File

@ -76,7 +76,7 @@ ImBuf *BKE_icon_geom_rasterize(const struct Icon_Geom *geom,
const uchar(*pos)[2] = geom->coords;
const uint *col = (void *)geom->colors;
/* TODO(campbell): Currently rasterizes to fixed size, then scales.
/* TODO(@campbellbarton): Currently rasterizes to fixed size, then scales.
* Should rasterize to double size for eg instead. */
const int rect_size[2] = {max_ii(256, (int)size_x * 2), max_ii(256, (int)size_y * 2)};

View File

@ -784,7 +784,7 @@ IDProperty *IDP_GetProperties(ID *id, const bool create_if_needed)
if (create_if_needed) {
id->properties = MEM_callocN(sizeof(IDProperty), "IDProperty");
id->properties->type = IDP_GROUP;
/* NOTE(campbell): Don't overwrite the data's name and type
/* NOTE(@campbellbarton): Don't overwrite the data's name and type
* some functions might need this if they
* don't have a real ID, should be named elsewhere. */
// strcpy(id->name, "top_level_group");

View File

@ -122,7 +122,7 @@ void BKE_library_filepath_set(Main *bmain, Library *lib, const char *filepath)
/* Not essential but set `filepath_abs` is an absolute copy of value which
* is more useful if its kept in sync. */
if (BLI_path_is_rel(lib->filepath_abs)) {
/* NOTE(campbell): the file may be unsaved, in this case, setting the
/* NOTE(@campbellbarton): the file may be unsaved, in this case, setting the
* `filepath_abs` on an indirectly linked path is not allowed from the
* outliner, and its not really supported but allow from here for now
* since making local could cause this to be directly linked.

View File

@ -852,7 +852,7 @@ void BKE_object_material_resize(Main *bmain, Object *ob, const short totcol, boo
ob->mat = newmatar;
ob->matbits = newmatbits;
}
/* XXX(campbell): why not realloc on shrink? */
/* XXX(@campbellbarton): why not realloc on shrink? */
ob->totcol = totcol;
if (ob->totcol && ob->actcol == 0) {

View File

@ -556,7 +556,7 @@ bool BKE_mball_minmax_ex(
copy_v3_v3(centroid, &ml->x);
}
/* TODO(campbell): non circle shapes cubes etc, probably nobody notices. */
/* TODO(@campbellbarton): non circle shapes cubes etc, probably nobody notices. */
for (int i = -1; i != 3; i += 2) {
copy_v3_v3(vec, centroid);
add_v3_fl(vec, scale_mb * i);

View File

@ -760,10 +760,10 @@ static void mesh_ensure_tessellation_customdata(Mesh *me)
/* TODO: add some `--debug-mesh` option. */
if (G.debug & G_DEBUG) {
/* NOTE(campbell): this warning may be un-called for if we are initializing the mesh for
* the first time from #BMesh, rather than giving a warning about this we could be smarter
* and check if there was any data to begin with, for now just print the warning with
* some info to help troubleshoot what's going on. */
/* NOTE(@campbellbarton): this warning may be un-called for if we are initializing the mesh
* for the first time from #BMesh, rather than giving a warning about this we could be
* smarter and check if there was any data to begin with, for now just print the warning
* with some info to help troubleshoot what's going on. */
printf(
"%s: warning! Tessellation uvs or vcol data got out of sync, "
"had to reset!\n CD_MTFACE: %d != CD_MLOOPUV: %d || CD_MCOL: %d != "

View File

@ -716,7 +716,7 @@ void BKE_mesh_calc_loop_tangents(Mesh *me_eval,
{
BKE_mesh_runtime_looptri_ensure(me_eval);
/* TODO(campbell): store in Mesh.runtime to avoid recalculation. */
/* TODO(@campbellbarton): store in Mesh.runtime to avoid recalculation. */
short tangent_mask = 0;
BKE_mesh_calc_loop_tangent_ex(me_eval->mvert,
me_eval->mpoly,

View File

@ -1385,9 +1385,8 @@ void BKE_ocean_bake(struct Ocean *o,
void (*update_cb)(void *, float progress, int *cancel),
void *update_cb_data)
{
/* NOTE(campbell): some of these values remain uninitialized unless certain options
* are enabled, take care that BKE_ocean_eval_ij() initializes a member
* before use. */
/* NOTE(@campbellbarton): some of these values remain uninitialized unless certain options
* are enabled, take care that #BKE_ocean_eval_ij() initializes a member before use. */
OceanResult ocr;
ImageFormatData imf = {0};
@ -1441,7 +1440,7 @@ void BKE_ocean_bake(struct Ocean *o,
rgb_to_rgba_unit_alpha(&ibuf_disp->rect_float[4 * (res_x * y + x)], ocr.disp);
if (o->_do_jacobian) {
/* TODO(campbell): cleanup unused code. */
/* TODO(@campbellbarton): cleanup unused code. */
float /* r, */ /* UNUSED */ pr = 0.0f, foam_result;
float neg_disp, neg_eplus;

View File

@ -5413,8 +5413,8 @@ void BKE_particle_system_blend_read_lib(BlendLibReader *reader,
BLO_read_id_address(reader, id->lib, &psys->target_ob);
if (psys->clmd) {
/* XXX(campbell): from reading existing code this seems correct but intended usage of
* pointcache /w cloth should be added in 'ParticleSystem'. */
/* XXX(@campbellbarton): from reading existing code this seems correct but intended usage
* of pointcache /w cloth should be added in 'ParticleSystem'. */
psys->clmd->point_cache = psys->pointcache;
psys->clmd->ptcaches.first = psys->clmd->ptcaches.last = NULL;
BLO_read_id_address(reader, id->lib, &psys->clmd->coll_parms->group);

View File

@ -969,7 +969,7 @@ void psys_get_birth_coords(
float tmat[3][3];
/* NOTE: utan_local is not taken from 'utan', we calculate from rot_vec/vtan. */
/* NOTE(campbell): it looks like rotation phase may be applied twice
/* NOTE(@campbellbarton): it looks like rotation phase may be applied twice
* (once with vtan, again below) however this isn't the case. */
float *rot_vec_local = tmat[0];
float *vtan_local = tmat[1];

View File

@ -2501,7 +2501,7 @@ static bool check_rendered_viewport_visible(Main *bmain)
return false;
}
/* TODO(campbell): shouldn't we be able to use 'DEG_get_view_layer' here?
/* TODO(@campbellbarton): shouldn't we be able to use 'DEG_get_view_layer' here?
* Currently this is nullptr on load, so don't. */
static void prepare_mesh_for_viewport_render(Main *bmain, const ViewLayer *view_layer)
{

View File

@ -82,7 +82,7 @@ struct ScanFillEdge *BLI_scanfill_edge_add(ScanFillContext *sf_ctx,
struct ScanFillVert *v2);
enum {
/* NOTE(campbell): using BLI_SCANFILL_CALC_REMOVE_DOUBLES
/* NOTE(@campbellbarton): using #BLI_SCANFILL_CALC_REMOVE_DOUBLES
* Assumes ordered edges, otherwise we risk an eternal loop
* removing double verts. */
BLI_SCANFILL_CALC_REMOVE_DOUBLES = (1 << 1),

View File

@ -1667,8 +1667,8 @@ bool isect_ray_tri_v3(const float ray_origin[3],
float *r_lambda,
float r_uv[2])
{
/* NOTE(campbell): these values were 0.000001 in 2.4x but for projection snapping on
* a human head (1BU == 1m), subsurf level 2, this gave many errors. */
/* NOTE(@campbellbarton): these values were 0.000001 in 2.4x but for projection snapping on
* a human head `(1BU == 1m)`, subdivision-surface level 2, this gave many errors. */
const float epsilon = 0.00000001f;
float p[3], s[3], e1[3], e2[3], q[3];
float a, f, u, v;
@ -3773,7 +3773,7 @@ void barycentric_weights_v2_quad(const float v1[2],
const float co[2],
float w[4])
{
/* NOTE(campbell): fabsf() here is not needed for convex quads
/* NOTE(@campbellbarton): fabsf() here is not needed for convex quads
* (and not used in #interp_weights_poly_v2).
* But in the case of concave/bow-tie quads for the mask rasterizer it
* gives unreliable results without adding `absf()`. If this becomes an issue for more general

View File

@ -329,8 +329,7 @@ void **BLI_smallhash_iternew_p(const SmallHash *sh, SmallHashIter *iter, uintptr
/** \name Debugging & Introspection
* \{ */
/* NOTE(campbell): this was called _print_smhash in knifetool.c
* it may not be intended for general use. */
/* NOTE(@campbellbarton): useful for debugging but may not be intended for general use. */
#if 0
void BLI_smallhash_print(SmallHash *sh)
{

View File

@ -403,7 +403,7 @@ int BLI_str_utf8_char_width_safe(const char *p)
/* copied from glib's gutf8.c, added 'Err' arg */
/* NOTE(campbell): glib uses uint for unicode, best we do the same,
/* NOTE(@campbellbarton): glib uses uint for unicode, best we do the same,
* though we don't typedef it. */
#define UTF8_COMPUTE(Char, Mask, Len, Err) \

View File

@ -7,7 +7,7 @@
namespace blender::compositor {
#define USE_FORCE_BILINEAR
/* XXX(campbell): ignore input and use default from old compositor,
/* XXX(@campbellbarton): ignore input and use default from old compositor,
* could become an option like the transform node.
*
* NOTE: use bilinear because bicubic makes fuzzy even when not scaling at all (1:1)

View File

@ -2220,7 +2220,7 @@ static void draw_armature_edit(ArmatureDrawContext *ctx)
const bool show_text = DRW_state_show_text();
const Object *ob_orig = DEG_get_original_object(ob);
/* FIXME(campbell): We should be able to use the CoW object,
/* FIXME(@campbellbarton): We should be able to use the CoW object,
* however the active bone isn't updated. Long term solution is an 'EditArmature' struct.
* for now we can draw from the original armature. See: T66773. */
// bArmature *arm = ob->data;

View File

@ -332,7 +332,7 @@ void mesh_render_data_update_looptris(MeshRenderData *mr,
if (mr->extract_type != MR_EXTRACT_BMESH) {
/* Mesh */
if ((iter_type & MR_ITER_LOOPTRI) || (data_flag & MR_DATA_LOOPTRI)) {
/* NOTE(campbell): It's possible to skip allocating tessellation,
/* NOTE(@campbellbarton): It's possible to skip allocating tessellation,
* the tessellation can be calculated as part of the iterator, see: P2188.
* The overall advantage is small (around 1%), so keep this as-is. */
mr->mlooptri = static_cast<MLoopTri *>(

View File

@ -59,7 +59,7 @@ Base *ED_armature_base_and_ebone_from_select_buffer(Base **bases,
const uint hit_object = select_id & 0xFFFF;
Base *base = NULL;
EditBone *ebone = NULL;
/* TODO(campbell): optimize, eg: sort & binary search. */
/* TODO(@campbellbarton): optimize, eg: sort & binary search. */
for (uint base_index = 0; base_index < bases_len; base_index++) {
if (bases[base_index]->object->runtime.select_id == hit_object) {
base = bases[base_index];
@ -83,7 +83,7 @@ Object *ED_armature_object_and_ebone_from_select_buffer(Object **objects,
const uint hit_object = select_id & 0xFFFF;
Object *ob = NULL;
EditBone *ebone = NULL;
/* TODO(campbell): optimize, eg: sort & binary search. */
/* TODO(@campbellbarton): optimize, eg: sort & binary search. */
for (uint ob_index = 0; ob_index < objects_len; ob_index++) {
if (objects[ob_index]->runtime.select_id == hit_object) {
ob = objects[ob_index];
@ -107,7 +107,7 @@ Base *ED_armature_base_and_pchan_from_select_buffer(Base **bases,
const uint hit_object = select_id & 0xFFFF;
Base *base = NULL;
bPoseChannel *pchan = NULL;
/* TODO(campbell): optimize, eg: sort & binary search. */
/* TODO(@campbellbarton): optimize, eg: sort & binary search. */
for (uint base_index = 0; base_index < bases_len; base_index++) {
if (bases[base_index]->object->runtime.select_id == hit_object) {
base = bases[base_index];
@ -1452,7 +1452,7 @@ static void armature_select_more_less(Object *ob, bool more)
bArmature *arm = (bArmature *)ob->data;
EditBone *ebone;
/* XXX(campbell): eventually we shouldn't need this. */
/* XXX(@campbellbarton): eventually we shouldn't need this. */
ED_armature_edit_sync_selection(arm->edbo);
/* count bones & store selection state */

View File

@ -166,7 +166,7 @@ bool ED_armature_pose_select_pick_bone(ViewLayer *view_layer,
/* Since we do unified select, we don't shift+select a bone if the
* armature object was not active yet.
* NOTE(campbell): special exception for armature mode so we can do multi-select
* NOTE(@campbellbarton): special exception for armature mode so we can do multi-select
* we could check for multi-select explicitly but think its fine to
* always give predictable behavior in weight paint mode. */
if ((ob_act == NULL) || ((ob_act != ob) && (ob_act->mode & OB_MODE_ALL_WEIGHT_PAINT) == 0)) {

View File

@ -1279,7 +1279,7 @@ void ED_curve_editnurb_make(Object *obedit)
if (actkey) {
// XXX strcpy(G.editModeTitleExtra, "(Key) ");
/* TODO(campbell): undo_system: investigate why this was needed. */
/* TODO(@campbellbarton): undo_system: investigate why this was needed. */
#if 0
undo_editmode_clear();
#endif

View File

@ -1310,7 +1310,7 @@ static bool ui_but_event_operator_string_from_panel(const bContext *C,
IDP_AddToGroup(prop_panel, IDP_New(IDP_INT, &region_type_val, "region_type"));
for (int i = 0; i < 2; i++) {
/* FIXME(campbell): We can't reasonably search all configurations - long term. */
/* FIXME(@campbellbarton): We can't reasonably search all configurations - long term. */
IDPropertyTemplate val = {0};
val.i = i;

View File

@ -325,7 +325,7 @@ void ui_but_anim_decorate_cb(bContext *C, void *arg_but, void *UNUSED(arg_dummy)
return;
}
/* FIXME(campbell), swapping active pointer is weak. */
/* FIXME(@campbellbarton): swapping active pointer is weak. */
SWAP(struct uiHandleButtonData *, but_anim->active, but_decorate->but.active);
wm->op_undo_depth++;

View File

@ -8810,7 +8810,7 @@ void UI_context_active_but_prop_handle(bContext *C, const bool handle_undo)
{
uiBut *activebut = ui_context_rna_button_active(C);
if (activebut) {
/* TODO(campbell): look into a better way to handle the button change
/* TODO(@campbellbarton): look into a better way to handle the button change
* currently this is mainly so reset defaults works for the
* operator redo panel. */
uiBlock *block = activebut->block;

View File

@ -1824,7 +1824,7 @@ static void icon_draw_size(float x,
}
else if (di->type == ICON_TYPE_GEOM) {
#ifdef USE_UI_TOOLBAR_HACK
/* TODO(campbell): scale icons up for toolbar,
/* TODO(@campbellbarton): scale icons up for toolbar,
* we need a way to detect larger buttons and do this automatic. */
{
float scale = (float)ICON_DEFAULT_HEIGHT_TOOLBAR / (float)ICON_DEFAULT_HEIGHT;
@ -1839,7 +1839,7 @@ static void icon_draw_size(float x,
const bool geom_inverted = di->data.geom.inverted;
/* This could re-generate often if rendered at different sizes in the one interface.
* TODO(campbell): support caching multiple sizes. */
* TODO(@campbellbarton): support caching multiple sizes. */
ImBuf *ibuf = di->data.geom.image_cache;
if ((ibuf == NULL) || (ibuf->x != w) || (ibuf->y != h) || (invert != geom_inverted)) {
if (ibuf) {

View File

@ -397,7 +397,7 @@ void UI_popover_end(bContext *C, uiPopover *pup, wmKeyMap *keymap)
pup->window = window;
/* TODO(campbell): we may want to make this configurable.
/* TODO(@campbellbarton): we may want to make this configurable.
* The begin/end stype of calling popups doesn't allow 'can_refresh' to be set.
* For now close this style of popovers when accessed. */
UI_block_flag_disable(pup->block, UI_BLOCK_KEEP_OPEN);

View File

@ -7,7 +7,7 @@
* ToolTip Region and Construction
*/
/* TODO(campbell):
/* TODO(@campbellbarton):
* We may want to have a higher level API that initializes a timer,
* checks for mouse motion and clears the tool-tip afterwards.
* We never want multiple tool-tips at once

View File

@ -46,7 +46,7 @@ static CLG_LogRef LOG = {"ed.undo.lattice"};
/** \name Undo Conversion
* \{ */
/* TODO(Campbell): this could contain an entire 'Lattice' struct. */
/* TODO(@campbellbarton): this could contain an entire 'Lattice' struct. */
typedef struct UndoLattice {
BPoint *def;
int pntsu, pntsv, pntsw, actbp;

View File

@ -1524,7 +1524,7 @@ void EDBM_update(Mesh *mesh, const struct EDBMUpdate_Params *params)
}
if (params->is_destructive) {
/* TODO(campbell): we may be able to remove this now! */
/* TODO(@campbellbarton): we may be able to remove this now! */
// BM_mesh_elem_table_free(em->bm, BM_ALL_NOLOOP);
}
else {

View File

@ -744,7 +744,7 @@ Base *ED_mball_base_and_elem_from_select_buffer(Base **bases,
const uint hit_object = select_id & 0xFFFF;
Base *base = NULL;
MetaElem *ml = NULL;
/* TODO(campbell): optimize, eg: sort & binary search. */
/* TODO(@campbellbarton): optimize, eg: sort & binary search. */
for (uint base_index = 0; base_index < bases_len; base_index++) {
if (bases[base_index]->object->runtime.select_id == hit_object) {
base = bases[base_index];

View File

@ -1128,7 +1128,7 @@ static int object_select_all_exec(bContext *C, wmOperator *op)
return OPERATOR_FINISHED;
}
if (any_visible == false) {
/* TODO(campbell): Looks like we could remove this,
/* TODO(@campbellbarton): Looks like we could remove this,
* if not comment should say why its needed. */
return OPERATOR_PASS_THROUGH;
}

View File

@ -891,7 +891,7 @@ void ED_vgroup_vert_remove(Object *ob, bDeformGroup *dg, int vertnum)
* deform group.
*/
/* TODO(campbell): This is slow in a loop, better pass def_nr directly,
/* TODO(@campbellbarton): This is slow in a loop, better pass def_nr directly,
* but leave for later. */
const ListBase *defbase = BKE_object_defgroup_list(ob);
const int def_nr = BLI_findindex(defbase, dg);
@ -1118,7 +1118,7 @@ static void vgroup_duplicate(Object *ob)
BKE_object_defgroup_active_index_set(ob, BLI_listbase_count(defbase));
icdg = BKE_object_defgroup_active_index_get(ob) - 1;
/* TODO(campbell): we might want to allow only copy selected verts here? */
/* TODO(@campbellbarton): we might want to allow only copy selected verts here? */
ED_vgroup_parray_alloc(ob->data, &dvert_array, &dvert_tot, false);
if (dvert_array) {

View File

@ -110,7 +110,7 @@ ScrArea *area_split(const wmWindow *win,
return NULL;
}
/* NOTE(campbell): regarding (fac > 0.5f) checks below.
/* NOTE(@campbellbarton): regarding (fac > 0.5f) checks below.
* normally it shouldn't matter which is used since the copy should match the original
* however with viewport rendering and python console this isn't the case. */

View File

@ -220,7 +220,7 @@ WorkSpace *ED_workspace_duplicate(WorkSpace *workspace_old, Main *bmain, wmWindo
workspace_new->order = workspace_old->order;
BLI_duplicatelist(&workspace_new->owner_ids, &workspace_old->owner_ids);
/* TODO(campbell): tools */
/* TODO(@campbellbarton): tools */
LISTBASE_FOREACH (WorkSpaceLayout *, layout_old, &workspace_old->layouts) {
WorkSpaceLayout *layout_new = ED_workspace_layout_duplicate(

View File

@ -919,7 +919,7 @@ static const EnumPropertyItem prop_column_select_types[] = {
/* ------------------- */
/* Selects all visible keyframes between the specified markers */
/* TODO(campbell): this is almost an _exact_ duplicate of a function of the same name in
/* TODO(@campbellbarton): this is almost an _exact_ duplicate of a function of the same name in
* graph_select.c should de-duplicate. */
static void markers_selectkeys_between(bAnimContext *ac)
{

View File

@ -1128,7 +1128,7 @@ static const EnumPropertyItem prop_column_select_types[] = {
/* ------------------- */
/* Selects all visible keyframes between the specified markers */
/* TODO(campbell): this is almost an _exact_ duplicate of a function of the same name in
/* TODO(@campbellbarton): this is almost an _exact_ duplicate of a function of the same name in
* action_select.c should de-duplicate. */
static void markers_selectkeys_between(bAnimContext *ac)
{

View File

@ -100,7 +100,7 @@ static int script_reload_exec(bContext *C, wmOperator *op)
return OPERATOR_CANCELLED;
}
/* TODO(campbell): this crashes on netrender and keying sets, need to look into why
/* TODO(@campbellbarton): this crashes on netrender and keying sets, need to look into why
* disable for now unless running in debug mode. */
/* It would be nice if we could detect when this is called from the Python

View File

@ -2869,7 +2869,7 @@ static int sequencer_change_path_exec(bContext *C, wmOperator *op)
RNA_string_get(op->ptr, "directory", directory);
if (is_relative_path) {
/* TODO(campbell): shouldn't this already be relative from the filesel?
/* TODO(@campbellbarton): shouldn't this already be relative from the filesel?
* (as the 'filepath' is) for now just make relative here,
* but look into changing after 2.60. */
BLI_path_rel(directory, BKE_main_blendfile_path(bmain));

View File

@ -17,7 +17,7 @@
#include "sequencer_intern.h"
/* XXX(campbell): why is this function better than BLI_math version?
/* XXX(@campbellbarton): why is this function better than BLI_math version?
* only difference is it does some normalize after, need to double check on this. */
static void rgb_to_yuv_normalized(const float rgb[3], float yuv[3])
{

View File

@ -314,7 +314,7 @@ static int doc_scroll = 0;
static int text_autocomplete_modal(bContext *C, wmOperator *op, const wmEvent *event)
{
/* NOTE(campbell): this code could be refactored or rewritten. */
/* NOTE(@campbellbarton): this code could be refactored or rewritten. */
SpaceText *st = CTX_wm_space_text(C);
ScrArea *area = CTX_wm_area(C);
ARegion *region = BKE_area_find_region_type(area, RGN_TYPE_WINDOW);

View File

@ -960,7 +960,7 @@ static void view3d_widgets(void)
WM_gizmogrouptype_append_and_link(gzmap_type, VIEW3D_GGT_camera);
WM_gizmogrouptype_append_and_link(gzmap_type, VIEW3D_GGT_camera_view);
WM_gizmogrouptype_append_and_link(gzmap_type, VIEW3D_GGT_empty_image);
/* TODO(campbell): Not working well enough, disable for now. */
/* TODO(@campbellbarton): Not working well enough, disable for now. */
#if 0
WM_gizmogrouptype_append_and_link(gzmap_type, VIEW3D_GGT_armature_spline);
#endif

View File

@ -37,7 +37,7 @@
* \{ */
/*
* TODO(campbell): Current conversion is a approximation (usable not correct),
* TODO(@campbellbarton): Current conversion is a approximation (usable not correct),
* we'll need to take the next/previous bones into account to get the tangent directions.
* First last matrices from 'BKE_pchan_bbone_spline_setup' are close but also not quite accurate
* since they're not at either end-points on the curve.

View File

@ -1314,7 +1314,8 @@ void transform_convert_mesh_crazyspace_detect(TransInfo *t,
* correction with \a quats, relative to the coordinates after
* the modifiers that support deform matrices \a defcos. */
#if 0 /* TODO(campbell): fix crazy-space & extrude so it can be enabled for general use. */
#if 0 /* TODO(@campbellbarton): fix crazy-space & extrude so it can be enabled for general use. \
*/
if ((totleft > 0) || (totleft == -1))
#else
if (totleft > 0)
@ -2123,7 +2124,7 @@ void special_aftertrans_update__mesh(bContext *UNUSED(C), TransInfo *t)
FOREACH_TRANS_DATA_CONTAINER (t, tc) {
/* table needs to be created for each edit command, since vertices can move etc */
ED_mesh_mirror_spatial_table_end(tc->obedit);
/* TODO(campbell): xform: We need support for many mirror objects at once! */
/* TODO(@campbellbarton): xform: We need support for many mirror objects at once! */
break;
}
}

View File

@ -261,7 +261,7 @@ static void gizmo_mesh_extrude_refresh(const bContext *C, wmGizmoGroup *gzgroup)
copy_m3_m3(ggd->data.normal_mat3, tbounds_normal.axis);
}
/* TODO(campbell): run second since this modifies the 3D view, it should not. */
/* TODO(@campbellbarton): run second since this modifies the 3D view, it should not. */
if (!ED_transform_calc_gizmo_stats(C,
&(struct TransformCalcParams){
.orientation_index = ggd->data.orientation_index + 1,

View File

@ -262,7 +262,7 @@ static void Bend(TransInfo *t, const int UNUSED(mval[2]))
+values.scale * shell_angle_to_dist((float)M_PI_2 + values.angle));
}
/* TODO(campbell): xform, compensate object center. */
/* TODO(@campbellbarton): xform, compensate object center. */
FOREACH_TRANS_DATA_CONTAINER (t, tc) {
float warp_sta_local[3];

View File

@ -1204,7 +1204,7 @@ void drawEdgeSlide(TransInfo *t)
immUniformThemeColorShadeAlpha(TH_EDGE_SELECT, 80, alpha_shade);
immBegin(GPU_PRIM_LINES, sld->totsv * 2);
/* TODO(campbell): Loop over all verts. */
/* TODO(@campbellbarton): Loop over all verts. */
sv = sld->sv;
for (i = 0; i < sld->totsv; i++, sv++) {
float a[3], b[3];

View File

@ -269,7 +269,7 @@ static int ed_undo_step_direction(bContext *C, enum eUndoStepDir step, ReportLis
CLOG_INFO(&LOG, 1, "direction=%s", (step == STEP_UNDO) ? "STEP_UNDO" : "STEP_REDO");
/* TODO(campbell): undo_system: use undo system */
/* TODO(@campbellbarton): undo_system: use undo system */
/* grease pencil can be can be used in plenty of spaces, so check it first */
/* FIXME: This gpencil undo effectively only supports the one step undo/redo, undo based on name
* or index is fully not implemented.

View File

@ -176,7 +176,7 @@ void ED_editors_init(bContext *C)
}
}
else {
/* TODO(campbell): avoid operator calls. */
/* TODO(@campbellbarton): avoid operator calls. */
if (obact == ob) {
ED_object_mode_set(C, mode);
}

View File

@ -431,7 +431,7 @@ void ED_imbuf_sample_draw(const bContext *C, ARegion *region, void *arg_info)
immBindBuiltinProgram(GPU_SHADER_2D_UNIFORM_COLOR);
immUniformColor3fv(color);
/* TODO(campbell): lock to pixels. */
/* TODO(@campbellbarton): lock to pixels. */
rctf sample_rect_fl;
BLI_rctf_init_pt_radius(
&sample_rect_fl,

View File

@ -1422,7 +1422,7 @@ static BMLoop *bm_select_edgeloop_single_side_next(const Scene *scene,
scene, l_step, v_from_next, cd_loop_uv_offset);
}
/* TODO(campbell): support this in the BMesh API, as we have for clearing other types. */
/* TODO(@campbellbarton): support this in the BMesh API, as we have for clearing other types. */
static void bm_loop_tags_clear(BMesh *bm)
{
BMIter iter;

View File

@ -9,7 +9,7 @@
#include "DNA_defs.h"
/* XXX(campbell): temp feature. */
/* XXX(@campbellbarton): temp feature. */
#define DURIAN_CAMERA_SWITCH
/* check for cyclic set-scene,

View File

@ -2073,7 +2073,7 @@ static void rna_property_update(
}
#if 1
/* TODO(campbell): Should eventually be replaced entirely by message bus (below)
/* TODO(@campbellbarton): Should eventually be replaced entirely by message bus (below)
* for now keep since COW, bugs are hard to track when we have other missing updates. */
if (prop->noteflag) {
WM_main_add_notifier(prop->noteflag, ptr->owner_id);

View File

@ -600,7 +600,7 @@ static void rna_PoseChannel_constraints_remove(
ED_object_constraint_update(bmain, ob);
/* XXX(Campbell): is this really needed? */
/* XXX(@campbellbarton): is this really needed? */
BKE_constraints_active_set(&pchan->constraints, NULL);
WM_main_add_notifier(NC_OBJECT | ND_CONSTRAINT | NA_REMOVED, id);

View File

@ -1295,7 +1295,7 @@ static const EnumPropertyItem *rna_ImageFormatSettings_color_mode_itemf(bContext
ID *id = ptr->owner_id;
const bool is_render = (id && GS(id->name) == ID_SCE);
/* NOTE(campbell): we need to act differently for render
/* NOTE(@campbellbarton): we need to act differently for render
* where 'BW' will force grayscale even if the output format writes
* as RGBA, this is age old blender convention and not sure how useful
* it really is but keep it for now. */

View File

@ -501,7 +501,7 @@ static void deformVertsEM(ModifierData *md,
BLI_assert(mesh->totvert == verts_num);
}
/* TODO(Campbell): use edit-mode data only (remove this line). */
/* TODO(@campbellbarton): use edit-mode data only (remove this line). */
if (mesh_src != NULL) {
BKE_mesh_wrapper_ensure_mdata(mesh_src);
}

View File

@ -750,7 +750,7 @@ static void deformVertsEM(ModifierData *md,
Mesh *mesh_src = MOD_deform_mesh_eval_get(
ctx->object, editData, mesh, NULL, verts_num, false, false);
/* TODO(Campbell): use edit-mode data only (remove this line). */
/* TODO(@campbellbarton): use edit-mode data only (remove this line). */
if (mesh_src != NULL) {
BKE_mesh_wrapper_ensure_mdata(mesh_src);
}

View File

@ -392,7 +392,7 @@ static void deformVertsEM(ModifierData *md,
Mesh *mesh_src = MOD_deform_mesh_eval_get(
ctx->object, editData, mesh, NULL, verts_num, false, false);
/* TODO(Campbell): use edit-mode data only (remove this line). */
/* TODO(@campbellbarton): use edit-mode data only (remove this line). */
if (mesh_src != NULL) {
BKE_mesh_wrapper_ensure_mdata(mesh_src);
}

View File

@ -742,7 +742,7 @@ static Mesh *cutEdges(ExplodeModifierData *emd, Mesh *mesh)
/* override original facepa (original pointer is saved in caller function) */
/* TODO(campbell): `(totfsplit * 2)` over allocation is used since the quads are
/* TODO(@campbellbarton): `(totfsplit * 2)` over allocation is used since the quads are
* later interpreted as tri's, for this to work right I think we probably
* have to stop using tessface. */

View File

@ -785,7 +785,7 @@ static void deformVertsEM(ModifierData *md,
Mesh *mesh_src = MOD_deform_mesh_eval_get(
ctx->object, editData, mesh, NULL, verts_num, false, false);
/* TODO(Campbell): use edit-mode data only (remove this line). */
/* TODO(@campbellbarton): use edit-mode data only (remove this line). */
if (mesh_src != NULL) {
BKE_mesh_wrapper_ensure_mdata(mesh_src);
}

View File

@ -560,7 +560,7 @@ static void deformVertsEM(ModifierData *md,
mesh_src = MOD_deform_mesh_eval_get(ctx->object, editData, mesh, NULL, verts_num, false, false);
/* TODO(Campbell): use edit-mode data only (remove this line). */
/* TODO(@campbellbarton): use edit-mode data only (remove this line). */
if (mesh_src != NULL) {
BKE_mesh_wrapper_ensure_mdata(mesh_src);
}

View File

@ -466,7 +466,7 @@ static void deformVertsEM(ModifierData *md,
Mesh *mesh_src = MOD_deform_mesh_eval_get(
ctx->object, editData, mesh, NULL, verts_num, false, false);
/* TODO(Campbell): use edit-mode data only (remove this line). */
/* TODO(@campbellbarton): use edit-mode data only (remove this line). */
if (mesh_src != NULL) {
BKE_mesh_wrapper_ensure_mdata(mesh_src);
}

View File

@ -139,7 +139,7 @@ static void deformVertsEM(ModifierData *md,
ctx->object, editData, mesh, NULL, verts_num, false, false);
}
/* TODO(Campbell): use edit-mode data only (remove this line). */
/* TODO(@campbellbarton): use edit-mode data only (remove this line). */
if (mesh_src != NULL) {
BKE_mesh_wrapper_ensure_mdata(mesh_src);
}

View File

@ -479,7 +479,7 @@ static void deformVertsEM(ModifierData *md,
ctx->object, editData, mesh, NULL, verts_num, false, false);
}
/* TODO(Campbell): use edit-mode data only (remove this line). */
/* TODO(@campbellbarton): use edit-mode data only (remove this line). */
if (mesh_src != NULL) {
BKE_mesh_wrapper_ensure_mdata(mesh_src);
}

View File

@ -212,7 +212,7 @@ static void deformVertsEM(ModifierData *md,
/* mesh_src is needed for vgroups, and taking edges into account. */
mesh_src = MOD_deform_mesh_eval_get(ctx->object, editData, mesh, NULL, verts_num, false, false);
/* TODO(campbell): use edit-mode data only (remove this line). */
/* TODO(@campbellbarton): use edit-mode data only (remove this line). */
BKE_mesh_wrapper_ensure_mdata(mesh_src);
smoothModifier_do(smd, ctx->object, mesh_src, vertexCos, verts_num);

View File

@ -1020,9 +1020,9 @@ Mesh *MOD_solidify_extrude_modifyMesh(ModifierData *md, const ModifierEvalContex
if (do_rim) {
uint i;
/* NOTE(campbell): Unfortunately re-calculate the normals for the new edge faces is necessary.
* This could be done in many ways, but probably the quickest way
* is to calculate the average normals for side faces only.
/* NOTE(@campbellbarton): Unfortunately re-calculate the normals for the new edge
* faces is necessary. This could be done in many ways, but probably the quickest
* way is to calculate the average normals for side faces only.
* Then blend them with the normals of the edge verts.
*
* At the moment its easiest to allocate an entire array for every vertex,

View File

@ -373,7 +373,7 @@ static void deformVertsEM(ModifierData *md,
mesh_src = MOD_deform_mesh_eval_get(ctx->object, em, mesh, NULL, verts_num, false, false);
}
/* TODO(Campbell): use edit-mode data only (remove this line). */
/* TODO(@campbellbarton): use edit-mode data only (remove this line). */
if (mesh_src != NULL) {
BKE_mesh_wrapper_ensure_mdata(mesh_src);
}

View File

@ -335,7 +335,7 @@ static void deformVertsEM(ModifierData *md,
ctx->object, editData, mesh, NULL, verts_num, false, false);
}
/* TODO(Campbell): use edit-mode data only (remove this line). */
/* TODO(@campbellbarton): use edit-mode data only (remove this line). */
if (mesh_src != NULL) {
BKE_mesh_wrapper_ensure_mdata(mesh_src);
}

View File

@ -32,7 +32,7 @@ static PyObject *func_bpy_atregister = NULL; /* borrowed reference, `atexit` hol
static void atexit_func_call(const char *func_name, PyObject *atexit_func_arg)
{
/* NOTE(campbell): no error checking, if any of these fail we'll get a crash
/* NOTE(@campbellbarton): no error checking, if any of these fail we'll get a crash
* this is intended, but if its problematic it could be changed. */
PyObject *atexit_mod = PyImport_ImportModuleLevel("atexit", NULL, NULL, NULL, 0);

View File

@ -780,7 +780,7 @@ PyObject *pyrna_math_object_from_array(PointerRNA *ptr, PropertyRNA *prop)
return ret;
}
/* NOTE(campbell): Regarding comparison `__cmp__`:
/* NOTE(@campbellbarton): Regarding comparison `__cmp__`:
* checking the 'ptr->data' matches works in almost all cases,
* however there are a few RNA properties that are fake sub-structs and
* share the pointer with the parent, in those cases this happens 'a.b == a'
@ -8254,7 +8254,7 @@ static int bpy_class_validate_recursive(PointerRNA *dummyptr,
continue;
}
/* TODO(campbell): this is used for classmethod's too,
/* TODO(@campbellbarton): this is used for classmethod's too,
* even though class methods should have 'FUNC_USE_SELF_TYPE' set, see Operator.poll for eg.
* Keep this as-is since it's working, but we should be using
* 'FUNC_USE_SELF_TYPE' for many functions. */
@ -8345,7 +8345,7 @@ static int bpy_class_validate_recursive(PointerRNA *dummyptr,
continue;
}
/* TODO(campbell): Use Python3.7x _PyObject_LookupAttr(), also in the macro below. */
/* TODO(@campbellbarton): Use Python3.7x _PyObject_LookupAttr(), also in the macro below. */
identifier = RNA_property_identifier(prop);
item = PyObject_GetAttrString(py_class, identifier);

View File

@ -760,8 +760,8 @@ void RE_bake_pixels_populate(Mesh *me,
for (int a = 0; a < 3; a++) {
const float *uv = mloopuv[lt->tri[a]].uv;
/* NOTE(campbell): workaround for pixel aligned UVs which are common and can screw up our
* intersection tests where a pixel gets in between 2 faces or the middle of a quad,
/* NOTE(@campbellbarton): workaround for pixel aligned UVs which are common and can screw
* up our intersection tests where a pixel gets in between 2 faces or the middle of a quad,
* camera aligned quads also have this problem but they are less common.
* Add a small offset to the UVs, fixes bug T18685. */
vec[a][0] = (uv[0] - bk_image->uv_offset[0]) * (float)bk_image->width - (0.5f + 0.001f);

View File

@ -558,8 +558,8 @@ static void generate_margin(ImBuf *ibuf,
for (int a = 0; a < 3; a++) {
const float *uv = mloopuv[lt->tri[a]].uv;
/* NOTE(campbell): workaround for pixel aligned UVs which are common and can screw up our
* intersection tests where a pixel gets in between 2 faces or the middle of a quad,
/* NOTE(@campbellbarton): workaround for pixel aligned UVs which are common and can screw up
* our intersection tests where a pixel gets in between 2 faces or the middle of a quad,
* camera aligned quads also have this problem but they are less common.
* Add a small offset to the UVs, fixes bug T18685. */
vec[a][0] = (uv[0] - uv_offset[0]) * (float)ibuf->x - (0.5f + 0.001f);

View File

@ -1053,7 +1053,7 @@ void WM_gizmomaptype_group_unlink(bContext *C,
WM_gizmomaptype_group_free(gzgt_ref);
}
/* TODO(campbell): Gizmos may share key-maps, for now don't
/* TODO(@campbellbarton): Gizmos may share key-maps, for now don't
* remove however we could flag them as temporary/owned by the gizmo. */
#if 0
/* NOTE: we may want to keep this key-map for editing. */

View File

@ -259,7 +259,7 @@ bool WM_gizmomap_minmax(const wmGizmoMap *gzmap,
* \param poll: Polling function for excluding gizmos.
* \param data: Custom data passed to \a poll
*
* TODO(campbell): this uses unreliable order,
* TODO(@campbellbarton): this uses unreliable order,
* best we use an iterator function instead of a hash.
*/
static GHash *WM_gizmomap_gizmo_hash_new(const bContext *C,
@ -430,9 +430,9 @@ static void gizmos_draw_list(const wmGizmoMap *gzmap, const bContext *C, ListBas
return;
}
/* TODO(campbell): This will need it own shader probably?
/* TODO(@campbellbarton): This will need it own shader probably?
* Don't think it can be handled from that point though. */
/* const bool use_lighting = (U.gizmo_flag & V3D_GIZMO_SHADED) != 0; */
// const bool use_lighting = (U.gizmo_flag & V3D_GIZMO_SHADED) != 0;
bool is_depth_prev = false;
@ -501,7 +501,7 @@ static void gizmo_draw_select_3d_loop(const bContext *C,
bool *r_use_select_bias)
{
/* TODO(campbell): this depends on depth buffer being written to,
/* TODO(@campbellbarton): this depends on depth buffer being written to,
* currently broken for the 3D view. */
bool is_depth_prev = false;
bool is_depth_skip_prev = false;