Cleanup: replace NB with NOTE in comments

This commit is contained in:
Campbell Barton 2021-07-21 13:05:39 +10:00
parent dc8a924efa
commit 265c3a4724
16 changed files with 48 additions and 51 deletions

View File

@ -82,7 +82,7 @@ def create_nb_project_main():
make_exe = cmake_cache_var("CMAKE_MAKE_PROGRAM")
make_exe_basename = os.path.basename(make_exe)
# --------------- NB specific
# --------------- NetBeans specific.
defines = [("%s=%s" % cdef) if cdef[1] else cdef[0] for cdef in defines]
defines += [cdef.replace("#define", "").strip() for cdef in cmake_compiler_defines()]

View File

@ -993,7 +993,7 @@ void OSLCompiler::parameter_array(const char *name, const float f[], int arrayle
void OSLCompiler::parameter_color_array(const char *name, const array<float3> &f)
{
/* NB: cycles float3 type is actually 4 floats! need to use an explicit array */
/* NOTE: cycles float3 type is actually 4 floats! need to use an explicit array. */
array<float[3]> table(f.size());
for (int i = 0; i < f.size(); ++i) {

View File

@ -62,8 +62,8 @@ template<typename _Tp> struct MEM_Allocator {
return &__x;
}
// NB: __n is permitted to be 0. The C++ standard says nothing
// about what the return value is when __n == 0.
/* NOTE: `__n` is permitted to be 0.
* The C++ standard says nothing about what the return value is when `__n == 0`. */
_Tp *allocate(size_type __n, const void * = 0)
{
_Tp *__ret = NULL;

View File

@ -77,7 +77,7 @@ class NodeItem:
else:
return bpy.app.translations.contexts.default
# NB: is a staticmethod because called with an explicit self argument
# NOTE: is a staticmethod because called with an explicit self argument
# NodeItemCustom sets this as a variable attribute in __init__
@staticmethod
def draw(self, layout, _context):

View File

@ -147,7 +147,7 @@ node_categories = [
MyNodeCategory('OTHERNODES', "Other Nodes", items=[
# the node item can have additional settings,
# which are applied to new nodes
# NB: settings values are stored as string expressions,
# NOTE: settings values are stored as string expressions,
# for this reason they should be converted to strings using repr()
NodeItem("CustomNodeType", label="Node A", settings={
"my_string_prop": repr("Lorem ipsum dolor sit amet"),

View File

@ -1212,10 +1212,12 @@ static void update_typeinfo(Main *bmain,
FOREACH_NODETREE_END;
}
/* Try to initialize all typeinfo in a node tree.
* NB: In general undefined typeinfo is a perfectly valid case,
/**
* Try to initialize all type-info in a node tree.
*
* \note In general undefined type-info is a perfectly valid case,
* the type may just be registered later.
* In that case the update_typeinfo function will set typeinfo on registration
* In that case the update_typeinfo function will set type-info on registration
* and do necessary updates.
*/
void ntreeSetTypes(const struct bContext *C, bNodeTree *ntree)

View File

@ -2149,7 +2149,7 @@ void blo_do_versions_260(FileData *fd, Library *UNUSED(lib), Main *bmain)
}
for (scene = bmain->scenes.first; scene; scene = scene->id.next) {
/* NB: scene->nodetree is a local ID block, has been direct_link'ed */
/* NOTE: `scene->nodetree` is a local ID block, has been direct_link'ed. */
if (scene->nodetree) {
scene->nodetree->active_viewer_key = active_viewer_key;
}

View File

@ -613,9 +613,8 @@ void snode_set_context(const bContext *C)
/* check the tree type */
if (!treetype || (treetype->poll && !treetype->poll(C, treetype))) {
/* invalid tree type, skip
* NB: not resetting the node path here, invalid bNodeTreeType
* may still be registered at a later point.
*/
* NOTE: not resetting the node path here, invalid #bNodeTreeType
* may still be registered at a later point. */
return;
}
@ -1303,9 +1302,8 @@ static int node_duplicate_exec(bContext *C, wmOperator *op)
}
}
/* copy links between selected nodes
* NB: this depends on correct node->new_node and sock->new_sock pointers from above copy!
*/
/* Copy links between selected nodes.
* NOTE: this depends on correct node->new_node and sock->new_sock pointers from above copy! */
bNodeLink *lastlink = (bNodeLink *)ntree->links.last;
LISTBASE_FOREACH (bNodeLink *, link, &ntree->links) {
/* This creates new links between copied nodes.
@ -2163,9 +2161,9 @@ static int node_clipboard_copy_exec(bContext *C, wmOperator *UNUSED(op))
}
}
/* copy links between selected nodes
* NB: this depends on correct node->new_node and sock->new_sock pointers from above copy!
*/
/* Copy links between selected nodes.
* NOTE: this depends on correct node->new_node and sock->new_sock pointers from above copy! */
LISTBASE_FOREACH (bNodeLink *, link, &ntree->links) {
/* This creates new links between copied nodes. */
if (link->tonode && (link->tonode->flag & NODE_SELECT) && link->fromnode &&

View File

@ -371,29 +371,29 @@ void gts_vertex_principal_directions(WVertex *v, Vec3r Kh, real Kg, Vec3r &e1, V
}
e = *itE;
/* since this vertex passed the tests in gts_vertex_mean_curvature_normal(), this should be
* true. */
/* Since this vertex passed the tests in gts_vertex_mean_curvature_normal(),
this should be true. */
// g_assert(gts_edge_face_number (e, s) == 2);
/* identify the two triangles bordering e in s */
/* Identify the two triangles bordering e in s. */
f1 = e->GetaFace();
f2 = e->GetbFace();
/* We are solving for the values of the curvature tensor
* B = [ a b ; b c ].
* The computations here are from section 5 of [Meyer et al 2002].
* `B = [ a b ; b c ]`.
* The computations here are from section 5 of [Meyer et al 2002].
*
* The first step is to calculate the linear equations governing the values of (a,b,c). These
* The first step is to calculate the linear equations governing the values of (a,b,c). These
* can be computed by setting the derivatives of the error E to zero (section 5.3).
*
* Since a + c = norm(Kh), we only compute the linear equations for dE/da and dE/db. (NB:
* [Meyer et al 2002] has the equation a + b = norm(Kh), but I'm almost positive this is
* incorrect).
* Since a + c = norm(Kh), we only compute the linear equations for `dE/da` and `dE/db`.
* (NOTE: [Meyer et al 2002] has the equation `a + b = norm(Kh)`,
* but I'm almost positive this is incorrect).
*
* Note that the w_ij (defined in section 5.2) are all scaled by (1/8*A_mixed). We drop this
* Note that the w_ij (defined in section 5.2) are all scaled by `(1/8*A_mixed)`. We drop this
* uniform scale factor because the solution of the linear equations doesn't rely on it.
*
* The terms of the linear equations are xterm_dy with x in {a,b,c} and y in {a,b}. There are
* The terms of the linear equations are xterm_dy with x in {a,b,c} and y in {a,b}. There are
* also const_dy terms that are the constant factors in the equations.
*/

View File

@ -6622,10 +6622,9 @@ static void def_cmp_image(StructRNA *srna)
"Put node output buffer to straight alpha instead of premultiplied");
RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update");
/* NB: image user properties used in the UI are redefined in def_node_image_user,
/* NOTE: Image user properties used in the UI are redefined in def_node_image_user,
* to trigger correct updates of the node editor. RNA design problem that prevents
* updates from nested structs ...
*/
* updates from nested structs. */
RNA_def_struct_sdna_from(srna, "ImageUser", "storage");
def_node_image_user(srna);
}
@ -6722,9 +6721,8 @@ static void rna_def_cmp_output_file_slots_api(BlenderRNA *brna,
parm = RNA_def_pointer(func, "socket", "NodeSocket", "", "New socket");
RNA_def_function_return(func, parm);
/* NB: methods below can use the standard node socket API functions,
* included here for completeness.
*/
/* NOTE: methods below can use the standard node socket API functions,
* included here for completeness. */
func = RNA_def_function(srna, "remove", "rna_Node_socket_remove");
RNA_def_function_ui_description(func, "Remove a file slot from this node");
@ -10301,11 +10299,11 @@ static void rna_def_node_socket(BlenderRNA *brna)
RNA_def_property_override_flag(prop, PROPOVERRIDE_NO_COMPARISON);
RNA_def_property_ui_text(prop, "Node", "Node owning this socket");
/* NB: the type property is used by standard sockets.
/* NOTE: The type property is used by standard sockets.
* Ideally should be defined only for the registered subclass,
* but to use the existing DNA is added in the base type here.
* Future socket types can ignore or override this if needed.
*/
* Future socket types can ignore or override this if needed. */
prop = RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "type");
RNA_def_property_enum_items(prop, node_socket_type_items);

View File

@ -156,7 +156,7 @@ DefNode(CompositorNode, CMP_NODE_HUE_SAT, 0, "HUE_SA
DefNode(CompositorNode, CMP_NODE_IMAGE, def_cmp_image, "IMAGE", Image, "Image", "" )
DefNode(CompositorNode, CMP_NODE_R_LAYERS, def_cmp_render_layers, "R_LAYERS", RLayers, "Render Layers", "" )
DefNode(CompositorNode, CMP_NODE_COMPOSITE, def_cmp_composite, "COMPOSITE", Composite, "Composite", "" )
/* NB: OutputFile node has special rna setup function called in rna_nodetree.c */
/* NOTE: #OutputFile node has special RNA setup function called in rna_nodetree.c */
DefNode(CompositorNode, CMP_NODE_OUTPUT_FILE, 0, "OUTPUT_FILE", OutputFile, "File Output", "" )
DefNode(CompositorNode, CMP_NODE_TEXTURE, def_texture, "TEXTURE", Texture, "Texture", "" )
DefNode(CompositorNode, CMP_NODE_TRANSLATE, def_cmp_translate, "TRANSLATE", Translate, "Translate", "" )

View File

@ -36,9 +36,8 @@ void register_node_type_cmp_group(void)
{
static bNodeType ntype;
/* NB: cannot use sh_node_type_base for node group, because it would map the node type
* to the shared NODE_GROUP integer type id.
*/
/* NOTE: Cannot use sh_node_type_base for node group, because it would map the node type
* to the shared NODE_GROUP integer type id. */
node_type_base_custom(
&ntype, "CompositorNodeGroup", "Group", NODE_CLASS_GROUP, NODE_CONST_OUTPUT);
ntype.type = NODE_GROUP;

View File

@ -229,9 +229,9 @@ void register_node_type_sh_group(void)
{
static bNodeType ntype;
/* NB: cannot use sh_node_type_base for node group, because it would map the node type
* to the shared NODE_GROUP integer type id.
*/
/* NOTE: cannot use #sh_node_type_base for node group, because it would map the node type
* to the shared #NODE_GROUP integer type id. */
node_type_base_custom(&ntype, "ShaderNodeGroup", "Group", NODE_CLASS_GROUP, NODE_CONST_OUTPUT);
ntype.type = NODE_GROUP;
ntype.poll = sh_node_poll_default;

View File

@ -158,9 +158,9 @@ void register_node_type_tex_group(void)
{
static bNodeType ntype;
/* NB: cannot use sh_node_type_base for node group, because it would map the node type
* to the shared NODE_GROUP integer type id.
*/
/* NOTE: Cannot use #sh_node_type_base for node group, because it would map the node type
* to the shared #NODE_GROUP integer type id. */
node_type_base_custom(&ntype, "TextureNodeGroup", "Group", NODE_CLASS_GROUP, NODE_CONST_OUTPUT);
ntype.type = NODE_GROUP;
ntype.poll = tex_node_poll_default;

View File

@ -1439,7 +1439,7 @@ void SIM_mass_spring_force_drag(Implicit_Data *data, float drag)
for (i = 0; i < numverts; i++) {
float tmp[3][3];
/* NB: uses root space velocity, no need to transform */
/* NOTE: Uses root space velocity, no need to transform. */
madd_v3_v3fl(data->F[i], data->V[i], -drag);
copy_m3_m3(tmp, I);

View File

@ -797,7 +797,7 @@ void SIM_mass_spring_force_drag(Implicit_Data *data, float drag)
for (int i = 0; i < numverts; i++) {
float tmp[3][3];
/* NB: uses root space velocity, no need to transform */
/* NOTE: Uses root space velocity, no need to transform. */
madd_v3_v3fl(data->F.v3(i), data->V.v3(i), -drag);
copy_m3_m3(tmp, I);