Cleanup: spelling in comments & move doc-strings to headers
This commit is contained in:
parent
30e666f747
commit
3e2017491a
|
@ -69,7 +69,7 @@ void Camera::init()
|
|||
data.type = DRW_view_is_persp_get(inst_.drw_view) ? CAMERA_PERSP : CAMERA_ORTHO;
|
||||
}
|
||||
else {
|
||||
/* Lightprobe baking. */
|
||||
/* Light-probe baking. */
|
||||
data.type = CAMERA_PERSP;
|
||||
}
|
||||
}
|
||||
|
@ -91,7 +91,7 @@ void Camera::sync()
|
|||
DRW_view_camtexco_get(inst_.drw_view, data.uv_scale);
|
||||
}
|
||||
else if (inst_.render) {
|
||||
/* TODO(fclem) Overscan */
|
||||
/* TODO(@fclem): Over-scan. */
|
||||
// RE_GetCameraWindowWithOverscan(inst_.render->re, g_data->overscan, data.winmat);
|
||||
RE_GetCameraWindow(inst_.render->re, camera_eval, data.winmat.ptr());
|
||||
RE_GetCameraModelMatrix(inst_.render->re, camera_eval, data.viewinv.ptr());
|
||||
|
|
|
@ -51,7 +51,6 @@ DefaultSurfaceNodeTree::~DefaultSurfaceNodeTree()
|
|||
MEM_SAFE_FREE(ntree_);
|
||||
}
|
||||
|
||||
/* Configure a default nodetree with the given material. */
|
||||
bNodeTree *DefaultSurfaceNodeTree::nodetree_get(::Material *ma)
|
||||
{
|
||||
/* WARNING: This function is not threadsafe. Which is not a problem for the moment. */
|
||||
|
@ -223,7 +222,7 @@ MaterialPass MaterialModule::material_pass_get(::Material *blender_mat,
|
|||
/* IMPORTANT: We always create a subgroup so that all subgroups are inserted after the
|
||||
* first "empty" shgroup. This avoids messing the order of subgroups when there is more
|
||||
* nested subgroup (i.e: hair drawing). */
|
||||
/* TODO(fclem) Remove material resource binding from the first group creation. */
|
||||
/* TODO(@fclem): Remove material resource binding from the first group creation. */
|
||||
matpass.shgrp = DRW_shgroup_create_sub(grp);
|
||||
DRW_shgroup_add_material_resources(matpass.shgrp, matpass.gpumat);
|
||||
}
|
||||
|
@ -244,13 +243,13 @@ Material &MaterialModule::material_sync(::Material *blender_mat,
|
|||
(has_motion ? MAT_PIPE_DEFERRED_PREPASS_VELOCITY :
|
||||
MAT_PIPE_DEFERRED_PREPASS);
|
||||
|
||||
/* TEST until we have defered pipeline up and running. */
|
||||
/* TEST until we have deferred pipeline up and running. */
|
||||
surface_pipe = MAT_PIPE_FORWARD;
|
||||
prepass_pipe = has_motion ? MAT_PIPE_FORWARD_PREPASS_VELOCITY : MAT_PIPE_FORWARD_PREPASS;
|
||||
|
||||
MaterialKey material_key(blender_mat, geometry_type, surface_pipe);
|
||||
|
||||
/* TODO allocate in blocks to avoid memory fragmentation. */
|
||||
/* TODO: allocate in blocks to avoid memory fragmentation. */
|
||||
auto add_cb = [&]() { return new Material(); };
|
||||
Material &mat = *material_map_.lookup_or_add_cb(material_key, add_cb);
|
||||
|
||||
|
@ -274,7 +273,6 @@ Material &MaterialModule::material_sync(::Material *blender_mat,
|
|||
return mat;
|
||||
}
|
||||
|
||||
/* Return correct material or empty default material if slot is empty. */
|
||||
::Material *MaterialModule::material_from_slot(Object *ob, int slot)
|
||||
{
|
||||
if (ob->base_flag & BASE_HOLDOUT) {
|
||||
|
@ -290,8 +288,6 @@ Material &MaterialModule::material_sync(::Material *blender_mat,
|
|||
return ma;
|
||||
}
|
||||
|
||||
/* Returned Material references are valid until the next call to this function or
|
||||
* material_get(). */
|
||||
MaterialArray &MaterialModule::material_array_get(Object *ob, bool has_motion)
|
||||
{
|
||||
material_array_.materials.clear();
|
||||
|
@ -308,8 +304,6 @@ MaterialArray &MaterialModule::material_array_get(Object *ob, bool has_motion)
|
|||
return material_array_;
|
||||
}
|
||||
|
||||
/* Returned Material references are valid until the next call to this function or
|
||||
* material_array_get(). */
|
||||
Material &MaterialModule::material_get(Object *ob,
|
||||
bool has_motion,
|
||||
int mat_nr,
|
||||
|
@ -322,4 +316,4 @@ Material &MaterialModule::material_get(Object *ob,
|
|||
|
||||
/** \} */
|
||||
|
||||
} // namespace blender::eevee
|
||||
} // namespace blender::eevee
|
||||
|
|
|
@ -191,6 +191,7 @@ class DefaultSurfaceNodeTree {
|
|||
DefaultSurfaceNodeTree();
|
||||
~DefaultSurfaceNodeTree();
|
||||
|
||||
/** Configure a default node-tree with the given material. */
|
||||
bNodeTree *nodetree_get(::Material *ma);
|
||||
};
|
||||
|
||||
|
@ -242,7 +243,14 @@ class MaterialModule {
|
|||
|
||||
void begin_sync();
|
||||
|
||||
/**
|
||||
* Returned Material references are valid until the next call to this function or material_get().
|
||||
*/
|
||||
MaterialArray &material_array_get(Object *ob, bool has_motion);
|
||||
/**
|
||||
* Returned Material references are valid until the next call to this function or
|
||||
* material_array_get().
|
||||
*/
|
||||
Material &material_get(Object *ob, bool has_motion, int mat_nr, eMaterialGeometry geometry_type);
|
||||
|
||||
private:
|
||||
|
@ -250,6 +258,7 @@ class MaterialModule {
|
|||
eMaterialGeometry geometry_type,
|
||||
bool has_motion);
|
||||
|
||||
/** Return correct material or empty default material if slot is empty. */
|
||||
::Material *material_from_slot(Object *ob, int slot);
|
||||
MaterialPass material_pass_get(::Material *blender_mat,
|
||||
eMaterialPipeline pipeline_type,
|
||||
|
|
|
@ -53,7 +53,7 @@ struct CameraData {
|
|||
float4x4 viewinv;
|
||||
float4x4 winmat;
|
||||
float4x4 wininv;
|
||||
/** Camera UV scale and bias. Also known as viewcamtexcofac. */
|
||||
/** Camera UV scale and bias. Also known as `viewcamtexcofac`. */
|
||||
float2 uv_scale;
|
||||
float2 uv_bias;
|
||||
/** Panorama parameters. */
|
||||
|
|
|
@ -74,7 +74,7 @@ void VelocityModule::step_camera_sync()
|
|||
|
||||
bool VelocityModule::step_object_sync(Object *ob,
|
||||
ObjectKey &object_key,
|
||||
int /* IDRecalcFlag */ recalc)
|
||||
int /*IDRecalcFlag*/ recalc)
|
||||
{
|
||||
bool has_motion = object_has_velocity(ob) || (recalc & ID_RECALC_TRANSFORM);
|
||||
/* NOTE: Fragile. This will only work with 1 frame of lag since we can't record every geometry
|
||||
|
@ -175,7 +175,7 @@ bool VelocityModule::step_object_sync(Object *ob,
|
|||
void VelocityModule::step_swap()
|
||||
{
|
||||
{
|
||||
/* Now that vertex buffers are garanteed to be updated, proceed with
|
||||
/* Now that vertex buffers are guaranteed to be updated, proceed with
|
||||
* offset computation and copy into the geometry step buffer. */
|
||||
uint dst_ofs = 0;
|
||||
for (VelocityGeometryData &geom : geometry_map.values()) {
|
||||
|
@ -184,8 +184,8 @@ void VelocityModule::step_swap()
|
|||
geom.ofs = dst_ofs;
|
||||
dst_ofs += src_len;
|
||||
}
|
||||
/* TODO(fclem): Fail gracefully (disable motion blur + warning print) if tot_len *
|
||||
* sizeof(float4) is greater than max SSBO size. */
|
||||
/* TODO(@fclem): Fail gracefully (disable motion blur + warning print) if
|
||||
`tot_len * sizeof(float4)` is greater than max SSBO size. */
|
||||
geometry_steps[step_]->resize(max_ii(16, dst_ofs));
|
||||
|
||||
for (VelocityGeometryData &geom : geometry_map.values()) {
|
||||
|
|
|
@ -1374,8 +1374,8 @@ bool ED_mesh_pick_vert(
|
|||
|
||||
if (use_zbuf) {
|
||||
if (dist_px > 0) {
|
||||
/* sample rect to increase chances of selecting, so that when clicking
|
||||
* on an face in the backbuf, we can still select a vert */
|
||||
/* Sample rectangle to increase chances of selecting, so that when clicking
|
||||
* on an face in the back-buffer, we can still select a vert. */
|
||||
*r_index = DRW_select_buffer_find_nearest_to_point(
|
||||
vc.depsgraph, vc.region, vc.v3d, mval, 1, me->totvert + 1, &dist_px);
|
||||
}
|
||||
|
|
|
@ -1652,11 +1652,11 @@ void SCULPT_do_paint_brush(struct PaintModeSettings *paint_mode_settings,
|
|||
int totnode) ATTR_NONNULL();
|
||||
|
||||
/**
|
||||
* @brief Get the image canvas for painting on the given object.
|
||||
* \brief Get the image canvas for painting on the given object.
|
||||
*
|
||||
* @return #true if an image is found. The #r_image and #r_image_user fields are filled with the
|
||||
* \return #true if an image is found. The #r_image and #r_image_user fields are filled with the
|
||||
* image and image user. Returns false when the image isn't found. In the later case the r_image
|
||||
* and r_image_user are set to nullptr/NULL.
|
||||
* and r_image_user are set to NULL.
|
||||
*/
|
||||
bool SCULPT_paint_image_canvas_get(struct PaintModeSettings *paint_mode_settings,
|
||||
struct Object *ob,
|
||||
|
|
|
@ -362,8 +362,10 @@ typedef struct LineartRenderTaskInfo {
|
|||
|
||||
int thread_id;
|
||||
|
||||
/* #pending_edges here only stores a refernce to a portion in LineartRenderbuffer::pending_edges,
|
||||
* assigned by the occlusion scheduler. */
|
||||
/**
|
||||
* #pending_edges here only stores a reference to a portion in
|
||||
* LineartRenderbuffer::pending_edges, assigned by the occlusion scheduler.
|
||||
*/
|
||||
struct LineartPendingEdges pending_edges;
|
||||
|
||||
} LineartRenderTaskInfo;
|
||||
|
|
|
@ -48,12 +48,13 @@ void GPU_storagebuf_clear(GPUStorageBuf *ssbo,
|
|||
void GPU_storagebuf_clear_to_zero(GPUStorageBuf *ssbo);
|
||||
|
||||
/**
|
||||
* @brief Copy a part of a vertex buffer to a storage buffer.
|
||||
* \a ssbo: destination storage buffer
|
||||
* \a src: source vertex buffer
|
||||
* \a dst_offset: where to start copying to (in bytes).
|
||||
* \a src_offset: where to start copying from (in bytes).
|
||||
* \a copy_size: byte size of the segment to copy.
|
||||
* \brief Copy a part of a vertex buffer to a storage buffer.
|
||||
*
|
||||
* \param ssbo: destination storage buffer
|
||||
* \param src: source vertex buffer
|
||||
* \param dst_offset: where to start copying to (in bytes).
|
||||
* \param src_offset: where to start copying from (in bytes).
|
||||
* \param copy_size: byte size of the segment to copy.
|
||||
*/
|
||||
void GPU_storagebuf_copy_sub_from_vertbuf(
|
||||
GPUStorageBuf *ssbo, GPUVertBuf *src, uint dst_offset, uint src_offset, uint copy_size);
|
||||
|
|
|
@ -43,11 +43,11 @@
|
|||
|
||||
#define SDNA_MAX_FILENAME_LENGTH 255
|
||||
|
||||
/* The include file below is automatically generated from the SRC_DNA_INC
|
||||
+ * variable in 'source/blender/CMakeLists.txt'. */
|
||||
/* The include file below is automatically generated from the `SRC_DNA_INC`
|
||||
* variable in 'source/blender/CMakeLists.txt'. */
|
||||
static const char *includefiles[] = {
|
||||
#include "dna_includes_as_strings.h"
|
||||
/* empty string to indicate end of includefiles */
|
||||
/* Empty string to indicate end of include files. */
|
||||
"",
|
||||
};
|
||||
|
||||
|
@ -1536,7 +1536,7 @@ int main(int argc, char **argv)
|
|||
# pragma GCC poison long
|
||||
#endif
|
||||
|
||||
/* The include file below is automatically generated from the SRC_DNA_INC
|
||||
/* The include file below is automatically generated from the `SRC_DNA_INC`
|
||||
* variable in 'source/blender/CMakeLists.txt'. */
|
||||
#include "dna_includes_all.h"
|
||||
|
||||
|
|
Loading…
Reference in New Issue