[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [28131] trunk/blender/source/blender/ makesrna/intern/rna_sequencer.c: == Sequencer ==

Peter Schlaile peter at schlaile.de
Sun Apr 11 21:27:41 CEST 2010


Revision: 28131
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=28131
Author:   schlaile
Date:     2010-04-11 21:27:41 +0200 (Sun, 11 Apr 2010)

Log Message:
-----------
== Sequencer ==

Forgotten file from last commit: custom proxy files.

Modified Paths:
--------------
    trunk/blender/source/blender/makesrna/intern/rna_sequencer.c

Modified: trunk/blender/source/blender/makesrna/intern/rna_sequencer.c
===================================================================
--- trunk/blender/source/blender/makesrna/intern/rna_sequencer.c	2010-04-11 19:26:46 UTC (rev 28130)
+++ trunk/blender/source/blender/makesrna/intern/rna_sequencer.c	2010-04-11 19:27:41 UTC (rev 28131)
@@ -341,6 +341,35 @@
 	return strlen(path)+1;
 }
 
+static void rna_Sequence_proxy_filepath_set(PointerRNA *ptr, const char *value)
+{
+	StripProxy *proxy= (StripProxy*)(ptr->data);
+	char dir[FILE_MAX], name[FILE_MAX];
+
+	BLI_split_dirfile(value, dir, name);
+	BLI_strncpy(proxy->dir, dir, sizeof(proxy->dir));
+	BLI_strncpy(proxy->file, name, sizeof(proxy->file));
+}
+
+static void rna_Sequence_proxy_filepath_get(PointerRNA *ptr, char *value)
+{
+	StripProxy *proxy= (StripProxy*)(ptr->data);
+	char path[FILE_MAX];
+
+	BLI_join_dirfile(path, proxy->dir, proxy->file);
+	BLI_strncpy(value, path, strlen(path)+1);
+}
+
+static int rna_Sequence_proxy_filepath_length(PointerRNA *ptr)
+{
+	StripProxy *proxy= (StripProxy*)(ptr->data);
+	char path[FILE_MAX];
+
+	BLI_join_dirfile(path, proxy->dir, proxy->file);
+	return strlen(path)+1;
+}
+
+
 /*static void rna_SoundSequence_filename_set(PointerRNA *ptr, const char *value)
 {
 	Sequence *seq= (Sequence*)(ptr->data);
@@ -468,12 +497,13 @@
 	
 	prop= RNA_def_property(srna, "directory", PROP_STRING, PROP_DIRPATH);
 	RNA_def_property_string_sdna(prop, NULL, "dir");
-	RNA_def_property_ui_text(prop, "Directory", "Location to story the proxy file");
+	RNA_def_property_ui_text(prop, "Directory", "Location to store the proxy files");
 	RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
 	
-	prop= RNA_def_property(srna, "file", PROP_STRING, PROP_DIRPATH);
-	RNA_def_property_string_sdna(prop, NULL, "file");
-	RNA_def_property_ui_text(prop, "File", "Proxy file name");
+	prop= RNA_def_property(srna, "filepath", PROP_STRING, PROP_FILEPATH);
+	RNA_def_property_ui_text(prop, "Path", "Location of custom proxy file");
+	RNA_def_property_string_funcs(prop, "rna_Sequence_proxy_filepath_get", "rna_Sequence_proxy_filepath_length", "rna_Sequence_proxy_filepath_set");
+
 	RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
 }
 
@@ -844,6 +874,11 @@
 	RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_USE_PROXY_CUSTOM_DIR);
 	RNA_def_property_ui_text(prop, "Proxy Custom Directory", "Use a custom directory to store data");
 	RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
+
+	prop= RNA_def_property(srna, "proxy_custom_file", PROP_BOOLEAN, PROP_NONE);
+	RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_USE_PROXY_CUSTOM_FILE);
+	RNA_def_property_ui_text(prop, "Proxy Custom File", "Use a custom file to read proxy data from");
+	RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
 }
 
 static void rna_def_input(StructRNA *srna)





More information about the Bf-blender-cvs mailing list