2.5 - Warning cleanups (for mingw+scons)
Also, made the Outliner's horizontal scrollbar work better for keymaps view. It's still using an approximation of the width, but at least you can scroll now.
This commit is contained in:
parent
3f5a2a1194
commit
4893cdc338
4
intern/smoke/extern/smoke_API.h
vendored
4
intern/smoke/extern/smoke_API.h
vendored
@ -32,6 +32,8 @@
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
struct FLUID_3D;
|
||||||
|
|
||||||
// export
|
// export
|
||||||
void smoke_export(struct FLUID_3D *fluid, float *dt, float *dx, float **dens, float **densold, float **heat, float **heatold, float **vx, float **vy, float **vz, float **vxold, float **vyold, float **vzold, unsigned char **obstacles);
|
void smoke_export(struct FLUID_3D *fluid, float *dt, float *dx, float **dens, float **densold, float **heat, float **heatold, float **vx, float **vy, float **vz, float **vxold, float **vyold, float **vzold, unsigned char **obstacles);
|
||||||
|
|
||||||
@ -74,4 +76,4 @@ void smoke_turbulence_export(struct WTURBULENCE *wt, float **dens, float **denso
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif /* SMOKE_API_H_ */
|
#endif /* SMOKE_API_H_ */
|
||||||
|
@ -76,7 +76,7 @@ static int rule_goal_avoid(BoidRule *rule, BoidBrainData *bbd, BoidValues *val,
|
|||||||
Object *priority_ob = NULL;
|
Object *priority_ob = NULL;
|
||||||
float vec[3] = {0.0f, 0.0f, 0.0f}, loc[3] = {0.0f, 0.0f, 0.0f};
|
float vec[3] = {0.0f, 0.0f, 0.0f}, loc[3] = {0.0f, 0.0f, 0.0f};
|
||||||
float mul = (rule->type == eBoidRuleType_Avoid ? 1.0 : -1.0);
|
float mul = (rule->type == eBoidRuleType_Avoid ? 1.0 : -1.0);
|
||||||
float priority = 0.0f, len;
|
float priority = 0.0f, len = 0.0f;
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
|
|
||||||
/* first find out goal/predator with highest priority */
|
/* first find out goal/predator with highest priority */
|
||||||
@ -614,7 +614,7 @@ static int rule_fight(BoidRule *rule, BoidBrainData *bbd, BoidValues *val, Parti
|
|||||||
KDTreeNearest *ptn = NULL;
|
KDTreeNearest *ptn = NULL;
|
||||||
ParticleTarget *pt;
|
ParticleTarget *pt;
|
||||||
ParticleData *epars;
|
ParticleData *epars;
|
||||||
ParticleData *enemy_pa;
|
ParticleData *enemy_pa = NULL;
|
||||||
/* friends & enemies */
|
/* friends & enemies */
|
||||||
float closest_enemy[3] = {0.0f,0.0f,0.0f};
|
float closest_enemy[3] = {0.0f,0.0f,0.0f};
|
||||||
float closest_dist = fbr->distance + 1.0f;
|
float closest_dist = fbr->distance + 1.0f;
|
||||||
|
@ -2571,6 +2571,7 @@ int object_insert_ptcache(Object *ob)
|
|||||||
return i;
|
return i;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if 0
|
||||||
static int pc_findindex(ListBase *listbase, int index)
|
static int pc_findindex(ListBase *listbase, int index)
|
||||||
{
|
{
|
||||||
LinkData *link= NULL;
|
LinkData *link= NULL;
|
||||||
@ -2590,11 +2591,10 @@ static int pc_findindex(ListBase *listbase, int index)
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0
|
|
||||||
void object_delete_ptcache(Object *ob, int index)
|
void object_delete_ptcache(Object *ob, int index)
|
||||||
{
|
{
|
||||||
int list_index = pc_findindex(&ob->pc_ids, index);
|
int list_index = pc_findindex(&ob->pc_ids, index);
|
||||||
LinkData *link = BLI_findlink(&ob->pc_ids, list_index);
|
LinkData *link = BLI_findlink(&ob->pc_ids, list_index);
|
||||||
BLI_freelinkN(&ob->pc_ids, link);
|
BLI_freelinkN(&ob->pc_ids, link);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -3238,7 +3238,7 @@ static void deflect_particle(Scene *scene, Object *pob, ParticleSystemModifierDa
|
|||||||
ParticleCollision col;
|
ParticleCollision col;
|
||||||
BVHTreeRayHit hit;
|
BVHTreeRayHit hit;
|
||||||
float ray_dir[3], zerovec[3]={0.0,0.0,0.0};
|
float ray_dir[3], zerovec[3]={0.0,0.0,0.0};
|
||||||
float radius = ((part->flag & PART_SIZE_DEFL)?pa->size:0.0f), boid_z;
|
float radius = ((part->flag & PART_SIZE_DEFL)?pa->size:0.0f), boid_z = 0.0f;
|
||||||
int deflections=0, max_deflections=10;
|
int deflections=0, max_deflections=10;
|
||||||
|
|
||||||
VECCOPY(col.co1, pa->prev_state.co);
|
VECCOPY(col.co1, pa->prev_state.co);
|
||||||
|
@ -424,8 +424,6 @@ void BKE_ptcache_id_from_softbody(PTCacheID *pid, Object *ob, SoftBody *sb)
|
|||||||
|
|
||||||
void BKE_ptcache_id_from_particles(PTCacheID *pid, Object *ob, ParticleSystem *psys)
|
void BKE_ptcache_id_from_particles(PTCacheID *pid, Object *ob, ParticleSystem *psys)
|
||||||
{
|
{
|
||||||
ParticleSystemModifierData *psmd= psys_get_modifier(ob, psys);
|
|
||||||
|
|
||||||
memset(pid, 0, sizeof(PTCacheID));
|
memset(pid, 0, sizeof(PTCacheID));
|
||||||
|
|
||||||
pid->ob= ob;
|
pid->ob= ob;
|
||||||
@ -484,7 +482,7 @@ static int ptcache_file_write(PTCacheFile *pf, void *f, size_t tot, int size);
|
|||||||
|
|
||||||
static int ptcache_compress_write(PTCacheFile *pf, unsigned char *in, unsigned int in_len, unsigned char *out, int mode)
|
static int ptcache_compress_write(PTCacheFile *pf, unsigned char *in, unsigned int in_len, unsigned char *out, int mode)
|
||||||
{
|
{
|
||||||
int r;
|
int r = 0;
|
||||||
unsigned char compressed;
|
unsigned char compressed;
|
||||||
LZO_HEAP_ALLOC(wrkmem, LZO1X_MEM_COMPRESS);
|
LZO_HEAP_ALLOC(wrkmem, LZO1X_MEM_COMPRESS);
|
||||||
unsigned int out_len = LZO_OUT_LEN(in_len);
|
unsigned int out_len = LZO_OUT_LEN(in_len);
|
||||||
@ -566,11 +564,12 @@ static int ptcache_write_smoke(PTCacheFile *pf, void *smoke_v)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
static int ptcache_write_smoke_turbulence(PTCacheFile *pf, void *smoke_v)
|
static int ptcache_write_smoke_turbulence(PTCacheFile *pf, void *smoke_v)
|
||||||
{
|
{
|
||||||
SmokeModifierData *smd= (SmokeModifierData *)smoke_v;
|
SmokeModifierData *smd= (SmokeModifierData *)smoke_v;
|
||||||
SmokeDomainSettings *sds = smd->domain;
|
SmokeDomainSettings *sds = smd->domain;
|
||||||
/*
|
|
||||||
if(sds->wt) {
|
if(sds->wt) {
|
||||||
unsigned int res_big[3];
|
unsigned int res_big[3];
|
||||||
size_t res = sds->res[0]*sds->res[1]*sds->res[2];
|
size_t res = sds->res[0]*sds->res[1]*sds->res[2];
|
||||||
@ -599,16 +598,16 @@ static int ptcache_write_smoke_turbulence(PTCacheFile *pf, void *smoke_v)
|
|||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
// forward decleration
|
// forward decleration
|
||||||
static int ptcache_file_read(PTCacheFile *pf, void *f, size_t tot, int size);
|
static int ptcache_file_read(PTCacheFile *pf, void *f, size_t tot, int size);
|
||||||
|
|
||||||
static int ptcache_compress_read(PTCacheFile *pf, unsigned char *result, unsigned int len)
|
static int ptcache_compress_read(PTCacheFile *pf, unsigned char *result, unsigned int len)
|
||||||
{
|
{
|
||||||
int r;
|
int r = 0;
|
||||||
unsigned char compressed = 0;
|
unsigned char compressed = 0;
|
||||||
unsigned int in_len;
|
unsigned int in_len;
|
||||||
unsigned int out_len = len;
|
unsigned int out_len = len;
|
||||||
@ -673,11 +672,12 @@ static void ptcache_read_smoke(PTCacheFile *pf, void *smoke_v)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
static void ptcache_read_smoke_turbulence(PTCacheFile *pf, void *smoke_v)
|
static void ptcache_read_smoke_turbulence(PTCacheFile *pf, void *smoke_v)
|
||||||
{
|
{
|
||||||
SmokeModifierData *smd= (SmokeModifierData *)smoke_v;
|
SmokeModifierData *smd= (SmokeModifierData *)smoke_v;
|
||||||
SmokeDomainSettings *sds = smd->domain;
|
SmokeDomainSettings *sds = smd->domain;
|
||||||
/*
|
|
||||||
if(sds->fluid) {
|
if(sds->fluid) {
|
||||||
unsigned int res[3];
|
unsigned int res[3];
|
||||||
float *dens, *densold, *tcu, *tcv, *tcw;
|
float *dens, *densold, *tcu, *tcv, *tcw;
|
||||||
@ -690,8 +690,8 @@ static void ptcache_read_smoke_turbulence(PTCacheFile *pf, void *smoke_v)
|
|||||||
ptcache_compress_read(pf, (unsigned char*)dens, out_len);
|
ptcache_compress_read(pf, (unsigned char*)dens, out_len);
|
||||||
|
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
void BKE_ptcache_id_from_smoke(PTCacheID *pid, struct Object *ob, struct SmokeModifierData *smd)
|
void BKE_ptcache_id_from_smoke(PTCacheID *pid, struct Object *ob, struct SmokeModifierData *smd)
|
||||||
{
|
{
|
||||||
@ -1162,7 +1162,7 @@ int BKE_ptcache_read_cache(PTCacheID *pid, float cfra, float frs_sec)
|
|||||||
int cfra1 = 0, cfra2 = 0;
|
int cfra1 = 0, cfra2 = 0;
|
||||||
int totpoint = 0, totpoint2 = 0;
|
int totpoint = 0, totpoint2 = 0;
|
||||||
int *index = &i, *index2 = &i;
|
int *index = &i, *index2 = &i;
|
||||||
int use_old = 0, old_frame;
|
int use_old = 0, old_frame = 0;
|
||||||
|
|
||||||
int ret = 0, error = 0;
|
int ret = 0, error = 0;
|
||||||
|
|
||||||
@ -2084,7 +2084,7 @@ void BKE_ptcache_make_cache(PTCacheBaker* baker)
|
|||||||
Base *base;
|
Base *base;
|
||||||
ListBase pidlist;
|
ListBase pidlist;
|
||||||
PTCacheID *pid = baker->pid;
|
PTCacheID *pid = baker->pid;
|
||||||
PointCache *cache;
|
PointCache *cache = NULL;
|
||||||
float frameleno = scene->r.framelen;
|
float frameleno = scene->r.framelen;
|
||||||
int cfrao = CFRA;
|
int cfrao = CFRA;
|
||||||
int startframe = MAXFRAME;
|
int startframe = MAXFRAME;
|
||||||
|
@ -92,10 +92,10 @@ static void tend ( void )
|
|||||||
{
|
{
|
||||||
QueryPerformanceCounter ( &liCurrentTime );
|
QueryPerformanceCounter ( &liCurrentTime );
|
||||||
}
|
}
|
||||||
static double tval()
|
//static double tval()
|
||||||
{
|
//{
|
||||||
return ((double)( (liCurrentTime.QuadPart - liStartTime.QuadPart)* (double)1000.0/(double)liFrequency.QuadPart ));
|
// return ((double)( (liCurrentTime.QuadPart - liStartTime.QuadPart)* (double)1000.0/(double)liFrequency.QuadPart ));
|
||||||
}
|
//}
|
||||||
#else
|
#else
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
static struct timeval _tstart, _tend;
|
static struct timeval _tstart, _tend;
|
||||||
@ -788,9 +788,8 @@ void smokeModifier_do(SmokeModifierData *smd, Scene *scene, Object *ob, DerivedM
|
|||||||
}
|
}
|
||||||
else if(smd->type & MOD_SMOKE_TYPE_DOMAIN)
|
else if(smd->type & MOD_SMOKE_TYPE_DOMAIN)
|
||||||
{
|
{
|
||||||
PointCache *cache, *cache_wt;
|
PointCache *cache;
|
||||||
PTCacheID pid;
|
PTCacheID pid;
|
||||||
PTCacheID pid_wt;
|
|
||||||
float timescale;
|
float timescale;
|
||||||
int cache_result = 0;
|
int cache_result = 0;
|
||||||
int startframe, endframe, framenr;
|
int startframe, endframe, framenr;
|
||||||
@ -1424,7 +1423,6 @@ void smoke_calc_transparency(float *result, float *p0, float *p1, int res[3], fl
|
|||||||
{
|
{
|
||||||
int x, y, z;
|
int x, y, z;
|
||||||
float bv[6];
|
float bv[6];
|
||||||
float bigfactor = 1.0;
|
|
||||||
|
|
||||||
// x
|
// x
|
||||||
bv[0] = p0[0];
|
bv[0] = p0[0];
|
||||||
|
@ -750,7 +750,7 @@ void make_local_texture(Tex *tex)
|
|||||||
|
|
||||||
void autotexname(Tex *tex)
|
void autotexname(Tex *tex)
|
||||||
{
|
{
|
||||||
char texstr[20][12]= {"None" , "Clouds" , "Wood", "Marble", "Magic" , "Blend",
|
char texstr[20][15]= {"None" , "Clouds" , "Wood", "Marble", "Magic" , "Blend",
|
||||||
"Stucci", "Noise" , "Image", "Plugin", "EnvMap" , "Musgrave",
|
"Stucci", "Noise" , "Image", "Plugin", "EnvMap" , "Musgrave",
|
||||||
"Voronoi", "DistNoise", "Point Density", "Voxel Data", "", "", "", ""};
|
"Voronoi", "DistNoise", "Point Density", "Voxel Data", "", "", "", ""};
|
||||||
Image *ima;
|
Image *ima;
|
||||||
|
@ -37,4 +37,4 @@ float voxel_sample_nearest(float *data, int *res, float *co);
|
|||||||
float voxel_sample_trilinear(float *data, int *res, float *co);
|
float voxel_sample_trilinear(float *data, int *res, float *co);
|
||||||
float voxel_sample_tricubic(float *data, int *res, float *co);
|
float voxel_sample_tricubic(float *data, int *res, float *co);
|
||||||
|
|
||||||
#endif /* BLI_VOXEL_H */
|
#endif /* BLI_VOXEL_H */
|
||||||
|
@ -127,11 +127,11 @@ void duplicate_fcurve_keys(FCurve *fcu)
|
|||||||
{
|
{
|
||||||
BezTriple *newbezt;
|
BezTriple *newbezt;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
if (fcu == NULL)
|
/* this can only work when there is an F-Curve, and also when there are some BezTriples */
|
||||||
|
if ELEM(NULL, fcu, fcu->bezt)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// XXX this does not take into account sample data...
|
|
||||||
for (i=0; i < fcu->totvert; i++) {
|
for (i=0; i < fcu->totvert; i++) {
|
||||||
/* If a key is selected */
|
/* If a key is selected */
|
||||||
if (fcu->bezt[i].f2 & SELECT) {
|
if (fcu->bezt[i].f2 & SELECT) {
|
||||||
@ -160,7 +160,7 @@ void duplicate_fcurve_keys(FCurve *fcu)
|
|||||||
/* **************************************************** */
|
/* **************************************************** */
|
||||||
/* Various Tools */
|
/* Various Tools */
|
||||||
|
|
||||||
/* Basic IPO-Curve 'cleanup' function that removes 'double points' and unnecessary keyframes on linear-segments only */
|
/* Basic F-Curve 'cleanup' function that removes 'double points' and unnecessary keyframes on linear-segments only */
|
||||||
void clean_fcurve(FCurve *fcu, float thresh)
|
void clean_fcurve(FCurve *fcu, float thresh)
|
||||||
{
|
{
|
||||||
BezTriple *old_bezts, *bezt, *beztn;
|
BezTriple *old_bezts, *bezt, *beztn;
|
||||||
@ -285,74 +285,74 @@ void smooth_fcurve (FCurve *fcu)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* if any points were selected, allocate tSmooth_Bezt points to work on */
|
/* if any points were selected, allocate tSmooth_Bezt points to work on */
|
||||||
if (totSel >= 3) {
|
if (totSel >= 3) {
|
||||||
tSmooth_Bezt *tarray, *tsb;
|
tSmooth_Bezt *tarray, *tsb;
|
||||||
|
|
||||||
/* allocate memory in one go */
|
|
||||||
tsb= tarray= MEM_callocN(totSel*sizeof(tSmooth_Bezt), "tSmooth_Bezt Array");
|
|
||||||
|
|
||||||
/* populate tarray with data of selected points */
|
|
||||||
bezt= fcu->bezt;
|
|
||||||
for (i=0, x=0; (i < fcu->totvert) && (x < totSel); i++, bezt++) {
|
|
||||||
if (BEZSELECTED(bezt)) {
|
|
||||||
/* tsb simply needs pointer to vec, and index */
|
|
||||||
tsb->h1 = &bezt->vec[0][1];
|
|
||||||
tsb->h2 = &bezt->vec[1][1];
|
|
||||||
tsb->h3 = &bezt->vec[2][1];
|
|
||||||
|
|
||||||
/* advance to the next tsb to populate */
|
|
||||||
if (x < totSel- 1)
|
|
||||||
tsb++;
|
|
||||||
else
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* calculate the new smoothed F-Curve's with weighted averages:
|
|
||||||
* - this is done with two passes
|
|
||||||
* - uses 5 points for each operation (which stores in the relevant handles)
|
|
||||||
* - previous: w/a ratio = 3:5:2:1:1
|
|
||||||
* - next: w/a ratio = 1:1:2:5:3
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* round 1: calculate previous and next */
|
|
||||||
tsb= tarray;
|
|
||||||
for (i=0; i < totSel; i++, tsb++) {
|
|
||||||
/* don't touch end points (otherwise, curves slowly explode) */
|
|
||||||
if (ELEM(i, 0, (totSel-1)) == 0) {
|
|
||||||
const tSmooth_Bezt *tP1 = tsb - 1;
|
|
||||||
const tSmooth_Bezt *tP2 = (i-2 > 0) ? (tsb - 2) : (NULL);
|
|
||||||
const tSmooth_Bezt *tN1 = tsb + 1;
|
|
||||||
const tSmooth_Bezt *tN2 = (i+2 < totSel) ? (tsb + 2) : (NULL);
|
|
||||||
|
|
||||||
const float p1 = *tP1->h2;
|
|
||||||
const float p2 = (tP2) ? (*tP2->h2) : (*tP1->h2);
|
|
||||||
const float c1 = *tsb->h2;
|
|
||||||
const float n1 = *tN1->h2;
|
|
||||||
const float n2 = (tN2) ? (*tN2->h2) : (*tN1->h2);
|
|
||||||
|
|
||||||
/* calculate previous and next */
|
|
||||||
*tsb->h1= (3*p2 + 5*p1 + 2*c1 + n1 + n2) / 12;
|
|
||||||
*tsb->h3= (p2 + p1 + 2*c1 + 5*n1 + 3*n2) / 12;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* round 2: calculate new values and reset handles */
|
|
||||||
tsb= tarray;
|
|
||||||
for (i=0; i < totSel; i++, tsb++) {
|
|
||||||
/* calculate new position by averaging handles */
|
|
||||||
*tsb->h2 = (*tsb->h1 + *tsb->h3) / 2;
|
|
||||||
|
|
||||||
/* reset handles now */
|
/* allocate memory in one go */
|
||||||
*tsb->h1 = *tsb->h2;
|
tsb= tarray= MEM_callocN(totSel*sizeof(tSmooth_Bezt), "tSmooth_Bezt Array");
|
||||||
*tsb->h3 = *tsb->h2;
|
|
||||||
|
/* populate tarray with data of selected points */
|
||||||
|
bezt= fcu->bezt;
|
||||||
|
for (i=0, x=0; (i < fcu->totvert) && (x < totSel); i++, bezt++) {
|
||||||
|
if (BEZSELECTED(bezt)) {
|
||||||
|
/* tsb simply needs pointer to vec, and index */
|
||||||
|
tsb->h1 = &bezt->vec[0][1];
|
||||||
|
tsb->h2 = &bezt->vec[1][1];
|
||||||
|
tsb->h3 = &bezt->vec[2][1];
|
||||||
|
|
||||||
|
/* advance to the next tsb to populate */
|
||||||
|
if (x < totSel- 1)
|
||||||
|
tsb++;
|
||||||
|
else
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* calculate the new smoothed F-Curve's with weighted averages:
|
||||||
|
* - this is done with two passes
|
||||||
|
* - uses 5 points for each operation (which stores in the relevant handles)
|
||||||
|
* - previous: w/a ratio = 3:5:2:1:1
|
||||||
|
* - next: w/a ratio = 1:1:2:5:3
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* round 1: calculate previous and next */
|
||||||
|
tsb= tarray;
|
||||||
|
for (i=0; i < totSel; i++, tsb++) {
|
||||||
|
/* don't touch end points (otherwise, curves slowly explode) */
|
||||||
|
if (ELEM(i, 0, (totSel-1)) == 0) {
|
||||||
|
const tSmooth_Bezt *tP1 = tsb - 1;
|
||||||
|
const tSmooth_Bezt *tP2 = (i-2 > 0) ? (tsb - 2) : (NULL);
|
||||||
|
const tSmooth_Bezt *tN1 = tsb + 1;
|
||||||
|
const tSmooth_Bezt *tN2 = (i+2 < totSel) ? (tsb + 2) : (NULL);
|
||||||
|
|
||||||
|
const float p1 = *tP1->h2;
|
||||||
|
const float p2 = (tP2) ? (*tP2->h2) : (*tP1->h2);
|
||||||
|
const float c1 = *tsb->h2;
|
||||||
|
const float n1 = *tN1->h2;
|
||||||
|
const float n2 = (tN2) ? (*tN2->h2) : (*tN1->h2);
|
||||||
|
|
||||||
|
/* calculate previous and next */
|
||||||
|
*tsb->h1= (3*p2 + 5*p1 + 2*c1 + n1 + n2) / 12;
|
||||||
|
*tsb->h3= (p2 + p1 + 2*c1 + 5*n1 + 3*n2) / 12;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* round 2: calculate new values and reset handles */
|
||||||
|
tsb= tarray;
|
||||||
|
for (i=0; i < totSel; i++, tsb++) {
|
||||||
|
/* calculate new position by averaging handles */
|
||||||
|
*tsb->h2 = (*tsb->h1 + *tsb->h3) / 2;
|
||||||
|
|
||||||
|
/* reset handles now */
|
||||||
|
*tsb->h1 = *tsb->h2;
|
||||||
|
*tsb->h3 = *tsb->h2;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* free memory required for tarray */
|
||||||
|
MEM_freeN(tarray);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* free memory required for tarray */
|
|
||||||
MEM_freeN(tarray);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* recalculate handles */
|
/* recalculate handles */
|
||||||
calchandles_fcurve(fcu);
|
calchandles_fcurve(fcu);
|
||||||
}
|
}
|
||||||
@ -371,7 +371,6 @@ ListBase animcopybuf = {NULL, NULL};
|
|||||||
static float animcopy_firstframe= 999999999.0f;
|
static float animcopy_firstframe= 999999999.0f;
|
||||||
|
|
||||||
/* datatype for use in copy/paste buffer */
|
/* datatype for use in copy/paste buffer */
|
||||||
// XXX F-Curve editor should use this too
|
|
||||||
typedef struct tAnimCopybufItem {
|
typedef struct tAnimCopybufItem {
|
||||||
struct tAnimCopybufItem *next, *prev;
|
struct tAnimCopybufItem *next, *prev;
|
||||||
|
|
||||||
|
@ -1330,7 +1330,7 @@ static void ui_block_func_MENUSTR(bContext *C, uiLayout *layout, void *arg_str)
|
|||||||
{
|
{
|
||||||
uiBlock *block= uiLayoutGetBlock(layout);
|
uiBlock *block= uiLayoutGetBlock(layout);
|
||||||
uiPopupBlockHandle *handle= block->handle;
|
uiPopupBlockHandle *handle= block->handle;
|
||||||
uiLayout *split, *column;
|
uiLayout *split, *column=NULL;
|
||||||
uiBut *bt;
|
uiBut *bt;
|
||||||
MenuData *md;
|
MenuData *md;
|
||||||
MenuEntry *entry;
|
MenuEntry *entry;
|
||||||
|
@ -1318,7 +1318,7 @@ ListBase uiTemplateList(uiLayout *layout, bContext *C, PointerRNA *ptr, char *pr
|
|||||||
Panel *pa;
|
Panel *pa;
|
||||||
ListBase lb, *itemlb;
|
ListBase lb, *itemlb;
|
||||||
char *name, str[32];
|
char *name, str[32];
|
||||||
int icon=0, i= 0, activei= 0, len, items, found, min, max;
|
int icon=0, i= 0, activei= 0, len= 0, items, found, min, max;
|
||||||
|
|
||||||
lb.first= lb.last= NULL;
|
lb.first= lb.last= NULL;
|
||||||
|
|
||||||
|
@ -1946,12 +1946,12 @@ static void widget_pulldownbut(uiWidgetColors *wcol, rcti *rect, int state, int
|
|||||||
{
|
{
|
||||||
if(state & UI_ACTIVE) {
|
if(state & UI_ACTIVE) {
|
||||||
uiWidgetBase wtb;
|
uiWidgetBase wtb;
|
||||||
float rad= 0.5f*(rect->ymax - rect->ymin);
|
float rad= 0.5f*(rect->ymax - rect->ymin); // 4.0f
|
||||||
|
|
||||||
widget_init(&wtb);
|
widget_init(&wtb);
|
||||||
|
|
||||||
/* half rounded */
|
/* half rounded */
|
||||||
round_box_edges(&wtb, 15, rect, 4.0f);
|
round_box_edges(&wtb, 15, rect, rad);
|
||||||
|
|
||||||
widgetbase_draw(&wtb, wcol);
|
widgetbase_draw(&wtb, wcol);
|
||||||
}
|
}
|
||||||
@ -2045,12 +2045,12 @@ static void widget_but(uiWidgetColors *wcol, rcti *rect, int state, int roundbox
|
|||||||
static void widget_roundbut(uiWidgetColors *wcol, rcti *rect, int state, int roundboxalign)
|
static void widget_roundbut(uiWidgetColors *wcol, rcti *rect, int state, int roundboxalign)
|
||||||
{
|
{
|
||||||
uiWidgetBase wtb;
|
uiWidgetBase wtb;
|
||||||
float rad= 0.5f*(rect->ymax - rect->ymin);
|
float rad= 5.0f; //0.5f*(rect->ymax - rect->ymin);
|
||||||
|
|
||||||
widget_init(&wtb);
|
widget_init(&wtb);
|
||||||
|
|
||||||
/* half rounded */
|
/* half rounded */
|
||||||
round_box_edges(&wtb, roundboxalign, rect, 5.0f);
|
round_box_edges(&wtb, roundboxalign, rect, rad);
|
||||||
|
|
||||||
widgetbase_draw(&wtb, wcol);
|
widgetbase_draw(&wtb, wcol);
|
||||||
}
|
}
|
||||||
|
@ -5274,7 +5274,10 @@ void draw_outliner(const bContext *C)
|
|||||||
sizex_rna= MAX2(OL_RNA_COLX, sizex_rna+OL_RNA_COL_SPACEX);
|
sizex_rna= MAX2(OL_RNA_COLX, sizex_rna+OL_RNA_COL_SPACEX);
|
||||||
|
|
||||||
/* get width of data (for setting 'tot' rect, this is column 1 + column 2 + a bit extra) */
|
/* get width of data (for setting 'tot' rect, this is column 1 + column 2 + a bit extra) */
|
||||||
sizex= sizex_rna + OL_RNA_COL_SIZEX + 50;
|
if (soops->outlinevis == SO_KEYMAP)
|
||||||
|
sizex= sizex_rna + OL_RNA_COL_SIZEX*3 + 50; // XXX this is only really a quick hack to make this wide enough...
|
||||||
|
else
|
||||||
|
sizex= sizex_rna + OL_RNA_COL_SIZEX + 50;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
/* width must take into account restriction columns (if visible) so that entries will still be visible */
|
/* width must take into account restriction columns (if visible) so that entries will still be visible */
|
||||||
|
@ -291,7 +291,7 @@ static int sequencer_add_movie_strip_exec(bContext *C, wmOperator *op)
|
|||||||
struct anim *an;
|
struct anim *an;
|
||||||
char filename[FILE_MAX];
|
char filename[FILE_MAX];
|
||||||
|
|
||||||
Sequence *seq, *soundseq; /* generic strip vars */
|
Sequence *seq, *soundseq=NULL; /* generic strip vars */
|
||||||
Strip *strip;
|
Strip *strip;
|
||||||
StripElem *se;
|
StripElem *se;
|
||||||
|
|
||||||
|
@ -1005,9 +1005,10 @@ static uiBlock *view3d_object_mirrormenu(bContext *C, ARegion *ar, void *arg_unu
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if 0
|
||||||
static void view3d_edit_object_transformmenu(bContext *C, uiLayout *layout, void *arg_unused)
|
static void view3d_edit_object_transformmenu(bContext *C, uiLayout *layout, void *arg_unused)
|
||||||
{
|
{
|
||||||
#if 0
|
#if 0 // XXX not used anymore
|
||||||
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Apply Scale/Rotation to ObData|Ctrl A, 1", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 6, "");
|
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Apply Scale/Rotation to ObData|Ctrl A, 1", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 6, "");
|
||||||
apply_objects_locrot();
|
apply_objects_locrot();
|
||||||
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Apply Visual Transform|Ctrl A, 2", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 7, "");
|
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Apply Visual Transform|Ctrl A, 2", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 7, "");
|
||||||
@ -1024,6 +1025,7 @@ static void view3d_edit_object_transformmenu(bContext *C, uiLayout *layout, void
|
|||||||
uiItemO(layout, NULL, 0, "OBJECT_OT_scale_clear");
|
uiItemO(layout, NULL, 0, "OBJECT_OT_scale_clear");
|
||||||
uiItemO(layout, NULL, 0, "OBJECT_OT_origin_clear");
|
uiItemO(layout, NULL, 0, "OBJECT_OT_origin_clear");
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
static void do_view3d_edit_object_makelocalmenu(bContext *C, void *arg, int event)
|
static void do_view3d_edit_object_makelocalmenu(bContext *C, void *arg, int event)
|
||||||
|
@ -32,7 +32,7 @@
|
|||||||
/* flags */
|
/* flags */
|
||||||
#define MOD_SMOKE_HIGHRES (1<<1) /* enable high resolution */
|
#define MOD_SMOKE_HIGHRES (1<<1) /* enable high resolution */
|
||||||
#define MOD_SMOKE_DISSOLVE (1<<2) /* let smoke dissolve */
|
#define MOD_SMOKE_DISSOLVE (1<<2) /* let smoke dissolve */
|
||||||
#define MOD_SMOKE_DISSOLVE_LOG (1<<3) /* using 1/x for dissolve *
|
#define MOD_SMOKE_DISSOLVE_LOG (1<<3) /* using 1/x for dissolve */
|
||||||
|
|
||||||
/* noise */
|
/* noise */
|
||||||
#define MOD_SMOKE_NOISEWAVE (1<<0)
|
#define MOD_SMOKE_NOISEWAVE (1<<0)
|
||||||
|
@ -79,12 +79,14 @@ static void rna_Smoke_reset_dependancy(bContext *C, PointerRNA *ptr)
|
|||||||
rna_Smoke_dependency_update(C, ptr);
|
rna_Smoke_dependency_update(C, ptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if 0
|
||||||
static void rna_Smoke_redraw(bContext *C, PointerRNA *ptr)
|
static void rna_Smoke_redraw(bContext *C, PointerRNA *ptr)
|
||||||
{
|
{
|
||||||
SmokeDomainSettings *settings = (SmokeDomainSettings*)ptr->data;
|
SmokeDomainSettings *settings = (SmokeDomainSettings*)ptr->data;
|
||||||
|
|
||||||
// settings->flags |= MOD_SMOKE_VIEW_REDRAWNICE;
|
settings->flags |= MOD_SMOKE_VIEW_REDRAWNICE;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
static char *rna_SmokeDomainSettings_path(PointerRNA *ptr)
|
static char *rna_SmokeDomainSettings_path(PointerRNA *ptr)
|
||||||
{
|
{
|
||||||
|
@ -31,4 +31,4 @@ void free_volume_precache(Render *re);
|
|||||||
int point_inside_volume_objectinstance(ObjectInstanceRen *obi, float *co);
|
int point_inside_volume_objectinstance(ObjectInstanceRen *obi, float *co);
|
||||||
int using_lightcache(Material *ma);
|
int using_lightcache(Material *ma);
|
||||||
|
|
||||||
#define VOL_MS_TIMESTEP 0.1f
|
#define VOL_MS_TIMESTEP 0.1f
|
||||||
|
@ -44,4 +44,4 @@ void shade_volume_shadow(struct ShadeInput *shi, struct ShadeResult *shr, struct
|
|||||||
#define VOL_BOUNDS_SS 1
|
#define VOL_BOUNDS_SS 1
|
||||||
|
|
||||||
#define VOL_SHADE_OUTSIDE 0
|
#define VOL_SHADE_OUTSIDE 0
|
||||||
#define VOL_SHADE_INSIDE 1
|
#define VOL_SHADE_INSIDE 1
|
||||||
|
@ -324,7 +324,7 @@ void accum_density(void *userdata, int index, float squared_dist)
|
|||||||
{
|
{
|
||||||
PointDensityRangeData *pdr = (PointDensityRangeData *)userdata;
|
PointDensityRangeData *pdr = (PointDensityRangeData *)userdata;
|
||||||
const float dist = (pdr->squared_radius - squared_dist) / pdr->squared_radius * 0.5f;
|
const float dist = (pdr->squared_radius - squared_dist) / pdr->squared_radius * 0.5f;
|
||||||
float density;
|
float density = 0.0f;
|
||||||
|
|
||||||
if (pdr->falloff_type == TEX_PD_FALLOFF_STD)
|
if (pdr->falloff_type == TEX_PD_FALLOFF_STD)
|
||||||
density = dist;
|
density = dist;
|
||||||
|
@ -685,4 +685,4 @@ void shade_volume_inside(ShadeInput *shi, ShadeResult *shr)
|
|||||||
volume_trace(shi, shr, VOL_SHADE_INSIDE);
|
volume_trace(shi, shr, VOL_SHADE_INSIDE);
|
||||||
|
|
||||||
shi->mat = mat_backup;
|
shi->mat = mat_backup;
|
||||||
}
|
}
|
||||||
|
@ -162,7 +162,7 @@ void init_frame_smoke(Render *re, VoxelData *vd, Tex *tex)
|
|||||||
ob= vd->object;
|
ob= vd->object;
|
||||||
|
|
||||||
/* draw code for smoke */
|
/* draw code for smoke */
|
||||||
if(md = (ModifierData *)modifiers_findByType(ob, eModifierType_Smoke))
|
if( (md = (ModifierData *)modifiers_findByType(ob, eModifierType_Smoke)) )
|
||||||
{
|
{
|
||||||
SmokeModifierData *smd = (SmokeModifierData *)md;
|
SmokeModifierData *smd = (SmokeModifierData *)md;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user