Code cleanup: style

This commit is contained in:
Campbell Barton 2014-02-19 08:02:59 +11:00
parent acecae86dc
commit c9233bfd82
11 changed files with 18 additions and 19 deletions

View File

@ -107,7 +107,7 @@ enum_integrator = (
('BRANCHED_PATH', "Branched Path Tracing", "Path tracing integrator that branches on the first bounce, giving more control over the number of light and material samples"),
('PATH', "Path Tracing", "Pure path tracing integrator"),
)
enum_volume_homogeneous_sampling = (
('DISTANCE', "Distance", "Use Distance Sampling"),
('EQUI_ANGULAR', "Equi-angular", "Use Equi-angular Sampling"),
@ -145,7 +145,7 @@ class CyclesRenderSettings(bpy.types.PropertyGroup):
items=enum_integrator,
default='PATH',
)
cls.volume_homogeneous_sampling = EnumProperty(
name="Homogeneous Sampling",
description="Sampling method to use for homogeneous volumes",

View File

@ -53,7 +53,7 @@ set(MSFFMT_SRC
)
add_executable(msgfmt ${MSFFMT_SRC})
if(CMAKE_C_COMPILER_ID MATCHES "Clang" AND (CMAKE_C_COMPILER_VERSION VERSION_EQUAL 3.4 OR CMAKE_C_COMPILER_VERSION VERSION_GREATER 3.4))
if(CMAKE_C_COMPILER_ID MATCHES "Clang" AND (NOT (CMAKE_C_COMPILER_VERSION VERSION_LESS 3.4)))
# needed for clang 3.4+
target_link_libraries(msgfmt ${PLATFORM_LINKLIBS})
endif()

View File

@ -1105,6 +1105,7 @@ class WM_OT_properties_edit(Operator):
if prop_type_old != prop_type:
data_path = '["%s"]' % prop
done = set()
def _update(fcurves):
for fcu in fcurves:
if fcu not in done and fcu.data_path == data_path:

View File

@ -132,7 +132,7 @@ class CLIP_HT_header(Header):
row = layout.row(align=True)
row.prop(toolsettings, "use_proportional_edit_mask",
text="", icon_only=True)
text="", icon_only=True)
if toolsettings.use_proportional_edit_mask:
row.prop(toolsettings, "proportional_edit_falloff",
text="", icon_only=True)

View File

@ -966,7 +966,6 @@ class USERPREF_MT_ndof_settings(Menu):
layout.prop(input_prefs, "ndof_roty_invert_axis")
layout.prop(input_prefs, "ndof_rotz_invert_axis")
# view2d use pan/zoom
layout.separator()
layout.label(text="Pan options")

View File

@ -1387,8 +1387,7 @@ static bool check_object_data_needs_evaluation(Object *object)
if (object->type == OB_MESH) {
return object->derivedFinal == NULL;
}
else if (ELEM5(object->type, OB_CURVE, OB_SURF, OB_FONT, OB_MBALL, OB_LATTICE))
{
else if (ELEM5(object->type, OB_CURVE, OB_SURF, OB_FONT, OB_MBALL, OB_LATTICE)) {
return object->curve_cache == NULL;
}
@ -1574,10 +1573,10 @@ static void dag_scene_build(Main *bmain, Scene *sce)
* tagged for update).
*/
if (DAG_id_type_tagged(bmain, ID_OB) ||
DAG_id_type_tagged(bmain, ID_ME) || /* Mesh */
DAG_id_type_tagged(bmain, ID_CU) || /* Curve */
DAG_id_type_tagged(bmain, ID_MB) || /* MetaBall */
DAG_id_type_tagged(bmain, ID_LT)) /* Lattice */
DAG_id_type_tagged(bmain, ID_ME) || /* Mesh */
DAG_id_type_tagged(bmain, ID_CU) || /* Curve */
DAG_id_type_tagged(bmain, ID_MB) || /* MetaBall */
DAG_id_type_tagged(bmain, ID_LT)) /* Lattice */
{
dag_invisible_dependencies_flush(sce);
}

View File

@ -166,14 +166,14 @@ static ScanFillEdge *edge_step(PolyInfo *poly_info,
eed = (e_curr->next && e_curr != poly_info[poly_nr].edge_last) ? e_curr->next : poly_info[poly_nr].edge_first;
if ((v_curr == eed->v1 || v_curr == eed->v2) == true &&
(v_prev == eed->v1 || v_prev == eed->v2) == false)
(v_prev == eed->v1 || v_prev == eed->v2) == false)
{
return eed;
}
eed = (e_curr->prev && e_curr != poly_info[poly_nr].edge_first) ? e_curr->prev : poly_info[poly_nr].edge_last;
if ((v_curr == eed->v1 || v_curr == eed->v2) == true &&
(v_prev == eed->v1 || v_prev == eed->v2) == false)
(v_prev == eed->v1 || v_prev == eed->v2) == false)
{
return eed;
}

View File

@ -78,7 +78,7 @@ float *BlurBaseOperation::make_gausstab(float rad, int size)
gausstab = (float *)MEM_mallocN(sizeof(float) * n, __func__);
sum = 0.0f;
float fac = (rad > 0.0f ? 1.0f/rad : 0.0f);
float fac = (rad > 0.0f ? 1.0f / rad : 0.0f);
for (i = -size; i <= size; i++) {
val = RE_filter_value(this->m_data->filtertype, (float)i * fac);
sum += val;
@ -103,7 +103,7 @@ float *BlurBaseOperation::make_dist_fac_inverse(float rad, int size, int falloff
dist_fac_invert = (float *)MEM_mallocN(sizeof(float) * n, __func__);
float fac = (rad > 0.0f ? 1.0f/rad : 0.0f);
float fac = (rad > 0.0f ? 1.0f / rad : 0.0f);
for (i = -size; i <= size; i++) {
val = 1.0f - fabsf((float)i * fac);

View File

@ -86,8 +86,8 @@ void GaussianBokehBlurOperation::updateGauss()
ddgauss = (float *)MEM_mallocN(sizeof(float) * n, __func__);
dgauss = ddgauss;
float sum = 0.0f;
float facx = (radxf > 0.0f ? 1.0f/radxf : 0.0f);
float facy = (radyf > 0.0f ? 1.0f/radyf : 0.0f);
float facx = (radxf > 0.0f ? 1.0f / radxf : 0.0f);
float facy = (radyf > 0.0f ? 1.0f / radyf : 0.0f);
for (j = -this->m_rady; j <= this->m_rady; j++) {
for (i = -this->m_radx; i <= this->m_radx; i++, dgauss++) {
float fj = (float)j * facy;

View File

@ -3523,7 +3523,7 @@ static int ui_do_but_NUM(bContext *C, uiBlock *block, uiBut *but, uiHandleButton
softmin = but->softmin;
softmax = but->softmax;
handlewidth = min_ff(BLI_rctf_size_x(&but->rect)/3, BLI_rctf_size_y(&but->rect));
handlewidth = min_ff(BLI_rctf_size_x(&but->rect) / 3, BLI_rctf_size_y(&but->rect));
if (!ui_is_but_float(but)) {
if (mx < (but->rect.xmin + handlewidth)) {

View File

@ -218,7 +218,7 @@ static int gpu_group_execute(GPUMaterial *mat, bNode *node, bNodeExecData *execd
#if 0 /* XXX NODE_GROUP_EDIT is deprecated, depends on node space */
ntreeExecGPUNodes(exec, mat, (node->flag & NODE_GROUP_EDIT));
#else
ntreeExecGPUNodes(exec, mat, 0, NODE_NEW_SHADING|NODE_OLD_SHADING);
ntreeExecGPUNodes(exec, mat, 0, NODE_NEW_SHADING | NODE_OLD_SHADING);
#endif
group_gpu_move_outputs(node, out, exec->stack);