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>2020-10-10 10:19:55 +0300
committerCampbell Barton <ideasman42@gmail.com>2020-10-10 14:04:51 +0300
commit2abfcebb0eb7989e3d1e7d03f37ecf5c088210af (patch)
treee7a1ad5912b4661d4ece743f4f7fd86e6bf4d3c4 /source/blender/io/collada/Materials.cpp
parentc735aca42e9f5961fec7e5d5fc196b5bd6b85f56 (diff)
Cleanup: use C comments for descriptive text
Follow our code style guide by using C-comments for text descriptions.
Diffstat (limited to 'source/blender/io/collada/Materials.cpp')
-rw-r--r--source/blender/io/collada/Materials.cpp50
1 files changed, 25 insertions, 25 deletions
diff --git a/source/blender/io/collada/Materials.cpp b/source/blender/io/collada/Materials.cpp
index 1e02e151d97..a97b7dfcfd6 100644
--- a/source/blender/io/collada/Materials.cpp
+++ b/source/blender/io/collada/Materials.cpp
@@ -53,7 +53,7 @@ MaterialNode::MaterialNode(bContext *C,
add_link(ntree, nmap["transparent"], 0, nmap["mix"], 2);
add_link(ntree, nmap["mix"], 0, nmap["out"], 0);
- // experimental, probably not used.
+ /* experimental, probably not used. */
make_group(C, ntree, nmap);
#else
shader_node = add_node(SH_NODE_BSDF_PRINCIPLED, 0, 300, "");
@@ -66,24 +66,24 @@ void MaterialNode::setShaderType()
{
#if 0
COLLADAFW::EffectCommon::ShaderType shader = ef->getShaderType();
- // Currently we only support PBR based shaders
- // TODO: simulate the effects with PBR
+ /* Currently we only support PBR based shaders */
+ /* TODO: simulate the effects with PBR */
- // blinn
+ /* blinn */
if (shader == COLLADAFW::EffectCommon::SHADER_BLINN) {
ma->spec_shader = MA_SPEC_BLINN;
ma->spec = ef->getShininess().getFloatValue();
}
- // phong
+ /* phong */
else if (shader == COLLADAFW::EffectCommon::SHADER_PHONG) {
ma->spec_shader = MA_SPEC_PHONG;
ma->har = ef->getShininess().getFloatValue();
}
- // lambert
+ /* lambert */
else if (shader == COLLADAFW::EffectCommon::SHADER_LAMBERT) {
ma->diff_shader = MA_DIFF_LAMBERT;
}
- // default - lambert
+ /* default - lambert */
else {
ma->diff_shader = MA_DIFF_LAMBERT;
fprintf(stderr, "Current shader type is not supported, default to lambert.\n");
@@ -91,7 +91,7 @@ void MaterialNode::setShaderType()
#endif
}
-// returns null if material already has a node tree
+/* returns null if material already has a node tree */
bNodeTree *MaterialNode::prepare_material_nodetree()
{
if (material->nodetree) {
@@ -139,7 +139,7 @@ void MaterialNode::set_reflectivity(COLLADAFW::FloatOrParam &val)
}
#if 0
-// needs rework to be done for 2.81
+/* needs rework to be done for 2.81 */
void MaterialNode::set_shininess(COLLADAFW::FloatOrParam &val)
{
float roughness = val.getFloatValue();
@@ -177,7 +177,7 @@ void MaterialNode::set_alpha(COLLADAFW::EffectCommon::OpaqueMode mode,
}
if (cot.isColor() || !cot.isValid()) {
- // transparent_cot is either a color or not defined
+ /* transparent_cot is either a color or not defined */
float transparent_alpha;
if (cot.isValid()) {
@@ -185,14 +185,14 @@ void MaterialNode::set_alpha(COLLADAFW::EffectCommon::OpaqueMode mode,
transparent_alpha = col.getAlpha();
}
else {
- // no transparent color defined
+ /* no transparent color defined */
transparent_alpha = 1;
}
float transparency_alpha = val.getFloatValue();
if (transparency_alpha < 0) {
- // transparency is not defined
- transparency_alpha = 1; // set to opaque
+ /* transparency is not defined */
+ transparency_alpha = 1; /* set to opaque */
}
float alpha = transparent_alpha * transparency_alpha;
@@ -279,12 +279,12 @@ void MaterialNode::set_ambient(COLLADAFW::ColorOrTexture &cot)
COLLADAFW::Color col = cot.getColor();
bNode *node = add_node(SH_NODE_RGB, -300, locy, "Ambient");
set_color(node, col);
- // TODO: Connect node
+ /* TODO: Connect node */
}
- // texture
+ /* texture */
else if (cot.isTexture()) {
add_texture_node(cot, -300, locy, "Ambient");
- // TODO: Connect node
+ /* TODO: Connect node */
}
}
@@ -295,12 +295,12 @@ void MaterialNode::set_reflective(COLLADAFW::ColorOrTexture &cot)
COLLADAFW::Color col = cot.getColor();
bNode *node = add_node(SH_NODE_RGB, -300, locy, "Reflective");
set_color(node, col);
- // TODO: Connect node
+ /* TODO: Connect node */
}
- // texture
+ /* texture */
else if (cot.isTexture()) {
add_texture_node(cot, -300, locy, "Reflective");
- // TODO: Connect node
+ /* TODO: Connect node */
}
}
@@ -343,16 +343,16 @@ void MaterialNode::set_opacity(COLLADAFW::ColorOrTexture &cot)
float alpha = effect->getTransparency().getFloatValue();
if (col.isValid()) {
- alpha *= col.getAlpha(); // Assuming A_ONE opaque mode
+ alpha *= col.getAlpha(); /* Assuming A_ONE opaque mode */
}
bNodeSocket *socket = nodeFindSocket(shader_node, SOCK_IN, "Alpha");
((bNodeSocketValueFloat *)socket->default_value)->value = alpha;
}
- // texture
+ /* texture */
else if (cot.isTexture()) {
add_texture_node(cot, -300, locy, "Alpha");
- // TODO: Connect node
+ /* TODO: Connect node */
}
}
@@ -363,12 +363,12 @@ void MaterialNode::set_specular(COLLADAFW::ColorOrTexture &cot)
COLLADAFW::Color col = cot.getColor();
bNode *node = add_node(SH_NODE_RGB, -300, locy, "Specular");
set_color(node, col);
- // TODO: Connect node
+ /* TODO: Connect node */
}
- // texture
+ /* texture */
else if (cot.isTexture()) {
add_texture_node(cot, -300, locy, "Specular");
- // TODO: Connect node
+ /* TODO: Connect node */
}
}