Changeset View
Changeset View
Standalone View
Standalone View
source/blender/io/collada/Materials.cpp
| Context not available. | |||||
| else if (cot.isTexture()) { | else if (cot.isTexture()) { | ||||
| bNode *texture_node = add_texture_node(cot, -300, locy, "Emission"); | bNode *texture_node = add_texture_node(cot, -300, locy, "Emission"); | ||||
| if (texture_node != nullptr) { | if (texture_node != nullptr) { | ||||
| add_link(texture_node, 0, shader_node, 0); | bNodeSocket *from_socket = nodeFindSocket(texture_node, SOCK_OUT, "Color"); | ||||
gaiaclary: what if from_socket is NULL ? | |||||
| bNodeSocket *to_socket = nodeFindSocket(shader_node, SOCK_IN, "Emission"); | |||||
gaiaclaryUnsubmitted Not Done Inline Actionssame as above gaiaclary: same as above | |||||
scurestAuthorUnsubmitted Done Inline ActionsThe code right above this does nodeFindSocket(..., "Emission") without checking for NULL, so I assumed I didn't need to. What do you want to do if it's NULL? scurest: The code right above this does nodeFindSocket(..., "Emission") without checking for NULL, so I… | |||||
| nodeAddLink(ntree, texture_node, from_socket, shader_node, to_socket); | |||||
| } | } | ||||
gaiaclaryUnsubmitted Not Done Inline ActionsSuggest to encapsulate this change into an overwritten method: void MaterialNode::add_link(bNode *from_node, const char* from_label, bNode *to_node, const char* to_label) gaiaclary: Suggest to encapsulate this change into an overwritten method:
void MaterialNode::add_link… | |||||
| } | } | ||||
| Context not available. | |||||
what if from_socket is NULL ?