Cleanup: spelling in comments
Also remove duplicate comments in bmesh_log.h, caused by automated
comment relocation in [0].
[0]: c4e041da23
This commit is contained in:
parent
9dfabc1de3
commit
2d04012e57
|
@ -82,7 +82,7 @@ class DeviceScene {
|
|||
|
||||
device_vector<uint> patches;
|
||||
|
||||
/* pointcloud */
|
||||
/* point-cloud */
|
||||
device_vector<float4> points;
|
||||
device_vector<uint> points_shader;
|
||||
|
||||
|
@ -124,7 +124,7 @@ class DeviceScene {
|
|||
/* integrator */
|
||||
device_vector<float> sample_pattern_lut;
|
||||
|
||||
/* ies lights */
|
||||
/* IES lights */
|
||||
device_vector<float> ies_lights;
|
||||
|
||||
KernelData data;
|
||||
|
|
|
@ -587,15 +587,15 @@ bool BKE_brush_delete(Main *bmain, Brush *brush)
|
|||
return true;
|
||||
}
|
||||
|
||||
/* grease pencil cumapping->preset */
|
||||
typedef enum eGPCurveMappingPreset {
|
||||
/** Local grease pencil curve mapping preset. */
|
||||
using eGPCurveMappingPreset = enum eGPCurveMappingPreset {
|
||||
GPCURVE_PRESET_PENCIL = 0,
|
||||
GPCURVE_PRESET_INK = 1,
|
||||
GPCURVE_PRESET_INKNOISE = 2,
|
||||
GPCURVE_PRESET_MARKER = 3,
|
||||
GPCURVE_PRESET_CHISEL_SENSIVITY = 4,
|
||||
GPCURVE_PRESET_CHISEL_STRENGTH = 5,
|
||||
} eGPCurveMappingPreset;
|
||||
};
|
||||
|
||||
static void brush_gpencil_curvemap_reset(CurveMap *cuma, int tot, int preset)
|
||||
{
|
||||
|
|
|
@ -33,11 +33,11 @@ static int compare_v2_classify(const float uv_a[2], const float uv_b[2])
|
|||
if (uv_a[0] == uv_b[0] && uv_a[1] == uv_b[1]) {
|
||||
return CMP_EQUAL;
|
||||
}
|
||||
/* Note that the ULP value is the primary value used to compare relative values
|
||||
* as the absolute value doesn't account for float precision at difference scales.
|
||||
/* NOTE(@campbellbarton): that the ULP value is the primary value used to compare relative
|
||||
* values as the absolute value doesn't account for float precision at difference scales.
|
||||
* - For subdivision-surface ULP of 3 is sufficient,
|
||||
* although this value is extremely small.
|
||||
* - For bevel the URL of 12 is sufficient to merge UV's that appear to be connected
|
||||
* - For bevel the ULP of 12 is sufficient to merge UV's that appear to be connected
|
||||
* with bevel on Suzanne beveled 15% with 6 segments.
|
||||
*
|
||||
* These values could be tweaked but should be kept on the small side to prevent
|
||||
|
|
|
@ -34,42 +34,41 @@
|
|||
struct BMLogEntry {
|
||||
struct BMLogEntry *next, *prev;
|
||||
|
||||
/* The following GHashes map from an element ID to one of the log
|
||||
* types above */
|
||||
/* The following #GHash members map from an element ID to one of the log types above. */
|
||||
|
||||
/* Elements that were in the previous entry, but have been
|
||||
* deleted */
|
||||
/** Elements that were in the previous entry, but have been deleted. */
|
||||
GHash *deleted_verts;
|
||||
GHash *deleted_faces;
|
||||
/* Elements that were not in the previous entry, but are in the
|
||||
* result of this entry */
|
||||
/** Elements that were not in the previous entry, but are in the result of this entry. */
|
||||
GHash *added_verts;
|
||||
GHash *added_faces;
|
||||
|
||||
/* Vertices whose coordinates, mask value, or hflag have changed */
|
||||
/** Vertices whose coordinates, mask value, or hflag have changed. */
|
||||
GHash *modified_verts;
|
||||
GHash *modified_faces;
|
||||
|
||||
BLI_mempool *pool_verts;
|
||||
BLI_mempool *pool_faces;
|
||||
|
||||
/* This is only needed for dropping BMLogEntries while still in
|
||||
/**
|
||||
* This is only needed for dropping BMLogEntries while still in
|
||||
* dynamic-topology mode, as that should release vert/face IDs
|
||||
* back to the BMLog but no BMLog pointer is available at that
|
||||
* time.
|
||||
* back to the BMLog but no BMLog pointer is available at that time.
|
||||
*
|
||||
* This field is not guaranteed to be valid, any use of it should
|
||||
* check for NULL. */
|
||||
* check for NULL.
|
||||
*/
|
||||
BMLog *log;
|
||||
};
|
||||
|
||||
struct BMLog {
|
||||
/* Tree of free IDs */
|
||||
/** Tree of free IDs */
|
||||
struct RangeTreeUInt *unused_ids;
|
||||
|
||||
/* Mapping from unique IDs to vertices and faces
|
||||
/**
|
||||
* Mapping from unique IDs to vertices and faces
|
||||
*
|
||||
* Each vertex and face in the log gets a unique uinteger
|
||||
* Each vertex and face in the log gets a unique `uint`
|
||||
* assigned. That ID is taken from the set managed by the
|
||||
* unused_ids range tree.
|
||||
*
|
||||
|
@ -79,10 +78,11 @@ struct BMLog {
|
|||
GHash *id_to_elem;
|
||||
GHash *elem_to_id;
|
||||
|
||||
/* All BMLogEntrys, ordered from earliest to most recent */
|
||||
/** All #BMLogEntrys, ordered from earliest to most recent. */
|
||||
ListBase entries;
|
||||
|
||||
/* The current log entry from entries list
|
||||
/**
|
||||
* The current log entry from entries list
|
||||
*
|
||||
* If null, then the original mesh from before any of the log
|
||||
* entries is current (i.e. there is nothing left to undo.)
|
||||
|
|
|
@ -14,12 +14,13 @@ struct RangeTreeUInt;
|
|||
typedef struct BMLog BMLog;
|
||||
typedef struct BMLogEntry BMLogEntry;
|
||||
|
||||
/* Allocate and initialize a new BMLog */
|
||||
/* Allocate, initialize, and assign a new BMLog */
|
||||
/**
|
||||
* Allocate, initialize, and assign a new BMLog.
|
||||
*/
|
||||
BMLog *BM_log_create(BMesh *bm);
|
||||
|
||||
/* Allocate and initialize a new BMLog using existing BMLogEntries */
|
||||
/* Allocate and initialize a new BMLog using existing BMLogEntries
|
||||
/**
|
||||
* Allocate and initialize a new #BMLog using existing #BMLogEntries
|
||||
*
|
||||
* The 'entry' should be the last entry in the BMLog. Its prev pointer
|
||||
* will be followed back to find the first entry.
|
||||
|
@ -29,20 +30,21 @@ BMLog *BM_log_create(BMesh *bm);
|
|||
*/
|
||||
BMLog *BM_log_from_existing_entries_create(BMesh *bm, BMLogEntry *entry);
|
||||
|
||||
/* Free all the data in a BMLog including the log itself */
|
||||
/* Free all the data in a BMLog including the log itself */
|
||||
/**
|
||||
* Free all the data in a BMLog including the log itself.
|
||||
*/
|
||||
void BM_log_free(BMLog *log);
|
||||
|
||||
/* Get the number of log entries */
|
||||
/* Get the number of log entries */
|
||||
/**
|
||||
* Get the number of log entries.
|
||||
*/
|
||||
int BM_log_length(const BMLog *log);
|
||||
|
||||
/* Apply a consistent ordering to BMesh vertices and faces */
|
||||
/* Apply a consistent ordering to BMesh vertices */
|
||||
/** Apply a consistent ordering to BMesh vertices and faces. */
|
||||
void BM_log_mesh_elems_reorder(BMesh *bm, BMLog *log);
|
||||
|
||||
/* Start a new log entry and update the log entry list */
|
||||
/* Start a new log entry and update the log entry list
|
||||
/**
|
||||
* Start a new log entry and update the log entry list.
|
||||
*
|
||||
* If the log entry list is empty, or if the current log entry is the
|
||||
* last entry, the new entry is simply appended to the end.
|
||||
|
@ -54,35 +56,36 @@ void BM_log_mesh_elems_reorder(BMesh *bm, BMLog *log);
|
|||
*/
|
||||
BMLogEntry *BM_log_entry_add(BMLog *log);
|
||||
|
||||
/* Mark all used ids as unused for this node */
|
||||
/** Mark all used ids as unused for this node */
|
||||
void BM_log_cleanup_entry(BMLogEntry *entry);
|
||||
|
||||
/* Remove an entry from the log */
|
||||
/* Remove an entry from the log
|
||||
/**
|
||||
* Remove an entry from the log.
|
||||
*
|
||||
* Uses entry->log as the log. If the log is NULL, the entry will be
|
||||
* free'd but not removed from any list, nor shall its IDs be
|
||||
* released.
|
||||
* free'd but not removed from any list, nor shall its IDs be released.
|
||||
*
|
||||
* This operation is only valid on the first and last entries in the
|
||||
* log. Deleting from the middle will assert.
|
||||
*/
|
||||
void BM_log_entry_drop(BMLogEntry *entry);
|
||||
|
||||
/* Undo one BMLogEntry */
|
||||
/* Undo one BMLogEntry
|
||||
/**
|
||||
* Undo one #BMLogEntry.
|
||||
*
|
||||
* Has no effect if there's nothing left to undo */
|
||||
* Has no effect if there's nothing left to undo.
|
||||
*/
|
||||
void BM_log_undo(BMesh *bm, BMLog *log);
|
||||
|
||||
/* Redo one BMLogEntry */
|
||||
/* Redo one BMLogEntry
|
||||
/**
|
||||
* Redo one #BMLogEntry.
|
||||
*
|
||||
* Has no effect if there's nothing left to redo */
|
||||
* Has no effect if there's nothing left to redo.
|
||||
*/
|
||||
void BM_log_redo(BMesh *bm, BMLog *log);
|
||||
|
||||
/* Log a vertex before it is modified */
|
||||
/* Log a vertex before it is modified
|
||||
/**
|
||||
* Log a vertex before it is modified.
|
||||
*
|
||||
* Before modifying vertex coordinates, masks, or hflags, call this
|
||||
* function to log its current values. This is better than logging
|
||||
|
@ -107,8 +110,8 @@ void BM_log_redo(BMesh *bm, BMLog *log);
|
|||
*/
|
||||
void BM_log_vert_before_modified(BMLog *log, struct BMVert *v, int cd_vert_mask_offset);
|
||||
|
||||
/* Log a new vertex as added to the BMesh */
|
||||
/* Log a new vertex as added to the BMesh
|
||||
/**
|
||||
* Log a new vertex as added to the #BMesh.
|
||||
*
|
||||
* The new vertex gets a unique ID assigned. It is then added to a map
|
||||
* of added vertices, with the key being its ID and the value
|
||||
|
@ -116,16 +119,16 @@ void BM_log_vert_before_modified(BMLog *log, struct BMVert *v, int cd_vert_mask_
|
|||
*/
|
||||
void BM_log_vert_added(BMLog *log, struct BMVert *v, int cd_vert_mask_offset);
|
||||
|
||||
/* Log a face before it is modified */
|
||||
/* Log a face before it is modified
|
||||
/**
|
||||
* Log a face before it is modified.
|
||||
*
|
||||
* This is intended to handle only header flags and we always
|
||||
* assume face has been added before
|
||||
* assume face has been added before.
|
||||
*/
|
||||
void BM_log_face_modified(BMLog *log, struct BMFace *f);
|
||||
|
||||
/* Log a new face as added to the BMesh */
|
||||
/* Log a new face as added to the BMesh
|
||||
/**
|
||||
* Log a new face as added to the #BMesh.
|
||||
*
|
||||
* The new face gets a unique ID assigned. It is then added to a map
|
||||
* of added faces, with the key being its ID and the value containing
|
||||
|
@ -133,8 +136,8 @@ void BM_log_face_modified(BMLog *log, struct BMFace *f);
|
|||
*/
|
||||
void BM_log_face_added(BMLog *log, struct BMFace *f);
|
||||
|
||||
/* Log a vertex as removed from the BMesh */
|
||||
/* Log a vertex as removed from the BMesh
|
||||
/**
|
||||
* Log a vertex as removed from the #BMesh.
|
||||
*
|
||||
* A couple things can happen here:
|
||||
*
|
||||
|
@ -142,7 +145,7 @@ void BM_log_face_added(BMLog *log, struct BMFace *f);
|
|||
* deleted and forgotten about entirely. Its unique ID is returned to
|
||||
* the unused pool.
|
||||
*
|
||||
* If the vertex was already part of the BMesh before the current log
|
||||
* If the vertex was already part of the #BMesh before the current log
|
||||
* entry, it is added to a map of deleted vertices, with the key being
|
||||
* its ID and the value containing everything needed to reconstruct
|
||||
* that vertex.
|
||||
|
@ -152,8 +155,8 @@ void BM_log_face_added(BMLog *log, struct BMFace *f);
|
|||
*/
|
||||
void BM_log_vert_removed(BMLog *log, struct BMVert *v, int cd_vert_mask_offset);
|
||||
|
||||
/* Log a face as removed from the BMesh */
|
||||
/* Log a face as removed from the BMesh
|
||||
/**
|
||||
* Log a face as removed from the #BMesh.
|
||||
*
|
||||
* A couple things can happen here:
|
||||
*
|
||||
|
@ -161,43 +164,45 @@ void BM_log_vert_removed(BMLog *log, struct BMVert *v, int cd_vert_mask_offset);
|
|||
* deleted and forgotten about entirely. Its unique ID is returned to
|
||||
* the unused pool.
|
||||
*
|
||||
* If the face was already part of the BMesh before the current log
|
||||
* If the face was already part of the #BMesh before the current log
|
||||
* entry, it is added to a map of deleted faces, with the key being
|
||||
* its ID and the value containing everything needed to reconstruct
|
||||
* that face.
|
||||
*/
|
||||
void BM_log_face_removed(BMLog *log, struct BMFace *f);
|
||||
|
||||
/* Log all vertices/faces in the BMesh as added */
|
||||
/* Log all vertices/faces in the BMesh as added */
|
||||
/**
|
||||
* Log all vertices/faces in the #BMesh as added.
|
||||
*/
|
||||
void BM_log_all_added(BMesh *bm, BMLog *log);
|
||||
|
||||
/* Log all vertices/faces in the BMesh as removed */
|
||||
/* Log all vertices/faces in the BMesh as removed */
|
||||
/** Log all vertices/faces in the #BMesh as removed. */
|
||||
void BM_log_before_all_removed(BMesh *bm, BMLog *log);
|
||||
|
||||
/* Get the logged coordinates of a vertex */
|
||||
/* Get the logged coordinates of a vertex
|
||||
/**
|
||||
* Get the logged coordinates of a vertex.
|
||||
*
|
||||
* Does not modify the log or the vertex */
|
||||
* Does not modify the log or the vertex.
|
||||
*/
|
||||
const float *BM_log_original_vert_co(BMLog *log, BMVert *v);
|
||||
|
||||
/* Get the logged normal of a vertex
|
||||
/**
|
||||
* Get the logged normal of a vertex
|
||||
*
|
||||
* Does not modify the log or the vertex */
|
||||
* Does not modify the log or the vertex.
|
||||
*/
|
||||
const float *BM_log_original_vert_no(BMLog *log, BMVert *v);
|
||||
|
||||
/* Get the logged mask of a vertex */
|
||||
/* Get the logged mask of a vertex
|
||||
/** Get the logged mask of a vertex
|
||||
*
|
||||
* Does not modify the log or the vertex */
|
||||
* Does not modify the log or the vertex.
|
||||
*/
|
||||
float BM_log_original_mask(BMLog *log, BMVert *v);
|
||||
|
||||
/* Get the logged data of a vertex (avoid multiple lookups) */
|
||||
/** Get the logged data of a vertex (avoid multiple lookups). */
|
||||
void BM_log_original_vert_data(BMLog *log, BMVert *v, const float **r_co, const float **r_no);
|
||||
|
||||
/* For internal use only (unit testing) */
|
||||
/* For internal use only (unit testing) */
|
||||
/** For internal use only (unit testing). */
|
||||
BMLogEntry *BM_log_current_entry(BMLog *log);
|
||||
/* For internal use only (unit testing) */
|
||||
/** For internal use only (unit testing) */
|
||||
struct RangeTreeUInt *BM_log_unused_ids(BMLog *log);
|
||||
|
|
|
@ -93,7 +93,7 @@ struct TextureReadRoutineSpecialisation {
|
|||
* 0 = Not a Depth format,
|
||||
* 1 = FLOAT DEPTH,
|
||||
* 2 = 24Bit Integer Depth,
|
||||
* 4 = 32bit uinteger Depth. */
|
||||
* 4 = 32bit Unsigned-Integer Depth. */
|
||||
int depth_format_mode;
|
||||
|
||||
bool operator==(const TextureReadRoutineSpecialisation &other) const
|
||||
|
|
Loading…
Reference in New Issue