Cleanup: style

This commit is contained in:
2018-07-19 16:06:37 +10:00
parent 34a45c54e0
commit 9df1e54079
31 changed files with 136 additions and 126 deletions

View File

@@ -170,7 +170,7 @@ def draw(layout, context, context_member, property_type, use_edit=True):
else:
row = box.row(align=True)
row.alignment = "RIGHT"
row.alignment = 'RIGHT'
row.label(text=key, translate=False)

View File

@@ -2440,9 +2440,9 @@ class WM_OT_studiolight_install(Operator):
)
orientation: EnumProperty(
items=(
("MATCAP", "MatCap", ""),
("WORLD", "World", ""),
("CAMERA", "Camera", ""),
('MATCAP', "MatCap", ""),
('WORLD', "World", ""),
('CAMERA', "Camera", ""),
)
)

View File

@@ -132,7 +132,7 @@ def point_cache_ui(self, context, cache, enabled, cachetype):
cache_info = cache.info
if cache_info:
col = layout.column()
col.alignment = "RIGHT"
col.alignment = 'RIGHT'
col.label(text=cache_info)
else:
if cachetype in {'SMOKE', 'DYNAMIC_PAINT'}:
@@ -156,7 +156,7 @@ def point_cache_ui(self, context, cache, enabled, cachetype):
cache_info = cache.info
if cachetype != 'SMOKE' and cache_info: # avoid empty space.
col = layout.column(align=True)
col.alignment = "RIGHT"
col.alignment = 'RIGHT'
col.label(text=cache_info)
can_bake = True
@@ -186,7 +186,7 @@ def point_cache_ui(self, context, cache, enabled, cachetype):
can_bake = False
col = layout.column(align=True)
col.alignment = "RIGHT"
col.alignment = 'RIGHT'
col.separator()

View File

@@ -215,7 +215,7 @@ class SCENE_PT_keyframing_settings(SceneButtonsPanel, SceneKeyingSetsPanel, Pane
flow = layout.grid_flow(row_major=True, columns=0, even_columns=False, even_rows=False, align=True)
col = flow.column(align=True)
col.alignment = "RIGHT"
col.alignment = 'RIGHT'
col.label(text="General Override")
self.draw_keyframing_settings(context, col, ks, None)
@@ -225,7 +225,7 @@ class SCENE_PT_keyframing_settings(SceneButtonsPanel, SceneKeyingSetsPanel, Pane
col.separator()
col = flow.column(align=True)
col.alignment = "RIGHT"
col.alignment = 'RIGHT'
col.label(text="Active Set Override")
self.draw_keyframing_settings(context, col, ks, ksp)
@@ -272,7 +272,7 @@ class SCENE_PT_keying_set_paths(SceneButtonsPanel, SceneKeyingSetsPanel, Panel):
ksp = ks.paths.active
if ksp:
col = flow.column(align=True)
col.alignment = "RIGHT"
col.alignment = 'RIGHT'
col.template_any_ID(ksp, "id", "id_type", text="Target ID-Block")

View File

@@ -23,8 +23,8 @@
* ***** END GPL LICENSE BLOCK *****
*/
#ifndef __BKE_SUBDIV_CONVERTER_H__
#define __BKE_SUBDIV_CONVERTER_H__
#ifndef __SUBDIV_CONVERTER_H__
#define __SUBDIV_CONVERTER_H__
#include "BKE_subdiv.h"
@@ -54,4 +54,4 @@ void BKE_subdiv_converter_free(struct OpenSubdiv_Converter *converter);
int BKE_subdiv_converter_fvar_linear_from_settings(
const SubdivSettings *settings);
#endif /* __BKE_SUBDIV_CONVERTER_H__ */
#endif /* __SUBDIV_CONVERTER_H__ */

View File

@@ -234,7 +234,8 @@ static void vertex_interpolation_from_ptex(
{
if (coarse_poly->totloop == 4) {
/* Nothing to do, all indices and data is already assigned. */
} else {
}
else {
const CustomData *vertex_data = &ctx->coarse_mesh->vdata;
const Mesh *coarse_mesh = ctx->coarse_mesh;
const MLoop *coarse_mloop = coarse_mesh->mloop;
@@ -363,7 +364,8 @@ static void loop_interpolation_from_ptex(
{
if (coarse_poly->totloop == 4) {
/* Nothing to do, all indices and data is already assigned. */
} else {
}
else {
const CustomData *loop_data = &ctx->coarse_mesh->ldata;
const Mesh *coarse_mesh = ctx->coarse_mesh;
const MLoop *coarse_mloop = coarse_mesh->mloop;
@@ -481,7 +483,8 @@ static void subdiv_evaluate_vertices(SubdivMeshContext *ctx,
vertex_interpolation_end(&vertex_interpolation);
}
static void subdiv_copy_edge_data(SubdivMeshContext *ctx,
static void subdiv_copy_edge_data(
SubdivMeshContext *ctx,
MEdge *subdiv_edge,
const MEdge *coarse_edge)
{
@@ -586,7 +589,8 @@ static void subdiv_create_edges(SubdivMeshContext *ctx, int poly_index)
EdgesOfPtex edges_of_ptex;
edges_of_ptex_get(ctx, &edges_of_ptex, coarse_poly, i);
/* Create bottom row of edges (0-1, 1-2). */
subdiv_edge = subdiv_create_edges_row(ctx,
subdiv_edge = subdiv_create_edges_row(
ctx,
subdiv_edge,
edges_of_ptex.first_edge,
start_ptex_face_vertex_index,

View File

@@ -135,7 +135,7 @@ uint32_t BLI_hash_mm3(const unsigned char *in, size_t len, uint32_t seed)
k1 = ROTL32(k1, 15);
k1 *= c2;
h1 ^= k1;
};
}
/* finalization */

View File

@@ -37,24 +37,29 @@
namespace DEG {
BuilderMap::BuilderMap() {
BuilderMap::BuilderMap()
{
set = BLI_gset_ptr_new("deg builder gset");
}
BuilderMap::~BuilderMap() {
BuilderMap::~BuilderMap()
{
BLI_gset_free(set, NULL);
}
bool BuilderMap::checkIsBuilt(ID *id) {
bool BuilderMap::checkIsBuilt(ID *id)
{
return BLI_gset_haskey(set, id);
}
void BuilderMap::tagBuild(ID *id) {
void BuilderMap::tagBuild(ID *id)
{
BLI_gset_insert(set, id);
}
bool BuilderMap::checkIsBuiltAndTag(ID *id) {
bool BuilderMap::checkIsBuiltAndTag(ID *id)
{
void **key_p;
if (!BLI_gset_ensure_p_ex(set, id, &key_p)) {
*key_p = id;

View File

@@ -19,7 +19,7 @@
*
*/
/** \file workbench_volumed.c
/** \file workbench_volume.c
* \ingroup draw_engine
*/

View File

@@ -35,9 +35,11 @@
#include "GPU_vertex_format.h"
#include "GPU_shader_interface.h"
void AttribBinding_clear(GPUAttrBinding*);
void AttribBinding_clear(GPUAttrBinding *binding);
void get_attrib_locations(const GPUVertFormat*, GPUAttrBinding*, const GPUShaderInterface*);
unsigned read_attrib_location(const GPUAttrBinding*, unsigned a_idx);
void get_attrib_locations(
const GPUVertFormat *format, GPUAttrBinding *binding, const GPUShaderInterface *shaderface);
unsigned read_attrib_location(
const GPUAttrBinding *binding, unsigned a_idx);
#endif /* __GPU_ATTR_BINDING_PRIVATE_H__ */

View File

@@ -41,10 +41,10 @@ extern "C" {
#include "GPU_context.h"
#include "GPU_shader_interface.h"
void gpu_batch_remove_interface_ref(GPUBatch*, const GPUShaderInterface*);
void gpu_batch_remove_interface_ref(GPUBatch *batch, const GPUShaderInterface *interface);
void gpu_context_add_batch(GPUContext*, GPUBatch*);
void gpu_context_remove_batch(GPUContext*, GPUBatch*);
void gpu_context_add_batch(GPUContext *ctx, GPUBatch *batch);
void gpu_context_remove_batch(GPUContext *ctx, GPUBatch *batch);
#ifdef __cplusplus
}

View File

@@ -18,7 +18,7 @@
* ***** END GPL LICENSE BLOCK *****
*/
/** \file blender/gpu/intern/gpu_imm_util.c
/** \file blender/gpu/intern/gpu_immediate_util.c
* \ingroup gpu
*
* GPU immediate mode drawing utilities

View File

@@ -23,7 +23,7 @@
* ***** END GPL LICENSE BLOCK *****
*/
/** \file blender/gpu/gpu_vertex_array_id.cpp
/** \file blender/gpu/intern/gpu_vertex_array_id.cpp
* \ingroup gpu
*
* Manage GL vertex array IDs in a thread-safe way

View File

@@ -32,8 +32,8 @@
#ifndef __GPU_VERTEX_FORMAT_PRIVATE_H__
#define __GPU_VERTEX_FORMAT_PRIVATE_H__
void VertexFormat_pack(GPUVertFormat*);
void VertexFormat_pack(GPUVertFormat *format);
uint padding(uint offset, uint alignment);
uint vertex_buffer_size(const GPUVertFormat*, uint vertex_len);
uint vertex_buffer_size(const GPUVertFormat *format, uint vertex_len);
#endif /* __GPU_VERTEX_FORMAT_PRIVATE_H__ */

View File

@@ -6976,7 +6976,8 @@ static void def_cmp_cryptomatte(StructRNA *srna)
RNA_def_struct_sdna_from(srna, "NodeCryptomatte", "storage");
prop = RNA_def_property(srna, "matte_id", PROP_STRING, PROP_NONE);
RNA_def_property_string_funcs(prop, "rna_NodeCryptomatte_matte_get", "rna_NodeCryptomatte_matte_length",
RNA_def_property_string_funcs(
prop, "rna_NodeCryptomatte_matte_get", "rna_NodeCryptomatte_matte_length",
"rna_NodeCryptomatte_matte_set");
RNA_def_property_ui_text(prop, "Matte Objects", "List of object and material crypto IDs to include in matte");
RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update");

View File

@@ -40,7 +40,7 @@ static bNodeSocketTemplate sh_node_bsdf_hair_principled_in[] = {
{ SOCK_FLOAT, 1, N_("Radial Roughness"), 0.3f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, PROP_FACTOR},
{ SOCK_FLOAT, 1, N_("Coat"), 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, PROP_FACTOR},
{ SOCK_FLOAT, 1, N_("IOR"), 1.55f, 0.0f, 0.0f, 0.0f, 0.0f, 1000.0f},
{ SOCK_FLOAT, 1, N_("Offset"), 2.f*((float)M_PI)/180.f, 0.0f, 0.0f, 0.0f, -M_PI_2, M_PI_2, PROP_ANGLE},
{ SOCK_FLOAT, 1, N_("Offset"), 2.0f * ((float)M_PI) / 180.f, 0.0f, 0.0f, 0.0f, -M_PI_2, M_PI_2, PROP_ANGLE},
{ SOCK_FLOAT, 1, N_("Random Color"), 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, PROP_FACTOR},
{ SOCK_FLOAT, 1, N_("Random Roughness"), 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, PROP_FACTOR},
{ SOCK_FLOAT, 1, N_("Random"), 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, PROP_NONE, SOCK_HIDE_VALUE},

View File

@@ -32,8 +32,6 @@
#include "BLI_math.h"
#include "GPU_batch.h"
#include "MEM_guardedalloc.h"
#include "../generic/py_capi_utils.h"