[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [37169] branches/soc-2011-onion: Revision: 29574

Jason Wilkins Jason.A.Wilkins at gmail.com
Sat Jun 4 08:25:25 CEST 2011


Revision: 37169
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=37169
Author:   jwilkins
Date:     2011-06-04 06:25:24 +0000 (Sat, 04 Jun 2011)
Log Message:
-----------
Revision: 29574
Author: nicholasbishop
Date: 8:13:17 PM, Saturday, June 19, 2010
Message:
* Added/clarified some comments in customdata, make it clearer what some of the layer accessor functions do.

Modified Paths:
--------------
    branches/soc-2011-onion/source/blender/blenkernel/BKE_customdata.h

Property Changed:
----------------
    branches/soc-2011-onion/


Property changes on: branches/soc-2011-onion
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/soc-2010-jwilkins:28499-37009
/branches/soc-2010-nicolasbishop:28448-29483,29503,29514,29536,29572-29573
/trunk/blender:36833-37054
   + /branches/soc-2010-jwilkins:28499-37009
/branches/soc-2010-nicolasbishop:28448-29483,29503,29514,29536,29572-29574
/trunk/blender:36833-37054

Modified: branches/soc-2011-onion/source/blender/blenkernel/BKE_customdata.h
===================================================================
--- branches/soc-2011-onion/source/blender/blenkernel/BKE_customdata.h	2011-06-04 06:22:01 UTC (rev 37168)
+++ branches/soc-2011-onion/source/blender/blenkernel/BKE_customdata.h	2011-06-04 06:25:24 UTC (rev 37169)
@@ -194,20 +194,46 @@
 void *CustomData_bmesh_get(const struct CustomData *data, void *block, int type);
 void *CustomData_bmesh_get_n(const struct CustomData *data, void *block, int type, int n);
 
-/* gets a pointer to the active or first layer of type
- * returns NULL if there is no layer of type
- */
+/************************** Get layer data ***********************/
+/* return the data from the first layer matching the parameters  */
+/* these all return NULL if no such layer is found               */
+
+/* returns the data from the first layer matching type */
 void *CustomData_get_layer(const struct CustomData *data, int type);
+
+/* returns the data from the nth layer matching type */
 void *CustomData_get_layer_n(const struct CustomData *data, int type, int n);
+
+/* returns the data from the first layer matching type and name */
 void *CustomData_get_layer_named(const struct CustomData *data, int type,
 								 const char *name);
 
+/********************************* Get layer index *********************************/
+/* return the index within data.layers of the first layer matching the parameters  */
+/* these all return -1 if no such layer is found                                   */
+
+/* returns the index of the first layer matching type */
 int CustomData_get_layer_index(const struct CustomData *data, int type);
+
+/* returns the index of the first layer matching type and name */
 int CustomData_get_named_layer_index(const struct CustomData *data, int type, const char *name);
+
+/* returns the index of the active layer */
 int CustomData_get_active_layer_index(const struct CustomData *data, int type);
+
+/* returns the index of the render layer */
 int CustomData_get_render_layer_index(const struct CustomData *data, int type);
+
+/* returns the index of the clone layer */
 int CustomData_get_clone_layer_index(const struct CustomData *data, int type);
+
+/* returns the index of the stencil/mask layer */
 int CustomData_get_stencil_layer_index(const struct CustomData *data, int type);
+
+/************************************ Get layer offset ***********************************/
+/* return the offset of the layer from the first layer of the specified type             */
+/* to find the index of that layer, add it to the index of the first layer of that type  */
+/* these all return -1 if no layer of the specified type is found                        */
 int CustomData_get_active_layer(const struct CustomData *data, int type);
 int CustomData_get_render_layer(const struct CustomData *data, int type);
 int CustomData_get_clone_layer(const struct CustomData *data, int type);




More information about the Bf-blender-cvs mailing list