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:
authorJoerg Mueller <nexyon@gmail.com>2011-06-21 02:55:18 +0400
committerJoerg Mueller <nexyon@gmail.com>2011-06-21 02:55:18 +0400
commit207911bdb3e5ba3e110cc7107186af988d2d10e8 (patch)
tree88684071e2813d52f8dc700b593d7644b2be88c8 /source/blender/makesrna/intern
parentadb81a0351c0854ee8529ae7a66ef9c907790ee5 (diff)
parent768184753abb5a69e278bfe6207fe070b2e0ffc7 (diff)
Merge with trunk r37677
Diffstat (limited to 'source/blender/makesrna/intern')
-rw-r--r--source/blender/makesrna/intern/CMakeLists.txt2
-rw-r--r--source/blender/makesrna/intern/rna_access.c74
-rw-r--r--source/blender/makesrna/intern/rna_scene.c6
-rw-r--r--source/blender/makesrna/intern/rna_userdef.c26
4 files changed, 106 insertions, 2 deletions
diff --git a/source/blender/makesrna/intern/CMakeLists.txt b/source/blender/makesrna/intern/CMakeLists.txt
index 4e4ff396e71..ed5a1566cdc 100644
--- a/source/blender/makesrna/intern/CMakeLists.txt
+++ b/source/blender/makesrna/intern/CMakeLists.txt
@@ -177,7 +177,7 @@ if(WITH_CODEC_QUICKTIME)
endif()
if(WITH_CODEC_FFMPEG)
- list(APPEND INC_SYS ${FFMPEG_INC})
+ list(APPEND INC_SYS ${FFMPEG_INCLUDE_DIRS})
add_definitions(-DWITH_FFMPEG)
endif()
diff --git a/source/blender/makesrna/intern/rna_access.c b/source/blender/makesrna/intern/rna_access.c
index 91f88a26987..a632c5c646e 100644
--- a/source/blender/makesrna/intern/rna_access.c
+++ b/source/blender/makesrna/intern/rna_access.c
@@ -1643,6 +1643,43 @@ void RNA_property_int_get_array(PointerRNA *ptr, PropertyRNA *prop, int *values)
memset(values, 0, sizeof(int)*prop->totarraylength);
}
+void RNA_property_int_get_array_range(PointerRNA *ptr, PropertyRNA *prop, int values[2])
+{
+ const int array_len= RNA_property_array_length(ptr, prop);
+
+ if(array_len <= 0) {
+ values[0]= 0;
+ values[1]= 0;
+ }
+ else if (array_len == 1) {
+ RNA_property_int_get_array(ptr, prop, values);
+ values[1]= values[0];
+ }
+ else {
+ int arr_stack[32];
+ int *arr;
+ int i;
+
+ if(array_len > 32) {
+ arr= MEM_mallocN(sizeof(int) * array_len, "RNA_property_int_get_array_range");
+ }
+ else {
+ arr= arr_stack;
+ }
+
+ RNA_property_int_get_array(ptr, prop, arr);
+ values[0]= values[1]= arr[0];
+ for(i= 1; i < array_len; i++) {
+ values[0]= MIN2(values[0], arr[i]);
+ values[1]= MAX2(values[1], arr[i]);
+ }
+
+ if(arr != arr_stack) {
+ MEM_freeN(arr);
+ }
+ }
+}
+
int RNA_property_int_get_index(PointerRNA *ptr, PropertyRNA *prop, int index)
{
int tmp[RNA_MAX_ARRAY_LENGTH];
@@ -1839,6 +1876,43 @@ void RNA_property_float_get_array(PointerRNA *ptr, PropertyRNA *prop, float *val
memset(values, 0, sizeof(float)*prop->totarraylength);
}
+void RNA_property_float_get_array_range(PointerRNA *ptr, PropertyRNA *prop, float values[2])
+{
+ const int array_len= RNA_property_array_length(ptr, prop);
+
+ if(array_len <= 0) {
+ values[0]= 0.0f;
+ values[1]= 0.0f;
+ }
+ else if (array_len == 1) {
+ RNA_property_float_get_array(ptr, prop, values);
+ values[1]= values[0];
+ }
+ else {
+ float arr_stack[32];
+ float *arr;
+ int i;
+
+ if(array_len > 32) {
+ arr= MEM_mallocN(sizeof(float) * array_len, "RNA_property_float_get_array_range");
+ }
+ else {
+ arr= arr_stack;
+ }
+
+ RNA_property_float_get_array(ptr, prop, arr);
+ values[0]= values[1]= arr[0];
+ for(i= 1; i < array_len; i++) {
+ values[0]= MIN2(values[0], arr[i]);
+ values[1]= MAX2(values[1], arr[i]);
+ }
+
+ if(arr != arr_stack) {
+ MEM_freeN(arr);
+ }
+ }
+}
+
float RNA_property_float_get_index(PointerRNA *ptr, PropertyRNA *prop, int index)
{
float tmp[RNA_MAX_ARRAY_LENGTH];
diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c
index 145a58ecf0f..f24c83efe05 100644
--- a/source/blender/makesrna/intern/rna_scene.c
+++ b/source/blender/makesrna/intern/rna_scene.c
@@ -1173,6 +1173,12 @@ static void rna_def_tool_settings(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Project Individual Elements", "Project individual elements on the surface of other objects");
RNA_def_property_ui_icon(prop, ICON_RETOPO, 0);
RNA_def_property_update(prop, NC_SCENE|ND_TOOLSETTINGS, NULL); /* header redraw */
+
+ prop= RNA_def_property(srna, "use_snap_project_self", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_negative_sdna(prop, NULL, "snap_flag", SCE_SNAP_PROJECT_NO_SELF);
+ RNA_def_property_ui_text(prop, "Project to Self", "Project into its self (editmode)");
+ RNA_def_property_ui_icon(prop, ICON_ORTHO, 0);
+ RNA_def_property_update(prop, NC_SCENE|ND_TOOLSETTINGS, NULL); /* header redraw */
/* Grease Pencil */
prop = RNA_def_property(srna, "use_grease_pencil_sessions", PROP_BOOLEAN, PROP_NONE);
diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c
index cb50b99c05d..23060ba1aee 100644
--- a/source/blender/makesrna/intern/rna_userdef.c
+++ b/source/blender/makesrna/intern/rna_userdef.c
@@ -117,6 +117,12 @@ static void rna_userdef_mipmap_update(Main *bmain, Scene *scene, PointerRNA *ptr
rna_userdef_update(bmain, scene, ptr);
}
+static void rna_userdef_anisotropic_update(Main *bmain, Scene *scene, PointerRNA *ptr)
+{
+ GPU_set_anisotropic(U.anisotropic_filter);
+ rna_userdef_update(bmain, scene, ptr);
+}
+
static void rna_userdef_gl_texture_limit_update(Main *bmain, Scene *scene, PointerRNA *ptr)
{
GPU_free_images();
@@ -2109,19 +2115,22 @@ static void rna_def_userdef_view(BlenderRNA *brna)
prop= RNA_def_property(srna, "manipulator_size", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "tw_size");
RNA_def_property_range(prop, 2, 40);
+ RNA_def_property_int_default(prop, 15);
RNA_def_property_ui_text(prop, "Manipulator Size", "Diameter of widget, in 10 pixel units");
RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "manipulator_handle_size", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "tw_handlesize");
RNA_def_property_range(prop, 2, 40);
+ RNA_def_property_int_default(prop, 25);
RNA_def_property_ui_text(prop, "Manipulator Handle Size", "Size of widget handles as percentage of widget radius");
RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "manipulator_hotspot", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "tw_hotspot");
RNA_def_property_range(prop, 4, 40);
- RNA_def_property_ui_text(prop, "Manipulator Hotspot", "Hotspot in pixels for clicking widget handles");
+ RNA_def_property_int_default(prop, 14);
+ RNA_def_property_ui_text(prop, "Manipulator Hotspot", "Pixel distance around the handles to accept mouse clicks");
prop= RNA_def_property(srna, "object_origin_size", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "obcenter_dia");
@@ -2346,6 +2355,14 @@ static void rna_def_userdef_system(BlenderRNA *brna)
{128, "CLAMP_128", 0, "128", ""},
{0, NULL, 0, NULL, NULL}};
+ static EnumPropertyItem anisotropic_items[] ={
+ {1, "FILTER_0", 0, "Off", ""},
+ {2, "FILTER_2", 0, "2x", ""},
+ {4, "FILTER_4", 0, "4x", ""},
+ {8, "FILTER_8", 0, "8x", ""},
+ {16, "FILTER_16", 0, "16x", ""},
+ {0, NULL, 0, NULL, NULL}};
+
static EnumPropertyItem audio_mixing_samples_items[] = {
{256, "SAMPLES_256", 0, "256", "Set audio mixing buffer size to 256 samples"},
{512, "SAMPLES_512", 0, "512", "Set audio mixing buffer size to 512 samples"},
@@ -2568,6 +2585,13 @@ static void rna_def_userdef_system(BlenderRNA *brna)
prop= RNA_def_property(srna, "use_antialiasing", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "gameflags", USER_DISABLE_AA);
RNA_def_property_ui_text(prop, "Anti-aliasing", "Use anti-aliasing for the 3D view (may impact redraw performance)");
+
+ prop= RNA_def_property(srna, "anisotropic_filter", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_sdna(prop, NULL, "anisotropic_filter");
+ RNA_def_property_enum_items(prop, anisotropic_items);
+ RNA_def_property_enum_default(prop, 1);
+ RNA_def_property_ui_text(prop, "Anisotropic Filter", "The quality of the anisotropic filtering (values greater than 1.0 enable anisotropic filtering)");
+ RNA_def_property_update(prop, 0, "rna_userdef_anisotropic_update");
prop= RNA_def_property(srna, "gl_texture_limit", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "glreslimit");