Cleanup: use term 'attr' instead of 'attrib'
This was already the case in most parts of the GPU API. Use full name for descriptive-comments.
This commit is contained in:
		@@ -877,9 +877,9 @@ static void particle_batch_cache_ensure_procedural_strand_data(PTCacheEdit *edit
 | 
			
		||||
    GPU_vertbuf_data_alloc(cache->proc_uv_buf[i], cache->strands_len);
 | 
			
		||||
    GPU_vertbuf_attr_get_raw_data(cache->proc_uv_buf[i], uv_id, &uv_step[i]);
 | 
			
		||||
 | 
			
		||||
    char attr_safe_name[GPU_MAX_SAFE_ATTRIB_NAME];
 | 
			
		||||
    char attr_safe_name[GPU_MAX_SAFE_ATTR_NAME];
 | 
			
		||||
    const char *name = CustomData_get_layer_name(&psmd->mesh_final->ldata, CD_MLOOPUV, i);
 | 
			
		||||
    GPU_vertformat_safe_attrib_name(name, attr_safe_name, GPU_MAX_SAFE_ATTRIB_NAME);
 | 
			
		||||
    GPU_vertformat_safe_attr_name(name, attr_safe_name, GPU_MAX_SAFE_ATTR_NAME);
 | 
			
		||||
 | 
			
		||||
    int n = 0;
 | 
			
		||||
    BLI_snprintf(cache->uv_layer_names[i][n++], MAX_LAYER_NAME_LEN, "u%s", attr_safe_name);
 | 
			
		||||
@@ -898,9 +898,9 @@ static void particle_batch_cache_ensure_procedural_strand_data(PTCacheEdit *edit
 | 
			
		||||
    GPU_vertbuf_data_alloc(cache->proc_col_buf[i], cache->strands_len);
 | 
			
		||||
    GPU_vertbuf_attr_get_raw_data(cache->proc_col_buf[i], col_id, &col_step[i]);
 | 
			
		||||
 | 
			
		||||
    char attr_safe_name[GPU_MAX_SAFE_ATTRIB_NAME];
 | 
			
		||||
    char attr_safe_name[GPU_MAX_SAFE_ATTR_NAME];
 | 
			
		||||
    const char *name = CustomData_get_layer_name(&psmd->mesh_final->ldata, CD_MLOOPCOL, i);
 | 
			
		||||
    GPU_vertformat_safe_attrib_name(name, attr_safe_name, GPU_MAX_SAFE_ATTRIB_NAME);
 | 
			
		||||
    GPU_vertformat_safe_attr_name(name, attr_safe_name, GPU_MAX_SAFE_ATTR_NAME);
 | 
			
		||||
 | 
			
		||||
    int n = 0;
 | 
			
		||||
    BLI_snprintf(cache->col_layer_names[i][n++], MAX_LAYER_NAME_LEN, "c%s", attr_safe_name);
 | 
			
		||||
@@ -1164,9 +1164,9 @@ static void particle_batch_cache_ensure_pos_and_seg(PTCacheEdit *edit,
 | 
			
		||||
 | 
			
		||||
    for (int i = 0; i < num_uv_layers; i++) {
 | 
			
		||||
 | 
			
		||||
      char uuid[32], attr_safe_name[GPU_MAX_SAFE_ATTRIB_NAME];
 | 
			
		||||
      char uuid[32], attr_safe_name[GPU_MAX_SAFE_ATTR_NAME];
 | 
			
		||||
      const char *name = CustomData_get_layer_name(&psmd->mesh_final->ldata, CD_MLOOPUV, i);
 | 
			
		||||
      GPU_vertformat_safe_attrib_name(name, attr_safe_name, GPU_MAX_SAFE_ATTRIB_NAME);
 | 
			
		||||
      GPU_vertformat_safe_attr_name(name, attr_safe_name, GPU_MAX_SAFE_ATTR_NAME);
 | 
			
		||||
 | 
			
		||||
      BLI_snprintf(uuid, sizeof(uuid), "u%s", attr_safe_name);
 | 
			
		||||
      uv_id[i] = GPU_vertformat_attr_add(&format, uuid, GPU_COMP_F32, 2, GPU_FETCH_FLOAT);
 | 
			
		||||
@@ -1177,9 +1177,9 @@ static void particle_batch_cache_ensure_pos_and_seg(PTCacheEdit *edit,
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    for (int i = 0; i < num_col_layers; i++) {
 | 
			
		||||
      char uuid[32], attr_safe_name[GPU_MAX_SAFE_ATTRIB_NAME];
 | 
			
		||||
      char uuid[32], attr_safe_name[GPU_MAX_SAFE_ATTR_NAME];
 | 
			
		||||
      const char *name = CustomData_get_layer_name(&psmd->mesh_final->ldata, CD_MLOOPCOL, i);
 | 
			
		||||
      GPU_vertformat_safe_attrib_name(name, attr_safe_name, GPU_MAX_SAFE_ATTRIB_NAME);
 | 
			
		||||
      GPU_vertformat_safe_attr_name(name, attr_safe_name, GPU_MAX_SAFE_ATTR_NAME);
 | 
			
		||||
 | 
			
		||||
      BLI_snprintf(uuid, sizeof(uuid), "c%s", attr_safe_name);
 | 
			
		||||
      col_id[i] = GPU_vertformat_attr_add(&format, uuid, GPU_COMP_U16, 4, GPU_FETCH_FLOAT);
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user