[Bf-blender-cvs] [181d095] temp_remove_pointcache: Removed PointCache RNA struct definition and uses.
Lukas Tönne
noreply at git.blender.org
Fri Apr 29 15:04:31 CEST 2016
Commit: 181d095f5061476fe2225ea2ad69d3d73306c237
Author: Lukas Tönne
Date: Fri Apr 29 11:07:11 2016 +0200
Branches: temp_remove_pointcache
https://developer.blender.org/rB181d095f5061476fe2225ea2ad69d3d73306c237
Removed PointCache RNA struct definition and uses.
===================================================================
M source/blender/makesrna/RNA_access.h
M source/blender/makesrna/intern/rna_dynamicpaint.c
M source/blender/makesrna/intern/rna_modifier.c
M source/blender/makesrna/intern/rna_object_force.c
M source/blender/makesrna/intern/rna_rigidbody.c
M source/blender/makesrna/intern/rna_sculpt_paint.c
M source/blender/makesrna/intern/rna_smoke.c
===================================================================
diff --git a/source/blender/makesrna/RNA_access.h b/source/blender/makesrna/RNA_access.h
index 0c7c3d4..09f4ea1 100644
--- a/source/blender/makesrna/RNA_access.h
+++ b/source/blender/makesrna/RNA_access.h
@@ -445,7 +445,6 @@ extern StructRNA RNA_Palette;
extern StructRNA RNA_PaletteColor;
extern StructRNA RNA_Panel;
extern StructRNA RNA_PivotConstraint;
-extern StructRNA RNA_PointCache;
extern StructRNA RNA_PointDensity;
extern StructRNA RNA_PointDensityTexture;
extern StructRNA RNA_PointLamp;
diff --git a/source/blender/makesrna/intern/rna_dynamicpaint.c b/source/blender/makesrna/intern/rna_dynamicpaint.c
index f259e12..692c76f 100644
--- a/source/blender/makesrna/intern/rna_dynamicpaint.c
+++ b/source/blender/makesrna/intern/rna_dynamicpaint.c
@@ -183,20 +183,20 @@ static void rna_DynamicPaint_surfaces_begin(CollectionPropertyIterator *iter, Po
rna_iterator_listbase_begin(iter, &canvas->surfaces, NULL);
}
-static int rna_Surface_active_point_index_get(PointerRNA *ptr)
+static int rna_Surface_active_index_get(PointerRNA *ptr)
{
DynamicPaintCanvasSettings *canvas = (DynamicPaintCanvasSettings *)ptr->data;
return canvas->active_sur;
}
-static void rna_Surface_active_point_index_set(struct PointerRNA *ptr, int value)
+static void rna_Surface_active_index_set(struct PointerRNA *ptr, int value)
{
DynamicPaintCanvasSettings *canvas = (DynamicPaintCanvasSettings *)ptr->data;
canvas->active_sur = value;
return;
}
-static void rna_Surface_active_point_range(PointerRNA *ptr, int *min, int *max,
+static void rna_Surface_active_range(PointerRNA *ptr, int *min, int *max,
int *UNUSED(softmin), int *UNUSED(softmax))
{
DynamicPaintCanvasSettings *canvas = (DynamicPaintCanvasSettings *)ptr->data;
@@ -221,7 +221,7 @@ static void rna_DynamicPaint_uvlayer_set(PointerRNA *ptr, const char *value)
}
}
-/* is point cache used */
+/* is cache used */
static int rna_DynamicPaint_is_cache_user_get(PointerRNA *ptr)
{
DynamicPaintSurface *surface = (DynamicPaintSurface *)ptr->data;
@@ -310,9 +310,9 @@ static void rna_def_canvas_surfaces(BlenderRNA *brna, PropertyRNA *cprop)
prop = RNA_def_property(srna, "active_index", PROP_INT, PROP_UNSIGNED);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
- RNA_def_property_int_funcs(prop, "rna_Surface_active_point_index_get", "rna_Surface_active_point_index_set",
- "rna_Surface_active_point_range");
- RNA_def_property_ui_text(prop, "Active Point Cache Index", "");
+ RNA_def_property_int_funcs(prop, "rna_Surface_active_index_get", "rna_Surface_active_index_set",
+ "rna_Surface_active_range");
+ RNA_def_property_ui_text(prop, "Active Surface Index", "");
prop = RNA_def_property(srna, "active", PROP_POINTER, PROP_NONE);
RNA_def_property_struct_type(prop, "DynamicPaintSurface");
@@ -721,13 +721,6 @@ static void rna_def_canvas_surface(BlenderRNA *brna)
RNA_def_property_boolean_sdna(prop, NULL, "flags", MOD_DPAINT_WAVE_OPEN_BORDERS);
RNA_def_property_ui_text(prop, "Open Borders", "Pass waves through mesh edges");
-
- /* cache */
- prop = RNA_def_property(srna, "point_cache", PROP_POINTER, PROP_NONE);
- RNA_def_property_flag(prop, PROP_NEVER_NULL);
- RNA_def_property_pointer_sdna(prop, NULL, "pointcache");
- RNA_def_property_ui_text(prop, "Point Cache", "");
-
/* is cache used */
prop = RNA_def_property(srna, "is_cache_user", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_funcs(prop, "rna_DynamicPaint_is_cache_user_get", NULL);
diff --git a/source/blender/makesrna/intern/rna_modifier.c b/source/blender/makesrna/intern/rna_modifier.c
index 62676e2..105b7f1 100644
--- a/source/blender/makesrna/intern/rna_modifier.c
+++ b/source/blender/makesrna/intern/rna_modifier.c
@@ -690,12 +690,6 @@ static PointerRNA rna_SoftBodyModifier_settings_get(PointerRNA *ptr)
return rna_pointer_inherit_refine(ptr, &RNA_SoftBodySettings, ob->soft);
}
-static PointerRNA rna_SoftBodyModifier_point_cache_get(PointerRNA *ptr)
-{
- Object *ob = (Object *)ptr->id.data;
- return rna_pointer_inherit_refine(ptr, &RNA_PointCache, ob->soft->pointcache);
-}
-
static PointerRNA rna_CollisionModifier_settings_get(PointerRNA *ptr)
{
Object *ob = (Object *)ptr->id.data;
@@ -1858,12 +1852,6 @@ static void rna_def_modifier_softbody(BlenderRNA *brna)
RNA_def_property_struct_type(prop, "SoftBodySettings");
RNA_def_property_pointer_funcs(prop, "rna_SoftBodyModifier_settings_get", NULL, NULL, NULL);
RNA_def_property_ui_text(prop, "Soft Body Settings", "");
-
- prop = RNA_def_property(srna, "point_cache", PROP_POINTER, PROP_NONE);
- RNA_def_property_flag(prop, PROP_NEVER_NULL);
- RNA_def_property_struct_type(prop, "PointCache");
- RNA_def_property_pointer_funcs(prop, "rna_SoftBodyModifier_point_cache_get", NULL, NULL, NULL);
- RNA_def_property_ui_text(prop, "Soft Body Point Cache", "");
}
static void rna_def_modifier_boolean(BlenderRNA *brna)
@@ -2612,10 +2600,6 @@ static void rna_def_modifier_cloth(BlenderRNA *brna)
RNA_def_property_struct_type(prop, "ClothSolverResult");
RNA_def_property_pointer_sdna(prop, NULL, "solver_result");
RNA_def_property_ui_text(prop, "Solver Result", "");
-
- prop = RNA_def_property(srna, "point_cache", PROP_POINTER, PROP_NONE);
- RNA_def_property_flag(prop, PROP_NEVER_NULL);
- RNA_def_property_ui_text(prop, "Point Cache", "");
prop = RNA_def_property(srna, "hair_grid_min", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "hair_grid_min");
diff --git a/source/blender/makesrna/intern/rna_object_force.c b/source/blender/makesrna/intern/rna_object_force.c
index 7d880be..3a648d2 100644
--- a/source/blender/makesrna/intern/rna_object_force.c
+++ b/source/blender/makesrna/intern/rna_object_force.c
@@ -95,226 +95,11 @@ static EnumPropertyItem empty_vortex_shape_items[] = {
#include "BKE_context.h"
#include "BKE_modifier.h"
-#include "BKE_pointcache.h"
#include "BKE_depsgraph.h"
+#include "BKE_pointcache.h"
#include "ED_object.h"
-static void rna_Cache_change(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
-{
- Object *ob = (Object *)ptr->id.data;
- PointCache *cache = (PointCache *)ptr->data;
- PTCacheID *pid = NULL;
- ListBase pidlist;
-
- if (!ob)
- return;
-
- cache->flag |= PTCACHE_OUTDATED;
-
- BKE_ptcache_ids_from_object(&pidlist, ob, NULL, 0);
-
- DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
-
- for (pid = pidlist.first; pid; pid = pid->next) {
- if (pid->cache == cache)
- break;
- }
-
- if (pid) {
- /* Just make sure this wasn't changed. */
- if (pid->type == PTCACHE_TYPE_SMOKE_DOMAIN)
- cache->step = 1;
- BKE_ptcache_update_info(pid);
- }
-
- BLI_freelistN(&pidlist);
-}
-
-static void rna_Cache_toggle_disk_cache(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
-{
- Object *ob = (Object *)ptr->id.data;
- PointCache *cache = (PointCache *)ptr->data;
- PTCacheID *pid = NULL;
- ListBase pidlist;
-
- if (!ob)
- return;
-
- BKE_ptcache_ids_from_object(&pidlist, ob, NULL, 0);
-
- for (pid = pidlist.first; pid; pid = pid->next) {
- if (pid->cache == cache)
- break;
- }
-
- /* smoke can only use disk cache */
- if (pid && pid->type != PTCACHE_TYPE_SMOKE_DOMAIN)
- BKE_ptcache_toggle_disk_cache(pid);
- else
- cache->flag ^= PTCACHE_DISK_CACHE;
-
- BLI_freelistN(&pidlist);
-}
-
-static void rna_Cache_idname_change(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
-{
- Object *ob = (Object *)ptr->id.data;
- PointCache *cache = (PointCache *)ptr->data;
- PTCacheID *pid = NULL, *pid2 = NULL;
- ListBase pidlist;
- bool use_new_name = true;
-
- if (!ob)
- return;
-
- /* TODO: check for proper characters */
-
- BKE_ptcache_ids_from_object(&pidlist, ob, NULL, 0);
-
- if (cache->flag & PTCACHE_EXTERNAL) {
- for (pid = pidlist.first; pid; pid = pid->next) {
- if (pid->cache == cache)
- break;
- }
-
- if (!pid)
- return;
-
- BKE_ptcache_load_external(pid);
-
- DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
- WM_main_add_notifier(NC_OBJECT | ND_POINTCACHE, ob);
- }
- else {
- for (pid = pidlist.first; pid; pid = pid->next) {
- if (pid->cache == cache)
- pid2 = pid;
- else if (cache->name[0] != '\0' && STREQ(cache->name, pid->cache->name)) {
- /*TODO: report "name exists" to user */
- BLI_strncpy(cache->name, cache->prev_name, sizeof(cache->name));
- use_new_name = false;
- }
- }
-
- if (use_new_name) {
- if (pid2 && cache->flag & PTCACHE_DISK_CACHE) {
- char old_name[80];
- char new_name[80];
-
- BLI_strncpy(old_name, cache->prev_name, sizeof(old_name));
- BLI_strncpy(new_name, cache->name, sizeof(new_name));
-
- BKE_ptcache_disk_cache_rename(pid2, old_name, new_name);
- }
-
- BLI_strncpy(cache->prev_name, cache->name, sizeof(cache->prev_name));
- }
- }
-
- BLI_freelistN(&pidlist);
-}
-
-static void rna_Cache_list_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
-{
- PointCache *cache = ptr->data;
- ListBase lb;
-
- while (cache->prev)
- cache = cache->prev;
-
- lb.first = cache;
- lb.last = NULL; /* not used by listbase_begin */
-
- rna_iterator_listbase_begin(iter, &lb, NULL);
-}
-static void rna_Cache_active_point_cache_index_range(PointerRNA *ptr, int *min, int *max,
- int *UNUSED(softmin), int *UNUSED(softmax))
-{
- Object *ob = ptr->id.data;
- PointCache *cache = ptr->data;
- PTCacheID *pid;
- ListBase pidlist;
-
- BKE_ptcache_ids_from_object(&pidlist, ob, NULL, 0);
-
- *min = 0;
- *max = 0;
-
- for (pid = pidlist.first; pid; pid = pid->next) {
- if (pid->cache == cache) {
- *max = max_ii(0, BLI_listbase_count(pid->ptcaches) - 1);
- break;
- }
- }
-
- BLI_freelistN(&pidlist);
-}
-
-static int rna_Cache_active_point_cache_index_get(PointerRNA *ptr)
-{
- Object *ob = ptr->id.data;
- PointCache *cache = ptr->data;
- PTCacheID *pid;
- ListBase pidlist;
- int num = 0;
-
- BKE_ptcache_ids_from_object(&pidlist, ob, NULL, 0);
-
- for (pid = pidlist.first; pid; pid = pid->next) {
- if (pid->cache == cache) {
- num = BLI_findindex(pid->ptcaches, cache);
- break;
- }
- }
-
- BLI_freelistN(&pidlist);
-
- return num;
-}
-
-static void rna_Cache_active_point_cache_index_set(struct PointerRNA
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list