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:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2010-03-30 16:23:13 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2010-03-30 16:23:13 +0400
commit515592438f0f5665cadbd12c7698554bd2b89146 (patch)
treeab1e07b6093f380661b9fca4ebf3df90e0705055 /source/blender/editors/physics
parent71446eea573db3ac6bac5f297c0655acbeada67c (diff)
Baking for dupligroup & linked library objects
- library data allows pointcache writing (hard to know how this should work long term so ifdef'd for now) - changing the frame now updates the dupligroup objects - BKE_ptcache_ids_from_object(), option to get the id's from duplis note! scene_update_tagged() is called from the main() loop, and runs BKE_ptcache_quick_cache_all(), this could become a performance issue, especially with duplis, should probably not call BKE_ptcache_quick_cache_all() all the time, even when not playing back animation. (commits 27856 by Campbell from render25 branch)
Diffstat (limited to 'source/blender/editors/physics')
-rw-r--r--source/blender/editors/physics/particle_edit.c2
-rw-r--r--source/blender/editors/physics/physics_pointcache.c10
2 files changed, 7 insertions, 5 deletions
diff --git a/source/blender/editors/physics/particle_edit.c b/source/blender/editors/physics/particle_edit.c
index 43fc4985d3d..d20e0e87934 100644
--- a/source/blender/editors/physics/particle_edit.c
+++ b/source/blender/editors/physics/particle_edit.c
@@ -203,7 +203,7 @@ static PTCacheEdit *pe_get_current(Scene *scene, Object *ob, int create)
pset->scene = scene;
pset->object = ob;
- BKE_ptcache_ids_from_object(&pidlist, ob);
+ BKE_ptcache_ids_from_object(&pidlist, ob, NULL, 0);
/* in the case of only one editable thing, set pset->edittype accordingly */
if(pidlist.first && pidlist.first == pidlist.last) {
diff --git a/source/blender/editors/physics/physics_pointcache.c b/source/blender/editors/physics/physics_pointcache.c
index 19f4d8457c1..57a123d8f17 100644
--- a/source/blender/editors/physics/physics_pointcache.c
+++ b/source/blender/editors/physics/physics_pointcache.c
@@ -33,6 +33,7 @@
#include "DNA_scene_types.h"
+#include "BKE_anim.h"
#include "BKE_context.h"
#include "BKE_particle.h"
#include "BKE_report.h"
@@ -125,7 +126,7 @@ static int ptcache_free_bake_all_exec(bContext *C, wmOperator *op)
ListBase pidlist;
for(base=scene->base.first; base; base= base->next) {
- BKE_ptcache_ids_from_object(&pidlist, base->object);
+ BKE_ptcache_ids_from_object(&pidlist, base->object, scene, MAX_DUPLI_RECUR);
for(pid=pidlist.first; pid; pid=pid->next) {
pid->cache->flag &= ~PTCACHE_BAKED;
@@ -178,7 +179,7 @@ static int ptcache_bake_exec(bContext *C, wmOperator *op)
PTCacheID *pid;
ListBase pidlist;
- BKE_ptcache_ids_from_object(&pidlist, ob);
+ BKE_ptcache_ids_from_object(&pidlist, ob, scene, MAX_DUPLI_RECUR);
for(pid=pidlist.first; pid; pid=pid->next) {
if(pid->cache == cache)
@@ -290,7 +291,7 @@ static int ptcache_add_new_exec(bContext *C, wmOperator *op)
PTCacheID *pid;
ListBase pidlist;
- BKE_ptcache_ids_from_object(&pidlist, ob);
+ BKE_ptcache_ids_from_object(&pidlist, ob, scene, MAX_DUPLI_RECUR);
for(pid=pidlist.first; pid; pid=pid->next) {
if(pid->cache == cache) {
@@ -308,12 +309,13 @@ static int ptcache_add_new_exec(bContext *C, wmOperator *op)
static int ptcache_remove_exec(bContext *C, wmOperator *op)
{
PointerRNA ptr= CTX_data_pointer_get_type(C, "PointCache", &RNA_PointCache);
+ Scene *scene= CTX_data_scene(C);
Object *ob= ptr.id.data;
PointCache *cache= ptr.data;
PTCacheID *pid;
ListBase pidlist;
- BKE_ptcache_ids_from_object(&pidlist, ob);
+ BKE_ptcache_ids_from_object(&pidlist, ob, scene, MAX_DUPLI_RECUR);
for(pid=pidlist.first; pid; pid=pid->next) {
if(pid->cache == cache) {