style cleanup: assignment & indentation.

This commit is contained in:
Campbell Barton
2012-06-09 18:56:12 +00:00
parent c6cffe98fa
commit 2c1abe1f58
32 changed files with 500 additions and 484 deletions

View File

@@ -193,7 +193,8 @@ CCLDeviceInfo *compute_device_list(DeviceType type)
foreach(DeviceInfo& info, devices) {
if(info.type == type ||
(info.type == DEVICE_MULTI && info.multi_devices[0].type == type)) {
(info.type == DEVICE_MULTI && info.multi_devices[0].type == type))
{
CCLDeviceInfo cinfo = {info.id.c_str(), info.description.c_str(), i++};
device_list.push_back(cinfo);
}

View File

@@ -292,7 +292,8 @@ void BlenderSession::synchronize()
SessionParams session_params = BlenderSync::get_session_params(b_userpref, b_scene, background);
if(session->params.modified(session_params) ||
scene->params.modified(scene_params)) {
scene->params.modified(scene_params))
{
free_session();
create_session();
session->start();

View File

@@ -784,7 +784,9 @@ void BlenderSync::sync_lamps()
if(b_lamp->type() == BL::Lamp::type_POINT ||
b_lamp->type() == BL::Lamp::type_SPOT ||
b_lamp->type() == BL::Lamp::type_AREA)
{
strength = 100.0f;
}
closure = graph->add(new EmissionNode());
closure->input("Color")->value = get_float3(b_lamp->color());

View File

@@ -105,10 +105,13 @@ bool BlenderSync::sync_recalc()
BL::BlendData::worlds_iterator b_world;
for(b_data.worlds.begin(b_world); b_world != b_data.worlds.end(); ++b_world)
for(b_data.worlds.begin(b_world); b_world != b_data.worlds.end(); ++b_world) {
if(world_map == b_world->ptr.data &&
(b_world->is_updated() || (b_world->node_tree() && b_world->node_tree().is_updated())))
{
world_recalc = true;
}
}
bool recalc =
shader_map.has_recalc() ||

View File

@@ -137,10 +137,13 @@ __device_inline float path_state_terminate_probability(KernelGlobals *kg, PathSt
(state->diffuse_bounce >= kernel_data.integrator.max_diffuse_bounce) ||
(state->glossy_bounce >= kernel_data.integrator.max_glossy_bounce) ||
(state->transmission_bounce >= kernel_data.integrator.max_transmission_bounce))
{
return 0.0f;
else if(state->bounce <= kernel_data.integrator.min_bounce)
}
else if(state->bounce <= kernel_data.integrator.min_bounce) {
return 1.0f;
}
}
/* probalistic termination */
return average(throughput);

View File

@@ -74,10 +74,13 @@ bool Attribute::same_storage(TypeDesc a, TypeDesc b)
if(a == TypeDesc::TypeColor || a == TypeDesc::TypePoint ||
a == TypeDesc::TypeVector || a == TypeDesc::TypeNormal)
{
if(b == TypeDesc::TypeColor || b == TypeDesc::TypePoint ||
b == TypeDesc::TypeVector || b == TypeDesc::TypeNormal)
{
return true;
}
}
return false;
}
@@ -286,11 +289,14 @@ bool AttributeRequestSet::modified(const AttributeRequestSet& other)
for(size_t j = 0; j < requests.size() && !found; j++)
if(requests[i].name == other.requests[j].name &&
requests[i].std == other.requests[j].std)
{
found = true;
}
if(!found)
if(!found) {
return true;
}
}
return false;
}