0
0
Fork 0

me-main #1

Merged
Nate Rupsis merged 123 commits from me-main into main 2023-02-13 18:39:11 +01:00
117 changed files with 166 additions and 167 deletions
Showing only changes of commit 0381fe7bfe - Show all commits

View File

@ -602,7 +602,7 @@ void GHOST_SystemSDL::processEvent(SDL_Event *sdl_event)
/* NOTE: the `sdl_sub_evt.keysym.sym` is truncated,
* for unicode support ghost has to be modified. */
/* TODO(@campbellbarton): support full unicode, SDL supports this but it needs to be
/* TODO(@ideasman42): support full unicode, SDL supports this but it needs to be
* explicitly enabled via #SDL_StartTextInput which GHOST would have to wrap. */
char utf8_buf[sizeof(GHOST_TEventKeyData::utf8_buf)] = {'\0'};
if (type == GHOST_kEventKeyDown) {

View File

@ -241,7 +241,7 @@ enum {
BTN_STYLUS = 0x14b,
/** Use as right-mouse. */
BTN_STYLUS2 = 0x14c,
/** NOTE(@campbellbarton): Map to an additional button (not sure which hardware uses this). */
/** NOTE(@ideasman42): Map to an additional button (not sure which hardware uses this). */
BTN_STYLUS3 = 0x149,
};
@ -916,7 +916,7 @@ struct GWL_Display {
* The main purpose of having an active seat is an alternative from always using the first
* seat which prevents events from any other seat.
*
* NOTE(@campbellbarton): This could be extended and developed further extended to support
* NOTE(@ideasman42): This could be extended and developed further extended to support
* an active seat per window (for e.g.), basic support is sufficient for now as currently isn't
* a widely used feature.
*/
@ -1237,7 +1237,7 @@ static void gwl_registry_entry_remove_all(GWL_Display *display)
{
const bool on_exit = true;
/* NOTE(@campbellbarton): Free by slot instead of simply looping over
/* NOTE(@ideasman42): Free by slot instead of simply looping over
* `display->registry_entry` so the order of freeing is always predictable.
* Otherwise global objects would be feed in the order they are registered.
* While this works in my tests, it could cause difficult to reproduce bugs
@ -1267,7 +1267,7 @@ static void gwl_registry_entry_remove_all(GWL_Display *display)
* so there is no reason to update all other outputs that an output was removed (for e.g.).
* Pass as -1 to update all slots.
*
* NOTE(@campbellbarton): Updating all other items on a single change is typically worth avoiding.
* NOTE(@ideasman42): Updating all other items on a single change is typically worth avoiding.
* In practice this isn't a problem as so there are so few elements in `display->registry_entry`,
* so few use update functions and adding/removal at runtime is rarely called (plugging/unplugging)
* hardware for e.g. So while it's possible to store dependency links to avoid unnecessary
@ -1316,7 +1316,7 @@ static void ghost_wl_display_report_error(struct wl_display *display)
fprintf(stderr, "The Wayland connection experienced a fatal error: %s\n", strerror(ecode));
}
/* NOTE(@campbellbarton): The application is running,
/* NOTE(@ideasman42): The application is running,
* however an error closes all windows and most importantly:
* shuts down the GPU context (loosing all GPU state - shaders, bind codes etc),
* so recovering from this effectively involves restarting.
@ -2968,7 +2968,7 @@ static void gesture_pinch_handle_begin(void *data,
if (wl_surface *wl_surface_focus = seat->pointer.wl_surface_window) {
win = ghost_wl_surface_user_data(wl_surface_focus);
}
/* NOTE(@campbellbarton): Blender's use of track-pad coordinates is inconsistent and needs work.
/* NOTE(@ideasman42): Blender's use of track-pad coordinates is inconsistent and needs work.
* This isn't specific to WAYLAND, in practice they tend to work well enough in most cases.
* Some operators scale by the UI scale, some don't.
* Even this window scale is not correct because it doesn't account for:
@ -2982,7 +2982,7 @@ static void gesture_pinch_handle_begin(void *data,
*/
const wl_fixed_t win_scale = win ? win->scale() : 1;
/* NOTE(@campbellbarton): Scale factors match Blender's operators & default preferences.
/* NOTE(@ideasman42): Scale factors match Blender's operators & default preferences.
* For these values to work correctly, operator logic will need to be changed not to scale input
* by the region size (as with 3D view zoom) or preference for 3D view orbit sensitivity.
*
@ -3145,7 +3145,7 @@ static const struct zwp_pointer_gesture_swipe_v1_listener gesture_swipe_listener
/* -------------------------------------------------------------------- */
/** \name Listener (Touch Seat), #wl_touch_listener
*
* NOTE(@campbellbarton): It's not clear if this interface is used by popular compositors.
* NOTE(@ideasman42): It's not clear if this interface is used by popular compositors.
* It looks like GNOME/KDE only support `zwp_pointer_gestures_v1_interface`.
* If this isn't used anywhere, it could be removed.
* \{ */
@ -3806,7 +3806,7 @@ static xkb_keysym_t xkb_state_key_get_one_sym_without_modifiers(
/* Use an empty keyboard state to access key symbol without modifiers. */
xkb_keysym_t sym = xkb_state_key_get_one_sym(xkb_state_empty, key);
/* NOTE(@campbellbarton): Only perform the number-locked lookup as a fallback
/* NOTE(@ideasman42): Only perform the number-locked lookup as a fallback
* when a number-pad key has been pressed. This is important as some key-maps use number lock
* for switching other layers (in particular `de(neo_qwertz)` turns on layer-4), see: T96170.
* Alternative solutions could be to inspect the layout however this could get involved
@ -3936,7 +3936,7 @@ static void keyboard_handle_key(void *data,
else {
/* Key-up from keys that were not repeating cause the repeat timer to pause.
*
* NOTE(@campbellbarton): This behavior isn't universal, some text input systems will
* NOTE(@ideasman42): This behavior isn't universal, some text input systems will
* stop the repeat entirely. Choose to pause repeat instead as this is what GTK/WIN32 do,
* and it fits better for keyboard input that isn't related to text entry. */
timer_action = RESET;
@ -7035,7 +7035,7 @@ bool GHOST_SystemWayland::window_cursor_grab_set(const GHOST_TGrabCursorMode mod
UNPACK2(xy_next));
wl_surface_commit(wl_surface);
/* NOTE(@campbellbarton): The new cursor position is a hint,
/* NOTE(@ideasman42): The new cursor position is a hint,
* it's possible the hint is ignored. It doesn't seem like there is a good way to
* know if the hint will be used or not, at least not immediately. */
xy_motion[0] = xy_next[0];
@ -7078,7 +7078,7 @@ bool GHOST_SystemWayland::window_cursor_grab_set(const GHOST_TGrabCursorMode mod
if (mode != GHOST_kGrabDisable) {
if (grab_state_next.use_lock) {
if (!grab_state_prev.use_lock) {
/* TODO(@campbellbarton): As WAYLAND does not support warping the pointer it may not be
/* TODO(@ideasman42): As WAYLAND does not support warping the pointer it may not be
* possible to support #GHOST_kGrabWrap by pragmatically settings it's coordinates.
* An alternative could be to draw the cursor in software (and hide the real cursor),
* or just accept a locked cursor on WAYLAND. */

View File

@ -1080,7 +1080,7 @@ GHOST_EventCursor *GHOST_SystemWin32::processCursorEvent(GHOST_WindowWin32 *wind
if (window->getCursorGrabMode() == GHOST_kGrabHide) {
window->getClientBounds(bounds);
/* WARNING(@campbellbarton): The current warping logic fails to warp on every event,
/* WARNING(@ideasman42): The current warping logic fails to warp on every event,
* so the box needs to small enough not to let the cursor escape the window but large
* enough that the cursor isn't being warped every time.
* If this was not the case it would be less trouble to simply warp the cursor to the
@ -1179,7 +1179,7 @@ GHOST_EventKey *GHOST_SystemWin32::processKeyEvent(GHOST_WindowWin32 *window, RA
GHOST_TKey key = system->hardKey(raw, &key_down);
GHOST_EventKey *event;
/* NOTE(@campbellbarton): key repeat in WIN32 also applies to modifier-keys.
/* NOTE(@ideasman42): key repeat in WIN32 also applies to modifier-keys.
* Check for this case and filter out modifier-repeat.
* Typically keyboard events are *not* filtered as part of GHOST's event handling.
* As other GHOST back-ends don't have the behavior, it's simplest not to send them through.

View File

@ -278,7 +278,7 @@ uint8_t GHOST_SystemX11::getNumDisplays() const
void GHOST_SystemX11::getMainDisplayDimensions(uint32_t &width, uint32_t &height) const
{
if (m_display) {
/* NOTE(@campbellbarton): for this to work as documented,
/* NOTE(@ideasman42): 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);
@ -927,7 +927,7 @@ void GHOST_SystemX11::processEvent(XEvent *xe)
if (window->getCursorGrabMode() == GHOST_kGrabHide) {
window->getClientBounds(bounds);
/* TODO(@campbellbarton): warp the cursor to `window->getCursorGrabInitPos`,
/* TODO(@ideasman42): warp the cursor to `window->getCursorGrabInitPos`,
* on every motion event, see: D16557 (alternative fix for T102346). */
const int32_t subregion_div = 4; /* One quarter of the region. */
const int32_t size[2] = {bounds.getWidth(), bounds.getHeight()};

View File

@ -669,7 +669,7 @@ static void xdg_surface_handle_configure(void *data,
GHOST_SystemWayland *system = win->ghost_system;
const bool is_main_thread = system->main_thread_id == std::this_thread::get_id();
if (!is_main_thread) {
/* NOTE(@campbellbarton): this only gets one redraw,
/* NOTE(@ideasman42): this only gets one redraw,
* I could not find a case where this causes problems. */
gwl_window_pending_actions_tag(win, PENDING_FRAME_CONFIGURE);
}
@ -774,7 +774,7 @@ GHOST_WindowWayland::GHOST_WindowWayland(GHOST_SystemWayland *system,
window_->ghost_window = this;
window_->ghost_system = system;
/* NOTE(@campbellbarton): The scale set here to avoid flickering on startup.
/* NOTE(@ideasman42): The scale set here to avoid flickering on startup.
* When all monitors use the same scale (which is quite common) there aren't any problems.
*
* When monitors have different scales there may still be a visible window resize on startup.
@ -1078,7 +1078,7 @@ GHOST_WindowWayland::~GHOST_WindowWayland()
wl_surface_destroy(window_->wl_surface);
/* NOTE(@campbellbarton): Flushing will often run the appropriate handlers event
/* NOTE(@ideasman42): Flushing will often run the appropriate handlers event
* (#wl_surface_listener.leave in particular) to avoid attempted access to the freed surfaces.
* This is not fool-proof though, hence the call to #window_surface_unref, see: T99078. */
wl_display_flush(system_->wl_display());

View File

@ -40,7 +40,7 @@ typedef int32_t ft_pix;
/* Macros copied from `include/freetype/internal/ftobjs.h`. */
/**
* FIXME(@campbellbarton): Follow rounding from Blender 3.1x and older.
* FIXME(@ideasman42): Follow rounding from Blender 3.1x and older.
* This is what users will expect and changing this creates wider spaced text.
* Use this macro to communicate that rounding should be used, using floor is to avoid
* user visible changes, which can be reviewed and handled separately.

View File

@ -425,7 +425,7 @@ int set_listbasepointers(struct Main *main, struct ListBase *lb[]);
/**
* The size of thumbnails (optionally) stored in the `.blend` files header.
*
* NOTE(@campbellbarton): This is kept small as it's stored uncompressed in the `.blend` file,
* NOTE(@ideasman42): This is kept small as it's stored uncompressed in the `.blend` file,
* where a larger size would increase the size of every `.blend` file unreasonably.
* If we wanted to increase the size, we'd want to use compression (JPEG or similar).
*/

View File

@ -1467,7 +1467,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(@campbellbarton): avoid the need to convert to mesh data just to add an orco layer. */
/* FIXME(@ideasman42): 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

@ -884,7 +884,7 @@ static void where_am_i(char *fullname, const size_t maxlen, const char *name)
void BKE_appdir_program_path_init(const char *argv0)
{
#ifdef WITH_PYTHON_MODULE
/* NOTE(@campbellbarton): Always use `argv[0]` as is, when building as a Python module.
/* NOTE(@ideasman42): Always use `argv[0]` as is, when building as a Python module.
* Otherwise other methods of detecting the binary that override this argument
* which must point to the Python module for data-files to be detected. */
STRNCPY(g_app.program_filepath, argv0);

View File

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

View File

@ -1558,7 +1558,7 @@ static void followpath_evaluate(bConstraint *con, bConstraintOb *cob, ListBase *
/* un-apply scaling caused by path */
if ((data->followflag & FOLLOWPATH_RADIUS) == 0) {
/* XXX(@campbellbarton): Assume that scale correction means that radius
/* XXX(@ideasman42): Assume that scale correction means that radius
* will have some scale error in it. */
float obsize[3];
@ -3835,7 +3835,7 @@ static void clampto_evaluate(bConstraint *con, bConstraintOb *cob, ListBase *tar
unit_m4(targetMatrix);
INIT_MINMAX(curveMin, curveMax);
/* XXX(@campbellbarton): don't think this is good calling this here because
/* XXX(@ideasman42): don't think this is good calling this here because
* the other object's data is lazily initializing bounding-box information.
* This could cause issues when evaluating from a thread.
* If the depsgraph ensures the bound-box is always available, a code-path could

View File

@ -2251,7 +2251,7 @@ static void make_bevel_list_3D_minimum_twist(BevList *bl)
int nr;
float q[4];
const bool is_cyclic = bl->poly != -1;
/* NOTE(@campbellbarton): For non-cyclic curves only initialize the first direction
/* NOTE(@ideasman42): For non-cyclic curves only initialize the first direction
* (via `vec_to_quat`), necessary for symmetry, see T71137.
* Otherwise initialize the first and second points before propagating rotation forward.
* This is historical as changing this can cause significantly different output.
@ -2480,7 +2480,7 @@ static void make_bevel_list_segment_2D(BevList *bl)
static void make_bevel_list_2D(BevList *bl)
{
/* NOTE(@campbellbarton): `bevp->dir` and `bevp->quat` are not needed for beveling but are
/* NOTE(@ideasman42): `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

@ -1122,7 +1122,7 @@ void BKE_effectors_apply(ListBase *effectors,
float *wind_force,
float *impulse)
{
/* WARNING(@campbellbarton): historic comment?
/* WARNING(@ideasman42): historic comment?
* Many of these parameters don't exist!
*
* scene = scene where it runs in, for time and stuff.

View File

@ -74,7 +74,7 @@ ImBuf *BKE_icon_geom_rasterize(const struct Icon_Geom *geom, const uint size_x,
const uchar(*pos)[2] = geom->coords;
const uint *col = (void *)geom->colors;
/* TODO(@campbellbarton): Currently rasterizes to fixed size, then scales.
/* TODO(@ideasman42): 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

@ -797,7 +797,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(@campbellbarton): Don't overwrite the data's name and type
/* NOTE(@ideasman42): 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

@ -121,7 +121,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(@campbellbarton): the file may be unsaved, in this case, setting the
/* NOTE(@ideasman42): 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

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

View File

@ -277,7 +277,7 @@ bool BKE_mball_is_basis(const Object *ob)
/* Meta-Ball Basis Notes from Blender-2.5x
* =======================================
*
* NOTE(@campbellbarton): This is a can of worms.
* NOTE(@ideasman42): This is a can of worms.
*
* This really needs a rewrite/refactor its totally broken in anything other than basic cases
* Multiple Scenes + Set Scenes & mixing meta-ball basis _should_ work but fails to update the
@ -485,7 +485,7 @@ bool BKE_mball_minmax_ex(
copy_v3_v3(centroid, &ml->x);
}
/* TODO(@campbellbarton): non circle shapes cubes etc, probably nobody notices. */
/* TODO(@ideasman42): 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

@ -34,7 +34,7 @@ static int compare_v2_classify(const float uv_a[2], const float uv_b[2])
if (uv_a[0] == uv_b[0] && uv_a[1] == uv_b[1]) {
return CMP_EQUAL;
}
/* NOTE(@campbellbarton): that the ULP value is the primary value used to compare relative
/* NOTE(@ideasman42): that the ULP value is the primary value used to compare relative
* values as the absolute value doesn't account for float precision at difference scales.
* - For subdivision-surface ULP of 3 is sufficient,
* although this value is extremely small.

View File

@ -573,7 +573,7 @@ void BKE_mesh_calc_loop_tangents(Mesh *me_eval,
const char (*tangent_names)[MAX_CUSTOMDATA_LAYER_NAME],
int tangent_names_len)
{
/* TODO(@campbellbarton): store in Mesh.runtime to avoid recalculation. */
/* TODO(@ideasman42): store in Mesh.runtime to avoid recalculation. */
short tangent_mask = 0;
BKE_mesh_calc_loop_tangent_ex(
BKE_mesh_vert_positions(me_eval),

View File

@ -2432,7 +2432,7 @@ ParticleSystem *BKE_object_copy_particlesystem(ParticleSystem *psys, const int f
psysn->pointcache = BKE_ptcache_copy_list(&psysn->ptcaches, &psys->ptcaches, flag);
}
/* XXX(@campbellbarton): from reading existing code this seems correct but intended usage of
/* XXX(@ideasman42): from reading existing code this seems correct but intended usage of
* point-cache should with cloth should be added in 'ParticleSystem'. */
if (psysn->clmd) {
psysn->clmd->point_cache = psysn->pointcache;

View File

@ -1382,7 +1382,7 @@ void BKE_ocean_bake(struct Ocean *o,
void (*update_cb)(void *, float progress, int *cancel),
void *update_cb_data)
{
/* NOTE(@campbellbarton): some of these values remain uninitialized unless certain options
/* NOTE(@ideasman42): 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;
@ -1437,7 +1437,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(@campbellbarton): cleanup unused code. */
/* TODO(@ideasman42): cleanup unused code. */
float /* r, */ /* UNUSED */ pr = 0.0f, foam_result;
float neg_disp, neg_eplus;

View File

@ -5470,7 +5470,7 @@ void BKE_particle_system_blend_read_lib(BlendLibReader *reader,
BLO_read_id_address(reader, id->lib, &psys->target_ob);
if (psys->clmd) {
/* XXX(@campbellbarton): from reading existing code this seems correct but intended usage
/* XXX(@ideasman42): from reading existing code this seems correct but intended usage
* of point-cache with cloth should be added in #ParticleSystem. */
psys->clmd->point_cache = psys->pointcache;
psys->clmd->ptcaches.first = psys->clmd->ptcaches.last = nullptr;

View File

@ -967,7 +967,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(@campbellbarton): it looks like rotation phase may be applied twice
/* NOTE(@ideasman42): 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

@ -2588,7 +2588,7 @@ static bool check_rendered_viewport_visible(Main *bmain)
return false;
}
/* TODO(@campbellbarton): shouldn't we be able to use 'DEG_get_view_layer' here?
/* TODO(@ideasman42): 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 Scene *scene,

View File

@ -893,7 +893,7 @@ static void ccgDM_copyFinalVertArray(DerivedMesh *dm, float (*r_positions)[3])
int x;
for (x = 1; x < edgeSize - 1; x++) {
/* NOTE(@campbellbarton): This gives errors with `--debug-fpe` the normals don't seem to be
/* NOTE(@ideasman42): This gives errors with `--debug-fpe` the normals don't seem to be
* unit length. This is most likely caused by edges with no faces which are now zeroed out,
* see comment in: `ccgSubSurf__calcVertNormals()`. */
vd = static_cast<CCGElem *>(ccgSubSurf_getEdgeData(ss, e, x));

View File

@ -757,7 +757,7 @@ template<typename T> detail::Quaternion<T> normalized_to_quat_fast(const MatBase
}
}
else {
/* NOTE(@campbellbarton): A zero matrix will fall through to this block,
/* NOTE(@ideasman42): A zero matrix will fall through to this block,
* needed so a zero scaled matrices to return a quaternion without rotation, see: T101848.
*/
const T trace = 1.0f + mat[0][0] + mat[1][1] + mat[2][2];

View File

@ -82,7 +82,7 @@ struct ScanFillEdge *BLI_scanfill_edge_add(ScanFillContext *sf_ctx,
struct ScanFillVert *v2);
enum {
/* NOTE(@campbellbarton): using #BLI_SCANFILL_CALC_REMOVE_DOUBLES
/* NOTE(@ideasman42): 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

@ -9,7 +9,7 @@
*/
#ifdef __GNUC__
/* NOTE(@campbellbarton): CLANG behaves slightly differently to GCC,
/* NOTE(@ideasman42): CLANG behaves slightly differently to GCC,
* these can be enabled but do so carefully as they can introduce build-errors. */
# if !defined(__clang__)
# pragma GCC diagnostic error "-Wsign-compare"

View File

@ -1667,7 +1667,7 @@ bool isect_ray_tri_v3(const float ray_origin[3],
float *r_lambda,
float r_uv[2])
{
/* NOTE(@campbellbarton): these values were 0.000001 in 2.4x but for projection snapping on
/* NOTE(@ideasman42): 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];
@ -3773,7 +3773,7 @@ void barycentric_weights_v2_quad(const float v1[2],
const float co[2],
float w[4])
{
/* NOTE(@campbellbarton): fabsf() here is not needed for convex quads
/* NOTE(@ideasman42): 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

@ -334,7 +334,7 @@ void mat3_normalized_to_quat_fast(float q[4], const float mat[3][3])
}
}
else {
/* NOTE(@campbellbarton): A zero matrix will fall through to this block,
/* NOTE(@ideasman42): A zero matrix will fall through to this block,
* needed so a zero scaled matrices to return a quaternion without rotation, see: T101848. */
const float trace = 1.0f + mat[0][0] + mat[1][1] + mat[2][2];
float s = 2.0f * sqrtf(trace);

View File

@ -329,7 +329,7 @@ void **BLI_smallhash_iternew_p(const SmallHash *sh, SmallHashIter *iter, uintptr
/** \name Debugging & Introspection
* \{ */
/* NOTE(@campbellbarton): useful for debugging but may not be intended for general use. */
/* NOTE(@ideasman42): useful for debugging but may not be intended for general use. */
#if 0
void BLI_smallhash_print(SmallHash *sh)
{

View File

@ -402,7 +402,7 @@ bool BLI_str_quoted_substr_range(const char *__restrict str,
return true;
}
/* NOTE(@campbellbarton): in principal it should be possible to access a quoted string
/* NOTE(@ideasman42): in principal it should be possible to access a quoted string
* with an arbitrary size, currently all callers for this functionality
* happened to use a fixed size buffer, so only #BLI_str_quoted_substr is needed. */
#if 0

View File

@ -45,7 +45,7 @@ static const size_t utf8_skip_data[256] = {
ptrdiff_t BLI_str_utf8_invalid_byte(const char *str, size_t length)
{
/* NOTE(@campbellbarton): from libswish3, originally called u8_isvalid(),
/* NOTE(@ideasman42): from libswish3, originally called u8_isvalid(),
* modified to return the index of the bad character (byte index not UTF).
* http://svn.swish-e.org/libswish3/trunk/src/libswish3/utf8.c r3044.
*
@ -403,7 +403,7 @@ int BLI_str_utf8_char_width_safe(const char *p)
/* copied from glib's gutf8.c, added 'Err' arg */
/* NOTE(@campbellbarton): glib uses uint for unicode, best we do the same,
/* NOTE(@ideasman42): 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

@ -288,7 +288,7 @@ void BLO_expand_id(BlendExpander *expander, struct ID *id);
* This function ensures that reports are printed,
* in the case of library linking errors this is important!
*
* NOTE(@campbellbarton) a kludge but better than doubling up on prints,
* NOTE(@ideasman42) a kludge but better than doubling up on prints,
* we could alternatively have a versions of a report function which forces printing.
*/
void BLO_reportf_wrap(struct BlendFileReadReport *reports,

View File

@ -859,7 +859,7 @@ static void bm_to_mesh_shape(BMesh *bm,
((keyi = BM_ELEM_CD_GET_INT(eve, cd_shape_keyindex_offset)) != ORIGINDEX_NONE) &&
(keyi < currkey->totelem)) {
/* Reconstruct keys via vertices original key indices.
* WARNING(@campbellbarton): `currkey->data` is known to be unreliable as the edit-mesh
* WARNING(@ideasman42): `currkey->data` is known to be unreliable as the edit-mesh
* coordinates may be flushed back to the shape-key when exporting or rendering.
* This is a last resort! If this branch is running as part of regular usage
* it can be considered a bug. */

View File

@ -15,7 +15,7 @@
#include "intern/bmesh_operators_private.h" /* own include */
/**
* TODO(@campbellbarton): Many connected edge loops can cause an error attempting
* TODO(@ideasman42): Many connected edge loops can cause an error attempting
* to create faces with duplicate vertices. While this needs to be investigated,
* it's simple enough to check for this case, see: T102232.
*/

View File

@ -19,7 +19,7 @@
void bmo_contextual_create_exec(BMesh *bm, BMOperator *op)
{
/* NOTE(@campbellbarton): doing the best thing here isn't always easy create vs dissolve,
/* NOTE(@ideasman42): doing the best thing here isn't always easy create vs dissolve,
* its nice to support but it _really_ gives issues we might have to not call dissolve. */
BMOIter oiter;

View File

@ -7,7 +7,7 @@
namespace blender::compositor {
#define USE_FORCE_BILINEAR
/* XXX(@campbellbarton): ignore input and use default from old compositor,
/* XXX(@ideasman42): 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

@ -2229,7 +2229,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(@campbellbarton): We should be able to use the CoW object,
/* FIXME(@ideasman42): 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

@ -22,7 +22,7 @@ void main()
if (lineStyle == OVERLAY_UV_LINE_STYLE_OUTLINE) {
#ifdef USE_EDGE_SELECT
/* TODO(@campbellbarton): The current wire-edit color contrast enough against the selection.
/* TODO(@ideasman42): The current wire-edit color contrast enough against the selection.
* Look into changing the default theme color instead of reducing contrast with edge-select. */
inner_color = (geom_out.selectionFac != 0.0) ? colorEdgeSelect : (colorWireEdit * 0.5);
#else

View File

@ -1095,7 +1095,7 @@ static bool skip_fcurve_selected_data(bDopeSheet *ads, FCurve *fcu, ID *owner_id
/* Can only add this F-Curve if it is selected. */
if (ads->filterflag & ADS_FILTER_ONLYSEL) {
/* NOTE(@campbellbarton): The `seq == NULL` check doesn't look right
/* NOTE(@ideasman42): The `seq == NULL` check doesn't look right
* (compared to other checks in this function which skip data that can't be found).
*
* This is done since the search for sequence strips doesn't use a global lookup:

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(@campbellbarton): optimize, eg: sort & binary search. */
/* TODO(@ideasman42): 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(@campbellbarton): optimize, eg: sort & binary search. */
/* TODO(@ideasman42): 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(@campbellbarton): optimize, eg: sort & binary search. */
/* TODO(@ideasman42): 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];
@ -1451,7 +1451,7 @@ static void armature_select_more_less(Object *ob, bool more)
bArmature *arm = (bArmature *)ob->data;
EditBone *ebone;
/* XXX(@campbellbarton): eventually we shouldn't need this. */
/* XXX(@ideasman42): eventually we shouldn't need this. */
ED_armature_edit_sync_selection(arm->edbo);
/* count bones & store selection state */

View File

@ -168,7 +168,7 @@ bool ED_armature_pose_select_pick_bone(const Scene *scene,
/* Since we do unified select, we don't shift+select a bone if the
* armature object was not active yet.
* NOTE(@campbellbarton): special exception for armature mode so we can do multi-select
* NOTE(@ideasman42): 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

@ -1278,7 +1278,7 @@ void ED_curve_editnurb_make(Object *obedit)
if (actkey) {
// XXX strcpy(G.editModeTitleExtra, "(Key) ");
/* TODO(@campbellbarton): undo_system: investigate why this was needed. */
/* TODO(@ideasman42): 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(@campbellbarton): We can't reasonably search all configurations - long term. */
/* FIXME(@ideasman42): We can't reasonably search all configurations - long term. */
IDPropertyTemplate val = {0};
val.i = i;

View File

@ -322,7 +322,7 @@ void ui_but_anim_decorate_cb(bContext *C, void *arg_but, void * /*arg_dummy*/)
return;
}
/* FIXME(@campbellbarton): swapping active pointer is weak. */
/* FIXME(@ideasman42): swapping active pointer is weak. */
std::swap(but_anim->active, but_decorate->active);
wm->op_undo_depth++;

View File

@ -8793,7 +8793,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(@campbellbarton): look into a better way to handle the button change
/* TODO(@ideasman42): 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

@ -1890,7 +1890,7 @@ static void icon_draw_size(float x,
}
else if (di->type == ICON_TYPE_GEOM) {
#ifdef USE_UI_TOOLBAR_HACK
/* TODO(@campbellbarton): scale icons up for toolbar,
/* TODO(@ideasman42): 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);
@ -1905,7 +1905,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(@campbellbarton): support caching multiple sizes. */
* TODO(@ideasman42): support caching multiple sizes. */
ImBuf *ibuf = di->data.geom.image_cache;
if ((ibuf == nullptr) || (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(@campbellbarton): we may want to make this configurable.
/* TODO(@ideasman42): 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(@campbellbarton):
/* TODO(@ideasman42):
* 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
@ -996,7 +996,7 @@ static uiTooltipData *ui_tooltip_data_from_gizmo(bContext *C, wmGizmo *gz)
{
uiTooltipData *data = MEM_cnew<uiTooltipData>(__func__);
/* TODO(@campbellbarton): a way for gizmos to have their own descriptions (low priority). */
/* TODO(@ideasman42): a way for gizmos to have their own descriptions (low priority). */
/* Operator Actions */
{
@ -1058,7 +1058,7 @@ static uiTooltipData *ui_tooltip_data_from_gizmo(bContext *C, wmGizmo *gz)
if (gz->type->target_property_defs_len) {
wmGizmoProperty *gz_prop_array = WM_gizmo_target_property_array(gz);
for (int i = 0; i < gz->type->target_property_defs_len; i++) {
/* TODO(@campbellbarton): function callback descriptions. */
/* TODO(@ideasman42): function callback descriptions. */
wmGizmoProperty *gz_prop = &gz_prop_array[i];
if (gz_prop->prop != nullptr) {
const char *info = RNA_property_ui_description(gz_prop->prop);

View File

@ -349,7 +349,7 @@ int UI_fontstyle_string_width_with_block_aspect(const uiFontStyle *fs,
const char *str,
const float aspect)
{
/* FIXME(@campbellbarton): the final scale of the font is rounded which should be accounted for.
/* FIXME(@ideasman42): the final scale of the font is rounded which should be accounted for.
* Failing to do so causes bad alignment when zoomed out very far in the node-editor. */
fontstyle_set_ex(fs, U.dpi_fac / aspect);
return int(BLF_width(fs->uifont_id, str, BLF_DRAW_STR_DUMMY_MAX) * aspect);

View File

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

View File

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

View File

@ -749,7 +749,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(@campbellbarton): optimize, eg: sort & binary search. */
/* TODO(@ideasman42): 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

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

View File

@ -915,7 +915,7 @@ void ED_vgroup_vert_remove(Object *ob, bDeformGroup *dg, int vertnum)
* deform group.
*/
/* TODO(@campbellbarton): This is slow in a loop, better pass def_nr directly,
/* TODO(@ideasman42): 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);
@ -1142,7 +1142,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(@campbellbarton): we might want to allow only copy selected verts here? */
/* TODO(@ideasman42): we might want to allow only copy selected verts here? */
ED_vgroup_parray_alloc(static_cast<ID *>(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(@campbellbarton): regarding (fac > 0.5f) checks below.
/* NOTE(@ideasman42): 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(@campbellbarton): tools */
/* TODO(@ideasman42): 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(@campbellbarton): this is almost an _exact_ duplicate of a function of the same name in
/* TODO(@ideasman42): 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

@ -1134,7 +1134,7 @@ static const EnumPropertyItem prop_column_select_types[] = {
/* ------------------- */
/* Selects all visible keyframes between the specified markers */
/* TODO(@campbellbarton): this is almost an _exact_ duplicate of a function of the same name in
/* TODO(@ideasman42): 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(@campbellbarton): this crashes on netrender and keying sets, need to look into why
/* TODO(@ideasman42): 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

@ -2882,7 +2882,7 @@ static int sequencer_change_path_exec(bContext *C, wmOperator *op)
RNA_string_get(op->ptr, "directory", directory);
if (is_relative_path) {
/* TODO(@campbellbarton): shouldn't this already be relative from the filesel?
/* TODO(@ideasman42): 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(@campbellbarton): why is this function better than BLI_math version?
/* XXX(@ideasman42): 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(@campbellbarton): this code could be refactored or rewritten. */
/* NOTE(@ideasman42): 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

@ -746,7 +746,7 @@ static void view3d_ob_drop_copy_local_id(bContext * /*C*/, wmDrag *drag, wmDropB
* make sharing code a bit difficult. */
static void view3d_ob_drop_copy_external_asset(bContext * /*C*/, wmDrag *drag, wmDropBox *drop)
{
/* NOTE(@campbellbarton): Selection is handled here, de-selecting objects before append,
/* NOTE(@ideasman42): Selection is handled here, de-selecting objects before append,
* using auto-select to ensure the new objects are selected.
* This is done so #OBJECT_OT_transform_to_mouse (which runs after this drop handler)
* can use the context setup here to place the objects. */
@ -975,7 +975,7 @@ static void view3d_widgets()
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(@campbellbarton): Not working well enough, disable for now. */
/* TODO(@ideasman42): Not working well enough, disable for now. */
#if 0
WM_gizmogrouptype_append_and_link(gzmap_type, VIEW3D_GGT_armature_spline);
#endif

View File

@ -1690,7 +1690,7 @@ void ED_view3d_draw_offscreen(Depsgraph *depsgraph,
{
/* Free images which can have changed on frame-change.
* WARNING(@campbellbarton): can be slow so only free animated images. */
* WARNING(@ideasman42): can be slow so only free animated images. */
BKE_image_free_anim_gputextures(G.main);
}
@ -2412,7 +2412,7 @@ void ED_view3d_datamask(const Scene *scene,
const View3D *v3d,
CustomData_MeshMasks *r_cddata_masks)
{
/* NOTE(@campbellbarton): as this function runs continuously while idle
/* NOTE(@ideasman42): as this function runs continuously while idle
* (from #wm_event_do_depsgraph) take care to avoid expensive lookups.
* While they won't hurt performance noticeably, they will increase CPU usage while idle. */
if (ELEM(v3d->shading.type, OB_TEXTURE, OB_MATERIAL, OB_RENDER)) {

View File

@ -37,7 +37,7 @@
* \{ */
/*
* TODO(@campbellbarton): Current conversion is a approximation (usable not correct),
* TODO(@ideasman42): 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

@ -48,7 +48,7 @@
* Check if drawing should be performed, clear the pre-selection in the case it's disabled.
* Without this, the gizmo would be visible while transforming. See T92954.
*
* NOTE(@campbellbarton): This is a workaround for the gizmo system, since typically poll
* NOTE(@ideasman42): This is a workaround for the gizmo system, since typically poll
* would be used for this purpose. The problem with using poll is once the gizmo is visible again
* is there is a visible flicker showing the previous location before cursor motion causes the
* pre selection to be updated. While this is only a glitch, it's distracting.

View File

@ -382,7 +382,7 @@ static int view3d_ndof_cameraview_pan_zoom(bContext *C, const wmEvent *event)
* #ED_view3d_camera_view_pan already takes the zoom level into account. */
mul_v2_fl(pan_vec, pan_speed);
/* NOTE(@campbellbarton): In principle rotating could pass through to regular
/* NOTE(@ideasman42): In principle rotating could pass through to regular
* non-camera NDOF behavior (exiting the camera-view and rotating).
* Disabled this block since in practice it's difficult to control NDOF devices
* to perform some rotation with absolutely no translation. Causing rotation to

View File

@ -35,7 +35,7 @@ static void view3d_smoothview_apply_with_interp(
* undo is pushed then the change is rewound, and smooth-view completes from it's timer.
* In the case smooth-view executed the change immediately - an undo push is called.
*
* NOTE(@campbellbarton): While this is not ideal it's necessary as making the undo-push
* NOTE(@ideasman42): While this is not ideal it's necessary as making the undo-push
* once smooth-view is complete because smooth-view is non-blocking and it's possible other
* operations are executed once smooth-view has started.
* \{ */
@ -85,7 +85,7 @@ void ED_view3d_smooth_view_undo_end(bContext *C,
return;
}
/* NOTE(@campbellbarton): It is not possible that a single viewport references different cameras
/* NOTE(@ideasman42): It is not possible that a single viewport references different cameras
* so even in the case there is a quad-view with multiple camera views set, these will all
* reference the same camera. In this case it doesn't matter which region is used.
* If in the future multiple cameras are supported, this logic can be extended. */

View File

@ -1321,7 +1321,7 @@ 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(@campbellbarton): fix crazy-space & extrude so it can be enabled for general use. \
#if 0 /* TODO(@ideasman42): fix crazy-space & extrude so it can be enabled for general use. \
*/
if ((totleft > 0) || (totleft == -1))
#else
@ -2131,7 +2131,7 @@ static 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(@campbellbarton): xform: We need support for many mirror objects at once! */
/* TODO(@ideasman42): 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(@campbellbarton): run second since this modifies the 3D view, it should not. */
/* TODO(@ideasman42): 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(@campbellbarton): xform, compensate object center. */
/* TODO(@ideasman42): xform, compensate object center. */
FOREACH_TRANS_DATA_CONTAINER (t, tc) {
float warp_sta_local[3];

View File

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

View File

@ -265,7 +265,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(@campbellbarton): undo_system: use undo system */
/* TODO(@ideasman42): 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

@ -178,7 +178,7 @@ void ED_editors_init(bContext *C)
}
}
else {
/* TODO(@campbellbarton): avoid operator calls. */
/* TODO(@ideasman42): 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_3D_UNIFORM_COLOR);
immUniformColor3fv(color);
/* TODO(@campbellbarton): lock to pixels. */
/* TODO(@ideasman42): lock to pixels. */
rctf sample_rect_fl;
BLI_rctf_init_pt_radius(
&sample_rect_fl,

View File

@ -1392,7 +1392,7 @@ static BMLoop *bm_select_edgeloop_single_side_next(const Scene *scene,
scene, l_step, v_from_next, offsets);
}
/* TODO(@campbellbarton): support this in the BMesh API, as we have for clearing other types. */
/* TODO(@ideasman42): 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

@ -1121,9 +1121,8 @@ Quaternion normalized_to_quat_fast(mat3 mat)
}
}
else {
/* NOTE(@campbellbarton): A zero matrix will fall through to this block,
* needed so a zero scaled matrices to return a quaternion without rotation, see: T101848.
*/
/* NOTE(@ideasman42): A zero matrix will fall through to this block,
* needed so a zero scaled matrices to return a quaternion without rotation, see: T101848. */
float trace = 1.0f + mat[0][0] + mat[1][1] + mat[2][2];
float s = 2.0f * sqrt(trace);
q.x = 0.25f * s;

View File

@ -9,7 +9,7 @@
#include "DNA_defs.h"
/* XXX(@campbellbarton): temp feature. */
/* XXX(@ideasman42): temp feature. */
#define DURIAN_CAMERA_SWITCH
/**

View File

@ -2094,7 +2094,7 @@ static void rna_property_update(
}
#if 1
/* TODO(@campbellbarton): Should eventually be replaced entirely by message bus (below)
/* TODO(@ideasman42): 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

@ -3141,7 +3141,7 @@ static void rna_def_particle_settings(BlenderRNA *brna)
/* children */
/* NOTE(@campbellbarton): name is not following conventions: `nbr`.
/* NOTE(@ideasman42): name is not following conventions: `nbr`.
* Could be changed next major version. */
prop = RNA_def_property(srna, "child_nbr", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(

View File

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

View File

@ -1318,7 +1318,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(@campbellbarton): we need to act differently for render
/* NOTE(@ideasman42): 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

@ -2752,7 +2752,7 @@ static void rna_def_keyconfig(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "OS Key", "Operating system key pressed, -1 for any state");
RNA_def_property_update(prop, 0, "rna_KeyMapItem_update");
/* XXX(@campbellbarton): the `*_ui` suffix is only for the UI, may be removed,
/* XXX(@ideasman42): the `*_ui` suffix is only for the UI, may be removed,
* since this is only exposed so the UI can show these settings as toggle-buttons. */
prop = RNA_def_property(srna, "shift_ui", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "shift", 0);

View File

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

View File

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

View File

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

View File

@ -752,7 +752,7 @@ static Mesh *cutEdges(ExplodeModifierData *emd, Mesh *mesh)
/* override original facepa (original pointer is saved in caller function) */
/* TODO(@campbellbarton): `(totfsplit * 2)` over allocation is used since the quads are
/* TODO(@ideasman42): `(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

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

View File

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

View File

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

View File

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

View File

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

View File

@ -210,7 +210,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);
/* TODO(@campbellbarton): use edit-mode data only (remove this line). */
/* TODO(@ideasman42): 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

@ -1012,7 +1012,7 @@ Mesh *MOD_solidify_extrude_modifyMesh(ModifierData *md, const ModifierEvalContex
if (do_rim) {
uint i;
/* NOTE(@campbellbarton): Unfortunately re-calculate the normals for the new edge
/* NOTE(@ideasman42): 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.

View File

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

View File

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

View File

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

Some files were not shown because too many files have changed in this diff Show More