Changeset View
Changeset View
Standalone View
Standalone View
intern/cycles/render/shader.cpp
| Show First 20 Lines • Show All 210 Lines • ▼ Show 20 Lines | if(node->input("Color")->link || node->input("Strength")->link) { | ||||
| return false; | return false; | ||||
| } | } | ||||
| *emission = node->color*node->strength; | *emission = node->color*node->strength; | ||||
| return true; | return true; | ||||
| } | } | ||||
| void Shader::get_uv_tiles(Scene *scene, ustring map, vector<int> &tiles, int columns) | |||||
| { | |||||
| foreach(Mesh *mesh, scene->meshes) { | |||||
| if(std::find(mesh->used_shaders.begin(), mesh->used_shaders.end(), this) != mesh->used_shaders.end()) { | |||||
| mesh->get_uv_tiles(map, tiles, columns); | |||||
| } | |||||
| } | |||||
| } | |||||
| void Shader::set_graph(ShaderGraph *graph_) | void Shader::set_graph(ShaderGraph *graph_) | ||||
| { | { | ||||
| /* do this here already so that we can detect if mesh or object attributes | /* do this here already so that we can detect if mesh or object attributes | ||||
| * are needed, since the node attribute callbacks check if their sockets | * are needed, since the node attribute callbacks check if their sockets | ||||
| * are connected but proxy nodes should not count */ | * are connected but proxy nodes should not count */ | ||||
| if(graph_) | if(graph_) | ||||
| graph_->remove_proxy_nodes(); | graph_->remove_proxy_nodes(); | ||||
| ▲ Show 20 Lines • Show All 388 Lines • Show Last 20 Lines | |||||