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:
authorTon Roosendaal <ton@blender.org>2005-12-05 16:44:22 +0300
committerTon Roosendaal <ton@blender.org>2005-12-05 16:44:22 +0300
commitf98a5a80366c5307e3a286c102a6dc804b778a42 (patch)
treeb52897c15948a0dedf397fc05e099e717c0d2924 /source/blender/blenkernel/intern/effect.c
parentcd014fd5568a8aba3b0bee17796ced03482523ce (diff)
Bugfix #3514
Once an Object Ipo position was inserted, the object couldn't be moved when a particle system was tied to it. Needed code to copy object settings, before the particle animation was done.
Diffstat (limited to 'source/blender/blenkernel/intern/effect.c')
-rw-r--r--source/blender/blenkernel/intern/effect.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/source/blender/blenkernel/intern/effect.c b/source/blender/blenkernel/intern/effect.c
index b2b52cfda06..acff6d80024 100644
--- a/source/blender/blenkernel/intern/effect.c
+++ b/source/blender/blenkernel/intern/effect.c
@@ -1513,16 +1513,15 @@ typedef struct pMatrixCache {
static pMatrixCache *cache_object_matrices(Object *ob, int start, int end)
{
pMatrixCache *mcache, *mc;
- Object *par;
- float framelenold, sfrao;
- int cfrao;
+ Object *par, ob_store;
+ float framelenold, cfrao;
mcache= mc= MEM_mallocN( (end-start+1)*sizeof(pMatrixCache), "ob matrix cache");
framelenold= G.scene->r.framelen;
G.scene->r.framelen= 1.0f;
cfrao= G.scene->r.cfra;
- sfrao= ob->sf;
+ ob_store= *ob; /* quick copy of all settings */
ob->sf= 0.0f;
for(G.scene->r.cfra= start; G.scene->r.cfra<=end; G.scene->r.cfra++, mc++) {
@@ -1549,13 +1548,12 @@ static pMatrixCache *cache_object_matrices(Object *ob, int start, int end)
/* restore */
G.scene->r.cfra= cfrao;
G.scene->r.framelen= framelenold;
- ob->sf= sfrao;
+ *ob= ob_store;
- /* restore hierarchy */
+ /* restore hierarchy, weak code destroying potential depgraph stuff... */
par= ob;
while(par) {
/* do not do ob->ipo: keep insertkey */
- par->ctime= -1234567.0; /* hrms? */
do_ob_key(par);
if(par->type==OB_ARMATURE) {
@@ -1565,8 +1563,6 @@ static pMatrixCache *cache_object_matrices(Object *ob, int start, int end)
par= par->parent;
}
- where_is_object(ob);
-
return mcache;
}