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:
authorLukas Tönne <lukas.toenne@gmail.com>2016-11-13 23:42:35 +0300
committerLukas Tönne <lukas.toenne@gmail.com>2016-11-13 23:42:35 +0300
commit28f4388c2ee815998141f0e4a5a671dec27354e3 (patch)
treec986f848cde3dec945302943ba1bc47bd07fe6da /source/blender
parenta7461419d88da1b8aaba17cce96959b33c2c83a9 (diff)
parent099f7dc9ddb2be02cd7235d74b2c4c49aeb27d56 (diff)
Merge branch 'cvdb_ray_isect' into openvdb
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/blenkernel/BKE_pointcache.h1
-rw-r--r--source/blender/blenkernel/intern/pointcache.c2
-rw-r--r--source/blender/makesdna/DNA_smoke_types.h2
-rw-r--r--source/blender/makesrna/intern/makesrna.c1
-rw-r--r--source/blender/makesrna/intern/rna_smoke.c15
5 files changed, 20 insertions, 1 deletions
diff --git a/source/blender/blenkernel/BKE_pointcache.h b/source/blender/blenkernel/BKE_pointcache.h
index 02f6c435ee2..8cab33582fb 100644
--- a/source/blender/blenkernel/BKE_pointcache.h
+++ b/source/blender/blenkernel/BKE_pointcache.h
@@ -280,6 +280,7 @@ void BKE_ptcache_ids_from_object(struct ListBase *lb, struct Object *ob, struct
/***************** Global funcs ****************************/
void BKE_ptcache_remove(void);
+int ptcache_filename(PTCacheID *pid, char *filename, int cfra, short do_path, short do_ext);
/************ ID specific functions ************************/
void BKE_ptcache_id_clear(PTCacheID *id, int mode, unsigned int cfra);
diff --git a/source/blender/blenkernel/intern/pointcache.c b/source/blender/blenkernel/intern/pointcache.c
index 30eb8dcb287..6da69b129be 100644
--- a/source/blender/blenkernel/intern/pointcache.c
+++ b/source/blender/blenkernel/intern/pointcache.c
@@ -1814,7 +1814,7 @@ static int ptcache_path(PTCacheID *pid, char *filename)
return BLI_add_slash(filename); /* new strlen() */
}
-static int ptcache_filename(PTCacheID *pid, char *filename, int cfra, short do_path, short do_ext)
+int ptcache_filename(PTCacheID *pid, char *filename, int cfra, short do_path, short do_ext)
{
int len=0;
char *idname;
diff --git a/source/blender/makesdna/DNA_smoke_types.h b/source/blender/makesdna/DNA_smoke_types.h
index ba7f73c2f63..8f197c8c42c 100644
--- a/source/blender/makesdna/DNA_smoke_types.h
+++ b/source/blender/makesdna/DNA_smoke_types.h
@@ -196,6 +196,8 @@ typedef struct SmokeDomainSettings {
float vector_scale;
char vector_draw_type;
char pad2[3];
+
+ char cache_filename[1024];
} SmokeDomainSettings;
diff --git a/source/blender/makesrna/intern/makesrna.c b/source/blender/makesrna/intern/makesrna.c
index 569c1ee5f3f..9809625ec50 100644
--- a/source/blender/makesrna/intern/makesrna.c
+++ b/source/blender/makesrna/intern/makesrna.c
@@ -3505,6 +3505,7 @@ static void rna_generate_header(BlenderRNA *UNUSED(brna), FILE *f)
static const char *cpp_classes = ""
"\n"
+"#include <cstdlib>\n"
"#include <string>\n"
"#include <string.h> /* for memcpy */\n"
"\n"
diff --git a/source/blender/makesrna/intern/rna_smoke.c b/source/blender/makesrna/intern/rna_smoke.c
index b4ba306df3f..ce18c86b8d0 100644
--- a/source/blender/makesrna/intern/rna_smoke.c
+++ b/source/blender/makesrna/intern/rna_smoke.c
@@ -383,6 +383,15 @@ static void rna_SmokeFlow_uvlayer_set(PointerRNA *ptr, const char *value)
rna_object_uvlayer_name_set(ptr, value, flow->uvlayer_name, sizeof(flow->uvlayer_name));
}
+static void rna_SmokeModifier_cache_filename_get(PointerRNA *ptr, char *filename)
+{
+ SmokeDomainSettings *sds = (SmokeDomainSettings *)ptr->data;
+ PTCacheID pid;
+
+ BKE_ptcache_id_from_smoke(&pid, ptr->id.data, sds->smd);
+ ptcache_filename(&pid, filename, sds->smd->time, 1, 1);
+}
+
#else
static void rna_def_smoke_domain_settings(BlenderRNA *brna)
@@ -805,6 +814,12 @@ static void rna_def_smoke_domain_settings(BlenderRNA *brna)
RNA_def_property_ui_range(prop, 0.0, 100.0, 0.1, 3);
RNA_def_property_ui_text(prop, "Scale", "Multiplier for scaling the vectors");
RNA_def_property_update(prop, NC_OBJECT | ND_DRAW, NULL);
+
+ prop = RNA_def_property(srna, "cache_filename", PROP_STRING, PROP_NONE);
+ RNA_def_property_string_maxlength(prop, 1024);
+ RNA_def_property_string_funcs(prop, "rna_SmokeModifier_cache_filename_get", NULL, NULL);
+ RNA_def_property_clear_flag(prop, PROP_EDITABLE);
+ RNA_def_property_ui_text(prop, "Filename", "Path to the .blend file");
}
static void rna_def_smoke_flow_settings(BlenderRNA *brna)