forked from bartvdbraak/blender
style cleanup
This commit is contained in:
parent
0a361247ff
commit
a6b505ef0b
@ -47,7 +47,7 @@ static void mem_error_cb(const char *errorStr)
|
||||
fflush(stderr);
|
||||
}
|
||||
|
||||
int main (int argc, char *argv[])
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
int verbose = 0;
|
||||
int error_status = 0;
|
||||
|
@ -65,7 +65,7 @@ const char PAINT_CURSOR_TEXTURE_PAINT[3] = {255, 255, 255};
|
||||
|
||||
static OverlayControlFlags overlay_flags = 0;
|
||||
|
||||
void BKE_paint_invalidate_overlay_tex (Scene *scene, const Tex *tex)
|
||||
void BKE_paint_invalidate_overlay_tex(Scene *scene, const Tex *tex)
|
||||
{
|
||||
Paint *p = BKE_paint_get_active(scene);
|
||||
Brush *br = p->brush;
|
||||
@ -79,7 +79,7 @@ void BKE_paint_invalidate_overlay_tex (Scene *scene, const Tex *tex)
|
||||
overlay_flags |= PAINT_INVALID_OVERLAY_TEXTURE_SECONDARY;
|
||||
}
|
||||
|
||||
void BKE_paint_invalidate_cursor_overlay (Scene *scene, CurveMapping *curve)
|
||||
void BKE_paint_invalidate_cursor_overlay(Scene *scene, CurveMapping *curve)
|
||||
{
|
||||
Paint *p = BKE_paint_get_active(scene);
|
||||
Brush *br = p->brush;
|
||||
|
@ -133,7 +133,7 @@ void mid_v3_v3v3v3(float v[3], const float v1[3], const float v2[3], const float
|
||||
* Specialized function for calculating normals.
|
||||
* fastpath for:
|
||||
*
|
||||
* \code{.c}
|
||||
* \code{.c}
|
||||
* add_v3_v3v3(r, a, b);
|
||||
* normalize_v3(r)
|
||||
* mul_v3_fl(r, angle_normalized_v3v3(a, b) / M_PI_2);
|
||||
|
@ -9350,10 +9350,10 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
|
||||
}
|
||||
|
||||
/* TIP: to initialize new variables added, use the new function
|
||||
DNA_struct_elem_find(fd->filesdna, "structname", "typename", "varname")
|
||||
example:
|
||||
if (!DNA_struct_elem_find(fd->filesdna, "UserDef", "short", "image_gpubuffer_limit"))
|
||||
user->image_gpubuffer_limit = 10;
|
||||
* DNA_struct_elem_find(fd->filesdna, "structname", "typename", "varname")
|
||||
* example:
|
||||
* if (!DNA_struct_elem_find(fd->filesdna, "UserDef", "short", "image_gpubuffer_limit"))
|
||||
* user->image_gpubuffer_limit = 10;
|
||||
*/
|
||||
|
||||
}
|
||||
|
@ -1546,7 +1546,7 @@ static size_t animdata_filter_ds_nodetree(bAnimContext *ac, ListBase *anim_data,
|
||||
return items;
|
||||
}
|
||||
|
||||
static size_t animdata_filter_ds_linestyle (bAnimContext *ac, ListBase *anim_data, bDopeSheet *ads, Scene *sce, int filter_mode)
|
||||
static size_t animdata_filter_ds_linestyle(bAnimContext *ac, ListBase *anim_data, bDopeSheet *ads, Scene *sce, int filter_mode)
|
||||
{
|
||||
SceneRenderLayer *srl;
|
||||
size_t items = 0;
|
||||
|
@ -1739,7 +1739,7 @@ static void single_obdata_users(Main *bmain, Scene *scene, int flag)
|
||||
case OB_MESH:
|
||||
ob->data = me = BKE_mesh_copy(ob->data);
|
||||
if (me->key)
|
||||
BKE_copy_animdata_id_action((ID*)me->key);
|
||||
BKE_copy_animdata_id_action((ID *)me->key);
|
||||
break;
|
||||
case OB_MBALL:
|
||||
ob->data = BKE_mball_copy(ob->data);
|
||||
@ -1751,12 +1751,12 @@ static void single_obdata_users(Main *bmain, Scene *scene, int flag)
|
||||
ID_NEW(cu->bevobj);
|
||||
ID_NEW(cu->taperobj);
|
||||
if (cu->key)
|
||||
BKE_copy_animdata_id_action((ID*)cu->key);
|
||||
BKE_copy_animdata_id_action((ID *)cu->key);
|
||||
break;
|
||||
case OB_LATTICE:
|
||||
ob->data = lat = BKE_lattice_copy(ob->data);
|
||||
if (lat->key)
|
||||
BKE_copy_animdata_id_action((ID*)lat->key);
|
||||
BKE_copy_animdata_id_action((ID *)lat->key);
|
||||
break;
|
||||
case OB_ARMATURE:
|
||||
DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
|
||||
@ -1777,7 +1777,7 @@ static void single_obdata_users(Main *bmain, Scene *scene, int flag)
|
||||
* AnimData structure, which is not what we want.
|
||||
* (sergey)
|
||||
*/
|
||||
BKE_copy_animdata_id_action((ID*)ob->data);
|
||||
BKE_copy_animdata_id_action((ID *)ob->data);
|
||||
|
||||
id->us--;
|
||||
id->newid = ob->data;
|
||||
|
@ -583,12 +583,13 @@ static void paint_stroke_done(const bContext *C, struct PaintStroke *stroke)
|
||||
|
||||
undo_paint_push_end(UNDO_PAINT_IMAGE);
|
||||
|
||||
/* duplicate warning, see texpaint_init
|
||||
/* duplicate warning, see texpaint_init */
|
||||
#if 0
|
||||
if (pop->s.warnmultifile)
|
||||
BKE_reportf(op->reports, RPT_WARNING, "Image requires 4 color channels to paint: %s", pop->s.warnmultifile);
|
||||
if (pop->s.warnpackedfile)
|
||||
BKE_reportf(op->reports, RPT_WARNING, "Packed MultiLayer files cannot be painted: %s", pop->s.warnpackedfile);
|
||||
*/
|
||||
#endif
|
||||
MEM_freeN(pop);
|
||||
|
||||
{
|
||||
|
@ -2722,7 +2722,7 @@ static void draw_em_measure_stats(ARegion *ar, View3D *v3d, Object *ob, BMEditMe
|
||||
|
||||
if (unit->system) {
|
||||
bUnit_AsString(numstr, sizeof(numstr), len_v3v3(v1, v2) * unit->scale_length, 3,
|
||||
unit->system, B_UNIT_LENGTH, do_split, false);
|
||||
unit->system, B_UNIT_LENGTH, do_split, false);
|
||||
}
|
||||
else {
|
||||
BLI_snprintf(numstr, sizeof(numstr), conv_float, len_v3v3(v1, v2));
|
||||
|
@ -883,10 +883,10 @@ static void draw_selected_name(Scene *scene, Object *ob, rcti *rect)
|
||||
short offset = 1.5f * UI_UNIT_X + rect->xmin;
|
||||
|
||||
/*
|
||||
* breadcrumbs can contain 3 object names (MAX_NAME)
|
||||
* and 2 BREAD_CRUMB_SEPARATORs (6)
|
||||
* and a SHAPE_KEY_PINNED marker and a trailing '\0' (9+1)
|
||||
*/
|
||||
* breadcrumbs can contain 3 object names (MAX_NAME)
|
||||
* and 2 BREAD_CRUMB_SEPARATORs (6)
|
||||
* and a SHAPE_KEY_PINNED marker and a trailing '\0' (9+1)
|
||||
*/
|
||||
char bread_crumbs[3 * MAX_NAME + 6 + 10];
|
||||
bread_crumbs[0] = '\0';
|
||||
|
||||
|
@ -1564,7 +1564,7 @@ static void stitch_draw(const bContext *UNUSED(C), ARegion *UNUSED(ar), void *ar
|
||||
glPointSize(1.0);
|
||||
}
|
||||
|
||||
static UvEdge *uv_edge_get (BMLoop *l, StitchState *state)
|
||||
static UvEdge *uv_edge_get(BMLoop *l, StitchState *state)
|
||||
{
|
||||
UvEdge tmp_edge;
|
||||
|
||||
|
@ -1276,7 +1276,7 @@ struct GPU_Buffers {
|
||||
unsigned int tot_tri, tot_quad;
|
||||
|
||||
/* The PBVH ensures that either all faces in the node are
|
||||
smooth-shaded or all faces are flat-shaded */
|
||||
* smooth-shaded or all faces are flat-shaded */
|
||||
int smooth;
|
||||
|
||||
int show_diffuse_color;
|
||||
@ -1392,8 +1392,8 @@ void GPU_update_mesh_buffers(GPU_Buffers *buffers, MVert *mvert,
|
||||
|
||||
if (vert_data) {
|
||||
/* Vertex data is shared if smooth-shaded, but separate
|
||||
copies are made for flat shading because normals
|
||||
shouldn't be shared. */
|
||||
* copies are made for flat shading because normals
|
||||
* shouldn't be shared. */
|
||||
if (buffers->smooth) {
|
||||
for (i = 0; i < totvert; ++i) {
|
||||
MVert *v = mvert + vert_indices[i];
|
||||
@ -1518,8 +1518,8 @@ GPU_Buffers *GPU_build_mesh_buffers(int (*face_vert_indices)[4],
|
||||
}
|
||||
|
||||
/* An element index buffer is used for smooth shading, but flat
|
||||
shading requires separate vertex normals so an index buffer is
|
||||
can't be used there. */
|
||||
* shading requires separate vertex normals so an index buffer is
|
||||
* can't be used there. */
|
||||
if (gpu_vbo_enabled() && buffers->smooth)
|
||||
glGenBuffersARB(1, &buffers->index_buf);
|
||||
|
||||
@ -1941,7 +1941,7 @@ static int gpu_bmesh_face_visible_count(GHash *bm_faces)
|
||||
}
|
||||
|
||||
/* Creates a vertex buffer (coordinate, normal, color) and, if smooth
|
||||
shading, an element index buffer. */
|
||||
* shading, an element index buffer. */
|
||||
void GPU_update_bmesh_buffers(GPU_Buffers *buffers,
|
||||
BMesh *bm,
|
||||
GHash *bm_faces,
|
||||
@ -1982,7 +1982,7 @@ void GPU_update_bmesh_buffers(GPU_Buffers *buffers,
|
||||
|
||||
if (buffers->smooth) {
|
||||
/* Vertices get an index assigned for use in the triangle
|
||||
index buffer */
|
||||
* index buffer */
|
||||
bm->elem_index_dirty |= BM_VERT;
|
||||
|
||||
GHASH_ITER (gh_iter, bm_unique_verts) {
|
||||
|
@ -521,8 +521,8 @@ void RNA_identifier_sanitize(char *identifier, int property)
|
||||
for (a = 0; kwlist_prop[a]; a++) {
|
||||
if (strcmp(identifier, kwlist_prop[a]) == 0) {
|
||||
/* this keyword is reserved by python.
|
||||
* just replace the last character by '_' to keep it readable.
|
||||
*/
|
||||
* just replace the last character by '_' to keep it readable.
|
||||
*/
|
||||
identifier[strlen(identifier) - 1] = '_';
|
||||
break;
|
||||
}
|
||||
|
@ -720,7 +720,7 @@ static int ghost_event_proc(GHOST_EventHandle evt, GHOST_TUserDataPtr C_void_ptr
|
||||
wmWindow *win;
|
||||
|
||||
/* Ghost now can call this function for life resizes, but it should return if WM didn't initialize yet.
|
||||
Can happen on file read (especially full size window) */
|
||||
* Can happen on file read (especially full size window) */
|
||||
if ((wm->initialized & WM_INIT_WINDOW) == 0) {
|
||||
return 1;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user