Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2019-04-21 06:44:06 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-04-21 07:27:35 +0300
commit93c19a5a2cf58b75aa3072ce79de5e5d571f3d55 (patch)
tree832c780931025206ac043340e9b39af6d804e425 /source/blender
parent9d72efe108cb5819d07e524f311f613d002d3b61 (diff)
Cleanup: comments (mainly long lines)
Comments after code can cause awkward line breaks.
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/blenkernel/BKE_mesh.h23
-rw-r--r--source/blender/blenkernel/intern/constraint.c5
-rw-r--r--source/blender/blenkernel/intern/library_remap.c12
-rw-r--r--source/blender/blenkernel/intern/mesh_remap.c15
-rw-r--r--source/blender/blenkernel/intern/object_dupli.c9
-rw-r--r--source/blender/blenkernel/intern/pbvh.c4
-rw-r--r--source/blender/compositor/nodes/COM_DilateErodeNode.h5
-rw-r--r--source/blender/draw/engines/eevee/eevee_lightcache.c97
-rw-r--r--source/blender/draw/intern/draw_manager.h17
-rw-r--r--source/blender/draw/intern/draw_manager_exec.c6
-rw-r--r--source/blender/makesrna/intern/rna_internal_types.h4
-rw-r--r--source/blender/makesrna/intern/rna_modifier.c4
-rw-r--r--source/blender/nodes/intern/node_exec.h7
-rw-r--r--source/blender/python/intern/bpy_rna_id_collection.c13
14 files changed, 135 insertions, 86 deletions
diff --git a/source/blender/blenkernel/BKE_mesh.h b/source/blender/blenkernel/BKE_mesh.h
index e89e1b05029..d4ad0e771d3 100644
--- a/source/blender/blenkernel/BKE_mesh.h
+++ b/source/blender/blenkernel/BKE_mesh.h
@@ -325,22 +325,25 @@ void BKE_edges_sharp_from_angle_set(const struct MVert *mverts,
* References a contiguous loop-fan with normal offset vars.
*/
typedef struct MLoopNorSpace {
- float vec_lnor[3]; /* Automatically computed loop normal. */
- float vec_ref[3]; /* Reference vector, orthogonal to vec_lnor. */
- float vec_ortho[3]; /* Third vector, orthogonal to vec_lnor and vec_ref. */
- float
- ref_alpha; /* Reference angle, around vec_ortho, in ]0, pi] range (0.0 marks that space as invalid). */
- float
- ref_beta; /* Reference angle, around vec_lnor, in ]0, 2pi] range (0.0 marks that space as invalid). */
- /* All loops using this lnor space (i.e. smooth fan of loops),
+ /** Automatically computed loop normal. */
+ float vec_lnor[3];
+ /** Reference vector, orthogonal to vec_lnor. */
+ float vec_ref[3];
+ /** Third vector, orthogonal to vec_lnor and vec_ref. */
+ float vec_ortho[3];
+ /** Reference angle, around vec_ortho, in ]0, pi] range (0.0 marks that space as invalid). */
+ float ref_alpha;
+ /** Reference angle, around vec_lnor, in ]0, 2pi] range (0.0 marks that space as invalid). */
+ float ref_beta;
+ /** All loops using this lnor space (i.e. smooth fan of loops),
* as (depending on owning MLoopNorSpaceArrary.data_type):
* - Indices (uint_in_ptr), or
* - BMLoop pointers. */
struct LinkNode *loops;
char flags;
- void *
- user_data; /* To be used for extended processing related to loop normal spaces (aka smooth fans). */
+ /** To be used for extended processing related to loop normal spaces (aka smooth fans). */
+ void *user_data;
} MLoopNorSpace;
/**
* MLoopNorSpace.flags
diff --git a/source/blender/blenkernel/intern/constraint.c b/source/blender/blenkernel/intern/constraint.c
index 01dc7c6b3ad..1ceaf8f6821 100644
--- a/source/blender/blenkernel/intern/constraint.c
+++ b/source/blender/blenkernel/intern/constraint.c
@@ -1404,8 +1404,9 @@ static void followpath_evaluate(bConstraint *con, bConstraintOb *cob, ListBase *
mul_m4_m4m4(cob->matrix, ct->matrix, obmat);
/* un-apply scaling caused by path */
- if ((data->followflag & FOLLOWPATH_RADIUS) ==
- 0) { /* XXX - assume that scale correction means that radius will have some scale error in it - Campbell */
+ if ((data->followflag & FOLLOWPATH_RADIUS) == 0) {
+ /* XXX: Assume that scale correction means that radius
+ * will have some scale error in it - Campbell. */
float obsize[3];
mat4_to_size(obsize, cob->matrix);
diff --git a/source/blender/blenkernel/intern/library_remap.c b/source/blender/blenkernel/intern/library_remap.c
index d334804dcd6..5baa7fb3cf8 100644
--- a/source/blender/blenkernel/intern/library_remap.c
+++ b/source/blender/blenkernel/intern/library_remap.c
@@ -145,14 +145,18 @@ typedef struct IDRemap {
Main *bmain; /* Only used to trigger depsgraph updates in the right bmain. */
ID *old_id;
ID *new_id;
- ID *id; /* The ID in which we are replacing old_id by new_id usages. */
+ /** The ID in which we are replacing old_id by new_id usages. */
+ ID *id;
short flag;
/* 'Output' data. */
short status;
- int skipped_direct; /* Number of direct usecases that could not be remapped (e.g.: obdata when in edit mode). */
- int skipped_indirect; /* Number of indirect usecases that could not be remapped. */
- int skipped_refcounted; /* Number of skipped usecases that refcount the datablock. */
+ /** Number of direct usecases that could not be remapped (e.g.: obdata when in edit mode). */
+ int skipped_direct;
+ /** Number of indirect usecases that could not be remapped. */
+ int skipped_indirect;
+ /** Number of skipped usecases that refcount the datablock. */
+ int skipped_refcounted;
} IDRemap;
/* IDRemap->flag enums defined in BKE_library.h */
diff --git a/source/blender/blenkernel/intern/mesh_remap.c b/source/blender/blenkernel/intern/mesh_remap.c
index b43339bf73f..6799c6f5c43 100644
--- a/source/blender/blenkernel/intern/mesh_remap.c
+++ b/source/blender/blenkernel/intern/mesh_remap.c
@@ -445,13 +445,16 @@ static int mesh_remap_interp_poly_data_get(const MPoly *mp,
return sources_num;
}
-/* Little helper when dealing with source islands */
+/** Little helper when dealing with source islands */
typedef struct IslandResult {
- float
- factor; /* A factor, based on which best island for a given set of elements will be selected. */
- int index_src; /* Index of the source. */
- float hit_dist; /* The actual hit distance. */
- float hit_point[3]; /* The hit point, if relevant. */
+ /** A factor, based on which best island for a given set of elements will be selected. */
+ float factor;
+ /** Index of the source. */
+ int index_src;
+ /** The actual hit distance. */
+ float hit_dist;
+ /** The hit point, if relevant. */
+ float hit_point[3];
} IslandResult;
/* Note about all bvh/raycasting stuff below:
diff --git a/source/blender/blenkernel/intern/object_dupli.c b/source/blender/blenkernel/intern/object_dupli.c
index 2544bb6a8f0..9a0e972c46b 100644
--- a/source/blender/blenkernel/intern/object_dupli.c
+++ b/source/blender/blenkernel/intern/object_dupli.c
@@ -66,9 +66,10 @@
typedef struct DupliContext {
Depsgraph *depsgraph;
- Collection
- *collection; /* XXX child objects are selected from this group if set, could be nicer */
- Object *obedit; /* Only to check if the object is in edit-mode. */
+ /** XXX child objects are selected from this group if set, could be nicer. */
+ Collection *collection;
+ /** Only to check if the object is in edit-mode. */
+ Object *obedit;
Scene *scene;
ViewLayer *view_layer;
@@ -80,7 +81,7 @@ typedef struct DupliContext {
const struct DupliGenerator *gen;
- /* result containers */
+ /** Result containers. */
ListBase *duplilist; /* legacy doubly-linked list */
} DupliContext;
diff --git a/source/blender/blenkernel/intern/pbvh.c b/source/blender/blenkernel/intern/pbvh.c
index 7933f98868a..6529cdb06d7 100644
--- a/source/blender/blenkernel/intern/pbvh.c
+++ b/source/blender/blenkernel/intern/pbvh.c
@@ -505,8 +505,8 @@ static void pbvh_build(PBVH *bvh, BB *cb, BBC *prim_bbc, int totprim)
/**
* Do a full rebuild with on Mesh data structure.
*
- * \note Unlike mpoly/mloop/verts, looptri is **totally owned** by PBVH (which means it may rewrite it if needed,
- * see #BKE_pbvh_apply_vertCos().
+ * \note Unlike mpoly/mloop/verts, looptri is **totally owned** by PBVH
+ * (which means it may rewrite it if needed, see #BKE_pbvh_apply_vertCos().
*/
void BKE_pbvh_build_mesh(PBVH *bvh,
const MPoly *mpoly,
diff --git a/source/blender/compositor/nodes/COM_DilateErodeNode.h b/source/blender/compositor/nodes/COM_DilateErodeNode.h
index 0093d78ca5b..d5b2863a4bb 100644
--- a/source/blender/compositor/nodes/COM_DilateErodeNode.h
+++ b/source/blender/compositor/nodes/COM_DilateErodeNode.h
@@ -26,8 +26,9 @@
* \ingroup Node
*/
class DilateErodeNode : public Node {
- NodeBlurData
- m_alpha_blur; /* only used for blurring alpha, since the dilate/erode node doesn't have this */
+ /** only used for blurring alpha, since the dilate/erode node doesn't have this. */
+ NodeBlurData m_alpha_blur;
+
public:
DilateErodeNode(bNode *editorNode);
void convertToOperations(NodeConverter &converter, const CompositorContext &context) const;
diff --git a/source/blender/draw/engines/eevee/eevee_lightcache.c b/source/blender/draw/engines/eevee/eevee_lightcache.c
index 9ebd9542ef5..33cb2e87dc7 100644
--- a/source/blender/draw/engines/eevee/eevee_lightcache.c
+++ b/source/blender/draw/engines/eevee/eevee_lightcache.c
@@ -92,38 +92,64 @@ typedef struct EEVEE_LightBake {
struct Main *bmain;
EEVEE_ViewLayerData *sldata;
- LightProbe **probe; /* Current probe being rendered. */
- GPUTexture *rt_color; /* Target cube color texture. */
- GPUTexture *rt_depth; /* Target cube depth texture. */
- GPUFrameBuffer *rt_fb[6]; /* Target cube framebuffers. */
- GPUFrameBuffer *store_fb; /* Storage framebuffer. */
- int rt_res; /* Cube render target resolution. */
+ /** Current probe being rendered. */
+ LightProbe **probe;
+ /** Target cube color texture. */
+ GPUTexture *rt_color;
+ /** Target cube depth texture. */
+ GPUTexture *rt_depth;
+ /** Target cube framebuffers. */
+ GPUFrameBuffer *rt_fb[6];
+ /** Storage framebuffer. */
+ GPUFrameBuffer *store_fb;
+ /** Cube render target resolution. */
+ int rt_res;
/* Shared */
- int layer; /* Target layer to store the data to. */
- float samples_ct, invsamples_ct; /* Sample count for the convolution. */
- float lod_factor; /* Sampling bias during convolution step. */
- float lod_max; /* Max cubemap LOD to sample when convolving. */
- int cube_len, grid_len; /* Number of probes to render + world probe. */
+ /** Target layer to store the data to. */
+ int layer;
+ /** Sample count for the convolution. */
+ float samples_ct, invsamples_ct;
+ /** Sampling bias during convolution step. */
+ float lod_factor;
+ /** Max cubemap LOD to sample when convolving. */
+ float lod_max;
+ /** Number of probes to render + world probe. */
+ int cube_len, grid_len;
/* Irradiance grid */
- EEVEE_LightGrid *grid; /* Current probe being rendered (UBO data). */
- int irr_cube_res; /* Target cubemap at MIP 0. */
- int irr_size[3]; /* Size of the irradiance texture. */
- int total_irr_samples; /* Total for all grids */
- int grid_sample; /* Nth sample of the current grid being rendered. */
- int grid_sample_len; /* Total number of samples for the current grid. */
- int grid_curr; /* Nth grid in the cache being rendered. */
- int bounce_curr, bounce_len; /* The current light bounce being evaluated. */
- float vis_res; /* Resolution of the Visibility shadowmap. */
- GPUTexture *grid_prev; /* Result of previous light bounce. */
- LightProbe **grid_prb; /* Pointer to the id.data of the probe object. */
+ /** Current probe being rendered (UBO data). */
+ EEVEE_LightGrid *grid;
+ /** Target cubemap at MIP 0. */
+ int irr_cube_res;
+ /** Size of the irradiance texture. */
+ int irr_size[3];
+ /** Total for all grids */
+ int total_irr_samples;
+ /** Nth sample of the current grid being rendered. */
+ int grid_sample;
+ /** Total number of samples for the current grid. */
+ int grid_sample_len;
+ /** Nth grid in the cache being rendered. */
+ int grid_curr;
+ /** The current light bounce being evaluated. */
+ int bounce_curr, bounce_len;
+ /** Resolution of the Visibility shadowmap. */
+ float vis_res;
+ /** Result of previous light bounce. */
+ GPUTexture *grid_prev;
+ /** Pointer to the id.data of the probe object. */
+ LightProbe **grid_prb;
/* Reflection probe */
- EEVEE_LightProbe *cube; /* Current probe being rendered (UBO data). */
- int ref_cube_res; /* Target cubemap at MIP 0. */
- int cube_offset; /* Index of the current cube. */
- LightProbe **cube_prb; /* Pointer to the id.data of the probe object. */
+ /** Current probe being rendered (UBO data). */
+ EEVEE_LightProbe *cube;
+ /** Target cubemap at MIP 0. */
+ int ref_cube_res;
+ /** Index of the current cube. */
+ int cube_offset;
+ /** Pointer to the id.data of the probe object. */
+ LightProbe **cube_prb;
/* Dummy Textures */
struct GPUTexture *dummy_color, *dummy_depth;
@@ -133,15 +159,18 @@ typedef struct EEVEE_LightBake {
short *stop, *do_update;
float *progress;
- bool resource_only; /* For only handling the resources. */
+ /** For only handling the resources. */
+ bool resource_only;
bool own_resources;
- bool
- own_light_cache; /* If the lightcache was created for baking, it's first owned by the baker. */
- int delay; /* ms. delay the start of the baking to not slowdown interactions (TODO remove) */
- int frame; /* Scene frame to bake. */
-
- void *gl_context,
- *gpu_context; /* If running in parallel (in a separate thread), use this context. */
+ /** If the lightcache was created for baking, it's first owned by the baker. */
+ bool own_light_cache;
+ /** ms. delay the start of the baking to not slowdown interactions (TODO remove) */
+ int delay;
+ /** Scene frame to bake. */
+ int frame;
+
+ /** If running in parallel (in a separate thread), use this context. */
+ void *gl_context, *gpu_context;
ThreadMutex *mutex;
} EEVEE_LightBake;
diff --git a/source/blender/draw/intern/draw_manager.h b/source/blender/draw/intern/draw_manager.h
index f9ed5a864df..a70438a2d37 100644
--- a/source/blender/draw/intern/draw_manager.h
+++ b/source/blender/draw/intern/draw_manager.h
@@ -253,10 +253,12 @@ struct DRWShadingGroup {
};
};
- DRWState state_extra; /* State changes for this batch only (or'd with the pass's state) */
- DRWState
- state_extra_disable; /* State changes for this batch only (and'd with the pass's state) */
- uint stencil_mask; /* Stencil mask to use for stencil test / write operations */
+ /** State changes for this batch only (or'd with the pass's state) */
+ DRWState state_extra;
+ /** State changes for this batch only (and'd with the pass's state) */
+ DRWState state_extra_disable;
+ /** Stencil mask to use for stencil test / write operations */
+ uint stencil_mask;
DRWShadingGroupType type;
/* Builtin matrices locations */
@@ -395,10 +397,11 @@ typedef struct DRWManager {
/* gl_context serves as the offset for clearing only
* the top portion of the struct so DO NOT MOVE IT! */
- void *gl_context; /* Unique ghost context used by the draw manager. */
+ /** Unique ghost context used by the draw manager. */
+ void *gl_context;
GPUContext *gpu_context;
- TicketMutex
- *gl_context_mutex; /* Mutex to lock the drw manager and avoid concurrent context usage. */
+ /** Mutex to lock the drw manager and avoid concurrent context usage. */
+ TicketMutex *gl_context_mutex;
/** GPU Resource State: Memory storage between drawing. */
struct {
diff --git a/source/blender/draw/intern/draw_manager_exec.c b/source/blender/draw/intern/draw_manager_exec.c
index 15e7c2389b8..c5e3ecd0752 100644
--- a/source/blender/draw/intern/draw_manager_exec.c
+++ b/source/blender/draw/intern/draw_manager_exec.c
@@ -617,9 +617,9 @@ static void draw_clipping_setup_from_view(void)
float F = -1.0f, N; /* square distance of far and near point to origin */
float f, n; /* distance of far and near point to z axis. f is always > 0 but n can be < 0 */
float e, s; /* far and near clipping distance (<0) */
- float
- c; /* slope of center line = distance of far clipping center to z axis / far clipping distance */
- float z; /* projection of sphere center on z axis (<0) */
+ float c; /* slope of center line = distance of far clipping center
+ * to z axis / far clipping distance. */
+ float z; /* projection of sphere center on z axis (<0) */
/* Find farthest corner and center of far clip plane. */
float corner[3] = {1.0f, 1.0f, 1.0f}; /* in clip space */
diff --git a/source/blender/makesrna/intern/rna_internal_types.h b/source/blender/makesrna/intern/rna_internal_types.h
index 93409a7d008..b0ead024748 100644
--- a/source/blender/makesrna/intern/rna_internal_types.h
+++ b/source/blender/makesrna/intern/rna_internal_types.h
@@ -431,8 +431,8 @@ typedef struct PointerPropertyRNA {
PropPointerGetFunc get;
PropPointerSetFunc set;
PropPointerTypeFunc typef;
- PropPointerPollFunc
- poll; /* unlike operators, 'set' can still run if poll fails, used for filtering display */
+ /** unlike operators, 'set' can still run if poll fails, used for filtering display. */
+ PropPointerPollFunc poll;
struct StructRNA *type;
} PointerPropertyRNA;
diff --git a/source/blender/makesrna/intern/rna_modifier.c b/source/blender/makesrna/intern/rna_modifier.c
index 1a986da1a94..204f2b051ed 100644
--- a/source/blender/makesrna/intern/rna_modifier.c
+++ b/source/blender/makesrna/intern/rna_modifier.c
@@ -5250,7 +5250,9 @@ static void rna_def_modifier_datatransfer(BlenderRNA *brna)
# if 0 /* TODO */
{DT_TYPE_SHAPEKEY, "SHAPEKEYS", 0, "Shapekey(s)", "Transfer active or all shape keys"},
# endif
-# if 0 /* XXX When SkinModifier is enabled, it seems to erase its own CD_MVERT_SKIN layer from final DM :( */
+ /* XXX When SkinModifier is enabled,
+ * it seems to erase its own CD_MVERT_SKIN layer from final DM :( */
+# if 0
{DT_TYPE_SKIN, "SKIN", 0, "Skin Weight", "Transfer skin weights"},
# endif
{DT_TYPE_BWEIGHT_VERT, "BEVEL_WEIGHT_VERT", 0, "Bevel Weight", "Transfer bevel weights"},
diff --git a/source/blender/nodes/intern/node_exec.h b/source/blender/nodes/intern/node_exec.h
index 336a8f26ec3..07c12dc7c46 100644
--- a/source/blender/nodes/intern/node_exec.h
+++ b/source/blender/nodes/intern/node_exec.h
@@ -40,11 +40,12 @@ struct bNodeTree;
/* Node execution data */
typedef struct bNodeExec {
- struct bNode *node; /* backpointer to node */
+ /** Backpointer to node. */
+ struct bNode *node;
bNodeExecData data;
- NodeFreeExecFunction
- freeexecfunc; /* free function, stored in exec itself to avoid dangling node pointer access */
+ /** Free function, stored in exec itself to avoid dangling node pointer access. */
+ NodeFreeExecFunction freeexecfunc;
} bNodeExec;
/* Execution Data for each instance of node tree execution */
diff --git a/source/blender/python/intern/bpy_rna_id_collection.c b/source/blender/python/intern/bpy_rna_id_collection.c
index b07dea06fb4..78dae50efe6 100644
--- a/source/blender/python/intern/bpy_rna_id_collection.c
+++ b/source/blender/python/intern/bpy_rna_id_collection.c
@@ -54,20 +54,21 @@
#include "bpy_rna.h"
typedef struct IDUserMapData {
- /* place-holder key only used for lookups to avoid creating new data only for lookups
+ /** Place-holder key only used for lookups to avoid creating new data only for lookups
* (never return its contents) */
PyObject *py_id_key_lookup_only;
- /* we loop over data-blocks that this ID points to (do build a reverse lookup table) */
+ /** We loop over data-blocks that this ID points to (do build a reverse lookup table) */
PyObject *py_id_curr;
ID *id_curr;
- /* filter the values we add into the set */
+ /** Filter the values we add into the set. */
BLI_bitmap *types_bitmap;
- PyObject *user_map; /* set to fill in as we iterate */
- bool
- is_subset; /* true when we're only mapping a subset of all the ID's (subset arg is passed) */
+ /** Set to fill in as we iterate. */
+ PyObject *user_map;
+ /** true when we're only mapping a subset of all the ID's (subset arg is passed). */
+ bool is_subset;
} IDUserMapData;
static int id_code_as_index(const short idcode)