[Bf-blender-cvs] [aa74667] master: Docs: correct some comments

Campbell Barton noreply at git.blender.org
Fri Aug 21 06:52:35 CEST 2015


Commit: aa746677cfb890bb81e1e01bdb543526342d77ee
Author: Campbell Barton
Date:   Fri Aug 21 09:07:52 2015 +1000
Branches: master
https://developer.blender.org/rBaa746677cfb890bb81e1e01bdb543526342d77ee

Docs: correct some comments

===================================================================

M	source/blender/blenloader/BLO_blend_defs.h
M	source/blender/editors/include/ED_view3d.h
M	source/blender/editors/space_view3d/view3d_edit.c

===================================================================

diff --git a/source/blender/blenloader/BLO_blend_defs.h b/source/blender/blenloader/BLO_blend_defs.h
index 34a881b..44f0fa9 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 c3999d2..416e821 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 8d7596a..b330831 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;




More information about the Bf-blender-cvs mailing list