style cleanup

This commit is contained in:
Campbell Barton 2012-12-20 00:29:31 +00:00
parent 54729df020
commit 3bc3e178b3
10 changed files with 28 additions and 26 deletions

View File

@ -2,7 +2,7 @@ bl_info = {
"name": "New Object",
"author": "Your Name Here",
"version": (1, 0),
"blender": (2, 5, 5),
"blender": (2, 65, 0),
"location": "View3D > Add > Mesh > New Object",
"description": "Adds a new Mesh Object",
"warning": "",

View File

@ -188,7 +188,7 @@ bGPDlayer *gpencil_layer_addnew(bGPdata *gpd, const char *name, int setactive)
/* make this one the active one */
if (setactive)
gpencil_layer_setactive(gpd, gpl);
gpencil_layer_setactive(gpd, gpl);
/* return layer */
return gpl;

View File

@ -1957,7 +1957,7 @@ static int sb_detect_vertex_collisionCached(float opco[3], float facenormal[3],
}
closest_to_line_segment_v3(ve, opco, nv2, nv3);
sub_v3_v3v3(ve, opco, ve);
sub_v3_v3v3(ve, opco, ve);
dist = normalize_v3(ve);
if ((dist < outerfacethickness)&&(dist < mindistedge )) {
copy_v3_v3(coledge, ve);
@ -1966,7 +1966,7 @@ static int sb_detect_vertex_collisionCached(float opco[3], float facenormal[3],
}
closest_to_line_segment_v3(ve, opco, nv3, nv1);
sub_v3_v3v3(ve, opco, ve);
sub_v3_v3v3(ve, opco, ve);
dist = normalize_v3(ve);
if ((dist < outerfacethickness)&&(dist < mindistedge )) {
copy_v3_v3(coledge, ve);

View File

@ -1066,7 +1066,7 @@ static void ui_handle_panel_header(const bContext *C, uiBlock *block, int mx, in
ED_region_tag_redraw(ar);
}
else { /* collapse */
if(ctrl)
if (ctrl)
panels_collapse_all(sa, ar, block->panel);
if (block->panel->flag & PNL_CLOSED) {

View File

@ -1041,8 +1041,8 @@ static int flyApply_ndof(bContext *C, FlyInfo *fly)
const int flag = U.ndof_flag;
#if 0
int shouldRotate = (flag & NDOF_SHOULD_ROTATE) && (fly->pan_view == FALSE),
shouldTranslate = (flag & (NDOF_SHOULD_PAN | NDOF_SHOULD_ZOOM));
int shouldRotate = (flag & NDOF_SHOULD_ROTATE) && (fly->pan_view == FALSE);
int shouldTranslate = (flag & (NDOF_SHOULD_PAN | NDOF_SHOULD_ZOOM));
#endif
int shouldRotate = (fly->pan_view == FALSE);

View File

@ -2444,7 +2444,7 @@ static void rna_def_scene_game_data(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}
};
static EnumPropertyItem storage_items[] ={
static EnumPropertyItem storage_items[] = {
{RAS_STORE_AUTO, "AUTO", 0, "Auto Select", "Chooses the best supported mode"},
{RAS_STORE_IMMEDIATE, "IMMEDIATE", 0, "Immediate Mode", "Slowest performance, requires OpenGL (any version)"},
{RAS_STORE_VA, "VERTEX_ARRAY", 0, "Vertex Arrays", "Better performance, requires at least OpenGL 1.1"},
@ -2487,7 +2487,7 @@ static void rna_def_scene_game_data(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Exit Key", "The key that exits the Game Engine");
RNA_def_property_update(prop, NC_SCENE, NULL);
prop= RNA_def_property(srna, "raster_storage", PROP_ENUM, PROP_NONE);
prop = RNA_def_property(srna, "raster_storage", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "raster_storage");
RNA_def_property_enum_items(prop, storage_items);
RNA_def_property_ui_text(prop, "Storage", "Sets the storage mode used by the rasterizer");

View File

@ -2864,7 +2864,7 @@ static void init_render_curve(Render *re, ObjectRen *obr, int timeoffset)
}
else {
if (need_orco) {
orco= get_object_orco(re, ob);
orco = get_object_orco(re, ob);
}
while (dl) {

View File

@ -144,9 +144,11 @@ struct wmEventHandler *WM_event_add_keymap_handler_priority(ListBase *handlers,
void WM_event_remove_keymap_handler(ListBase *handlers, wmKeyMap *keymap);
struct wmEventHandler *WM_event_add_ui_handler(const struct bContext *C, ListBase *handlers,
int (*func)(struct bContext *C, struct wmEvent *event, void *userdata),
void (*remove)(struct bContext *C, void *userdata), void *userdata);
struct wmEventHandler *WM_event_add_ui_handler(
const struct bContext *C, ListBase *handlers,
int (*func)(struct bContext *C, struct wmEvent *event, void *userdata),
void (*remove)(struct bContext *C, void *userdata), void *userdata);
void WM_event_remove_ui_handler(ListBase *handlers,
int (*func)(struct bContext *C, struct wmEvent *event, void *userdata),
void (*remove)(struct bContext *C, void *userdata),

View File

@ -1004,7 +1004,7 @@ int main(int argc, char** argv)
// Enter main loop
bool run = true;
char *python_main = NULL;
char *python_main = NULL;
pynextframestate.state = NULL;
pynextframestate.func = NULL;
#ifdef WITH_PYTHON
@ -1015,24 +1015,24 @@ int main(int argc, char** argv)
char *python_code = KX_GetPythonCode(maggie, python_main);
if (python_code)
{
#ifdef WITH_PYTHON
#ifdef WITH_PYTHON
gpg_nextframestate.system = system;
gpg_nextframestate.app = &app;
gpg_nextframestate.gs = &gs;
pynextframestate.state = &gpg_nextframestate;
pynextframestate.func = &GPG_PyNextFrame;
printf("Yielding control to Python script '%s'...\n", python_main);
PyRun_SimpleString(python_code);
printf("Exit Python script '%s'\n", python_main);
printf("Yielding control to Python script '%s'...\n", python_main);
PyRun_SimpleString(python_code);
printf("Exit Python script '%s'\n", python_main);
#endif // WITH_PYTHON
MEM_freeN(python_code);
}
else {
fprintf(stderr, "ERROR: cannot yield control to Python: no Python text data block named '%s'\n", python_main);
}
}
else
MEM_freeN(python_code);
}
else {
fprintf(stderr, "ERROR: cannot yield control to Python: no Python text data block named '%s'\n", python_main);
}
}
else
{
while (run)
{

View File

@ -202,7 +202,7 @@ void VBO::Draw(int texco_num, RAS_IRasterizer::TexCoGen* texco, int attrib_num,
glBindBufferARB(GL_ARRAY_BUFFER_ARB, 0);
glBindBufferARB(GL_ELEMENT_ARRAY_BUFFER_ARB, 0);
}
}
RAS_StorageVBO::RAS_StorageVBO(int *texco_num, RAS_IRasterizer::TexCoGen *texco, int *attrib_num, RAS_IRasterizer::TexCoGen *attrib):
m_texco_num(texco_num),