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:
authorJulian Eisel <julian@blender.org>2020-06-05 14:09:31 +0300
committerJulian Eisel <julian@blender.org>2020-06-05 14:09:31 +0300
commit920a58d9b6d667894cf166cbbd25e4c2fbd238ea (patch)
tree7ca5a9da640753b5e070c439ac3bdd14dfad92cf /source/blender/makesrna/intern/rna_volume.c
parentc94b6209861ca7cc3985b53474feed7d94c0221a (diff)
parenta1d55bdd530390e58c51abe9707b8d3b0ae3e861 (diff)
Merge branch 'master' into wm-drag-drop-rewritewm-drag-drop-rewrite
Diffstat (limited to 'source/blender/makesrna/intern/rna_volume.c')
-rw-r--r--source/blender/makesrna/intern/rna_volume.c27
1 files changed, 25 insertions, 2 deletions
diff --git a/source/blender/makesrna/intern/rna_volume.c b/source/blender/makesrna/intern/rna_volume.c
index 0ee1dbc791b..b03d6082cea 100644
--- a/source/blender/makesrna/intern/rna_volume.c
+++ b/source/blender/makesrna/intern/rna_volume.c
@@ -194,6 +194,19 @@ static int rna_VolumeGrids_error_message_length(PointerRNA *ptr)
return strlen(BKE_volume_grids_error_msg(volume));
}
+/* Frame Filepath */
+static void rna_VolumeGrids_frame_filepath_get(PointerRNA *ptr, char *value)
+{
+ Volume *volume = (Volume *)ptr->data;
+ strcpy(value, BKE_volume_grids_frame_filepath(volume));
+}
+
+static int rna_VolumeGrids_frame_filepath_length(PointerRNA *ptr)
+{
+ Volume *volume = (Volume *)ptr->data;
+ return strlen(BKE_volume_grids_frame_filepath(volume));
+}
+
#else
static void rna_def_volume_grid(BlenderRNA *brna)
@@ -308,6 +321,16 @@ static void rna_def_volume_grids(BlenderRNA *brna, PropertyRNA *cprop)
"Frame number that volume grids will be loaded at, based on scene time "
"and volume parameters");
+ prop = RNA_def_property(srna, "frame_filepath", PROP_STRING, PROP_FILEPATH);
+ RNA_def_property_clear_flag(prop, PROP_EDITABLE);
+ RNA_def_property_string_funcs(
+ prop, "rna_VolumeGrids_frame_filepath_get", "rna_VolumeGrids_frame_filepath_length", NULL);
+
+ RNA_def_property_ui_text(prop,
+ "Frame File Path",
+ "Volume file used for loading the volume at the current frame. Empty "
+ "if the volume has not be loaded or the frame only exists in memory");
+
/* API */
FunctionRNA *func;
PropertyRNA *parm;
@@ -418,7 +441,7 @@ static void rna_def_volume_render(BlenderRNA *brna)
RNA_def_property_ui_range(prop, 0.0, 100.0, 1, 3);
RNA_def_property_ui_text(prop,
"Step Size",
- "Distance between volume samples. Higher values render more detail at "
+ "Distance between volume samples. Lower values render more detail at "
"the cost of performance. If set to zero, the step size is "
"automatically determined based on voxel size");
RNA_def_property_update(prop, 0, "rna_Volume_update_display");
@@ -446,7 +469,7 @@ static void rna_def_volume(BlenderRNA *brna)
/* File */
prop = RNA_def_property(srna, "filepath", PROP_STRING, PROP_FILEPATH);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
- RNA_def_property_ui_text(prop, "File Path", "Volume sample file used by this Volume data-block");
+ RNA_def_property_ui_text(prop, "File Path", "Volume file used by this Volume data-block");
RNA_def_property_update(prop, 0, "rna_Volume_update_filepath");
prop = RNA_def_property(srna, "packed_file", PROP_POINTER, PROP_NONE);