diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2018-06-13 15:26:26 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2018-06-13 15:28:05 +0300 |
commit | 5ff1d845ead05ac6ef952782ebd3ed98277ef6c5 (patch) | |
tree | 9be449d931fff0a332a7e4ec8e0cc27874eca496 /source/blender/makesrna/intern/rna_object_force.c | |
parent | 2002fe27d97223f241580777b1a9073755181e45 (diff) |
Cleanup: moar ugly G.main removal...
Note that due to RNA get/setters issue, that one may actually add some
G.main usages to the total... But at least it's not hidden anymore in a
very low-level, dark corner of BKE pointcache code!
Diffstat (limited to 'source/blender/makesrna/intern/rna_object_force.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_object_force.c | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/source/blender/makesrna/intern/rna_object_force.c b/source/blender/makesrna/intern/rna_object_force.c index 2b0740bff6f..294597d957e 100644 --- a/source/blender/makesrna/intern/rna_object_force.c +++ b/source/blender/makesrna/intern/rna_object_force.c @@ -95,13 +95,14 @@ static const EnumPropertyItem empty_vortex_shape_items[] = { #include "DNA_texture_types.h" #include "BKE_context.h" +#include "BKE_depsgraph.h" +#include "BKE_global.h" #include "BKE_modifier.h" #include "BKE_pointcache.h" -#include "BKE_depsgraph.h" #include "ED_object.h" -static void rna_Cache_change(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr) +static void rna_Cache_change(Main *bmain, Scene *UNUSED(scene), PointerRNA *ptr) { Object *ob = (Object *)ptr->id.data; PointCache *cache = (PointCache *)ptr->data; @@ -113,7 +114,7 @@ static void rna_Cache_change(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerR cache->flag |= PTCACHE_OUTDATED; - BKE_ptcache_ids_from_object(&pidlist, ob, NULL, 0); + BKE_ptcache_ids_from_object(bmain, &pidlist, ob, NULL, 0); DAG_id_tag_update(&ob->id, OB_RECALC_DATA); @@ -132,7 +133,7 @@ static void rna_Cache_change(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerR BLI_freelistN(&pidlist); } -static void rna_Cache_toggle_disk_cache(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr) +static void rna_Cache_toggle_disk_cache(Main *bmain, Scene *UNUSED(scene), PointerRNA *ptr) { Object *ob = (Object *)ptr->id.data; PointCache *cache = (PointCache *)ptr->data; @@ -142,7 +143,7 @@ static void rna_Cache_toggle_disk_cache(Main *UNUSED(bmain), Scene *UNUSED(scene if (!ob) return; - BKE_ptcache_ids_from_object(&pidlist, ob, NULL, 0); + BKE_ptcache_ids_from_object(bmain, &pidlist, ob, NULL, 0); for (pid = pidlist.first; pid; pid = pid->next) { if (pid->cache == cache) @@ -158,7 +159,7 @@ static void rna_Cache_toggle_disk_cache(Main *UNUSED(bmain), Scene *UNUSED(scene BLI_freelistN(&pidlist); } -static void rna_Cache_idname_change(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr) +static void rna_Cache_idname_change(Main *bmain, Scene *UNUSED(scene), PointerRNA *ptr) { Object *ob = (Object *)ptr->id.data; PointCache *cache = (PointCache *)ptr->data; @@ -171,7 +172,7 @@ static void rna_Cache_idname_change(Main *UNUSED(bmain), Scene *UNUSED(scene), P /* TODO: check for proper characters */ - BKE_ptcache_ids_from_object(&pidlist, ob, NULL, 0); + BKE_ptcache_ids_from_object(bmain, &pidlist, ob, NULL, 0); if (cache->flag & PTCACHE_EXTERNAL) { for (pid = pidlist.first; pid; pid = pid->next) { @@ -239,7 +240,7 @@ static void rna_Cache_active_point_cache_index_range(PointerRNA *ptr, int *min, PTCacheID *pid; ListBase pidlist; - BKE_ptcache_ids_from_object(&pidlist, ob, NULL, 0); + BKE_ptcache_ids_from_object(G.main, &pidlist, ob, NULL, 0); *min = 0; *max = 0; @@ -262,7 +263,7 @@ static int rna_Cache_active_point_cache_index_get(PointerRNA *ptr) ListBase pidlist; int num = 0; - BKE_ptcache_ids_from_object(&pidlist, ob, NULL, 0); + BKE_ptcache_ids_from_object(G.main, &pidlist, ob, NULL, 0); for (pid = pidlist.first; pid; pid = pid->next) { if (pid->cache == cache) { @@ -283,7 +284,7 @@ static void rna_Cache_active_point_cache_index_set(struct PointerRNA *ptr, int v PTCacheID *pid; ListBase pidlist; - BKE_ptcache_ids_from_object(&pidlist, ob, NULL, 0); + BKE_ptcache_ids_from_object(G.main, &pidlist, ob, NULL, 0); for (pid = pidlist.first; pid; pid = pid->next) { if (pid->cache == cache) { @@ -306,7 +307,7 @@ static void rna_PointCache_frame_step_range(PointerRNA *ptr, int *min, int *max, *min = 1; *max = 20; - BKE_ptcache_ids_from_object(&pidlist, ob, NULL, 0); + BKE_ptcache_ids_from_object(G.main, &pidlist, ob, NULL, 0); for (pid = pidlist.first; pid; pid = pid->next) { if (pid->cache == cache) { |