diff options
author | Campbell Barton <ideasman42@gmail.com> | 2015-08-21 02:07:52 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2015-08-21 02:07:52 +0300 |
commit | aa746677cfb890bb81e1e01bdb543526342d77ee (patch) | |
tree | 7fa8104e4b37cbddc3539709619a48c4a66ac944 /source/blender | |
parent | 10edaff5c1a18ca7e91743b3244a6007363b592c (diff) |
Docs: correct some comments
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/blenloader/BLO_blend_defs.h | 6 | ||||
-rw-r--r-- | source/blender/editors/include/ED_view3d.h | 8 | ||||
-rw-r--r-- | source/blender/editors/space_view3d/view3d_edit.c | 15 |
3 files changed, 18 insertions, 11 deletions
diff --git a/source/blender/blenloader/BLO_blend_defs.h b/source/blender/blenloader/BLO_blend_defs.h index 34a881bd7cc..44f0fa9aa53 100644 --- a/source/blender/blenloader/BLO_blend_defs.h +++ b/source/blender/blenloader/BLO_blend_defs.h @@ -42,7 +42,7 @@ enum { /** * Arbitrary allocated memory - * (owned by #ID's, or will leak on exit) + * (typically owned by #ID's, will be freed when there are no users). */ DATA = BLEND_MAKE_ID('D', 'A', 'T', 'A'), /** @@ -55,8 +55,8 @@ enum { */ DNA1 = BLEND_MAKE_ID('D', 'N', 'A', '1'), /** - * Used as preview between #REND and #GLOB, - * (ignored for regular file reading) + * Used to store thumbnail previews, written between #REND and #GLOB blocks, + * (ignored for regular file reading). */ TEST = BLEND_MAKE_ID('T', 'E', 'S', 'T'), /** diff --git a/source/blender/editors/include/ED_view3d.h b/source/blender/editors/include/ED_view3d.h index c3999d29f89..416e821b3f8 100644 --- a/source/blender/editors/include/ED_view3d.h +++ b/source/blender/editors/include/ED_view3d.h @@ -276,10 +276,10 @@ unsigned int ED_view3d_backbuf_sample_rect( int ED_view3d_backbuf_sample_size_clamp(struct ARegion *ar, const float dist); unsigned int ED_view3d_backbuf_sample(struct ViewContext *vc, int x, int y); -/* draws and does a 4x4 sample */ -bool ED_view3d_autodist(struct Scene *scene, struct ARegion *ar, struct View3D *v3d, - const int mval[2], float mouse_worldloc[3], - const bool alphaoverride, const float fallback_depth_pt[3]); +bool ED_view3d_autodist( + struct Scene *scene, struct ARegion *ar, struct View3D *v3d, + const int mval[2], float mouse_worldloc[3], + const bool alphaoverride, const float fallback_depth_pt[3]); /* only draw so ED_view3d_autodist_simple can be called many times after */ void ED_view3d_autodist_init(struct Scene *scene, struct ARegion *ar, struct View3D *v3d, int mode); diff --git a/source/blender/editors/space_view3d/view3d_edit.c b/source/blender/editors/space_view3d/view3d_edit.c index 8d7596afc51..b330831ba9e 100644 --- a/source/blender/editors/space_view3d/view3d_edit.c +++ b/source/blender/editors/space_view3d/view3d_edit.c @@ -4818,10 +4818,17 @@ static float view_autodist_depth_margin(ARegion *ar, const int mval[2], int marg return depth_close; } -/* XXX todo Zooms in on a border drawn by the user */ -bool ED_view3d_autodist(Scene *scene, ARegion *ar, View3D *v3d, - const int mval[2], float mouse_worldloc[3], - const bool alphaoverride, const float fallback_depth_pt[3]) +/** + * Get the world-space 3d location from a screen-space 2d point. + * + * \param mval: Input screen-space pixel location. + * \param mouse_worldloc: Output world-space loction. + * \param fallback_depth_pt: Use this points depth when no depth can be found. + */ +bool ED_view3d_autodist( + Scene *scene, ARegion *ar, View3D *v3d, + const int mval[2], float mouse_worldloc[3], + const bool alphaoverride, const float fallback_depth_pt[3]) { bglMats mats; /* ZBuffer depth vars */ float depth_close; |