Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/blenkernel/intern')
-rw-r--r--source/blender/blenkernel/intern/BME_tools.c2
-rw-r--r--source/blender/blenkernel/intern/action.c2
-rw-r--r--source/blender/blenkernel/intern/blender.c2
-rw-r--r--source/blender/blenkernel/intern/bmfont.c2
-rw-r--r--source/blender/blenkernel/intern/colortools.c6
-rw-r--r--source/blender/blenkernel/intern/customdata.c6
-rw-r--r--source/blender/blenkernel/intern/depsgraph.c2
-rw-r--r--source/blender/blenkernel/intern/icons.c2
-rw-r--r--source/blender/blenkernel/intern/image.c111
-rw-r--r--source/blender/blenkernel/intern/nla.c2
-rw-r--r--source/blender/blenkernel/intern/object.c3
-rw-r--r--source/blender/blenkernel/intern/pointcache.c2
-rw-r--r--source/blender/blenkernel/intern/sca.c14
-rw-r--r--source/blender/blenkernel/intern/sequencer.c28
-rw-r--r--source/blender/blenkernel/intern/softbody.c2
-rw-r--r--source/blender/blenkernel/intern/writeavi.c5
16 files changed, 80 insertions, 111 deletions
diff --git a/source/blender/blenkernel/intern/BME_tools.c b/source/blender/blenkernel/intern/BME_tools.c
index b4919dd8cf3..7d9c9a431f8 100644
--- a/source/blender/blenkernel/intern/BME_tools.c
+++ b/source/blender/blenkernel/intern/BME_tools.c
@@ -49,7 +49,7 @@ BME_TransData_Head *BME_init_transdata(int bufsize) {
BME_TransData_Head *td;
td = MEM_callocN(sizeof(BME_TransData_Head), "BMesh transdata header");
- td->gh = BLI_ghash_new(BLI_ghashutil_ptrhash,BLI_ghashutil_ptrcmp);
+ td->gh = BLI_ghash_new(BLI_ghashutil_ptrhash,BLI_ghashutil_ptrcmp, "BME_init_transdata gh");
td->ma = BLI_memarena_new(bufsize, "BME_TransData arena");
BLI_memarena_use_calloc(td->ma);
diff --git a/source/blender/blenkernel/intern/action.c b/source/blender/blenkernel/intern/action.c
index c5705a0f619..50552d33c41 100644
--- a/source/blender/blenkernel/intern/action.c
+++ b/source/blender/blenkernel/intern/action.c
@@ -549,7 +549,7 @@ void make_pose_channels_hash(bPose *pose)
if(!pose->chanhash) {
bPoseChannel *pchan;
- pose->chanhash= BLI_ghash_new(BLI_ghashutil_strhash, BLI_ghashutil_strcmp);
+ pose->chanhash= BLI_ghash_new(BLI_ghashutil_strhash, BLI_ghashutil_strcmp, "make_pose_chan gh");
for(pchan=pose->chanbase.first; pchan; pchan=pchan->next)
BLI_ghash_insert(pose->chanhash, pchan->name, pchan);
}
diff --git a/source/blender/blenkernel/intern/blender.c b/source/blender/blenkernel/intern/blender.c
index 3ccf068d6c8..42c492d3237 100644
--- a/source/blender/blenkernel/intern/blender.c
+++ b/source/blender/blenkernel/intern/blender.c
@@ -100,7 +100,7 @@ void free_blender(void)
BKE_spacetypes_free(); /* after free main, it uses space callbacks */
- IMB_freeImBufdata(); /* imbuf lib */
+ IMB_exit();
free_nodesystem();
}
diff --git a/source/blender/blenkernel/intern/bmfont.c b/source/blender/blenkernel/intern/bmfont.c
index 1b053b45859..e2a6c04450b 100644
--- a/source/blender/blenkernel/intern/bmfont.c
+++ b/source/blender/blenkernel/intern/bmfont.c
@@ -174,7 +174,7 @@ void detectBitmapFont(ImBuf *ibuf)
unsigned short version;
int i;
- if (ibuf != NULL) {
+ if (ibuf != NULL && ibuf->rect != NULL) {
// bitmap must have an x size that is a power of two
if (is_power_of_two(ibuf->x)) {
rect = (unsigned char *) (ibuf->rect + (ibuf->x * (ibuf->y - 1)));
diff --git a/source/blender/blenkernel/intern/colortools.c b/source/blender/blenkernel/intern/colortools.c
index 44a52964f2a..66ebac2e25e 100644
--- a/source/blender/blenkernel/intern/colortools.c
+++ b/source/blender/blenkernel/intern/colortools.c
@@ -939,12 +939,12 @@ void scopes_update(Scopes *scopes, ImBuf *ibuf, int use_color_management)
{
int x, y, c, n, nl;
double div, divl;
- float *rf;
- unsigned char *rc;
+ float *rf=NULL;
+ unsigned char *rc=NULL;
unsigned int *bin_r, *bin_g, *bin_b, *bin_lum;
int savedlines, saveline;
float rgb[3], ycc[3];
- int ycc_mode;
+ int ycc_mode=-1;
if (scopes->ok == 1 ) return;
diff --git a/source/blender/blenkernel/intern/customdata.c b/source/blender/blenkernel/intern/customdata.c
index a973c33ca54..69327eccfaf 100644
--- a/source/blender/blenkernel/intern/customdata.c
+++ b/source/blender/blenkernel/intern/customdata.c
@@ -559,7 +559,7 @@ static int layerRead_mdisps(CDataFile *cdf, void *data, int count)
d[i].disps = MEM_callocN(sizeof(float)*3*d[i].totdisp, "mdisps read");
if(!cdf_read_data(cdf, d[i].totdisp*3*sizeof(float), d[i].disps)) {
- printf("failed to read %d/%d %d\n", i, count, d[i].totdisp);
+ printf("failed to read multires displacement %d/%d %d\n", i, count, d[i].totdisp);
return 0;
}
}
@@ -574,7 +574,7 @@ static int layerWrite_mdisps(CDataFile *cdf, void *data, int count)
for(i = 0; i < count; ++i) {
if(!cdf_write_data(cdf, d[i].totdisp*3*sizeof(float), d[i].disps)) {
- printf("failed to write %d/%d %d\n", i, count, d[i].totdisp);
+ printf("failed to write multires displacement %d/%d %d\n", i, count, d[i].totdisp);
return 0;
}
}
@@ -2487,9 +2487,9 @@ void CustomData_external_add(CustomData *data, ID *id, int type, int totelem, co
if(!external) {
external= MEM_callocN(sizeof(CustomDataExternal), "CustomDataExternal");
- BLI_strncpy(external->filename, filename, sizeof(external->filename));
data->external= external;
}
+ BLI_strncpy(external->filename, filename, sizeof(external->filename));
layer->flag |= CD_FLAG_EXTERNAL|CD_FLAG_IN_MEMORY;
}
diff --git a/source/blender/blenkernel/intern/depsgraph.c b/source/blender/blenkernel/intern/depsgraph.c
index f63e28fb464..1e5f276ba95 100644
--- a/source/blender/blenkernel/intern/depsgraph.c
+++ b/source/blender/blenkernel/intern/depsgraph.c
@@ -803,7 +803,7 @@ DagNode * dag_add_node (DagForest *forest, void * fob)
}
if(!forest->nodeHash)
- forest->nodeHash= BLI_ghash_new(BLI_ghashutil_ptrhash, BLI_ghashutil_ptrcmp);
+ forest->nodeHash= BLI_ghash_new(BLI_ghashutil_ptrhash, BLI_ghashutil_ptrcmp, "dag_add_node gh");
BLI_ghash_insert(forest->nodeHash, fob, node);
}
diff --git a/source/blender/blenkernel/intern/icons.c b/source/blender/blenkernel/intern/icons.c
index a9582506cee..29314fb4865 100644
--- a/source/blender/blenkernel/intern/icons.c
+++ b/source/blender/blenkernel/intern/icons.c
@@ -101,7 +101,7 @@ void BKE_icons_init(int first_dyn_id)
gFirstIconId = first_dyn_id;
if (!gIcons)
- gIcons = BLI_ghash_new(BLI_ghashutil_inthash, BLI_ghashutil_intcmp);
+ gIcons = BLI_ghash_new(BLI_ghashutil_inthash, BLI_ghashutil_intcmp, "icons_init gh");
}
void BKE_icons_free()
diff --git a/source/blender/blenkernel/intern/image.c b/source/blender/blenkernel/intern/image.c
index 2c71cc9310a..eb478eaddf5 100644
--- a/source/blender/blenkernel/intern/image.c
+++ b/source/blender/blenkernel/intern/image.c
@@ -92,58 +92,6 @@
/* ******** IMAGE PROCESSING ************* */
-/* used by sequencer and image premul option - IMA_DO_PREMUL */
-void converttopremul(struct ImBuf *ibuf)
-{
- int x, y;
-
- if(ibuf==0) return;
- if (ibuf->rect) {
- int val;
- char *cp;
- if(ibuf->depth==24) { /* put alpha at 255 */
- cp= (char *)(ibuf->rect);
- for(y=0; y<ibuf->y; y++) {
- for(x=0; x<ibuf->x; x++, cp+=4) {
- cp[3]= 255;
- }
- }
- } else {
- cp= (char *)(ibuf->rect);
- for(y=0; y<ibuf->y; y++) {
- for(x=0; x<ibuf->x; x++, cp+=4) {
- val= cp[3];
- cp[0]= (cp[0]*val)>>8;
- cp[1]= (cp[1]*val)>>8;
- cp[2]= (cp[2]*val)>>8;
- }
- }
- }
- }
- if (ibuf->rect_float) {
- float val;
- float *cp;
- if(ibuf->depth==24) { /* put alpha at 1.0 */
- cp= ibuf->rect_float;;
- for(y=0; y<ibuf->y; y++) {
- for(x=0; x<ibuf->x; x++, cp+=4) {
- cp[3]= 1.0;
- }
- }
- } else {
- cp= ibuf->rect_float;
- for(y=0; y<ibuf->y; y++) {
- for(x=0; x<ibuf->x; x++, cp+=4) {
- val= cp[3];
- cp[0]= cp[0]*val;
- cp[1]= cp[1]*val;
- cp[2]= cp[2]*val;
- }
- }
- }
- }
-}
-
static void de_interlace_ng(struct ImBuf *ibuf) /* neogeo fields */
{
struct ImBuf * tbuf1, * tbuf2;
@@ -735,8 +683,6 @@ int BKE_imtype_to_ftype(int imtype)
return TGA;
else if(imtype==R_RAWTGA)
return RAWTGA;
- else if(imtype==R_HAMX)
- return AN_hamx;
#ifdef WITH_OPENJPEG
else if(imtype==R_JP2)
return JP2;
@@ -773,8 +719,6 @@ int BKE_ftype_to_imtype(int ftype)
return R_TARGA;
else if(ftype & RAWTGA)
return R_RAWTGA;
- else if(ftype == AN_hamx)
- return R_HAMX;
#ifdef WITH_OPENJPEG
else if(ftype & JP2)
return R_JP2;
@@ -787,7 +731,6 @@ int BKE_ftype_to_imtype(int ftype)
int BKE_imtype_is_movie(int imtype)
{
switch(imtype) {
- case R_MOVIE:
case R_AVIRAW:
case R_AVIJPEG:
case R_AVICODEC:
@@ -864,7 +807,7 @@ void BKE_add_image_extension(char *string, int imtype)
extension= ".jp2";
}
#endif
- else { // R_MOVIE, R_AVICODEC, R_AVIRAW, R_AVIJPEG, R_JPEG90, R_QUICKTIME etc
+ else { // R_AVICODEC, R_AVIRAW, R_AVIJPEG, R_JPEG90, R_QUICKTIME etc
if(!( BLI_testextensie(string, ".jpg") || BLI_testextensie(string, ".jpeg")))
extension= ".jpg";
}
@@ -1211,15 +1154,16 @@ void BKE_stamp_info(Scene *scene, struct ImBuf *ibuf)
/* fill all the data values, no prefix */
stampdata(scene, &stamp_data, 0);
- if (stamp_data.file[0]) IMB_imginfo_change_field (ibuf, "File", stamp_data.file);
- if (stamp_data.note[0]) IMB_imginfo_change_field (ibuf, "Note", stamp_data.note);
- if (stamp_data.date[0]) IMB_imginfo_change_field (ibuf, "Date", stamp_data.date);
- if (stamp_data.marker[0]) IMB_imginfo_change_field (ibuf, "Marker", stamp_data.marker);
- if (stamp_data.time[0]) IMB_imginfo_change_field (ibuf, "Time", stamp_data.time);
- if (stamp_data.frame[0]) IMB_imginfo_change_field (ibuf, "Frame", stamp_data.frame);
- if (stamp_data.camera[0]) IMB_imginfo_change_field (ibuf, "Camera", stamp_data.camera);
- if (stamp_data.scene[0]) IMB_imginfo_change_field (ibuf, "Scene", stamp_data.scene);
- if (stamp_data.strip[0]) IMB_imginfo_change_field (ibuf, "Strip", stamp_data.strip);
+ if (stamp_data.file[0]) IMB_metadata_change_field (ibuf, "File", stamp_data.file);
+ if (stamp_data.note[0]) IMB_metadata_change_field (ibuf, "Note", stamp_data.note);
+ if (stamp_data.date[0]) IMB_metadata_change_field (ibuf, "Date", stamp_data.date);
+ if (stamp_data.marker[0]) IMB_metadata_change_field (ibuf, "Marker", stamp_data.marker);
+ if (stamp_data.time[0]) IMB_metadata_change_field (ibuf, "Time", stamp_data.time);
+ if (stamp_data.frame[0]) IMB_metadata_change_field (ibuf, "Frame", stamp_data.frame);
+ if (stamp_data.camera[0]) IMB_metadata_change_field (ibuf, "Camera", stamp_data.camera);
+ if (stamp_data.scene[0]) IMB_metadata_change_field (ibuf, "Scene", stamp_data.scene);
+ if (stamp_data.strip[0]) IMB_metadata_change_field (ibuf, "Strip", stamp_data.strip);
+ if (stamp_data.rendertime[0]) IMB_metadata_change_field (ibuf, "RenderTime", stamp_data.rendertime);
}
int BKE_write_ibuf(Scene *scene, ImBuf *ibuf, char *name, int imtype, int subimtype, int quality)
@@ -1273,9 +1217,6 @@ int BKE_write_ibuf(Scene *scene, ImBuf *ibuf, char *name, int imtype, int subimt
else if(imtype==R_RAWTGA) {
ibuf->ftype= RAWTGA;
}
- else if(imtype==R_HAMX) {
- ibuf->ftype= AN_hamx;
- }
#ifdef WITH_OPENJPEG
else if(imtype==R_JP2) {
if(quality < 10) quality= 90;
@@ -1299,7 +1240,7 @@ int BKE_write_ibuf(Scene *scene, ImBuf *ibuf, char *name, int imtype, int subimt
}
#endif
else {
- /* R_JPEG90, R_MOVIE, etc. default we save jpegs */
+ /* R_JPEG90, etc. default we save jpegs */
if(quality < 10) quality= 90;
ibuf->ftype= JPG|quality;
if(ibuf->depth==32) ibuf->depth= 24; /* unsupported feature only confuses other s/w */
@@ -1595,6 +1536,7 @@ static ImBuf *image_load_sequence_file(Image *ima, ImageUser *iuser, int frame)
struct ImBuf *ibuf;
unsigned short numlen;
char name[FILE_MAX], head[FILE_MAX], tail[FILE_MAX];
+ int flag;
/* XXX temp stuff? */
if(ima->lastframe != frame)
@@ -1611,8 +1553,12 @@ static ImBuf *image_load_sequence_file(Image *ima, ImageUser *iuser, int frame)
else
BLI_path_abs(name, G.sce);
+ flag= IB_rect|IB_multilayer;
+ if(ima->flag & IMA_DO_PREMUL)
+ flag |= IB_premul;
+
/* read ibuf */
- ibuf = IMB_loadiffname(name, IB_rect|IB_multilayer);
+ ibuf = IMB_loadiffname(name, flag);
if(G.f & G_DEBUG) printf("loaded %s\n", name);
if (ibuf) {
@@ -1632,10 +1578,6 @@ static ImBuf *image_load_sequence_file(Image *ima, ImageUser *iuser, int frame)
image_initialize_after_load(ima, ibuf);
image_assign_ibuf(ima, ibuf, 0, frame);
#endif
-
- if(ima->flag & IMA_DO_PREMUL)
- converttopremul(ibuf);
-
}
else
ima->ok= 0;
@@ -1718,7 +1660,7 @@ static ImBuf *image_load_movie_file(Image *ima, ImageUser *iuser, int frame)
else
BLI_path_abs(str, G.sce);
- ima->anim = openanim(str, IB_cmap | IB_rect);
+ ima->anim = openanim(str, IB_rect);
/* let's initialize this user */
if(ima->anim && iuser && iuser->frames==0)
@@ -1749,21 +1691,25 @@ static ImBuf *image_load_movie_file(Image *ima, ImageUser *iuser, int frame)
return ibuf;
}
-/* cfra used for # code, Image can only have this # for all its users */
+/* cfra used for # code, Image can only have this # for all its users
+ * warning, 'iuser' can be NULL */
static ImBuf *image_load_image_file(Image *ima, ImageUser *iuser, int cfra)
{
struct ImBuf *ibuf;
char str[FILE_MAX];
- int assign = 0;
+ int assign = 0, flag;
/* always ensure clean ima */
image_free_buffers(ima);
/* is there a PackedFile with this image ? */
if (ima->packedfile) {
- ibuf = IMB_ibImageFromMemory((int *) ima->packedfile->data, ima->packedfile->size, IB_rect|IB_multilayer);
+ ibuf = IMB_ibImageFromMemory((unsigned char*)ima->packedfile->data, ima->packedfile->size, IB_rect|IB_multilayer);
}
else {
+ flag= IB_rect|IB_multilayer|IB_metadata;
+ if(ima->flag & IMA_DO_PREMUL)
+ flag |= IB_premul;
/* get the right string */
BLI_strncpy(str, ima->name, sizeof(str));
@@ -1775,7 +1721,7 @@ static ImBuf *image_load_image_file(Image *ima, ImageUser *iuser, int cfra)
BLI_path_frame(str, cfra, 0);
/* read ibuf */
- ibuf = IMB_loadiffname(str, IB_rect|IB_multilayer|IB_imginfo);
+ ibuf = IMB_loadiffname(str, flag);
}
if (ibuf) {
@@ -1797,9 +1743,6 @@ static ImBuf *image_load_image_file(Image *ima, ImageUser *iuser, int cfra)
if ((ima->packedfile == NULL) && (G.fileflags & G_AUTOPACK))
ima->packedfile = newPackedFile(NULL, str);
}
-
- if(ima->flag & IMA_DO_PREMUL)
- converttopremul(ibuf);
}
else
ima->ok= 0;
diff --git a/source/blender/blenkernel/intern/nla.c b/source/blender/blenkernel/intern/nla.c
index 902d6b8e9bf..8d2ad49e7bf 100644
--- a/source/blender/blenkernel/intern/nla.c
+++ b/source/blender/blenkernel/intern/nla.c
@@ -1243,7 +1243,7 @@ void BKE_nlastrip_validate_name (AnimData *adt, NlaStrip *strip)
* - this is easier than iterating over all the tracks+strips hierarchy everytime
* (and probably faster)
*/
- gh= BLI_ghash_new(BLI_ghashutil_strhash, BLI_ghashutil_strcmp);
+ gh= BLI_ghash_new(BLI_ghashutil_strhash, BLI_ghashutil_strcmp, "nlastrip_validate_name gh");
for (nlt= adt->nla_tracks.first; nlt; nlt= nlt->next) {
for (tstrip= nlt->strips.first; tstrip; tstrip= tstrip->next) {
diff --git a/source/blender/blenkernel/intern/object.c b/source/blender/blenkernel/intern/object.c
index baa1caee49b..24c23e5ea41 100644
--- a/source/blender/blenkernel/intern/object.c
+++ b/source/blender/blenkernel/intern/object.c
@@ -1140,12 +1140,13 @@ ParticleSystem *copy_particlesystem(ParticleSystem *psys)
}
BLI_duplicatelist(&psysn->targets, &psys->targets);
-
+
psysn->pathcache= NULL;
psysn->childcache= NULL;
psysn->edit= NULL;
psysn->frand= NULL;
psysn->pdd= NULL;
+ psysn->effectors= NULL;
psysn->pathcachebufs.first = psysn->pathcachebufs.last = NULL;
psysn->childcachebufs.first = psysn->childcachebufs.last = NULL;
diff --git a/source/blender/blenkernel/intern/pointcache.c b/source/blender/blenkernel/intern/pointcache.c
index 25f8dc9bd56..b42ac6fdf49 100644
--- a/source/blender/blenkernel/intern/pointcache.c
+++ b/source/blender/blenkernel/intern/pointcache.c
@@ -1076,7 +1076,7 @@ static int ptcache_path(PTCacheID *pid, char *filename)
char file[MAX_PTCACHE_PATH]; /* we dont want the dir, only the file */
char *blendfilename;
- blendfilename= (lib)? lib->filename: G.sce;
+ blendfilename= (lib && (pid->cache->flag & PTCACHE_IGNORE_LIBPATH)==0) ? lib->filename: G.sce;
BLI_split_dirfile(blendfilename, NULL, file);
i = strlen(file);
diff --git a/source/blender/blenkernel/intern/sca.c b/source/blender/blenkernel/intern/sca.c
index 060c9312f99..5a06c251b88 100644
--- a/source/blender/blenkernel/intern/sca.c
+++ b/source/blender/blenkernel/intern/sca.c
@@ -98,6 +98,8 @@ void init_sensor(bSensor *sens)
/* also use when sensor changes type */
bNearSensor *ns;
bMouseSensor *ms;
+ bJoystickSensor *js;
+ bRaySensor *rs;
if(sens->data) MEM_freeN(sens->data);
sens->data= NULL;
@@ -145,12 +147,18 @@ void init_sensor(bSensor *sens)
break;
case SENS_RAY:
sens->data= MEM_callocN(sizeof(bRaySensor), "raysens");
+ rs = sens->data;
+ rs->range = 0.01f;
break;
case SENS_MESSAGE:
sens->data= MEM_callocN(sizeof(bMessageSensor), "messagesens");
break;
case SENS_JOYSTICK:
sens->data= MEM_callocN(sizeof(bJoystickSensor), "joysticksens");
+ js= sens->data;
+ js->hatf = SENS_JOY_HAT_UP;
+ js->axis = 1;
+ js->hat = 1;
break;
default:
; /* this is very severe... I cannot make any memory for this */
@@ -383,7 +391,9 @@ void copy_actuators(ListBase *lbn, ListBase *lbo)
void init_actuator(bActuator *act)
{
/* also use when actuator changes type */
+ bCameraActuator *ca;
bObjectActuator *oa;
+ bRandomActuator *ra;
bSoundActuator *sa;
if(act->data) MEM_freeN(act->data);
@@ -417,6 +427,8 @@ void init_actuator(bActuator *act)
break;
case ACT_CAMERA:
act->data= MEM_callocN(sizeof(bCameraActuator), "camact");
+ ca = act->data;
+ ca->axis = ACT_CAMERA_X;
break;
case ACT_EDIT_OBJECT:
act->data= MEM_callocN(sizeof(bEditObjectActuator), "editobact");
@@ -432,6 +444,8 @@ void init_actuator(bActuator *act)
break;
case ACT_RANDOM:
act->data= MEM_callocN(sizeof(bRandomActuator), "random act");
+ ra=act->data;
+ ra->float_arg_1 = 0.1f;
break;
case ACT_MESSAGE:
act->data= MEM_callocN(sizeof(bMessageActuator), "message act");
diff --git a/source/blender/blenkernel/intern/sequencer.c b/source/blender/blenkernel/intern/sequencer.c
index e48c4ea718c..f1e60ee2cfd 100644
--- a/source/blender/blenkernel/intern/sequencer.c
+++ b/source/blender/blenkernel/intern/sequencer.c
@@ -566,9 +566,12 @@ void calc_sequence(Scene *scene, Sequence *seq)
}
}
-void reload_sequence_new_file(Scene *scene, Sequence * seq)
+/* note: caller should run calc_sequence(scene, seq) */
+void reload_sequence_new_file(Scene *scene, Sequence * seq, int lock_range)
{
char str[FILE_MAXDIR+FILE_MAXFILE];
+ int prev_startdisp, prev_enddisp;
+ /* note: dont rename the strip, will break animation curves */
if (!(seq->type == SEQ_MOVIE || seq->type == SEQ_IMAGE ||
seq->type == SEQ_SOUND ||
@@ -576,6 +579,14 @@ void reload_sequence_new_file(Scene *scene, Sequence * seq)
return;
}
+ if(lock_range) {
+ /* keep so we dont have to move the actual start and end points (only the data) */
+ calc_sequence_disp(scene, seq);
+ prev_startdisp= seq->startdisp;
+ prev_enddisp= seq->enddisp;
+ }
+
+
new_tstripdata(seq);
if (seq->type != SEQ_SCENE && seq->type != SEQ_META &&
@@ -587,6 +598,7 @@ void reload_sequence_new_file(Scene *scene, Sequence * seq)
if (seq->type == SEQ_IMAGE) {
/* Hack? */
size_t olen = MEM_allocN_len(seq->strip->stripdata)/sizeof(struct StripElem);
+
seq->len = olen;
seq->len -= seq->anim_startofs;
seq->len -= seq->anim_endofs;
@@ -621,6 +633,7 @@ void reload_sequence_new_file(Scene *scene, Sequence * seq)
}
seq->strip->len = seq->len;
} else if (seq->type == SEQ_SCENE) {
+ /* 'seq->scenenr' should be replaced with something more reliable */
Scene * sce = G.main->scene.first;
int nr = 1;
@@ -637,9 +650,6 @@ void reload_sequence_new_file(Scene *scene, Sequence * seq)
} else {
sce = seq->scene;
}
-
- BLI_strncpy(seq->name+2, sce->id.name + 2, SEQ_NAME_MAXSTR-2);
- seqbase_unique_name_recursive(&scene->ed->seqbase, seq);
seq->len= seq->scene->r.efra - seq->scene->r.sfra + 1;
seq->len -= seq->anim_startofs;
@@ -652,6 +662,12 @@ void reload_sequence_new_file(Scene *scene, Sequence * seq)
free_proxy_seq(seq);
+ if(lock_range) {
+ seq_tx_set_final_left(seq, prev_startdisp);
+ seq_tx_set_final_right(seq, prev_enddisp);
+ seq_single_fix(seq);
+ }
+
calc_sequence(scene, seq);
}
@@ -1777,7 +1793,7 @@ static void input_preprocess(Scene *scene, Sequence *seq, TStripElem *se, int cf
if(seq->flag & SEQ_MAKE_PREMUL) {
if(se->ibuf->depth == 32 && se->ibuf->zbuf == 0) {
- converttopremul(se->ibuf);
+ IMB_premultiply_alpha(se->ibuf);
}
}
@@ -2162,7 +2178,7 @@ static void do_build_seq_ibuf(Scene *scene, Sequence * seq, TStripElem *se, int
int rendering = G.rendering;
int doseq;
- int doseq_gl= G.rendering ? (scene->r.seq_flag & R_SEQ_GL_REND) : (scene->r.seq_flag & R_SEQ_GL_PREV);
+ int doseq_gl= G.rendering ? /*(scene->r.seq_flag & R_SEQ_GL_REND)*/ 0 : (scene->r.seq_flag & R_SEQ_GL_PREV);
/* prevent eternal loop */
doseq= scene->r.scemode & R_DOSEQ;
diff --git a/source/blender/blenkernel/intern/softbody.c b/source/blender/blenkernel/intern/softbody.c
index b8274940318..c06e0679a7d 100644
--- a/source/blender/blenkernel/intern/softbody.c
+++ b/source/blender/blenkernel/intern/softbody.c
@@ -3663,7 +3663,7 @@ static void sb_new_scratch(SoftBody *sb)
{
if (!sb) return;
sb->scratch = MEM_callocN(sizeof(SBScratch), "SBScratch");
- sb->scratch->colliderhash = BLI_ghash_new(BLI_ghashutil_ptrhash,BLI_ghashutil_ptrcmp);
+ sb->scratch->colliderhash = BLI_ghash_new(BLI_ghashutil_ptrhash,BLI_ghashutil_ptrcmp, "sb_new_scratch gh");
sb->scratch->bodyface = NULL;
sb->scratch->totface = 0;
sb->scratch->aabbmax[0]=sb->scratch->aabbmax[1]=sb->scratch->aabbmax[2] = 1.0e30f;
diff --git a/source/blender/blenkernel/intern/writeavi.c b/source/blender/blenkernel/intern/writeavi.c
index f4bcb6d412f..00614ef0f4f 100644
--- a/source/blender/blenkernel/intern/writeavi.c
+++ b/source/blender/blenkernel/intern/writeavi.c
@@ -75,11 +75,6 @@ bMovieHandle *BKE_get_movie_handle(int imtype)
mh.get_movie_path = filepath_avi;
/* do the platform specific handles */
-#ifdef __sgi
- if (imtype == R_MOVIE) {
-
- }
-#endif
#if defined(_WIN32) && !defined(FREE_WINDOWS)
if (imtype == R_AVICODEC) {
//XXX mh.start_movie= start_avi_codec;