style cleanup: whitespace
This commit is contained in:
@@ -1133,7 +1133,8 @@ CCGError ccgSubSurf_syncVert(CCGSubSurf *ss, CCGVertHDL vHDL, const void *vertDa
|
|||||||
v->flags = Vert_eEffected | seamflag;
|
v->flags = Vert_eEffected | seamflag;
|
||||||
}
|
}
|
||||||
else if (!VertDataEqual(vertData, _vert_getCo(v, 0, ss->meshIFC.vertDataSize), ss) ||
|
else if (!VertDataEqual(vertData, _vert_getCo(v, 0, ss->meshIFC.vertDataSize), ss) ||
|
||||||
((v->flags & Vert_eSeam) != seamflag)) {
|
((v->flags & Vert_eSeam) != seamflag))
|
||||||
|
{
|
||||||
int i, j;
|
int i, j;
|
||||||
|
|
||||||
VertDataCopy(_vert_getCo(v, 0, ss->meshIFC.vertDataSize), vertData, ss);
|
VertDataCopy(_vert_getCo(v, 0, ss->meshIFC.vertDataSize), vertData, ss);
|
||||||
|
@@ -326,10 +326,8 @@ static void layerSwap_tface(void *data, const int *corner_indices)
|
|||||||
{
|
{
|
||||||
MTFace *tf = data;
|
MTFace *tf = data;
|
||||||
float uv[4][2];
|
float uv[4][2];
|
||||||
static const short pin_flags[4] =
|
static const short pin_flags[4] = { TF_PIN1, TF_PIN2, TF_PIN3, TF_PIN4 };
|
||||||
{ TF_PIN1, TF_PIN2, TF_PIN3, TF_PIN4 };
|
static const char sel_flags[4] = { TF_SEL1, TF_SEL2, TF_SEL3, TF_SEL4 };
|
||||||
static const char sel_flags[4] =
|
|
||||||
{ TF_SEL1, TF_SEL2, TF_SEL3, TF_SEL4 };
|
|
||||||
short unwrap = tf->unwrap & ~(TF_PIN1 | TF_PIN2 | TF_PIN3 | TF_PIN4);
|
short unwrap = tf->unwrap & ~(TF_PIN1 | TF_PIN2 | TF_PIN3 | TF_PIN4);
|
||||||
char flag = tf->flag & ~(TF_SEL1 | TF_SEL2 | TF_SEL3 | TF_SEL4);
|
char flag = tf->flag & ~(TF_SEL1 | TF_SEL2 | TF_SEL3 | TF_SEL4);
|
||||||
int j;
|
int j;
|
||||||
@@ -1139,7 +1137,8 @@ const CustomDataMask CD_MASK_DERIVEDMESH =
|
|||||||
CD_MASK_PROP_STR | CD_MASK_ORIGSPACE | CD_MASK_ORIGSPACE_MLOOP | CD_MASK_ORCO | CD_MASK_TANGENT |
|
CD_MASK_PROP_STR | CD_MASK_ORIGSPACE | CD_MASK_ORIGSPACE_MLOOP | CD_MASK_ORCO | CD_MASK_TANGENT |
|
||||||
CD_MASK_PREVIEW_MCOL | CD_MASK_NORMAL | CD_MASK_SHAPEKEY | CD_MASK_RECAST |
|
CD_MASK_PREVIEW_MCOL | CD_MASK_NORMAL | CD_MASK_SHAPEKEY | CD_MASK_RECAST |
|
||||||
CD_MASK_ORIGINDEX | CD_MASK_POLYINDEX;
|
CD_MASK_ORIGINDEX | CD_MASK_POLYINDEX;
|
||||||
const CustomDataMask CD_MASK_BMESH = CD_MASK_MLOOPUV | CD_MASK_MLOOPCOL | CD_MASK_MTEXPOLY |
|
const CustomDataMask CD_MASK_BMESH =
|
||||||
|
CD_MASK_MLOOPUV | CD_MASK_MLOOPCOL | CD_MASK_MTEXPOLY |
|
||||||
CD_MASK_MSTICKY | CD_MASK_MDEFORMVERT | CD_MASK_PROP_FLT | CD_MASK_PROP_INT |
|
CD_MASK_MSTICKY | CD_MASK_MDEFORMVERT | CD_MASK_PROP_FLT | CD_MASK_PROP_INT |
|
||||||
CD_MASK_PROP_STR | CD_MASK_SHAPEKEY | CD_MASK_SHAPE_KEYINDEX | CD_MASK_MDISPS |
|
CD_MASK_PROP_STR | CD_MASK_SHAPEKEY | CD_MASK_SHAPE_KEYINDEX | CD_MASK_MDISPS |
|
||||||
CD_MASK_CREASE | CD_MASK_BWEIGHT | CD_MASK_RECAST | CD_MASK_PAINT_MASK |
|
CD_MASK_CREASE | CD_MASK_BWEIGHT | CD_MASK_RECAST | CD_MASK_PAINT_MASK |
|
||||||
|
@@ -259,8 +259,7 @@ int dynamicPaint_surfaceHasColorPreview(DynamicPaintSurface *surface)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* get currently active surface (in user interface) */
|
/* get currently active surface (in user interface) */
|
||||||
struct DynamicPaintSurface *get_activeSurface(DynamicPaintCanvasSettings *canvas)
|
struct DynamicPaintSurface *get_activeSurface(DynamicPaintCanvasSettings *canvas){
|
||||||
{
|
|
||||||
DynamicPaintSurface *surface = canvas->surfaces.first;
|
DynamicPaintSurface *surface = canvas->surfaces.first;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
@@ -330,7 +329,8 @@ static int surface_duplicateOutputExists(void *arg, const char *name)
|
|||||||
|
|
||||||
for (; surface; surface = surface->next) {
|
for (; surface; surface = surface->next) {
|
||||||
if (surface != t_surface && surface->type == t_surface->type &&
|
if (surface != t_surface && surface->type == t_surface->type &&
|
||||||
surface->format==t_surface->format) {
|
surface->format == t_surface->format)
|
||||||
|
{
|
||||||
if (surface->output_name[0] != '\0' && !BLI_path_cmp(name, surface->output_name)) return 1;
|
if (surface->output_name[0] != '\0' && !BLI_path_cmp(name, surface->output_name)) return 1;
|
||||||
if (surface->output_name2[0] != '\0' && !BLI_path_cmp(name, surface->output_name2)) return 1;
|
if (surface->output_name2[0] != '\0' && !BLI_path_cmp(name, surface->output_name2)) return 1;
|
||||||
}
|
}
|
||||||
@@ -993,8 +993,7 @@ void dynamicPaint_Modifier_free(struct DynamicPaintModifierData *pmd)
|
|||||||
* If scene is null, frame range of 1-250 is used
|
* If scene is null, frame range of 1-250 is used
|
||||||
* A pointer to this surface is returned
|
* A pointer to this surface is returned
|
||||||
*/
|
*/
|
||||||
struct DynamicPaintSurface *dynamicPaint_createNewSurface(DynamicPaintCanvasSettings *canvas, Scene *scene)
|
struct DynamicPaintSurface *dynamicPaint_createNewSurface(DynamicPaintCanvasSettings *canvas, Scene *scene){
|
||||||
{
|
|
||||||
DynamicPaintSurface *surface = MEM_callocN(sizeof(DynamicPaintSurface), "DynamicPaintSurface");
|
DynamicPaintSurface *surface = MEM_callocN(sizeof(DynamicPaintSurface), "DynamicPaintSurface");
|
||||||
if (!surface) return NULL;
|
if (!surface) return NULL;
|
||||||
|
|
||||||
@@ -1597,8 +1596,7 @@ static void dynamicPaint_applySurfaceDisplace(DynamicPaintSurface *surface, Deri
|
|||||||
*/
|
*/
|
||||||
static struct DerivedMesh *dynamicPaint_Modifier_apply(DynamicPaintModifierData *pmd,
|
static struct DerivedMesh *dynamicPaint_Modifier_apply(DynamicPaintModifierData *pmd,
|
||||||
Object *ob,
|
Object *ob,
|
||||||
DerivedMesh *dm)
|
DerivedMesh *dm){
|
||||||
{
|
|
||||||
DerivedMesh *result = CDDM_copy(dm);
|
DerivedMesh *result = CDDM_copy(dm);
|
||||||
|
|
||||||
if (pmd->canvas && !(pmd->canvas->flags & MOD_DPAINT_BAKING)) {
|
if (pmd->canvas && !(pmd->canvas->flags & MOD_DPAINT_BAKING)) {
|
||||||
@@ -1903,8 +1901,7 @@ static void dynamicPaint_frameUpdate(DynamicPaintModifierData *pmd, Scene *scene
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Modifier call. Processes dynamic paint modifier step. */
|
/* Modifier call. Processes dynamic paint modifier step. */
|
||||||
struct DerivedMesh *dynamicPaint_Modifier_do(DynamicPaintModifierData *pmd, Scene *scene, Object *ob, DerivedMesh *dm)
|
struct DerivedMesh *dynamicPaint_Modifier_do(DynamicPaintModifierData *pmd, Scene *scene, Object *ob, DerivedMesh *dm){
|
||||||
{
|
|
||||||
/* For now generate tessfaces in every case
|
/* For now generate tessfaces in every case
|
||||||
* XXX - move/remove when most of dpaint functions are converted to use bmesh types */
|
* XXX - move/remove when most of dpaint functions are converted to use bmesh types */
|
||||||
DM_ensure_tessface(dm);
|
DM_ensure_tessface(dm);
|
||||||
@@ -2776,8 +2773,7 @@ static void mesh_faces_spherecast_dp(void *userdata, int index, const BVHTreeRay
|
|||||||
t2 = vert[face->v3].co;
|
t2 = vert[face->v3].co;
|
||||||
t3 = face->v4 ? vert[face->v4].co : NULL;
|
t3 = face->v4 ? vert[face->v4].co : NULL;
|
||||||
|
|
||||||
do
|
do {
|
||||||
{
|
|
||||||
float dist = bvhtree_ray_tri_intersection(ray, hit->dist, t0, t1, t2);
|
float dist = bvhtree_ray_tri_intersection(ray, hit->dist, t0, t1, t2);
|
||||||
|
|
||||||
if (dist >= 0 && dist < hit->dist) {
|
if (dist >= 0 && dist < hit->dist) {
|
||||||
@@ -2813,8 +2809,7 @@ static void mesh_faces_nearest_point_dp(void *userdata, int index, const float c
|
|||||||
t2 = vert[face->v3].co;
|
t2 = vert[face->v3].co;
|
||||||
t3 = face->v4 ? vert[face->v4].co : NULL;
|
t3 = face->v4 ? vert[face->v4].co : NULL;
|
||||||
|
|
||||||
do
|
do {
|
||||||
{
|
|
||||||
float nearest_tmp[3], dist;
|
float nearest_tmp[3], dist;
|
||||||
int vertex, edge;
|
int vertex, edge;
|
||||||
|
|
||||||
@@ -3205,7 +3200,7 @@ static int dynamicPaint_paintMesh(DynamicPaintSurface *surface,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* check bounding box collision */
|
/* check bounding box collision */
|
||||||
if (grid && meshBrush_boundsIntersect(&grid->grid_bounds, &mesh_bb, brush, brush_radius))
|
if (grid && meshBrush_boundsIntersect(&grid->grid_bounds, &mesh_bb, brush, brush_radius)) {
|
||||||
/* Build a bvh tree from transformed vertices */
|
/* Build a bvh tree from transformed vertices */
|
||||||
if (bvhtree_from_mesh_faces(&treeData, dm, 0.0f, 4, 8)) {
|
if (bvhtree_from_mesh_faces(&treeData, dm, 0.0f, 4, 8)) {
|
||||||
int c_index;
|
int c_index;
|
||||||
@@ -3449,7 +3444,8 @@ static int dynamicPaint_paintMesh(DynamicPaintSurface *surface,
|
|||||||
|
|
||||||
/* if brush has smudge enabled store brush velocity */
|
/* if brush has smudge enabled store brush velocity */
|
||||||
if (surface->type == MOD_DPAINT_SURFACE_T_PAINT &&
|
if (surface->type == MOD_DPAINT_SURFACE_T_PAINT &&
|
||||||
brush->flags & MOD_DPAINT_DO_SMUDGE && bData->brush_velocity) {
|
brush->flags & MOD_DPAINT_DO_SMUDGE && bData->brush_velocity)
|
||||||
|
{
|
||||||
copy_v3_v3(&bData->brush_velocity[index * 4], velocity);
|
copy_v3_v3(&bData->brush_velocity[index * 4], velocity);
|
||||||
mul_v3_fl(&bData->brush_velocity[index * 4], 1.0f / velocity_val);
|
mul_v3_fl(&bData->brush_velocity[index * 4], 1.0f / velocity_val);
|
||||||
bData->brush_velocity[index * 4 + 3] = velocity_val;
|
bData->brush_velocity[index * 4 + 3] = velocity_val;
|
||||||
@@ -3519,6 +3515,7 @@ static int dynamicPaint_paintMesh(DynamicPaintSurface *surface,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
/* free bvh tree */
|
/* free bvh tree */
|
||||||
free_bvhtree_from_mesh(&treeData);
|
free_bvhtree_from_mesh(&treeData);
|
||||||
dm->release(dm);
|
dm->release(dm);
|
||||||
@@ -3843,7 +3840,8 @@ static int dynamicPaint_paintSinglePoint(DynamicPaintSurface *surface, float *po
|
|||||||
|
|
||||||
/* store brush velocity for smudge */
|
/* store brush velocity for smudge */
|
||||||
if (surface->type == MOD_DPAINT_SURFACE_T_PAINT &&
|
if (surface->type == MOD_DPAINT_SURFACE_T_PAINT &&
|
||||||
brush->flags & MOD_DPAINT_DO_SMUDGE && bData->brush_velocity) {
|
brush->flags & MOD_DPAINT_DO_SMUDGE && bData->brush_velocity)
|
||||||
|
{
|
||||||
copy_v3_v3(&bData->brush_velocity[index * 4], velocity);
|
copy_v3_v3(&bData->brush_velocity[index * 4], velocity);
|
||||||
mul_v3_fl(&bData->brush_velocity[index * 4], 1.0f / velocity_val);
|
mul_v3_fl(&bData->brush_velocity[index * 4], 1.0f / velocity_val);
|
||||||
bData->brush_velocity[index * 4 + 3] = velocity_val;
|
bData->brush_velocity[index * 4 + 3] = velocity_val;
|
||||||
@@ -3866,7 +3864,8 @@ static int dynamicPaint_paintSinglePoint(DynamicPaintSurface *surface, float *po
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (surface->type == MOD_DPAINT_SURFACE_T_DISPLACE ||
|
else if (surface->type == MOD_DPAINT_SURFACE_T_DISPLACE ||
|
||||||
surface->type == MOD_DPAINT_SURFACE_T_WAVE) {
|
surface->type == MOD_DPAINT_SURFACE_T_WAVE)
|
||||||
|
{
|
||||||
/* get displace depth */
|
/* get displace depth */
|
||||||
float disp_intersect = (1.0f - sqrtf((brush_radius - distance) / brush_radius)) * brush_radius;
|
float disp_intersect = (1.0f - sqrtf((brush_radius - distance) / brush_radius)) * brush_radius;
|
||||||
depth = (brush_radius - disp_intersect) / bData->bNormal[index].normal_scale;
|
depth = (brush_radius - disp_intersect) / bData->bNormal[index].normal_scale;
|
||||||
@@ -3961,7 +3960,9 @@ void surface_determineForceTargetPoints(PaintSurfaceData *sData, int index, floa
|
|||||||
|
|
||||||
/* only accept neighbor at "other side" of the first one in relation to force dir
|
/* only accept neighbor at "other side" of the first one in relation to force dir
|
||||||
* so make sure angle between this and closest neigh is greater than first angle */
|
* so make sure angle between this and closest neigh is greater than first angle */
|
||||||
if (dir_dot>closest_d[1] && closest_dot<closest_d[0] && dir_dot>0.0f) {closest_d[1]=dir_dot; closest_id[1]=n_index;}
|
if (dir_dot > closest_d[1] && closest_dot < closest_d[0] && dir_dot > 0.0f) {
|
||||||
|
closest_d[1] = dir_dot; closest_id[1] = n_index;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* if two valid neighs found, calculate how force effect is divided
|
/* if two valid neighs found, calculate how force effect is divided
|
||||||
|
@@ -414,7 +414,7 @@ static float nlastrip_get_frame_actionclip (NlaStrip *strip, float cframe, short
|
|||||||
else if (mode == NLATIME_CONVERT_UNMAP) {
|
else if (mode == NLATIME_CONVERT_UNMAP) {
|
||||||
return (strip->end + (strip->actstart * scale - cframe)) / scale;
|
return (strip->end + (strip->actstart * scale - cframe)) / scale;
|
||||||
}
|
}
|
||||||
else /* if (mode == NLATIME_CONVERT_EVAL) */{
|
else { /* if (mode == NLATIME_CONVERT_EVAL) */
|
||||||
if (IS_EQF(cframe, strip->end) && IS_EQF(strip->repeat, ((int)strip->repeat))) {
|
if (IS_EQF(cframe, strip->end) && IS_EQF(strip->repeat, ((int)strip->repeat))) {
|
||||||
/* this case prevents the motion snapping back to the first frame at the end of the strip
|
/* this case prevents the motion snapping back to the first frame at the end of the strip
|
||||||
* by catching the case where repeats is a whole number, which means that the end of the strip
|
* by catching the case where repeats is a whole number, which means that the end of the strip
|
||||||
@@ -437,7 +437,7 @@ static float nlastrip_get_frame_actionclip (NlaStrip *strip, float cframe, short
|
|||||||
else if (mode == NLATIME_CONVERT_UNMAP) {
|
else if (mode == NLATIME_CONVERT_UNMAP) {
|
||||||
return strip->actstart + (cframe - strip->start) / scale;
|
return strip->actstart + (cframe - strip->start) / scale;
|
||||||
}
|
}
|
||||||
else /* if (mode == NLATIME_CONVERT_EVAL) */{
|
else { /* if (mode == NLATIME_CONVERT_EVAL) */
|
||||||
if (IS_EQF(cframe, strip->end) && IS_EQF(strip->repeat, ((int)strip->repeat))) {
|
if (IS_EQF(cframe, strip->end) && IS_EQF(strip->repeat, ((int)strip->repeat))) {
|
||||||
/* this case prevents the motion snapping back to the first frame at the end of the strip
|
/* this case prevents the motion snapping back to the first frame at the end of the strip
|
||||||
* by catching the case where repeats is a whole number, which means that the end of the strip
|
* by catching the case where repeats is a whole number, which means that the end of the strip
|
||||||
|
@@ -141,7 +141,8 @@ static QuicktimeCodecTypeDesc qtVideoCodecList[] = {
|
|||||||
{kMPEG4VisualCodecType, 10, "MPEG4"},
|
{kMPEG4VisualCodecType, 10, "MPEG4"},
|
||||||
{kH263CodecType, 11, "H.263"},
|
{kH263CodecType, 11, "H.263"},
|
||||||
{kH264CodecType, 12, "H.264"},
|
{kH264CodecType, 12, "H.264"},
|
||||||
{0, 0, NULL}};
|
{0, 0, NULL}
|
||||||
|
};
|
||||||
|
|
||||||
static int qtVideoCodecCount = 12;
|
static int qtVideoCodecCount = 12;
|
||||||
|
|
||||||
|
@@ -86,7 +86,7 @@ typedef struct _QuicktimeMovie {
|
|||||||
long trackIndex;
|
long trackIndex;
|
||||||
short depth;
|
short depth;
|
||||||
|
|
||||||
int have_gw; //ugly
|
int have_gw; /* ugly */
|
||||||
} QuicktimeMovie;
|
} QuicktimeMovie;
|
||||||
|
|
||||||
|
|
||||||
@@ -195,7 +195,7 @@ int anim_is_quicktime(const char *name)
|
|||||||
if (BLI_testextensie(name, ".swf") ||
|
if (BLI_testextensie(name, ".swf") ||
|
||||||
BLI_testextensie(name, ".txt") ||
|
BLI_testextensie(name, ".txt") ||
|
||||||
BLI_testextensie(name, ".mpg") ||
|
BLI_testextensie(name, ".mpg") ||
|
||||||
BLI_testextensie(name, ".avi") || // wouldnt be appropriate ;)
|
BLI_testextensie(name, ".avi") || /* wouldnt be appropriate ;) */
|
||||||
BLI_testextensie(name, ".tga") ||
|
BLI_testextensie(name, ".tga") ||
|
||||||
BLI_testextensie(name, ".png") ||
|
BLI_testextensie(name, ".png") ||
|
||||||
BLI_testextensie(name, ".bmp") ||
|
BLI_testextensie(name, ".bmp") ||
|
||||||
@@ -245,7 +245,7 @@ int anim_is_quicktime(const char *name)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((err == noErr) && (myImporter != NULL)) { // this file is a movie file
|
if ((err == noErr) && (myImporter != NULL)) { /* this file is a movie file */
|
||||||
isMovieFile = true;
|
isMovieFile = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user