Cleanup: spelling in comments
This commit is contained in:
		@@ -520,7 +520,7 @@ CatalogFilePath AssetCatalogService::find_suitable_cdf_path_for_writing(
 | 
				
			|||||||
                 "A non-empty .blend file path is required to be able to determine where the "
 | 
					                 "A non-empty .blend file path is required to be able to determine where the "
 | 
				
			||||||
                 "catalog definition file should be put");
 | 
					                 "catalog definition file should be put");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  /* Ask the asset library API for an appropriate location.  */
 | 
					  /* Ask the asset library API for an appropriate location. */
 | 
				
			||||||
  char suitable_root_path[PATH_MAX];
 | 
					  char suitable_root_path[PATH_MAX];
 | 
				
			||||||
  const bool asset_lib_root_found = BKE_asset_library_find_suitable_root_path_from_path(
 | 
					  const bool asset_lib_root_found = BKE_asset_library_find_suitable_root_path_from_path(
 | 
				
			||||||
      blend_file_path.c_str(), suitable_root_path);
 | 
					      blend_file_path.c_str(), suitable_root_path);
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -121,7 +121,7 @@ static void image_init(Image *ima, short source, short type);
 | 
				
			|||||||
static void image_free_packedfiles(Image *ima);
 | 
					static void image_free_packedfiles(Image *ima);
 | 
				
			||||||
static void copy_image_packedfiles(ListBase *lb_dst, const ListBase *lb_src);
 | 
					static void copy_image_packedfiles(ListBase *lb_dst, const ListBase *lb_src);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/* Reset runtime image fields when datablock is being initialized. */
 | 
					/* Reset runtime image fields when data-block is being initialized. */
 | 
				
			||||||
static void image_runtime_reset(struct Image *image)
 | 
					static void image_runtime_reset(struct Image *image)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
  memset(&image->runtime, 0, sizeof(image->runtime));
 | 
					  memset(&image->runtime, 0, sizeof(image->runtime));
 | 
				
			||||||
@@ -129,7 +129,7 @@ static void image_runtime_reset(struct Image *image)
 | 
				
			|||||||
  BLI_mutex_init(image->runtime.cache_mutex);
 | 
					  BLI_mutex_init(image->runtime.cache_mutex);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/* Reset runtime image fields when datablock is being copied.  */
 | 
					/* Reset runtime image fields when data-block is being copied. */
 | 
				
			||||||
static void image_runtime_reset_on_copy(struct Image *image)
 | 
					static void image_runtime_reset_on_copy(struct Image *image)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
  image->runtime.cache_mutex = MEM_mallocN(sizeof(ThreadMutex), "image runtime cache_mutex");
 | 
					  image->runtime.cache_mutex = MEM_mallocN(sizeof(ThreadMutex), "image runtime cache_mutex");
 | 
				
			||||||
@@ -3553,7 +3553,7 @@ static void image_tag_frame_recalc(Image *ima, ID *iuser_id, ImageUser *iuser, v
 | 
				
			|||||||
    iuser->flag |= IMA_NEED_FRAME_RECALC;
 | 
					    iuser->flag |= IMA_NEED_FRAME_RECALC;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if (iuser_id) {
 | 
					    if (iuser_id) {
 | 
				
			||||||
      /* Must copy image user changes to CoW datablock. */
 | 
					      /* Must copy image user changes to CoW data-block. */
 | 
				
			||||||
      DEG_id_tag_update(iuser_id, ID_RECALC_COPY_ON_WRITE);
 | 
					      DEG_id_tag_update(iuser_id, ID_RECALC_COPY_ON_WRITE);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
@@ -3568,7 +3568,7 @@ static void image_tag_reload(Image *ima, ID *iuser_id, ImageUser *iuser, void *c
 | 
				
			|||||||
      image_update_views_format(ima, iuser);
 | 
					      image_update_views_format(ima, iuser);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    if (iuser_id) {
 | 
					    if (iuser_id) {
 | 
				
			||||||
      /* Must copy image user changes to CoW datablock. */
 | 
					      /* Must copy image user changes to CoW data-block. */
 | 
				
			||||||
      DEG_id_tag_update(iuser_id, ID_RECALC_COPY_ON_WRITE);
 | 
					      DEG_id_tag_update(iuser_id, ID_RECALC_COPY_ON_WRITE);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
@@ -5773,7 +5773,7 @@ static void image_user_id_has_animation(Image *ima,
 | 
				
			|||||||
bool BKE_image_user_id_has_animation(ID *id)
 | 
					bool BKE_image_user_id_has_animation(ID *id)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
  /* For the dependency graph, this does not consider nested node
 | 
					  /* For the dependency graph, this does not consider nested node
 | 
				
			||||||
   * trees as these are handled as their own datablock. */
 | 
					   * trees as these are handled as their own data-block. */
 | 
				
			||||||
  bool has_animation = false;
 | 
					  bool has_animation = false;
 | 
				
			||||||
  bool skip_nested_nodes = true;
 | 
					  bool skip_nested_nodes = true;
 | 
				
			||||||
  image_walk_id_all_users(id, skip_nested_nodes, &has_animation, image_user_id_has_animation);
 | 
					  image_walk_id_all_users(id, skip_nested_nodes, &has_animation, image_user_id_has_animation);
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -304,7 +304,7 @@ TEST(lib_remap, never_null_usage_flag_not_requested_on_delete)
 | 
				
			|||||||
  EXPECT_EQ(context.test_data.object->data, context.test_data.mesh);
 | 
					  EXPECT_EQ(context.test_data.object->data, context.test_data.mesh);
 | 
				
			||||||
  EXPECT_EQ(context.test_data.object->id.tag & LIB_TAG_DOIT, 0);
 | 
					  EXPECT_EQ(context.test_data.object->id.tag & LIB_TAG_DOIT, 0);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  /* Never null usage isn't requested so the flag should not be set.*/
 | 
					  /* Never null usage isn't requested so the flag should not be set. */
 | 
				
			||||||
  BKE_libblock_remap(
 | 
					  BKE_libblock_remap(
 | 
				
			||||||
      context.test_data.bmain, context.test_data.mesh, nullptr, ID_REMAP_SKIP_NEVER_NULL_USAGE);
 | 
					      context.test_data.bmain, context.test_data.mesh, nullptr, ID_REMAP_SKIP_NEVER_NULL_USAGE);
 | 
				
			||||||
  EXPECT_EQ(context.test_data.object->data, context.test_data.mesh);
 | 
					  EXPECT_EQ(context.test_data.object->data, context.test_data.mesh);
 | 
				
			||||||
@@ -339,7 +339,7 @@ TEST(lib_remap, never_null_usage_flag_not_requested_on_remap)
 | 
				
			|||||||
  EXPECT_EQ(context.test_data.object->data, context.test_data.mesh);
 | 
					  EXPECT_EQ(context.test_data.object->data, context.test_data.mesh);
 | 
				
			||||||
  EXPECT_EQ(context.test_data.object->id.tag & LIB_TAG_DOIT, 0);
 | 
					  EXPECT_EQ(context.test_data.object->id.tag & LIB_TAG_DOIT, 0);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  /* Never null usage isn't requested so the flag should not be set.*/
 | 
					  /* Never null usage isn't requested so the flag should not be set. */
 | 
				
			||||||
  BKE_libblock_remap(
 | 
					  BKE_libblock_remap(
 | 
				
			||||||
      context.test_data.bmain, context.test_data.mesh, other_mesh, ID_REMAP_SKIP_NEVER_NULL_USAGE);
 | 
					      context.test_data.bmain, context.test_data.mesh, other_mesh, ID_REMAP_SKIP_NEVER_NULL_USAGE);
 | 
				
			||||||
  EXPECT_EQ(context.test_data.object->data, other_mesh);
 | 
					  EXPECT_EQ(context.test_data.object->data, other_mesh);
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1737,7 +1737,7 @@ bool BLI_path_contains(const char *container_path, const char *containee_path)
 | 
				
			|||||||
  char containee_native[PATH_MAX];
 | 
					  char containee_native[PATH_MAX];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  /* Keep space for a trailing slash. If the path is truncated by this, the containee path is
 | 
					  /* Keep space for a trailing slash. If the path is truncated by this, the containee path is
 | 
				
			||||||
   * longer than PATH_MAX and the result is ill-defined.  */
 | 
					   * longer than PATH_MAX and the result is ill-defined. */
 | 
				
			||||||
  BLI_strncpy(container_native, container_path, PATH_MAX - 1);
 | 
					  BLI_strncpy(container_native, container_path, PATH_MAX - 1);
 | 
				
			||||||
  BLI_strncpy(containee_native, containee_path, PATH_MAX);
 | 
					  BLI_strncpy(containee_native, containee_path, PATH_MAX);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -591,8 +591,8 @@ BLI_INLINE void bmesh_quick_edgedraw_flag(MEdge *med, BMEdge *e)
 | 
				
			|||||||
{
 | 
					{
 | 
				
			||||||
  /* This is a cheap way to set the edge draw, its not precise and will
 | 
					  /* This is a cheap way to set the edge draw, its not precise and will
 | 
				
			||||||
   * pick the first 2 faces an edge uses.
 | 
					   * pick the first 2 faces an edge uses.
 | 
				
			||||||
   * The dot comparison is a little arbitrary, but set so that a 5 subd
 | 
					   * The dot comparison is a little arbitrary, but set so that a 5 subdivisions
 | 
				
			||||||
   * IcoSphere won't vanish but subd 6 will (as with pre-bmesh Blender). */
 | 
					   * ico-sphere won't vanish but 6 subdivisions will (as with pre-bmesh Blender). */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  if (/* (med->flag & ME_EDGEDRAW) && */ /* Assume to be true. */
 | 
					  if (/* (med->flag & ME_EDGEDRAW) && */ /* Assume to be true. */
 | 
				
			||||||
      (e->l && (e->l != e->l->radial_next)) &&
 | 
					      (e->l && (e->l != e->l->radial_next)) &&
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -561,7 +561,7 @@ BMFace *BM_face_find_double(BMFace *f) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL();
 | 
				
			|||||||
 * many overlapping faces.
 | 
					 * many overlapping faces.
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 * An example of how this is used: when 2 tri's are selected that share an edge,
 | 
					 * An example of how this is used: when 2 tri's are selected that share an edge,
 | 
				
			||||||
 * pressing Fkey would make a new overlapping quad (without a check like this)
 | 
					 * pressing F-key would make a new overlapping quad (without a check like this)
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 * \a earr and \a varr can be in any order, however they _must_ form a closed loop.
 | 
					 * \a earr and \a varr can be in any order, however they _must_ form a closed loop.
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -167,7 +167,7 @@ static void hair_batch_cache_fill_segments_proc_pos(Hair *hair,
 | 
				
			|||||||
      seg_data[3] = total_len;
 | 
					      seg_data[3] = total_len;
 | 
				
			||||||
      co_prev = curve_co[j];
 | 
					      co_prev = curve_co[j];
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    /* Assign length value*/
 | 
					    /* Assign length value. */
 | 
				
			||||||
    *(float *)GPU_vertbuf_raw_step(length_step) = total_len;
 | 
					    *(float *)GPU_vertbuf_raw_step(length_step) = total_len;
 | 
				
			||||||
    if (total_len > 0.0f) {
 | 
					    if (total_len > 0.0f) {
 | 
				
			||||||
      /* Divide by total length to have a [0-1] number. */
 | 
					      /* Divide by total length to have a [0-1] number. */
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -634,7 +634,7 @@ static void particle_batch_cache_fill_segments_proc_pos(ParticleCacheKey **path_
 | 
				
			|||||||
      seg_data[3] = total_len;
 | 
					      seg_data[3] = total_len;
 | 
				
			||||||
      co_prev = path[j].co;
 | 
					      co_prev = path[j].co;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    /* Assign length value*/
 | 
					    /* Assign length value. */
 | 
				
			||||||
    *(float *)GPU_vertbuf_raw_step(length_step) = total_len;
 | 
					    *(float *)GPU_vertbuf_raw_step(length_step) = total_len;
 | 
				
			||||||
    if (total_len > 0.0f) {
 | 
					    if (total_len > 0.0f) {
 | 
				
			||||||
      /* Divide by total length to have a [0-1] number. */
 | 
					      /* Divide by total length to have a [0-1] number. */
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -106,7 +106,7 @@ typedef struct DRWSubdivCache {
 | 
				
			|||||||
  struct GPUVertBuf *edges_orig_index;
 | 
					  struct GPUVertBuf *edges_orig_index;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  /* Owned by #Subdiv. Indexed by coarse polygon index, difference between value (i + 1) and (i)
 | 
					  /* Owned by #Subdiv. Indexed by coarse polygon index, difference between value (i + 1) and (i)
 | 
				
			||||||
   * gives the number of ptex faces for coarse polygon (i).  */
 | 
					   * gives the number of ptex faces for coarse polygon (i). */
 | 
				
			||||||
  int *face_ptex_offset;
 | 
					  int *face_ptex_offset;
 | 
				
			||||||
  /* Vertex buffer for face_ptex_offset. */
 | 
					  /* Vertex buffer for face_ptex_offset. */
 | 
				
			||||||
  struct GPUVertBuf *face_ptex_offset_buffer;
 | 
					  struct GPUVertBuf *face_ptex_offset_buffer;
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -98,7 +98,7 @@ uint get_index(uint i)
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
/* Duplicate of #PosNorLoop from the mesh extract CPU code.
 | 
					/* Duplicate of #PosNorLoop from the mesh extract CPU code.
 | 
				
			||||||
 * We do not use a vec3 for the position as it will be padded to a vec4 which is incompatible with
 | 
					 * We do not use a vec3 for the position as it will be padded to a vec4 which is incompatible with
 | 
				
			||||||
 * the format.  */
 | 
					 * the format. */
 | 
				
			||||||
struct PosNorLoop {
 | 
					struct PosNorLoop {
 | 
				
			||||||
  float x, y, z;
 | 
					  float x, y, z;
 | 
				
			||||||
  /* TODO(kevindietrich) : figure how to compress properly as GLSL does not have char/short types,
 | 
					  /* TODO(kevindietrich) : figure how to compress properly as GLSL does not have char/short types,
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -496,7 +496,7 @@ static void ED_keylist_draw_list_elem_prepare_for_drawing(AnimKeylistDrawListEle
 | 
				
			|||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
typedef struct AnimKeylistDrawList {
 | 
					typedef struct AnimKeylistDrawList {
 | 
				
			||||||
  ListBase /* AnimKeylistDrawListElem*/ channels;
 | 
					  ListBase /* AnimKeylistDrawListElem */ channels;
 | 
				
			||||||
} AnimKeylistDrawList;
 | 
					} AnimKeylistDrawList;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
AnimKeylistDrawList *ED_keylist_draw_list_create(void)
 | 
					AnimKeylistDrawList *ED_keylist_draw_list_create(void)
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -108,7 +108,7 @@ typedef struct {
 | 
				
			|||||||
  ListBase data;
 | 
					  ListBase data;
 | 
				
			||||||
  /** Clear the images before baking */
 | 
					  /** Clear the images before baking */
 | 
				
			||||||
  bool bake_clear;
 | 
					  bool bake_clear;
 | 
				
			||||||
  /** margin size in pixels*/
 | 
					  /** Margin size in pixels. */
 | 
				
			||||||
  int bake_margin;
 | 
					  int bake_margin;
 | 
				
			||||||
  /** margin type */
 | 
					  /** margin type */
 | 
				
			||||||
  char bake_margin_type;
 | 
					  char bake_margin_type;
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1409,7 +1409,7 @@ static int object_origin_set_exec(bContext *C, wmOperator *op)
 | 
				
			|||||||
                  mul_v3_m4v3(&pt->x, diff_mat, mpt);
 | 
					                  mul_v3_m4v3(&pt->x, diff_mat, mpt);
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                /* Apply transform to editcurve*/
 | 
					                /* Apply transform to edit-curve. */
 | 
				
			||||||
                if (gps->editcurve != NULL) {
 | 
					                if (gps->editcurve != NULL) {
 | 
				
			||||||
                  for (i = 0; i < gps->editcurve->tot_curve_points; i++) {
 | 
					                  for (i = 0; i < gps->editcurve->tot_curve_points; i++) {
 | 
				
			||||||
                    BezTriple *bezt = &gps->editcurve->curve_points[i].bezt;
 | 
					                    BezTriple *bezt = &gps->editcurve->curve_points[i].bezt;
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1441,7 +1441,7 @@ void recalc_emitter_field(Depsgraph *UNUSED(depsgraph), Object *UNUSED(ob), Part
 | 
				
			|||||||
  PTCacheEdit *edit = psys->edit;
 | 
					  PTCacheEdit *edit = psys->edit;
 | 
				
			||||||
  Mesh *mesh = edit->psmd_eval->mesh_final;
 | 
					  Mesh *mesh = edit->psmd_eval->mesh_final;
 | 
				
			||||||
  float *vec, *nor;
 | 
					  float *vec, *nor;
 | 
				
			||||||
  int i, totface /*, totvert*/;
 | 
					  int i, totface;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  if (!mesh) {
 | 
					  if (!mesh) {
 | 
				
			||||||
    return;
 | 
					    return;
 | 
				
			||||||
@@ -1454,7 +1454,7 @@ void recalc_emitter_field(Depsgraph *UNUSED(depsgraph), Object *UNUSED(ob), Part
 | 
				
			|||||||
  BLI_kdtree_3d_free(edit->emitter_field);
 | 
					  BLI_kdtree_3d_free(edit->emitter_field);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  totface = mesh->totface;
 | 
					  totface = mesh->totface;
 | 
				
			||||||
  // totvert = dm->getNumVerts(dm); /* UNUSED */
 | 
					  // int totvert = dm->getNumVerts(dm); /* UNUSED */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  edit->emitter_cosnos = MEM_callocN(sizeof(float[6]) * totface, "emitter cosnos");
 | 
					  edit->emitter_cosnos = MEM_callocN(sizeof(float[6]) * totface, "emitter cosnos");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -591,7 +591,7 @@ float ED_space_image_zoom_level(const View2D *v2d, const int grid_dimension)
 | 
				
			|||||||
   * - Default grid size on startup, which is 256x256 pixels
 | 
					   * - Default grid size on startup, which is 256x256 pixels
 | 
				
			||||||
   * - How blend factor for grid lines is set up in the fragment shader `grid_frag.glsl`. */
 | 
					   * - How blend factor for grid lines is set up in the fragment shader `grid_frag.glsl`. */
 | 
				
			||||||
  float zoom_factor;
 | 
					  float zoom_factor;
 | 
				
			||||||
  zoom_factor = (xzoom + yzoom) / 2.0f; /* Average for accuracy.  */
 | 
					  zoom_factor = (xzoom + yzoom) / 2.0f; /* Average for accuracy. */
 | 
				
			||||||
  zoom_factor *= 256.0f / (powf(grid_dimension, 2));
 | 
					  zoom_factor *= 256.0f / (powf(grid_dimension, 2));
 | 
				
			||||||
  return zoom_factor;
 | 
					  return zoom_factor;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -324,7 +324,7 @@ static void nla_draw_strip_curves(NlaStrip *strip, float yminc, float ymaxc, uin
 | 
				
			|||||||
  GPU_line_smooth(true);
 | 
					  GPU_line_smooth(true);
 | 
				
			||||||
  GPU_blend(GPU_BLEND_ALPHA);
 | 
					  GPU_blend(GPU_BLEND_ALPHA);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  /* Fully opaque line on selected strips.  */
 | 
					  /* Fully opaque line on selected strips. */
 | 
				
			||||||
  if (strip->flag & NLASTRIP_FLAG_SELECT) {
 | 
					  if (strip->flag & NLASTRIP_FLAG_SELECT) {
 | 
				
			||||||
    /* TODO: Use theme setting. */
 | 
					    /* TODO: Use theme setting. */
 | 
				
			||||||
    immUniformColor3f(1.0f, 1.0f, 1.0f);
 | 
					    immUniformColor3f(1.0f, 1.0f, 1.0f);
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -81,7 +81,7 @@ void move_destructs_up(MFProcedure &procedure, MFInstruction &block_end_instr)
 | 
				
			|||||||
    const MFInstructionCursor &prev_cursor = prev_cursors[0];
 | 
					    const MFInstructionCursor &prev_cursor = prev_cursors[0];
 | 
				
			||||||
    current_instr = prev_cursor.instruction();
 | 
					    current_instr = prev_cursor.instruction();
 | 
				
			||||||
    if (current_instr == nullptr) {
 | 
					    if (current_instr == nullptr) {
 | 
				
			||||||
      /* Stop when there is no previous instruction. E.g. when this is the first instruction.  */
 | 
					      /* Stop when there is no previous instruction. E.g. when this is the first instruction. */
 | 
				
			||||||
      break;
 | 
					      break;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1562,7 +1562,7 @@ static uint16_t lineart_identify_feature_line(LineartRenderBuffer *rb,
 | 
				
			|||||||
      edge_flag_result |= LRT_EDGE_FLAG_CONTOUR;
 | 
					      edge_flag_result |= LRT_EDGE_FLAG_CONTOUR;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    /* Because the ray points towards the camera, so backface is when dot value being negative.*/
 | 
					    /* Because the ray points towards the camera, so back-face is when dot value being negative. */
 | 
				
			||||||
    if (rb->use_back_face_culling) {
 | 
					    if (rb->use_back_face_culling) {
 | 
				
			||||||
      if (dot_1 < 0) {
 | 
					      if (dot_1 < 0) {
 | 
				
			||||||
        tri1->flags |= LRT_CULL_DISCARD;
 | 
					        tri1->flags |= LRT_CULL_DISCARD;
 | 
				
			||||||
@@ -4301,7 +4301,7 @@ bool MOD_lineart_compute_feature_lines(Depsgraph *depsgraph,
 | 
				
			|||||||
    if (rb->chain_smooth_tolerance > FLT_EPSILON) {
 | 
					    if (rb->chain_smooth_tolerance > FLT_EPSILON) {
 | 
				
			||||||
      /* Keeping UI range of 0-1 for ease of read while scaling down the actual value for best
 | 
					      /* Keeping UI range of 0-1 for ease of read while scaling down the actual value for best
 | 
				
			||||||
       * effective range in image-space (Coordinate only goes from -1 to 1). This value is
 | 
					       * effective range in image-space (Coordinate only goes from -1 to 1). This value is
 | 
				
			||||||
       * somewhat arbitrary, but works best for the moment.  */
 | 
					       * somewhat arbitrary, but works best for the moment. */
 | 
				
			||||||
      MOD_lineart_smooth_chains(rb, rb->chain_smooth_tolerance / 50);
 | 
					      MOD_lineart_smooth_chains(rb, rb->chain_smooth_tolerance / 50);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -125,8 +125,8 @@ void gpu_shader_create_info_init()
 | 
				
			|||||||
#include "gpu_shader_create_info_list.hh"
 | 
					#include "gpu_shader_create_info_list.hh"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/* Baked shader data appended to create infos. */
 | 
					/* Baked shader data appended to create infos. */
 | 
				
			||||||
/* TODO(jbakker): should call a function with a callback. so we could switch implementations. We
 | 
					/* TODO(jbakker): should call a function with a callback. so we could switch implementations.
 | 
				
			||||||
 * cannot compile bf_gpu twice.*/
 | 
					 * We cannot compile bf_gpu twice. */
 | 
				
			||||||
#ifdef GPU_RUNTIME
 | 
					#ifdef GPU_RUNTIME
 | 
				
			||||||
#  include "gpu_shader_baked.hh"
 | 
					#  include "gpu_shader_baked.hh"
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -110,7 +110,7 @@ struct FormattingSyntax {
 | 
				
			|||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/**
 | 
					/**
 | 
				
			||||||
 * Type dependent but always false. Use to add a constexpr-conditional compile-time error.
 | 
					 * Type dependent but always false. Use to add a `constexpr` conditional compile-time error.
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
template<typename T> struct always_false : std::false_type {
 | 
					template<typename T> struct always_false : std::false_type {
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -350,7 +350,7 @@ void OBJMesh::store_normal_coords_and_indices(Vector<float3> &r_normal_coords)
 | 
				
			|||||||
  constexpr int round_digits = 4;
 | 
					  constexpr int round_digits = 4;
 | 
				
			||||||
  int cur_normal_index = 0;
 | 
					  int cur_normal_index = 0;
 | 
				
			||||||
  Map<float3, int> normal_to_index;
 | 
					  Map<float3, int> normal_to_index;
 | 
				
			||||||
  /* We don't know how many unique normals there will be, but this is a guess.*/
 | 
					  /* We don't know how many unique normals there will be, but this is a guess. */
 | 
				
			||||||
  normal_to_index.reserve(export_mesh_eval_->totpoly);
 | 
					  normal_to_index.reserve(export_mesh_eval_->totpoly);
 | 
				
			||||||
  loop_to_normal_index_.resize(export_mesh_eval_->totloop);
 | 
					  loop_to_normal_index_.resize(export_mesh_eval_->totloop);
 | 
				
			||||||
  loop_to_normal_index_.fill(-1);
 | 
					  loop_to_normal_index_.fill(-1);
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -138,7 +138,7 @@ const std::map<std::string, std::unique_ptr<NurbsObject>> all_nurbs_truth = []()
 | 
				
			|||||||
      "NurbsCircle",
 | 
					      "NurbsCircle",
 | 
				
			||||||
      std::make_unique<NurbsObject>(
 | 
					      std::make_unique<NurbsObject>(
 | 
				
			||||||
          "NurbsCircle", coordinates_NurbsCircle, std::vector<int>{3}, std::vector<int>{11}));
 | 
					          "NurbsCircle", coordinates_NurbsCircle, std::vector<int>{3}, std::vector<int>{11}));
 | 
				
			||||||
  /* This is actually an Object containing a NurbsPath and a NurbsCurve spline.  */
 | 
					  /* This is actually an Object containing a NurbsPath and a NurbsCurve spline. */
 | 
				
			||||||
  all_nurbs.emplace("NurbsPathCurve",
 | 
					  all_nurbs.emplace("NurbsPathCurve",
 | 
				
			||||||
                    std::make_unique<NurbsObject>("NurbsPathCurve",
 | 
					                    std::make_unique<NurbsObject>("NurbsPathCurve",
 | 
				
			||||||
                                                  coordinates_NurbsPathCurve,
 | 
					                                                  coordinates_NurbsPathCurve,
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -139,10 +139,12 @@ typedef enum CustomDataType {
 | 
				
			|||||||
  CD_SHAPE_KEYINDEX = 27,
 | 
					  CD_SHAPE_KEYINDEX = 27,
 | 
				
			||||||
  CD_SHAPEKEY = 28,
 | 
					  CD_SHAPEKEY = 28,
 | 
				
			||||||
  CD_BWEIGHT = 29,
 | 
					  CD_BWEIGHT = 29,
 | 
				
			||||||
  /* Usage of CD_CREASE depends on where on the Mesh the layer is added:
 | 
					  /**
 | 
				
			||||||
   * - for vertex creasing, this is persistent data accross all modes and is stored in the file,
 | 
					   * Usage of #CD_CREASE depends on where on the Mesh the layer is added:
 | 
				
			||||||
   * - for egde creasing, it is runtime data which is only used in edit-mode before being copied to
 | 
					   * - For vertex creasing, this is persistent data across all modes and is stored in the file.
 | 
				
			||||||
   * MEdge when exiting edit-mode. */
 | 
					   * - For edge creasing, it is runtime data which is only used in edit-mode before being copied
 | 
				
			||||||
 | 
					   *   to #MEdge when exiting edit-mode.
 | 
				
			||||||
 | 
					   */
 | 
				
			||||||
  CD_CREASE = 30,
 | 
					  CD_CREASE = 30,
 | 
				
			||||||
  CD_ORIGSPACE_MLOOP = 31,
 | 
					  CD_ORIGSPACE_MLOOP = 31,
 | 
				
			||||||
  CD_PREVIEW_MLOOPCOL = 32,
 | 
					  CD_PREVIEW_MLOOPCOL = 32,
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -345,7 +345,7 @@ static void scale_faces_uniformly(MeshComponent &mesh_component, const UniformSc
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
static Vector<ElementIsland> prepare_edge_islands(const Mesh &mesh, const IndexMask edge_selection)
 | 
					static Vector<ElementIsland> prepare_edge_islands(const Mesh &mesh, const IndexMask edge_selection)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
  /* Use the disjoing set data structure to determine which vertices have to be scaled together. */
 | 
					  /* Use the disjoint set data structure to determine which vertices have to be scaled together. */
 | 
				
			||||||
  DisjointSet disjoint_set(mesh.totvert);
 | 
					  DisjointSet disjoint_set(mesh.totvert);
 | 
				
			||||||
  for (const int edge_index : edge_selection) {
 | 
					  for (const int edge_index : edge_selection) {
 | 
				
			||||||
    const MEdge &edge = mesh.medge[edge_index];
 | 
					    const MEdge &edge = mesh.medge[edge_index];
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1236,7 +1236,7 @@ static PyObject *M_Geometry_tessellate_polygon(PyObject *UNUSED(self), PyObject
 | 
				
			|||||||
    polyLine = PySequence_GetItem(polyLineSeq, i);
 | 
					    polyLine = PySequence_GetItem(polyLineSeq, i);
 | 
				
			||||||
    if (!PySequence_Check(polyLine)) {
 | 
					    if (!PySequence_Check(polyLine)) {
 | 
				
			||||||
      BKE_displist_free(&dispbase);
 | 
					      BKE_displist_free(&dispbase);
 | 
				
			||||||
      Py_XDECREF(polyLine); /* may be null so use Py_XDECREF*/
 | 
					      Py_XDECREF(polyLine); /* May be null so use #Py_XDECREF. */
 | 
				
			||||||
      PyErr_SetString(PyExc_TypeError,
 | 
					      PyErr_SetString(PyExc_TypeError,
 | 
				
			||||||
                      "One or more of the polylines is not a sequence of mathutils.Vector's");
 | 
					                      "One or more of the polylines is not a sequence of mathutils.Vector's");
 | 
				
			||||||
      return NULL;
 | 
					      return NULL;
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -54,7 +54,7 @@ namespace blender::render::texturemargin {
 | 
				
			|||||||
class TextureMarginMap {
 | 
					class TextureMarginMap {
 | 
				
			||||||
  static const int directions[4][2];
 | 
					  static const int directions[4][2];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  /* Maps UV-edges to their corresponding UV-edge.  */
 | 
					  /* Maps UV-edges to their corresponding UV-edge. */
 | 
				
			||||||
  Vector<int> loop_adjacency_map_;
 | 
					  Vector<int> loop_adjacency_map_;
 | 
				
			||||||
  /* Maps UV-edges to their corresponding polygon. */
 | 
					  /* Maps UV-edges to their corresponding polygon. */
 | 
				
			||||||
  Vector<int> loop_to_poly_map_;
 | 
					  Vector<int> loop_to_poly_map_;
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -222,7 +222,7 @@ enum {
 | 
				
			|||||||
#define _EVT_KEYBOARD_MAX 0x00ff /* 255 */
 | 
					#define _EVT_KEYBOARD_MAX 0x00ff /* 255 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  /* WARNING: 0x010x are used for internal events
 | 
					  /* WARNING: 0x010x are used for internal events
 | 
				
			||||||
   * (but are still stored in the key-map).  */
 | 
					   * (but are still stored in the key-map). */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  EVT_F1KEY = 0x012c,  /* 300 */
 | 
					  EVT_F1KEY = 0x012c,  /* 300 */
 | 
				
			||||||
  EVT_F2KEY = 0x012d,  /* 301 */
 | 
					  EVT_F2KEY = 0x012d,  /* 301 */
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user