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:
Diffstat (limited to 'source/blender/editors/space_view3d')
-rw-r--r--source/blender/editors/space_view3d/view3d_buttons.c8
-rw-r--r--source/blender/editors/space_view3d/view3d_camera_control.c9
-rw-r--r--source/blender/editors/space_view3d/view3d_draw.c3
-rw-r--r--source/blender/editors/space_view3d/view3d_draw_legacy.c3
-rw-r--r--source/blender/editors/space_view3d/view3d_edit.c14
-rw-r--r--source/blender/editors/space_view3d/view3d_project.c8
-rw-r--r--source/blender/editors/space_view3d/view3d_snap.c8
-rw-r--r--source/blender/editors/space_view3d/view3d_utils.c6
-rw-r--r--source/blender/editors/space_view3d/view3d_view.c4
9 files changed, 38 insertions, 25 deletions
diff --git a/source/blender/editors/space_view3d/view3d_buttons.c b/source/blender/editors/space_view3d/view3d_buttons.c
index 987f09e049a..52feff4b65a 100644
--- a/source/blender/editors/space_view3d/view3d_buttons.c
+++ b/source/blender/editors/space_view3d/view3d_buttons.c
@@ -147,9 +147,11 @@ static float compute_scale_factor(const float ve_median, const float median)
}
}
-/* Apply helpers.
- * Note: In case we only have one element, copy directly the value instead of applying the diff or scale factor.
- * Avoids some glitches when going e.g. from 3 to 0.0001 (see T37327).
+/**
+ * Apply helpers.
+ * \note In case we only have one element,
+ * copy directly the value instead of applying the diff or scale factor.
+ * Avoids some glitches when going e.g. from 3 to 0.0001 (see T37327).
*/
static void apply_raw_diff(float *val, const int tot, const float ve_median, const float median)
{
diff --git a/source/blender/editors/space_view3d/view3d_camera_control.c b/source/blender/editors/space_view3d/view3d_camera_control.c
index c8059c25e15..0045094542f 100644
--- a/source/blender/editors/space_view3d/view3d_camera_control.c
+++ b/source/blender/editors/space_view3d/view3d_camera_control.c
@@ -23,10 +23,11 @@
* or other details.
* Typical view-control usage:
*
- * - acquire a view-control (#ED_view3d_cameracontrol_acquire).
- * - modify ``rv3d->ofs``, ``rv3d->viewquat``.
- * - update the view data (#ED_view3d_cameracontrol_acquire) - within a loop which draws the viewport.
- * - finish and release the view-control (#ED_view3d_cameracontrol_release),
+ * - Acquire a view-control (#ED_view3d_cameracontrol_acquire).
+ * - Modify ``rv3d->ofs``, ``rv3d->viewquat``.
+ * - Update the view data (#ED_view3d_cameracontrol_acquire) -
+ * within a loop which draws the viewport.
+ * - Finish and release the view-control (#ED_view3d_cameracontrol_release),
* either keeping the current view or restoring the initial view.
*
* Notes:
diff --git a/source/blender/editors/space_view3d/view3d_draw.c b/source/blender/editors/space_view3d/view3d_draw.c
index a298e668f44..12ce793e3ef 100644
--- a/source/blender/editors/space_view3d/view3d_draw.c
+++ b/source/blender/editors/space_view3d/view3d_draw.c
@@ -700,7 +700,8 @@ static void drawviewborder(Scene *scene, Depsgraph *depsgraph, ARegion *ar, View
/* draw */
immUniformThemeColorShade(TH_VIEW_OVERLAY, 100);
- /* TODO Was using UI_draw_roundbox_4fv(false, rect.xmin, rect.ymin, rect.xmax, rect.ymax, 2.0f, color).
+ /* 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... */
imm_draw_box_wire_2d(shdr_pos, rect.xmin, rect.ymin, rect.xmax, rect.ymax);
diff --git a/source/blender/editors/space_view3d/view3d_draw_legacy.c b/source/blender/editors/space_view3d/view3d_draw_legacy.c
index c705a8608d5..f029fd9bfc7 100644
--- a/source/blender/editors/space_view3d/view3d_draw_legacy.c
+++ b/source/blender/editors/space_view3d/view3d_draw_legacy.c
@@ -922,7 +922,8 @@ void ED_view3d_screen_datamask(const bContext *C,
/**
* Store values from #RegionView3D, set when drawing.
- * This is needed when we draw with to a viewport using a different matrix (offscreen drawing for example).
+ * This is needed when we draw with to a viewport using a different matrix
+ * (offscreen drawing for example).
*
* Values set by #ED_view3d_update_viewmat should be handled here.
*/
diff --git a/source/blender/editors/space_view3d/view3d_edit.c b/source/blender/editors/space_view3d/view3d_edit.c
index 84ebacc0a2f..80153a38128 100644
--- a/source/blender/editors/space_view3d/view3d_edit.c
+++ b/source/blender/editors/space_view3d/view3d_edit.c
@@ -1046,7 +1046,8 @@ static float view3d_ndof_pan_speed_calc(RegionView3D *rv3d)
/**
* Zoom and pan in the same function since sometimes zoom is interpreted as dolly (pan forward).
*
- * \param has_zoom: zoom, otherwise dolly, often `!rv3d->is_persp` since it doesn't make sense to dolly in ortho.
+ * \param has_zoom: zoom, otherwise dolly,
+ * often `!rv3d->is_persp` since it doesn't make sense to dolly in ortho.
*/
static void view3d_ndof_pan_zoom(const struct wmNDOFMotionData *ndof,
ScrArea *sa,
@@ -1068,9 +1069,8 @@ static void view3d_ndof_pan_zoom(const struct wmNDOFMotionData *ndof,
/* zoom with Z */
/* Zoom!
- * velocity should be proportional to the linear velocity attained by rotational motion of same strength
- * [got that?]
- * proportional to arclength = radius * angle
+ * velocity should be proportional to the linear velocity attained by rotational motion
+ * of same strength [got that?] proportional to `arclength = radius * angle`.
*/
pan_vec[2] = 0.0f;
@@ -1844,7 +1844,8 @@ void viewzoom_modal_keymap(wmKeyConfig *keyconf)
}
/**
- * \param zoom_xy: Optionally zoom to window location (coords compatible w/ #wmEvent.x, y). Use when not NULL.
+ * \param zoom_xy: Optionally zoom to window location
+ * (coords compatible w/ #wmEvent.x, y). Use when not NULL.
*/
static void view_zoom_to_window_xy_camera(
Scene *scene, Depsgraph *depsgraph, View3D *v3d, ARegion *ar, float dfac, const int zoom_xy[2])
@@ -1892,7 +1893,8 @@ static void view_zoom_to_window_xy_camera(
}
/**
- * \param zoom_xy: Optionally zoom to window location (coords compatible w/ #wmEvent.x, y). Use when not NULL.
+ * \param zoom_xy: Optionally zoom to window location
+ * (coords compatible w/ #wmEvent.x, y). Use when not NULL.
*/
static void view_zoom_to_window_xy_3d(ARegion *ar, float dfac, const int zoom_xy[2])
{
diff --git a/source/blender/editors/space_view3d/view3d_project.c b/source/blender/editors/space_view3d/view3d_project.c
index f50f6f81087..b81b7e0109e 100644
--- a/source/blender/editors/space_view3d/view3d_project.c
+++ b/source/blender/editors/space_view3d/view3d_project.c
@@ -455,7 +455,8 @@ bool ED_view3d_win_to_ray_clipped(struct Depsgraph *depsgraph,
* \param r_ray_start: The world-space point where the ray intersects the window plane.
* \param r_ray_normal: The normalized world-space direction of towards mval.
*
- * \note Ignores view near/far clipping, to take this into account use #ED_view3d_win_to_ray_clipped.
+ * \note Ignores view near/far clipping,
+ * to take this into account use #ED_view3d_win_to_ray_clipped.
*/
void ED_view3d_win_to_ray(const ARegion *ar,
const float mval[2],
@@ -556,8 +557,9 @@ void ED_view3d_win_to_3d(const View3D *v3d,
copy_v3_v3(ray_origin, rv3d->viewinv[3]);
ED_view3d_win_to_vector(ar, mval, ray_direction);
- /* note, we could use isect_line_plane_v3() however we want the intersection to be infront of the
- * view no matter what, so apply the unsigned factor instead */
+ /* note, we could use isect_line_plane_v3()
+ * however we want the intersection to be infront of the view no matter what,
+ * so apply the unsigned factor instead */
plane_from_point_normal_v3(plane, depth_pt, rv3d->viewinv[2]);
isect_ray_plane_v3(ray_origin, ray_direction, plane, &lambda, false);
diff --git a/source/blender/editors/space_view3d/view3d_snap.c b/source/blender/editors/space_view3d/view3d_snap.c
index 5aa19cc8a51..fb121aa716b 100644
--- a/source/blender/editors/space_view3d/view3d_snap.c
+++ b/source/blender/editors/space_view3d/view3d_snap.c
@@ -233,9 +233,11 @@ void VIEW3D_OT_snap_selected_to_grid(wmOperatorType *ot)
/** Snaps the selection as a whole (use_offset=true) or each selected object to the given location.
*
- * \param snap_target_global: a location in global space to snap to (eg. 3D cursor or active object).
- * \param use_offset: if the selected objects should maintain their relative offsets and be snapped by the selection
- * pivot point (median, active), or if every object origin should be snapped to the given location.
+ * \param snap_target_global: a location in global space to snap to
+ * (eg. 3D cursor or active object).
+ * \param use_offset: if the selected objects should maintain their relative offsets
+ * and be snapped by the selection pivot point (median, active),
+ * or if every object origin should be snapped to the given location.
*/
static int snap_selected_to_location(bContext *C,
const float snap_target_global[3],
diff --git a/source/blender/editors/space_view3d/view3d_utils.c b/source/blender/editors/space_view3d/view3d_utils.c
index 3f078e35046..91313657f59 100644
--- a/source/blender/editors/space_view3d/view3d_utils.c
+++ b/source/blender/editors/space_view3d/view3d_utils.c
@@ -1143,7 +1143,8 @@ float ED_view3d_radius_to_dist_ortho(const float lens, const float radius)
* \param ar: Can be NULL if \a use_aspect is false.
* \param persp: Allow the caller to tell what kind of perspective to use (ortho/view/camera)
* \param use_aspect: Increase the distance to account for non 1:1 view aspect.
- * \param radius: The radius will be fitted exactly, typically pre-scaled by a margin (#VIEW3D_MARGIN).
+ * \param radius: The radius will be fitted exactly,
+ * typically pre-scaled by a margin (#VIEW3D_MARGIN).
*/
float ED_view3d_radius_to_dist(const View3D *v3d,
const ARegion *ar,
@@ -1435,7 +1436,8 @@ void ED_view3d_from_object(const Object *ob, float ofs[3], float quat[4], float
/**
* Set the object transformation from RegionView3D members.
- * \param depsgraph: The depsgraph to get the evaluated object parent for the transformation calculation.
+ * \param depsgraph: The depsgraph to get the evaluated object parent
+ * for the transformation calculation.
* \param ob: The object which has the transformation assigned.
* \param ofs: The view offset, normally from RegionView3D.ofs.
* \param quat: The view rotation, quaternion normally from RegionView3D.viewquat.
diff --git a/source/blender/editors/space_view3d/view3d_view.c b/source/blender/editors/space_view3d/view3d_view.c
index 1b81ccec3ba..7ac8291a385 100644
--- a/source/blender/editors/space_view3d/view3d_view.c
+++ b/source/blender/editors/space_view3d/view3d_view.c
@@ -865,8 +865,8 @@ void view3d_viewmatrix_set(Depsgraph *depsgraph,
vec[2] = 0.0f;
if (rect_scale) {
- /* Since 'RegionView3D.winmat' has been calculated and this function doesn't take the 'ARegion'
- * we don't know about the region size.
+ /* Since 'RegionView3D.winmat' has been calculated and this function doesn't take the
+ * 'ARegion' we don't know about the region size.
* Use 'rect_scale' when drawing a sub-region to apply 2D offset,
* scaled by the difference between the sub-region and the region size.
*/