Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/space_node/node_edit.c
| Show First 20 Lines • Show All 414 Lines • ▼ Show 20 Lines | switch (GS(id->name)) { | ||||
| case ID_LA: | case ID_LA: | ||||
| { | { | ||||
| Light *la = (Light *)id; | Light *la = (Light *)id; | ||||
| la->nodetree = ntree; | la->nodetree = ntree; | ||||
| output_type = SH_NODE_OUTPUT_LIGHT; | output_type = SH_NODE_OUTPUT_LIGHT; | ||||
| shader_type = SH_NODE_EMISSION; | shader_type = SH_NODE_EMISSION; | ||||
| copy_v3_v3(color, &la->r); | copy_v3_fl3(color, 1.0f, 1.0f, 1.0f); | ||||
| if (la->type == LA_LOCAL || la->type == LA_SPOT || la->type == LA_AREA) | |||||
| strength = 100.0f; | |||||
| else | |||||
| strength = 1.0f; | strength = 1.0f; | ||||
| break; | break; | ||||
| } | } | ||||
| default: | default: | ||||
| printf("ED_node_shader_default called on wrong ID type.\n"); | printf("ED_node_shader_default called on wrong ID type.\n"); | ||||
| return; | return; | ||||
| } | } | ||||
| out = nodeAddStaticNode(C, ntree, output_type); | out = nodeAddStaticNode(C, ntree, output_type); | ||||
| ▲ Show 20 Lines • Show All 2,207 Lines • Show Last 20 Lines | |||||