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:
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.c82
-rw-r--r--source/blender/makesrna/intern/rna_actuator.c7
-rw-r--r--source/blender/makesrna/intern/rna_camera.c2
-rw-r--r--source/blender/makesrna/intern/rna_controller.c15
-rw-r--r--source/blender/makesrna/intern/rna_fluidsim.c8
-rw-r--r--source/blender/makesrna/intern/rna_group.c2
-rw-r--r--source/blender/makesrna/intern/rna_object.c1
-rw-r--r--source/blender/makesrna/intern/rna_texture.c1
-rw-r--r--source/blender/makesrna/intern/rna_userdef.c26
10 files changed, 133 insertions, 13 deletions
diff --git a/source/blender/makesrna/intern/CMakeLists.txt b/source/blender/makesrna/intern/CMakeLists.txt
index f60bc325494..a8658b86772 100644
--- a/source/blender/makesrna/intern/CMakeLists.txt
+++ b/source/blender/makesrna/intern/CMakeLists.txt
@@ -178,7 +178,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 10a837f0d05..391f681a832 100644
--- a/source/blender/makesrna/intern/rna_access.c
+++ b/source/blender/makesrna/intern/rna_access.c
@@ -100,9 +100,7 @@ void RNA_exit(void)
void RNA_struct_gettexted( StructRNA* ptr )
{
- StructRNA* temp_struct;
- PropertyRNA* temp_property;
- PropertyRNA* end_property;
+ PropertyRNA *temp_property, *end_property;
ptr->name = _(ptr->name);
ptr->description = _(ptr->description);
@@ -124,10 +122,6 @@ void RNA_struct_gettexted( StructRNA* ptr )
if( end_property->type == PROP_ENUM )
RNA_enum_items_gettexted( ((EnumPropertyRNA*)end_property)->item );
}
-
- temp_struct = (StructRNA*)ptr->cont.next;
- if( temp_struct!=NULL && temp_struct != &RNA_UnknownType )
- RNA_struct_gettexted( temp_struct );
}
void RNA_types_init_gettext()
@@ -1687,6 +1681,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];
@@ -1883,6 +1914,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_actuator.c b/source/blender/makesrna/intern/rna_actuator.c
index c7cf511d5c7..cddba59f979 100644
--- a/source/blender/makesrna/intern/rna_actuator.c
+++ b/source/blender/makesrna/intern/rna_actuator.c
@@ -922,6 +922,13 @@ static void rna_def_camera_actuator(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Max", "");
RNA_def_property_update(prop, NC_LOGIC, NULL);
+ prop= RNA_def_property(srna, "damping", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "damping");
+ RNA_def_property_range(prop, 0, 10.0);
+ RNA_def_property_ui_range(prop, 0, 5.0, 1, 2);
+ RNA_def_property_ui_text(prop, "Damping", "Specify the strength of the constraint that drive the camera behind the target");
+ RNA_def_property_update(prop, NC_LOGIC, NULL);
+
/* x/y */
prop= RNA_def_property(srna, "axis", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "axis");
diff --git a/source/blender/makesrna/intern/rna_camera.c b/source/blender/makesrna/intern/rna_camera.c
index 1705e2e5376..37912f810fc 100644
--- a/source/blender/makesrna/intern/rna_camera.c
+++ b/source/blender/makesrna/intern/rna_camera.c
@@ -133,7 +133,7 @@ void RNA_def_camera(BlenderRNA *brna)
prop= RNA_def_property(srna, "ortho_scale", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "ortho_scale");
- RNA_def_property_range(prop, 0.01f, 1000.0f);
+ RNA_def_property_range(prop, 0.01f, 4000.0f);
RNA_def_property_ui_text(prop, "Orthographic Scale", "Orthographic Camera scale (similar to zoom)");
RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, NULL);
diff --git a/source/blender/makesrna/intern/rna_controller.c b/source/blender/makesrna/intern/rna_controller.c
index 92c762098c7..db5409bf7ef 100644
--- a/source/blender/makesrna/intern/rna_controller.c
+++ b/source/blender/makesrna/intern/rna_controller.c
@@ -87,6 +87,20 @@ static void rna_Controller_type_set(struct PointerRNA *ptr, int value)
}
}
+static void rna_Controller_mode_set(struct PointerRNA *ptr, int value)
+{
+ bController *cont= (bController *)ptr->data;
+ bPythonCont *pycon= (bPythonCont *)cont->data;
+
+ // if mode changed and previous mode were Script
+ if (value != pycon->mode && pycon->mode == CONT_PY_SCRIPT)
+ {
+ // clear script to avoid it to get linked with the controller
+ pycon->text = NULL;
+ }
+ pycon->mode = value;
+}
+
static int rna_Controller_state_number_get(struct PointerRNA *ptr)
{
bController *cont= (bController *)ptr->data;
@@ -222,6 +236,7 @@ void RNA_def_controller(BlenderRNA *brna)
prop= RNA_def_property(srna, "mode", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, python_controller_modes);
+ RNA_def_property_enum_funcs(prop, NULL, "rna_Controller_mode_set", NULL);
RNA_def_property_ui_text(prop, "Execution Method", "Python script type (textblock or module - faster)");
RNA_def_property_update(prop, NC_LOGIC, NULL);
diff --git a/source/blender/makesrna/intern/rna_fluidsim.c b/source/blender/makesrna/intern/rna_fluidsim.c
index 7c93ae4168b..1ba2e32502f 100644
--- a/source/blender/makesrna/intern/rna_fluidsim.c
+++ b/source/blender/makesrna/intern/rna_fluidsim.c
@@ -312,7 +312,7 @@ static void rna_def_fluidsim_domain(BlenderRNA *brna)
/* advanced settings */
prop= RNA_def_property(srna, "gravity", PROP_FLOAT, PROP_ACCELERATION);
- RNA_def_property_float_sdna(prop, NULL, "gravx");
+ RNA_def_property_float_sdna(prop, NULL, "grav");
RNA_def_property_array(prop, 3);
RNA_def_property_range(prop, -1000.1, 1000.1);
RNA_def_property_ui_text(prop, "Gravity", "Gravity in X, Y and Z direction");
@@ -384,6 +384,12 @@ static void rna_def_fluidsim_domain(BlenderRNA *brna)
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_ui_text(prop, "Generate Speed Vectors", "Generate speed vectors for vector blur");
+ /* no collision object surface */
+ prop= RNA_def_property(srna, "surface_noobs", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "typeFlags", OB_FSSG_NOOBS);
+ RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
+ RNA_def_property_ui_text(prop, "Hide fluid surface", "");
+
/* particles */
prop= RNA_def_property(srna, "tracer_particles", PROP_INT, PROP_NONE);
diff --git a/source/blender/makesrna/intern/rna_group.c b/source/blender/makesrna/intern/rna_group.c
index a5097cc8b41..5d71d204a72 100644
--- a/source/blender/makesrna/intern/rna_group.c
+++ b/source/blender/makesrna/intern/rna_group.c
@@ -95,7 +95,7 @@ static void rna_def_group_objects(BlenderRNA *brna, PropertyRNA *cprop)
RNA_def_function_ui_description(func, "Add this object to a group");
/* object to add */
parm= RNA_def_pointer(func, "object", "Object", "", "Object to add.");
- RNA_def_property_flag(parm, PROP_REQUIRED);
+ RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL);
/* remove object */
func= RNA_def_function(srna, "unlink", "rna_Group_objects_unlink");
diff --git a/source/blender/makesrna/intern/rna_object.c b/source/blender/makesrna/intern/rna_object.c
index 5f4b2cf6a9f..ee43bfcca7d 100644
--- a/source/blender/makesrna/intern/rna_object.c
+++ b/source/blender/makesrna/intern/rna_object.c
@@ -1827,7 +1827,6 @@ static void rna_def_object(BlenderRNA *brna)
prop= RNA_def_property(srna, "parent_vertices", PROP_INT, PROP_UNSIGNED);
RNA_def_property_int_sdna(prop, NULL, "par1");
RNA_def_property_array(prop, 3);
- RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Parent Vertices", "Indices of vertices in cases of a vertex parenting relation");
RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, "rna_Object_internal_update");
diff --git a/source/blender/makesrna/intern/rna_texture.c b/source/blender/makesrna/intern/rna_texture.c
index 3a80207ba15..9e3a31ddb2e 100644
--- a/source/blender/makesrna/intern/rna_texture.c
+++ b/source/blender/makesrna/intern/rna_texture.c
@@ -135,6 +135,7 @@ static void rna_Texture_update(Main *bmain, Scene *scene, PointerRNA *ptr)
DAG_id_tag_update(&tex->id, 0);
WM_main_add_notifier(NC_TEXTURE, tex);
+ WM_main_add_notifier(NC_MATERIAL|ND_SHADING_DRAW, NULL);
}
static void rna_Texture_voxeldata_update(Main *bmain, Scene *scene, PointerRNA *ptr)
diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c
index 60fe7cbff4f..a0ceec692f0 100644
--- a/source/blender/makesrna/intern/rna_userdef.c
+++ b/source/blender/makesrna/intern/rna_userdef.c
@@ -118,6 +118,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();
@@ -2110,19 +2116,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, N_("Manipulator Size"), N_("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, N_("Manipulator Handle Size"), N_("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, N_("Manipulator Hotspot"), N_("Hotspot in pixels for clicking widget handles"));
+ RNA_def_property_int_default(prop, 14);
+ RNA_def_property_ui_text(prop, N_("Manipulator Hotspot"), N_("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");
@@ -2347,6 +2356,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", N_("Set audio mixing buffer size to 256 samples")},
{512, "SAMPLES_512", 0, "512", N_("Set audio mixing buffer size to 512 samples")},
@@ -2569,6 +2586,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, N_("Anti-aliasing"), N_("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, N_("Anisotropic Filter"), N_("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");