Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2021-07-03 16:08:40 +0300
committerCampbell Barton <ideasman42@gmail.com>2021-07-03 17:43:40 +0300
commit9b89de2571b0c3fa2276b5c2ae589e0ec831d1f5 (patch)
tree63f1007a5262b4d6f1c1a96734c521d836eb6fc6 /source/blender/editors/space_view3d
parent05f970847e12ce30e8c4c624677d94ae239ce2bc (diff)
Cleanup: consistent use of tags: NOTE/TODO/FIXME/XXX
Also use doxy style function reference `#` prefix chars when referencing identifiers.
Diffstat (limited to 'source/blender/editors/space_view3d')
-rw-r--r--source/blender/editors/space_view3d/space_view3d.c2
-rw-r--r--source/blender/editors/space_view3d/view3d_draw.c14
-rw-r--r--source/blender/editors/space_view3d/view3d_edit.c14
-rw-r--r--source/blender/editors/space_view3d/view3d_gizmo_armature.c2
-rw-r--r--source/blender/editors/space_view3d/view3d_gizmo_camera.c4
-rw-r--r--source/blender/editors/space_view3d/view3d_gizmo_light.c4
-rw-r--r--source/blender/editors/space_view3d/view3d_gizmo_ruler.c2
-rw-r--r--source/blender/editors/space_view3d/view3d_navigate_walk.c2
-rw-r--r--source/blender/editors/space_view3d/view3d_placement.c2
-rw-r--r--source/blender/editors/space_view3d/view3d_project.c2
-rw-r--r--source/blender/editors/space_view3d/view3d_select.c6
-rw-r--r--source/blender/editors/space_view3d/view3d_snap.c2
-rw-r--r--source/blender/editors/space_view3d/view3d_utils.c2
-rw-r--r--source/blender/editors/space_view3d/view3d_view.c2
14 files changed, 30 insertions, 30 deletions
diff --git a/source/blender/editors/space_view3d/space_view3d.c b/source/blender/editors/space_view3d/space_view3d.c
index 6ce13f83cf3..54f10e259f9 100644
--- a/source/blender/editors/space_view3d/space_view3d.c
+++ b/source/blender/editors/space_view3d/space_view3d.c
@@ -1096,7 +1096,7 @@ static void view3d_main_region_message_subscribe(const wmRegionMessageSubscribeP
ScrArea *area = params->area;
ARegion *region = params->region;
- /* Developer note: there are many properties that impact 3D view drawing,
+ /* Developer NOTE: there are many properties that impact 3D view drawing,
* so instead of subscribing to individual properties, just subscribe to types
* accepting some redundant redraws.
*
diff --git a/source/blender/editors/space_view3d/view3d_draw.c b/source/blender/editors/space_view3d/view3d_draw.c
index 2e46deea0e8..ea9d9a8c010 100644
--- a/source/blender/editors/space_view3d/view3d_draw.c
+++ b/source/blender/editors/space_view3d/view3d_draw.c
@@ -140,7 +140,7 @@ void ED_view3d_update_viewmat(Depsgraph *depsgraph,
rect_scale[0] = (float)BLI_rcti_size_x(rect) / (float)region->winx;
rect_scale[1] = (float)BLI_rcti_size_y(rect) / (float)region->winy;
}
- /* note: calls BKE_object_where_is_calc for camera... */
+ /* NOTE: calls BKE_object_where_is_calc for camera... */
view3d_viewmatrix_set(depsgraph, scene, v3d, rv3d, rect ? rect_scale : NULL);
}
/* update utility matrices */
@@ -167,7 +167,7 @@ void ED_view3d_update_viewmat(Depsgraph *depsgraph,
/* Calculate pixel-size factor once, this is used for lights and object-centers. */
{
- /* note: '1.0f / len_v3(v1)' replaced 'len_v3(rv3d->viewmat[0])'
+ /* NOTE: '1.0f / len_v3(v1)' replaced 'len_v3(rv3d->viewmat[0])'
* because of float point precision problems at large values T23908. */
float v1[3], v2[3];
float len_px, len_sc;
@@ -563,10 +563,10 @@ static void drawviewborder(Scene *scene, Depsgraph *depsgraph, ARegion *region,
/* apply offsets so the real 3D camera shows through */
- /* note: quite un-scientific but without this bit extra
+ /* NOTE: quite un-scientific but without this bit extra
* 0.0001 on the lower left the 2D border sometimes
* obscures the 3D camera border */
- /* note: with VIEW3D_CAMERA_BORDER_HACK defined this error isn't noticeable
+ /* NOTE: with VIEW3D_CAMERA_BORDER_HACK defined this error isn't noticeable
* but keep it here in case we need to remove the workaround */
x1i = (int)(x1 - 1.0001f);
y1i = (int)(y1 - 1.0001f);
@@ -780,7 +780,7 @@ static void drawviewborder(Scene *scene, Depsgraph *depsgraph, ARegion *region,
/* draw */
immUniformThemeColorShadeAlpha(TH_VIEW_OVERLAY, 100, 255);
- /* TODO Was using:
+ /* TODO: Was using:
* UI_draw_roundbox_4fv(false, rect.xmin, rect.ymin, rect.xmax, rect.ymax, 2.0f, color);
* We'll probably need a new imm_draw_line_roundbox_dashed dor that - though in practice the
* 2.0f round corner effect was nearly not visible anyway... */
@@ -1159,7 +1159,7 @@ static void view3d_draw_border(const bContext *C, ARegion *region)
*/
static void view3d_draw_grease_pencil(const bContext *UNUSED(C))
{
- /* TODO viewport */
+ /* TODO: viewport. */
}
/**
@@ -2262,7 +2262,7 @@ void view3d_depths_rect_create(ARegion *region, rcti *rect, ViewDepths *r_d)
}
}
-/* Note, with nouveau drivers the glReadPixels() is very slow. T24339. */
+/* NOTE: with nouveau drivers the glReadPixels() is very slow. T24339. */
static ViewDepths *view3d_depths_create(ARegion *region)
{
ViewDepths *d = MEM_callocN(sizeof(ViewDepths), "ViewDepths");
diff --git a/source/blender/editors/space_view3d/view3d_edit.c b/source/blender/editors/space_view3d/view3d_edit.c
index 50e9a9fb805..9b067ac3edd 100644
--- a/source/blender/editors/space_view3d/view3d_edit.c
+++ b/source/blender/editors/space_view3d/view3d_edit.c
@@ -894,8 +894,8 @@ static void viewrotate_apply(ViewOpsData *vod, const int event_xy[2])
* rotation back into the view we calculate with */
copy_qt_qt(rv3d->viewquat, vod->curr.viewquat);
- /* check for view snap,
- * note: don't apply snap to vod->viewquat so the view won't jam up */
+ /* Check for view snap,
+ * NOTE: don't apply snap to `vod->viewquat` so the view won't jam up. */
if (vod->axis_snap) {
viewrotate_apply_snap(vod);
}
@@ -1506,7 +1506,7 @@ static int ndof_orbit_zoom_invoke(bContext *C, wmOperator *op, const wmEvent *ev
}
}
else {
- /* Note: based on feedback from T67579, users want to have pan and orbit enabled at once.
+ /* NOTE: based on feedback from T67579, users want to have pan and orbit enabled at once.
* It's arguable that orbit shouldn't pan (since we have a pan only operator),
* so if there are users who like to separate orbit/pan operations - it can be a preference. */
const bool is_orbit_around_pivot = (U.ndof_flag & NDOF_MODE_ORBIT) ||
@@ -2955,7 +2955,7 @@ static int view3d_all_exec(bContext *C, wmOperator *op)
if (!changed) {
ED_region_tag_redraw(region);
- /* TODO - should this be cancel?
+ /* TODO: should this be cancel?
* I think no, because we always move the cursor, with or without
* object, but in this case there is no change in the scene,
* only the cursor so I choice a ED_region_tag like
@@ -3604,7 +3604,7 @@ static int view3d_zoom_border_exec(bContext *C, wmOperator *op)
float depth_close = FLT_MAX;
float cent[2], p[3];
- /* note; otherwise opengl won't work */
+ /* NOTE: otherwise opengl won't work. */
view3d_operator_needs_opengl(C);
/* get box select values using rna */
@@ -4788,7 +4788,7 @@ static bool background_image_add_poll(bContext *C)
void VIEW3D_OT_background_image_add(wmOperatorType *ot)
{
/* identifiers */
- /* note: having key shortcut here is bad practice,
+ /* NOTE: having key shortcut here is bad practice,
* but for now keep because this displays when dragging an image over the 3D viewport */
ot->name = "Add Background Image";
ot->description = "Add a new background image";
@@ -4957,7 +4957,7 @@ void VIEW3D_OT_clip_border(wmOperatorType *ot)
* \{ */
/* cursor position in vec, result in vec, mval in region coords */
-/* note: cannot use event->mval here (called by object_add() */
+/* NOTE: cannot use `event->mval` here, called by #object_add(). */
void ED_view3d_cursor3d_position(bContext *C,
const int mval[2],
const bool use_depth,
diff --git a/source/blender/editors/space_view3d/view3d_gizmo_armature.c b/source/blender/editors/space_view3d/view3d_gizmo_armature.c
index 16c83b45924..83d3286c8b3 100644
--- a/source/blender/editors/space_view3d/view3d_gizmo_armature.c
+++ b/source/blender/editors/space_view3d/view3d_gizmo_armature.c
@@ -199,7 +199,7 @@ static void WIDGETGROUP_armature_spline_refresh(const bContext *C, wmGizmoGroup
mul_m4_m4m4(mat, ob->obmat, (i == 0) ? pchan->disp_mat : pchan->disp_tail_mat);
copy_m4_m4(gz->matrix_space, mat);
- /* need to set property here for undo. TODO would prefer to do this in _init */
+ /* need to set property here for undo. TODO: would prefer to do this in _init. */
WM_gizmo_target_property_def_func(gz,
"offset",
&(const struct wmGizmoPropertyFnParams){
diff --git a/source/blender/editors/space_view3d/view3d_gizmo_camera.c b/source/blender/editors/space_view3d/view3d_gizmo_camera.c
index 20d766357e8..e1d439bef15 100644
--- a/source/blender/editors/space_view3d/view3d_gizmo_camera.c
+++ b/source/blender/editors/space_view3d/view3d_gizmo_camera.c
@@ -153,7 +153,7 @@ static void WIDGETGROUP_camera_refresh(const bContext *C, wmGizmoGroup *gzgroup)
WM_gizmo_set_scale(cagzgroup->dop_dist, ca->drawsize);
WM_gizmo_set_flag(cagzgroup->dop_dist, WM_GIZMO_HIDDEN, false);
- /* Need to set property here for undo. TODO would prefer to do this in _init */
+ /* Need to set property here for undo. TODO: would prefer to do this in _init. */
PointerRNA camera_dof_ptr;
RNA_pointer_create(&ca->id, &RNA_CameraDOFSettings, &ca->dof, &camera_dof_ptr);
WM_gizmo_target_property_def_rna(
@@ -163,7 +163,7 @@ static void WIDGETGROUP_camera_refresh(const bContext *C, wmGizmoGroup *gzgroup)
WM_gizmo_set_flag(cagzgroup->dop_dist, WM_GIZMO_HIDDEN, true);
}
- /* TODO - make focal length/ortho ob_scale_inv widget optional */
+ /* TODO: make focal length/ortho ob_scale_inv widget optional. */
const Scene *scene = CTX_data_scene(C);
const float aspx = (float)scene->r.xsch * scene->r.xasp;
const float aspy = (float)scene->r.ysch * scene->r.yasp;
diff --git a/source/blender/editors/space_view3d/view3d_gizmo_light.c b/source/blender/editors/space_view3d/view3d_gizmo_light.c
index 5bf105b6775..d92ebfd57a8 100644
--- a/source/blender/editors/space_view3d/view3d_gizmo_light.c
+++ b/source/blender/editors/space_view3d/view3d_gizmo_light.c
@@ -99,7 +99,7 @@ static void WIDGETGROUP_light_spot_refresh(const bContext *C, wmGizmoGroup *gzgr
WM_gizmo_set_matrix_rotation_from_z_axis(gz, dir);
WM_gizmo_set_matrix_location(gz, ob->obmat[3]);
- /* need to set property here for undo. TODO would prefer to do this in _init */
+ /* need to set property here for undo. TODO: would prefer to do this in _init. */
PointerRNA lamp_ptr;
const char *propname = "spot_size";
RNA_pointer_create(&la->id, &RNA_Light, la, &lamp_ptr);
@@ -212,7 +212,7 @@ static void WIDGETGROUP_light_area_refresh(const bContext *C, wmGizmoGroup *gzgr
}
RNA_enum_set(gz->ptr, "transform", flag);
- /* need to set property here for undo. TODO would prefer to do this in _init */
+ /* need to set property here for undo. TODO: would prefer to do this in _init. */
WM_gizmo_target_property_def_func(gz,
"matrix",
&(const struct wmGizmoPropertyFnParams){
diff --git a/source/blender/editors/space_view3d/view3d_gizmo_ruler.c b/source/blender/editors/space_view3d/view3d_gizmo_ruler.c
index 0d568363b00..49299d73337 100644
--- a/source/blender/editors/space_view3d/view3d_gizmo_ruler.c
+++ b/source/blender/editors/space_view3d/view3d_gizmo_ruler.c
@@ -580,7 +580,7 @@ static void gizmo_ruler_draw(const bContext *C, wmGizmo *gz)
UI_GetThemeColor3ubv(TH_TEXT, color_text);
UI_GetThemeColor3ubv(TH_WIRE, color_wire);
- /* Avoid white on white text. (TODO Fix by using theme) */
+ /* Avoid white on white text. (TODO: Fix by using theme). */
if ((int)color_text[0] + (int)color_text[1] + (int)color_text[2] > 127 * 3 * 0.6f) {
copy_v3_fl(color_back, 0.0f);
}
diff --git a/source/blender/editors/space_view3d/view3d_navigate_walk.c b/source/blender/editors/space_view3d/view3d_navigate_walk.c
index 33cb6aad400..435d74aa591 100644
--- a/source/blender/editors/space_view3d/view3d_navigate_walk.c
+++ b/source/blender/editors/space_view3d/view3d_navigate_walk.c
@@ -694,7 +694,7 @@ static void walkEvent(bContext *C, WalkInfo *walk, const wmEvent *event)
walk->is_cursor_first = false;
}
else {
- /* note, its possible the system isn't giving us the warp event
+ /* NOTE: its possible the system isn't giving us the warp event
* ideally we shouldn't have to worry about this, see: T45361 */
wmWindow *win = CTX_wm_window(C);
WM_cursor_warp(win,
diff --git a/source/blender/editors/space_view3d/view3d_placement.c b/source/blender/editors/space_view3d/view3d_placement.c
index 1ea7993572d..aa3bf46d2e5 100644
--- a/source/blender/editors/space_view3d/view3d_placement.c
+++ b/source/blender/editors/space_view3d/view3d_placement.c
@@ -1610,7 +1610,7 @@ void VIEW3D_OT_interactive_add(struct wmOperatorType *ot)
ot->cancel = view3d_interactive_add_cancel;
ot->poll = view3d_interactive_add_poll;
- /* Note, let the operator we call handle undo and registering itself. */
+ /* NOTE: let the operator we call handle undo and registering itself. */
/* flags */
ot->flag = 0;
diff --git a/source/blender/editors/space_view3d/view3d_project.c b/source/blender/editors/space_view3d/view3d_project.c
index 8a900a4e898..d926ea84e0f 100644
--- a/source/blender/editors/space_view3d/view3d_project.c
+++ b/source/blender/editors/space_view3d/view3d_project.c
@@ -561,7 +561,7 @@ void ED_view3d_win_to_3d(const View3D *v3d,
copy_v3_v3(ray_origin, rv3d->viewinv[3]);
ED_view3d_win_to_vector(region, mval, ray_direction);
- /* Note: we could use #isect_line_plane_v3()
+ /* NOTE: we could use #isect_line_plane_v3()
* however we want the intersection to be in front of the view no matter what,
* so apply the unsigned factor instead. */
plane_from_point_normal_v3(plane, depth_pt, rv3d->viewinv[2]);
diff --git a/source/blender/editors/space_view3d/view3d_select.c b/source/blender/editors/space_view3d/view3d_select.c
index 0e5df3a0cdd..210dd7311a4 100644
--- a/source/blender/editors/space_view3d/view3d_select.c
+++ b/source/blender/editors/space_view3d/view3d_select.c
@@ -2291,7 +2291,7 @@ static bool ed_object_select_pick(bContext *C,
/* In edit-mode do not activate. */
if (obcenter) {
- /* note; shift+alt goes to group-flush-selecting */
+ /* NOTE: shift+alt goes to group-flush-selecting. */
if (enumerate) {
basact = object_mouse_select_menu(C, &vc, NULL, 0, mval, extend, deselect, toggle);
}
@@ -2354,10 +2354,10 @@ static bool ed_object_select_pick(bContext *C,
// TIMEIT_END(select_time);
if (hits > 0) {
- /* note: bundles are handling in the same way as bones */
+ /* NOTE: bundles are handling in the same way as bones. */
const bool has_bones = object ? false : selectbuffer_has_bones(buffer, hits);
- /* note; shift+alt goes to group-flush-selecting */
+ /* NOTE: shift+alt goes to group-flush-selecting. */
if (enumerate) {
if (has_bones &&
bone_mouse_select_menu(C, buffer, hits, false, extend, deselect, toggle)) {
diff --git a/source/blender/editors/space_view3d/view3d_snap.c b/source/blender/editors/space_view3d/view3d_snap.c
index 6dec3cc818a..a19e92f229a 100644
--- a/source/blender/editors/space_view3d/view3d_snap.c
+++ b/source/blender/editors/space_view3d/view3d_snap.c
@@ -895,7 +895,7 @@ void VIEW3D_OT_snap_cursor_to_selected(wmOperatorType *ot)
/**
* Calculates the center position of the active object in global space.
*
- * Note: this could be exported to be a generic function.
+ * NOTE: this could be exported to be a generic function.
* see: #calculateCenterActive
*/
static bool snap_calc_active_center(bContext *C, const bool select_only, float r_center[3])
diff --git a/source/blender/editors/space_view3d/view3d_utils.c b/source/blender/editors/space_view3d/view3d_utils.c
index 4f8b0fa4685..6e60996ab12 100644
--- a/source/blender/editors/space_view3d/view3d_utils.c
+++ b/source/blender/editors/space_view3d/view3d_utils.c
@@ -1699,7 +1699,7 @@ bool ED_view3d_depth_read_cached_normal(const ARegion *region,
const int mval[2],
float r_normal[3])
{
- /* Note: we could support passing in a radius.
+ /* NOTE: we could support passing in a radius.
* For now just read 9 pixels. */
/* pixels surrounding */
diff --git a/source/blender/editors/space_view3d/view3d_view.c b/source/blender/editors/space_view3d/view3d_view.c
index a2d50c43bd2..6a66cf8c337 100644
--- a/source/blender/editors/space_view3d/view3d_view.c
+++ b/source/blender/editors/space_view3d/view3d_view.c
@@ -392,7 +392,7 @@ static void view3d_smoothview_apply(bContext *C, View3D *v3d, ARegion *region, b
view3d_boxview_copy(CTX_wm_area(C), region);
}
- /* note: this doesn't work right because the v3d->lens is now used in ortho mode r51636,
+ /* NOTE: this doesn't work right because the v3d->lens is now used in ortho mode r51636,
* when switching camera in quad-view the other ortho views would zoom & reset.
*
* For now only redraw all regions when smooth-view finishes.