forked from bartvdbraak/blender
style cleanup: (indentation)
This commit is contained in:
parent
2cb671591b
commit
1931aac1f7
@ -1697,8 +1697,8 @@ DerivedMesh *getEditDerivedBMesh(BMEditMesh *em,
|
|||||||
|
|
||||||
BM_ITER_MESH_INDEX (eve, &iter, bmdm->tc->bm, BM_VERTS_OF_MESH, i) {
|
BM_ITER_MESH_INDEX (eve, &iter, bmdm->tc->bm, BM_VERTS_OF_MESH, i) {
|
||||||
DM_set_vert_data(&bmdm->dm, i, CD_MVERT_SKIN,
|
DM_set_vert_data(&bmdm->dm, i, CD_MVERT_SKIN,
|
||||||
CustomData_bmesh_get(&bm->vdata, eve->head.data,
|
CustomData_bmesh_get(&bm->vdata, eve->head.data,
|
||||||
CD_MVERT_SKIN));
|
CD_MVERT_SKIN));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2041,8 +2041,8 @@ void BKE_mesh_convert_mfaces_to_mpolys(Mesh *mesh)
|
|||||||
void BKE_mesh_convert_mfaces_to_mpolys_ex(ID *id, CustomData *fdata, CustomData *ldata, CustomData *pdata,
|
void BKE_mesh_convert_mfaces_to_mpolys_ex(ID *id, CustomData *fdata, CustomData *ldata, CustomData *pdata,
|
||||||
int totedge_i, int totface_i, int totloop_i, int totpoly_i,
|
int totedge_i, int totface_i, int totloop_i, int totpoly_i,
|
||||||
MEdge *medge, MFace *mface,
|
MEdge *medge, MFace *mface,
|
||||||
int *totloop_r, int *totpoly_r,
|
int *totloop_r, int *totpoly_r,
|
||||||
MLoop **mloop_r, MPoly **mpoly_r)
|
MLoop **mloop_r, MPoly **mpoly_r)
|
||||||
{
|
{
|
||||||
MFace *mf;
|
MFace *mf;
|
||||||
MLoop *ml, *mloop;
|
MLoop *ml, *mloop;
|
||||||
|
@ -307,15 +307,15 @@ struct SortContext
|
|||||||
static int compareByData(void *ctx, const void * a, const void * b)
|
static int compareByData(void *ctx, const void * a, const void * b)
|
||||||
{
|
{
|
||||||
return (((struct SortContext *)ctx)->recastData[((struct SortContext *)ctx)->trisToFacesMap[*(int*)a]] -
|
return (((struct SortContext *)ctx)->recastData[((struct SortContext *)ctx)->trisToFacesMap[*(int*)a]] -
|
||||||
((struct SortContext *)ctx)->recastData[((struct SortContext *)ctx)->trisToFacesMap[*(int*)b]] );
|
((struct SortContext *)ctx)->recastData[((struct SortContext *)ctx)->trisToFacesMap[*(int*)b]] );
|
||||||
}
|
}
|
||||||
|
|
||||||
int buildNavMeshData(const int nverts, const float* verts,
|
int buildNavMeshData(const int nverts, const float* verts,
|
||||||
const int ntris, const unsigned short *tris,
|
const int ntris, const unsigned short *tris,
|
||||||
const int* recastData, const int* trisToFacesMap,
|
const int* recastData, const int* trisToFacesMap,
|
||||||
int *ndtris_r, unsigned short **dtris_r,
|
int *ndtris_r, unsigned short **dtris_r,
|
||||||
int *npolys_r, unsigned short **dmeshes_r, unsigned short **polys_r,
|
int *npolys_r, unsigned short **dmeshes_r, unsigned short **polys_r,
|
||||||
int *vertsPerPoly_r, int **dtrisToPolysMap_r, int **dtrisToTrisMap_r)
|
int *vertsPerPoly_r, int **dtrisToPolysMap_r, int **dtrisToTrisMap_r)
|
||||||
|
|
||||||
{
|
{
|
||||||
int *trisMapping;
|
int *trisMapping;
|
||||||
|
@ -614,7 +614,7 @@ font driver produces such outlines.
|
|||||||
# \
|
# \
|
||||||
#
|
#
|
||||||
|
|
||||||
Two "on" points
|
Two "on" points
|
||||||
and two "cubic" point
|
and two "cubic" point
|
||||||
between them
|
between them
|
||||||
|
|
||||||
|
@ -3978,7 +3978,7 @@ static void direct_link_latt(FileData *fd, Lattice *lt)
|
|||||||
/* ************ READ OBJECT ***************** */
|
/* ************ READ OBJECT ***************** */
|
||||||
|
|
||||||
static void lib_link_modifiers__linkModifiers(void *userData, Object *ob,
|
static void lib_link_modifiers__linkModifiers(void *userData, Object *ob,
|
||||||
ID **idpoin)
|
ID **idpoin)
|
||||||
{
|
{
|
||||||
FileData *fd = userData;
|
FileData *fd = userData;
|
||||||
|
|
||||||
@ -8441,7 +8441,7 @@ static void expand_armature(FileData *fd, Main *mainvar, bArmature *arm)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void expand_object_expandModifiers(void *userData, Object *UNUSED(ob),
|
static void expand_object_expandModifiers(void *userData, Object *UNUSED(ob),
|
||||||
ID **idpoin)
|
ID **idpoin)
|
||||||
{
|
{
|
||||||
struct { FileData *fd; Main *mainvar; } *data= userData;
|
struct { FileData *fd; Main *mainvar; } *data= userData;
|
||||||
|
|
||||||
|
@ -61,16 +61,16 @@
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
static void mask_flood_fill_set_elem(float *elem,
|
static void mask_flood_fill_set_elem(float *elem,
|
||||||
PaintMaskFloodMode mode,
|
PaintMaskFloodMode mode,
|
||||||
float value)
|
float value)
|
||||||
{
|
{
|
||||||
switch (mode) {
|
switch (mode) {
|
||||||
case PAINT_MASK_FLOOD_VALUE:
|
case PAINT_MASK_FLOOD_VALUE:
|
||||||
(*elem) = value;
|
(*elem) = value;
|
||||||
break;
|
break;
|
||||||
case PAINT_MASK_INVERT:
|
case PAINT_MASK_INVERT:
|
||||||
(*elem) = 1.0f - (*elem);
|
(*elem) = 1.0f - (*elem);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -203,10 +203,10 @@ static int paint_smooth_stroke(PaintStroke *stroke, float output[2],
|
|||||||
|
|
||||||
if ((stroke->brush->flag & BRUSH_SMOOTH_STROKE) &&
|
if ((stroke->brush->flag & BRUSH_SMOOTH_STROKE) &&
|
||||||
!ELEM4(stroke->brush->sculpt_tool,
|
!ELEM4(stroke->brush->sculpt_tool,
|
||||||
SCULPT_TOOL_GRAB,
|
SCULPT_TOOL_GRAB,
|
||||||
SCULPT_TOOL_THUMB,
|
SCULPT_TOOL_THUMB,
|
||||||
SCULPT_TOOL_ROTATE,
|
SCULPT_TOOL_ROTATE,
|
||||||
SCULPT_TOOL_SNAKE_HOOK) &&
|
SCULPT_TOOL_SNAKE_HOOK) &&
|
||||||
!(stroke->brush->flag & BRUSH_ANCHORED) &&
|
!(stroke->brush->flag & BRUSH_ANCHORED) &&
|
||||||
!(stroke->brush->flag & BRUSH_RESTORE_MESH))
|
!(stroke->brush->flag & BRUSH_RESTORE_MESH))
|
||||||
{
|
{
|
||||||
@ -359,12 +359,12 @@ struct wmKeyMap *paint_stroke_modal_keymap(struct wmKeyConfig *keyconf)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void paint_stroke_add_sample(const Paint *paint,
|
static void paint_stroke_add_sample(const Paint *paint,
|
||||||
PaintStroke *stroke,
|
PaintStroke *stroke,
|
||||||
float x, float y)
|
float x, float y)
|
||||||
{
|
{
|
||||||
PaintSample *sample = &stroke->samples[stroke->cur_sample];
|
PaintSample *sample = &stroke->samples[stroke->cur_sample];
|
||||||
int max_samples = MIN2(PAINT_MAX_INPUT_SAMPLES,
|
int max_samples = MIN2(PAINT_MAX_INPUT_SAMPLES,
|
||||||
MAX2(paint->num_input_samples, 1));
|
MAX2(paint->num_input_samples, 1));
|
||||||
|
|
||||||
sample->mouse[0] = x;
|
sample->mouse[0] = x;
|
||||||
sample->mouse[1] = y;
|
sample->mouse[1] = y;
|
||||||
@ -377,7 +377,7 @@ static void paint_stroke_add_sample(const Paint *paint,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void paint_stroke_sample_average(const PaintStroke *stroke,
|
static void paint_stroke_sample_average(const PaintStroke *stroke,
|
||||||
PaintSample *average)
|
PaintSample *average)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
@ -981,8 +981,8 @@ static void calc_area_normal(Sculpt *sd, Object *ob, float an[3], PBVHNode **nod
|
|||||||
|
|
||||||
/* Calculate primary direction of movement for many brushes */
|
/* Calculate primary direction of movement for many brushes */
|
||||||
static void calc_sculpt_normal(Sculpt *sd, Object *ob,
|
static void calc_sculpt_normal(Sculpt *sd, Object *ob,
|
||||||
PBVHNode **nodes, int totnode,
|
PBVHNode **nodes, int totnode,
|
||||||
float an[3])
|
float an[3])
|
||||||
{
|
{
|
||||||
const Brush *brush = paint_brush(&sd->paint);
|
const Brush *brush = paint_brush(&sd->paint);
|
||||||
const SculptSession *ss = ob->sculpt;
|
const SculptSession *ss = ob->sculpt;
|
||||||
@ -990,8 +990,8 @@ static void calc_sculpt_normal(Sculpt *sd, Object *ob,
|
|||||||
switch (brush->sculpt_plane) {
|
switch (brush->sculpt_plane) {
|
||||||
case SCULPT_DISP_DIR_VIEW:
|
case SCULPT_DISP_DIR_VIEW:
|
||||||
ED_view3d_global_to_vector(ss->cache->vc->rv3d,
|
ED_view3d_global_to_vector(ss->cache->vc->rv3d,
|
||||||
ss->cache->vc->rv3d->twmat[3],
|
ss->cache->vc->rv3d->twmat[3],
|
||||||
an);
|
an);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SCULPT_DISP_DIR_X:
|
case SCULPT_DISP_DIR_X:
|
||||||
@ -1021,7 +1021,7 @@ static void calc_sculpt_normal(Sculpt *sd, Object *ob,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void update_sculpt_normal(Sculpt *sd, Object *ob,
|
static void update_sculpt_normal(Sculpt *sd, Object *ob,
|
||||||
PBVHNode **nodes, int totnode)
|
PBVHNode **nodes, int totnode)
|
||||||
{
|
{
|
||||||
const Brush *brush = paint_brush(&sd->paint);
|
const Brush *brush = paint_brush(&sd->paint);
|
||||||
StrokeCache *cache = ob->sculpt->cache;
|
StrokeCache *cache = ob->sculpt->cache;
|
||||||
@ -1056,7 +1056,7 @@ static void calc_local_y(ViewContext *vc, const float center[3], float y[3])
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void calc_brush_local_mat(const Brush *brush, Object *ob,
|
static void calc_brush_local_mat(const Brush *brush, Object *ob,
|
||||||
float local_mat[4][4])
|
float local_mat[4][4])
|
||||||
{
|
{
|
||||||
const StrokeCache *cache = ob->sculpt->cache;
|
const StrokeCache *cache = ob->sculpt->cache;
|
||||||
float tmat[4][4];
|
float tmat[4][4];
|
||||||
@ -1105,10 +1105,10 @@ static void update_brush_local_mat(Sculpt *sd, Object *ob)
|
|||||||
StrokeCache *cache = ob->sculpt->cache;
|
StrokeCache *cache = ob->sculpt->cache;
|
||||||
|
|
||||||
if (cache->mirror_symmetry_pass == 0 &&
|
if (cache->mirror_symmetry_pass == 0 &&
|
||||||
cache->radial_symmetry_pass == 0)
|
cache->radial_symmetry_pass == 0)
|
||||||
{
|
{
|
||||||
calc_brush_local_mat(paint_brush(&sd->paint), ob,
|
calc_brush_local_mat(paint_brush(&sd->paint), ob,
|
||||||
cache->brush_local_mat);
|
cache->brush_local_mat);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -392,7 +392,7 @@ static void clip_listener(ScrArea *sa, wmNotifier *wmn)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case NC_SCREEN:
|
case NC_SCREEN:
|
||||||
if (wmn->data == ND_ANIMPLAY) {
|
if (wmn->data == ND_ANIMPLAY) {
|
||||||
ED_area_tag_redraw(sa);
|
ED_area_tag_redraw(sa);
|
||||||
}
|
}
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -2451,7 +2451,7 @@ static void draw_dm_verts__mapFunc(void *userData, int index, const float co[3],
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void draw_dm_verts(BMEditMesh *em, DerivedMesh *dm, int sel, BMVert *eve_act,
|
static void draw_dm_verts(BMEditMesh *em, DerivedMesh *dm, int sel, BMVert *eve_act,
|
||||||
RegionView3D *rv3d)
|
RegionView3D *rv3d)
|
||||||
{
|
{
|
||||||
drawDMVerts_userData data;
|
drawDMVerts_userData data;
|
||||||
data.sel = sel;
|
data.sel = sel;
|
||||||
|
@ -713,7 +713,7 @@ static void transform_event_xyz_constraint(TransInfo *t, short key_type, char cm
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
short orientation = (t->current_orientation != V3D_MANIP_GLOBAL ?
|
short orientation = (t->current_orientation != V3D_MANIP_GLOBAL ?
|
||||||
t->current_orientation : V3D_MANIP_LOCAL);
|
t->current_orientation : V3D_MANIP_LOCAL);
|
||||||
if (!(t->modifiers & MOD_CONSTRAINT_PLANE))
|
if (!(t->modifiers & MOD_CONSTRAINT_PLANE))
|
||||||
setUserConstraint(t, orientation, constraint_axis, msg2);
|
setUserConstraint(t, orientation, constraint_axis, msg2);
|
||||||
else if (t->modifiers & MOD_CONSTRAINT_PLANE)
|
else if (t->modifiers & MOD_CONSTRAINT_PLANE)
|
||||||
|
@ -1336,7 +1336,7 @@ static void createTransCurveVerts(bContext *C, TransInfo *t)
|
|||||||
Object *obedit= CTX_data_edit_object(C);
|
Object *obedit= CTX_data_edit_object(C);
|
||||||
Curve *cu= obedit->data;
|
Curve *cu= obedit->data;
|
||||||
TransData *td = NULL;
|
TransData *td = NULL;
|
||||||
Nurb *nu;
|
Nurb *nu;
|
||||||
BezTriple *bezt;
|
BezTriple *bezt;
|
||||||
BPoint *bp;
|
BPoint *bp;
|
||||||
float mtx[3][3], smtx[3][3];
|
float mtx[3][3], smtx[3][3];
|
||||||
@ -1889,7 +1889,7 @@ static void get_edge_center(float cent_r[3], BMVert *eve)
|
|||||||
|
|
||||||
/* way to overwrite what data is edited with transform */
|
/* way to overwrite what data is edited with transform */
|
||||||
static void VertsToTransData(TransInfo *t, TransData *td, TransDataExtension *tx,
|
static void VertsToTransData(TransInfo *t, TransData *td, TransDataExtension *tx,
|
||||||
BMEditMesh *em, BMVert *eve, float *bweight)
|
BMEditMesh *em, BMVert *eve, float *bweight)
|
||||||
{
|
{
|
||||||
td->flag = 0;
|
td->flag = 0;
|
||||||
//if (key)
|
//if (key)
|
||||||
|
@ -1519,7 +1519,7 @@ void RNA_property_update_main(Main *bmain, Scene *scene, PointerRNA *ptr, Proper
|
|||||||
*
|
*
|
||||||
* The cache is structured with a dual-layer structure
|
* The cache is structured with a dual-layer structure
|
||||||
* - L1 = PointerRNA used as key; id.data is used (it should always be defined,
|
* - L1 = PointerRNA used as key; id.data is used (it should always be defined,
|
||||||
* and most updates end up using just that anyways)
|
* and most updates end up using just that anyways)
|
||||||
* - L2 = Update functions to be called on those PointerRNA's
|
* - L2 = Update functions to be called on those PointerRNA's
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -173,8 +173,8 @@ static int rna_SculptCapabilities_has_random_texture_angle_get(PointerRNA *ptr)
|
|||||||
{
|
{
|
||||||
Brush *br = (Brush *)ptr->data;
|
Brush *br = (Brush *)ptr->data;
|
||||||
return (ELEM(br->mtex.brush_map_mode,
|
return (ELEM(br->mtex.brush_map_mode,
|
||||||
MTEX_MAP_MODE_VIEW,
|
MTEX_MAP_MODE_VIEW,
|
||||||
MTEX_MAP_MODE_AREA) &&
|
MTEX_MAP_MODE_AREA) &&
|
||||||
!(br->flag & BRUSH_ANCHORED) &&
|
!(br->flag & BRUSH_ANCHORED) &&
|
||||||
!ELEM4(br->sculpt_tool,
|
!ELEM4(br->sculpt_tool,
|
||||||
SCULPT_TOOL_GRAB, SCULPT_TOOL_ROTATE,
|
SCULPT_TOOL_GRAB, SCULPT_TOOL_ROTATE,
|
||||||
@ -236,17 +236,17 @@ static int rna_SculptCapabilities_has_texture_angle_get(PointerRNA *ptr)
|
|||||||
{
|
{
|
||||||
Brush *br = (Brush *)ptr->data;
|
Brush *br = (Brush *)ptr->data;
|
||||||
return ELEM3(br->mtex.brush_map_mode,
|
return ELEM3(br->mtex.brush_map_mode,
|
||||||
MTEX_MAP_MODE_VIEW,
|
MTEX_MAP_MODE_VIEW,
|
||||||
MTEX_MAP_MODE_AREA,
|
MTEX_MAP_MODE_AREA,
|
||||||
MTEX_MAP_MODE_TILED);
|
MTEX_MAP_MODE_TILED);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int rna_SculptCapabilities_has_texture_angle_source_get(PointerRNA *ptr)
|
static int rna_SculptCapabilities_has_texture_angle_source_get(PointerRNA *ptr)
|
||||||
{
|
{
|
||||||
Brush *br = (Brush *)ptr->data;
|
Brush *br = (Brush *)ptr->data;
|
||||||
return ELEM(br->mtex.brush_map_mode,
|
return ELEM(br->mtex.brush_map_mode,
|
||||||
MTEX_MAP_MODE_VIEW,
|
MTEX_MAP_MODE_VIEW,
|
||||||
MTEX_MAP_MODE_AREA);
|
MTEX_MAP_MODE_AREA);
|
||||||
}
|
}
|
||||||
|
|
||||||
static PointerRNA rna_Brush_sculpt_capabilities_get(PointerRNA *ptr)
|
static PointerRNA rna_Brush_sculpt_capabilities_get(PointerRNA *ptr)
|
||||||
|
@ -180,12 +180,12 @@ static void node_composit_exec_math(void *UNUSED(data), bNode *node, bNodeStack
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*create output based on first input */
|
/* create output based on first input */
|
||||||
if (cbuf) {
|
if (cbuf) {
|
||||||
stackbuf=alloc_compbuf(cbuf->x, cbuf->y, CB_VAL, 1);
|
stackbuf=alloc_compbuf(cbuf->x, cbuf->y, CB_VAL, 1);
|
||||||
}
|
}
|
||||||
/* and if it doesn't exist use the second input since we
|
/* and if it doesn't exist use the second input since we
|
||||||
know that one of them must exist at this point*/
|
* know that one of them must exist at this point*/
|
||||||
else {
|
else {
|
||||||
stackbuf=alloc_compbuf(cbuf2->x, cbuf2->y, CB_VAL, 1);
|
stackbuf=alloc_compbuf(cbuf2->x, cbuf2->y, CB_VAL, 1);
|
||||||
}
|
}
|
||||||
|
@ -591,7 +591,7 @@ static short pyrna_rotation_euler_order_get(PointerRNA *ptr, PropertyRNA **prop_
|
|||||||
/* note that PROP_NONE is included as a vector subtype. this is because its handy to
|
/* note that PROP_NONE is included as a vector subtype. this is because its handy to
|
||||||
* have x/y access to fcurve keyframes and other fixed size float arrays of length 2-4. */
|
* have x/y access to fcurve keyframes and other fixed size float arrays of length 2-4. */
|
||||||
#define PROP_ALL_VECTOR_SUBTYPES \
|
#define PROP_ALL_VECTOR_SUBTYPES \
|
||||||
PROP_COORDS: \
|
PROP_COORDS: \
|
||||||
case PROP_TRANSLATION: \
|
case PROP_TRANSLATION: \
|
||||||
case PROP_DIRECTION: \
|
case PROP_DIRECTION: \
|
||||||
case PROP_VELOCITY: \
|
case PROP_VELOCITY: \
|
||||||
|
@ -5646,7 +5646,7 @@ void RE_Database_FromScene_Vectors(Render *re, Main *bmain, Scene *sce, unsigned
|
|||||||
ok= 1;
|
ok= 1;
|
||||||
}
|
}
|
||||||
if (ok==0) {
|
if (ok==0) {
|
||||||
printf("speed table: missing object %s\n", obi->ob->id.name+2);
|
printf("speed table: missing object %s\n", obi->ob->id.name+2);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user