style cleanup: pep8, indentation
This commit is contained in:
@@ -131,7 +131,7 @@ def handle_args():
|
||||
dest="sphinx_theme",
|
||||
type=str,
|
||||
default='default',
|
||||
help=
|
||||
help =
|
||||
# see SPHINX_THEMES below
|
||||
"Sphinx theme (default='default')\n"
|
||||
"Available themes\n"
|
||||
@@ -448,6 +448,7 @@ else:
|
||||
def is_struct_seq(value):
|
||||
return isinstance(value, tuple) and type(tuple) != tuple and hasattr(value, "n_fields")
|
||||
|
||||
|
||||
def undocumented_message(module_name, type_name, identifier):
|
||||
if str(type_name).startswith('<module'):
|
||||
preloadtitle = '%s.%s' % (module_name, identifier)
|
||||
@@ -692,6 +693,7 @@ def pymodule2sphinx(basepath, module_name, module, title):
|
||||
# TODO - currently only used for classes
|
||||
# grouping support
|
||||
module_grouping = MODULE_GROUPING.get(module_name)
|
||||
|
||||
def module_grouping_index(name):
|
||||
if module_grouping is not None:
|
||||
try:
|
||||
@@ -711,7 +713,6 @@ def pymodule2sphinx(basepath, module_name, module, title):
|
||||
return module_grouping_index(name)
|
||||
# done grouping support
|
||||
|
||||
|
||||
file = open(filepath, "w", encoding="utf-8")
|
||||
|
||||
fw = file.write
|
||||
|
@@ -22,6 +22,7 @@ import bpy
|
||||
from bpy.types import Menu, Operator
|
||||
from bpy.props import StringProperty, BoolProperty
|
||||
|
||||
|
||||
class AddPresetBase():
|
||||
'''Base preset class, only for subclassing
|
||||
subclasses must define
|
||||
|
@@ -1088,6 +1088,7 @@ class VIEW3D_MT_brush(Menu):
|
||||
layout.prop(brush, "use_persistent")
|
||||
layout.operator("sculpt.set_persistent_base")
|
||||
|
||||
|
||||
class VIEW3D_MT_brush_paint_modes(Menu):
|
||||
bl_label = "Enabled Modes"
|
||||
|
||||
|
@@ -538,8 +538,7 @@ typedef struct FT_Outline_
|
||||
short* contours; /* the contour end points */
|
||||
|
||||
int flags; /* outline masks */
|
||||
|
||||
} FT_Outline;
|
||||
} FT_Outline;
|
||||
|
||||
#endif
|
||||
|
||||
|
@@ -288,7 +288,7 @@ void BM_edge_select_set(BMesh *bm, BMEdge *e, int select)
|
||||
if (BM_elem_flag_test(e, BM_ELEM_SELECT)) bm->totedgesel -= 1;
|
||||
BM_elem_flag_disable(e, BM_ELEM_SELECT);
|
||||
|
||||
if ( bm->selectmode == SCE_SELECT_EDGE ||
|
||||
if (bm->selectmode == SCE_SELECT_EDGE ||
|
||||
bm->selectmode == SCE_SELECT_FACE ||
|
||||
bm->selectmode == (SCE_SELECT_EDGE | SCE_SELECT_FACE))
|
||||
{
|
||||
|
@@ -73,15 +73,15 @@ static GPUBufferState GLStates = 0;
|
||||
static GPUAttrib attribData[MAX_GPU_ATTRIB_DATA] = { { -1, 0, 0 } };
|
||||
|
||||
/* stores recently-deleted buffers so that new buffers won't have to
|
||||
be recreated as often
|
||||
|
||||
only one instance of this pool is created, stored in
|
||||
gpu_buffer_pool
|
||||
|
||||
note that the number of buffers in the pool is usually limited to
|
||||
MAX_FREE_GPU_BUFFERS, but this limit may be exceeded temporarily
|
||||
when a GPUBuffer is released outside the main thread; due to OpenGL
|
||||
restrictions it cannot be immediately released
|
||||
* be recreated as often
|
||||
*
|
||||
* only one instance of this pool is created, stored in
|
||||
* gpu_buffer_pool
|
||||
*
|
||||
* note that the number of buffers in the pool is usually limited to
|
||||
* MAX_FREE_GPU_BUFFERS, but this limit may be exceeded temporarily
|
||||
* when a GPUBuffer is released outside the main thread; due to OpenGL
|
||||
* restrictions it cannot be immediately released
|
||||
*/
|
||||
typedef struct GPUBufferPool {
|
||||
/* number of allocated buffers stored */
|
||||
@@ -160,7 +160,7 @@ static void gpu_buffer_pool_free(GPUBufferPool *pool)
|
||||
if (!pool)
|
||||
return;
|
||||
|
||||
while(pool->totbuf)
|
||||
while (pool->totbuf)
|
||||
gpu_buffer_pool_delete_last(pool);
|
||||
|
||||
MEM_freeN(pool->buffers);
|
||||
@@ -248,7 +248,7 @@ GPUBuffer *GPU_buffer_alloc(int size)
|
||||
out-of-memory errors? looks a bit iffy to me
|
||||
though, at least on Linux I expect malloc() would
|
||||
just overcommit. --nicholas */
|
||||
while(!buf->pointer && pool->totbuf > 0) {
|
||||
while (!buf->pointer && pool->totbuf > 0) {
|
||||
gpu_buffer_pool_delete_last(pool);
|
||||
buf->pointer = MEM_mallocN(size, "GPUBuffer.pointer");
|
||||
}
|
||||
@@ -279,7 +279,7 @@ void GPU_buffer_free(GPUBuffer *buffer)
|
||||
if (BLI_thread_is_main()) {
|
||||
/* in main thread, safe to decrease size of pool back
|
||||
down to MAX_FREE_GPU_BUFFERS */
|
||||
while(pool->totbuf >= MAX_FREE_GPU_BUFFERS)
|
||||
while (pool->totbuf >= MAX_FREE_GPU_BUFFERS)
|
||||
gpu_buffer_pool_delete_last(pool);
|
||||
}
|
||||
else {
|
||||
@@ -507,7 +507,7 @@ static GPUBuffer *gpu_buffer_setup(DerivedMesh *dm, GPUDrawObject *object,
|
||||
if (useVBOs) {
|
||||
success = 0;
|
||||
|
||||
while(!success) {
|
||||
while (!success) {
|
||||
/* bind the buffer and discard previous data,
|
||||
avoids stalling gpu */
|
||||
glBindBufferARB(target, buffer->id);
|
||||
@@ -543,7 +543,7 @@ static GPUBuffer *gpu_buffer_setup(DerivedMesh *dm, GPUDrawObject *object,
|
||||
if (dm->drawObject->legacy == 0) {
|
||||
uploaded = GL_FALSE;
|
||||
/* attempt to upload the data to the VBO */
|
||||
while(uploaded == GL_FALSE) {
|
||||
while (uploaded == GL_FALSE) {
|
||||
(*copy_f)(dm, varray, cur_index_per_mat, mat_orig_to_new, user);
|
||||
/* glUnmapBuffer returns GL_FALSE if
|
||||
* the data store is corrupted; retry
|
||||
@@ -1161,8 +1161,8 @@ void GPU_buffer_unbind(void)
|
||||
}
|
||||
|
||||
/* confusion: code in cdderivedmesh calls both GPU_color_setup and
|
||||
GPU_color3_upload; both of these set the `colors' buffer, so seems
|
||||
like it will just needlessly overwrite? --nicholas */
|
||||
* GPU_color3_upload; both of these set the `colors' buffer, so seems
|
||||
* like it will just needlessly overwrite? --nicholas */
|
||||
void GPU_color3_upload(DerivedMesh *dm, unsigned char *data)
|
||||
{
|
||||
if (dm->drawObject == 0)
|
||||
|
@@ -245,9 +245,6 @@ CExpression* COperator2Expr::CheckLink(std::vector<CBrokenLinkInfo*>& brokenlink
|
||||
|
||||
*/
|
||||
return Release();
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@@ -62,7 +62,7 @@ void SCA_IInputDevice::ClearStatusTable(int tableid)
|
||||
|
||||
const SCA_InputEvent& SCA_IInputDevice::GetEventValue(SCA_IInputDevice::KX_EnumInputs inputcode)
|
||||
{
|
||||
// cerr << "SCA_IInputDevice::GetEventValue" << endl;
|
||||
// cerr << "SCA_IInputDevice::GetEventValue" << endl;
|
||||
return m_eventStatusTables[m_currentTable][inputcode];
|
||||
}
|
||||
|
||||
|
@@ -64,7 +64,7 @@ SCA_IInputDevice* SCA_KeyboardManager::GetInputDevice()
|
||||
void SCA_KeyboardManager::NextFrame()
|
||||
{
|
||||
//const SCA_InputEvent& event = GetEventValue(SCA_IInputDevice::KX_EnumInputs inputcode)=0;
|
||||
// cerr << "SCA_KeyboardManager::NextFrame"<< endl;
|
||||
// cerr << "SCA_KeyboardManager::NextFrame"<< endl;
|
||||
SG_DList::iterator<SCA_ISensor> it(m_sensors);
|
||||
for (it.begin();!it.end();++it)
|
||||
{
|
||||
|
Reference in New Issue
Block a user