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:
authorCampbell Barton <ideasman42@gmail.com>2011-05-12 09:35:19 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-05-12 09:35:19 +0400
commit191ad54599b2d8c8677f56870ee1800e62c50137 (patch)
treeb1670620b466e1f865929cb6b1de16650f9510b7 /source/blender/makesrna
parent521d824371f6b62b09bc8fa9693c3429a14d1d77 (diff)
parent910220be47729d6effffb7aa33bfe05d4caa5d3d (diff)
svn merge -r36603:36628 https://svn.blender.org/svnroot/bf-blender/trunk/blender
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r--source/blender/makesrna/intern/rna_sculpt_paint.c4
-rw-r--r--source/blender/makesrna/intern/rna_smoke.c2
-rw-r--r--source/blender/makesrna/intern/rna_space.c27
3 files changed, 30 insertions, 3 deletions
diff --git a/source/blender/makesrna/intern/rna_sculpt_paint.c b/source/blender/makesrna/intern/rna_sculpt_paint.c
index ce018fdfd6e..da536f95cba 100644
--- a/source/blender/makesrna/intern/rna_sculpt_paint.c
+++ b/source/blender/makesrna/intern/rna_sculpt_paint.c
@@ -481,12 +481,12 @@ static void rna_def_particle_edit(BlenderRNA *brna)
RNA_def_struct_sdna(srna, "ParticleBrushData");
RNA_def_struct_ui_text(srna, "Particle Brush", "Particle editing brush");
- prop= RNA_def_property(srna, "size", PROP_INT, PROP_NONE);
+ prop= RNA_def_property(srna, "size", PROP_INT, PROP_DISTANCE);
RNA_def_property_range(prop, 1, SHRT_MAX);
RNA_def_property_ui_range(prop, 1, 100, 10, 3);
RNA_def_property_ui_text(prop, "Radius", "Radius of the brush in pixels");
- prop= RNA_def_property(srna, "strength", PROP_FLOAT, PROP_NONE);
+ prop= RNA_def_property(srna, "strength", PROP_FLOAT, PROP_FACTOR);
RNA_def_property_range(prop, 0.001, 1.0);
RNA_def_property_ui_text(prop, "Strength", "Brush strength");
diff --git a/source/blender/makesrna/intern/rna_smoke.c b/source/blender/makesrna/intern/rna_smoke.c
index 922c68f45bd..974f2fdecb8 100644
--- a/source/blender/makesrna/intern/rna_smoke.c
+++ b/source/blender/makesrna/intern/rna_smoke.c
@@ -212,7 +212,7 @@ static void rna_def_smoke_domain_settings(BlenderRNA *brna)
RNA_def_property_float_sdna(prop, NULL, "strength");
RNA_def_property_range(prop, 0.0, 10.0);
RNA_def_property_ui_range(prop, 0.0, 10.0, 1, 2);
- RNA_def_property_ui_text(prop, "Strength", "Strength of wavelet noise");
+ RNA_def_property_ui_text(prop, "Strength", "Strength of noise");
RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Smoke_reset");
prop= RNA_def_property(srna, "dissolve_speed", PROP_INT, PROP_NONE);
diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c
index 59824d6a752..5281e152d54 100644
--- a/source/blender/makesrna/intern/rna_space.c
+++ b/source/blender/makesrna/intern/rna_space.c
@@ -508,6 +508,27 @@ static EnumPropertyItem *rna_SpaceImageEditor_draw_channels_itemf(bContext *C, P
return item;
}
+static void rna_SpaceImageEditor_zoom_get(PointerRNA *ptr, float *values)
+{
+ SpaceImage *sima= (SpaceImage*)ptr->data;
+ ScrArea *sa;
+ ARegion *ar;
+
+ values[0] = values[1] = 1;
+
+ sa = rna_area_from_space(ptr);
+ if(!sa) return;
+
+ /* find aregion */
+ for(ar=sa->regionbase.first; ar; ar=ar->next) {
+ if(ar->regiontype == RGN_TYPE_WINDOW)
+ break;
+ }
+ if(!ar) return;
+
+ ED_space_image_zoom(sima, ar, &values[0], &values[1]);
+}
+
static void rna_SpaceImageEditor_cursor_location_get(PointerRNA *ptr, float *values)
{
SpaceImage *sima= (SpaceImage*)ptr->data;
@@ -1556,6 +1577,12 @@ static void rna_def_space_image(BlenderRNA *brna)
RNA_def_property_pointer_sdna(prop, NULL, "sample_line_hist");
RNA_def_property_struct_type(prop, "Histogram");
RNA_def_property_ui_text(prop, "Line sample", "Sampled colors along line");
+
+ prop= RNA_def_property(srna, "zoom", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_array(prop, 2);
+ RNA_def_property_clear_flag(prop, PROP_EDITABLE);
+ RNA_def_property_float_funcs(prop, "rna_SpaceImageEditor_zoom_get", NULL, NULL);
+ RNA_def_property_ui_text(prop, "Zoom", "Zoom factor");
/* image draw */
prop= RNA_def_property(srna, "show_repeat", PROP_BOOLEAN, PROP_NONE);