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:
authorArystanbek Dyussenov <arystan.d@gmail.com>2009-08-19 13:04:49 +0400
committerArystanbek Dyussenov <arystan.d@gmail.com>2009-08-19 13:04:49 +0400
commit7c786e28c4965fc7314d7a2a3521f41f9b562726 (patch)
tree68fc6352398e2fb1dba9bf0272e985abf9d176a0 /source/blender/makesrna/intern
parent09042ce9a507b7f9ea36a63e60bbda6266541579 (diff)
parent680f88017fda17582ac5b4c7e1b3afecbb56b2f8 (diff)
Merge with 2.5 -r 22173:22620.
Diffstat (limited to 'source/blender/makesrna/intern')
-rw-r--r--source/blender/makesrna/intern/CMakeLists.txt8
-rw-r--r--source/blender/makesrna/intern/SConscript3
-rw-r--r--source/blender/makesrna/intern/makesrna.c45
-rw-r--r--source/blender/makesrna/intern/rna_ID.c26
-rw-r--r--source/blender/makesrna/intern/rna_access.c112
-rw-r--r--source/blender/makesrna/intern/rna_actuator.c3
-rw-r--r--source/blender/makesrna/intern/rna_armature.c20
-rw-r--r--source/blender/makesrna/intern/rna_brush.c78
-rw-r--r--source/blender/makesrna/intern/rna_cloth.c2
-rw-r--r--source/blender/makesrna/intern/rna_color.c2
-rw-r--r--source/blender/makesrna/intern/rna_constraint.c76
-rw-r--r--source/blender/makesrna/intern/rna_context.c32
-rw-r--r--source/blender/makesrna/intern/rna_curve.c116
-rw-r--r--source/blender/makesrna/intern/rna_define.c64
-rw-r--r--source/blender/makesrna/intern/rna_fcurve.c4
-rw-r--r--source/blender/makesrna/intern/rna_fluidsim.c16
-rw-r--r--source/blender/makesrna/intern/rna_group.c2
-rw-r--r--source/blender/makesrna/intern/rna_image.c4
-rw-r--r--source/blender/makesrna/intern/rna_internal.h4
-rw-r--r--source/blender/makesrna/intern/rna_key.c12
-rw-r--r--source/blender/makesrna/intern/rna_lamp.c16
-rw-r--r--source/blender/makesrna/intern/rna_lattice.c4
-rw-r--r--source/blender/makesrna/intern/rna_main.c58
-rw-r--r--source/blender/makesrna/intern/rna_material.c165
-rw-r--r--source/blender/makesrna/intern/rna_mesh.c80
-rw-r--r--source/blender/makesrna/intern/rna_meta.c40
-rw-r--r--source/blender/makesrna/intern/rna_modifier.c38
-rw-r--r--source/blender/makesrna/intern/rna_nla.c10
-rw-r--r--source/blender/makesrna/intern/rna_nodetree.c2
-rw-r--r--source/blender/makesrna/intern/rna_object.c164
-rw-r--r--source/blender/makesrna/intern/rna_object_force.c108
-rw-r--r--source/blender/makesrna/intern/rna_particle.c48
-rw-r--r--source/blender/makesrna/intern/rna_pose.c34
-rw-r--r--source/blender/makesrna/intern/rna_render.c16
-rw-r--r--source/blender/makesrna/intern/rna_rna.c69
-rw-r--r--source/blender/makesrna/intern/rna_scene.c264
-rw-r--r--source/blender/makesrna/intern/rna_screen.c19
-rw-r--r--source/blender/makesrna/intern/rna_sculpt_paint.c72
-rw-r--r--source/blender/makesrna/intern/rna_sequence.c71
-rw-r--r--source/blender/makesrna/intern/rna_smoke.c41
-rw-r--r--source/blender/makesrna/intern/rna_sound.c161
-rw-r--r--source/blender/makesrna/intern/rna_space.c206
-rw-r--r--source/blender/makesrna/intern/rna_texture.c175
-rw-r--r--source/blender/makesrna/intern/rna_timeline.c2
-rw-r--r--source/blender/makesrna/intern/rna_ui.c12
-rw-r--r--source/blender/makesrna/intern/rna_ui_api.c14
-rw-r--r--source/blender/makesrna/intern/rna_userdef.c115
-rw-r--r--source/blender/makesrna/intern/rna_wm.c2
-rw-r--r--source/blender/makesrna/intern/rna_world.c18
49 files changed, 1952 insertions, 701 deletions
diff --git a/source/blender/makesrna/intern/CMakeLists.txt b/source/blender/makesrna/intern/CMakeLists.txt
index 2aa0fcc79ff..152f4031b91 100644
--- a/source/blender/makesrna/intern/CMakeLists.txt
+++ b/source/blender/makesrna/intern/CMakeLists.txt
@@ -42,6 +42,10 @@ SET(SRC
INCLUDE_DIRECTORIES(../../../../intern/guardedalloc .. ../../makesdna ../../blenkernel ../../blenlib ../../windowmanager ../../editors/include ../../imbuf ../../render/extern/include .)
FILE(GLOB INC_FILES ../*.h ../../makesdna/*.h)
+IF(WITH_GAMEENGINE)
+ ADD_DEFINITIONS(-DGAMEBLENDER)
+ENDIF(WITH_GAMEENGINE)
+
IF(WITH_OPENEXR)
ADD_DEFINITIONS(-DWITH_OPENEXR)
ENDIF(WITH_OPENEXR)
@@ -67,6 +71,10 @@ IF(NOT WITH_ELBEEM)
ADD_DEFINITIONS(-DDISABLE_ELBEEM)
ENDIF(NOT WITH_ELBEEM)
+IF(WITH_FFTW3)
+ ADD_DEFINITIONS(-DFFTW3=1)
+ENDIF(WITH_FFTW3)
+
# Build makesrna executable
ADD_EXECUTABLE(makesrna ${SRC} ${INC_FILES})
TARGET_LINK_LIBRARIES(makesrna bf_dna)
diff --git a/source/blender/makesrna/intern/SConscript b/source/blender/makesrna/intern/SConscript
index 6c8038bd509..1a3687af51e 100644
--- a/source/blender/makesrna/intern/SConscript
+++ b/source/blender/makesrna/intern/SConscript
@@ -58,6 +58,9 @@ if env['WITH_BF_LCMS']:
if env['WITH_BF_GAMEENGINE']:
defs.append('GAMEBLENDER=1')
+
+if env['WITH_BF_FFTW3']:
+ defs.append('FFTW3=1')
makesrna_tool.Append(CPPDEFINES=defs)
diff --git a/source/blender/makesrna/intern/makesrna.c b/source/blender/makesrna/intern/makesrna.c
index b467c2d20c2..baf820e7249 100644
--- a/source/blender/makesrna/intern/makesrna.c
+++ b/source/blender/makesrna/intern/makesrna.c
@@ -1381,15 +1381,48 @@ static const char *rna_property_subtypename(PropertyType type)
{
switch(type) {
case PROP_NONE: return "PROP_NONE";
- case PROP_UNSIGNED: return "PROP_UNSIGNED";
case PROP_FILEPATH: return "PROP_FILEPATH";
case PROP_DIRPATH: return "PROP_DIRPATH";
+ case PROP_UNSIGNED: return "PROP_UNSIGNED";
+ case PROP_PERCENTAGE: return "PROP_PERCENTAGE";
+ case PROP_ANGLE: return "PROP_ANGLE";
+ case PROP_TIME: return "PROP_TIME";
+ case PROP_DISTANCE: return "PROP_DISTANCE";
case PROP_COLOR: return "PROP_COLOR";
- case PROP_VECTOR: return "PROP_VECTOR";
+ case PROP_TRANSLATION: return "PROP_TRANSLATION";
+ case PROP_DIRECTION: return "PROP_DIRECTION";
case PROP_MATRIX: return "PROP_MATRIX";
- case PROP_ROTATION: return "PROP_ROTATION";
+ case PROP_EULER: return "PROP_EULER";
+ case PROP_QUATERNION: return "PROP_QUATERNION";
+ case PROP_VELOCITY: return "PROP_VELOCITY";
+ case PROP_ACCELERATION: return "PROP_ACCELERATION";
+ case PROP_XYZ: return "PROP_XYZ";
+ case PROP_RGB: return "PROP_RGB";
case PROP_NEVER_NULL: return "PROP_NEVER_NULL";
- case PROP_PERCENTAGE: return "PROP_PERCENTAGE";
+ default: {
+ /* incase we dont have a type preset that includes the subtype */
+ if(RNA_SUBTYPE_UNIT(type)) {
+ return rna_property_subtypename(type & ~RNA_SUBTYPE_UNIT(type));
+ }
+ else {
+ return "PROP_SUBTYPE_UNKNOWN";
+ }
+ }
+ }
+}
+
+static const char *rna_property_subtype_unit(PropertyType type)
+{
+ switch(RNA_SUBTYPE_UNIT(type)) {
+ case PROP_UNIT_NONE: return "PROP_UNIT_NONE";
+ case PROP_UNIT_LENGTH: return "PROP_UNIT_LENGTH";
+ case PROP_UNIT_AREA: return "PROP_UNIT_AREA";
+ case PROP_UNIT_VOLUME: return "PROP_UNIT_VOLUME";
+ case PROP_UNIT_MASS: return "PROP_UNIT_MASS";
+ case PROP_UNIT_ROTATION: return "PROP_UNIT_ROTATION";
+ case PROP_UNIT_TIME: return "PROP_UNIT_TIME";
+ case PROP_UNIT_VELOCITY: return "PROP_UNIT_VELOCITY";
+ case PROP_UNIT_ACCELERATION:return "PROP_UNIT_ACCELERATION";
default: return "PROP_UNKNOWN";
}
}
@@ -1702,7 +1735,7 @@ static void rna_generate_property(FILE *f, StructRNA *srna, const char *nest, Pr
rna_print_c_string(f, prop->name); fprintf(f, ",\n\t");
rna_print_c_string(f, prop->description); fprintf(f, ",\n\t");
fprintf(f, "%d,\n", prop->icon);
- fprintf(f, "\t%s, %s, %d,\n", rna_property_typename(prop->type), rna_property_subtypename(prop->subtype), prop->arraylength);
+ fprintf(f, "\t%s, %s|%s, %d,\n", rna_property_typename(prop->type), rna_property_subtypename(prop->subtype), rna_property_subtype_unit(prop->subtype), prop->arraylength);
fprintf(f, "\t%s, %d, %s,\n", rna_function_string(prop->update), prop->noteflag, rna_function_string(prop->editable));
if(prop->flag & PROP_RAW_ACCESS) rna_set_raw_offset(f, srna, prop);
@@ -2212,7 +2245,7 @@ static void rna_generate_header_cpp(BlenderRNA *brna, FILE *f)
fprintf(f, "#include \"RNA_blender.h\"\n");
fprintf(f, "#include \"RNA_types.h\"\n");
- fprintf(f, cpp_classes);
+ fprintf(f, "%s", cpp_classes);
fprintf(f, "/**************** Declarations ****************/\n\n");
diff --git a/source/blender/makesrna/intern/rna_ID.c b/source/blender/makesrna/intern/rna_ID.c
index cf3d59f78a0..f6e0a2468c4 100644
--- a/source/blender/makesrna/intern/rna_ID.c
+++ b/source/blender/makesrna/intern/rna_ID.c
@@ -152,6 +152,30 @@ IDProperty *rna_IDPropertyGroup_idproperties(PointerRNA *ptr, int create)
return ptr->data;
}
+void rna_IDPropertyGroup_unregister(const bContext *C, StructRNA *type)
+{
+ RNA_struct_free(&BLENDER_RNA, type);
+}
+
+StructRNA *rna_IDPropertyGroup_register(const bContext *C, ReportList *reports, void *data, const char *identifier, StructValidateFunc validate, StructCallbackFunc call, StructFreeFunc free)
+{
+ PointerRNA dummyptr;
+
+ /* create dummy pointer */
+ RNA_pointer_create(NULL, &RNA_IDPropertyGroup, NULL, &dummyptr);
+
+ /* validate the python class */
+ if(validate(&dummyptr, data, NULL) != 0)
+ return NULL;
+
+ return RNA_def_struct(&BLENDER_RNA, identifier, "IDPropertyGroup"); // XXX
+}
+
+StructRNA* rna_IDPropertyGroup_refine(PointerRNA *ptr)
+{
+ return ptr->type;
+}
+
#else
static void rna_def_ID_properties(BlenderRNA *brna)
@@ -210,6 +234,8 @@ static void rna_def_ID_properties(BlenderRNA *brna)
srna= RNA_def_struct(brna, "IDPropertyGroup", NULL);
RNA_def_struct_ui_text(srna, "ID Property Group", "Group of ID properties.");
RNA_def_struct_idproperties_func(srna, "rna_IDPropertyGroup_idproperties");
+ RNA_def_struct_register_funcs(srna, "rna_IDPropertyGroup_register", "rna_IDPropertyGroup_unregister");
+ RNA_def_struct_refine_func(srna, "rna_IDPropertyGroup_refine");
}
static void rna_def_ID(BlenderRNA *brna)
diff --git a/source/blender/makesrna/intern/rna_access.c b/source/blender/makesrna/intern/rna_access.c
index c141efc7ac6..7b8edb6c341 100644
--- a/source/blender/makesrna/intern/rna_access.c
+++ b/source/blender/makesrna/intern/rna_access.c
@@ -539,6 +539,11 @@ PropertySubType RNA_property_subtype(PropertyRNA *prop)
return rna_ensure_property(prop)->subtype;
}
+PropertyUnit RNA_property_unit(PropertyRNA *prop)
+{
+ return RNA_SUBTYPE_UNIT(rna_ensure_property(prop)->subtype);
+}
+
int RNA_property_flag(PropertyRNA *prop)
{
return rna_ensure_property(prop)->flag;
@@ -549,6 +554,24 @@ int RNA_property_array_length(PropertyRNA *prop)
return rna_ensure_property_array_length(prop);
}
+char RNA_property_array_item_char(PropertyRNA *prop, int index)
+{
+ const char *vectoritem= "XYZW";
+ const char *quatitem= "WXYZ";
+ const char *coloritem= "RGBA";
+ PropertySubType subtype= rna_ensure_property(prop)->subtype;
+
+ /* get string to use for array index */
+ if ((index < 4) && (subtype == PROP_QUATERNION))
+ return quatitem[index];
+ else if((index < 4) && ELEM6(subtype, PROP_TRANSLATION, PROP_DIRECTION, PROP_XYZ, PROP_EULER, PROP_VELOCITY, PROP_ACCELERATION))
+ return vectoritem[index];
+ else if ((index < 4) && ELEM(subtype, PROP_COLOR, PROP_RGB))
+ return coloritem[index];
+ else
+ return '\0';
+}
+
void RNA_property_int_range(PointerRNA *ptr, PropertyRNA *prop, int *hardmin, int *hardmax)
{
IntPropertyRNA *iprop= (IntPropertyRNA*)rna_ensure_property(prop);
@@ -1236,8 +1259,15 @@ PointerRNA RNA_property_pointer_get(PointerRNA *ptr, PropertyRNA *prop)
else if(pprop->get) {
return pprop->get(ptr);
}
+ else if(prop->flag & PROP_IDPROPERTY) {
+ /* XXX temporary hack to add it automatically, reading should
+ never do any write ops, to ensure thread safety etc .. */
+ RNA_property_pointer_add(ptr, prop);
+ return RNA_property_pointer_get(ptr, prop);
+ }
else {
PointerRNA result;
+
memset(&result, 0, sizeof(result));
return result;
}
@@ -1375,7 +1405,7 @@ int RNA_property_collection_length(PointerRNA *ptr, PropertyRNA *prop)
void RNA_property_collection_add(PointerRNA *ptr, PropertyRNA *prop, PointerRNA *r_ptr)
{
IDProperty *idprop;
- //CollectionPropertyRNA *cprop= (CollectionPropertyRNA*)prop;
+ CollectionPropertyRNA *cprop= (CollectionPropertyRNA*)prop;
if((idprop=rna_idproperty_check(&prop, ptr))) {
IDPropertyTemplate val = {0};
@@ -1401,7 +1431,6 @@ void RNA_property_collection_add(PointerRNA *ptr, PropertyRNA *prop, PointerRNA
MEM_freeN(item);
}
}
-#if 0
else if(cprop->add){
if(!(cprop->add->flag & FUNC_USE_CONTEXT)) { /* XXX check for this somewhere else */
ParameterList params;
@@ -1410,9 +1439,8 @@ void RNA_property_collection_add(PointerRNA *ptr, PropertyRNA *prop, PointerRNA
RNA_parameter_list_free(&params);
}
}
-#endif
- else
- printf("RNA_property_collection_add %s.%s: not implemented for this property.\n", ptr->type->identifier, prop->identifier);
+ /*else
+ printf("RNA_property_collection_add %s.%s: not implemented for this property.\n", ptr->type->identifier, prop->identifier);*/
if(r_ptr) {
if(idprop) {
@@ -1427,10 +1455,10 @@ void RNA_property_collection_add(PointerRNA *ptr, PropertyRNA *prop, PointerRNA
}
}
-void RNA_property_collection_remove(PointerRNA *ptr, PropertyRNA *prop, int key)
+int RNA_property_collection_remove(PointerRNA *ptr, PropertyRNA *prop, int key)
{
IDProperty *idprop;
- //CollectionPropertyRNA *cprop= (CollectionPropertyRNA*)prop;
+ CollectionPropertyRNA *cprop= (CollectionPropertyRNA*)prop;
if((idprop=rna_idproperty_check(&prop, ptr))) {
IDProperty tmp, *array;
@@ -1449,20 +1477,25 @@ void RNA_property_collection_remove(PointerRNA *ptr, PropertyRNA *prop, int key)
IDP_ResizeIDPArray(idprop, len-1);
}
+
+ return 1;
}
- else if(prop->flag & PROP_IDPROPERTY);
-#if 0
+ else if(prop->flag & PROP_IDPROPERTY)
+ return 1;
else if(cprop->remove){
if(!(cprop->remove->flag & FUNC_USE_CONTEXT)) { /* XXX check for this somewhere else */
ParameterList params;
- RNA_parameter_list_create(&ptr, cprop->remove);
+ RNA_parameter_list_create(&params, ptr, cprop->remove);
RNA_function_call(NULL, NULL, ptr, cprop->remove, &params);
RNA_parameter_list_free(&params);
}
+
+ return 0;
}
-#endif
- else
- printf("RNA_property_collection_remove %s.%s: only supported for id properties.\n", ptr->type->identifier, prop->identifier);
+ /*else
+ printf("RNA_property_collection_remove %s.%s: only supported for id properties.\n", ptr->type->identifier, prop->identifier);*/
+
+ return 0;
}
void RNA_property_collection_clear(PointerRNA *ptr, PropertyRNA *prop)
@@ -1966,9 +1999,10 @@ void rna_iterator_array_end(CollectionPropertyIterator *iter)
{
ArrayIterator *internal= iter->internal;
- if(internal->free_ptr)
+ if(internal->free_ptr) {
MEM_freeN(internal->free_ptr);
-
+ internal->free_ptr= NULL;
+ }
MEM_freeN(iter->internal);
iter->internal= NULL;
}
@@ -2624,7 +2658,7 @@ char *RNA_pointer_as_string(PointerRNA *ptr)
BLI_dynstr_append(dynstr, ", ");
first_time= 0;
- cstring = RNA_property_as_string(ptr, prop);
+ cstring = RNA_property_as_string(NULL, ptr, prop);
BLI_dynstr_appendf(dynstr, "\"%s\":%s", propname, cstring);
MEM_freeN(cstring);
}
@@ -2638,7 +2672,7 @@ char *RNA_pointer_as_string(PointerRNA *ptr)
return cstring;
}
-char *RNA_property_as_string(PointerRNA *ptr, PropertyRNA *prop)
+char *RNA_property_as_string(bContext *C, PointerRNA *ptr, PropertyRNA *prop)
{
int type = RNA_property_type(prop);
int len = RNA_property_array_length(prop);
@@ -2707,7 +2741,7 @@ char *RNA_property_as_string(PointerRNA *ptr, PropertyRNA *prop)
const char *identifier;
int val = RNA_property_enum_get(ptr, prop);
- if(RNA_property_enum_identifier(NULL, ptr, prop, val, &identifier)) {
+ if(RNA_property_enum_identifier(C, ptr, prop, val, &identifier)) {
BLI_dynstr_appendf(dynstr, "'%s'", identifier);
}
else {
@@ -2810,8 +2844,10 @@ const struct ListBase *RNA_function_defined_parameters(FunctionRNA *func)
ParameterList *RNA_parameter_list_create(ParameterList *parms, PointerRNA *ptr, FunctionRNA *func)
{
PropertyRNA *parm;
- int tot= 0;
+ void *data;
+ int tot= 0, size;
+ /* allocate data */
for(parm= func->cont.properties.first; parm; parm= parm->next)
tot+= rna_parameter_size(parm);
@@ -2819,6 +2855,44 @@ ParameterList *RNA_parameter_list_create(ParameterList *parms, PointerRNA *ptr,
parms->func= func;
parms->tot= tot;
+ /* set default values */
+ data= parms->data;
+
+ for(parm= func->cont.properties.first; parm; parm= parm->next) {
+ size= rna_parameter_size(parm);
+
+ if(!(parm->flag & PROP_REQUIRED)) {
+ switch(parm->type) {
+ case PROP_BOOLEAN:
+ if(parm->arraylength) memcpy(data, &((BooleanPropertyRNA*)parm)->defaultarray, size);
+ else memcpy(data, &((BooleanPropertyRNA*)parm)->defaultvalue, size);
+ break;
+ case PROP_INT:
+ if(parm->arraylength) memcpy(data, &((IntPropertyRNA*)parm)->defaultarray, size);
+ else memcpy(data, &((IntPropertyRNA*)parm)->defaultvalue, size);
+ break;
+ case PROP_FLOAT:
+ if(parm->arraylength) memcpy(data, &((FloatPropertyRNA*)parm)->defaultarray, size);
+ else memcpy(data, &((FloatPropertyRNA*)parm)->defaultvalue, size);
+ break;
+ case PROP_ENUM:
+ memcpy(data, &((EnumPropertyRNA*)parm)->defaultvalue, size);
+ break;
+ case PROP_STRING: {
+ const char *defvalue= ((StringPropertyRNA*)parm)->defaultvalue;
+ if(defvalue && defvalue[0])
+ memcpy(data, &defvalue, size);
+ break;
+ }
+ case PROP_POINTER:
+ case PROP_COLLECTION:
+ break;
+ }
+ }
+
+ data= ((char*)data) + size;
+ }
+
return parms;
}
diff --git a/source/blender/makesrna/intern/rna_actuator.c b/source/blender/makesrna/intern/rna_actuator.c
index 3eb88e706e9..473e726db60 100644
--- a/source/blender/makesrna/intern/rna_actuator.c
+++ b/source/blender/makesrna/intern/rna_actuator.c
@@ -51,8 +51,7 @@ void RNA_def_actuator(BlenderRNA *brna)
{ACT_SCENE, "SCENE", 0, "Scene", ""},
{ACT_RANDOM, "RANDOM", 0, "Random", ""},
{ACT_MESSAGE, "MESSAGE", 0, "Message", ""},
- {ACT_ACTION, "ACTION", 0, "Action", ""},
- {ACT_CD, "CD", 0, "CD", ""},
+ {ACT_ACTION, "ACTION", 0, "Action", ""},
{ACT_GAME, "GAME", 0, "Game", ""},
{ACT_VISIBILITY, "VISIBILITY", 0, "Visibility", ""},
{ACT_2DFILTER, "FILTER_2D", 0, "2D Filter", ""},
diff --git a/source/blender/makesrna/intern/rna_armature.c b/source/blender/makesrna/intern/rna_armature.c
index 45a833e0b29..7bc09b052ee 100644
--- a/source/blender/makesrna/intern/rna_armature.c
+++ b/source/blender/makesrna/intern/rna_armature.c
@@ -481,22 +481,22 @@ static void rna_def_bone(BlenderRNA *brna)
RNA_def_property_array(prop, 16);
RNA_def_property_ui_text(prop, "Bone Armature-Relative Matrix", "4x4 bone matrix relative to armature.");
- prop= RNA_def_property(srna, "tail", PROP_FLOAT, PROP_VECTOR);
+ prop= RNA_def_property(srna, "tail", PROP_FLOAT, PROP_TRANSLATION);
RNA_def_property_float_sdna(prop, NULL, "tail");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Tail", "Location of tail end of the bone.");
- prop= RNA_def_property(srna, "armature_tail", PROP_FLOAT, PROP_VECTOR);
+ prop= RNA_def_property(srna, "armature_tail", PROP_FLOAT, PROP_TRANSLATION);
RNA_def_property_float_sdna(prop, NULL, "arm_tail");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Armature-Relative Tail", "Location of tail end of the bone relative to armature.");
- prop= RNA_def_property(srna, "head", PROP_FLOAT, PROP_VECTOR);
+ prop= RNA_def_property(srna, "head", PROP_FLOAT, PROP_TRANSLATION);
RNA_def_property_float_sdna(prop, NULL, "head");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Head", "Location of head end of the bone.");
- prop= RNA_def_property(srna, "armature_head", PROP_FLOAT, PROP_VECTOR);
+ prop= RNA_def_property(srna, "armature_head", PROP_FLOAT, PROP_TRANSLATION);
RNA_def_property_float_sdna(prop, NULL, "arm_head");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Armature-Relative Head", "Location of head end of the bone relative to armature.");
@@ -526,13 +526,13 @@ static void rna_def_edit_bone(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Roll", "Bone rotation around head-tail axis.");
RNA_def_property_update(prop, 0, "rna_Armature_editbone_transform_update");
- prop= RNA_def_property(srna, "head", PROP_FLOAT, PROP_VECTOR);
+ prop= RNA_def_property(srna, "head", PROP_FLOAT, PROP_TRANSLATION);
RNA_def_property_float_sdna(prop, NULL, "head");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Head", "Location of head end of the bone.");
RNA_def_property_update(prop, 0, "rna_Armature_editbone_transform_update");
- prop= RNA_def_property(srna, "tail", PROP_FLOAT, PROP_VECTOR);
+ prop= RNA_def_property(srna, "tail", PROP_FLOAT, PROP_TRANSLATION);
RNA_def_property_float_sdna(prop, NULL, "tail");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Tail", "Location of tail end of the bone.");
@@ -739,13 +739,13 @@ void rna_def_armature(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Ghosting Frame Step", "Frame step for Ghosts (not for 'On Keyframes' Onion-skining method).");
RNA_def_property_update(prop, 0, "rna_Armature_redraw_data");
- prop= RNA_def_property(srna, "ghost_start_frame", PROP_INT, PROP_NONE);
+ prop= RNA_def_property(srna, "ghost_start_frame", PROP_INT, PROP_TIME);
RNA_def_property_int_sdna(prop, NULL, "ghostsf");
RNA_def_property_int_funcs(prop, NULL, "rna_Armature_ghost_start_frame_set", NULL);
RNA_def_property_ui_text(prop, "Ghosting Start Frame", "Starting frame of range of Ghosts to display (not for 'Around Current Frame' Onion-skinning method).");
RNA_def_property_update(prop, 0, "rna_Armature_redraw_data");
- prop= RNA_def_property(srna, "ghost_end_frame", PROP_INT, PROP_NONE);
+ prop= RNA_def_property(srna, "ghost_end_frame", PROP_INT, PROP_TIME);
RNA_def_property_int_sdna(prop, NULL, "ghostef");
RNA_def_property_int_funcs(prop, NULL, "rna_Armature_ghost_end_frame_set", NULL);
RNA_def_property_ui_text(prop, "Ghosting End Frame", "End frame of range of Ghosts to display (not for 'Around Current Frame' Onion-skinning method).");
@@ -758,13 +758,13 @@ void rna_def_armature(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Paths Frame Step", "Number of frames between 'dots' on Bone Paths (when drawing).");
RNA_def_property_update(prop, 0, "rna_Armature_redraw_data");
- prop= RNA_def_property(srna, "path_start_frame", PROP_INT, PROP_NONE);
+ prop= RNA_def_property(srna, "path_start_frame", PROP_INT, PROP_TIME);
RNA_def_property_int_sdna(prop, NULL, "pathsf");
RNA_def_property_int_funcs(prop, NULL, "rna_Armature_path_start_frame_set", NULL);
RNA_def_property_ui_text(prop, "Paths Calculation Start Frame", "Starting frame of range of frames to use for Bone Path calculations.");
RNA_def_property_update(prop, 0, "rna_Armature_update_data");
- prop= RNA_def_property(srna, "path_end_frame", PROP_INT, PROP_NONE);
+ prop= RNA_def_property(srna, "path_end_frame", PROP_INT, PROP_TIME);
RNA_def_property_int_sdna(prop, NULL, "pathef");
RNA_def_property_int_funcs(prop, NULL, "rna_Armature_path_end_frame_set", NULL);
RNA_def_property_ui_text(prop, "Paths Calculation End Frame", "End frame of range of frames to use for Bone Path calculations.");
diff --git a/source/blender/makesrna/intern/rna_brush.c b/source/blender/makesrna/intern/rna_brush.c
index 2bb4333365b..03b5a44f52b 100644
--- a/source/blender/makesrna/intern/rna_brush.c
+++ b/source/blender/makesrna/intern/rna_brush.c
@@ -32,6 +32,17 @@
#include "DNA_brush_types.h"
#include "DNA_texture_types.h"
+EnumPropertyItem brush_sculpt_tool_items[] = {
+ {SCULPT_TOOL_DRAW, "DRAW", 0, "Draw", ""},
+ {SCULPT_TOOL_SMOOTH, "SMOOTH", 0, "Smooth", ""},
+ {SCULPT_TOOL_PINCH, "PINCH", 0, "Pinch", ""},
+ {SCULPT_TOOL_INFLATE, "INFLATE", 0, "Inflate", ""},
+ {SCULPT_TOOL_GRAB, "GRAB", 0, "Grab", ""},
+ {SCULPT_TOOL_LAYER, "LAYER", 0, "Layer", ""},
+ {SCULPT_TOOL_FLATTEN, "FLATTEN", 0, "Flatten", ""},
+ {SCULPT_TOOL_CLAY, "CLAY", 0, "Clay", ""},
+ {0, NULL, 0, NULL, NULL}};
+
#ifdef RNA_RUNTIME
#include "MEM_guardedalloc.h"
@@ -74,26 +85,13 @@ static void rna_Brush_active_texture_set(PointerRNA *ptr, PointerRNA value)
}
}
-static float rna_Brush_rotation_get(PointerRNA *ptr)
-{
- Brush *brush= (Brush*)ptr->data;
- const float conv = 57.295779506;
- return brush->rot * conv;
-}
-
-static void rna_Brush_rotation_set(PointerRNA *ptr, float v)
-{
- Brush *brush= (Brush*)ptr->data;
- const float conv = 0.017453293;
- brush->rot = v * conv;
-}
-
#else
void rna_def_brush(BlenderRNA *brna)
{
StructRNA *srna;
PropertyRNA *prop;
+
static EnumPropertyItem prop_blend_items[] = {
{BRUSH_BLEND_MIX, "MIX", 0, "Mix", "Use mix blending mode while painting."},
{BRUSH_BLEND_ADD, "ADD", 0, "Add", "Use add blending mode while painting."},
@@ -104,22 +102,7 @@ void rna_def_brush(BlenderRNA *brna)
{BRUSH_BLEND_ERASE_ALPHA, "ERASE_ALPHA", 0, "Erase Alpha", "Erase alpha while painting."},
{BRUSH_BLEND_ADD_ALPHA, "ADD_ALPHA", 0, "Add Alpha", "Add alpha while painting."},
{0, NULL, 0, NULL, NULL}};
- static EnumPropertyItem prop_texture_mode_items[] = {
- {BRUSH_TEX_DRAG, "TEX_DRAG", 0, "Drag", ""},
- {BRUSH_TEX_TILE, "TEX_TILE", 0, "Tile", ""},
- {BRUSH_TEX_3D, "TEX_3D", 0, "3D", ""},
- {0, NULL, 0, NULL, NULL}};
- static EnumPropertyItem prop_sculpt_tool_items[] = {
- {SCULPT_TOOL_DRAW, "DRAW", 0, "Draw", ""},
- {SCULPT_TOOL_SMOOTH, "SMOOTH", 0, "Smooth", ""},
- {SCULPT_TOOL_PINCH, "PINCH", 0, "Pinch", ""},
- {SCULPT_TOOL_INFLATE, "INFLATE", 0, "Inflate", ""},
- {SCULPT_TOOL_GRAB, "GRAB", 0, "Grab", ""},
- {SCULPT_TOOL_LAYER, "LAYER", 0, "Layer", ""},
- {SCULPT_TOOL_FLATTEN, "FLATTEN", 0, "Flatten", ""},
- {SCULPT_TOOL_CLAY, "CLAY", 0, "Clay", ""},
- {0, NULL, 0, NULL, NULL}};
-
+
srna= RNA_def_struct(brna, "Brush", "ID");
RNA_def_struct_ui_text(srna, "Brush", "Brush datablock for storing brush settings for painting and sculpting.");
RNA_def_struct_ui_icon(srna, ICON_BRUSH_DATA);
@@ -129,13 +112,8 @@ void rna_def_brush(BlenderRNA *brna)
RNA_def_property_enum_items(prop, prop_blend_items);
RNA_def_property_ui_text(prop, "Blending mode", "Brush blending mode.");
- prop= RNA_def_property(srna, "texture_mode", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_sdna(prop, NULL, "tex_mode");
- RNA_def_property_enum_items(prop, prop_texture_mode_items);
- RNA_def_property_ui_text(prop, "Texture Mode", "");
-
prop= RNA_def_property(srna, "sculpt_tool", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_items(prop, prop_sculpt_tool_items);
+ RNA_def_property_enum_items(prop, brush_sculpt_tool_items);
RNA_def_property_ui_text(prop, "Sculpt Tool", "");
/* number values */
@@ -152,6 +130,14 @@ void rna_def_brush(BlenderRNA *brna)
RNA_def_property_float_sdna(prop, NULL, "spacing");
RNA_def_property_range(prop, 1.0f, 100.0f);
RNA_def_property_ui_text(prop, "Spacing", "Spacing between brush stamps.");
+
+ prop= RNA_def_property(srna, "smooth_stroke_radius", PROP_INT, PROP_NONE);
+ RNA_def_property_range(prop, 10, 200);
+ RNA_def_property_ui_text(prop, "Smooth Stroke Radius", "Minimum distance from last point before stroke continues.");
+
+ prop= RNA_def_property(srna, "smooth_stroke_factor", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_range(prop, 0.5, 0.99);
+ RNA_def_property_ui_text(prop, "Smooth Stroke Factor", "Higher values give a smoother stroke.");
prop= RNA_def_property(srna, "rate", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "rate");
@@ -167,12 +153,6 @@ void rna_def_brush(BlenderRNA *brna)
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Strength", "The amount of pressure on the brush.");
- prop= RNA_def_property(srna, "rotation", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "rot");
- RNA_def_property_range(prop, 0, 360);
- RNA_def_property_float_funcs(prop, "rna_Brush_rotation_get", "rna_Brush_rotation_set", NULL);
- RNA_def_property_ui_text(prop, "Rotation", "Angle of the brush texture.");
-
/* flag */
prop= RNA_def_property(srna, "airbrush", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", BRUSH_AIRBRUSH);
@@ -182,9 +162,9 @@ void rna_def_brush(BlenderRNA *brna)
RNA_def_property_boolean_sdna(prop, NULL, "flag", BRUSH_TORUS);
RNA_def_property_ui_text(prop, "Wrap", "Enable torus wrapping while painting.");
- prop= RNA_def_property(srna, "opacity_pressure", PROP_BOOLEAN, PROP_NONE);
+ prop= RNA_def_property(srna, "strength_pressure", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", BRUSH_ALPHA_PRESSURE);
- RNA_def_property_ui_text(prop, "Opacity Pressure", "Enable tablet pressure sensitivity for opacity.");
+ RNA_def_property_ui_text(prop, "Strength Pressure", "Enable tablet pressure sensitivity for strength.");
prop= RNA_def_property(srna, "size_pressure", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", BRUSH_SIZE_PRESSURE);
@@ -217,6 +197,10 @@ void rna_def_brush(BlenderRNA *brna)
prop= RNA_def_property(srna, "smooth_stroke", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", BRUSH_SMOOTH_STROKE);
RNA_def_property_ui_text(prop, "Smooth Stroke", "Brush lags behind mouse and follows a smoother path.");
+
+ prop= RNA_def_property(srna, "persistent", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", BRUSH_PERSISTENT);
+ RNA_def_property_ui_text(prop, "Persistent", "Sculpts on a persistent layer of the mesh.");
/* not exposed in the interface yet
prop= RNA_def_property(srna, "fixed_tex", PROP_BOOLEAN, PROP_NONE);
@@ -241,7 +225,7 @@ void rna_def_brush(BlenderRNA *brna)
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Clone Opacity", "Opacity of clone image display.");
- prop= RNA_def_property(srna, "clone_offset", PROP_FLOAT, PROP_VECTOR);
+ prop= RNA_def_property(srna, "clone_offset", PROP_FLOAT, PROP_XYZ);
RNA_def_property_float_sdna(prop, NULL, "clone.offset");
RNA_def_property_ui_text(prop, "Clone Offset", "");
RNA_def_property_ui_range(prop, -1.0f , 1.0f, 10.0f, 3);
@@ -266,12 +250,12 @@ static void rna_def_operator_stroke_element(BlenderRNA *brna)
srna= RNA_def_struct(brna, "OperatorStrokeElement", "IDPropertyGroup");
RNA_def_struct_ui_text(srna, "Operator Stroke Element", "");
- prop= RNA_def_property(srna, "location", PROP_FLOAT, PROP_VECTOR);
+ prop= RNA_def_property(srna, "location", PROP_FLOAT, PROP_XYZ);
RNA_def_property_flag(prop, PROP_IDPROPERTY);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Location", "");
- prop= RNA_def_property(srna, "mouse", PROP_INT, PROP_VECTOR);
+ prop= RNA_def_property(srna, "mouse", PROP_FLOAT, PROP_XYZ);
RNA_def_property_flag(prop, PROP_IDPROPERTY);
RNA_def_property_array(prop, 2);
RNA_def_property_ui_text(prop, "Mouse", "");
diff --git a/source/blender/makesrna/intern/rna_cloth.c b/source/blender/makesrna/intern/rna_cloth.c
index 11443ddfde1..9096bfc2844 100644
--- a/source/blender/makesrna/intern/rna_cloth.c
+++ b/source/blender/makesrna/intern/rna_cloth.c
@@ -218,7 +218,7 @@ static void rna_def_cloth_sim_settings(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Mass Vertex Group", "Vertex Group for pinning of vertices.");
RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_cloth_update");
- prop= RNA_def_property(srna, "gravity", PROP_FLOAT, PROP_VECTOR);
+ prop= RNA_def_property(srna, "gravity", PROP_FLOAT, PROP_ACCELERATION);
RNA_def_property_array(prop, 3);
RNA_def_property_range(prop, -100.0, 100.0);
RNA_def_property_float_funcs(prop, "rna_ClothSettings_gravity_get", "rna_ClothSettings_gravity_set", NULL);
diff --git a/source/blender/makesrna/intern/rna_color.c b/source/blender/makesrna/intern/rna_color.c
index f4248d18db3..420add2622a 100644
--- a/source/blender/makesrna/intern/rna_color.c
+++ b/source/blender/makesrna/intern/rna_color.c
@@ -130,7 +130,7 @@ static void rna_def_curvemappoint(BlenderRNA *brna)
/* not editable for now, need to have CurveMapping to do curvemapping_changed */
- prop= RNA_def_property(srna, "location", PROP_FLOAT, PROP_VECTOR);
+ prop= RNA_def_property(srna, "location", PROP_FLOAT, PROP_XYZ);
RNA_def_property_float_sdna(prop, NULL, "x");
RNA_def_property_array(prop, 2);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
diff --git a/source/blender/makesrna/intern/rna_constraint.c b/source/blender/makesrna/intern/rna_constraint.c
index d08e59c11dc..a8dc0454cef 100644
--- a/source/blender/makesrna/intern/rna_constraint.c
+++ b/source/blender/makesrna/intern/rna_constraint.c
@@ -416,7 +416,7 @@ static void rna_def_constraint_kinematic(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Pole Sub-Target", "");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_dependency_update");
- prop= RNA_def_property(srna, "pole_angle", PROP_FLOAT, PROP_NONE);
+ prop= RNA_def_property(srna, "pole_angle", PROP_FLOAT, PROP_ANGLE); // XXX - todo, convert to rad
RNA_def_property_float_sdna(prop, NULL, "poleangle");
RNA_def_property_range(prop, 0.0, 180.f);
RNA_def_property_ui_text(prop, "Pole Angle", "Pole rotation offset.");
@@ -676,7 +676,7 @@ static void rna_def_constraint_minmax(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Use Rotation", "Use the target's rotation to determine floor.");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
- prop= RNA_def_property(srna, "offset", PROP_FLOAT, PROP_NONE);
+ prop= RNA_def_property(srna, "offset", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_range(prop, 0.0, 100.f);
RNA_def_property_ui_text(prop, "Offset", "Offset of floor from object center.");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
@@ -768,13 +768,13 @@ static void rna_def_constraint_action(BlenderRNA *brna)
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
- prop= RNA_def_property(srna, "start_frame", PROP_INT, PROP_NONE);
+ prop= RNA_def_property(srna, "start_frame", PROP_INT, PROP_TIME);
RNA_def_property_int_sdna(prop, NULL, "start");
RNA_def_property_range(prop, MINAFRAME, MAXFRAME);
RNA_def_property_ui_text(prop, "Start Frame", "First frame of the Action to use.");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
- prop= RNA_def_property(srna, "end_frame", PROP_INT, PROP_NONE);
+ prop= RNA_def_property(srna, "end_frame", PROP_INT, PROP_TIME);
RNA_def_property_int_sdna(prop, NULL, "end");
RNA_def_property_range(prop, MINAFRAME, MAXFRAME);
RNA_def_property_ui_text(prop, "End Frame", "Last frame of the Action to use.");
@@ -871,7 +871,7 @@ static void rna_def_constraint_follow_path(BlenderRNA *brna)
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_dependency_update");
- prop= RNA_def_property(srna, "offset", PROP_INT, PROP_NONE);
+ prop= RNA_def_property(srna, "offset", PROP_INT, PROP_TIME);
RNA_def_property_range(prop, -300000.0, 300000.f);
RNA_def_property_ui_text(prop, "Offset", "Offset from the position corresponding to the time frame.");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
@@ -938,7 +938,7 @@ static void rna_def_constraint_stretch_to(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Keep Axis", "Axis to maintain during stretch.");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
- prop= RNA_def_property(srna, "original_length", PROP_FLOAT, PROP_NONE);
+ prop= RNA_def_property(srna, "original_length", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "orglength");
RNA_def_property_range(prop, 0.0, 100.f);
RNA_def_property_ui_text(prop, "Original Length", "Length at rest position.");
@@ -983,37 +983,37 @@ static void rna_def_constraint_rigid_body_joint(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Pivot Type", "");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
- prop= RNA_def_property(srna, "pivot_x", PROP_FLOAT, PROP_NONE);
+ prop= RNA_def_property(srna, "pivot_x", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "pivX");
RNA_def_property_range(prop, -1000.0, 1000.f);
RNA_def_property_ui_text(prop, "Pivot X", "Offset pivot on X.");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
- prop= RNA_def_property(srna, "pivot_y", PROP_FLOAT, PROP_NONE);
+ prop= RNA_def_property(srna, "pivot_y", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "pivY");
RNA_def_property_range(prop, -1000.0, 1000.f);
RNA_def_property_ui_text(prop, "Pivot Y", "Offset pivot on Y.");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
- prop= RNA_def_property(srna, "pivot_z", PROP_FLOAT, PROP_NONE);
+ prop= RNA_def_property(srna, "pivot_z", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "pivZ");
RNA_def_property_range(prop, -1000.0, 1000.f);
RNA_def_property_ui_text(prop, "Pivot Z", "Offset pivot on Z.");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
- prop= RNA_def_property(srna, "axis_x", PROP_FLOAT, PROP_NONE);
+ prop= RNA_def_property(srna, "axis_x", PROP_FLOAT, PROP_ANGLE); // XXX - convert to radians
RNA_def_property_float_sdna(prop, NULL, "axX");
RNA_def_property_range(prop, -360.0, 360.f);
RNA_def_property_ui_text(prop, "Axis X", "Rotate pivot on X axis in degrees.");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
- prop= RNA_def_property(srna, "axis_y", PROP_FLOAT, PROP_NONE);
+ prop= RNA_def_property(srna, "axis_y", PROP_FLOAT, PROP_ANGLE); // XXX - convert to radians
RNA_def_property_float_sdna(prop, NULL, "axY");
RNA_def_property_range(prop, -360.0, 360.f);
RNA_def_property_ui_text(prop, "Axis Y", "Rotate pivot on Y axis in degrees.");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
- prop= RNA_def_property(srna, "axis_z", PROP_FLOAT, PROP_NONE);
+ prop= RNA_def_property(srna, "axis_z", PROP_FLOAT, PROP_ANGLE); // XXX - convert to radians
RNA_def_property_float_sdna(prop, NULL, "axZ");
RNA_def_property_range(prop, -360.0, 360.f);
RNA_def_property_ui_text(prop, "Axis Z", "Rotate pivot on Z axis in degrees.");
@@ -1135,73 +1135,73 @@ static void rna_def_constraint_transform(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Extrapolate Motion", "Extrapolate ranges.");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
- prop= RNA_def_property(srna, "from_min_x", PROP_FLOAT, PROP_NONE);
+ prop= RNA_def_property(srna, "from_min_x", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "from_min[0]");
RNA_def_property_range(prop, 0.0, 1000.f);
RNA_def_property_ui_text(prop, "From Minimum X", "Bottom range of X axis source motion.");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
- prop= RNA_def_property(srna, "from_min_y", PROP_FLOAT, PROP_NONE);
+ prop= RNA_def_property(srna, "from_min_y", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "from_min[1]");
RNA_def_property_range(prop, 0.0, 1000.f);
RNA_def_property_ui_text(prop, "From Minimum Y", "Bottom range of Y axis source motion.");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
- prop= RNA_def_property(srna, "from_min_z", PROP_FLOAT, PROP_NONE);
+ prop= RNA_def_property(srna, "from_min_z", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "from_min[2]");
RNA_def_property_range(prop, 0.0, 1000.f);
RNA_def_property_ui_text(prop, "From Minimum Z", "Bottom range of Z axis source motion.");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
- prop= RNA_def_property(srna, "from_max_x", PROP_FLOAT, PROP_NONE);
+ prop= RNA_def_property(srna, "from_max_x", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "from_max[0]");
RNA_def_property_range(prop, 0.0, 1000.f);
RNA_def_property_ui_text(prop, "From Maximum X", "Top range of X axis source motion.");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
- prop= RNA_def_property(srna, "from_max_y", PROP_FLOAT, PROP_NONE);
+ prop= RNA_def_property(srna, "from_max_y", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "from_max[1]");
RNA_def_property_range(prop, 0.0, 1000.f);
RNA_def_property_ui_text(prop, "From Maximum Y", "Top range of Y axis source motion.");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
- prop= RNA_def_property(srna, "from_max_z", PROP_FLOAT, PROP_NONE);
+ prop= RNA_def_property(srna, "from_max_z", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "from_max[2]");
RNA_def_property_range(prop, 0.0, 1000.f);
RNA_def_property_ui_text(prop, "From Maximum Z", "Top range of Z axis source motion.");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
- prop= RNA_def_property(srna, "to_min_x", PROP_FLOAT, PROP_NONE);
+ prop= RNA_def_property(srna, "to_min_x", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "to_min[0]");
RNA_def_property_range(prop, 0.0, 1000.f);
RNA_def_property_ui_text(prop, "To Minimum X", "Bottom range of X axis destination motion.");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
- prop= RNA_def_property(srna, "to_min_y", PROP_FLOAT, PROP_NONE);
+ prop= RNA_def_property(srna, "to_min_y", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "to_min[1]");
RNA_def_property_range(prop, 0.0, 1000.f);
RNA_def_property_ui_text(prop, "To Minimum Y", "Bottom range of Y axis destination motion.");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
- prop= RNA_def_property(srna, "to_min_z", PROP_FLOAT, PROP_NONE);
+ prop= RNA_def_property(srna, "to_min_z", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "to_min[2]");
RNA_def_property_range(prop, 0.0, 1000.f);
RNA_def_property_ui_text(prop, "To Minimum Z", "Bottom range of Z axis destination motion.");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
- prop= RNA_def_property(srna, "to_max_x", PROP_FLOAT, PROP_NONE);
+ prop= RNA_def_property(srna, "to_max_x", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "to_max[0]");
RNA_def_property_range(prop, 0.0, 1000.f);
RNA_def_property_ui_text(prop, "To Maximum X", "Top range of X axis destination motion.");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
- prop= RNA_def_property(srna, "to_max_y", PROP_FLOAT, PROP_NONE);
+ prop= RNA_def_property(srna, "to_max_y", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "to_max[1]");
RNA_def_property_range(prop, 0.0, 1000.f);
RNA_def_property_ui_text(prop, "To Maximum Y", "Top range of Y axis destination motion.");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
- prop= RNA_def_property(srna, "to_max_z", PROP_FLOAT, PROP_NONE);
+ prop= RNA_def_property(srna, "to_max_z", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "to_max[2]");
RNA_def_property_range(prop, 0.0, 1000.f);
RNA_def_property_ui_text(prop, "To Maximum Z", "Top range of Z axis destination motion.");
@@ -1247,37 +1247,37 @@ static void rna_def_constraint_location_limit(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Maximum Z", "Use the maximum Z value.");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
- prop= RNA_def_property(srna, "minimum_x", PROP_FLOAT, PROP_NONE);
+ prop= RNA_def_property(srna, "minimum_x", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "xmin");
RNA_def_property_range(prop, -1000.0, 1000.f);
RNA_def_property_ui_text(prop, "Minimum X", "Lowest X value to allow.");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
- prop= RNA_def_property(srna, "minimum_y", PROP_FLOAT, PROP_NONE);
+ prop= RNA_def_property(srna, "minimum_y", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "ymin");
RNA_def_property_range(prop, -1000.0, 1000.f);
RNA_def_property_ui_text(prop, "Minimum Y", "Lowest Y value to allow.");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
- prop= RNA_def_property(srna, "minimum_z", PROP_FLOAT, PROP_NONE);
+ prop= RNA_def_property(srna, "minimum_z", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "zmin");
RNA_def_property_range(prop, -1000.0, 1000.f);
RNA_def_property_ui_text(prop, "Minimum Z", "Lowest Z value to allow.");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
- prop= RNA_def_property(srna, "maximum_x", PROP_FLOAT, PROP_NONE);
+ prop= RNA_def_property(srna, "maximum_x", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "xmax");
RNA_def_property_range(prop, -1000.0, 1000.f);
RNA_def_property_ui_text(prop, "Maximum X", "Highest X value to allow.");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
- prop= RNA_def_property(srna, "maximum_y", PROP_FLOAT, PROP_NONE);
+ prop= RNA_def_property(srna, "maximum_y", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "ymax");
RNA_def_property_range(prop, -1000.0, 1000.f);
RNA_def_property_ui_text(prop, "Maximum Y", "Highest Y value to allow.");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
- prop= RNA_def_property(srna, "maximum_z", PROP_FLOAT, PROP_NONE);
+ prop= RNA_def_property(srna, "maximum_z", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "zmax");
RNA_def_property_range(prop, -1000.0, 1000.f);
RNA_def_property_ui_text(prop, "Maximum Z", "Highest Z value to allow.");
@@ -1313,37 +1313,37 @@ static void rna_def_constraint_rotation_limit(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Limit Z", "Use the minimum Z value.");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
- prop= RNA_def_property(srna, "minimum_x", PROP_FLOAT, PROP_NONE);
+ prop= RNA_def_property(srna, "minimum_x", PROP_FLOAT, PROP_ANGLE);
RNA_def_property_float_sdna(prop, NULL, "xmin");
RNA_def_property_range(prop, -1000.0, 1000.f);
RNA_def_property_ui_text(prop, "Minimum X", "Lowest X value to allow.");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
- prop= RNA_def_property(srna, "minimum_y", PROP_FLOAT, PROP_NONE);
+ prop= RNA_def_property(srna, "minimum_y", PROP_FLOAT, PROP_ANGLE);
RNA_def_property_float_sdna(prop, NULL, "ymin");
RNA_def_property_range(prop, -1000.0, 1000.f);
RNA_def_property_ui_text(prop, "Minimum Y", "Lowest Y value to allow.");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
- prop= RNA_def_property(srna, "minimum_z", PROP_FLOAT, PROP_NONE);
+ prop= RNA_def_property(srna, "minimum_z", PROP_FLOAT, PROP_ANGLE);
RNA_def_property_float_sdna(prop, NULL, "zmin");
RNA_def_property_range(prop, -1000.0, 1000.f);
RNA_def_property_ui_text(prop, "Minimum Z", "Lowest Z value to allow.");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
- prop= RNA_def_property(srna, "maximum_x", PROP_FLOAT, PROP_NONE);
+ prop= RNA_def_property(srna, "maximum_x", PROP_FLOAT, PROP_ANGLE);
RNA_def_property_float_sdna(prop, NULL, "xmax");
RNA_def_property_range(prop, -1000.0, 1000.f);
RNA_def_property_ui_text(prop, "Maximum X", "Highest X value to allow.");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
- prop= RNA_def_property(srna, "maximum_y", PROP_FLOAT, PROP_NONE);
+ prop= RNA_def_property(srna, "maximum_y", PROP_FLOAT, PROP_ANGLE);
RNA_def_property_float_sdna(prop, NULL, "ymax");
RNA_def_property_range(prop, -1000.0, 1000.f);
RNA_def_property_ui_text(prop, "Maximum Y", "Highest Y value to allow.");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
- prop= RNA_def_property(srna, "maximum_z", PROP_FLOAT, PROP_NONE);
+ prop= RNA_def_property(srna, "maximum_z", PROP_FLOAT, PROP_ANGLE);
RNA_def_property_float_sdna(prop, NULL, "zmax");
RNA_def_property_range(prop, -1000.0, 1000.f);
RNA_def_property_ui_text(prop, "Maximum Z", "Highest Z value to allow.");
@@ -1462,7 +1462,7 @@ static void rna_def_constraint_distance_limit(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Sub-Target", "");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_dependency_update");
- prop= RNA_def_property(srna, "distance", PROP_FLOAT, PROP_NONE);
+ prop= RNA_def_property(srna, "distance", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "dist");
RNA_def_property_range(prop, 0.0, 100.f);
RNA_def_property_ui_text(prop, "Distance", "Radius of limiting sphere.");
@@ -1502,7 +1502,7 @@ static void rna_def_constraint_shrinkwrap(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Shrinkwrap Type", "Selects type of shrinkwrap algorithm for target position");
RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
- prop= RNA_def_property(srna, "distance", PROP_FLOAT, PROP_NONE);
+ prop= RNA_def_property(srna, "distance", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "dist");
RNA_def_property_range(prop, 0.0, 100.f);
RNA_def_property_ui_text(prop, "Distance", "Distance to Target.");
diff --git a/source/blender/makesrna/intern/rna_context.c b/source/blender/makesrna/intern/rna_context.c
index 5e164c6525f..7239fc1ff3d 100644
--- a/source/blender/makesrna/intern/rna_context.c
+++ b/source/blender/makesrna/intern/rna_context.c
@@ -31,10 +31,10 @@
#include "RNA_define.h"
#include "RNA_types.h"
-#ifdef RNA_RUNTIME
-
#include "BKE_context.h"
+#ifdef RNA_RUNTIME
+
static PointerRNA rna_Context_manager_get(PointerRNA *ptr)
{
bContext *C= (bContext*)ptr->data;
@@ -110,6 +110,12 @@ static PointerRNA rna_Context_user_preferences_get(PointerRNA *ptr)
return newptr;
}
+static int rna_Context_mode_get(PointerRNA *ptr)
+{
+ bContext *C= (bContext*)ptr->data;
+ return CTX_data_mode_enum(C);
+}
+
#else
void RNA_def_context(BlenderRNA *brna)
@@ -117,6 +123,23 @@ void RNA_def_context(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
+ static EnumPropertyItem mode_items[] = {
+ {CTX_MODE_EDIT_MESH, "EDIT_MESH", 0, "Mesh Edit", ""},
+ {CTX_MODE_EDIT_CURVE, "EDIT_CURVE", 0, "Curve Edit", ""},
+ {CTX_MODE_EDIT_SURFACE, "EDIT_SURFACE", 0, "Surface Edit", ""},
+ {CTX_MODE_EDIT_TEXT, "EDIT_TEXT", 0, "Edit Edit", ""},
+ {CTX_MODE_EDIT_ARMATURE, "EDIT_ARMATURE", 0, "Armature Edit", ""}, // PARSKEL reuse will give issues
+ {CTX_MODE_EDIT_METABALL, "EDIT_METABALL", 0, "Metaball Edit", ""},
+ {CTX_MODE_EDIT_LATTICE, "EDIT_LATTICE", 0, "Lattice Edit", ""},
+ {CTX_MODE_POSE, "POSE", 0, "Pose ", ""},
+ {CTX_MODE_SCULPT, "SCULPT", 0, "Sculpt", ""},
+ {CTX_MODE_PAINT_WEIGHT, "PAINT_WEIGHT", 0, "Weight Paint", ""},
+ {CTX_MODE_PAINT_VERTEX, "PAINT_VERTEX", 0, "Vertex Paint", ""},
+ {CTX_MODE_PAINT_TEXTURE, "PAINT_TEXTURE", 0, "Texture Paint", ""},
+ {CTX_MODE_PARTICLE, "PARTICLE", 0, "Particle", ""},
+ {CTX_MODE_OBJECT, "OBJECT", 0, "Object", ""},
+ {0, NULL, 0, NULL, NULL}};
+
srna= RNA_def_struct(brna, "Context", NULL);
RNA_def_struct_ui_text(srna, "Context", "Current windowmanager and data context.");
RNA_def_struct_sdna(srna, "bContext");
@@ -177,6 +200,11 @@ void RNA_def_context(BlenderRNA *brna)
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_struct_type(prop, "UserPreferences");
RNA_def_property_pointer_funcs(prop, "rna_Context_user_preferences_get", NULL, NULL);
+
+ prop= RNA_def_property(srna, "mode", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_items(prop, mode_items);
+ RNA_def_property_clear_flag(prop, PROP_EDITABLE);
+ RNA_def_property_enum_funcs(prop, "rna_Context_mode_get", NULL, NULL);
}
#endif
diff --git a/source/blender/makesrna/intern/rna_curve.c b/source/blender/makesrna/intern/rna_curve.c
index faf6c3a1f75..1dd3d0e63c5 100644
--- a/source/blender/makesrna/intern/rna_curve.c
+++ b/source/blender/makesrna/intern/rna_curve.c
@@ -33,6 +33,8 @@
#include "DNA_material_types.h"
#include "DNA_scene_types.h"
+#include "BKE_font.h"
+
EnumPropertyItem beztriple_handle_type_items[] = {
{HD_FREE, "FREE", 0, "Free", ""},
{HD_AUTO, "AUTO", 0, "Auto", ""},
@@ -52,6 +54,11 @@ EnumPropertyItem beztriple_interpolation_mode_items[] = {
#include "DNA_object_types.h"
#include "BKE_curve.h"
+#include "BKE_depsgraph.h"
+#include "BKE_main.h"
+
+#include "WM_api.h"
+#include "WM_types.h"
StructRNA *rna_Curve_refine(PointerRNA *ptr)
{
@@ -142,6 +149,22 @@ static void rna_BPoint_array_begin(CollectionPropertyIterator *iter, PointerRNA
rna_iterator_array_begin(iter, (void*)nu->bp, sizeof(BPoint*), nu->pntsv>0 ? nu->pntsu*nu->pntsv : nu->pntsu, 0, NULL);
}
+static void rna_Curve_update_data(bContext *C, PointerRNA *ptr)
+{
+ Main *bmain= CTX_data_main(C);
+ Scene *scene= CTX_data_scene(C);
+ Curve *cu= ptr->id.data;
+ Object *ob;
+
+ for(ob=bmain->object.first; ob; ob= ob->id.next) {
+ if(ob->data == cu) {
+ /* XXX this will loop over all objects again (slow) */
+ DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, ob);
+ }
+ }
+}
+
#else
static void rna_def_bpoint(BlenderRNA *brna)
@@ -157,32 +180,38 @@ static void rna_def_bpoint(BlenderRNA *brna)
prop= RNA_def_property(srna, "selected", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "f1", 0);
RNA_def_property_ui_text(prop, "Selected", "Selection status");
+ RNA_def_property_update(prop, 0, "rna_Curve_update_data");
prop= RNA_def_property(srna, "hidden", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "hide", 0);
RNA_def_property_ui_text(prop, "Hidden", "Visibility status");
+ RNA_def_property_update(prop, 0, "rna_Curve_update_data");
/* Vector value */
- prop= RNA_def_property(srna, "point", PROP_FLOAT, PROP_VECTOR);
+ prop= RNA_def_property(srna, "point", PROP_FLOAT, PROP_TRANSLATION);
RNA_def_property_array(prop, 4);
RNA_def_property_float_sdna(prop, NULL, "vec");
RNA_def_property_ui_text(prop, "Point", "Point coordinates");
+ RNA_def_property_update(prop, 0, "rna_Curve_update_data");
/* Number values */
prop= RNA_def_property(srna, "tilt", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "alfa");
/*RNA_def_property_range(prop, -FLT_MAX, FLT_MAX);*/
RNA_def_property_ui_text(prop, "Tilt", "Tilt in 3d View");
+ RNA_def_property_update(prop, 0, "rna_Curve_update_data");
prop= RNA_def_property(srna, "weight", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.01f, 100.0f);
RNA_def_property_ui_text(prop, "Weight", "Softbody goal weight");
+ RNA_def_property_update(prop, 0, "rna_Curve_update_data");
prop= RNA_def_property(srna, "bevel_radius", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "radius");
/*RNA_def_property_range(prop, 0.0f, 1.0f);*/
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Bevel Radius", "Radius for bevelling");
+ RNA_def_property_update(prop, 0, "rna_Curve_update_data");
}
static void rna_def_beztriple(BlenderRNA *brna)
@@ -198,67 +227,80 @@ static void rna_def_beztriple(BlenderRNA *brna)
prop= RNA_def_property(srna, "selected_handle1", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "f1", 0);
RNA_def_property_ui_text(prop, "Handle 1 selected", "Handle 1 selection status");
+ RNA_def_property_update(prop, 0, "rna_Curve_update_data");
prop= RNA_def_property(srna, "selected_handle2", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "f3", 0);
RNA_def_property_ui_text(prop, "Handle 2 selected", "Handle 2 selection status");
+ RNA_def_property_update(prop, 0, "rna_Curve_update_data");
prop= RNA_def_property(srna, "selected_control_point", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "f2", 0);
RNA_def_property_ui_text(prop, "Control Point selected", "Control point selection status");
+ RNA_def_property_update(prop, 0, "rna_Curve_update_data");
prop= RNA_def_property(srna, "hidden", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "hide", 0);
RNA_def_property_ui_text(prop, "Hidden", "Visibility status");
+ RNA_def_property_update(prop, 0, "rna_Curve_update_data");
/* Enums */
prop= RNA_def_property(srna, "handle1_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "h1");
RNA_def_property_enum_items(prop, beztriple_handle_type_items);
RNA_def_property_ui_text(prop, "Handle 1 Type", "Handle types");
+ RNA_def_property_update(prop, 0, "rna_Curve_update_data");
prop= RNA_def_property(srna, "handle2_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "h2");
RNA_def_property_enum_items(prop, beztriple_handle_type_items);
RNA_def_property_ui_text(prop, "Handle 2 Type", "Handle types");
+ RNA_def_property_update(prop, 0, "rna_Curve_update_data");
prop= RNA_def_property(srna, "interpolation", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "ipo");
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_enum_items(prop, beztriple_interpolation_mode_items);
RNA_def_property_ui_text(prop, "Interpolation", "(For F-Curves Only) Interpolation to use for segment of curve starting from current BezTriple.");
+ RNA_def_property_update(prop, 0, "rna_Curve_update_data");
/* Vector values */
- prop= RNA_def_property(srna, "handle1", PROP_FLOAT, PROP_VECTOR);
+ prop= RNA_def_property(srna, "handle1", PROP_FLOAT, PROP_TRANSLATION);
RNA_def_property_array(prop, 3);
RNA_def_property_float_funcs(prop, "rna_BezTriple_handle1_get", "rna_BezTriple_handle1_set", NULL);
RNA_def_property_ui_text(prop, "Handle 1", "Coordinates of the first handle");
+ RNA_def_property_update(prop, 0, "rna_Curve_update_data");
- prop= RNA_def_property(srna, "control_point", PROP_FLOAT, PROP_VECTOR);
+ prop= RNA_def_property(srna, "control_point", PROP_FLOAT, PROP_TRANSLATION);
RNA_def_property_array(prop, 3);
RNA_def_property_float_funcs(prop, "rna_BezTriple_ctrlpoint_get", "rna_BezTriple_ctrlpoint_set", NULL);
RNA_def_property_ui_text(prop, "Control Point", "Coordinates of the control point");
+ RNA_def_property_update(prop, 0, "rna_Curve_update_data");
- prop= RNA_def_property(srna, "handle2", PROP_FLOAT, PROP_VECTOR);
+ prop= RNA_def_property(srna, "handle2", PROP_FLOAT, PROP_TRANSLATION);
RNA_def_property_array(prop, 3);
RNA_def_property_float_funcs(prop, "rna_BezTriple_handle2_get", "rna_BezTriple_handle2_set", NULL);
RNA_def_property_ui_text(prop, "Handle 2", "Coordinates of the second handle");
+ RNA_def_property_update(prop, 0, "rna_Curve_update_data");
/* Number values */
prop= RNA_def_property(srna, "tilt", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "alfa");
/*RNA_def_property_range(prop, -FLT_MAX, FLT_MAX);*/
RNA_def_property_ui_text(prop, "Tilt", "Tilt in 3d View");
+ RNA_def_property_update(prop, 0, "rna_Curve_update_data");
prop= RNA_def_property(srna, "weight", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.01f, 100.0f);
RNA_def_property_ui_text(prop, "Weight", "Softbody goal weight");
+ RNA_def_property_update(prop, 0, "rna_Curve_update_data");
prop= RNA_def_property(srna, "bevel_radius", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "radius");
/*RNA_def_property_range(prop, 0.0f, 1.0f);*/
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Bevel Radius", "Radius for bevelling");
+ RNA_def_property_update(prop, 0, "rna_Curve_update_data");
}
static void rna_def_path(BlenderRNA *brna, StructRNA *srna)
@@ -270,23 +312,28 @@ static void rna_def_path(BlenderRNA *brna, StructRNA *srna)
RNA_def_property_int_sdna(prop, NULL, "pathlen");
RNA_def_property_range(prop, 1, 32767);
RNA_def_property_ui_text(prop, "Path Length", "If no speed IPO was set, the length of path in frames.");
+ RNA_def_property_update(prop, 0, "rna_Curve_update_data");
/* flags */
prop= RNA_def_property(srna, "path", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", CU_PATH);
RNA_def_property_ui_text(prop, "Path", "Enable the curve to become a translation path.");
+ RNA_def_property_update(prop, 0, "rna_Curve_update_data");
prop= RNA_def_property(srna, "follow", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", CU_FOLLOW);
RNA_def_property_ui_text(prop, "Follow", "Make curve path children to rotate along the path.");
+ RNA_def_property_update(prop, 0, "rna_Curve_update_data");
prop= RNA_def_property(srna, "stretch", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", CU_STRETCH);
RNA_def_property_ui_text(prop, "Stretch", "Option for curve-deform: makes deformed child to stretch along entire path.");
+ RNA_def_property_update(prop, 0, "rna_Curve_update_data");
prop= RNA_def_property(srna, "offset_path_distance", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", CU_OFFS_PATHDIST);
RNA_def_property_ui_text(prop, "Offset Path Distance", "Children will use TimeOffs value as path distance offset.");
+ RNA_def_property_update(prop, 0, "rna_Curve_update_data");
}
static void rna_def_nurbs(BlenderRNA *brna, StructRNA *srna)
@@ -297,10 +344,12 @@ static void rna_def_nurbs(BlenderRNA *brna, StructRNA *srna)
prop= RNA_def_property(srna, "uv_orco", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", CU_UV_ORCO);
RNA_def_property_ui_text(prop, "UV Orco", "Forces to use UV coordinates for texture mapping 'orco'.");
+ RNA_def_property_update(prop, 0, "rna_Curve_update_data");
prop= RNA_def_property(srna, "vertex_normal_flip", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", CU_NOPUNOFLIP);
RNA_def_property_ui_text(prop, "Vertex Normal Flip", "Flip vertex normals towards the camera during render");
+ RNA_def_property_update(prop, 0, "rna_Curve_update_data");
}
static void rna_def_font(BlenderRNA *brna, StructRNA *srna)
@@ -319,62 +368,74 @@ static void rna_def_font(BlenderRNA *brna, StructRNA *srna)
prop= RNA_def_property(srna, "spacemode", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, prop_align_items);
RNA_def_property_ui_text(prop, "Text Align", "Text align from the object center.");
+ RNA_def_property_update(prop, 0, "rna_Curve_update_data");
/* number values */
prop= RNA_def_property(srna, "text_size", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "fsize");
RNA_def_property_range(prop, 0.1f, 10.0f);
RNA_def_property_ui_text(prop, "Font size", "");
+ RNA_def_property_update(prop, 0, "rna_Curve_update_data");
prop= RNA_def_property(srna, "line_dist", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "linedist");
RNA_def_property_range(prop, 0.0f, 10.0f);
RNA_def_property_ui_text(prop, "Distance between lines of text", "");
+ RNA_def_property_update(prop, 0, "rna_Curve_update_data");
prop= RNA_def_property(srna, "word_spacing", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "wordspace");
RNA_def_property_range(prop, 0.0f, 10.0f);
RNA_def_property_ui_text(prop, "Spacing between words", "");
+ RNA_def_property_update(prop, 0, "rna_Curve_update_data");
prop= RNA_def_property(srna, "spacing", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "spacing");
RNA_def_property_range(prop, 0.0f, 10.0f);
RNA_def_property_ui_text(prop, "Global spacing between characters", "");
+ RNA_def_property_update(prop, 0, "rna_Curve_update_data");
prop= RNA_def_property(srna, "shear", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "shear");
RNA_def_property_range(prop, -1.0f, 1.0f);
RNA_def_property_ui_text(prop, "Shear", "Italic angle of the characters");
+ RNA_def_property_update(prop, 0, "rna_Curve_update_data");
prop= RNA_def_property(srna, "x_offset", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "xof");
RNA_def_property_range(prop, -50.0f, 50.0f);
RNA_def_property_ui_text(prop, "X Offset", "Horizontal offset from the object center");
+ RNA_def_property_update(prop, 0, "rna_Curve_update_data");
prop= RNA_def_property(srna, "y_offset", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "yof");
RNA_def_property_range(prop, -50.0f, 50.0f);
RNA_def_property_ui_text(prop, "Y Offset", "Vertical offset from the object center");
+ RNA_def_property_update(prop, 0, "rna_Curve_update_data");
prop= RNA_def_property(srna, "ul_position", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "ulpos");
RNA_def_property_range(prop, -0.2f, 0.8f);
RNA_def_property_ui_text(prop, "Underline position", "Vertical position of underline");
+ RNA_def_property_update(prop, 0, "rna_Curve_update_data");
prop= RNA_def_property(srna, "ul_height", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "ulheight");
RNA_def_property_range(prop, -0.2f, 0.8f);
RNA_def_property_ui_text(prop, "Underline thickness", "");
+ RNA_def_property_update(prop, 0, "rna_Curve_update_data");
prop= RNA_def_property(srna, "active_textbox", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "actbox");
RNA_def_property_range(prop, 0, 100);
RNA_def_property_ui_text(prop, "The active text box", "");
+ RNA_def_property_update(prop, 0, "rna_Curve_update_data");
/* strings */
prop= RNA_def_property(srna, "family", PROP_STRING, PROP_NONE);
RNA_def_property_string_maxlength(prop, 21);
RNA_def_property_ui_text(prop, "Family", "Blender uses font from selfmade objects.");
+ RNA_def_property_update(prop, 0, "rna_Curve_update_data");
prop= RNA_def_property(srna, "str", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "str");
@@ -388,23 +449,28 @@ static void rna_def_font(BlenderRNA *brna, StructRNA *srna)
RNA_def_property_pointer_sdna(prop, NULL, "textoncurve");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Text on Curve", "Curve deforming text object.");
+ RNA_def_property_update(prop, 0, "rna_Curve_update_data");
prop= RNA_def_property(srna, "font", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "vfont");
RNA_def_property_ui_text(prop, "Font", "");
+ RNA_def_property_update(prop, 0, "rna_Curve_update_data");
prop= RNA_def_property(srna, "textbox", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "tb");
RNA_def_property_ui_text(prop, "Textbox", "");
+ RNA_def_property_update(prop, 0, "rna_Curve_update_data");
prop= RNA_def_property(srna, "edit_format", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "curinfo");
RNA_def_property_ui_text(prop, "Edit Format", "Editing settings character formatting.");
+ RNA_def_property_update(prop, 0, "rna_Curve_update_data");
/* flags */
prop= RNA_def_property(srna, "fast", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", CU_FAST);
RNA_def_property_ui_text(prop, "Fast", "Don't fill polygons while editing.");
+ RNA_def_property_update(prop, 0, "rna_Curve_update_data");
}
static void rna_def_textbox(BlenderRNA *brna)
@@ -420,21 +486,25 @@ static void rna_def_textbox(BlenderRNA *brna)
RNA_def_property_float_sdna(prop, NULL, "x");
RNA_def_property_range(prop, -50.0f, 50.0f);
RNA_def_property_ui_text(prop, "Textbox X Offset", "");
+ RNA_def_property_update(prop, 0, "rna_Curve_update_data");
prop= RNA_def_property(srna, "y", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "y");
RNA_def_property_range(prop, -50.0f, 50.0f);
RNA_def_property_ui_text(prop, "Textbox Y Offset", "");
+ RNA_def_property_update(prop, 0, "rna_Curve_update_data");
prop= RNA_def_property(srna, "width", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "w");
RNA_def_property_range(prop, 0.0f, 50.0f);
RNA_def_property_ui_text(prop, "Textbox Width", "");
+ RNA_def_property_update(prop, 0, "rna_Curve_update_data");
prop= RNA_def_property(srna, "height", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "h");
RNA_def_property_range(prop, 0.0f, 50.0f);
RNA_def_property_ui_text(prop, "Textbox Height", "");
+ RNA_def_property_update(prop, 0, "rna_Curve_update_data");
}
static void rna_def_charinfo(BlenderRNA *brna)
@@ -450,22 +520,27 @@ static void rna_def_charinfo(BlenderRNA *brna)
prop= RNA_def_property(srna, "style", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", CU_STYLE);
RNA_def_property_ui_text(prop, "Style", "");
+ RNA_def_property_update(prop, 0, "rna_Curve_update_data");
prop= RNA_def_property(srna, "bold", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", CU_BOLD);
RNA_def_property_ui_text(prop, "Bold", "");
+ RNA_def_property_update(prop, 0, "rna_Curve_update_data");
prop= RNA_def_property(srna, "italic", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", CU_ITALIC);
RNA_def_property_ui_text(prop, "Italic", "");
+ RNA_def_property_update(prop, 0, "rna_Curve_update_data");
prop= RNA_def_property(srna, "underline", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", CU_UNDERLINE);
RNA_def_property_ui_text(prop, "Underline", "");
+ RNA_def_property_update(prop, 0, "rna_Curve_update_data");
prop= RNA_def_property(srna, "wrap", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", CU_WRAP);
RNA_def_property_ui_text(prop, "Wrap", "");
+ RNA_def_property_update(prop, 0, "rna_Curve_update_data");
}
static void rna_def_surface(BlenderRNA *brna)
@@ -523,31 +598,37 @@ static void rna_def_curve(BlenderRNA *brna)
RNA_def_property_range(prop, 0, 32);
RNA_def_property_ui_range(prop, 0, 32, 1.0, 0);
RNA_def_property_ui_text(prop, "Bevel Resolution", "Bevel resolution when depth is non-zero and no specific bevel object has been defined.");
+ RNA_def_property_update(prop, 0, "rna_Curve_update_data");
prop= RNA_def_property(srna, "width", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "width");
RNA_def_property_ui_range(prop, 0, 2.0, 0.1, 0);
RNA_def_property_ui_text(prop, "Width", "Scale the original width (1.0) based on given factor.");
+ RNA_def_property_update(prop, 0, "rna_Curve_update_data");
prop= RNA_def_property(srna, "extrude", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "ext1");
RNA_def_property_ui_range(prop, 0, 100.0, 0.1, 0);
RNA_def_property_ui_text(prop, "Extrude", "Amount of curve extrusion when not using a bevel object.");
+ RNA_def_property_update(prop, 0, "rna_Curve_update_data");
prop= RNA_def_property(srna, "bevel_depth", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "ext2");
RNA_def_property_ui_range(prop, 0, 100.0, 0.1, 0);
RNA_def_property_ui_text(prop, "Bevel Depth", "Bevel depth when not using a bevel object.");
+ RNA_def_property_update(prop, 0, "rna_Curve_update_data");
prop= RNA_def_property(srna, "resolution_u", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "resolu");
RNA_def_property_ui_range(prop, 1, 1024, 1, 0);
RNA_def_property_ui_text(prop, "Resolution U", "Surface resolution in U direction.");
+ RNA_def_property_update(prop, 0, "rna_Curve_update_data");
prop= RNA_def_property(srna, "resolution_v", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "resolv");
RNA_def_property_ui_range(prop, 1, 1024, 1, 0);
RNA_def_property_ui_text(prop, "Resolution V", "Surface resolution in V direction.");
+ RNA_def_property_update(prop, 0, "rna_Curve_update_data");
prop= RNA_def_property(srna, "render_resolution_u", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "resolu_ren");
@@ -563,34 +644,41 @@ static void rna_def_curve(BlenderRNA *brna)
prop= RNA_def_property(srna, "eval_time", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "ctime");
RNA_def_property_ui_text(prop, "Evaluation Time", "Parametric position along the length of the curve that Objects 'following' it should be at.");
+ RNA_def_property_update(prop, 0, "rna_Curve_update_data");
/* pointers */
prop= RNA_def_property(srna, "bevel_object", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "bevobj");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Bevel Object", "Curve object name that defines the bevel shape.");
+ RNA_def_property_update(prop, 0, "rna_Curve_update_data");
prop= RNA_def_property(srna, "taper_object", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "taperobj");
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Taper Object", "Curve object name that defines the taper (width).");
+ RNA_def_property_update(prop, 0, "rna_Curve_update_data");
/* Flags */
prop= RNA_def_property(srna, "curve_2d", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", CU_3D);
RNA_def_property_ui_text(prop, "2D Curve", "Define curve in two dimensions only. Note that fill only works when this is enabled.");
+ RNA_def_property_update(prop, 0, "rna_Curve_update_data");
prop= RNA_def_property(srna, "front", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", CU_FRONT);
RNA_def_property_ui_text(prop, "Front", "Draw filled front for extruded/beveled curves.");
+ RNA_def_property_update(prop, 0, "rna_Curve_update_data");
prop= RNA_def_property(srna, "back", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", CU_BACK);
RNA_def_property_ui_text(prop, "Back", "Draw filled back for extruded/beveled curves.");
+ RNA_def_property_update(prop, 0, "rna_Curve_update_data");
prop= RNA_def_property(srna, "retopo", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", CU_RETOPO);
RNA_def_property_ui_text(prop, "Retopo", "Turn on the re-topology tool.");
+ RNA_def_property_update(prop, 0, "rna_Curve_update_data");
}
static void rna_def_curve_nurb(BlenderRNA *brna)
@@ -624,89 +712,107 @@ static void rna_def_curve_nurb(BlenderRNA *brna)
RNA_def_property_enum_sdna(prop, NULL, "tilt_interp");
RNA_def_property_enum_items(prop, spline_interpolation_items);
RNA_def_property_ui_text(prop, "Tilt Interpolation", "The type of tilt interpolation for 3D, Bezier curves.");
+ RNA_def_property_update(prop, 0, "rna_Curve_update_data");
prop= RNA_def_property(srna, "radius_interpolation", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "radius_interp");
RNA_def_property_enum_items(prop, spline_interpolation_items);
RNA_def_property_ui_text(prop, "Radius Interpolation", "The type of radius interpolation for Bezier curves.");
+ RNA_def_property_update(prop, 0, "rna_Curve_update_data");
prop= RNA_def_property(srna, "point_count_u", PROP_INT, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE); /* editing this needs knot recalc*/
RNA_def_property_int_sdna(prop, NULL, "pntsu");
RNA_def_property_ui_text(prop, "Points U", "Total number points for the curve or surface in the U direction");
+ RNA_def_property_update(prop, 0, "rna_Curve_update_data");
prop= RNA_def_property(srna, "point_count_v", PROP_INT, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE); /* editing this needs knot recalc*/
RNA_def_property_int_sdna(prop, NULL, "pntsv");
RNA_def_property_ui_text(prop, "Points V", "Total number points for the surface on the V direction");
+ RNA_def_property_update(prop, 0, "rna_Curve_update_data");
prop= RNA_def_property(srna, "order_u", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "orderu");
RNA_def_property_range(prop, 2, 6);
RNA_def_property_ui_text(prop, "Order U", "Nurbs order in the U direction (For curves and surfaces), Higher values let points influence a greater area");
+ RNA_def_property_update(prop, 0, "rna_Curve_update_data");
prop= RNA_def_property(srna, "order_v", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "orderv");
RNA_def_property_range(prop, 2, 6);
RNA_def_property_ui_text(prop, "Order V", "Nurbs order in the V direction (For surfaces only), Higher values let points influence a greater area");
+ RNA_def_property_update(prop, 0, "rna_Curve_update_data");
prop= RNA_def_property(srna, "resolution_u", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "resolu");
RNA_def_property_range(prop, 1, 1024);
RNA_def_property_ui_text(prop, "Resolution U", "Curve or Surface subdivisions per segment");
+ RNA_def_property_update(prop, 0, "rna_Curve_update_data");
prop= RNA_def_property(srna, "resolution_v", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "resolv");
RNA_def_property_range(prop, 1, 1024);
RNA_def_property_ui_text(prop, "Resolution V", "Surface subdivisions per segment");
+ RNA_def_property_update(prop, 0, "rna_Curve_update_data");
prop= RNA_def_property(srna, "cyclic_u", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flagu", CU_CYCLIC);
RNA_def_property_ui_text(prop, "Cyclic U", "Make this curve or surface a closed loop in the U direction.");
+ RNA_def_property_update(prop, 0, "rna_Curve_update_data");
prop= RNA_def_property(srna, "cyclic_v", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flagv", CU_CYCLIC);
RNA_def_property_ui_text(prop, "Cyclic V", "Make this surface a closed loop in the V direction.");
+ RNA_def_property_update(prop, 0, "rna_Curve_update_data");
/* Note, endpoint and bezier flags should never be on at the same time! */
prop= RNA_def_property(srna, "endpoint_u", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flagu", 2);
RNA_def_property_ui_text(prop, "Endpoint U", "Make this nurbs curve or surface meet the endpoints in the U direction (Cyclic U must be disabled).");
+ RNA_def_property_update(prop, 0, "rna_Curve_update_data");
prop= RNA_def_property(srna, "endpoint_v", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flagv", 2);
RNA_def_property_ui_text(prop, "Endpoint V", "Make this nurbs surface meet the endpoints in the V direction (Cyclic V must be disabled).");
+ RNA_def_property_update(prop, 0, "rna_Curve_update_data");
prop= RNA_def_property(srna, "bezier_u", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flagu", 4);
RNA_def_property_ui_text(prop, "Bezier U", "Make this nurbs curve or surface act like a bezier spline in the U direction (Order U must be 3 or 4, Cyclic U must be disabled).");
+ RNA_def_property_update(prop, 0, "rna_Curve_update_data");
prop= RNA_def_property(srna, "bezier_v", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flagv", 4);
RNA_def_property_ui_text(prop, "Bezier V", "Make this nurbs surface act like a bezier spline in the V direction (Order V must be 3 or 4, Cyclic V must be disabled).");
+ RNA_def_property_update(prop, 0, "rna_Curve_update_data");
prop= RNA_def_property(srna, "smooth", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", CU_SMOOTH);
RNA_def_property_ui_text(prop, "Smooth", "Smooth the normals of the surface or beveled curve.");
+ RNA_def_property_update(prop, 0, "rna_Curve_update_data");
prop= RNA_def_property(srna, "hide", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "hide", 1);
RNA_def_property_ui_text(prop, "Hide", "Hide this curve in editmode.");
+ RNA_def_property_update(prop, 0, "rna_Curve_update_data");
prop= RNA_def_property(srna, "material_index", PROP_INT, PROP_UNSIGNED);
RNA_def_property_int_sdna(prop, NULL, "mat_nr");
RNA_def_property_ui_text(prop, "Material Index", "");
RNA_def_property_int_funcs(prop, NULL, NULL, "rna_Curve_material_index_range");
+ RNA_def_property_update(prop, 0, "rna_Curve_update_data");
prop= RNA_def_property(srna, "character_index", PROP_INT, PROP_UNSIGNED);
RNA_def_property_int_sdna(prop, NULL, "charidx");
RNA_def_property_clear_flag(prop, PROP_EDITABLE); /* editing this needs knot recalc*/
- RNA_def_property_ui_text(prop, "Character Index", "the location of this character in the text data (only for text curves)");
+ RNA_def_property_ui_text(prop, "Character Index", "Location of this character in the text data (only for text curves)");
+ RNA_def_property_update(prop, 0, "rna_Curve_update_data");
}
void RNA_def_curve(BlenderRNA *brna)
diff --git a/source/blender/makesrna/intern/rna_define.c b/source/blender/makesrna/intern/rna_define.c
index 76e17d835ba..f22fd594d8d 100644
--- a/source/blender/makesrna/intern/rna_define.c
+++ b/source/blender/makesrna/intern/rna_define.c
@@ -77,6 +77,20 @@ void rna_remlink(ListBase *listbase, void *vlink)
if (listbase->first == link) listbase->first = link->next;
}
+PropertyDefRNA *rna_findlink(ListBase *listbase, const char *identifier)
+{
+ Link *link;
+
+ for(link=listbase->first; link; link=link->next) {
+ PropertyRNA *prop= ((PropertyDefRNA *)link)->prop;
+ if(prop && (strcmp(prop->identifier, identifier)==0)) {
+ return (PropertyDefRNA *)link;
+ }
+ }
+
+ return NULL;
+}
+
void rna_freelinkN(ListBase *listbase, void *vlink)
{
rna_remlink(listbase, vlink);
@@ -444,6 +458,15 @@ void RNA_define_verify_sdna(int verify)
DefRNA.verify= verify;
}
+void RNA_struct_free_extension(StructRNA *srna, ExtensionRNA *ext)
+{
+#ifdef RNA_RUNTIME
+ ext->free(ext->data); /* decref's the PyObject that the srna owns */
+ RNA_struct_blender_type_set(srna, NULL); /* this gets accessed again - XXX fixme */
+ RNA_struct_py_type_set(srna, NULL); /* NULL the srna's value so RNA_struct_free wont complain of a leak */
+#endif
+}
+
void RNA_struct_free(BlenderRNA *brna, StructRNA *srna)
{
#ifdef RNA_RUNTIME
@@ -451,6 +474,12 @@ void RNA_struct_free(BlenderRNA *brna, StructRNA *srna)
PropertyRNA *prop, *nextprop;
PropertyRNA *parm, *nextparm;
+ if(srna->flag & STRUCT_RUNTIME) {
+ if(RNA_struct_py_type_get(srna)) {
+ fprintf(stderr, "StructRNA \"%s\" freed while holdng a python reference\n", srna->name);
+ }
+ }
+
for(prop=srna->cont.properties.first; prop; prop=nextprop) {
nextprop= prop->next;
@@ -482,6 +511,7 @@ void RNA_struct_free(BlenderRNA *brna, StructRNA *srna)
if(srna->flag & STRUCT_RUNTIME)
rna_freelinkN(&brna->structs, srna);
+
#endif
}
@@ -821,6 +851,13 @@ PropertyRNA *RNA_def_property(StructOrFunctionRNA *cont_, const char *identifier
}
dcont= rna_find_container_def(cont);
+
+ /* XXX - toto, detect supertype collisions */
+ if(rna_findlink(&dcont->properties, identifier)) {
+ fprintf(stderr, "RNA_def_property: duplicate identifier \"%s\"\n", identifier);
+ DefRNA.error= 1;
+ }
+
dprop= MEM_callocN(sizeof(PropertyDefRNA), "PropertyDefRNA");
rna_addtail(&dcont->properties, dprop);
}
@@ -1066,7 +1103,7 @@ void RNA_def_property_struct_type(PropertyRNA *prop, const char *type)
StructRNA *srna= DefRNA.laststruct;
if(!DefRNA.preprocess) {
- fprintf(stderr, "RNA_def_property_struct_type: only during preprocessing.\n");
+ fprintf(stderr, "RNA_def_property_struct_type %s.%s: only during preprocessing.\n", srna->identifier, prop->identifier);
return;
}
@@ -1877,7 +1914,7 @@ PropertyRNA *RNA_def_boolean_vector(StructOrFunctionRNA *cont_, const char *iden
ContainerRNA *cont= cont_;
PropertyRNA *prop;
- prop= RNA_def_property(cont, identifier, PROP_BOOLEAN, PROP_VECTOR);
+ prop= RNA_def_property(cont, identifier, PROP_BOOLEAN, PROP_XYZ); // XXX
if(len != 0) RNA_def_property_array(prop, len);
if(default_value) RNA_def_property_boolean_array_default(prop, default_value);
RNA_def_property_ui_text(prop, ui_name, ui_description);
@@ -1906,7 +1943,7 @@ PropertyRNA *RNA_def_int_vector(StructOrFunctionRNA *cont_, const char *identifi
ContainerRNA *cont= cont_;
PropertyRNA *prop;
- prop= RNA_def_property(cont, identifier, PROP_INT, PROP_VECTOR);
+ prop= RNA_def_property(cont, identifier, PROP_INT, PROP_XYZ); // XXX
if(len != 0) RNA_def_property_array(prop, len);
if(default_value) RNA_def_property_int_array_default(prop, default_value);
if(hardmin != hardmax) RNA_def_property_range(prop, hardmin, hardmax);
@@ -2015,7 +2052,7 @@ PropertyRNA *RNA_def_float_vector(StructOrFunctionRNA *cont_, const char *identi
ContainerRNA *cont= cont_;
PropertyRNA *prop;
- prop= RNA_def_property(cont, identifier, PROP_FLOAT, PROP_VECTOR);
+ prop= RNA_def_property(cont, identifier, PROP_FLOAT, PROP_XYZ);
if(len != 0) RNA_def_property_array(prop, len);
if(default_value) RNA_def_property_float_array_default(prop, default_value);
if(hardmin != hardmax) RNA_def_property_range(prop, hardmin, hardmax);
@@ -2064,7 +2101,7 @@ PropertyRNA *RNA_def_float_rotation(StructOrFunctionRNA *cont_, const char *iden
ContainerRNA *cont= cont_;
PropertyRNA *prop;
- prop= RNA_def_property(cont, identifier, PROP_FLOAT, PROP_ROTATION);
+ prop= RNA_def_property(cont, identifier, PROP_FLOAT, PROP_EULER); // XXX
if(len != 0) RNA_def_property_array(prop, len);
if(default_value) RNA_def_property_float_array_default(prop, default_value);
if(hardmin != hardmax) RNA_def_property_range(prop, hardmin, hardmax);
@@ -2384,6 +2421,7 @@ void RNA_def_property_duplicate_pointers(PropertyRNA *prop)
EnumPropertyItem *earray;
float *farray;
int *iarray;
+ int a;
if(prop->identifier) prop->identifier= BLI_strdup(prop->identifier);
if(prop->name) prop->name= BLI_strdup(prop->name);
@@ -2417,7 +2455,14 @@ void RNA_def_property_duplicate_pointers(PropertyRNA *prop)
earray= MEM_callocN(sizeof(EnumPropertyItem)*(eprop->totitem+1), "RNA_def_property_store"),
memcpy(earray, eprop->item, sizeof(EnumPropertyItem)*(eprop->totitem+1));
eprop->item= earray;
+
+ for(a=0; a<eprop->totitem; a++) {
+ if(eprop->item[a].identifier) eprop->item[a].identifier= BLI_strdup(eprop->item[a].identifier);
+ if(eprop->item[a].name) eprop->item[a].name= BLI_strdup(eprop->item[a].name);
+ if(eprop->item[a].description) eprop->item[a].description= BLI_strdup(eprop->item[a].description);
+ }
}
+ break;
}
case PROP_FLOAT: {
FloatPropertyRNA *fprop= (FloatPropertyRNA*)prop;
@@ -2444,6 +2489,8 @@ void RNA_def_property_duplicate_pointers(PropertyRNA *prop)
void RNA_def_property_free_pointers(PropertyRNA *prop)
{
if(prop->flag & PROP_FREE_POINTERS) {
+ int a;
+
if(prop->identifier) MEM_freeN((void*)prop->identifier);
if(prop->name) MEM_freeN((void*)prop->name);
if(prop->description) MEM_freeN((void*)prop->description);
@@ -2467,6 +2514,13 @@ void RNA_def_property_free_pointers(PropertyRNA *prop)
case PROP_ENUM: {
EnumPropertyRNA *eprop= (EnumPropertyRNA*)prop;
if(eprop->item) MEM_freeN((void*)eprop->item);
+
+ for(a=0; a<eprop->totitem; a++) {
+ if(eprop->item[a].identifier) MEM_freeN((void*)eprop->item[a].identifier);
+ if(eprop->item[a].name) MEM_freeN((void*)eprop->item[a].name);
+ if(eprop->item[a].description) MEM_freeN((void*)eprop->item[a].description);
+ }
+ break;
}
case PROP_STRING: {
StringPropertyRNA *sprop= (StringPropertyRNA*)prop;
diff --git a/source/blender/makesrna/intern/rna_fcurve.c b/source/blender/makesrna/intern/rna_fcurve.c
index ceef84b92df..fa6eea5f8a9 100644
--- a/source/blender/makesrna/intern/rna_fcurve.c
+++ b/source/blender/makesrna/intern/rna_fcurve.c
@@ -255,7 +255,7 @@ static void rna_def_fmodifier_envelope_ctrl(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Maximum Value", "Upper bound of envelope at this control-point.");
/* Frame */
- prop= RNA_def_property(srna, "frame", PROP_FLOAT, PROP_NONE);
+ prop= RNA_def_property(srna, "frame", PROP_FLOAT, PROP_TIME);
RNA_def_property_float_sdna(prop, NULL, "time");
RNA_def_property_ui_text(prop, "Frame", "Frame this control-point occurs on.");
@@ -548,7 +548,7 @@ static void rna_def_fpoint(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Selected", "Selection status");
/* Vector value */
- prop= RNA_def_property(srna, "point", PROP_FLOAT, PROP_VECTOR);
+ prop= RNA_def_property(srna, "point", PROP_FLOAT, PROP_XYZ);
RNA_def_property_array(prop, 2);
RNA_def_property_float_sdna(prop, NULL, "vec");
RNA_def_property_ui_text(prop, "Point", "Point coordinates");
diff --git a/source/blender/makesrna/intern/rna_fluidsim.c b/source/blender/makesrna/intern/rna_fluidsim.c
index ea4deae08e7..936e1700ed7 100644
--- a/source/blender/makesrna/intern/rna_fluidsim.c
+++ b/source/blender/makesrna/intern/rna_fluidsim.c
@@ -98,7 +98,7 @@ static void rna_FluidSettings_update_type(bContext *C, PointerRNA *ptr)
part->type= PART_FLUID;
psys->part= part;
- psys->pointcache= BKE_ptcache_add();
+ psys->pointcache= BKE_ptcache_add(&psys->ptcaches);
psys->flag |= PSYS_ENABLED;
BLI_addtail(&ob->particlesystem,psys);
@@ -202,12 +202,12 @@ static void rna_def_fluidsim_domain(BlenderRNA *brna)
RNA_def_property_range(prop, 1, 100);
RNA_def_property_ui_text(prop, "Preview Resolution", "Preview resolution in X,Y and Z direction.");
- prop= RNA_def_property(srna, "start_time", PROP_FLOAT, PROP_NONE);
+ prop= RNA_def_property(srna, "start_time", PROP_FLOAT, PROP_TIME);
RNA_def_property_float_sdna(prop, NULL, "animStart");
RNA_def_property_range(prop, 0, 100);
RNA_def_property_ui_text(prop, "Start Time", "Simulation time of the first blender frame.");
- prop= RNA_def_property(srna, "end_time", PROP_FLOAT, PROP_NONE);
+ prop= RNA_def_property(srna, "end_time", PROP_FLOAT, PROP_TIME);
RNA_def_property_float_sdna(prop, NULL, "animEnd");
RNA_def_property_range(prop, 0, 100);
RNA_def_property_ui_text(prop, "End Time", "Simulation time of the last blender frame.");
@@ -240,7 +240,7 @@ static void rna_def_fluidsim_domain(BlenderRNA *brna)
/* advanced settings */
- prop= RNA_def_property(srna, "gravity", PROP_FLOAT, PROP_VECTOR);
+ prop= RNA_def_property(srna, "gravity", PROP_FLOAT, PROP_ACCELERATION);
RNA_def_property_float_sdna(prop, NULL, "gravx");
RNA_def_property_array(prop, 3);
RNA_def_property_range(prop, -1000.1, 1000.1);
@@ -338,7 +338,7 @@ static void rna_def_fluidsim_fluid(BlenderRNA *brna)
rna_def_fluidsim_volume(srna);
- prop= RNA_def_property(srna, "initial_velocity", PROP_FLOAT, PROP_VECTOR);
+ prop= RNA_def_property(srna, "initial_velocity", PROP_FLOAT, PROP_VELOCITY);
RNA_def_property_float_sdna(prop, NULL, "iniVelx");
RNA_def_property_array(prop, 3);
RNA_def_property_range(prop, -1000.1, 1000.1);
@@ -374,7 +374,7 @@ static void rna_def_fluidsim_inflow(BlenderRNA *brna)
rna_def_fluidsim_volume(srna);
- prop= RNA_def_property(srna, "inflow_velocity", PROP_FLOAT, PROP_VECTOR);
+ prop= RNA_def_property(srna, "inflow_velocity", PROP_FLOAT, PROP_VELOCITY);
RNA_def_property_float_sdna(prop, NULL, "iniVelx");
RNA_def_property_array(prop, 3);
RNA_def_property_range(prop, -1000.1, 1000.1);
@@ -443,12 +443,12 @@ static void rna_def_fluidsim_control(BlenderRNA *brna)
RNA_def_struct_sdna(srna, "FluidsimSettings");
RNA_def_struct_ui_text(srna, "Control Fluid Simulation Settings", "Fluid simulation settings for objects controlling the motion of fluid in the simulation.");
- prop= RNA_def_property(srna, "start_time", PROP_FLOAT, PROP_NONE);
+ prop= RNA_def_property(srna, "start_time", PROP_FLOAT, PROP_TIME);
RNA_def_property_float_sdna(prop, NULL, "cpsTimeStart");
RNA_def_property_range(prop, 0.0, 100.0);
RNA_def_property_ui_text(prop, "Start Time", "Specifies time when the control particles are activated.");
- prop= RNA_def_property(srna, "end_time", PROP_FLOAT, PROP_NONE);
+ prop= RNA_def_property(srna, "end_time", PROP_FLOAT, PROP_TIME);
RNA_def_property_float_sdna(prop, NULL, "cpsTimeEnd");
RNA_def_property_range(prop, 0.0, 100.0);
RNA_def_property_ui_text(prop, "End Time", "Specifies time when the control particles are deactivated.");
diff --git a/source/blender/makesrna/intern/rna_group.c b/source/blender/makesrna/intern/rna_group.c
index 1406ad1ae60..18c04fbfb50 100644
--- a/source/blender/makesrna/intern/rna_group.c
+++ b/source/blender/makesrna/intern/rna_group.c
@@ -52,7 +52,7 @@ void RNA_def_group(BlenderRNA *brna)
RNA_def_struct_ui_text(srna, "Group", "Group of Object datablocks.");
RNA_def_struct_ui_icon(srna, ICON_GROUP);
- prop= RNA_def_property(srna, "dupli_offset", PROP_FLOAT, PROP_VECTOR);
+ prop= RNA_def_property(srna, "dupli_offset", PROP_FLOAT, PROP_TRANSLATION);
RNA_def_property_float_sdna(prop, NULL, "dupli_ofs");
RNA_def_property_ui_text(prop, "Dupli Offset", "Offset from the center to use when instancing as DupliGroup.");
RNA_def_property_ui_range(prop, -10000.0, 10000.0, 10, 4);
diff --git a/source/blender/makesrna/intern/rna_image.c b/source/blender/makesrna/intern/rna_image.c
index 5366296a6b8..c96b1265126 100644
--- a/source/blender/makesrna/intern/rna_image.c
+++ b/source/blender/makesrna/intern/rna_image.c
@@ -116,7 +116,7 @@ static void rna_def_imageuser(BlenderRNA *brna)
RNA_def_property_range(prop, -MAXFRAMEF, MAXFRAMEF);
RNA_def_property_ui_text(prop, "Offset", "Offsets the number of the frame to use in the animation.");
- prop= RNA_def_property(srna, "start_frame", PROP_INT, PROP_NONE);
+ prop= RNA_def_property(srna, "start_frame", PROP_INT, PROP_TIME);
RNA_def_property_int_sdna(prop, NULL, "sfra");
RNA_def_property_range(prop, 1.0f, MAXFRAMEF);
RNA_def_property_ui_text(prop, "Start Frame", "Sets the global starting frame of the movie.");
@@ -242,7 +242,7 @@ static void rna_def_image(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Mapping", "Mapping type to use for this image in the game engine.");
RNA_def_property_update(prop, NC_IMAGE|ND_DISPLAY, NULL);
- prop= RNA_def_property(srna, "display_aspect", PROP_FLOAT, PROP_VECTOR);
+ prop= RNA_def_property(srna, "display_aspect", PROP_FLOAT, PROP_XYZ);
RNA_def_property_float_sdna(prop, NULL, "aspx");
RNA_def_property_array(prop, 2);
RNA_def_property_range(prop, 0.1f, 5000.0f);
diff --git a/source/blender/makesrna/intern/rna_internal.h b/source/blender/makesrna/intern/rna_internal.h
index 8eb4fc9cde2..cff77fbb34b 100644
--- a/source/blender/makesrna/intern/rna_internal.h
+++ b/source/blender/makesrna/intern/rna_internal.h
@@ -181,6 +181,9 @@ struct StructRNA *rna_ID_refine(struct PointerRNA *ptr);
struct IDProperty *rna_ID_idproperties(struct PointerRNA *ptr, int create);
void rna_ID_fake_user_set(struct PointerRNA *ptr, int value);
struct IDProperty *rna_IDPropertyGroup_idproperties(struct PointerRNA *ptr, int create);
+void rna_IDPropertyGroup_unregister(const struct bContext *C, struct StructRNA *type);
+struct StructRNA *rna_IDPropertyGroup_register(const struct bContext *C, struct ReportList *reports, void *data, const char *identifier, StructValidateFunc validate, StructCallbackFunc call, StructFreeFunc free);
+struct StructRNA* rna_IDPropertyGroup_refine(struct PointerRNA *ptr);
void rna_object_vgroup_name_index_get(struct PointerRNA *ptr, char *value, int index);
int rna_object_vgroup_name_index_length(struct PointerRNA *ptr, int index);
@@ -261,6 +264,7 @@ void rna_iterator_array_end(struct CollectionPropertyIterator *iter);
void rna_addtail(struct ListBase *listbase, void *vlink);
void rna_freelinkN(struct ListBase *listbase, void *vlink);
void rna_freelistN(struct ListBase *listbase);
+PropertyDefRNA *rna_findlink(ListBase *listbase, const char *identifier);
StructDefRNA *rna_find_struct_def(StructRNA *srna);
FunctionDefRNA *rna_find_function_def(FunctionRNA *func);
diff --git a/source/blender/makesrna/intern/rna_key.c b/source/blender/makesrna/intern/rna_key.c
index 216a1d05079..88047cda12b 100644
--- a/source/blender/makesrna/intern/rna_key.c
+++ b/source/blender/makesrna/intern/rna_key.c
@@ -282,7 +282,7 @@ static void rna_def_keydata(BlenderRNA *brna)
srna= RNA_def_struct(brna, "ShapeKeyPoint", NULL);
RNA_def_struct_ui_text(srna, "Shape Key Point", "Point in a shape key.");
- prop= RNA_def_property(srna, "co", PROP_FLOAT, PROP_VECTOR);
+ prop= RNA_def_property(srna, "co", PROP_FLOAT, PROP_TRANSLATION);
RNA_def_property_array(prop, 3);
RNA_def_property_float_funcs(prop, "rna_ShapeKeyPoint_co_get", "rna_ShapeKeyPoint_co_set", NULL);
RNA_def_property_ui_text(prop, "Location", "");
@@ -291,7 +291,7 @@ static void rna_def_keydata(BlenderRNA *brna)
srna= RNA_def_struct(brna, "ShapeKeyCurvePoint", NULL);
RNA_def_struct_ui_text(srna, "Shape Key Curve Point", "Point in a shape key for curves.");
- prop= RNA_def_property(srna, "co", PROP_FLOAT, PROP_VECTOR);
+ prop= RNA_def_property(srna, "co", PROP_FLOAT, PROP_TRANSLATION);
RNA_def_property_array(prop, 3);
RNA_def_property_float_funcs(prop, "rna_ShapeKeyPoint_co_get", "rna_ShapeKeyPoint_co_set", NULL);
RNA_def_property_ui_text(prop, "Location", "");
@@ -305,19 +305,19 @@ static void rna_def_keydata(BlenderRNA *brna)
srna= RNA_def_struct(brna, "ShapeKeyBezierPoint", NULL);
RNA_def_struct_ui_text(srna, "Shape Key Bezier Point", "Point in a shape key for bezier curves.");
- prop= RNA_def_property(srna, "co", PROP_FLOAT, PROP_VECTOR);
+ prop= RNA_def_property(srna, "co", PROP_FLOAT, PROP_TRANSLATION);
RNA_def_property_array(prop, 3);
RNA_def_property_float_funcs(prop, "rna_ShapeKeyBezierPoint_co_get", "rna_ShapeKeyBezierPoint_co_set", NULL);
RNA_def_property_ui_text(prop, "Location", "");
RNA_def_property_update(prop, 0, "rna_Key_update_data");
- prop= RNA_def_property(srna, "handle_1_co", PROP_FLOAT, PROP_VECTOR);
+ prop= RNA_def_property(srna, "handle_1_co", PROP_FLOAT, PROP_TRANSLATION);
RNA_def_property_array(prop, 3);
RNA_def_property_float_funcs(prop, "rna_ShapeKeyBezierPoint_handle_1_co_get", "rna_ShapeKeyBezierPoint_handle_1_co_set", NULL);
RNA_def_property_ui_text(prop, "Handle 1 Location", "");
RNA_def_property_update(prop, 0, "rna_Key_update_data");
- prop= RNA_def_property(srna, "handle_2_co", PROP_FLOAT, PROP_VECTOR);
+ prop= RNA_def_property(srna, "handle_2_co", PROP_FLOAT, PROP_TRANSLATION);
RNA_def_property_array(prop, 3);
RNA_def_property_float_funcs(prop, "rna_ShapeKeyBezierPoint_handle_2_co_get", "rna_ShapeKeyBezierPoint_handle_2_co_set", NULL);
RNA_def_property_ui_text(prop, "Handle 2 Location", "");
@@ -351,7 +351,7 @@ static void rna_def_keyblock(BlenderRNA *brna)
RNA_def_struct_name_property(srna, prop);
/* keys need to be sorted to edit this */
- prop= RNA_def_property(srna, "frame", PROP_FLOAT, PROP_NONE);
+ prop= RNA_def_property(srna, "frame", PROP_FLOAT, PROP_TIME);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_float_sdna(prop, NULL, "pos");
RNA_def_property_ui_text(prop, "Frame", "Frame for absolute keys.");
diff --git a/source/blender/makesrna/intern/rna_lamp.c b/source/blender/makesrna/intern/rna_lamp.c
index 299bd37496b..57aa1ba2736 100644
--- a/source/blender/makesrna/intern/rna_lamp.c
+++ b/source/blender/makesrna/intern/rna_lamp.c
@@ -151,13 +151,13 @@ static void rna_def_lamp_mtex(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Shadow", "Lets the texture affect the shadow color of the lamp.");
RNA_def_property_update(prop, NC_TEXTURE, NULL);
- prop= RNA_def_property(srna, "color_factor", PROP_FLOAT, PROP_VECTOR);
+ prop= RNA_def_property(srna, "color_factor", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "colfac");
RNA_def_property_ui_range(prop, 0, 1, 10, 3);
RNA_def_property_ui_text(prop, "Color Factor", "Amount texture affects color values.");
RNA_def_property_update(prop, NC_TEXTURE, NULL);
- prop= RNA_def_property(srna, "shadow_factor", PROP_FLOAT, PROP_VECTOR);
+ prop= RNA_def_property(srna, "shadow_factor", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "colfac");
RNA_def_property_ui_range(prop, 0, 1, 10, 3);
RNA_def_property_ui_text(prop, "Shadow Factor", "Amount texture affects shadow.");
@@ -314,7 +314,7 @@ static void rna_def_lamp(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Type", "Type of Lamp.");
RNA_def_property_update(prop, NC_LAMP|ND_LIGHTING_DRAW, NULL);
- prop= RNA_def_property(srna, "distance", PROP_FLOAT, PROP_NONE);
+ prop= RNA_def_property(srna, "distance", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "dist");
RNA_def_property_ui_range(prop, 0, 1000, 1.0, 2);
RNA_def_property_ui_text(prop, "Distance", "Falloff distance - the light is at half the original intensity at this point.");
@@ -465,7 +465,7 @@ static void rna_def_lamp_shadow(StructRNA *srna, int spot, int area)
RNA_def_property_ui_text(prop, "Shadow Adaptive Threshold", "Threshold for Adaptive Sampling (Raytraced shadows).");
RNA_def_property_update(prop, NC_LAMP|ND_LIGHTING, NULL);
- prop= RNA_def_property(srna, "shadow_soft_size", PROP_FLOAT, PROP_NONE);
+ prop= RNA_def_property(srna, "shadow_soft_size", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "soft");
RNA_def_property_ui_range(prop, 0, 100, 0.1, 3);
RNA_def_property_ui_text(prop, "Shadow Soft Size", "Light size for ray shadow sampling (Raytraced shadows).");
@@ -526,13 +526,13 @@ static void rna_def_area_lamp(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Shape", "Shape of the area lamp.");
RNA_def_property_update(prop, NC_LAMP|ND_LIGHTING_DRAW, NULL);
- prop= RNA_def_property(srna, "size", PROP_FLOAT, PROP_NONE);
+ prop= RNA_def_property(srna, "size", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "area_size");
RNA_def_property_ui_range(prop, 0, 100, 0.1, 3);
RNA_def_property_ui_text(prop, "Size", "Size of the area of the area Lamp, X direction size for Rectangle shapes.");
RNA_def_property_update(prop, NC_LAMP|ND_LIGHTING_DRAW, NULL);
- prop= RNA_def_property(srna, "size_y", PROP_FLOAT, PROP_NONE);
+ prop= RNA_def_property(srna, "size_y", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "area_sizey");
RNA_def_property_ui_range(prop, 0, 100, 0.1, 3);
RNA_def_property_ui_text(prop, "Size Y", "Size of the area of the area Lamp in the Y direction for Rectangle shapes.");
@@ -628,13 +628,13 @@ static void rna_def_spot_lamp(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Spot Size", "Angle of the spotlight beam in degrees.");
RNA_def_property_update(prop, NC_LAMP|ND_LIGHTING_DRAW, NULL);
- prop= RNA_def_property(srna, "shadow_buffer_clip_start", PROP_FLOAT, PROP_NONE);
+ prop= RNA_def_property(srna, "shadow_buffer_clip_start", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "clipsta");
RNA_def_property_range(prop, 0.0f, 9999.0f);
RNA_def_property_ui_text(prop, "Shadow Buffer Clip Start", "Shadow map clip start: objects closer will not generate shadows");
RNA_def_property_update(prop, NC_LAMP|ND_LIGHTING_DRAW, NULL);
- prop= RNA_def_property(srna, "shadow_buffer_clip_end", PROP_FLOAT, PROP_NONE);
+ prop= RNA_def_property(srna, "shadow_buffer_clip_end", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "clipend");
RNA_def_property_range(prop, 0.0f, 9999.0f);
RNA_def_property_ui_text(prop, "Shadow Buffer Clip End", "Shadow map clip end beyond which objects will not generate shadows.");
diff --git a/source/blender/makesrna/intern/rna_lattice.c b/source/blender/makesrna/intern/rna_lattice.c
index 03a1dc9ec8f..b53a0589ba6 100644
--- a/source/blender/makesrna/intern/rna_lattice.c
+++ b/source/blender/makesrna/intern/rna_lattice.c
@@ -178,13 +178,13 @@ static void rna_def_latticepoint(BlenderRNA *brna)
RNA_def_struct_sdna(srna, "BPoint");
RNA_def_struct_ui_text(srna, "LatticePoint", "Point in the lattice grid.");
- prop= RNA_def_property(srna, "co", PROP_FLOAT, PROP_VECTOR);
+ prop= RNA_def_property(srna, "co", PROP_FLOAT, PROP_TRANSLATION);
RNA_def_property_array(prop, 3);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_float_funcs(prop, "rna_LatticePoint_co_get", NULL, NULL);
RNA_def_property_ui_text(prop, "Location", "");
- prop= RNA_def_property(srna, "deformed_co", PROP_FLOAT, PROP_VECTOR);
+ prop= RNA_def_property(srna, "deformed_co", PROP_FLOAT, PROP_TRANSLATION);
RNA_def_property_float_sdna(prop, NULL, "vec");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Deformed Location", "");
diff --git a/source/blender/makesrna/intern/rna_main.c b/source/blender/makesrna/intern/rna_main.c
index 26fc3c2941e..4a24027f7e9 100644
--- a/source/blender/makesrna/intern/rna_main.c
+++ b/source/blender/makesrna/intern/rna_main.c
@@ -220,34 +220,34 @@ void RNA_def_main(BlenderRNA *brna)
StructRNA *srna;
PropertyRNA *prop;
- const char *lists[][5]= {
- {"cameras", "Camera", "rna_Main_camera_begin", "Cameras", "Camera datablocks."},
- {"scenes", "Scene", "rna_Main_scene_begin", "Scenes", "Scene datablocks."},
- {"objects", "Object", "rna_Main_object_begin", "Objects", "Object datablocks."},
- {"materials", "Material", "rna_Main_mat_begin", "Materials", "Material datablocks."},
- {"nodetrees", "NodeTree", "rna_Main_nodetree_begin", "Node Trees", "Nodetree datablocks."},
- {"meshes", "Mesh", "rna_Main_mesh_begin", "Meshes", "Mesh datablocks."},
- {"lamps", "Lamp", "rna_Main_lamp_begin", "Lamps", "Lamp datablocks."},
- {"libraries", "Library", "rna_Main_library_begin", "Libraries", "Library datablocks."},
- {"screens", "Screen", "rna_Main_screen_begin", "Screens", "Screen datablocks."},
- {"windowmanagers", "WindowManager", "rna_Main_wm_begin", "Window Managers", "Window manager datablocks."},
- {"images", "Image", "rna_Main_image_begin", "Images", "Image datablocks."},
- {"lattices", "Lattice", "rna_Main_latt_begin", "Lattices", "Lattice datablocks."},
- {"curves", "Curve", "rna_Main_curve_begin", "Curves", "Curve datablocks."},
- {"metaballs", "MetaBall", "rna_Main_mball_begin", "Metaballs", "Metaball datablocks."},
- {"vfonts", "VectorFont", "rna_Main_vfont_begin", "Vector Fonts", "Vector font datablocks."},
- {"textures", "Texture", "rna_Main_tex_begin", "Textures", "Texture datablocks."},
- {"brushes", "Brush", "rna_Main_brush_begin", "Brushes", "Brush datablocks."},
- {"worlds", "World", "rna_Main_world_begin", "Worlds", "World datablocks."},
- {"groups", "Group", "rna_Main_group_begin", "Groups", "Group datablocks."},
- {"keys", "ID", "rna_Main_key_begin", "Keys", "Key datablocks."},
- {"scripts", "ID", "rna_Main_script_begin", "Scripts", "Script datablocks."},
- {"texts", "Text", "rna_Main_text_begin", "Texts", "Text datablocks."},
- {"sounds", "ID", "rna_Main_sound_begin", "Sounds", "Sound datablocks."},
- {"armatures", "Armature", "rna_Main_armature_begin", "Armatures", "Armature datablocks."},
- {"actions", "Action", "rna_Main_action_begin", "Actions", "Action datablocks."},
- {"particles", "ParticleSettings", "rna_Main_particle_begin", "Particles", "Particle datablocks."},
- {NULL, NULL, NULL, NULL, NULL}};
+ const char *lists[][7]= {
+ {"cameras", "Camera", "rna_Main_camera_begin", "Cameras", "Camera datablocks.", NULL, NULL},
+ {"scenes", "Scene", "rna_Main_scene_begin", "Scenes", "Scene datablocks.", NULL, NULL},
+ {"objects", "Object", "rna_Main_object_begin", "Objects", "Object datablocks.", NULL, NULL},
+ {"materials", "Material", "rna_Main_mat_begin", "Materials", "Material datablocks.", NULL, NULL},
+ {"nodegroups", "NodeTree", "rna_Main_nodetree_begin", "Node Groups", "Node group datablocks.", NULL, NULL},
+ {"meshes", "Mesh", "rna_Main_mesh_begin", "Meshes", "Mesh datablocks.", "add_mesh", "remove_mesh"},
+ {"lamps", "Lamp", "rna_Main_lamp_begin", "Lamps", "Lamp datablocks.", NULL, NULL},
+ {"libraries", "Library", "rna_Main_library_begin", "Libraries", "Library datablocks.", NULL, NULL},
+ {"screens", "Screen", "rna_Main_screen_begin", "Screens", "Screen datablocks.", NULL, NULL},
+ {"windowmanagers", "WindowManager", "rna_Main_wm_begin", "Window Managers", "Window manager datablocks.", NULL, NULL},
+ {"images", "Image", "rna_Main_image_begin", "Images", "Image datablocks.", NULL, NULL},
+ {"lattices", "Lattice", "rna_Main_latt_begin", "Lattices", "Lattice datablocks.", NULL, NULL},
+ {"curves", "Curve", "rna_Main_curve_begin", "Curves", "Curve datablocks.", NULL, NULL} ,
+ {"metaballs", "MetaBall", "rna_Main_mball_begin", "Metaballs", "Metaball datablocks.", NULL, NULL},
+ {"vfonts", "VectorFont", "rna_Main_vfont_begin", "Vector Fonts", "Vector font datablocks.", NULL, NULL},
+ {"textures", "Texture", "rna_Main_tex_begin", "Textures", "Texture datablocks.", NULL, NULL},
+ {"brushes", "Brush", "rna_Main_brush_begin", "Brushes", "Brush datablocks.", NULL, NULL},
+ {"worlds", "World", "rna_Main_world_begin", "Worlds", "World datablocks.", NULL, NULL},
+ {"groups", "Group", "rna_Main_group_begin", "Groups", "Group datablocks.", NULL, NULL},
+ {"keys", "ID", "rna_Main_key_begin", "Keys", "Key datablocks.", NULL, NULL},
+ {"scripts", "ID", "rna_Main_script_begin", "Scripts", "Script datablocks.", NULL, NULL},
+ {"texts", "Text", "rna_Main_text_begin", "Texts", "Text datablocks.", NULL, NULL},
+ {"sounds", "ID", "rna_Main_sound_begin", "Sounds", "Sound datablocks.", NULL, NULL},
+ {"armatures", "Armature", "rna_Main_armature_begin", "Armatures", "Armature datablocks.", NULL, NULL},
+ {"actions", "Action", "rna_Main_action_begin", "Actions", "Action datablocks.", NULL, NULL},
+ {"particles", "ParticleSettings", "rna_Main_particle_begin", "Particles", "Particle datablocks.", NULL, NULL},
+ {NULL, NULL, NULL, NULL, NULL, NULL, NULL}};
int i;
srna= RNA_def_struct(brna, "Main", NULL);
@@ -264,7 +264,7 @@ void RNA_def_main(BlenderRNA *brna)
{
prop= RNA_def_property(srna, lists[i][0], PROP_COLLECTION, PROP_NONE);
RNA_def_property_struct_type(prop, lists[i][1]);
- RNA_def_property_collection_funcs(prop, lists[i][2], "rna_iterator_listbase_next", "rna_iterator_listbase_end", "rna_iterator_listbase_get", 0, 0, 0, 0, 0);
+ RNA_def_property_collection_funcs(prop, lists[i][2], "rna_iterator_listbase_next", "rna_iterator_listbase_end", "rna_iterator_listbase_get", 0, 0, 0, lists[i][5], lists[i][6]);
RNA_def_property_ui_text(prop, lists[i][3], lists[i][4]);
}
diff --git a/source/blender/makesrna/intern/rna_material.c b/source/blender/makesrna/intern/rna_material.c
index fb79ec88c4c..93d6b0283bd 100644
--- a/source/blender/makesrna/intern/rna_material.c
+++ b/source/blender/makesrna/intern/rna_material.c
@@ -41,6 +41,8 @@
#include "BKE_texture.h"
+#include "ED_node.h"
+
static PointerRNA rna_Material_mirror_get(PointerRNA *ptr)
{
return rna_pointer_inherit_refine(ptr, &RNA_MaterialRaytraceMirror, ptr->id.data);
@@ -66,6 +68,11 @@ static PointerRNA rna_Material_strand_get(PointerRNA *ptr)
return rna_pointer_inherit_refine(ptr, &RNA_MaterialStrand, ptr->id.data);
}
+static PointerRNA rna_Material_physics_get(PointerRNA *ptr)
+{
+ return rna_pointer_inherit_refine(ptr, &RNA_MaterialPhysics, ptr->id.data);
+}
+
static void rna_Material_type_set(PointerRNA *ptr, int value)
{
Material *ma= (Material*)ptr->data;
@@ -191,6 +198,15 @@ static void rna_Material_use_specular_ramp_set(PointerRNA *ptr, int value)
ma->ramp_spec= add_colorband(0);
}
+void rna_Material_use_nodes_set(PointerRNA *ptr, int value)
+{
+ Material *ma= (Material*)ptr->data;
+
+ ma->use_nodes= value;
+ if(ma->use_nodes && ma->nodetree==NULL)
+ ED_node_shader_default(ma);
+}
+
#else
static void rna_def_material_mtex(BlenderRNA *brna)
@@ -403,7 +419,7 @@ static void rna_def_material_mtex(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Specular Color Factor", "Amount texture affects specular color.");
RNA_def_property_update(prop, NC_TEXTURE, NULL);
- prop= RNA_def_property(srna, "colordiff_factor", PROP_FLOAT, PROP_VECTOR);
+ prop= RNA_def_property(srna, "colordiff_factor", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "colfac");
RNA_def_property_ui_range(prop, 0, 1, 10, 3);
RNA_def_property_ui_text(prop, "Diffuse Color Factor", "Amount texture affects diffuse color.");
@@ -522,10 +538,16 @@ static void rna_def_material_colors(StructRNA *srna)
RNA_def_property_ui_text(prop, "Mirror Color", "Mirror color of the material.");
RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
- prop= RNA_def_property(srna, "alpha", PROP_FLOAT, PROP_NONE);
+ prop= RNA_def_property(srna, "alpha", PROP_FLOAT, PROP_PERCENTAGE);
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Alpha", "Alpha transparency of the material.");
RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING_DRAW, NULL);
+
+ prop= RNA_def_property(srna, "specular_alpha", PROP_FLOAT, PROP_PERCENTAGE);
+ RNA_def_property_float_sdna(prop, NULL, "spectra");
+ RNA_def_property_range(prop, 0.0f, 1.0f);
+ RNA_def_property_ui_text(prop, "Specular Alpha", "Alpha transparency for specular areas.");
+ RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
/* Color bands */
prop= RNA_def_property(srna, "use_diffuse_ramp", PROP_BOOLEAN, PROP_NONE);
@@ -594,7 +616,7 @@ static void rna_def_material_diffuse(StructRNA *srna)
RNA_def_property_ui_text(prop, "Diffuse Shader Model", "");
RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
- prop= RNA_def_property(srna, "diffuse_reflection", PROP_FLOAT, PROP_NONE);
+ prop= RNA_def_property(srna, "diffuse_reflection", PROP_FLOAT, PROP_PERCENTAGE);
RNA_def_property_float_sdna(prop, NULL, "ref");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Diffuse Reflection", "Amount of diffuse reflection.");
@@ -611,7 +633,7 @@ static void rna_def_material_diffuse(StructRNA *srna)
RNA_def_property_ui_text(prop, "Diffuse Toon Size", "Size of diffuse toon area.");
RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
- prop= RNA_def_property(srna, "diffuse_toon_smooth", PROP_FLOAT, PROP_NONE);
+ prop= RNA_def_property(srna, "diffuse_toon_smooth", PROP_FLOAT, PROP_PERCENTAGE);
RNA_def_property_float_sdna(prop, NULL, "param[1]");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Diffuse Toon Smooth", "Smoothness of diffuse toon area.");
@@ -655,7 +677,7 @@ static void rna_def_material_raymirror(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Enabled", "Enable raytraced reflections.");
RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
- prop= RNA_def_property(srna, "reflect", PROP_FLOAT, PROP_NONE);
+ prop= RNA_def_property(srna, "reflect", PROP_FLOAT, PROP_PERCENTAGE);
RNA_def_property_float_sdna(prop, NULL, "ray_mirror");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Reflect", "Sets the amount mirror reflection for raytrace.");
@@ -667,19 +689,19 @@ static void rna_def_material_raymirror(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Fresnel", "Power of Fresnel for mirror reflection.");
RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
- prop= RNA_def_property(srna, "fresnel_fac", PROP_FLOAT, PROP_NONE);
+ prop= RNA_def_property(srna, "fresnel_factor", PROP_FLOAT, PROP_PERCENTAGE);
RNA_def_property_float_sdna(prop, NULL, "fresnel_mir_i");
RNA_def_property_range(prop, 0.0f, 5.0f);
RNA_def_property_ui_text(prop, "Fresnel Factor", "Blending factor for Fresnel.");
RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
- prop= RNA_def_property(srna, "gloss", PROP_FLOAT, PROP_NONE);
+ prop= RNA_def_property(srna, "gloss", PROP_FLOAT, PROP_PERCENTAGE);
RNA_def_property_float_sdna(prop, NULL, "gloss_mir");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Gloss", "The shininess of the reflection. Values < 1.0 give diffuse, blurry reflections.");
RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
- prop= RNA_def_property(srna, "gloss_anisotropic", PROP_FLOAT, PROP_NONE);
+ prop= RNA_def_property(srna, "gloss_anisotropic", PROP_FLOAT, PROP_PERCENTAGE);
RNA_def_property_float_sdna(prop, NULL, "aniso_gloss_mir");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Gloss Anisotropy", "The shape of the reflection, from 0.0 (circular) to 1.0 (fully stretched along the tangent.");
@@ -691,7 +713,7 @@ static void rna_def_material_raymirror(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Gloss Samples", "Number of cone samples averaged for blurry reflections.");
RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
- prop= RNA_def_property(srna, "gloss_threshold", PROP_FLOAT, PROP_NONE);
+ prop= RNA_def_property(srna, "gloss_threshold", PROP_FLOAT, PROP_PERCENTAGE);
RNA_def_property_float_sdna(prop, NULL, "adapt_thresh_mir");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Gloss Threshold", "Threshold for adaptive sampling. If a sample contributes less than this amount (as a percentage), sampling is stopped.");
@@ -703,7 +725,7 @@ static void rna_def_material_raymirror(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Depth", "Maximum allowed number of light inter-reflections.");
RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
- prop= RNA_def_property(srna, "distance", PROP_FLOAT, PROP_NONE);
+ prop= RNA_def_property(srna, "distance", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "dist_mir");
RNA_def_property_range(prop, 0.0f, 10000.0f);
RNA_def_property_ui_text(prop, "Maximum Distance", "Maximum distance of reflected rays. Reflections further than this range fade to sky color or material color.");
@@ -726,11 +748,6 @@ static void rna_def_material_raytra(BlenderRNA *brna)
RNA_def_struct_nested(brna, srna, "Material");
RNA_def_struct_ui_text(srna, "Material Raytrace Transparency", "Raytraced refraction settings for a Material datablock.");
- prop= RNA_def_property(srna, "enabled", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_RAYTRANSP); /* use bitflags */
- RNA_def_property_ui_text(prop, "Enabled", "Enables raytracing for transparent refraction rendering.");
- RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
-
prop= RNA_def_property(srna, "ior", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "ang");
RNA_def_property_range(prop, 1.0f, 3.0f);
@@ -743,13 +760,13 @@ static void rna_def_material_raytra(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Fresnel", "Power of Fresnel for transparency (Ray or ZTransp).");
RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
- prop= RNA_def_property(srna, "fresnel_fac", PROP_FLOAT, PROP_NONE);
+ prop= RNA_def_property(srna, "fresnel_factor", PROP_FLOAT, PROP_PERCENTAGE);
RNA_def_property_float_sdna(prop, NULL, "fresnel_tra_i");
RNA_def_property_range(prop, 1.0f, 5.0f);
RNA_def_property_ui_text(prop, "Fresnel Factor", "Blending factor for Fresnel.");
RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
- prop= RNA_def_property(srna, "gloss", PROP_FLOAT, PROP_NONE);
+ prop= RNA_def_property(srna, "gloss", PROP_FLOAT, PROP_PERCENTAGE);
RNA_def_property_float_sdna(prop, NULL, "gloss_tra");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Gloss", "The clarity of the refraction. Values < 1.0 give diffuse, blurry refractions.");
@@ -761,7 +778,7 @@ static void rna_def_material_raytra(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Gloss Samples", "Number of cone samples averaged for blurry refractions.");
RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
- prop= RNA_def_property(srna, "gloss_threshold", PROP_FLOAT, PROP_NONE);
+ prop= RNA_def_property(srna, "gloss_threshold", PROP_FLOAT, PROP_PERCENTAGE);
RNA_def_property_float_sdna(prop, NULL, "adapt_thresh_tra");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Gloss Threshold", "Threshold for adaptive sampling. If a sample contributes less than this amount (as a percentage), sampling is stopped.");
@@ -773,13 +790,13 @@ static void rna_def_material_raytra(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Depth", "Maximum allowed number of light inter-refractions.");
RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
- prop= RNA_def_property(srna, "filter", PROP_FLOAT, PROP_NONE);
+ prop= RNA_def_property(srna, "filter", PROP_FLOAT, PROP_PERCENTAGE);
RNA_def_property_float_sdna(prop, NULL, "filter");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Filter", "Amount to blend in the material's diffuse color in raytraced transparency (simulating absorption).");
RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
- prop= RNA_def_property(srna, "limit", PROP_FLOAT, PROP_NONE);
+ prop= RNA_def_property(srna, "limit", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "tx_limit");
RNA_def_property_range(prop, 0.0f, 100.0f);
RNA_def_property_ui_text(prop, "Limit", "Maximum depth for light to travel through the transparent material before becoming fully filtered (0.0 is disabled).");
@@ -790,12 +807,6 @@ static void rna_def_material_raytra(BlenderRNA *brna)
RNA_def_property_range(prop, 0.1f, 10.0f);
RNA_def_property_ui_text(prop, "Falloff", "Falloff power for transmissivity filter effect (1.0 is linear).");
RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
-
- prop= RNA_def_property(srna, "specular_opacity", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "spectra");
- RNA_def_property_range(prop, 0.0f, 1.0f);
- RNA_def_property_ui_text(prop, "Specular Opacity", "Makes specular areas opaque on transparent materials.");
- RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
}
static void rna_def_material_halo(BlenderRNA *brna)
@@ -820,7 +831,7 @@ static void rna_def_material_halo(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Hardness", "Sets the hardness of the halo.");
RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
- prop= RNA_def_property(srna, "add", PROP_FLOAT, PROP_NONE);
+ prop= RNA_def_property(srna, "add", PROP_FLOAT, PROP_PERCENTAGE);
RNA_def_property_float_sdna(prop, NULL, "add");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Add", "Sets the strength of the add effect.");
@@ -936,7 +947,7 @@ static void rna_def_material_sss(BlenderRNA *brna)
RNA_def_struct_nested(brna, srna, "Material");
RNA_def_struct_ui_text(srna, "Material Subsurface Scattering", "Diffuse subsurface scattering settings for a Material datablock.");
- prop= RNA_def_property(srna, "radius", PROP_FLOAT, PROP_NONE);
+ prop= RNA_def_property(srna, "radius", PROP_FLOAT, PROP_RGB|PROP_UNIT_LENGTH);
RNA_def_property_float_sdna(prop, NULL, "sss_radius");
RNA_def_property_range(prop, 0.001, FLT_MAX);
RNA_def_property_ui_range(prop, 0.001, 10000, 1, 3);
@@ -966,13 +977,13 @@ static void rna_def_material_sss(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "IOR", "Index of refraction (higher values are denser).");
RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
- prop= RNA_def_property(srna, "color_factor", PROP_FLOAT, PROP_NONE);
+ prop= RNA_def_property(srna, "color_factor", PROP_FLOAT, PROP_PERCENTAGE);
RNA_def_property_float_sdna(prop, NULL, "sss_colfac");
RNA_def_property_ui_range(prop, 0, 1, 10, 3);
RNA_def_property_ui_text(prop, "Color Factor", "Blend factor for SSS colors.");
RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
- prop= RNA_def_property(srna, "texture_factor", PROP_FLOAT, PROP_NONE);
+ prop= RNA_def_property(srna, "texture_factor", PROP_FLOAT, PROP_PERCENTAGE);
RNA_def_property_float_sdna(prop, NULL, "sss_texfac");
RNA_def_property_ui_range(prop, 0, 1, 10, 3);
RNA_def_property_ui_text(prop, "Texture Factor", "Texture scatting blend factor.");
@@ -1014,7 +1025,7 @@ void rna_def_material_specularity(StructRNA *srna)
RNA_def_property_ui_text(prop, "Specular Shader Model", "");
RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
- prop= RNA_def_property(srna, "specular_reflection", PROP_FLOAT, PROP_NONE);
+ prop= RNA_def_property(srna, "specular_reflection", PROP_FLOAT, PROP_PERCENTAGE);
RNA_def_property_float_sdna(prop, NULL, "spec");
RNA_def_property_range(prop, 0, 1);
RNA_def_property_ui_text(prop, "Specularity Intensity", "");
@@ -1043,7 +1054,7 @@ void rna_def_material_specularity(StructRNA *srna)
RNA_def_property_ui_text(prop, "Specular Toon Size", "Size of specular toon area.");
RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
- prop= RNA_def_property(srna, "specular_toon_smooth", PROP_FLOAT, PROP_NONE);
+ prop= RNA_def_property(srna, "specular_toon_smooth", PROP_FLOAT, PROP_PERCENTAGE);
RNA_def_property_float_sdna(prop, NULL, "param[3]");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Specular Toon Smooth", "Ssmoothness of specular toon area.");
@@ -1076,10 +1087,10 @@ void rna_def_material_strand(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Surface Diffuse", "Make diffuse shading more similar to shading the surface.");
RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
- prop= RNA_def_property(srna, "blend_distance", PROP_FLOAT, PROP_NONE);
+ prop= RNA_def_property(srna, "blend_distance", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "strand_surfnor");
RNA_def_property_range(prop, 0, 10);
- RNA_def_property_ui_text(prop, "Blend Distance", "Distance in Blender units over which to blend in the surface normal.");
+ RNA_def_property_ui_text(prop, "Blend Distance", "Worldspace distance over which to blend in the surface normal.");
RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
prop= RNA_def_property(srna, "blender_units", PROP_BOOLEAN, PROP_NONE);
@@ -1123,6 +1134,46 @@ void rna_def_material_strand(BlenderRNA *brna)
RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
}
+void rna_def_material_physics(BlenderRNA *brna)
+{
+ StructRNA *srna;
+ PropertyRNA *prop;
+
+ srna= RNA_def_struct(brna, "MaterialPhysics", NULL);
+ RNA_def_struct_sdna(srna, "Material");
+ RNA_def_struct_nested(brna, srna, "Material");
+ RNA_def_struct_ui_text(srna, "Material Physics", "Physics settings for a Material datablock.");
+
+ prop= RNA_def_property(srna, "align_to_normal", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_FH_NOR);
+ RNA_def_property_ui_text(prop, "Align to Normal", "Align dynamic game objects along the surface normal, when inside the physics distance area");
+
+ prop= RNA_def_property(srna, "friction", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "friction");
+ RNA_def_property_range(prop, 0, 100);
+ RNA_def_property_ui_text(prop, "Friction", "Coulomb friction coeffecient, when inside the physics distance area");
+
+ prop= RNA_def_property(srna, "force", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "fh");
+ RNA_def_property_range(prop, 0, 1);
+ RNA_def_property_ui_text(prop, "Force", "Upward spring force, when inside the physics distance area");
+
+ prop= RNA_def_property(srna, "elasticity", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "reflect");
+ RNA_def_property_range(prop, 0, 1);
+ RNA_def_property_ui_text(prop, "Elasticity", "Elasticity of collisions");
+
+ prop= RNA_def_property(srna, "distance", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "fhdist");
+ RNA_def_property_range(prop, 0, 20);
+ RNA_def_property_ui_text(prop, "Distance", "Distance of the physics area");
+
+ prop= RNA_def_property(srna, "damp", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "xyfrict");
+ RNA_def_property_range(prop, 0, 1);
+ RNA_def_property_ui_text(prop, "Damping", "Damping of the spring force, when inside the physics distance area");
+}
+
void RNA_def_material(BlenderRNA *brna)
{
StructRNA *srna;
@@ -1134,6 +1185,10 @@ void RNA_def_material(BlenderRNA *brna)
// {MA_TYPE_VOLUME, "VOLUME", 0, "Volume", "Render object as a volume."},
{MA_TYPE_HALO, "HALO", 0, "Halo", "Render object as halo particles."},
{0, NULL, 0, NULL, NULL}};
+ static EnumPropertyItem transparency_items[] = {
+ {MA_ZTRANSP, "Z_TRANSPARENCY", 0, "Z Transparency", "Use alpha buffer for transparent faces."},
+ {MA_RAYTRANSP, "RAYTRACE", 0, "Raytrace", "Use raytracing for transparent refraction rendering."},
+ {0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "Material", "ID");
RNA_def_struct_ui_text(srna, "Material", "Material datablock to defined the appearance of geometric objects for rendering.");
@@ -1145,19 +1200,31 @@ void RNA_def_material(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Type", "Material type defining how the object is rendered.");
RNA_def_property_enum_funcs(prop, NULL, "rna_Material_type_set", NULL);
RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING_DRAW, NULL);
+
+ prop= RNA_def_property(srna, "transparency", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_TRANSP);
+ RNA_def_property_ui_text(prop, "Transparency", "Render material as transparent.");
+ RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
+
+ prop= RNA_def_property(srna, "transparency_method", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_bitflag_sdna(prop, NULL, "mode");
+ RNA_def_property_enum_items(prop, transparency_items);
+ RNA_def_property_ui_text(prop, "Transparency Method", "Method to use for rendering transparency.");
+ RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
- prop= RNA_def_property(srna, "ambient", PROP_FLOAT, PROP_NONE);
+ prop= RNA_def_property(srna, "ambient", PROP_FLOAT, PROP_PERCENTAGE);
RNA_def_property_float_sdna(prop, NULL, "amb");
RNA_def_property_range(prop, 0, 1);
RNA_def_property_ui_text(prop, "Ambient", "Amount of global ambient color the material receives.");
RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
prop= RNA_def_property(srna, "emit", PROP_FLOAT, PROP_NONE);
- RNA_def_property_range(prop, 0, 2);
+ RNA_def_property_range(prop, 0, FLT_MAX);
+ RNA_def_property_ui_range(prop, 0, 2.0f, 10, 2);
RNA_def_property_ui_text(prop, "Emit", "Amount of light to emit.");
RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
- prop= RNA_def_property(srna, "translucency", PROP_FLOAT, PROP_NONE);
+ prop= RNA_def_property(srna, "translucency", PROP_FLOAT, PROP_PERCENTAGE);
RNA_def_property_range(prop, 0, 1);
RNA_def_property_ui_text(prop, "Translucency", "Amount of diffuse shading on the back side.");
RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
@@ -1182,7 +1249,7 @@ void RNA_def_material(BlenderRNA *brna)
RNA_def_property_range(prop, 0, 10);
RNA_def_property_ui_text(prop, "Shadow Buffer Bias", "Factor to multiply shadow buffer bias with (0 is ignore.)");
- prop= RNA_def_property(srna, "shadow_casting_alpha", PROP_FLOAT, PROP_NONE);
+ prop= RNA_def_property(srna, "shadow_casting_alpha", PROP_FLOAT, PROP_PERCENTAGE);
RNA_def_property_float_sdna(prop, NULL, "shad_alpha");
RNA_def_property_range(prop, 0.001, 1);
RNA_def_property_ui_text(prop, "Shadow Casting Alpha", "Shadow casting alpha, only in use for Irregular Shadowbuffer.");
@@ -1217,11 +1284,6 @@ void RNA_def_material(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Shadeless", "Makes this material insensitive to light or shadow.");
RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
- prop= RNA_def_property(srna, "z_transparency", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_ZTRA);
- RNA_def_property_ui_text(prop, "Z Transparency", "Enable alpha buffer for transparent faces.");
- RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
-
prop= RNA_def_property(srna, "vertex_color_light", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_VERTEXCOL);
RNA_def_property_ui_text(prop, "Vertex Color Light", "Add vertex colors as additional lighting.");
@@ -1267,11 +1329,6 @@ void RNA_def_material(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Exclude Mist", "Excludes this material from mist effects (in world settings)");
RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
- prop= RNA_def_property(srna, "radiosity", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_RADIO);
- RNA_def_property_ui_text(prop, "Radiosity", "Include this material in radiosity calculations");
- RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING, NULL);
-
prop= RNA_def_property(srna, "transparent_shadows", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", MA_SHADOW_TRA);
RNA_def_property_ui_text(prop, "Transparent Shadows", "Allow this object to receive transparent shadows casted through other objects");
@@ -1322,12 +1379,23 @@ void RNA_def_material(BlenderRNA *brna)
RNA_def_property_struct_type(prop, "MaterialStrand");
RNA_def_property_pointer_funcs(prop, "rna_Material_strand_get", NULL, NULL);
RNA_def_property_ui_text(prop, "Strand", "Strand settings for the material.");
+
+ prop= RNA_def_property(srna, "physics", PROP_POINTER, PROP_NEVER_NULL);
+ RNA_def_property_struct_type(prop, "MaterialPhysics");
+ RNA_def_property_pointer_funcs(prop, "rna_Material_physics_get", NULL, NULL);
+ RNA_def_property_ui_text(prop, "Physics", "Game physics settings.");
/* nodetree */
prop= RNA_def_property(srna, "node_tree", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "nodetree");
RNA_def_property_ui_text(prop, "Node Tree", "Node tree for node based materials.");
+ prop= RNA_def_property(srna, "use_nodes", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "use_nodes", 1);
+ RNA_def_property_boolean_funcs(prop, NULL, "rna_Material_use_nodes_set");
+ RNA_def_property_ui_text(prop, "Use Nodes", "Use shader nodes to render the material.");
+ RNA_def_property_update(prop, NC_MATERIAL, NULL);
+
/* common */
rna_def_animdata_common(srna);
rna_def_mtex_common(srna, "rna_Material_mtex_begin", "rna_Material_active_texture_get",
@@ -1344,6 +1412,7 @@ void RNA_def_material(BlenderRNA *brna)
rna_def_material_sss(brna);
rna_def_material_mtex(brna);
rna_def_material_strand(brna);
+ rna_def_material_physics(brna);
RNA_api_material(srna);
}
diff --git a/source/blender/makesrna/intern/rna_mesh.c b/source/blender/makesrna/intern/rna_mesh.c
index dc953f80804..6918e71cd54 100644
--- a/source/blender/makesrna/intern/rna_mesh.c
+++ b/source/blender/makesrna/intern/rna_mesh.c
@@ -805,10 +805,10 @@ static void rna_def_mvert(BlenderRNA *brna)
RNA_def_struct_path_func(srna, "rna_MeshVertex_path");
RNA_def_struct_ui_icon(srna, ICON_VERTEXSEL);
- prop= RNA_def_property(srna, "co", PROP_FLOAT, PROP_VECTOR);
+ prop= RNA_def_property(srna, "co", PROP_FLOAT, PROP_TRANSLATION);
RNA_def_property_ui_text(prop, "Location", "");
- prop= RNA_def_property(srna, "normal", PROP_FLOAT, PROP_VECTOR);
+ prop= RNA_def_property(srna, "normal", PROP_FLOAT, PROP_DIRECTION);
RNA_def_property_float_sdna(prop, NULL, "no");
RNA_def_property_float_funcs(prop, "rna_MeshVertex_normal_get", NULL, NULL);
RNA_def_property_ui_text(prop, "Normal", "Vertex Normal");
@@ -918,7 +918,7 @@ static void rna_def_mface(BlenderRNA *brna)
RNA_def_property_boolean_sdna(prop, NULL, "flag", ME_SMOOTH);
RNA_def_property_ui_text(prop, "Smooth", "");
- prop= RNA_def_property(srna, "normal", PROP_FLOAT, PROP_VECTOR);
+ prop= RNA_def_property(srna, "normal", PROP_FLOAT, PROP_DIRECTION);
RNA_def_property_array(prop, 3);
RNA_def_property_range(prop, -1.0f, 1.0f);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
@@ -1035,22 +1035,22 @@ static void rna_def_mtface(BlenderRNA *brna)
RNA_def_property_array(prop, 4);
RNA_def_property_ui_text(prop, "UV Pinned", "");
- prop= RNA_def_property(srna, "uv1", PROP_FLOAT, PROP_VECTOR);
+ prop= RNA_def_property(srna, "uv1", PROP_FLOAT, PROP_XYZ);
RNA_def_property_array(prop, 2);
RNA_def_property_float_funcs(prop, "rna_MeshTextureFace_uv1_get", "rna_MeshTextureFace_uv1_set", NULL);
RNA_def_property_ui_text(prop, "UV 1", "");
- prop= RNA_def_property(srna, "uv2", PROP_FLOAT, PROP_VECTOR);
+ prop= RNA_def_property(srna, "uv2", PROP_FLOAT, PROP_XYZ);
RNA_def_property_array(prop, 2);
RNA_def_property_float_funcs(prop, "rna_MeshTextureFace_uv2_get", "rna_MeshTextureFace_uv2_set", NULL);
RNA_def_property_ui_text(prop, "UV 2", "");
- prop= RNA_def_property(srna, "uv3", PROP_FLOAT, PROP_VECTOR);
+ prop= RNA_def_property(srna, "uv3", PROP_FLOAT, PROP_XYZ);
RNA_def_property_array(prop, 2);
RNA_def_property_float_funcs(prop, "rna_MeshTextureFace_uv3_get", "rna_MeshTextureFace_uv3_set", NULL);
RNA_def_property_ui_text(prop, "UV 3", "");
- prop= RNA_def_property(srna, "uv4", PROP_FLOAT, PROP_VECTOR);
+ prop= RNA_def_property(srna, "uv4", PROP_FLOAT, PROP_XYZ);
RNA_def_property_array(prop, 2);
RNA_def_property_float_funcs(prop, "rna_MeshTextureFace_uv4_get", "rna_MeshTextureFace_uv4_set", NULL);
RNA_def_property_ui_text(prop, "UV 4", "");
@@ -1066,7 +1066,7 @@ static void rna_def_msticky(BlenderRNA *brna)
RNA_def_struct_ui_text(srna, "Mesh Vertex Sticky Texture Coordinate", "Stricky texture coordinate.");
RNA_def_struct_path_func(srna, "rna_MeshSticky_path");
- prop= RNA_def_property(srna, "co", PROP_FLOAT, PROP_VECTOR);
+ prop= RNA_def_property(srna, "co", PROP_FLOAT, PROP_XYZ);
RNA_def_property_ui_text(prop, "Location", "Sticky texture coordinate location.");
}
@@ -1216,18 +1216,18 @@ void rna_def_texmat_common(StructRNA *srna, const char *texspace_editable)
RNA_def_property_boolean_sdna(prop, NULL, "texflag", AUTOSPACE);
RNA_def_property_ui_text(prop, "Auto Texture Space", "Adjusts active object's texture space automatically when transforming object.");
- prop= RNA_def_property(srna, "texspace_loc", PROP_FLOAT, PROP_VECTOR);
+ prop= RNA_def_property(srna, "texspace_loc", PROP_FLOAT, PROP_TRANSLATION);
RNA_def_property_float_sdna(prop, NULL, "loc");
RNA_def_property_ui_text(prop, "Texure Space Location", "Texture space location.");
RNA_def_property_editable_func(prop, texspace_editable);
- prop= RNA_def_property(srna, "texspace_size", PROP_FLOAT, PROP_VECTOR);
+ prop= RNA_def_property(srna, "texspace_size", PROP_FLOAT, PROP_XYZ);
RNA_def_property_float_sdna(prop, NULL, "size");
RNA_def_property_ui_text(prop, "Texture Space Size", "Texture space size.");
RNA_def_property_editable_func(prop, texspace_editable);
/* not supported yet
- prop= RNA_def_property(srna, "texspace_rot", PROP_FLOAT, PROP_ROTATION);
+ prop= RNA_def_property(srna, "texspace_rot", PROP_FLOAT, PROP_EULER);
RNA_def_property_float(prop, NULL, "rot");
RNA_def_property_ui_text(prop, "Texture Space Rotation", "Texture space rotation");
RNA_def_property_editable_func(prop, texspace_editable);*/
@@ -1352,6 +1352,64 @@ static void rna_def_mesh(BlenderRNA *brna)
prop= RNA_def_property(srna, "shape_keys", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "key");
RNA_def_property_ui_text(prop, "Shape Keys", "");
+
+ /* Mesh Draw Options for Edit Mode*/
+
+ prop= RNA_def_property(srna, "draw_edges", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "drawflag", ME_DRAWEDGES);
+ RNA_def_property_ui_text(prop, "Draw Edges", "Displays selected edges using hilights in the 3d view and UV editor");
+ RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
+
+ prop= RNA_def_property(srna, "draw_faces", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "drawflag", ME_DRAWFACES);
+ RNA_def_property_ui_text(prop, "Draw Faces", "Displays all faces as shades in the 3d view and UV editor");
+ RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
+
+ prop= RNA_def_property(srna, "draw_normals", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "drawflag", ME_DRAWNORMALS);
+ RNA_def_property_ui_text(prop, "Draw Normals", "Displays face normals as lines");
+ RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
+
+ prop= RNA_def_property(srna, "draw_vertex_normals", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "drawflag", ME_DRAW_VNORMALS);
+ RNA_def_property_ui_text(prop, "Draw Vertex Normals", "Displays vertex normals as lines");
+ RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
+
+ prop= RNA_def_property(srna, "draw_creases", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "drawflag", ME_DRAWCREASES);
+ RNA_def_property_ui_text(prop, "Draw Creases", "Displays creases created for subsurf weighting");
+ RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
+
+ prop= RNA_def_property(srna, "draw_bevel_weights", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "drawflag", ME_DRAWBWEIGHTS);
+ RNA_def_property_ui_text(prop, "Draw Bevel Weights", "Displays weights created for the Bevel modifier");
+ RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
+
+ prop= RNA_def_property(srna, "draw_seams", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "drawflag", ME_DRAWSEAMS);
+ RNA_def_property_ui_text(prop, "Draw Seams", "Displays UV unwrapping seams");
+ RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
+
+ prop= RNA_def_property(srna, "draw_sharp", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "drawflag", ME_DRAWSHARP);
+ RNA_def_property_ui_text(prop, "Draw Sharp", "Displays sharp edges, used with the EdgeSplit modifier");
+ RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
+
+
+ prop= RNA_def_property(srna, "draw_edge_lenght", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "drawflag", ME_DRAW_EDGELEN);
+ RNA_def_property_ui_text(prop, "Edge Length", "Displays selected edge lengths");
+ RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
+
+ prop= RNA_def_property(srna, "draw_edge_angle", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "drawflag", ME_DRAW_EDGEANG);
+ RNA_def_property_ui_text(prop, "Edge Angles", "Displays the angles in the selected edges in degrees");
+ RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
+
+ prop= RNA_def_property(srna, "draw_face_area", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "drawflag", ME_DRAW_FACEAREA);
+ RNA_def_property_ui_text(prop, "Face Area", "Displays the area of selected faces");
+ RNA_def_property_update(prop, 0, "rna_Mesh_update_data");
rna_def_texmat_common(srna, "rna_Mesh_texspace_editable");
diff --git a/source/blender/makesrna/intern/rna_meta.c b/source/blender/makesrna/intern/rna_meta.c
index df26e6b8121..7b14a7a4712 100644
--- a/source/blender/makesrna/intern/rna_meta.c
+++ b/source/blender/makesrna/intern/rna_meta.c
@@ -37,7 +37,9 @@
#include "DNA_scene_types.h"
#include "DNA_object_types.h"
+#include "BKE_mball.h"
#include "BKE_depsgraph.h"
+#include "BKE_main.h"
#include "WM_types.h"
#include "WM_api.h"
@@ -50,11 +52,19 @@ static int rna_Meta_texspace_editable(PointerRNA *ptr)
static void rna_MetaBall_update_data(bContext *C, PointerRNA *ptr)
{
+ Main *bmain= CTX_data_main(C);
Scene *scene= CTX_data_scene(C);
- Object *obedit= CTX_data_edit_object(C);
-
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, obedit);
- DAG_object_flush_update(scene, obedit, OB_RECALC_DATA);
+ MetaBall *mb= ptr->id.data;
+ Object *ob;
+
+ for(ob=bmain->object.first; ob; ob= ob->id.next) {
+ if(ob->data == mb) {
+ copy_mball_properties(scene, ob);
+ /* XXX this will loop over all objects again (slow) */
+ DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, ob);
+ }
+ }
}
#else
@@ -83,35 +93,35 @@ void rna_def_metaelement(BlenderRNA *brna)
RNA_def_property_update(prop, 0, "rna_MetaBall_update_data");
/* number values */
- prop= RNA_def_property(srna, "location", PROP_FLOAT, PROP_VECTOR);
+ prop= RNA_def_property(srna, "location", PROP_FLOAT, PROP_TRANSLATION);
RNA_def_property_float_sdna(prop, NULL, "x");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Location", "");
RNA_def_property_update(prop, 0, "rna_MetaBall_update_data");
- prop= RNA_def_property(srna, "rotation", PROP_FLOAT, PROP_ROTATION);
+ prop= RNA_def_property(srna, "rotation", PROP_FLOAT, PROP_QUATERNION);
RNA_def_property_float_sdna(prop, NULL, "quat");
RNA_def_property_ui_text(prop, "Rotation", "");
RNA_def_property_update(prop, 0, "rna_MetaBall_update_data");
- prop= RNA_def_property(srna, "radius", PROP_FLOAT, PROP_UNSIGNED);
+ prop= RNA_def_property(srna, "radius", PROP_FLOAT, PROP_UNSIGNED|PROP_UNIT_LENGTH);
RNA_def_property_float_sdna(prop, NULL, "rad");
RNA_def_property_ui_text(prop, "Radius", "");
RNA_def_property_update(prop, 0, "rna_MetaBall_update_data");
- prop= RNA_def_property(srna, "sizex", PROP_FLOAT, PROP_NONE);
+ prop= RNA_def_property(srna, "size_x", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "expx");
RNA_def_property_range(prop, 0.0f, 20.0f);
RNA_def_property_ui_text(prop, "Size X", "Size of element, use of components depends on element type.");
RNA_def_property_update(prop, 0, "rna_MetaBall_update_data");
- prop= RNA_def_property(srna, "sizey", PROP_FLOAT, PROP_NONE);
+ prop= RNA_def_property(srna, "size_y", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "expy");
RNA_def_property_range(prop, 0.0f, 20.0f);
RNA_def_property_ui_text(prop, "Size Y", "Size of element, use of components depends on element type.");
RNA_def_property_update(prop, 0, "rna_MetaBall_update_data");
- prop= RNA_def_property(srna, "sizez", PROP_FLOAT, PROP_NONE);
+ prop= RNA_def_property(srna, "size_z", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "expz");
RNA_def_property_range(prop, 0.0f, 20.0f);
RNA_def_property_ui_text(prop, "Size Z", "Size of element, use of components depends on element type.");
@@ -155,7 +165,7 @@ void rna_def_metaball(BlenderRNA *brna)
RNA_def_property_struct_type(prop, "MetaElement");
RNA_def_property_ui_text(prop, "Elements", "Meta elements.");
- prop= RNA_def_property(srna, "last_selected_element", PROP_POINTER, PROP_NONE);
+ prop= RNA_def_property(srna, "active_element", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "lastelem");
RNA_def_property_ui_text(prop, "Last selected element.", "Last selected element.");
@@ -166,16 +176,17 @@ void rna_def_metaball(BlenderRNA *brna)
RNA_def_property_update(prop, 0, "rna_MetaBall_update_data");
/* number values */
- prop= RNA_def_property(srna, "wire_size", PROP_FLOAT, PROP_NONE);
+ prop= RNA_def_property(srna, "wire_size", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "wiresize");
RNA_def_property_range(prop, 0.050f, 1.0f);
RNA_def_property_ui_text(prop, "Wire Size", "Polygonization resolution in the 3D viewport.");
RNA_def_property_update(prop, 0, "rna_MetaBall_update_data");
- prop= RNA_def_property(srna, "render_size", PROP_FLOAT, PROP_NONE);
+ prop= RNA_def_property(srna, "render_size", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "rendersize");
RNA_def_property_range(prop, 0.050f, 1.0f);
RNA_def_property_ui_text(prop, "Render Size", "Polygonization resolution in rendering.");
+ RNA_def_property_update(prop, 0, "rna_MetaBall_update_data");
prop= RNA_def_property(srna, "threshold", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "thresh");
@@ -185,6 +196,9 @@ void rna_def_metaball(BlenderRNA *brna)
/* materials, textures */
rna_def_texmat_common(srna, "rna_Meta_texspace_editable");
+
+ /* anim */
+ rna_def_animdata_common(srna);
}
void RNA_def_meta(BlenderRNA *brna)
diff --git a/source/blender/makesrna/intern/rna_modifier.c b/source/blender/makesrna/intern/rna_modifier.c
index 80bc46bb2f0..837158b9ec8 100644
--- a/source/blender/makesrna/intern/rna_modifier.c
+++ b/source/blender/makesrna/intern/rna_modifier.c
@@ -62,15 +62,15 @@ EnumPropertyItem modifier_type_items[] ={
{eModifierType_Mask, "MASK", ICON_MOD_MASK, "Mask", ""},
{eModifierType_MeshDeform, "MESH_DEFORM", ICON_MOD_MESHDEFORM, "Mesh Deform", ""},
{eModifierType_Mirror, "MIRROR", ICON_MOD_MIRROR, "Mirror", ""},
- {eModifierType_Multires, "MULTIRES", ICON_MOD_MULTIRES, "Multires", ""},
+ {eModifierType_Multires, "MULTIRES", ICON_MOD_MULTIRES, "Multiresolution", ""},
{eModifierType_ParticleInstance, "PARTICLE_INSTANCE", ICON_MOD_PARTICLES, "Particle Instance", ""},
{eModifierType_ParticleSystem, "PARTICLE_SYSTEM", ICON_MOD_PARTICLES, "Particle System", ""},
{eModifierType_Shrinkwrap, "SHRINKWRAP", ICON_MOD_SHRINKWRAP, "Shrinkwrap", ""},
{eModifierType_SimpleDeform, "SIMPLE_DEFORM", ICON_MOD_SIMPLEDEFORM, "Simple Deform", ""},
{eModifierType_Smoke, "SMOKE", 0, "Smoke", ""},
{eModifierType_Smooth, "SMOOTH", ICON_MOD_SMOOTH, "Smooth", ""},
- {eModifierType_Softbody, "SOFTBODY", ICON_MOD_SOFT, "Soft Body", ""},
- {eModifierType_Subsurf, "SUBSURF", ICON_MOD_SUBSURF, "Subsurf", ""},
+ {eModifierType_Softbody, "SOFT_BODY", ICON_MOD_SOFT, "Soft Body", ""},
+ {eModifierType_Subsurf, "SUBSURF", ICON_MOD_SUBSURF, "Subdivision Surface", ""},
{eModifierType_Surface, "SURFACE", ICON_MOD_PHYSICS, "Surface", ""},
{eModifierType_UVProject, "UV_PROJECT", ICON_MOD_UVPROJECT, "UV Project", ""},
{eModifierType_Wave, "WAVE", ICON_MOD_WAVE, "Wave", ""},
@@ -538,12 +538,12 @@ static void rna_def_modifier_build(BlenderRNA *brna)
RNA_def_struct_sdna(srna, "BuildModifierData");
RNA_def_struct_ui_icon(srna, ICON_MOD_BUILD);
- prop= RNA_def_property(srna, "start", PROP_FLOAT, PROP_NONE);
+ prop= RNA_def_property(srna, "start", PROP_FLOAT, PROP_TIME);
RNA_def_property_range(prop, MINAFRAMEF, MAXFRAMEF);
RNA_def_property_ui_text(prop, "Start", "Specify the start frame of the effect.");
RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
- prop= RNA_def_property(srna, "length", PROP_FLOAT, PROP_NONE);
+ prop= RNA_def_property(srna, "length", PROP_FLOAT, PROP_TIME);
RNA_def_property_range(prop, 1, MAXFRAMEF);
RNA_def_property_ui_text(prop, "Length", "Specify the total time the build effect requires");
RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
@@ -697,32 +697,32 @@ static void rna_def_modifier_wave(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Time Offset", "Either the starting frame (for positive speed) or ending frame (for negative speed.)");
RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
- prop= RNA_def_property(srna, "lifetime", PROP_FLOAT, PROP_NONE);
+ prop= RNA_def_property(srna, "lifetime", PROP_FLOAT, PROP_TIME);
RNA_def_property_range(prop, MINAFRAMEF, MAXFRAMEF);
RNA_def_property_ui_text(prop, "Lifetime", "");
RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
- prop= RNA_def_property(srna, "damping_time", PROP_FLOAT, PROP_NONE);
+ prop= RNA_def_property(srna, "damping_time", PROP_FLOAT, PROP_TIME);
RNA_def_property_float_sdna(prop, NULL, "damp");
RNA_def_property_range(prop, MINAFRAMEF, MAXFRAMEF);
RNA_def_property_ui_text(prop, "Damping Time", "");
RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
- prop= RNA_def_property(srna, "falloff_radius", PROP_FLOAT, PROP_NONE);
+ prop= RNA_def_property(srna, "falloff_radius", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "falloff");
RNA_def_property_range(prop, 0, FLT_MAX);
RNA_def_property_ui_range(prop, 0, 100, 100, 2);
RNA_def_property_ui_text(prop, "Falloff Radius", "");
RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
- prop= RNA_def_property(srna, "start_position_x", PROP_FLOAT, PROP_NONE);
+ prop= RNA_def_property(srna, "start_position_x", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "startx");
RNA_def_property_range(prop, -FLT_MAX, FLT_MAX);
RNA_def_property_ui_range(prop, -100, 100, 100, 2);
RNA_def_property_ui_text(prop, "Start Position X", "");
RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
- prop= RNA_def_property(srna, "start_position_y", PROP_FLOAT, PROP_NONE);
+ prop= RNA_def_property(srna, "start_position_y", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "starty");
RNA_def_property_range(prop, -FLT_MAX, FLT_MAX);
RNA_def_property_ui_range(prop, -100, 100, 100, 2);
@@ -853,7 +853,7 @@ static void rna_def_modifier_hook(BlenderRNA *brna)
RNA_def_struct_sdna(srna, "HookModifierData");
RNA_def_struct_ui_icon(srna, ICON_HOOK);
- prop= RNA_def_property(srna, "falloff", PROP_FLOAT, PROP_NONE);
+ prop= RNA_def_property(srna, "falloff", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_range(prop, 0, FLT_MAX);
RNA_def_property_ui_range(prop, 0, 100, 100, 2);
RNA_def_property_ui_text(prop, "Falloff", "If not zero, the distance from the hook where influence ends.");
@@ -953,7 +953,7 @@ static void rna_def_modifier_array(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Count", "Number of duplicates to make.");
RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
- prop= RNA_def_property(srna, "length", PROP_FLOAT, PROP_NONE);
+ prop= RNA_def_property(srna, "length", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_range(prop, 0, INT_MAX);
RNA_def_property_ui_range(prop, 0, 10000, 10, 2);
RNA_def_property_ui_text(prop, "Length", "Length to fit array within.");
@@ -967,22 +967,22 @@ static void rna_def_modifier_array(BlenderRNA *brna)
RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_dependency_update");
/* Offset parameters */
- prop= RNA_def_property(srna, "constant_offset", PROP_BOOLEAN, PROP_NONE);
+ prop= RNA_def_property(srna, "constant_offset", PROP_BOOLEAN, PROP_TRANSLATION);
RNA_def_property_boolean_sdna(prop, NULL, "offset_type", MOD_ARR_OFF_CONST);
RNA_def_property_ui_text(prop, "Constant Offset", "");
RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
- prop= RNA_def_property(srna, "constant_offset_displacement", PROP_FLOAT, PROP_VECTOR);
+ prop= RNA_def_property(srna, "constant_offset_displacement", PROP_FLOAT, PROP_TRANSLATION);
RNA_def_property_float_sdna(prop, NULL, "offset");
RNA_def_property_ui_text(prop, "Constant Offset Displacement", "");
RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
- prop= RNA_def_property(srna, "relative_offset", PROP_BOOLEAN, PROP_NONE);
+ prop= RNA_def_property(srna, "relative_offset", PROP_BOOLEAN, PROP_TRANSLATION);
RNA_def_property_boolean_sdna(prop, NULL, "offset_type", MOD_ARR_OFF_RELATIVE);
RNA_def_property_ui_text(prop, "Relative Offset", "");
RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
- prop= RNA_def_property(srna, "relative_offset_displacement", PROP_FLOAT, PROP_VECTOR);
+ prop= RNA_def_property(srna, "relative_offset_displacement", PROP_FLOAT, PROP_TRANSLATION);
RNA_def_property_float_sdna(prop, NULL, "scale");
RNA_def_property_ui_text(prop, "Relative Offset Displacement", "");
RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
@@ -998,7 +998,7 @@ static void rna_def_modifier_array(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Merge Vertices", "Merge vertices in first and last duplicates.");
RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
- prop= RNA_def_property(srna, "merge_distance", PROP_FLOAT, PROP_NONE);
+ prop= RNA_def_property(srna, "merge_distance", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "merge_dist");
RNA_def_property_range(prop, 0, FLT_MAX);
RNA_def_property_ui_range(prop, 0, 1, 1, 4);
@@ -1280,7 +1280,7 @@ static void rna_def_modifier_cast(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Factor", "");
RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
- prop= RNA_def_property(srna, "radius", PROP_FLOAT, PROP_NONE);
+ prop= RNA_def_property(srna, "radius", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_range(prop, 0, FLT_MAX);
RNA_def_property_ui_range(prop, 0, 100, 10, 2);
RNA_def_property_ui_text(prop, "Radius", "Only deform vertices within this distance from the center of the effect (leave as 0 for infinite.)");
@@ -1860,7 +1860,7 @@ void RNA_def_modifier(BlenderRNA *brna)
RNA_def_property_boolean_sdna(prop, NULL, "mode", eModifierMode_Realtime);
RNA_def_property_ui_text(prop, "Realtime", "Realtime display of a modifier.");
RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update");
- RNA_def_property_ui_icon(prop, ICON_VIEW3D, 0);
+ RNA_def_property_ui_icon(prop, ICON_RESTRICT_VIEW_OFF, 0);
prop= RNA_def_property(srna, "render", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", eModifierMode_Render);
diff --git a/source/blender/makesrna/intern/rna_nla.c b/source/blender/makesrna/intern/rna_nla.c
index 3b55da046b8..98c72b7ee74 100644
--- a/source/blender/makesrna/intern/rna_nla.c
+++ b/source/blender/makesrna/intern/rna_nla.c
@@ -297,12 +297,12 @@ void rna_def_nlastrip(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Blending", "Method used for combining strip's result with accumulated result.");
/* Strip extents */
- prop= RNA_def_property(srna, "start_frame", PROP_FLOAT, PROP_NONE);
+ prop= RNA_def_property(srna, "start_frame", PROP_FLOAT, PROP_TIME);
RNA_def_property_float_sdna(prop, NULL, "start");
RNA_def_property_float_funcs(prop, NULL, "rna_NlaStrip_start_frame_set", NULL);
RNA_def_property_ui_text(prop, "Start Frame", "");
- prop= RNA_def_property(srna, "end_frame", PROP_FLOAT, PROP_NONE);
+ prop= RNA_def_property(srna, "end_frame", PROP_FLOAT, PROP_TIME);
RNA_def_property_float_sdna(prop, NULL, "end");
RNA_def_property_float_funcs(prop, NULL, "rna_NlaStrip_end_frame_set", NULL);
RNA_def_property_ui_text(prop, "End Frame", "");
@@ -328,12 +328,12 @@ void rna_def_nlastrip(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Action", "Action referenced by this strip.");
/* Action extents */
- prop= RNA_def_property(srna, "action_start_frame", PROP_FLOAT, PROP_NONE);
+ prop= RNA_def_property(srna, "action_start_frame", PROP_FLOAT, PROP_TIME);
RNA_def_property_float_sdna(prop, NULL, "actstart");
RNA_def_property_float_funcs(prop, NULL, "rna_NlaStrip_action_start_frame_set", NULL);
RNA_def_property_ui_text(prop, "Action Start Frame", "");
- prop= RNA_def_property(srna, "action_end_frame", PROP_FLOAT, PROP_NONE);
+ prop= RNA_def_property(srna, "action_end_frame", PROP_FLOAT, PROP_TIME);
RNA_def_property_float_sdna(prop, NULL, "actend");
RNA_def_property_float_funcs(prop, NULL, "rna_NlaStrip_action_end_frame_set", NULL);
RNA_def_property_ui_text(prop, "Action End Frame", "");
@@ -371,7 +371,7 @@ void rna_def_nlastrip(BlenderRNA *brna)
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Influence", "Amount the strip contributes to the current result.");
- prop= RNA_def_property(srna, "strip_time", PROP_FLOAT, PROP_NONE);
+ prop= RNA_def_property(srna, "strip_time", PROP_FLOAT, PROP_TIME);
RNA_def_property_ui_text(prop, "Strip Time", "Frame of referenced Action to evaluate.");
// TODO: should the animated_influence/time settings be animatable themselves?
diff --git a/source/blender/makesrna/intern/rna_nodetree.c b/source/blender/makesrna/intern/rna_nodetree.c
index a03b59556e1..23e79831292 100644
--- a/source/blender/makesrna/intern/rna_nodetree.c
+++ b/source/blender/makesrna/intern/rna_nodetree.c
@@ -1354,7 +1354,7 @@ static void rna_def_node(BlenderRNA *brna)
RNA_def_struct_sdna(srna, "bNode");
RNA_def_struct_refine_func(srna, "rna_Node_refine");
- prop = RNA_def_property(srna, "location", PROP_FLOAT, PROP_VECTOR);
+ prop = RNA_def_property(srna, "location", PROP_FLOAT, PROP_XYZ);
RNA_def_property_float_sdna(prop, NULL, "locx");
RNA_def_property_array(prop, 2);
RNA_def_property_range(prop, -10000.0f, 10000.0f);
diff --git a/source/blender/makesrna/intern/rna_object.c b/source/blender/makesrna/intern/rna_object.c
index 32307709387..0b77390095e 100644
--- a/source/blender/makesrna/intern/rna_object.c
+++ b/source/blender/makesrna/intern/rna_object.c
@@ -41,6 +41,18 @@
#include "WM_types.h"
+
+EnumPropertyItem object_mode_items[] = {
+ {OB_MODE_OBJECT, "OBJECT", ICON_OBJECT_DATAMODE, "Object", ""},
+ {OB_MODE_EDIT, "EDIT", ICON_EDITMODE_HLT, "Edit", ""},
+ {OB_MODE_SCULPT, "SCULPT", ICON_SCULPTMODE_HLT, "Sculpt", ""},
+ {OB_MODE_VERTEX_PAINT, "VERTEX_PAINT", ICON_VPAINT_HLT, "Vertex Paint", ""},
+ {OB_MODE_WEIGHT_PAINT, "WEIGHT_PAINT", ICON_WPAINT_HLT, "Weight Paint", ""},
+ {OB_MODE_TEXTURE_PAINT, "TEXTURE_PAINT", ICON_TPAINT_HLT, "Texture Paint", ""},
+ {OB_MODE_PARTICLE_EDIT, "PARTICLE_EDIT", ICON_PARTICLEMODE, "Particle Edit", ""},
+ {OB_MODE_POSE, "POSE", ICON_POSE_HLT, "Pose", ""},
+ {0, NULL, 0, NULL, NULL}};
+
static EnumPropertyItem parent_type_items[] = {
{PAROBJECT, "OBJECT", 0, "Object", ""},
{PARCURVE, "CURVE", 0, "Curve", ""},
@@ -57,6 +69,7 @@ static EnumPropertyItem parent_type_items[] = {
#include "DNA_key_types.h"
#include "BKE_armature.h"
+#include "BKE_bullet.h"
#include "BKE_context.h"
#include "BKE_curve.h"
#include "BKE_depsgraph.h"
@@ -485,6 +498,86 @@ static void rna_MaterialSlot_name_get(PointerRNA *ptr, char *str)
strcpy(str, "");
}
+/* why does this have to be so complicated?, can't all this crap be
+ * moved to in BGE conversion function? - Campbell *
+ *
+ * logic from check_body_type()
+ * */
+static int rna_GameObjectSettings_physics_type_get(PointerRNA *ptr)
+{
+ Object *ob= (Object*)ptr->id.data;
+
+ /* determine the body_type setting based on flags */
+ if (!(ob->gameflag & OB_COLLISION)) {
+ if (ob->gameflag & OB_OCCLUDER) {
+ ob->body_type = OB_BODY_TYPE_OCCLUDER;
+ } else {
+ ob->body_type = OB_BODY_TYPE_NO_COLLISION;
+ }
+ } else if (ob->gameflag & OB_SENSOR) {
+ ob->body_type = OB_BODY_TYPE_SENSOR;
+ } else if (!(ob->gameflag & OB_DYNAMIC)) {
+ ob->body_type = OB_BODY_TYPE_STATIC;
+ } else if (!(ob->gameflag & (OB_RIGID_BODY|OB_SOFT_BODY))) {
+ ob->body_type = OB_BODY_TYPE_DYNAMIC;
+ } else if (ob->gameflag & OB_RIGID_BODY) {
+ ob->body_type = OB_BODY_TYPE_RIGID;
+ } else {
+ ob->body_type = OB_BODY_TYPE_SOFT;
+ /* create the structure here because we display soft body buttons in the main panel */
+ if (!ob->bsoft)
+ ob->bsoft = bsbNew();
+ }
+
+ return ob->body_type;
+}
+
+static void rna_GameObjectSettings_physics_type_set(PointerRNA *ptr, int value)
+{
+ Object *ob= (Object*)ptr->id.data;
+ ob->body_type= value;
+
+ switch (ob->body_type) {
+ case OB_BODY_TYPE_SENSOR:
+ ob->gameflag |= OB_SENSOR|OB_COLLISION|OB_GHOST;
+ ob->gameflag &= ~(OB_OCCLUDER|OB_DYNAMIC|OB_RIGID_BODY|OB_SOFT_BODY|OB_ACTOR|OB_ANISOTROPIC_FRICTION|OB_DO_FH|OB_ROT_FH|OB_COLLISION_RESPONSE);
+ break;
+ case OB_BODY_TYPE_OCCLUDER:
+ ob->gameflag |= OB_OCCLUDER;
+ ob->gameflag &= ~(OB_SENSOR|OB_COLLISION|OB_DYNAMIC);
+ break;
+ case OB_BODY_TYPE_NO_COLLISION:
+ ob->gameflag &= ~(OB_SENSOR|OB_COLLISION|OB_OCCLUDER|OB_DYNAMIC);
+ break;
+ case OB_BODY_TYPE_STATIC:
+ ob->gameflag |= OB_COLLISION;
+ ob->gameflag &= ~(OB_DYNAMIC|OB_RIGID_BODY|OB_SOFT_BODY|OB_OCCLUDER|OB_SENSOR);
+ break;
+ case OB_BODY_TYPE_DYNAMIC:
+ ob->gameflag |= OB_COLLISION|OB_DYNAMIC|OB_ACTOR;
+ ob->gameflag &= ~(OB_RIGID_BODY|OB_SOFT_BODY|OB_OCCLUDER|OB_SENSOR);
+ break;
+ case OB_BODY_TYPE_RIGID:
+ ob->gameflag |= OB_COLLISION|OB_DYNAMIC|OB_RIGID_BODY|OB_ACTOR;
+ ob->gameflag &= ~(OB_SOFT_BODY|OB_OCCLUDER|OB_SENSOR);
+ break;
+ default:
+ case OB_BODY_TYPE_SOFT:
+ ob->gameflag |= OB_COLLISION|OB_DYNAMIC|OB_SOFT_BODY|OB_ACTOR;
+ ob->gameflag &= ~(OB_RIGID_BODY|OB_OCCLUDER|OB_SENSOR);
+
+ /* assume triangle mesh, if no bounds chosen for soft body */
+ if ((ob->gameflag & OB_BOUNDS) && (ob->boundtype<OB_BOUND_POLYH))
+ {
+ ob->boundtype=OB_BOUND_POLYH;
+ }
+ /* create a BulletSoftBody structure if not already existing */
+ if (!ob->bsoft)
+ ob->bsoft = bsbNew();
+ break;
+ }
+}
+
static PointerRNA rna_Object_active_particle_system_get(PointerRNA *ptr)
{
Object *ob= (Object*)ptr->id.data;
@@ -683,11 +776,13 @@ static void rna_def_object_game_settings(BlenderRNA *brna)
PropertyRNA *prop;
static EnumPropertyItem body_type_items[] = {
- {OB_BODY_TYPE_NO_COLLISION, "NO_COLLISION", 0, "No Collision", ""},
- {OB_BODY_TYPE_STATIC, "STATIC", 0, "Static", ""},
- {OB_BODY_TYPE_DYNAMIC, "DYNAMIC", 0, "Dynamic", ""},
- {OB_BODY_TYPE_RIGID, "RIGID_BODY", 0, "Rigid Body", ""},
- {OB_BODY_TYPE_SOFT, "SOFT_BODY", 0, "Soft Body", ""},
+ {OB_BODY_TYPE_NO_COLLISION, "NO_COLLISION", 0, "No Collision", "Disable colision for this object"},
+ {OB_BODY_TYPE_STATIC, "STATIC", 0, "Static", "Stationary object"},
+ {OB_BODY_TYPE_DYNAMIC, "DYNAMIC", 0, "Dynamic", "Linear physics"},
+ {OB_BODY_TYPE_RIGID, "RIGID_BODY", 0, "Rigid Body", "Linear and angular physics"},
+ {OB_BODY_TYPE_SOFT, "SOFT_BODY", 0, "Soft Body", "Soft body"},
+ {OB_BODY_TYPE_OCCLUDER, "OCCLUDE", 0, "Occlude", "Occluder for optimizing scene rendering"},
+ {OB_BODY_TYPE_SENSOR, "SENSOR", 0, "Sensor", "Collision Sensor, detects static and dynamic objects but not the other collision sensor objects"},
{0, NULL, 0, NULL, NULL}};
static EnumPropertyItem collision_bounds_items[] = {
@@ -742,7 +837,7 @@ static void rna_def_object_game_settings(BlenderRNA *brna)
prop= RNA_def_property(srna, "physics_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "body_type");
RNA_def_property_enum_items(prop, body_type_items);
- RNA_def_property_clear_flag(prop, PROP_EDITABLE); // this controls various gameflags
+ RNA_def_property_enum_funcs(prop, "rna_GameObjectSettings_physics_type_get", "rna_GameObjectSettings_physics_type_set", NULL);
RNA_def_property_ui_text(prop, "Physics Type", "Selects the type of physical representation.");
prop= RNA_def_property(srna, "actor", PROP_BOOLEAN, PROP_NONE);
@@ -757,10 +852,10 @@ static void rna_def_object_game_settings(BlenderRNA *brna)
RNA_def_property_range(prop, 0.01, 10000.0);
RNA_def_property_ui_text(prop, "Mass", "Mass of the object.");
- prop= RNA_def_property(srna, "radius", PROP_FLOAT, PROP_NONE);
+ prop= RNA_def_property(srna, "radius", PROP_FLOAT, PROP_NONE|PROP_UNIT_LENGTH);
RNA_def_property_float_sdna(prop, NULL, "inertia");
RNA_def_property_range(prop, 0.01, 10.0);
- RNA_def_property_ui_text(prop, "Radius", "Radius for Bounding sphere and Fh/Fh Rot.");
+ RNA_def_property_ui_text(prop, "Radius", "Radius of bounding sphere and material physics");
RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, NULL);
prop= RNA_def_property(srna, "no_sleeping", PROP_BOOLEAN, PROP_NONE);
@@ -820,13 +915,13 @@ static void rna_def_object_game_settings(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Lock Z Rotation Axis", "Disable simulation of angular motion along the Z axis.");
- prop= RNA_def_property(srna, "do_fh", PROP_BOOLEAN, PROP_NONE);
+ prop= RNA_def_property(srna, "material_physics", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "gameflag", OB_DO_FH);
- RNA_def_property_ui_text(prop, "Do Fh", "Use Fh settings in materials.");
+ RNA_def_property_ui_text(prop, "Use Material Physics", "Use physics settings in materials.");
- prop= RNA_def_property(srna, "rotation_fh", PROP_BOOLEAN, PROP_NONE);
+ prop= RNA_def_property(srna, "rotate_from_normal", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "gameflag", OB_ROT_FH);
- RNA_def_property_ui_text(prop, "Rotation Fh", "Use face normal to rotate Object");
+ RNA_def_property_ui_text(prop, "Rotate From Normal", "Use face normal to rotate object, so that it points away from the surface");
prop= RNA_def_property(srna, "form_factor", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "formfactor");
@@ -837,7 +932,7 @@ static void rna_def_object_game_settings(BlenderRNA *brna)
RNA_def_property_boolean_sdna(prop, NULL, "gameflag", OB_ANISOTROPIC_FRICTION);
RNA_def_property_ui_text(prop, "Anisotropic Friction", "Enable anisotropic friction.");
- prop= RNA_def_property(srna, "friction_coefficients", PROP_FLOAT, PROP_VECTOR);
+ prop= RNA_def_property(srna, "friction_coefficients", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "anisotropicFriction");
RNA_def_property_range(prop, 0.0, 1.0);
RNA_def_property_ui_text(prop, "Friction Coefficients", "Relative friction coefficient in the in the X, Y and Z directions, when anisotropic friction is enabled.");
@@ -855,7 +950,7 @@ static void rna_def_object_game_settings(BlenderRNA *brna)
RNA_def_property_boolean_sdna(prop, NULL, "gameflag", OB_CHILD);
RNA_def_property_ui_text(prop, "Collison Compound", "Add children to form a compound collision object.");
- prop= RNA_def_property(srna, "collision_margin", PROP_FLOAT, PROP_NONE);
+ prop= RNA_def_property(srna, "collision_margin", PROP_FLOAT, PROP_NONE|PROP_UNIT_LENGTH);
RNA_def_property_float_sdna(prop, NULL, "margin");
RNA_def_property_range(prop, 0.0, 1.0);
RNA_def_property_ui_text(prop, "Collision Margin", "Extra margin around object for collision detection, small amount required for stability.");
@@ -969,6 +1064,12 @@ static void rna_def_object(BlenderRNA *brna)
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Type", "Type of Object.");
+ prop= RNA_def_property(srna, "mode", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_sdna(prop, NULL, "mode");
+ RNA_def_property_enum_items(prop, object_mode_items);
+ RNA_def_property_clear_flag(prop, PROP_EDITABLE);
+ RNA_def_property_ui_text(prop, "Mode", "Object interaction mode.");
+
prop= RNA_def_property(srna, "layers", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "lay", 1);
RNA_def_property_array(prop, 20);
@@ -1057,47 +1158,47 @@ static void rna_def_object(BlenderRNA *brna)
/* transform */
- prop= RNA_def_property(srna, "location", PROP_FLOAT, PROP_VECTOR);
+ prop= RNA_def_property(srna, "location", PROP_FLOAT, PROP_TRANSLATION);
RNA_def_property_float_sdna(prop, NULL, "loc");
RNA_def_property_ui_text(prop, "Location", "Location of the object.");
RNA_def_property_update(prop, NC_OBJECT|ND_TRANSFORM, "rna_Object_update");
- prop= RNA_def_property(srna, "delta_location", PROP_FLOAT, PROP_VECTOR);
+ prop= RNA_def_property(srna, "delta_location", PROP_FLOAT, PROP_TRANSLATION);
RNA_def_property_float_sdna(prop, NULL, "dloc");
RNA_def_property_ui_text(prop, "Delta Location", "Extra added translation to object location.");
RNA_def_property_update(prop, NC_OBJECT|ND_TRANSFORM, "rna_Object_update");
- prop= RNA_def_property(srna, "rotation", PROP_FLOAT, PROP_ROTATION);
+ prop= RNA_def_property(srna, "rotation", PROP_FLOAT, PROP_EULER);
RNA_def_property_float_sdna(prop, NULL, "rot");
RNA_def_property_ui_text(prop, "Rotation", "Rotation of the object.");
RNA_def_property_update(prop, NC_OBJECT|ND_TRANSFORM, "rna_Object_update");
- prop= RNA_def_property(srna, "delta_rotation", PROP_FLOAT, PROP_ROTATION);
+ prop= RNA_def_property(srna, "delta_rotation", PROP_FLOAT, PROP_EULER);
RNA_def_property_float_sdna(prop, NULL, "drot");
RNA_def_property_ui_text(prop, "Delta Rotation", "Extra added rotation to the rotation of the object.");
RNA_def_property_update(prop, NC_OBJECT|ND_TRANSFORM, "rna_Object_update");
- prop= RNA_def_property(srna, "scale", PROP_FLOAT, PROP_VECTOR);
+ prop= RNA_def_property(srna, "scale", PROP_FLOAT, PROP_XYZ);
RNA_def_property_float_sdna(prop, NULL, "size");
RNA_def_property_ui_text(prop, "Scale", "Scaling of the object.");
RNA_def_property_update(prop, NC_OBJECT|ND_TRANSFORM, "rna_Object_update");
- prop= RNA_def_property(srna, "delta_scale", PROP_FLOAT, PROP_VECTOR);
+ prop= RNA_def_property(srna, "delta_scale", PROP_FLOAT, PROP_XYZ);
RNA_def_property_float_sdna(prop, NULL, "dsize");
RNA_def_property_ui_text(prop, "Delta Scale", "Extra added scaling to the scale of the object.");
RNA_def_property_update(prop, NC_OBJECT|ND_TRANSFORM, "rna_Object_update");
- prop= RNA_def_property(srna, "lock_location", PROP_BOOLEAN, PROP_VECTOR);
+ prop= RNA_def_property(srna, "lock_location", PROP_BOOLEAN, PROP_XYZ);
RNA_def_property_boolean_sdna(prop, NULL, "protectflag", OB_LOCK_LOCX);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Lock Location", "Lock editing of location in the interface.");
- prop= RNA_def_property(srna, "lock_rotation", PROP_BOOLEAN, PROP_VECTOR);
+ prop= RNA_def_property(srna, "lock_rotation", PROP_BOOLEAN, PROP_XYZ);
RNA_def_property_boolean_sdna(prop, NULL, "protectflag", OB_LOCK_ROTX);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Lock Rotation", "Lock editing of rotation in the interface.");
- prop= RNA_def_property(srna, "lock_scale", PROP_BOOLEAN, PROP_VECTOR);
+ prop= RNA_def_property(srna, "lock_scale", PROP_BOOLEAN, PROP_XYZ);
RNA_def_property_boolean_sdna(prop, NULL, "protectflag", OB_LOCK_SCALEX);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Lock Scale", "Lock editing of scale in the interface.");
@@ -1152,7 +1253,7 @@ static void rna_def_object(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Empty Draw Type", "Viewport display style for empties.");
RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, NULL);
- prop= RNA_def_property(srna, "empty_draw_size", PROP_FLOAT, PROP_NONE);
+ prop= RNA_def_property(srna, "empty_draw_size", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "empty_drawsize");
RNA_def_property_range(prop, 0.01, 10.0);
RNA_def_property_ui_text(prop, "Empty Draw Size", "Size of of display for empties in the viewport.");
@@ -1278,25 +1379,25 @@ static void rna_def_object(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Dupli Group", "Instance an existing group.");
RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, "rna_Object_dependency_update");
- prop= RNA_def_property(srna, "dupli_frames_start", PROP_INT, PROP_NONE);
+ prop= RNA_def_property(srna, "dupli_frames_start", PROP_INT, PROP_NONE|PROP_UNIT_TIME);
RNA_def_property_int_sdna(prop, NULL, "dupsta");
RNA_def_property_range(prop, 1, 32767);
RNA_def_property_ui_text(prop, "Dupli Frames Start", "Start frame for DupliFrames.");
RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, "rna_Object_update");
- prop= RNA_def_property(srna, "dupli_frames_end", PROP_INT, PROP_NONE);
+ prop= RNA_def_property(srna, "dupli_frames_end", PROP_INT, PROP_NONE|PROP_UNIT_TIME);
RNA_def_property_int_sdna(prop, NULL, "dupend");
RNA_def_property_range(prop, 1, 32767);
RNA_def_property_ui_text(prop, "Dupli Frames End", "End frame for DupliFrames.");
RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, "rna_Object_update");
- prop= RNA_def_property(srna, "dupli_frames_on", PROP_INT, PROP_NONE);
+ prop= RNA_def_property(srna, "dupli_frames_on", PROP_INT, PROP_NONE|PROP_UNIT_TIME);
RNA_def_property_int_sdna(prop, NULL, "dupon");
RNA_def_property_range(prop, 1, 1500);
RNA_def_property_ui_text(prop, "Dupli Frames On", "Number of frames to use between DupOff frames.");
RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, "rna_Object_update");
- prop= RNA_def_property(srna, "dupli_frames_off", PROP_INT, PROP_NONE);
+ prop= RNA_def_property(srna, "dupli_frames_off", PROP_INT, PROP_NONE|PROP_UNIT_TIME);
RNA_def_property_int_sdna(prop, NULL, "dupoff");
RNA_def_property_range(prop, 0, 1500);
RNA_def_property_ui_text(prop, "Dupli Frames Off", "Recurring frames to exclude from the Dupliframes.");
@@ -1310,7 +1411,7 @@ static void rna_def_object(BlenderRNA *brna)
/* time offset */
- prop= RNA_def_property(srna, "time_offset", PROP_FLOAT, PROP_NONE);
+ prop= RNA_def_property(srna, "time_offset", PROP_FLOAT, PROP_NONE|PROP_UNIT_TIME);
RNA_def_property_float_sdna(prop, NULL, "sf");
RNA_def_property_range(prop, MINAFRAMEF, MAXFRAMEF);
RNA_def_property_ui_text(prop, "Time Offset", "Animation offset in frames for IPO's and dupligroup instances.");
@@ -1395,11 +1496,6 @@ static void rna_def_object(BlenderRNA *brna)
RNA_def_property_struct_type(prop, "Pose");
RNA_def_property_ui_text(prop, "Pose", "Current pose for armatures.");
- prop= RNA_def_property(srna, "pose_mode", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "flag", OB_POSEMODE);
- RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- RNA_def_property_ui_text(prop, "Pose Mode", "Object with armature data is in pose mode.");
-
/* shape keys */
prop= RNA_def_property(srna, "shape_key_lock", PROP_BOOLEAN, PROP_NONE);
diff --git a/source/blender/makesrna/intern/rna_object_force.c b/source/blender/makesrna/intern/rna_object_force.c
index e229afedc62..932bef9969d 100644
--- a/source/blender/makesrna/intern/rna_object_force.c
+++ b/source/blender/makesrna/intern/rna_object_force.c
@@ -148,6 +148,7 @@ static void rna_Cache_idname_change(bContext *C, PointerRNA *ptr)
if(new_name) {
if(pid2 && cache->flag & PTCACHE_DISK_CACHE) {
+ /* TODO: change to simple file rename */
strcpy(name, cache->name);
strcpy(cache->name, cache->prev_name);
@@ -169,6 +170,87 @@ static void rna_Cache_idname_change(bContext *C, PointerRNA *ptr)
BLI_freelistN(&pidlist);
}
+static void rna_Cache_list_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
+{
+ Object *ob = ptr->id.data;
+ PointCache *cache= ptr->data;
+ PTCacheID *pid;
+ ListBase pidlist;
+
+ BKE_ptcache_ids_from_object(&pidlist, ob);
+
+ for(pid=pidlist.first; pid; pid=pid->next) {
+ if(pid->cache == cache) {
+ rna_iterator_listbase_begin(iter, pid->ptcaches, NULL);
+ break;
+ }
+ }
+
+ BLI_freelistN(&pidlist);
+}
+static void rna_Cache_active_point_cache_index_range(PointerRNA *ptr, int *min, int *max)
+{
+ Object *ob = ptr->id.data;
+ PointCache *cache= ptr->data;
+ PTCacheID *pid;
+ ListBase pidlist;
+
+ BKE_ptcache_ids_from_object(&pidlist, ob);
+
+ *min= 0;
+ *max= 0;
+
+ for(pid=pidlist.first; pid; pid=pid->next) {
+ if(pid->cache == cache) {
+ *max= BLI_countlist(pid->ptcaches)-1;
+ *max= MAX2(0, *max);
+ break;
+ }
+ }
+
+ BLI_freelistN(&pidlist);
+}
+
+static int rna_Cache_active_point_cache_index_get(PointerRNA *ptr)
+{
+ Object *ob = ptr->id.data;
+ PointCache *cache= ptr->data;
+ PTCacheID *pid;
+ ListBase pidlist;
+ int num = 0;
+
+ BKE_ptcache_ids_from_object(&pidlist, ob);
+
+ for(pid=pidlist.first; pid; pid=pid->next) {
+ if(pid->cache == cache) {
+ num = BLI_findindex(pid->ptcaches, cache);
+ break;
+ }
+ }
+
+ BLI_freelistN(&pidlist);
+
+ return num;
+}
+
+static void rna_Cache_active_point_cache_index_set(struct PointerRNA *ptr, int value)
+{
+ Object *ob = ptr->id.data;
+ PointCache *cache= ptr->data;
+ PTCacheID *pid;
+ ListBase pidlist;
+
+ BKE_ptcache_ids_from_object(&pidlist, ob);
+
+ for(pid=pidlist.first; pid; pid=pid->next) {
+ if(pid->cache == cache) {
+ *(pid->cache_ptr) = BLI_findlink(pid->ptcaches, value);
+ break;
+ }
+ }
+
+ BLI_freelistN(&pidlist);
+}
static int rna_SoftBodySettings_use_edges_get(PointerRNA *ptr)
{
Object *data= (Object*)(ptr->id.data);
@@ -371,13 +453,14 @@ static void rna_def_pointcache(BlenderRNA *brna)
srna= RNA_def_struct(brna, "PointCache", NULL);
RNA_def_struct_ui_text(srna, "Point Cache", "Point cache for physics simulations.");
+ RNA_def_struct_ui_icon(srna, ICON_PHYSICS);
- prop= RNA_def_property(srna, "start_frame", PROP_INT, PROP_NONE);
+ prop= RNA_def_property(srna, "start_frame", PROP_INT, PROP_TIME);
RNA_def_property_int_sdna(prop, NULL, "startframe");
RNA_def_property_range(prop, 1, 300000);
RNA_def_property_ui_text(prop, "Start", "Frame on which the simulation starts.");
- prop= RNA_def_property(srna, "end_frame", PROP_INT, PROP_NONE);
+ prop= RNA_def_property(srna, "end_frame", PROP_INT, PROP_TIME);
RNA_def_property_int_sdna(prop, NULL, "endframe");
RNA_def_property_range(prop, 1, 300000);
RNA_def_property_ui_text(prop, "End", "Frame on which the simulation stops.");
@@ -420,6 +503,7 @@ static void rna_def_pointcache(BlenderRNA *brna)
RNA_def_property_string_sdna(prop, NULL, "name");
RNA_def_property_ui_text(prop, "Name", "Cache name");
RNA_def_property_update(prop, NC_OBJECT, "rna_Cache_idname_change");
+ RNA_def_struct_name_property(srna, prop);
prop= RNA_def_property(srna, "filepath", PROP_STRING, PROP_DIRPATH);
RNA_def_property_string_sdna(prop, NULL, "path");
@@ -440,6 +524,16 @@ static void rna_def_pointcache(BlenderRNA *brna)
RNA_def_property_boolean_sdna(prop, NULL, "flag", PTCACHE_EXTERNAL);
RNA_def_property_ui_text(prop, "External", "Read cache from an external location");
RNA_def_property_update(prop, NC_OBJECT, "rna_Cache_idname_change");
+
+ prop= RNA_def_property(srna, "point_cache_list", PROP_COLLECTION, PROP_NONE);
+ RNA_def_property_collection_funcs(prop, "rna_Cache_list_begin", "rna_iterator_listbase_next", "rna_iterator_listbase_end", "rna_iterator_listbase_get", 0, 0, 0, 0, 0);
+ RNA_def_property_struct_type(prop, "PointCache");
+ RNA_def_property_ui_text(prop, "Point Cache List", "Point cache list");
+
+ prop= RNA_def_property(srna, "active_point_cache_index", PROP_INT, PROP_UNSIGNED);
+ RNA_def_property_int_funcs(prop, "rna_Cache_active_point_cache_index_get", "rna_Cache_active_point_cache_index_set", "rna_Cache_active_point_cache_index_range");
+ RNA_def_property_ui_text(prop, "Active Point Cache Index", "");
+ RNA_def_property_update(prop, NC_OBJECT, "rna_Cache_change");
}
static void rna_def_collision(BlenderRNA *brna)
@@ -770,13 +864,13 @@ static void rna_def_game_softbody(BlenderRNA *brna)
RNA_def_property_boolean_sdna(prop, NULL, "flag", OB_BSB_BENDING_CONSTRAINTS);
RNA_def_property_ui_text(prop, "Bending Const", "Enable bending constraints");
- prop= RNA_def_property(srna, "enable_rs_collision", PROP_BOOLEAN, PROP_NONE);
+ prop= RNA_def_property(srna, "cluster_rigid_to_softbody", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "collisionflags", OB_BSB_COL_CL_RS);
- RNA_def_property_ui_text(prop, "Cluster Collision RS", "Enable cluster collision between soft and rigid body");
+ RNA_def_property_ui_text(prop, "Rigid to Soft Body", "Enable cluster collision between soft and rigid body");
- prop= RNA_def_property(srna, "enable_ss_collision", PROP_BOOLEAN, PROP_NONE);
+ prop= RNA_def_property(srna, "cluster_soft_to_softbody", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "collisionflags", OB_BSB_COL_CL_SS);
- RNA_def_property_ui_text(prop, "Cluster Collision SS", "Enable cluster collision between soft and soft body");
+ RNA_def_property_ui_text(prop, "Soft to Soft Body", "Enable cluster collision between soft and soft body");
}
static void rna_def_softbody(BlenderRNA *brna)
@@ -810,7 +904,7 @@ static void rna_def_softbody(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Mass", "");
RNA_def_property_update(prop, NC_OBJECT|ND_GEOM_DATA, "rna_Object_update_data");
- prop= RNA_def_property(srna, "gravity", PROP_FLOAT, PROP_NONE);
+ prop= RNA_def_property(srna, "gravity", PROP_FLOAT, PROP_ACCELERATION);
RNA_def_property_float_sdna(prop, NULL, "grav");
RNA_def_property_range(prop, -10.0f, 10.0f);
RNA_def_property_ui_text(prop, "Gravitation", "Apply gravitation to point movement");
diff --git a/source/blender/makesrna/intern/rna_particle.c b/source/blender/makesrna/intern/rna_particle.c
index 3ebdd61ca50..e0dbc232e06 100644
--- a/source/blender/makesrna/intern/rna_particle.c
+++ b/source/blender/makesrna/intern/rna_particle.c
@@ -536,7 +536,7 @@ static void rna_def_particle_hair_key(BlenderRNA *brna)
RNA_def_struct_sdna(srna, "HairKey");
RNA_def_struct_ui_text(srna, "Particle Hair Key", "Particle key for hair particle system.");
- prop= RNA_def_property(srna, "location", PROP_FLOAT, PROP_VECTOR);
+ prop= RNA_def_property(srna, "location", PROP_FLOAT, PROP_TRANSLATION);
RNA_def_property_float_sdna(prop, NULL, "co");
RNA_def_property_ui_text(prop, "Location", "Key location.");
@@ -555,19 +555,19 @@ static void rna_def_particle_key(BlenderRNA *brna)
srna = RNA_def_struct(brna, "ParticleKey", NULL);
RNA_def_struct_ui_text(srna, "Particle Key", "Key location for a particle over time.");
- prop= RNA_def_property(srna, "location", PROP_FLOAT, PROP_VECTOR);
+ prop= RNA_def_property(srna, "location", PROP_FLOAT, PROP_TRANSLATION);
RNA_def_property_float_sdna(prop, NULL, "co");
RNA_def_property_ui_text(prop, "Location", "Key location.");
- prop= RNA_def_property(srna, "velocity", PROP_FLOAT, PROP_VECTOR);
+ prop= RNA_def_property(srna, "velocity", PROP_FLOAT, PROP_VELOCITY);
RNA_def_property_float_sdna(prop, NULL, "vel");
RNA_def_property_ui_text(prop, "Velocity", "Key velocity");
- prop= RNA_def_property(srna, "rotation", PROP_FLOAT, PROP_ROTATION);
+ prop= RNA_def_property(srna, "rotation", PROP_FLOAT, PROP_QUATERNION);
RNA_def_property_float_sdna(prop, NULL, "rot");
RNA_def_property_ui_text(prop, "Rotation", "Key rotation quaterion.");
- prop= RNA_def_property(srna, "angular_velocity", PROP_FLOAT, PROP_ROTATION);
+ prop= RNA_def_property(srna, "angular_velocity", PROP_FLOAT, PROP_VELOCITY);
RNA_def_property_float_sdna(prop, NULL, "ave");
RNA_def_property_ui_text(prop, "Angular Velocity", "Key angular velocity.");
@@ -616,35 +616,35 @@ static void rna_def_particle(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Stick Object", "Object that particle sticks to when dead");
/* Particle State & Previous State */
- prop= RNA_def_property(srna, "location", PROP_FLOAT, PROP_VECTOR);
+ prop= RNA_def_property(srna, "location", PROP_FLOAT, PROP_TRANSLATION);
RNA_def_property_float_sdna(prop, NULL, "state.co");
RNA_def_property_ui_text(prop, "Particle Location", "");
- prop= RNA_def_property(srna, "velocity", PROP_FLOAT, PROP_VECTOR);
+ prop= RNA_def_property(srna, "velocity", PROP_FLOAT, PROP_VELOCITY);
RNA_def_property_float_sdna(prop, NULL, "state.vel");
RNA_def_property_ui_text(prop, "Particle Velocity", "");
- prop= RNA_def_property(srna, "angular_velocity", PROP_FLOAT, PROP_VECTOR);
+ prop= RNA_def_property(srna, "angular_velocity", PROP_FLOAT, PROP_VELOCITY);
RNA_def_property_float_sdna(prop, NULL, "state.ave");
RNA_def_property_ui_text(prop, "Angular Velocity", "");
- prop= RNA_def_property(srna, "rotation", PROP_FLOAT, PROP_ROTATION);
+ prop= RNA_def_property(srna, "rotation", PROP_FLOAT, PROP_QUATERNION);
RNA_def_property_float_sdna(prop, NULL, "state.rot");
RNA_def_property_ui_text(prop, "Rotation", "");
- prop= RNA_def_property(srna, "prev_location", PROP_FLOAT, PROP_VECTOR);
+ prop= RNA_def_property(srna, "prev_location", PROP_FLOAT, PROP_TRANSLATION);
RNA_def_property_float_sdna(prop, NULL, "prev_state.co");
RNA_def_property_ui_text(prop, "Previous Particle Location", "");
- prop= RNA_def_property(srna, "prev_velocity", PROP_FLOAT, PROP_VECTOR);
+ prop= RNA_def_property(srna, "prev_velocity", PROP_FLOAT, PROP_VELOCITY);
RNA_def_property_float_sdna(prop, NULL, "prev_state.vel");
RNA_def_property_ui_text(prop, "Previous Particle Velocity", "");
- prop= RNA_def_property(srna, "prev_angular_velocity", PROP_FLOAT, PROP_VECTOR);
+ prop= RNA_def_property(srna, "prev_angular_velocity", PROP_FLOAT, PROP_VELOCITY);
RNA_def_property_float_sdna(prop, NULL, "prev_state.ave");
RNA_def_property_ui_text(prop, "Previous Angular Velocity", "");
- prop= RNA_def_property(srna, "prev_rotation", PROP_FLOAT, PROP_ROTATION);
+ prop= RNA_def_property(srna, "prev_rotation", PROP_FLOAT, PROP_QUATERNION);
RNA_def_property_float_sdna(prop, NULL, "prev_state.rot");
RNA_def_property_ui_text(prop, "Previous Rotation", "");
@@ -662,17 +662,17 @@ static void rna_def_particle(BlenderRNA *brna)
/* Random variables */
- prop= RNA_def_property(srna, "random_rotation", PROP_FLOAT, PROP_ROTATION);
+ prop= RNA_def_property(srna, "random_rotation", PROP_FLOAT, PROP_QUATERNION);
RNA_def_property_float_sdna(prop, NULL, "r_rot");
// RNA_def_property_range(prop, lowerLimitf, upperLimitf);
RNA_def_property_ui_text(prop, "Random Rotation", "");
- prop= RNA_def_property(srna, "random_a_velocity", PROP_FLOAT, PROP_VECTOR);
+ prop= RNA_def_property(srna, "random_a_velocity", PROP_FLOAT, PROP_VELOCITY);
RNA_def_property_float_sdna(prop, NULL, "r_ave");
// RNA_def_property_range(prop, lowerLimitf, upperLimitf);
RNA_def_property_ui_text(prop, "Random Angular Velocity", "");
- prop= RNA_def_property(srna, "random_velocity", PROP_FLOAT, PROP_VECTOR);
+ prop= RNA_def_property(srna, "random_velocity", PROP_FLOAT, PROP_VELOCITY);
RNA_def_property_float_sdna(prop, NULL, "r_ve");
// RNA_def_property_range(prop, lowerLimitf, upperLimitf);
RNA_def_property_ui_text(prop, "Random Velocity", "");
@@ -681,16 +681,16 @@ static void rna_def_particle(BlenderRNA *brna)
// float fuv[4], foffset; /* coordinates on face/edge number "num" and depth along*/
// /* face normal for volume emission */
- prop= RNA_def_property(srna, "birthtime", PROP_FLOAT, PROP_NONE);
+ prop= RNA_def_property(srna, "birthtime", PROP_FLOAT, PROP_TIME);
RNA_def_property_float_sdna(prop, NULL, "time");
// RNA_def_property_range(prop, lowerLimitf, upperLimitf);
RNA_def_property_ui_text(prop, "Birth Time", "");
- prop= RNA_def_property(srna, "lifetime", PROP_FLOAT, PROP_NONE);
+ prop= RNA_def_property(srna, "lifetime", PROP_FLOAT, PROP_TIME);
// RNA_def_property_range(prop, lowerLimitf, upperLimitf);
RNA_def_property_ui_text(prop, "Lifetime", "");
- prop= RNA_def_property(srna, "die_time", PROP_FLOAT, PROP_NONE);
+ prop= RNA_def_property(srna, "die_time", PROP_FLOAT, PROP_TIME);
RNA_def_property_float_sdna(prop, NULL, "dietime");
// RNA_def_property_range(prop, lowerLimitf, upperLimitf);
RNA_def_property_ui_text(prop, "Die Time", "");
@@ -1261,7 +1261,7 @@ static void rna_def_particle_settings(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Random Tilt", "Random tilt of the billboards");
RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_redo");
- prop= RNA_def_property(srna, "billboard_offset", PROP_FLOAT, PROP_VECTOR);
+ prop= RNA_def_property(srna, "billboard_offset", PROP_FLOAT, PROP_TRANSLATION);
RNA_def_property_float_sdna(prop, NULL, "bb_offset");
RNA_def_property_array(prop, 2);
RNA_def_property_range(prop, -100.0f, 100.0f);
@@ -1312,7 +1312,7 @@ static void rna_def_particle_settings(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "End", "Frame # to stop emitting particles.");
RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
- prop= RNA_def_property(srna, "lifetime", PROP_FLOAT, PROP_NONE);
+ prop= RNA_def_property(srna, "lifetime", PROP_FLOAT, PROP_TIME);
RNA_def_property_range(prop, 1.0f, MAXFRAMEF);
RNA_def_property_ui_text(prop, "Lifetime", "Specify the life span of the particles");
RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
@@ -1465,14 +1465,14 @@ static void rna_def_particle_settings(BlenderRNA *brna)
/* global physical properties */
- prop= RNA_def_property(srna, "acceleration", PROP_FLOAT, PROP_VECTOR);
+ prop= RNA_def_property(srna, "acceleration", PROP_FLOAT, PROP_ACCELERATION);
RNA_def_property_float_sdna(prop, NULL, "acc");
RNA_def_property_array(prop, 3);
RNA_def_property_range(prop, -200.0f, 200.0f);
RNA_def_property_ui_text(prop, "Acceleration", "Constant acceleration");
RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_reset");
- prop= RNA_def_property(srna, "gravity", PROP_FLOAT, PROP_NONE);
+ prop= RNA_def_property(srna, "gravity", PROP_FLOAT, PROP_ACCELERATION);
RNA_def_property_float_sdna(prop, NULL, "acc[2]");
RNA_def_property_range(prop, -200.0f, 200.0f);
RNA_def_property_ui_text(prop, "Gravity", "Constant acceleration in global Z axis direction");
@@ -1837,7 +1837,7 @@ static void rna_def_particle_target(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Target Particle System", "The index of particle system on the target object.");
RNA_def_property_update(prop, NC_OBJECT|ND_PARTICLE, "rna_Particle_target_reset");
- prop= RNA_def_property(srna, "time", PROP_FLOAT, PROP_NONE);
+ prop= RNA_def_property(srna, "time", PROP_FLOAT, PROP_TIME);
RNA_def_property_float_sdna(prop, NULL, "time");
RNA_def_property_range(prop, 0.0, 30000.0f); //TODO: replace 30000 with MAXFRAMEF when available in 2.5
RNA_def_property_ui_text(prop, "Time", "");
diff --git a/source/blender/makesrna/intern/rna_pose.c b/source/blender/makesrna/intern/rna_pose.c
index 48637829741..9e4af513062 100644
--- a/source/blender/makesrna/intern/rna_pose.c
+++ b/source/blender/makesrna/intern/rna_pose.c
@@ -358,13 +358,13 @@ static void rna_def_pose_channel(BlenderRNA *brna)
RNA_def_property_int_sdna(prop, NULL, "agrp_index");
RNA_def_property_ui_text(prop, "Bone Group Index", "Bone Group this pose channel belongs to (0=no group).");
- prop= RNA_def_property(srna, "path_start_frame", PROP_INT, PROP_NONE);
+ prop= RNA_def_property(srna, "path_start_frame", PROP_INT, PROP_TIME);
RNA_def_property_int_sdna(prop, NULL, "pathsf");
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Bone Paths Calculation Start Frame", "Starting frame of range of frames to use for Bone Path calculations.");
RNA_def_property_update(prop, NC_OBJECT|ND_POSE|ND_TRANSFORM, "rna_Pose_update");
- prop= RNA_def_property(srna, "path_end_frame", PROP_INT, PROP_NONE);
+ prop= RNA_def_property(srna, "path_end_frame", PROP_INT, PROP_TIME);
RNA_def_property_int_sdna(prop, NULL, "pathef");
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Bone Paths Calculation End Frame", "End frame of range of frames to use for Bone Path calculations.");
@@ -385,22 +385,22 @@ static void rna_def_pose_channel(BlenderRNA *brna)
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Child", "Child of this pose channel.");
- prop= RNA_def_property(srna, "location", PROP_FLOAT, PROP_VECTOR);
+ prop= RNA_def_property(srna, "location", PROP_FLOAT, PROP_TRANSLATION);
RNA_def_property_float_sdna(prop, NULL, "loc");
RNA_def_property_ui_text(prop, "Location", "");
RNA_def_property_update(prop, NC_OBJECT|ND_POSE|ND_TRANSFORM, "rna_Pose_update");
- prop= RNA_def_property(srna, "scale", PROP_FLOAT, PROP_VECTOR);
+ prop= RNA_def_property(srna, "scale", PROP_FLOAT, PROP_XYZ);
RNA_def_property_float_sdna(prop, NULL, "size");
RNA_def_property_ui_text(prop, "Scale", "");
RNA_def_property_update(prop, NC_OBJECT|ND_POSE|ND_TRANSFORM, "rna_Pose_update");
- prop= RNA_def_property(srna, "rotation", PROP_FLOAT, PROP_ROTATION);
+ prop= RNA_def_property(srna, "rotation", PROP_FLOAT, PROP_QUATERNION);
RNA_def_property_float_sdna(prop, NULL, "quat");
RNA_def_property_ui_text(prop, "Rotation", "Rotation in Quaternions.");
RNA_def_property_update(prop, NC_OBJECT|ND_POSE|ND_TRANSFORM, "rna_Pose_update");
- prop= RNA_def_property(srna, "euler_rotation", PROP_FLOAT, PROP_ROTATION);
+ prop= RNA_def_property(srna, "euler_rotation", PROP_FLOAT, PROP_EULER);
RNA_def_property_float_sdna(prop, NULL, "eul");
RNA_def_property_float_funcs(prop, "rna_PoseChannel_euler_rotation_get", "rna_PoseChannel_euler_rotation_set", NULL);
RNA_def_property_ui_text(prop, "Rotation (Euler)", "Rotation in Eulers.");
@@ -433,45 +433,45 @@ static void rna_def_pose_channel(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Constraint Inverse Matrix", "4x4 matrix, defines transform from final position to unconstrained position.");
*/
- prop= RNA_def_property(srna, "pose_head", PROP_FLOAT, PROP_VECTOR);
+ prop= RNA_def_property(srna, "pose_head", PROP_FLOAT, PROP_TRANSLATION);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Pose Head Position", "Location of head of the channel's bone.");
- prop= RNA_def_property(srna, "pose_tail", PROP_FLOAT, PROP_VECTOR);
+ prop= RNA_def_property(srna, "pose_tail", PROP_FLOAT, PROP_TRANSLATION);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Pose Tail Position", "Location of tail of the channel's bone.");
- prop= RNA_def_property(srna, "ik_min_x", PROP_FLOAT, PROP_ROTATION);
+ prop= RNA_def_property(srna, "ik_min_x", PROP_FLOAT, PROP_ANGLE);
RNA_def_property_float_sdna(prop, NULL, "limitmin[0]");
RNA_def_property_range(prop, -180.0f, 0.0f);
RNA_def_property_ui_text(prop, "IK X Minimum", "Minimum angles for IK Limit");
RNA_def_property_update(prop, NC_OBJECT|ND_POSE|ND_TRANSFORM, "rna_Pose_update");
- prop= RNA_def_property(srna, "ik_max_x", PROP_FLOAT, PROP_ROTATION);
+ prop= RNA_def_property(srna, "ik_max_x", PROP_FLOAT, PROP_ANGLE);
RNA_def_property_float_sdna(prop, NULL, "limitmax[0]");
RNA_def_property_range(prop, 0.0f, 180.0f);
RNA_def_property_ui_text(prop, "IK X Maximum", "Maximum angles for IK Limit");
RNA_def_property_update(prop, NC_OBJECT|ND_POSE|ND_TRANSFORM, "rna_Pose_update");
- prop= RNA_def_property(srna, "ik_min_y", PROP_FLOAT, PROP_ROTATION);
+ prop= RNA_def_property(srna, "ik_min_y", PROP_FLOAT, PROP_ANGLE);
RNA_def_property_float_sdna(prop, NULL, "limitmin[1]");
RNA_def_property_range(prop, -180.0f, 0.0f);
RNA_def_property_ui_text(prop, "IK Y Minimum", "Minimum angles for IK Limit");
RNA_def_property_update(prop, NC_OBJECT|ND_POSE|ND_TRANSFORM, "rna_Pose_update");
- prop= RNA_def_property(srna, "ik_max_y", PROP_FLOAT, PROP_ROTATION);
+ prop= RNA_def_property(srna, "ik_max_y", PROP_FLOAT, PROP_ANGLE);
RNA_def_property_float_sdna(prop, NULL, "limitmax[1]");
RNA_def_property_range(prop, 0.0f, 180.0f);
RNA_def_property_ui_text(prop, "IK Y Maximum", "Maximum angles for IK Limit");
RNA_def_property_update(prop, NC_OBJECT|ND_POSE|ND_TRANSFORM, "rna_Pose_update");
- prop= RNA_def_property(srna, "ik_min_z", PROP_FLOAT, PROP_ROTATION);
+ prop= RNA_def_property(srna, "ik_min_z", PROP_FLOAT, PROP_ANGLE);
RNA_def_property_float_sdna(prop, NULL, "limitmin[2]");
RNA_def_property_range(prop, -180.0f, 0.0f);
RNA_def_property_ui_text(prop, "IK Z Minimum", "Minimum angles for IK Limit");
RNA_def_property_update(prop, NC_OBJECT|ND_POSE|ND_TRANSFORM, "rna_Pose_update");
- prop= RNA_def_property(srna, "ik_max_z", PROP_FLOAT, PROP_ROTATION);
+ prop= RNA_def_property(srna, "ik_max_z", PROP_FLOAT, PROP_ANGLE);
RNA_def_property_float_sdna(prop, NULL, "limitmax[2]");
RNA_def_property_range(prop, 0.0f, 180.0f);
RNA_def_property_ui_text(prop, "IK Z Maximum", "Maximum angles for IK Limit");
@@ -505,17 +505,17 @@ static void rna_def_pose_channel(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Custom Object", "Object that defines custom draw type for this bone.");
RNA_def_property_update(prop, NC_OBJECT|ND_POSE|ND_TRANSFORM, "rna_Pose_update");
- prop= RNA_def_property(srna, "lock_location", PROP_BOOLEAN, PROP_VECTOR);
+ prop= RNA_def_property(srna, "lock_location", PROP_BOOLEAN, PROP_XYZ);
RNA_def_property_boolean_sdna(prop, NULL, "protectflag", OB_LOCK_LOCX);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Lock Location", "Lock editing of location in the interface.");
- prop= RNA_def_property(srna, "lock_rotation", PROP_BOOLEAN, PROP_VECTOR);
+ prop= RNA_def_property(srna, "lock_rotation", PROP_BOOLEAN, PROP_XYZ);
RNA_def_property_boolean_sdna(prop, NULL, "protectflag", OB_LOCK_ROTX);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Lock Rotation", "Lock editing of rotation in the interface.");
- prop= RNA_def_property(srna, "lock_scale", PROP_BOOLEAN, PROP_VECTOR);
+ prop= RNA_def_property(srna, "lock_scale", PROP_BOOLEAN, PROP_XYZ);
RNA_def_property_boolean_sdna(prop, NULL, "protectflag", OB_LOCK_SCALEX);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Lock Scale", "Lock editing of scale in the interface.");
diff --git a/source/blender/makesrna/intern/rna_render.c b/source/blender/makesrna/intern/rna_render.c
index 7268d560282..9137e596da1 100644
--- a/source/blender/makesrna/intern/rna_render.c
+++ b/source/blender/makesrna/intern/rna_render.c
@@ -106,11 +106,12 @@ static void rna_RenderEngine_unregister(const bContext *C, StructRNA *type)
if(!et)
return;
+ RNA_struct_free_extension(type, &et->ext);
BLI_freelinkN(&R_engines, et);
RNA_struct_free(&BLENDER_RNA, type);
}
-static StructRNA *rna_RenderEngine_register(const bContext *C, ReportList *reports, void *data, StructValidateFunc validate, StructCallbackFunc call, StructFreeFunc free)
+static StructRNA *rna_RenderEngine_register(const bContext *C, ReportList *reports, void *data, const char *identifier, StructValidateFunc validate, StructCallbackFunc call, StructFreeFunc free)
{
RenderEngineType *et, dummyet = {0};
RenderEngine dummyengine= {0};
@@ -272,10 +273,17 @@ static void rna_def_render_result(BlenderRNA *brna)
{
StructRNA *srna;
PropertyRNA *prop;
+ FunctionRNA *func;
srna= RNA_def_struct(brna, "RenderResult", NULL);
RNA_def_struct_ui_text(srna, "Render Result", "Result of rendering, including all layers and passes.");
+ func= RNA_def_function(srna, "load_from_file", "RE_result_load_from_file");
+ RNA_def_function_ui_description(func, "Copies the pixels of this render result from an image file.");
+ RNA_def_function_flag(func, FUNC_USE_REPORTS);
+ prop= RNA_def_string(func, "filename", "", 0, "Filename", "Filename to load into this render tile, must be no smaller then the render result");
+ RNA_def_property_flag(prop, PROP_REQUIRED);
+
RNA_define_verify_sdna(0);
prop= RNA_def_property(srna, "resolution_x", PROP_INT, PROP_NONE);
@@ -302,15 +310,11 @@ static void rna_def_render_layer(BlenderRNA *brna)
srna= RNA_def_struct(brna, "RenderLayer", NULL);
RNA_def_struct_ui_text(srna, "Render Layer", "");
- func= RNA_def_function(srna, "rect_from_file", "RE_layer_rect_from_file");
+ func= RNA_def_function(srna, "load_from_file", "RE_layer_load_from_file");
RNA_def_function_ui_description(func, "Copies the pixels of this renderlayer from an image file.");
RNA_def_function_flag(func, FUNC_USE_REPORTS);
prop= RNA_def_string(func, "filename", "", 0, "Filename", "Filename to load into this render tile, must be no smaller then the renderlayer");
RNA_def_property_flag(prop, PROP_REQUIRED);
- prop= RNA_def_int(func, "x", 0, 0, INT_MAX, "Offset X", "Offset the position to copy from if the image is larger then the render layer", 0, INT_MAX);
- RNA_def_property_flag(prop, PROP_REQUIRED);
- prop= RNA_def_int(func, "y", 0, 0, INT_MAX, "Offset Y", "Offset the position to copy from if the image is larger then the render layer", 0, INT_MAX);
- RNA_def_property_flag(prop, PROP_REQUIRED);
RNA_define_verify_sdna(0);
diff --git a/source/blender/makesrna/intern/rna_rna.c b/source/blender/makesrna/intern/rna_rna.c
index 385c7f5b2b1..57ed5ccef39 100644
--- a/source/blender/makesrna/intern/rna_rna.c
+++ b/source/blender/makesrna/intern/rna_rna.c
@@ -407,12 +407,25 @@ static int rna_Property_subtype_get(PointerRNA *ptr)
return prop->subtype;
}
+static int rna_Property_unit_get(PointerRNA *ptr)
+{
+ PropertyRNA *prop= (PropertyRNA*)ptr->data;
+ rna_idproperty_check(&prop, ptr);
+ return RNA_SUBTYPE_UNIT(prop->subtype);
+}
+
static int rna_Property_editable_get(PointerRNA *ptr)
{
PropertyRNA *prop= (PropertyRNA*)ptr->data;
return RNA_property_editable(ptr, prop);
}
+static int rna_Property_use_return_get(PointerRNA *ptr)
+{
+ PropertyRNA *prop= (PropertyRNA*)ptr->data;
+ return prop->flag & PROP_RETURN ? 1:0;
+}
+
static int rna_Property_array_length_get(PointerRNA *ptr)
{
PropertyRNA *prop= (PropertyRNA*)ptr->data;
@@ -769,15 +782,32 @@ static void rna_def_property(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}};
static EnumPropertyItem subtype_items[] = {
{PROP_NONE, "NONE", 0, "None", ""},
- {PROP_UNSIGNED, "UNSIGNED", 0, "Unsigned Number", ""},
{PROP_FILEPATH, "FILE_PATH", 0, "File Path", ""},
{PROP_DIRPATH, "DIRECTORY_PATH", 0, "Directory Path", ""},
+ {PROP_UNSIGNED, "UNSIGNED", 0, "Unsigned Number", ""},
+ {PROP_PERCENTAGE, "PERCENTAGE", 0, "Percentage", ""},
+ {PROP_ANGLE, "ANGLE", 0, "Angle", ""},
+ {PROP_TIME, "TIME", 0, "Time", ""},
+ {PROP_DISTANCE, "DISTANCE", 0, "Distance", ""},
{PROP_COLOR, "COLOR", 0, "Color", ""},
- {PROP_VECTOR, "VECTOR", 0, "Vector", ""},
+ {PROP_TRANSLATION, "TRANSLATION", 0, "Translation", ""},
+ {PROP_DIRECTION, "DIRECTION", 0, "Direction", ""},
{PROP_MATRIX, "MATRIX", 0, "Matrix", ""},
- {PROP_ROTATION, "ROTATION", 0, "Rotation", ""},
+ {PROP_EULER, "EULER", 0, "Euler", ""},
+ {PROP_QUATERNION, "QUATERNION", 0, "Quaternion", ""},
+ {PROP_XYZ, "XYZ", 0, "XYZ", ""},
+ {PROP_RGB, "RGB", 0, "RGB", ""},
{PROP_NEVER_NULL, "NEVER_NULL", 0, "Never Null", ""},
- {PROP_PERCENTAGE, "PERCENTAGE", 0, "Percentage", ""},
+ {0, NULL, 0, NULL, NULL}};
+ static EnumPropertyItem unit_items[] = {
+ {PROP_UNIT_NONE, "NONE", 0, "None", ""},
+ {PROP_UNIT_LENGTH, "LENGTH", 0, "Length", ""},
+ {PROP_UNIT_AREA, "AREA", 0, "Area", ""},
+ {PROP_UNIT_VOLUME, "VOLUME", 0, "Volume", ""},
+ {PROP_UNIT_ROTATION, "ROTATION", 0, "Rotation", ""},
+ {PROP_UNIT_TIME, "TIME", 0, "Time", ""},
+ {PROP_UNIT_VELOCITY, "VELOCITY", 0, "Velocity", ""},
+ {PROP_UNIT_ACCELERATION, "ACCELERATION", 0, "Acceleration", ""},
{0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "Property", NULL);
@@ -813,11 +843,22 @@ static void rna_def_property(BlenderRNA *brna)
RNA_def_property_enum_funcs(prop, "rna_Property_subtype_get", NULL, NULL);
RNA_def_property_ui_text(prop, "Subtype", "Semantic interpretation of the property.");
+ prop= RNA_def_property(srna, "unit", PROP_ENUM, PROP_NONE);
+ RNA_def_property_clear_flag(prop, PROP_EDITABLE);
+ RNA_def_property_enum_items(prop, unit_items);
+ RNA_def_property_enum_funcs(prop, "rna_Property_unit_get", NULL, NULL);
+ RNA_def_property_ui_text(prop, "Unit", "Type of units for this property.");
+
prop= RNA_def_property(srna, "editable", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_boolean_funcs(prop, "rna_Property_editable_get", NULL);
RNA_def_property_ui_text(prop, "Editable", "Property is editable through RNA.");
+ prop= RNA_def_property(srna, "use_return", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_clear_flag(prop, PROP_EDITABLE);
+ RNA_def_property_boolean_funcs(prop, "rna_Property_use_return_get", NULL);
+ RNA_def_property_ui_text(prop, "Return", "True when this property is a return value from an rna function..");
+
prop= RNA_def_property(srna, "registered", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_boolean_funcs(prop, "rna_Property_registered_get", NULL);
@@ -875,15 +916,17 @@ static void rna_def_number_property(StructRNA *srna, PropertyType type)
RNA_def_property_ui_text(prop, "Default", "Default value for this number");
switch(type) {
- case PROP_BOOLEAN:
- RNA_def_property_boolean_funcs(prop, "rna_BoolProperty_default_get", NULL);
- break;
- case PROP_INT:
- RNA_def_property_int_funcs(prop, "rna_IntProperty_default_get", NULL, NULL);
- break;
- case PROP_FLOAT:
- RNA_def_property_float_funcs(prop, "rna_FloatProperty_default_get", NULL, NULL);
- break;
+ case PROP_BOOLEAN:
+ RNA_def_property_boolean_funcs(prop, "rna_BoolProperty_default_get", NULL);
+ break;
+ case PROP_INT:
+ RNA_def_property_int_funcs(prop, "rna_IntProperty_default_get", NULL, NULL);
+ break;
+ case PROP_FLOAT:
+ RNA_def_property_float_funcs(prop, "rna_FloatProperty_default_get", NULL, NULL);
+ break;
+ default:
+ break;
}
diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c
index 6e12ceb37db..60071efb0a8 100644
--- a/source/blender/makesrna/intern/rna_scene.c
+++ b/source/blender/makesrna/intern/rna_scene.c
@@ -30,6 +30,7 @@
#include "rna_internal.h"
#include "DNA_scene_types.h"
+#include "DNA_userdef_types.h"
#ifdef WITH_FFMPEG
#include "BKE_writeffmpeg.h"
@@ -52,6 +53,7 @@ EnumPropertyItem prop_mode_items[] ={
#ifdef RNA_RUNTIME
+#include "DNA_anim_types.h"
#include "DNA_node_types.h"
#include "BKE_context.h"
@@ -60,6 +62,8 @@ EnumPropertyItem prop_mode_items[] ={
#include "BLI_threads.h"
+#include "ED_node.h"
+
#include "RE_pipeline.h"
PointerRNA rna_Scene_objects_get(CollectionPropertyIterator *iter)
@@ -174,6 +178,54 @@ static void rna_Scene_frame_update(bContext *C, PointerRNA *ptr)
//ED_update_for_newframe(C);
}
+static int rna_Scene_active_keying_set_editable(PointerRNA *ptr)
+{
+ Scene *scene= (Scene *)ptr->data;
+
+ /* only editable if there are some Keying Sets to change to */
+ return (scene->keyingsets.first != NULL);
+}
+
+static PointerRNA rna_Scene_active_keying_set_get(PointerRNA *ptr)
+{
+ Scene *scene= (Scene *)ptr->data;
+ return rna_pointer_inherit_refine(ptr, &RNA_KeyingSet, BLI_findlink(&scene->keyingsets, scene->active_keyingset-1));
+}
+
+static void rna_Scene_active_keying_set_set(PointerRNA *ptr, PointerRNA value)
+{
+ Scene *scene= (Scene *)ptr->data;
+ KeyingSet *ks= (KeyingSet*)value.data;
+ scene->active_keyingset= BLI_findindex(&scene->keyingsets, ks) + 1;
+}
+
+static int rna_Scene_active_keying_set_index_get(PointerRNA *ptr)
+{
+ Scene *scene= (Scene *)ptr->data;
+ return MAX2(scene->active_keyingset-1, 0);
+}
+
+static void rna_Scene_active_keying_set_index_set(PointerRNA *ptr, int value)
+{
+ Scene *scene= (Scene *)ptr->data;
+ scene->active_keyingset= value+1;
+}
+
+static void rna_Scene_active_keying_set_index_range(PointerRNA *ptr, int *min, int *max)
+{
+ Scene *scene= (Scene *)ptr->data;
+
+ *min= 0;
+ *max= BLI_countlist(&scene->keyingsets)-1;
+ *max= MAX2(0, *max);
+}
+
+
+static char *rna_SceneRenderData_path(PointerRNA *ptr)
+{
+ return BLI_sprintfN("render_data");
+}
+
static int rna_SceneRenderData_threads_get(PointerRNA *ptr)
{
RenderData *rd= (RenderData*)ptr->data;
@@ -321,6 +373,15 @@ static void rna_SceneRenderLayer_pass_update(bContext *C, PointerRNA *ptr)
ntreeCompositForceHidden(scene->nodetree, scene);
}
+void rna_Scene_use_nodes_set(PointerRNA *ptr, int value)
+{
+ Scene *scene= (Scene*)ptr->data;
+
+ scene->use_nodes= value;
+ if(scene->use_nodes && scene->nodetree==NULL)
+ ED_node_composit_default(scene);
+}
+
#else
static void rna_def_tool_settings(BlenderRNA *brna)
@@ -354,6 +415,11 @@ static void rna_def_tool_settings(BlenderRNA *brna)
{SCE_SNAP_TARGET_MEDIAN, "MEDIAN", 0, "Median", "Snap median onto target."},
{SCE_SNAP_TARGET_ACTIVE, "ACTIVE", 0, "Active", "Snap active onto target."},
{0, NULL, 0, NULL, NULL}};
+
+ static EnumPropertyItem auto_key_items[] = {
+ {AUTOKEY_MODE_NORMAL, "ADD_REPLACE_KEYS", 0, "Add/Replace", ""},
+ {AUTOKEY_MODE_EDITKEYS, "REPLACE_KEYS", 0, "Replace", ""},
+ {0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "ToolSettings", NULL);
RNA_def_struct_ui_text(srna, "Tool Settings", "");
@@ -416,6 +482,20 @@ static void rna_def_tool_settings(BlenderRNA *brna)
RNA_def_property_boolean_sdna(prop, NULL, "snap_flag", SCE_SNAP_PEEL_OBJECT);
RNA_def_property_ui_text(prop, "Snap Peel Object", "Consider objects as whole when finding volume center.");
RNA_def_property_ui_icon(prop, ICON_SNAP_PEEL_OBJECT, 0);
+
+ /* Auto Keying */
+ prop= RNA_def_property(srna, "enable_auto_key", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "autokey_mode", AUTOKEY_ON);
+ RNA_def_property_ui_text(prop, "Auto Keying", "Automatic keyframe insertion for Objects and Bones");
+
+ prop= RNA_def_property(srna, "autokey_mode", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_sdna(prop, NULL, "autokey_mode");
+ RNA_def_property_enum_items(prop, auto_key_items);
+ RNA_def_property_ui_text(prop, "Auto-Keying Mode", "Mode of automatic keyframe insertion for Objects and Bones");
+
+ prop= RNA_def_property(srna, "record_with_nla", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "autokey_flag", ANIMRECORD_FLAG_WITHNLA);
+ RNA_def_property_ui_text(prop, "Layered", "Add a new NLA Track + Strip for every loop/pass made over the animation to allow non-destructive tweaking.");
/* UV */
prop= RNA_def_property(srna, "uv_selection_mode", PROP_ENUM, PROP_NONE);
@@ -443,6 +523,40 @@ static void rna_def_tool_settings(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Vertex Group Weight", "Weight to assign in vertex groups.");
}
+
+static void rna_def_unit_settings(BlenderRNA *brna)
+{
+ StructRNA *srna;
+ PropertyRNA *prop;
+
+ static EnumPropertyItem unit_systems[] = {
+ {USER_UNIT_NONE, "NONE", 0, "None", ""},
+ {USER_UNIT_METRIC, "METRIC", 0, "Metric", ""},
+ {USER_UNIT_IMPERIAL, "IMPERIAL", 0, "Imperial", ""},
+ {0, NULL, 0, NULL, NULL}};
+
+ srna= RNA_def_struct(brna, "UnitSettings", NULL);
+ RNA_def_struct_ui_text(srna, "Unit Settings", "");
+
+ /* Units */
+ prop= RNA_def_property(srna, "system", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_items(prop, unit_systems);
+ RNA_def_property_ui_text(prop, "Unit System", "The unit system to use for button display.");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
+
+ prop= RNA_def_property(srna, "scale_length", PROP_FLOAT, PROP_UNSIGNED);
+ RNA_def_property_ui_text(prop, "Unit Scale", "Scale to use when converting between blender units and dimensions.");
+ RNA_def_property_range(prop, 0.00001, 100000.0);
+ RNA_def_property_ui_range(prop, 0.001, 100.0, 0.1, 3);
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
+
+ prop= RNA_def_property(srna, "use_separate", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", USER_UNIT_OPT_SPLIT);
+ RNA_def_property_ui_text(prop, "Separate Units", "Display units in pairs.");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
+}
+
+
void rna_def_render_layer_common(StructRNA *srna, int scene)
{
PropertyRNA *prop;
@@ -673,9 +787,9 @@ void rna_def_scene_game_data(BlenderRNA *brna)
PropertyRNA *prop;
static EnumPropertyItem framing_types_items[] ={
- {SCE_GAMEFRAMING_BARS, "BARS", 0, "Stretch", ""},
- {SCE_GAMEFRAMING_EXTEND, "EXTEND", 0, "Extend", ""},
- {SCE_GAMEFRAMING_SCALE, "SCALE", 0, "Scale", ""},
+ {SCE_GAMEFRAMING_BARS, "LETTERBOX", 0, "Letterbox", "Show the entire viewport in the display window, using bar horizontally or vertically"},
+ {SCE_GAMEFRAMING_EXTEND, "EXTEND", 0, "Extend", "Show the entire viewport in the display window, viewing more horizontally or vertically"},
+ {SCE_GAMEFRAMING_SCALE, "SCALE", 0, "Scale", "Stretch or squeeze the viewport to fill the display window"},
{0, NULL, 0, NULL, NULL}};
static EnumPropertyItem dome_modes_items[] ={
@@ -698,7 +812,7 @@ void rna_def_scene_game_data(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}};
static EnumPropertyItem stereo_items[] ={
- {STEREO_NOSTEREO, "NO_STEREO", 0, "No Stereo", ""},
+ {STEREO_NOSTEREO, "NONE", 0, "None", ""},
{STEREO_ENABLED, "STEREO", 0, "Stereo", ""},
{STEREO_DOME, "DOME", 0, "Dome", ""},
{0, NULL, 0, NULL, NULL}};
@@ -712,6 +826,12 @@ void rna_def_scene_game_data(BlenderRNA *brna)
{WOPHY_BULLET, "BULLET", 0, "Bullet", ""},
{0, NULL, 0, NULL, NULL}};
+ static EnumPropertyItem material_items[] ={
+ {GAME_MAT_TEXFACE, "TEXTURE_FACE", 0, "Texture Face", "Single texture face materials."},
+ {GAME_MAT_MULTITEX, "MULTITEXTURE", 0, "Multitexture", "Multitexture materials."},
+ {GAME_MAT_GLSL, "GLSL", 0, "GLSL", "OpenGL shading language shaders."},
+ {0, NULL, 0, NULL, NULL}};
+
srna= RNA_def_struct(brna, "SceneGameData", NULL);
RNA_def_struct_sdna(srna, "GameData");
RNA_def_struct_nested(brna, srna, "Scene");
@@ -818,7 +938,7 @@ void rna_def_scene_game_data(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Physics Engine", "Physics engine used for physics simulation in the game engine.");
RNA_def_property_update(prop, NC_SCENE, NULL);
- prop= RNA_def_property(srna, "physics_gravity", PROP_FLOAT, PROP_NONE);
+ prop= RNA_def_property(srna, "physics_gravity", PROP_FLOAT, PROP_ACCELERATION);
RNA_def_property_float_sdna(prop, NULL, "gravity");
RNA_def_property_range(prop, 0.0, 25.0);
RNA_def_property_ui_text(prop, "Physics Gravity", "Gravitational constant used for physics simulation in the game engine.");
@@ -876,6 +996,74 @@ void rna_def_scene_game_data(BlenderRNA *brna)
RNA_def_property_range(prop, 0.0, 1000.0);
RNA_def_property_ui_text(prop, "box radius", "Radius of the activity bubble, in Manhattan length. Objects outside the box are activity-culled");
RNA_def_property_update(prop, NC_SCENE, NULL);
+
+ /* booleans */
+ prop= RNA_def_property(srna, "all_frames", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", GAME_ENABLE_ALL_FRAMES);
+ RNA_def_property_ui_text(prop, "All Frames", "Render as many frames as possible, rather than respecting framerate.");
+ RNA_def_property_update(prop, NC_SCENE, NULL);
+
+ prop= RNA_def_property(srna, "show_debug_properties", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", GAME_SHOW_DEBUG_PROPS);
+ RNA_def_property_ui_text(prop, "Show Debug Properties", "Show properties marked for debugging while the game runs.");
+ RNA_def_property_update(prop, NC_SCENE, NULL);
+
+ prop= RNA_def_property(srna, "show_framerate_profile", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", GAME_SHOW_FRAMERATE);
+ RNA_def_property_ui_text(prop, "Show Framerate and Profile", "Show framerate and profiling information while the game runs.");
+ RNA_def_property_update(prop, NC_SCENE, NULL);
+
+ prop= RNA_def_property(srna, "show_physics_visualization", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", GAME_SHOW_PHYSICS);
+ RNA_def_property_ui_text(prop, "Show Physics Visualization", "Show a visualization of physics bounds and interactions.");
+ RNA_def_property_update(prop, NC_SCENE, NULL);
+
+ prop= RNA_def_property(srna, "display_lists", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", GAME_DISPLAY_LISTS);
+ RNA_def_property_ui_text(prop, "Display Lists", "Use display lists to speed up rendering by keeping geometry on the GPU.");
+ RNA_def_property_update(prop, NC_SCENE, NULL);
+
+ prop= RNA_def_property(srna, "deprecation_warnings", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", GAME_IGNORE_DEPRECATION_WARNINGS);
+ RNA_def_property_ui_text(prop, "Deprecation Warnings", "Print warnings when using deprecated features in the python API.");
+ RNA_def_property_update(prop, NC_SCENE, NULL);
+
+ /* materials */
+ prop= RNA_def_property(srna, "material_mode", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_sdna(prop, NULL, "matmode");
+ RNA_def_property_enum_items(prop, material_items);
+ RNA_def_property_ui_text(prop, "Material Mode", "Material mode to use for rendering.");
+ RNA_def_property_update(prop, NC_SCENE, NULL);
+
+ prop= RNA_def_property(srna, "glsl_lights", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", GAME_GLSL_NO_LIGHTS);
+ RNA_def_property_ui_text(prop, "GLSL Lights", "Use lights for GLSL rendering.");
+ RNA_def_property_update(prop, NC_SCENE, NULL);
+
+ prop= RNA_def_property(srna, "glsl_shaders", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", GAME_GLSL_NO_SHADERS);
+ RNA_def_property_ui_text(prop, "GLSL Shaders", "Use shaders for GLSL rendering.");
+ RNA_def_property_update(prop, NC_SCENE, NULL);
+
+ prop= RNA_def_property(srna, "glsl_shadows", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", GAME_GLSL_NO_SHADOWS);
+ RNA_def_property_ui_text(prop, "GLSL Shadows", "Use shadows for GLSL rendering.");
+ RNA_def_property_update(prop, NC_SCENE, NULL);
+
+ prop= RNA_def_property(srna, "glsl_ramps", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", GAME_GLSL_NO_RAMPS);
+ RNA_def_property_ui_text(prop, "GLSL Ramps", "Use ramps for GLSL rendering.");
+ RNA_def_property_update(prop, NC_SCENE, NULL);
+
+ prop= RNA_def_property(srna, "glsl_nodes", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", GAME_GLSL_NO_NODES);
+ RNA_def_property_ui_text(prop, "GLSL Nodes", "Use nodes for GLSL rendering.");
+ RNA_def_property_update(prop, NC_SCENE, NULL);
+
+ prop= RNA_def_property(srna, "glsl_extra_textures", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", GAME_GLSL_NO_EXTRA_TEX);
+ RNA_def_property_ui_text(prop, "GLSL Extra Textures", "Use extra textures like normal or specular maps for GLSL rendering.");
+ RNA_def_property_update(prop, NC_SCENE, NULL);
}
static void rna_def_scene_render_layer(BlenderRNA *brna)
@@ -1081,6 +1269,7 @@ static void rna_def_scene_render_data(BlenderRNA *brna)
srna= RNA_def_struct(brna, "SceneRenderData", NULL);
RNA_def_struct_sdna(srna, "RenderData");
RNA_def_struct_nested(brna, srna, "Scene");
+ RNA_def_struct_path_func(srna, "rna_SceneRenderData_path");
RNA_def_struct_ui_text(srna, "Render Data", "Rendering settings for a Scene datablock.");
prop= RNA_def_property(srna, "color_mode", PROP_ENUM, PROP_NONE);
@@ -1365,6 +1554,11 @@ static void rna_def_scene_render_data(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Fields Still", "Disable the time difference between fields.");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+ prop= RNA_def_property(srna, "sync_audio", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "audio.flag", AUDIO_SYNC);
+ RNA_def_property_ui_text(prop, "Sync Audio", "Play back and sync with audio from Sequence Editor");
+ RNA_def_property_update(prop, NC_SCENE, NULL);
+
prop= RNA_def_property(srna, "render_shadows", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "mode", R_SHADOW);
RNA_def_property_ui_text(prop, "Render Shadows", "Calculate shadows while rendering.");
@@ -1480,7 +1674,12 @@ static void rna_def_scene_render_data(BlenderRNA *brna)
RNA_def_property_boolean_sdna(prop, NULL, "scemode", R_FREE_IMAGE);
RNA_def_property_ui_text(prop, "Free Image Textures", "Free all image texture from memory after render, to save memory before compositing.");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
-
+
+ prop= RNA_def_property(srna, "free_unused_nodes", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "scemode", R_FREE_IMAGE);
+ RNA_def_property_ui_text(prop, "Free Unused Nodes", "Free Nodes that are not used while compositing, to save memory.");
+ RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+
prop= RNA_def_property(srna, "save_buffers", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "scemode", R_EXR_TILE_FILE);
RNA_def_property_boolean_funcs(prop, "rna_SceneRenderData_save_buffers_get", NULL);
@@ -1641,7 +1840,7 @@ void RNA_def_scene(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "World", "World used for rendering the scene.");
RNA_def_property_update(prop, NC_WORLD, NULL);
- prop= RNA_def_property(srna, "cursor_location", PROP_FLOAT, PROP_VECTOR);
+ prop= RNA_def_property(srna, "cursor_location", PROP_FLOAT, PROP_XYZ|PROP_UNIT_LENGTH);
RNA_def_property_float_sdna(prop, NULL, "cursor");
RNA_def_property_ui_text(prop, "Cursor Location", "3D cursor location.");
RNA_def_property_ui_range(prop, -10000.0, 10000.0, 10, 4);
@@ -1663,28 +1862,28 @@ void RNA_def_scene(BlenderRNA *brna)
/* Frame Range Stuff */
- prop= RNA_def_property(srna, "current_frame", PROP_INT, PROP_NONE);
+ prop= RNA_def_property(srna, "current_frame", PROP_INT, PROP_TIME);
RNA_def_property_clear_flag(prop, PROP_ANIMATEABLE);
RNA_def_property_int_sdna(prop, NULL, "r.cfra");
RNA_def_property_range(prop, MINAFRAME, MAXFRAME);
RNA_def_property_ui_text(prop, "Current Frame", "");
RNA_def_property_update(prop, NC_SCENE|ND_FRAME, "rna_Scene_frame_update");
- prop= RNA_def_property(srna, "start_frame", PROP_INT, PROP_NONE);
+ prop= RNA_def_property(srna, "start_frame", PROP_INT, PROP_TIME);
RNA_def_property_clear_flag(prop, PROP_ANIMATEABLE);
RNA_def_property_int_sdna(prop, NULL, "r.sfra");
RNA_def_property_int_funcs(prop, NULL, "rna_Scene_start_frame_set", NULL);
RNA_def_property_ui_text(prop, "Start Frame", "");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
- prop= RNA_def_property(srna, "end_frame", PROP_INT, PROP_NONE);
+ prop= RNA_def_property(srna, "end_frame", PROP_INT, PROP_TIME);
RNA_def_property_clear_flag(prop, PROP_ANIMATEABLE);
RNA_def_property_int_sdna(prop, NULL, "r.efra");
RNA_def_property_int_funcs(prop, NULL, "rna_Scene_end_frame_set", NULL);
RNA_def_property_ui_text(prop, "End Frame", "");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
- prop= RNA_def_property(srna, "frame_step", PROP_INT, PROP_NONE);
+ prop= RNA_def_property(srna, "frame_step", PROP_INT, PROP_TIME);
RNA_def_property_clear_flag(prop, PROP_ANIMATEABLE);
RNA_def_property_int_sdna(prop, NULL, "frame_step");
RNA_def_property_ui_text(prop, "Frame Step", "Number of frames to skip forward while rendering/playing back each frame");
@@ -1697,14 +1896,14 @@ void RNA_def_scene(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Use Preview Range", "");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
- prop= RNA_def_property(srna, "preview_range_start_frame", PROP_INT, PROP_NONE);
+ prop= RNA_def_property(srna, "preview_range_start_frame", PROP_INT, PROP_TIME);
RNA_def_property_clear_flag(prop, PROP_ANIMATEABLE);
RNA_def_property_int_sdna(prop, NULL, "r.psfra");
RNA_def_property_int_funcs(prop, NULL, "rna_Scene_preview_range_start_frame_set", NULL);
RNA_def_property_ui_text(prop, "Preview Range Start Frame", "");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
- prop= RNA_def_property(srna, "preview_range_end_frame", PROP_INT, PROP_NONE);
+ prop= RNA_def_property(srna, "preview_range_end_frame", PROP_INT, PROP_TIME);
RNA_def_property_clear_flag(prop, PROP_ANIMATEABLE);
RNA_def_property_int_sdna(prop, NULL, "r.pefra");
RNA_def_property_int_funcs(prop, NULL, "rna_Scene_preview_range_end_frame_set", NULL);
@@ -1720,6 +1919,12 @@ void RNA_def_scene(BlenderRNA *brna)
/* Nodes (Compositing) */
prop= RNA_def_property(srna, "nodetree", PROP_POINTER, PROP_NONE);
RNA_def_property_ui_text(prop, "Node Tree", "Compositing node tree.");
+
+ prop= RNA_def_property(srna, "use_nodes", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "use_nodes", 1);
+ RNA_def_property_boolean_funcs(prop, NULL, "rna_Scene_use_nodes_set");
+ RNA_def_property_ui_text(prop, "Use Nodes", "Enable the compositing node tree.");
+ RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
/* Sequencer */
prop= RNA_def_property(srna, "sequence_editor", PROP_POINTER, PROP_NONE);
@@ -1728,24 +1933,40 @@ void RNA_def_scene(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Sequence Editor", "");
/* Keying Sets */
- // TODO: hide the fact that active keyingset is an int?
- prop= RNA_def_property(srna, "keyingsets", PROP_COLLECTION, PROP_NONE);
+ prop= RNA_def_property(srna, "keying_sets", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_sdna(prop, NULL, "keyingsets", NULL);
RNA_def_property_struct_type(prop, "KeyingSet");
RNA_def_property_ui_text(prop, "Keying Sets", "Keying Sets for this Scene.");
+ RNA_def_property_update(prop, NC_SCENE|ND_KEYINGSET, NULL);
- prop= RNA_def_property(srna, "active_keyingset", PROP_INT, PROP_NONE);
- RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- RNA_def_property_ui_text(prop, "Active Keying Set", "Current Keying Set index.");
+ prop= RNA_def_property(srna, "active_keying_set", PROP_POINTER, PROP_NONE);
+ RNA_def_property_struct_type(prop, "KeyingSet");
+ RNA_def_property_flag(prop, PROP_EDITABLE);
+ RNA_def_property_editable_func(prop, "rna_Scene_active_keying_set_editable");
+ RNA_def_property_pointer_funcs(prop, "rna_Scene_active_keying_set_get", "rna_Scene_active_keying_set_set", NULL);
+ RNA_def_property_ui_text(prop, "Active Keying Set", "Active Keying Set used to insert/delete keyframes.");
+ RNA_def_property_update(prop, NC_SCENE|ND_KEYINGSET, NULL);
+
+ prop= RNA_def_property(srna, "active_keying_set_index", PROP_INT, PROP_NONE);
+ RNA_def_property_int_sdna(prop, NULL, "active_keyingset");
+ RNA_def_property_int_funcs(prop, "rna_Scene_active_keying_set_index_get", "rna_Scene_active_keying_set_index_set", "rna_Scene_active_keying_set_index_range");
+ RNA_def_property_ui_text(prop, "Active Keying Set Index", "Current Keying Set index.");
+ RNA_def_property_update(prop, NC_SCENE|ND_KEYINGSET, NULL);
/* Tool Settings */
- prop= RNA_def_property(srna, "tool_settings", PROP_POINTER, PROP_NONE);
+ prop= RNA_def_property(srna, "tool_settings", PROP_POINTER, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "toolsettings");
RNA_def_property_struct_type(prop, "ToolSettings");
RNA_def_property_ui_text(prop, "Tool Settings", "");
+
+ /* Unit Settings */
+ prop= RNA_def_property(srna, "unit_settings", PROP_POINTER, PROP_NEVER_NULL);
+ RNA_def_property_pointer_sdna(prop, NULL, "unit");
+ RNA_def_property_struct_type(prop, "UnitSettings");
+ RNA_def_property_ui_text(prop, "Unit Settings", "Unit editing settings");
/* Render Data */
- prop= RNA_def_property(srna, "render_data", PROP_POINTER, PROP_NONE);
+ prop= RNA_def_property(srna, "render_data", PROP_POINTER, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "r");
RNA_def_property_struct_type(prop, "SceneRenderData");
RNA_def_property_ui_text(prop, "Render Data", "");
@@ -1757,12 +1978,13 @@ void RNA_def_scene(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Timeline Markers", "Markers used in all timelines for the current scene.");
/* Game Settings */
- prop= RNA_def_property(srna, "game_data", PROP_POINTER, PROP_NONE);
+ prop= RNA_def_property(srna, "game_data", PROP_POINTER, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "gm");
RNA_def_property_struct_type(prop, "SceneGameData");
RNA_def_property_ui_text(prop, "Game Data", "");
rna_def_tool_settings(brna);
+ rna_def_unit_settings(brna);
rna_def_scene_render_data(brna);
rna_def_scene_game_data(brna);
rna_def_scene_render_layer(brna);
diff --git a/source/blender/makesrna/intern/rna_screen.c b/source/blender/makesrna/intern/rna_screen.c
index e3171d38932..7a243327bd1 100644
--- a/source/blender/makesrna/intern/rna_screen.c
+++ b/source/blender/makesrna/intern/rna_screen.c
@@ -71,9 +71,15 @@ static void rna_Screen_scene_update(bContext *C, PointerRNA *ptr)
}
}
+static int rna_Screen_animation_playing_get(PointerRNA *ptr)
+{
+ bScreen *sc= (bScreen*)ptr->data;
+ return (sc->animtimer != NULL);
+}
+
#else
-static void rna_def_scrarea(BlenderRNA *brna)
+static void rna_def_area(BlenderRNA *brna)
{
StructRNA *srna;
PropertyRNA *prop;
@@ -119,7 +125,7 @@ static void rna_def_region(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Region ID", "Uniqute ID for this region.");
}
-static void rna_def_bscreen(BlenderRNA *brna)
+static void rna_def_screen(BlenderRNA *brna)
{
StructRNA *srna;
PropertyRNA *prop;
@@ -139,12 +145,17 @@ static void rna_def_bscreen(BlenderRNA *brna)
RNA_def_property_collection_sdna(prop, NULL, "areabase", NULL);
RNA_def_property_struct_type(prop, "Area");
RNA_def_property_ui_text(prop, "Areas", "Areas the screen is subdivided into.");
+
+ prop= RNA_def_property(srna, "animation_playing", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_clear_flag(prop, PROP_EDITABLE);
+ RNA_def_property_boolean_funcs(prop, "rna_Screen_animation_playing_get", NULL);
+ RNA_def_property_ui_text(prop, "Animation Playing", "Animation playback is active.");
}
void RNA_def_screen(BlenderRNA *brna)
{
- rna_def_bscreen(brna);
- rna_def_scrarea(brna);
+ rna_def_screen(brna);
+ rna_def_area(brna);
rna_def_region(brna);
}
diff --git a/source/blender/makesrna/intern/rna_sculpt_paint.c b/source/blender/makesrna/intern/rna_sculpt_paint.c
index 1e512d8f9bb..c2c906e38f2 100644
--- a/source/blender/makesrna/intern/rna_sculpt_paint.c
+++ b/source/blender/makesrna/intern/rna_sculpt_paint.c
@@ -31,6 +31,8 @@
#include "DNA_scene_types.h"
+#include "BKE_paint.h"
+
#ifdef RNA_RUNTIME
static PointerRNA rna_ParticleEdit_brush_get(PointerRNA *ptr)
@@ -49,20 +51,67 @@ static PointerRNA rna_ParticleBrush_curve_get(PointerRNA *ptr)
return rna_pointer_inherit_refine(ptr, &RNA_CurveMapping, NULL);
}
+static void rna_Paint_brushes_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
+{
+ Paint *p= (Paint*)ptr->data;
+ rna_iterator_array_begin(iter, (void*)p->brushes, sizeof(Brush*), p->brush_count, 0, NULL);
+}
+
+static int rna_Paint_brushes_length(PointerRNA *ptr)
+{
+ Paint *p= (Paint*)ptr->data;
+
+ return p->brush_count;
+}
+
+static PointerRNA rna_Paint_active_brush_get(PointerRNA *ptr)
+{
+ return rna_pointer_inherit_refine(ptr, &RNA_Brush, paint_brush(ptr->data));
+}
+
+static void rna_Paint_active_brush_set(PointerRNA *ptr, PointerRNA value)
+{
+ paint_brush_set(ptr->data, value.data);
+}
+
#else
-static void rna_def_sculpt(BlenderRNA *brna)
+static void rna_def_paint(BlenderRNA *brna)
{
StructRNA *srna;
PropertyRNA *prop;
- srna= RNA_def_struct(brna, "Sculpt", NULL);
- RNA_def_struct_ui_text(srna, "Sculpt", "");
-
+ srna= RNA_def_struct(brna, "Paint", NULL);
+ RNA_def_struct_ui_text(srna, "Paint", "");
+
+ prop= RNA_def_property(srna, "brushes", PROP_COLLECTION, PROP_NONE);
+ RNA_def_property_struct_type(prop, "Brush");
+ RNA_def_property_collection_funcs(prop, "rna_Paint_brushes_begin",
+ "rna_iterator_array_next",
+ "rna_iterator_array_end",
+ "rna_iterator_array_dereference_get",
+ "rna_Paint_brushes_length", 0, 0, 0, 0);
+ RNA_def_property_ui_text(prop, "Brushes", "Brushes selected for this paint mode.");
+
+ prop= RNA_def_property(srna, "active_brush_index", PROP_INT, PROP_NONE);
+ RNA_def_property_range(prop, 0, INT_MAX);
+
+ /* Fake property to get active brush directly, rather than integer index */
prop= RNA_def_property(srna, "brush", PROP_POINTER, PROP_NONE);
RNA_def_property_struct_type(prop, "Brush");
- RNA_def_property_ui_text(prop, "Brush", "");
+ RNA_def_property_pointer_funcs(prop, "rna_Paint_active_brush_get", "rna_Paint_active_brush_set", NULL);
+ RNA_def_property_flag(prop, PROP_EDITABLE);
+ RNA_def_property_ui_text(prop, "Brush", "Active paint brush.");
+}
+
+static void rna_def_sculpt(BlenderRNA *brna)
+{
+ StructRNA *srna;
+ PropertyRNA *prop;
+ srna= RNA_def_struct(brna, "Sculpt", "Paint");
+ RNA_def_struct_ui_text(srna, "Sculpt", "");
+
prop= RNA_def_property(srna, "symmetry_x", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flags", SCULPT_SYMM_X);
RNA_def_property_ui_text(prop, "Symmetry X", "Mirror brush across the X axis.");
@@ -110,14 +159,10 @@ static void rna_def_vertex_paint(BlenderRNA *brna)
{6, "DARKEN", 0, "Darken", "Use darken blending mode while painting."},
{0, NULL, 0, NULL, NULL}};
- srna= RNA_def_struct(brna, "VertexPaint", NULL);
+ srna= RNA_def_struct(brna, "VertexPaint", "Paint");
RNA_def_struct_sdna(srna, "VPaint");
RNA_def_struct_ui_text(srna, "Vertex Paint", "Properties of vertex and weight paint mode.");
- prop= RNA_def_property(srna, "brush", PROP_POINTER, PROP_NONE);
- RNA_def_property_struct_type(prop, "Brush");
- RNA_def_property_ui_text(prop, "Brush", "");
-
prop= RNA_def_property(srna, "mode", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, prop_mode_items);
RNA_def_property_ui_text(prop, "Brush Mode", "Mode in which color is painted.");
@@ -159,14 +204,10 @@ static void rna_def_image_paint(BlenderRNA *brna)
{PAINT_TOOL_CLONE, "CLONE", 0, "Clone", ""},
{0, NULL, 0, NULL, NULL}};
- srna= RNA_def_struct(brna, "ImagePaint", NULL);
+ srna= RNA_def_struct(brna, "ImagePaint", "Paint");
RNA_def_struct_sdna(srna, "ImagePaintSettings");
RNA_def_struct_ui_text(srna, "Image Paint", "Properties of image and texture painting mode.");
- prop= RNA_def_property(srna, "brush", PROP_POINTER, PROP_NONE);
- RNA_def_property_struct_type(prop, "Brush");
- RNA_def_property_ui_text(prop, "Brush", "");
-
prop= RNA_def_property(srna, "tool", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, tool_items);
RNA_def_property_ui_text(prop, "Tool", "");
@@ -353,6 +394,7 @@ static void rna_def_particle_edit(BlenderRNA *brna)
void RNA_def_sculpt_paint(BlenderRNA *brna)
{
+ rna_def_paint(brna);
rna_def_sculpt(brna);
rna_def_vertex_paint(brna);
rna_def_image_paint(brna);
diff --git a/source/blender/makesrna/intern/rna_sequence.c b/source/blender/makesrna/intern/rna_sequence.c
index 8ca023dc57c..470909f4eff 100644
--- a/source/blender/makesrna/intern/rna_sequence.c
+++ b/source/blender/makesrna/intern/rna_sequence.c
@@ -192,10 +192,8 @@ static StructRNA* rna_Sequence_refine(struct PointerRNA *ptr)
case SEQ_SCENE:
return &RNA_SceneSequence;
case SEQ_MOVIE:
- case SEQ_MOVIE_AND_HD_SOUND:
return &RNA_MovieSequence;
- case SEQ_RAM_SOUND:
- case SEQ_HD_SOUND:
+ case SEQ_SOUND:
return &RNA_SoundSequence;
case SEQ_CROSS:
case SEQ_ADD:
@@ -362,9 +360,7 @@ static void rna_def_sequence(BlenderRNA *brna)
{SEQ_META, "META", 0, "Meta", ""},
{SEQ_SCENE, "SCENE", 0, "Scene", ""},
{SEQ_MOVIE, "MOVIE", 0, "Movie", ""},
- {SEQ_RAM_SOUND, "RAM_SOUND", 0, "Ram Sound", ""},
- {SEQ_HD_SOUND, "HD_SOUND", 0, "HD Sound", ""},
- {SEQ_MOVIE_AND_HD_SOUND, "MOVIE_AND_HD_SOUND", 0, "Movie and HD Sound", ""},
+ {SEQ_SOUND, "_SOUND", 0, "Sound", ""},
{SEQ_EFFECT, "REPLACE", 0, "Replace", ""},
{SEQ_CROSS, "CROSS", 0, "Cross", ""},
{SEQ_ADD, "ADD", 0, "Add", ""},
@@ -442,38 +438,39 @@ static void rna_def_sequence(BlenderRNA *brna)
/* strip positioning */
- prop= RNA_def_property(srna, "length", PROP_INT, PROP_UNSIGNED);
+ prop= RNA_def_property(srna, "length", PROP_INT, PROP_TIME);
RNA_def_property_int_sdna(prop, NULL, "len");
RNA_def_property_range(prop, 1, MAXFRAME);
RNA_def_property_ui_text(prop, "Length", "The length of the contents of this strip before the handles are applied");
RNA_def_property_int_funcs(prop, "rna_SequenceEditor_length_get", "rna_SequenceEditor_length_set",NULL);
-
- prop= RNA_def_property(srna, "start_frame", PROP_INT, PROP_UNSIGNED);
+ RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, NULL);
+
+ prop= RNA_def_property(srna, "start_frame", PROP_INT, PROP_TIME);
RNA_def_property_int_sdna(prop, NULL, "start");
RNA_def_property_ui_text(prop, "Start Frame", "");
RNA_def_property_int_funcs(prop, NULL, "rna_SequenceEditor_start_frame_set",NULL); // overlap tests and calc_seq_disp
RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, NULL);
- prop= RNA_def_property(srna, "start_offset", PROP_INT, PROP_UNSIGNED);
+ prop= RNA_def_property(srna, "start_offset", PROP_INT, PROP_TIME);
RNA_def_property_int_sdna(prop, NULL, "startofs");
RNA_def_property_clear_flag(prop, PROP_EDITABLE); // overlap tests
RNA_def_property_ui_text(prop, "Start Offset", "");
RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, NULL);
- prop= RNA_def_property(srna, "end_offset", PROP_INT, PROP_UNSIGNED);
+ prop= RNA_def_property(srna, "end_offset", PROP_INT, PROP_TIME);
RNA_def_property_int_sdna(prop, NULL, "endofs");
RNA_def_property_clear_flag(prop, PROP_EDITABLE); // overlap tests
RNA_def_property_ui_text(prop, "End offset", "");
RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, NULL);
- prop= RNA_def_property(srna, "start_still", PROP_INT, PROP_UNSIGNED);
+ prop= RNA_def_property(srna, "start_still", PROP_INT, PROP_TIME);
RNA_def_property_int_sdna(prop, NULL, "startstill");
RNA_def_property_clear_flag(prop, PROP_EDITABLE); // overlap tests
RNA_def_property_range(prop, 0, MAXFRAME);
RNA_def_property_ui_text(prop, "Start Still", "");
RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, NULL);
- prop= RNA_def_property(srna, "end_still", PROP_INT, PROP_UNSIGNED);
+ prop= RNA_def_property(srna, "end_still", PROP_INT, PROP_TIME);
RNA_def_property_int_sdna(prop, NULL, "endstill");
RNA_def_property_clear_flag(prop, PROP_EDITABLE); // overlap tests
RNA_def_property_range(prop, 0, MAXFRAME);
@@ -616,21 +613,6 @@ static void rna_def_filter_video(StructRNA *srna)
RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, NULL);
}
-static void rna_def_filter_sound(StructRNA *srna)
-{
- PropertyRNA *prop;
-
- prop= RNA_def_property(srna, "sound_gain", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "level");
- RNA_def_property_range(prop, -96.0f, 6.0f);
- RNA_def_property_ui_text(prop, "Sound Gain", "Sound level in dB (0 = full volume).");
-
- prop= RNA_def_property(srna, "sound_pan", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "pan");
- RNA_def_property_range(prop, -1.0f, 1.0f);
- RNA_def_property_ui_text(prop, "Sound Pan", "Stereo sound balance.");
-}
-
static void rna_def_proxy(StructRNA *srna)
{
PropertyRNA *prop;
@@ -657,11 +639,13 @@ static void rna_def_input(StructRNA *srna)
RNA_def_property_int_sdna(prop, NULL, "anim_startofs");
RNA_def_property_clear_flag(prop, PROP_EDITABLE); // overlap test
RNA_def_property_ui_text(prop, "Animation Start Offset", "Animation start offset (trim start).");
+ RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, NULL);
prop= RNA_def_property(srna, "animation_end_offset", PROP_INT, PROP_UNSIGNED);
RNA_def_property_int_sdna(prop, NULL, "anim_endofs");
RNA_def_property_clear_flag(prop, PROP_EDITABLE); // overlap test
RNA_def_property_ui_text(prop, "Animation End Offset", "Animation end offset (trim end).");
+ RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, NULL);
}
static void rna_def_image(BlenderRNA *brna)
@@ -761,7 +745,7 @@ static void rna_def_sound(BlenderRNA *brna)
RNA_def_struct_sdna(srna, "Sequence");
prop= RNA_def_property(srna, "sound", PROP_POINTER, PROP_NONE);
- RNA_def_property_struct_type(prop, "UnknownType");
+ RNA_def_property_struct_type(prop, "Sound");
RNA_def_property_ui_text(prop, "Sound", "Sound datablock used by this sequence (RAM audio only).");
prop= RNA_def_property(srna, "filename", PROP_STRING, PROP_FILEPATH);
@@ -772,7 +756,6 @@ static void rna_def_sound(BlenderRNA *brna)
RNA_def_property_string_sdna(prop, NULL, "strip->dir");
RNA_def_property_ui_text(prop, "Directory", "");
- rna_def_filter_sound(srna);
rna_def_input(srna);
}
@@ -833,21 +816,25 @@ static void rna_def_wipe(BlenderRNA *brna)
RNA_def_property_float_sdna(prop, NULL, "edgeWidth");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Blur Width", "Width of the blur edge, in percentage relative to the image size.");
+ RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, NULL);
prop= RNA_def_property(srna, "angle", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "angle");
RNA_def_property_range(prop, -90.0f, 90.0f);
RNA_def_property_ui_text(prop, "Angle", "Edge angle.");
+ RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, NULL);
prop= RNA_def_property(srna, "direction", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "forward");
RNA_def_property_enum_items(prop, wipe_direction_items);
RNA_def_property_ui_text(prop, "Direction", "Wipe direction.");
+ RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, NULL);
prop= RNA_def_property(srna, "transition_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "wipetype");
RNA_def_property_enum_items(prop, wipe_type_items);
RNA_def_property_ui_text(prop, "Transition Type", "");
+ RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, NULL);
}
static void rna_def_glow(BlenderRNA *brna)
@@ -863,30 +850,36 @@ static void rna_def_glow(BlenderRNA *brna)
RNA_def_property_float_sdna(prop, NULL, "fMini");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Threshold", "Minimum intensity to trigger a glow");
+ RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, NULL);
prop= RNA_def_property(srna, "clamp", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "fClamp");
RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_ui_text(prop, "Clamp", "rightness limit of intensity.");
+ RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, NULL);
prop= RNA_def_property(srna, "boost_factor", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "fBoost");
RNA_def_property_range(prop, 0.0f, 10.0f);
RNA_def_property_ui_text(prop, "Boost Factor", "Brightness multiplier.");
+ RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, NULL);
prop= RNA_def_property(srna, "blur_distance", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "dDist");
RNA_def_property_range(prop, 0.5f, 20.0f);
RNA_def_property_ui_text(prop, "Blur Distance", "Radius of glow effect.");
+ RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, NULL);
prop= RNA_def_property(srna, "quality", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "dQuality");
RNA_def_property_range(prop, 1, 5);
RNA_def_property_ui_text(prop, "Quality", "Accuracy of the blur effect.");
+ RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, NULL);
prop= RNA_def_property(srna, "only_boost", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "bNoComp", 0);
RNA_def_property_ui_text(prop, "Only Boost", "Show the glow buffer only.");
+ RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, NULL);
}
static void rna_def_transform(BlenderRNA *brna)
@@ -915,60 +908,72 @@ static void rna_def_transform(BlenderRNA *brna)
RNA_def_property_float_sdna(prop, NULL, "ScalexIni");
RNA_def_property_ui_text(prop, "Scale Start X", "");
RNA_def_property_ui_range(prop, 0, 10, 3, 10);
+ RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, NULL);
prop= RNA_def_property(srna, "scale_start_y", PROP_FLOAT, PROP_UNSIGNED);
RNA_def_property_float_sdna(prop, NULL, "ScaleyIni");
RNA_def_property_ui_text(prop, "Scale Start Y", "");
RNA_def_property_ui_range(prop, 0, 10, 3, 10);
-
+ RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, NULL);
+
prop= RNA_def_property(srna, "scale_end_x", PROP_FLOAT, PROP_UNSIGNED);
RNA_def_property_float_sdna(prop, NULL, "ScalexFin");
RNA_def_property_ui_text(prop, "Scale End X", "");
RNA_def_property_ui_range(prop, 0, 10, 3, 10);
+ RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, NULL);
prop= RNA_def_property(srna, "scale_end_y", PROP_FLOAT, PROP_UNSIGNED);
RNA_def_property_float_sdna(prop, NULL, "ScaleyFin");
RNA_def_property_ui_text(prop, "Scale End Y", "");
RNA_def_property_ui_range(prop, 0, 10, 3, 10);
+ RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, NULL);
prop= RNA_def_property(srna, "translate_start_x", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "xIni");
RNA_def_property_ui_text(prop, "Translate Start X", "");
RNA_def_property_ui_range(prop, -500.0f, 500.0f, 3, 10);
-
+ RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, NULL);
+
prop= RNA_def_property(srna, "translate_start_y", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "yIni");
RNA_def_property_ui_text(prop, "Translate Start Y", "");
RNA_def_property_ui_range(prop, -500.0f, 500.0f, 3, 10);
-
+ RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, NULL);
+
prop= RNA_def_property(srna, "translate_end_x", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "xFin");
RNA_def_property_ui_text(prop, "Translate End X", "");
RNA_def_property_ui_range(prop, -500.0f, 500.0f, 3, 10);
+ RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, NULL);
prop= RNA_def_property(srna, "translate_end_y", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "yFin");
RNA_def_property_ui_text(prop, "Translate End Y", "");
RNA_def_property_ui_range(prop, -500.0f, 500.0f, 3, 10);
+ RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, NULL);
prop= RNA_def_property(srna, "rotation_start", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "rotIni");
RNA_def_property_range(prop, 0.0f, 360.0f);
RNA_def_property_ui_text(prop, "Rotation Start", "");
+ RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, NULL);
prop= RNA_def_property(srna, "rotation_end", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "rotFin");
RNA_def_property_range(prop, 0.0f, 360.0f);
RNA_def_property_ui_text(prop, "Rotation End", "");
+ RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, NULL);
prop= RNA_def_property(srna, "translation_unit", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "percent");
RNA_def_property_enum_items(prop, translation_unit_items);
RNA_def_property_ui_text(prop, "Translation Unit", "");
+ RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, NULL);
prop= RNA_def_property(srna, "interpolation", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, interpolation_items);
RNA_def_property_ui_text(prop, "Interpolation", "");
+ RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, NULL);
}
static void rna_def_solid_color(BlenderRNA *brna)
diff --git a/source/blender/makesrna/intern/rna_smoke.c b/source/blender/makesrna/intern/rna_smoke.c
index cedbc992dde..6f1babb495a 100644
--- a/source/blender/makesrna/intern/rna_smoke.c
+++ b/source/blender/makesrna/intern/rna_smoke.c
@@ -118,7 +118,9 @@ static void rna_def_smoke_domain_settings(BlenderRNA *brna)
static EnumPropertyItem prop_noise_type_items[] = {
{MOD_SMOKE_NOISEWAVE, "NOISEWAVE", 0, "Wavelet", ""},
- /* {MOD_SMOKE_NOISEFFT, "NOISEFFT", 0, "FFT", ""}, */
+#if FFTW3 == 1
+ {MOD_SMOKE_NOISEFFT, "NOISEFFT", 0, "FFT", ""},
+#endif
/* {MOD_SMOKE_NOISECURL, "NOISECURL", 0, "Curl", ""}, */
{0, NULL, 0, NULL, NULL}};
@@ -150,8 +152,13 @@ static void rna_def_smoke_domain_settings(BlenderRNA *brna)
prop= RNA_def_property(srna, "highres", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flags", MOD_SMOKE_HIGHRES);
- RNA_def_property_ui_text(prop, "High res", "Show high resolution (using amplification).");
- RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, NULL);
+ RNA_def_property_ui_text(prop, "High res", "Enable high resolution (using amplification).");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Smoke_reset");
+
+ prop= RNA_def_property(srna, "viewhighres", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "viewsettings", MOD_SMOKE_VIEW_USEBIG);
+ RNA_def_property_ui_text(prop, "Show High Resolution", "Show high resolution (using amplification).");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Smoke_redraw");
prop= RNA_def_property(srna, "noise_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "noise");
@@ -171,14 +178,14 @@ static void rna_def_smoke_domain_settings(BlenderRNA *brna)
RNA_def_property_range(prop, -5.0, 5.0);
RNA_def_property_ui_range(prop, -5.0, 5.0, 0.02, 5);
RNA_def_property_ui_text(prop, "Gravity", "Higher value results in sinking smoke");
- RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, NULL);
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Smoke_reset");
prop= RNA_def_property(srna, "beta", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "beta");
RNA_def_property_range(prop, -5.0, 5.0);
RNA_def_property_ui_range(prop, -5.0, 5.0, 0.02, 5);
RNA_def_property_ui_text(prop, "Heat", "Higher value results in faster rising smoke.");
- RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, NULL);
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Smoke_reset");
prop= RNA_def_property(srna, "coll_group", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "coll_group");
@@ -200,6 +207,30 @@ static void rna_def_smoke_domain_settings(BlenderRNA *brna)
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Effector Group", "Limit effectors to this group.");
RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Smoke_reset_dependancy");
+
+ prop= RNA_def_property(srna, "strength", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "strength");
+ RNA_def_property_range(prop, 1.0, 10.0);
+ RNA_def_property_ui_range(prop, 1.0, 10.0, 1, 2);
+ RNA_def_property_ui_text(prop, "Strength", "Strength of wavelet noise");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Smoke_reset");
+
+ prop= RNA_def_property(srna, "dissolve_speed", PROP_INT, PROP_NONE);
+ RNA_def_property_int_sdna(prop, NULL, "diss_speed");
+ RNA_def_property_range(prop, 1.0, 100.0);
+ RNA_def_property_ui_range(prop, 1.0, 1000.0, 1, 0);
+ RNA_def_property_ui_text(prop, "Dissolve Speed", "Dissolve Speed");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, NULL);
+
+ prop= RNA_def_property(srna, "dissolve_smoke", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flags", MOD_SMOKE_DISSOLVE);
+ RNA_def_property_ui_text(prop, "Dissolve Smoke", "Enable smoke to disappear over time.");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, NULL);
+
+ prop= RNA_def_property(srna, "dissolve_smoke_log", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flags", MOD_SMOKE_DISSOLVE_LOG);
+ RNA_def_property_ui_text(prop, "Logarithmic dissolve", "Using 1/x ");
+ RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, NULL);
}
static void rna_def_smoke_flow_settings(BlenderRNA *brna)
diff --git a/source/blender/makesrna/intern/rna_sound.c b/source/blender/makesrna/intern/rna_sound.c
index 363a5595b43..a029ef85544 100644
--- a/source/blender/makesrna/intern/rna_sound.c
+++ b/source/blender/makesrna/intern/rna_sound.c
@@ -36,96 +36,6 @@
#else
-/* sample and listener are internal .. */
-
-#if 0
-static void rna_def_sample(BlenderRNA *brna)
-{
- StructRNA *srna;
- PropertyRNA *prop;
-
- /* sound types */
- static EnumPropertyItem prop_sample_type_items[] = {
- {SAMPLE_INVALID, "INVALID", 0, "Invalid", ""},
- {SAMPLE_UNKNOWN, "UNKNOWN", 0, "Unknown", ""},
- {SAMPLE_RAW, "RAW", 0, "Raw", ""},
- {SAMPLE_WAV, "WAV", 0, "WAV", "Uncompressed"},
- {SAMPLE_MP2, "MP2", 0, "MP2", "MPEG-1 Audio Layer 2"},
- {SAMPLE_MP3, "MP3", 0, "MP3", "MPEG-1 Audio Layer 3"},
- {SAMPLE_OGG_VORBIS, "OGG_VORBIS", 0, "Ogg Vorbis", ""},
- {SAMPLE_WMA, "WMA", 0, "WMA", "Windows Media Audio"},
- {SAMPLE_ASF, "ASF", 0, "ASF", "Windows Advanced Systems Format"},
- {SAMPLE_AIFF, "AIFF", 0, "AIFF", "Audio Interchange File Format"},
- {0, NULL, 0, NULL, NULL}};
-
- srna= RNA_def_struct(brna, "SoundSample", "ID");
- RNA_def_struct_sdna(srna, "bSample");
- RNA_def_struct_ui_text(srna, "SoundSample", "Sound data loaded from a sound datablock.");
-
- prop= RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_items(prop, prop_sample_type_items);
- RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- RNA_def_property_ui_text(prop, "Types", "");
-
- prop= RNA_def_property(srna, "filename", PROP_STRING, PROP_FILEPATH);
- RNA_def_property_string_sdna(prop, NULL, "name");
- RNA_def_property_clear_flag(prop, PROP_EDITABLE);
- RNA_def_property_ui_text(prop, "Filename", "Full path filename of the sample");
-
- prop= RNA_def_property(srna, "length", PROP_INT, PROP_UNSIGNED);
- RNA_def_property_int_sdna(prop, NULL, "len");
- RNA_def_property_ui_text(prop, "Length", "The length of sample in seconds");
- RNA_def_property_clear_flag(prop, PROP_EDITABLE);
-
- prop= RNA_def_property(srna, "rate", PROP_INT, PROP_UNSIGNED);
- RNA_def_property_ui_text(prop, "Rate", "Sample rate in kHz");
- RNA_def_property_clear_flag(prop, PROP_EDITABLE);
-
- prop= RNA_def_property(srna, "bits", PROP_INT, PROP_UNSIGNED);
- RNA_def_property_ui_text(prop, "Bits", "Bit-depth of sample");
- RNA_def_property_clear_flag(prop, PROP_EDITABLE);
-
- prop= RNA_def_property(srna, "channels", PROP_INT, PROP_UNSIGNED);
- RNA_def_property_ui_text(prop, "Channels", "Number of channels (mono=1; stereo=2)");
- RNA_def_property_clear_flag(prop, PROP_EDITABLE);
-}
-
-static void rna_def_soundlistener(BlenderRNA *brna)
-{
-
- StructRNA *srna;
- PropertyRNA *prop;
-
- srna= RNA_def_struct(brna, "SoundListener", "ID");
- RNA_def_struct_sdna(srna, "bSoundListener");
- RNA_def_struct_ui_text(srna, "Sound Listener", "Sound listener defining parameters about how sounds are played.");
-
- prop= RNA_def_property(srna, "gain", PROP_FLOAT, PROP_NONE);
- RNA_def_property_ui_text(prop, "Gain", "Overall volume for Game Engine sound.");
- RNA_def_property_ui_range(prop, 0.0, 1.0, 10, 4);
-
- prop= RNA_def_property(srna, "doppler_factor", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "dopplerfactor");
- RNA_def_property_ui_text(prop, "Doppler Factor", "Amount of Doppler effect in Game Engine sound.");
- RNA_def_property_ui_range(prop, 0.0, 10.0, 1, 4);
-
- prop= RNA_def_property(srna, "doppler_velocity", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "dopplervelocity");
- RNA_def_property_ui_text(prop, "Doppler Velocity", "The speed of sound in the Game Engine.");
- RNA_def_property_ui_range(prop, 0.0, 10000.0, 0.1, 4);
-
- prop= RNA_def_property(srna, "num_sounds_blender", PROP_INT, PROP_UNSIGNED);
- RNA_def_property_int_sdna(prop, NULL, "numsoundsblender");
- RNA_def_property_ui_text(prop, "Total Sounds in Blender", "The total number of sounds currently linked and available.");
- RNA_def_property_clear_flag(prop, PROP_EDITABLE);
-
- prop= RNA_def_property(srna, "num_sounds_gameengine", PROP_INT, PROP_UNSIGNED);
- RNA_def_property_int_sdna(prop, NULL, "numsoundsgameengine");
- RNA_def_property_ui_text(prop, "Total Sounds in Game Engine", "The total number of sounds in the Game Engine.");
- RNA_def_property_clear_flag(prop, PROP_EDITABLE);
-}
-#endif
-
static void rna_def_sound(BlenderRNA *brna)
{
StructRNA *srna;
@@ -138,10 +48,6 @@ static void rna_def_sound(BlenderRNA *brna)
//rna_def_ipo_common(srna);
- /*prop= RNA_def_property(srna, "sample", PROP_POINTER, PROP_NONE);
- RNA_def_property_struct_type(prop, "SoundSample");
- RNA_def_property_ui_text(prop, "Sample", "Sound sample.");*/
-
prop= RNA_def_property(srna, "filename", PROP_STRING, PROP_FILEPATH);
RNA_def_property_string_sdna(prop, NULL, "name");
RNA_def_property_ui_text(prop, "Filename", "Sound sample file used by this Sound datablock.");
@@ -149,77 +55,10 @@ static void rna_def_sound(BlenderRNA *brna)
prop= RNA_def_property(srna, "packed_file", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "packedfile");
RNA_def_property_ui_text(prop, "Packed File", "");
-
- /* game engine settings */
- prop= RNA_def_property(srna, "volume", PROP_FLOAT, PROP_UNSIGNED);
- RNA_def_property_float_sdna(prop, NULL, "volume");
- RNA_def_property_ui_range(prop, 0.0, 1.0, 10, 4);
- RNA_def_property_ui_text(prop, "Volume", "Game engine only: volume for this sound.");
-
- prop= RNA_def_property(srna, "pitch", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "pitch");
- RNA_def_property_ui_range(prop, -12.0, 12.0, 10, 4);
- RNA_def_property_ui_text(prop, "Pitch", "Game engine only: set the pitch of this sound.");
-
- prop= RNA_def_property(srna, "loop", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "flags", SOUND_FLAGS_LOOP);
- RNA_def_property_ui_text(prop, "Sound Loop", "Game engine only: toggle between looping on/off.");
-
- prop= RNA_def_property(srna, "ping_pong", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "flags", SOUND_FLAGS_BIDIRECTIONAL_LOOP);
- RNA_def_property_ui_text(prop, "Ping Pong", "Game engine only: Toggle between A->B and A->B->A looping.");
-
- prop= RNA_def_property(srna, "sound_3d", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "flags", SOUND_FLAGS_3D);
- RNA_def_property_ui_text(prop, "3D Sound", "Game engine only: turns 3D sound on.");
-
- prop= RNA_def_property(srna, "attenuation", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "attenuation");
- RNA_def_property_range(prop, 0.0, 5.0);
- RNA_def_property_ui_text(prop, "Attenuation", "Game engine only: sets the surround scaling factor for 3D sound.");
-
- /* gain */
- prop= RNA_def_property(srna, "min_gain", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "min_gain");
- RNA_def_property_range(prop, 0.0, 1.0);
- RNA_def_property_ui_text(prop, "Min Gain", "Minimal gain which is always guaranteed for this sound.");
-
- prop= RNA_def_property(srna, "max_gain", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "max_gain");
- RNA_def_property_range(prop, 0.0, 1.0);
- RNA_def_property_ui_text(prop, "Max Gain", "Maximal gain which is always guaranteed for this sound.");
-
- prop= RNA_def_property(srna, "reference_distance", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "distance");
- RNA_def_property_ui_text(prop, "Reference Distance", "Reference distance at which the listener will experience gain.");
- RNA_def_property_ui_range(prop, 0.0, 1000.0, 10, 4); /* NOT used anywhere */
-
- /* unused
- prop= RNA_def_property(srna, "panning", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "panning");
- RNA_def_property_ui_range(prop, -1.0, 1.0, 10, 4);
- RNA_def_property_ui_text(prop, "Panning", "Pan the sound from left to right"); */
-
- /* unused
- prop= RNA_def_property(srna, "fixed_volume", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "flags", SOUND_FLAGS_FIXED_VOLUME);
- RNA_def_property_ui_text(prop, "Fixed Volume", "Constraint sound to fixed volume."); */
-
- /* unused
- prop= RNA_def_property(srna, "fixed_panning", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "flags", SOUND_FLAGS_FIXED_PANNING);
- RNA_def_property_ui_text(prop, "Fixed Panning", "Constraint sound to fixed panning."); */
-
- /* unused
- prop= RNA_def_property(srna, "priority", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "flags", SOUND_FLAGS_PRIORITY);
- RNA_def_property_ui_text(prop, "Priority", "Make sound higher priority."); */
}
void RNA_def_sound(BlenderRNA *brna)
{
- //rna_def_sample(brna);
- //rna_def_soundlistener(brna);
rna_def_sound(brna);
}
diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c
index 793970dea49..be0707390c4 100644
--- a/source/blender/makesrna/intern/rna_space.c
+++ b/source/blender/makesrna/intern/rna_space.c
@@ -33,10 +33,13 @@
#include "rna_internal.h"
#include "DNA_action_types.h"
+#include "DNA_node_types.h"
#include "DNA_object_types.h"
#include "DNA_space_types.h"
#include "DNA_view3d_types.h"
+#include "BKE_paint.h"
+
#include "WM_types.h"
EnumPropertyItem space_type_items[] = {
@@ -44,10 +47,10 @@ EnumPropertyItem space_type_items[] = {
{SPACE_VIEW3D, "VIEW_3D", 0, "3D View", ""},
{SPACE_IPO, "GRAPH_EDITOR", 0, "Graph Editor", ""},
{SPACE_OUTLINER, "OUTLINER", 0, "Outliner", ""},
- {SPACE_BUTS, "BUTTONS_WINDOW", 0, "Buttons Window", ""},
+ {SPACE_BUTS, "PROPERTIES", 0, "Properties", ""},
{SPACE_FILE, "FILE_BROWSER", 0, "File Browser", ""},
{SPACE_IMAGE, "IMAGE_EDITOR", 0, "Image Editor", ""},
- {SPACE_INFO, "USER_PREFERENCES", 0, "User Preferences", ""},
+ {SPACE_INFO, "INFO", 0, "Info", ""},
{SPACE_SEQ, "SEQUENCE_EDITOR", 0, "Sequence Editor", ""},
{SPACE_TEXT, "TEXT_EDITOR", 0, "Text Editor", ""},
//{SPACE_IMASEL, "IMAGE_BROWSER", 0, "Image Browser", ""},
@@ -59,6 +62,7 @@ EnumPropertyItem space_type_items[] = {
{SPACE_NODE, "NODE_EDITOR", 0, "Node Editor", ""},
{SPACE_LOGIC, "LOGIC_EDITOR", 0, "Logic Editor", ""},
{SPACE_CONSOLE, "CONSOLE", 0, "Console", ""},
+ {SPACE_USERPREF, "USER_PREFERENCES", 0, "User Preferences", ""},
{0, NULL, 0, NULL, NULL}};
#define DC_RGB {0, "COLOR", ICON_IMAGE_RGB, "Color", "Draw image with RGB colors."}
@@ -83,6 +87,7 @@ static EnumPropertyItem dc_all_items[] = {DC_RGB, DC_RGBA, DC_ALPHA, DC_Z, DC_LC
#include "BKE_context.h"
#include "ED_image.h"
+#include "ED_screen.h"
#include "IMB_imbuf_types.h"
@@ -98,13 +103,13 @@ static StructRNA* rna_Space_refine(struct PointerRNA *ptr)
case SPACE_OUTLINER:
return &RNA_SpaceOutliner;
case SPACE_BUTS:
- return &RNA_SpaceButtonsWindow;
+ return &RNA_SpaceProperties;
case SPACE_FILE:
return &RNA_SpaceFileBrowser;
case SPACE_IMAGE:
return &RNA_SpaceImageEditor;
- /*case SPACE_INFO:
- return &RNA_SpaceUserPreferences;*/
+ case SPACE_INFO:
+ return &RNA_SpaceInfo;
case SPACE_SEQ:
return &RNA_SpaceSequenceEditor;
case SPACE_TEXT:
@@ -118,15 +123,17 @@ static StructRNA* rna_Space_refine(struct PointerRNA *ptr)
case SPACE_NLA:
return &RNA_SpaceNLA;
/*case SPACE_SCRIPT:
- return &RNA_SpaceScriptsWindow;
+ return &RNA_SpaceScriptsWindow;*/
case SPACE_TIME:
return &RNA_SpaceTimeline;
case SPACE_NODE:
return &RNA_SpaceNodeEditor;
case SPACE_LOGIC:
- return &RNA_SpaceLogicEditor;*/
+ return &RNA_SpaceLogicEditor;
case SPACE_CONSOLE:
return &RNA_SpaceConsole;
+ case SPACE_USERPREF:
+ return &RNA_SpaceUserPreferences;
default:
return &RNA_Space;
}
@@ -144,7 +151,7 @@ static void rna_SpaceImageEditor_paint_update(bContext *C, PointerRNA *ptr)
Scene *scene= CTX_data_scene(C);
if(scene)
- brush_check_exists(&scene->toolsettings->imapaint.brush);
+ paint_init(&scene->toolsettings->imapaint.paint, "Brush");
}
static int rna_SpaceImageEditor_show_render_get(PointerRNA *ptr)
@@ -227,9 +234,9 @@ void rna_SpaceFileBrowser_params_set(PointerRNA *ptr, PointerRNA value)
sfile->params= value.data;
}
-/* Space Buttons */
+/* Space Properties */
-StructRNA *rna_SpaceButtonsWindow_pin_id_typef(PointerRNA *ptr)
+StructRNA *rna_SpaceProperties_pin_id_typef(PointerRNA *ptr)
{
SpaceButs *sbuts= (SpaceButs*)(ptr->data);
@@ -239,7 +246,7 @@ StructRNA *rna_SpaceButtonsWindow_pin_id_typef(PointerRNA *ptr)
return &RNA_ID;
}
-void rna_SpaceButtonsWindow_align_set(PointerRNA *ptr, int value)
+void rna_SpaceProperties_align_set(PointerRNA *ptr, int value)
{
SpaceButs *sbuts= (SpaceButs*)(ptr->data);
@@ -303,6 +310,13 @@ static void rna_View3D_display_background_image_set(PointerRNA *ptr, int value)
}
}
+/* Space Time */
+static void rna_SpaceTime_redraw_update(bContext *C, PointerRNA *ptr)
+{
+ SpaceTime *st= (SpaceTime*)ptr->data;
+ ED_screen_animation_timer_update(C, st->redraws);
+}
+
#else
static void rna_def_space(BlenderRNA *brna)
@@ -509,11 +523,11 @@ static void rna_def_space_3dview(BlenderRNA *brna)
PropertyRNA *prop;
static EnumPropertyItem viewport_shading_items[] = {
- {OB_BOUNDBOX, "BOUNDBOX", 0, "Bounding Box", "Display the object's local bounding boxes only"},
- {OB_WIRE, "WIREFRAME", 0, "Wireframe", "Display the object as wire edges"},
- {OB_SOLID, "SOLID", 0, "Solid", "Display the object solid, lit with default OpenGL lights"},
- {OB_SHADED, "SHADED", 0, "Shaded", "Display the object solid, with preview shading interpolated at vertices"},
- {OB_TEXTURE, "TEXTURED", 0, "Textured", "Display the object solid, with face-assigned textures"},
+ {OB_BOUNDBOX, "BOUNDBOX", ICON_BBOX, "Bounding Box", "Display the object's local bounding boxes only"},
+ {OB_WIRE, "WIREFRAME", ICON_WIRE, "Wireframe", "Display the object as wire edges"},
+ {OB_SOLID, "SOLID", ICON_SOLID, "Solid", "Display the object solid, lit with default OpenGL lights"},
+ {OB_SHADED, "SHADED", ICON_SMOOTH, "Shaded", "Display the object solid, with preview shading interpolated at vertices"},
+ {OB_TEXTURE, "TEXTURED", ICON_POTATO, "Textured", "Display the object solid, with face-assigned textures"},
{0, NULL, 0, NULL, NULL}};
static EnumPropertyItem pivot_items[] = {
@@ -564,19 +578,19 @@ static void rna_def_space_3dview(BlenderRNA *brna)
RNA_def_property_range(prop, 1.0f, 250.0f);
RNA_def_property_update(prop, NC_WINDOW, NULL);
- prop= RNA_def_property(srna, "clip_start", PROP_FLOAT, PROP_NONE);
+ prop= RNA_def_property(srna, "clip_start", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "near");
RNA_def_property_range(prop, 0.0f, FLT_MAX);
RNA_def_property_ui_text(prop, "Clip Start", "3D View near clipping distance.");
RNA_def_property_update(prop, NC_WINDOW, NULL);
- prop= RNA_def_property(srna, "clip_end", PROP_FLOAT, PROP_NONE);
+ prop= RNA_def_property(srna, "clip_end", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "far");
RNA_def_property_range(prop, 1.0f, FLT_MAX);
RNA_def_property_ui_text(prop, "Clip End", "3D View far clipping distance.");
RNA_def_property_update(prop, NC_WINDOW, NULL);
- prop= RNA_def_property(srna, "grid_spacing", PROP_FLOAT, PROP_NONE);
+ prop= RNA_def_property(srna, "grid_spacing", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "grid");
RNA_def_property_ui_text(prop, "Grid Spacing", "The distance between 3D View grid lines.");
RNA_def_property_range(prop, 0.0f, FLT_MAX);
@@ -708,9 +722,9 @@ static void rna_def_space_buttons(BlenderRNA *brna)
{BUT_VERTICAL, "VERTICAL", 0, "Vertical", ""},
{0, NULL, 0, NULL, NULL}};
- srna= RNA_def_struct(brna, "SpaceButtonsWindow", "Space");
+ srna= RNA_def_struct(brna, "SpaceProperties", "Space");
RNA_def_struct_sdna(srna, "SpaceButs");
- RNA_def_struct_ui_text(srna, "Buttons Space", "Buttons Window space data");
+ RNA_def_struct_ui_text(srna, "Properties Space", "Properties space data");
prop= RNA_def_property(srna, "context", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "mainb");
@@ -721,7 +735,7 @@ static void rna_def_space_buttons(BlenderRNA *brna)
prop= RNA_def_property(srna, "align", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "align");
RNA_def_property_enum_items(prop, align_items);
- RNA_def_property_enum_funcs(prop, NULL, "rna_SpaceButtonsWindow_align_set", NULL);
+ RNA_def_property_enum_funcs(prop, NULL, "rna_SpaceProperties_align_set", NULL);
RNA_def_property_ui_text(prop, "Align", "Arrangement of the panels.");
RNA_def_property_update(prop, NC_WINDOW, NULL);
@@ -734,7 +748,7 @@ static void rna_def_space_buttons(BlenderRNA *brna)
prop= RNA_def_property(srna, "pin_id", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "pinid");
RNA_def_property_struct_type(prop, "ID");
- RNA_def_property_pointer_funcs(prop, NULL, NULL, "rna_SpaceButtonsWindow_pin_id_typef");
+ RNA_def_property_pointer_funcs(prop, NULL, NULL, "rna_SpaceProperties_pin_id_typef");
RNA_def_property_flag(prop, PROP_EDITABLE);
}
@@ -836,11 +850,11 @@ static void rna_def_space_sequencer(BlenderRNA *brna)
PropertyRNA *prop;
static EnumPropertyItem display_mode_items[] = {
- {SEQ_DRAW_SEQUENCE, "SEQUENCER", 0, "Sequencer", ""},
- {SEQ_DRAW_IMG_IMBUF, "IMAGE", 0, "Image Preview", ""},
- {SEQ_DRAW_IMG_WAVEFORM, "WAVEFORM", 0, "Luma Waveform", ""},
- {SEQ_DRAW_IMG_VECTORSCOPE, "VECTOR_SCOPE", 0, "Chroma Vectorscope", ""},
- {SEQ_DRAW_IMG_HISTOGRAM, "HISTOGRAM", 0, "Histogram", ""},
+ {SEQ_DRAW_SEQUENCE, "SEQUENCER", ICON_SEQ_SEQUENCER, "Sequencer", ""},
+ {SEQ_DRAW_IMG_IMBUF, "IMAGE", ICON_SEQ_PREVIEW, "Image Preview", ""},
+ {SEQ_DRAW_IMG_WAVEFORM, "WAVEFORM", ICON_SEQ_LUMA_WAVEFORM, "Luma Waveform", ""},
+ {SEQ_DRAW_IMG_VECTORSCOPE, "VECTOR_SCOPE", ICON_SEQ_CHROMA_SCOPE, "Chroma Vectorscope", ""},
+ {SEQ_DRAW_IMG_HISTOGRAM, "HISTOGRAM", ICON_SEQ_HISTOGRAM, "Histogram", ""},
{0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "SpaceSequenceEditor", "Space");
@@ -1104,6 +1118,59 @@ static void rna_def_space_nla(BlenderRNA *brna)
// TODO... autosnap, dopesheet?
}
+static void rna_def_space_time(BlenderRNA *brna)
+{
+ StructRNA *srna;
+ PropertyRNA *prop;
+
+ srna= RNA_def_struct(brna, "SpaceTimeline", "Space");
+ RNA_def_struct_sdna(srna, "SpaceTime");
+ RNA_def_struct_ui_text(srna, "Space Timeline Editor", "Timeline editor space data.");
+
+ /* Define Anim Playback Areas */
+
+ prop= RNA_def_property(srna, "play_top_left", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "redraws", TIME_REGION);
+ RNA_def_property_ui_text(prop, "Top-Left 3D Window", "");
+ RNA_def_property_update(prop, 0, "rna_SpaceTime_redraw_update");
+
+ prop= RNA_def_property(srna, "play_all_3d", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "redraws", TIME_ALL_3D_WIN);
+ RNA_def_property_ui_text(prop, "All 3D Windows", "");
+ RNA_def_property_update(prop, 0, "rna_SpaceTime_redraw_update");
+
+ prop= RNA_def_property(srna, "play_anim", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "redraws", TIME_ALL_ANIM_WIN);
+ RNA_def_property_ui_text(prop, "Animation Windows", "");
+ RNA_def_property_update(prop, 0, "rna_SpaceTime_redraw_update");
+
+ prop= RNA_def_property(srna, "play_buttons", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "redraws", TIME_ALL_BUTS_WIN);
+ RNA_def_property_ui_text(prop, "Properties Windows", "");
+ RNA_def_property_update(prop, 0, "rna_SpaceTime_redraw_update");
+
+ prop= RNA_def_property(srna, "play_image", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "redraws", TIME_ALL_IMAGE_WIN);
+ RNA_def_property_ui_text(prop, "Image Windows", "");
+ RNA_def_property_update(prop, 0, "rna_SpaceTime_redraw_update");
+
+ prop= RNA_def_property(srna, "play_sequencer", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "redraws", TIME_SEQ);
+ RNA_def_property_ui_text(prop, "Sequencer Windows", "");
+ RNA_def_property_update(prop, 0, "rna_SpaceTime_redraw_update");
+
+ /* Other options */
+
+ prop= RNA_def_property(srna, "continue_physics", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "redraws", TIME_CONTINUE_PHYSICS);
+ RNA_def_property_ui_text(prop, "Continue Physics", "During playblack, continue physics simulations regardless of the frame number");
+
+ prop= RNA_def_property(srna, "only_selected", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", TIME_ONLYACTSEL);
+ RNA_def_property_ui_text(prop, "Only Selected channels", "Show keyframes only from active/selected channels.");
+ RNA_def_property_update(prop, NC_WINDOW, NULL);
+}
+
static void rna_def_console_line(BlenderRNA *brna)
{
StructRNA *srna;
@@ -1314,7 +1381,85 @@ static void rna_def_space_filebrowser(BlenderRNA *brna)
RNA_def_property_pointer_sdna(prop, NULL, "params");
RNA_def_property_pointer_funcs(prop, NULL, "rna_SpaceFileBrowser_params_set", NULL);
RNA_def_property_ui_text(prop, "Filebrowser Parameter", "Parameters and Settings for the Filebrowser.");
+}
+
+static void rna_def_space_info(BlenderRNA *brna)
+{
+ StructRNA *srna;
+
+ srna= RNA_def_struct(brna, "SpaceInfo", "Space");
+ RNA_def_struct_sdna(srna, "SpaceInfo");
+ RNA_def_struct_ui_text(srna, "Space Info", "Info space data.");
+}
+
+static void rna_def_space_userpref(BlenderRNA *brna)
+{
+ StructRNA *srna;
+
+ srna= RNA_def_struct(brna, "SpaceUserPreferences", "Space");
+ RNA_def_struct_sdna(srna, "SpaceUserPref");
+ RNA_def_struct_ui_text(srna, "Space User Preferences", "User preferences space data.");
+}
+
+static void rna_def_space_node(BlenderRNA *brna)
+{
+ StructRNA *srna;
+ PropertyRNA *prop;
+
+ static EnumPropertyItem tree_type_items[] = {
+ {NTREE_SHADER, "MATERIAL", ICON_MATERIAL, "Material", "Material nodes."},
+ {NTREE_TEXTURE, "TEXTURE", ICON_TEXTURE, "Texture", "Texture nodes."},
+ {NTREE_COMPOSIT, "COMPOSITING", ICON_RENDER_RESULT, "Compositing", "Compositing nodes."},
+ {0, NULL, 0, NULL, NULL}};
+
+ static EnumPropertyItem texture_type_items[] = {
+ {SNODE_TEX_OBJECT, "OBJECT", ICON_OBJECT_DATA, "Object", "Edit texture nodes from Object."},
+ {SNODE_TEX_WORLD, "WORLD", ICON_WORLD_DATA, "World", "Edit texture nodes from World."},
+ {SNODE_TEX_BRUSH, "BRUSH", ICON_BRUSH_DATA, "Brush", "Edit texture nodes from Brush."},
+ {0, NULL, 0, NULL, NULL}};
+
+ srna= RNA_def_struct(brna, "SpaceNodeEditor", "Space");
+ RNA_def_struct_sdna(srna, "SpaceNode");
+ RNA_def_struct_ui_text(srna, "Space Node Editor", "Node editor space data.");
+
+ prop= RNA_def_property(srna, "tree_type", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_sdna(prop, NULL, "treetype");
+ RNA_def_property_enum_items(prop, tree_type_items);
+ RNA_def_property_ui_text(prop, "Tree Type", "Node tree type to display and edit.");
+ RNA_def_property_update(prop, NC_NODE, NULL);
+
+ prop= RNA_def_property(srna, "texture_type", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_sdna(prop, NULL, "texfrom");
+ RNA_def_property_enum_items(prop, texture_type_items);
+ RNA_def_property_ui_text(prop, "Texture Type", "Type of data to take texture from.");
+ RNA_def_property_update(prop, NC_NODE, NULL);
+
+ prop= RNA_def_property(srna, "id", PROP_POINTER, PROP_NONE);
+ RNA_def_property_clear_flag(prop, PROP_EDITABLE);
+ RNA_def_property_ui_text(prop, "ID", "Datablock whose nodes are being edited.");
+
+ prop= RNA_def_property(srna, "id_from", PROP_POINTER, PROP_NONE);
+ RNA_def_property_pointer_sdna(prop, NULL, "from");
+ RNA_def_property_clear_flag(prop, PROP_EDITABLE);
+ RNA_def_property_ui_text(prop, "ID From", "Datablock from which the edited datablock is linked.");
+
+ prop= RNA_def_property(srna, "nodetree", PROP_POINTER, PROP_NONE);
+ RNA_def_property_clear_flag(prop, PROP_EDITABLE);
+ RNA_def_property_ui_text(prop, "Node Tree", "Node tree being displayed and edited.");
+
+ prop= RNA_def_property(srna, "backdrop", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", SNODE_BACKDRAW);
+ RNA_def_property_ui_text(prop, "Backdrop", "Use active Viewer Node output as backdrop for compositing nodes.");
+ RNA_def_property_update(prop, NC_NODE, NULL);
+}
+
+static void rna_def_space_logic(BlenderRNA *brna)
+{
+ StructRNA *srna;
+ srna= RNA_def_struct(brna, "SpaceLogicEditor", "Space");
+ RNA_def_struct_sdna(srna, "SpaceLogic");
+ RNA_def_struct_ui_text(srna, "Space Logic Editor", "Logic editor space data.");
}
void RNA_def_space(BlenderRNA *brna)
@@ -1332,8 +1477,13 @@ void RNA_def_space(BlenderRNA *brna)
rna_def_space_dopesheet(brna);
rna_def_space_graph(brna);
rna_def_space_nla(brna);
+ rna_def_space_time(brna);
rna_def_space_console(brna);
rna_def_console_line(brna);
+ rna_def_space_info(brna);
+ rna_def_space_userpref(brna);
+ rna_def_space_node(brna);
+ rna_def_space_logic(brna);
}
#endif
diff --git a/source/blender/makesrna/intern/rna_texture.c b/source/blender/makesrna/intern/rna_texture.c
index 694f980e5e9..b7403ab1178 100644
--- a/source/blender/makesrna/intern/rna_texture.c
+++ b/source/blender/makesrna/intern/rna_texture.c
@@ -36,6 +36,9 @@
#include "DNA_material_types.h"
#include "DNA_texture_types.h"
#include "DNA_world_types.h"
+#include "DNA_node_types.h"
+
+#include "BKE_node.h"
#include "WM_types.h"
@@ -50,6 +53,7 @@ static EnumPropertyItem texture_filter_items[] = {
#ifdef RNA_RUNTIME
#include "BKE_texture.h"
+#include "ED_node.h"
StructRNA *rna_Texture_refine(struct PointerRNA *ptr)
{
@@ -107,6 +111,65 @@ static void rna_TextureSlot_name_get(PointerRNA *ptr, char *str)
strcpy(str, "");
}
+static int rna_TextureSlot_output_node_get(PointerRNA *ptr)
+{
+ MTex *mtex= ptr->data;
+ Tex *tex= mtex->tex;
+ int cur= mtex->which_output;
+
+ if(tex) {
+ bNodeTree *ntree= tex->nodetree;
+ bNode *node;
+ if(ntree) {
+ for(node= ntree->nodes.first; node; node= node->next) {
+ if(node->type == TEX_NODE_OUTPUT) {
+ if(cur == node->custom1)
+ return cur;
+ }
+ }
+ }
+ }
+
+ mtex->which_output= 0;
+ return 0;
+}
+
+
+static EnumPropertyItem *rna_TextureSlot_output_node_itemf(bContext *C, PointerRNA *ptr, int *free)
+{
+ MTex *mtex= ptr->data;
+ Tex *tex= mtex->tex;
+ EnumPropertyItem *item= NULL;
+ int totitem= 0;
+
+ if(tex) {
+ bNodeTree *ntree= tex->nodetree;
+ if(ntree) {
+ EnumPropertyItem tmp= {0, "", 0, "", ""};
+ bNode *node;
+
+ tmp.value = 0;
+ tmp.name = "Not Specified";
+ tmp.identifier = "NOT_SPECIFIED";
+ RNA_enum_item_add(&item, &totitem, &tmp);
+
+ for(node= ntree->nodes.first; node; node= node->next) {
+ if(node->type == TEX_NODE_OUTPUT) {
+ tmp.value= node->custom1;
+ tmp.name= ((TexNodeOutput*)node->storage)->name;
+ tmp.identifier = tmp.name;
+ RNA_enum_item_add(&item, &totitem, &tmp);
+ }
+ }
+ }
+ }
+
+ RNA_enum_item_end(&item, &totitem);
+
+ *free = 1;
+ return item;
+}
+
static void rna_Texture_use_color_ramp_set(PointerRNA *ptr, int value)
{
Tex *tex= (Tex*)ptr->data;
@@ -118,6 +181,17 @@ static void rna_Texture_use_color_ramp_set(PointerRNA *ptr, int value)
tex->coba= add_colorband(0);
}
+void rna_Texture_use_nodes_set(PointerRNA *ptr, int v)
+{
+ Tex *tex= (Tex*)ptr->data;
+
+ tex->use_nodes = v;
+ tex->type = 0;
+
+ if(v && tex->nodetree==NULL)
+ ED_node_texture_default(tex);
+}
+
static void rna_ImageTexture_mipmap_set(PointerRNA *ptr, int value)
{
Tex *tex= (Tex*)ptr->data;
@@ -147,6 +221,20 @@ static EnumPropertyItem *rna_ImageTexture_filter_itemf(bContext *C, PointerRNA *
return item;
}
+static float rna_TextureSlot_angle_get(PointerRNA *ptr)
+{
+ MTex *tex= (MTex*)ptr->data;
+ const float conv = 57.295779506;
+ return tex->rot * conv;
+}
+
+static void rna_TextureSlot_angle_set(PointerRNA *ptr, float v)
+{
+ MTex *tex= (MTex*)ptr->data;
+ const float conv = 0.017453293;
+ tex->rot = v * conv;
+}
+
#else
static void rna_def_color_ramp_element(BlenderRNA *brna)
@@ -209,27 +297,27 @@ static void rna_def_texmapping(BlenderRNA *brna)
srna= RNA_def_struct(brna, "TexMapping", NULL);
RNA_def_struct_ui_text(srna, "Texture Mapping", "Mapping settings");
- prop= RNA_def_property(srna, "location", PROP_FLOAT, PROP_VECTOR);
+ prop= RNA_def_property(srna, "location", PROP_FLOAT, PROP_TRANSLATION);
RNA_def_property_float_sdna(prop, NULL, "loc");
RNA_def_property_ui_text(prop, "Location", "");
RNA_def_property_update(prop, NC_TEXTURE, NULL);
- prop= RNA_def_property(srna, "rotation", PROP_FLOAT, PROP_ROTATION);
+ prop= RNA_def_property(srna, "rotation", PROP_FLOAT, PROP_EULER);
RNA_def_property_float_sdna(prop, NULL, "rot");
RNA_def_property_ui_text(prop, "Rotation", "");
RNA_def_property_update(prop, NC_TEXTURE, NULL);
- prop= RNA_def_property(srna, "scale", PROP_FLOAT, PROP_VECTOR);
+ prop= RNA_def_property(srna, "scale", PROP_FLOAT, PROP_XYZ);
RNA_def_property_float_sdna(prop, NULL, "size");
RNA_def_property_ui_text(prop, "Scale", "");
RNA_def_property_update(prop, NC_TEXTURE, NULL);
- prop= RNA_def_property(srna, "minimum", PROP_FLOAT, PROP_VECTOR);
+ prop= RNA_def_property(srna, "minimum", PROP_FLOAT, PROP_XYZ);
RNA_def_property_float_sdna(prop, NULL, "min");
RNA_def_property_ui_text(prop, "Minimum", "Minimum value for clipping");
RNA_def_property_update(prop, NC_TEXTURE, NULL);
- prop= RNA_def_property(srna, "maximum", PROP_FLOAT, PROP_VECTOR);
+ prop= RNA_def_property(srna, "maximum", PROP_FLOAT, PROP_XYZ);
RNA_def_property_float_sdna(prop, NULL, "max");
RNA_def_property_ui_text(prop, "Maximum", "Maximum value for clipping");
RNA_def_property_update(prop, NC_TEXTURE, NULL);
@@ -267,6 +355,16 @@ static void rna_def_mtex(BlenderRNA *brna)
{MTEX_BLEND_COLOR, "COLOR", 0, "Color", ""},
{0, NULL, 0, NULL, NULL}};
+ static EnumPropertyItem prop_map_mode_items[] = {
+ {MTEX_MAP_MODE_FIXED, "FIXED", 0, "Fixed", ""},
+ {MTEX_MAP_MODE_TILED, "TILED", 0, "Tiled", ""},
+ {MTEX_MAP_MODE_3D, "3D", 0, "3D", ""},
+ {0, NULL, 0, NULL, NULL}};
+
+ static EnumPropertyItem output_node_items[] = {
+ {0, "DUMMY", 0, "Dummy", ""},
+ {0, NULL, 0, NULL, NULL}};
+
srna= RNA_def_struct(brna, "TextureSlot", NULL);
RNA_def_struct_sdna(srna, "MTex");
RNA_def_struct_ui_text(srna, "Texture Slot", "Texture slot defining the mapping and influence of a texture.");
@@ -287,13 +385,13 @@ static void rna_def_mtex(BlenderRNA *brna)
RNA_def_property_update(prop, NC_TEXTURE, NULL);
/* mapping */
- prop= RNA_def_property(srna, "offset", PROP_FLOAT, PROP_VECTOR);
+ prop= RNA_def_property(srna, "offset", PROP_FLOAT, PROP_TRANSLATION);
RNA_def_property_float_sdna(prop, NULL, "ofs");
RNA_def_property_ui_range(prop, -10, 10, 10, 2);
RNA_def_property_ui_text(prop, "Offset", "Fine tunes texture mapping X, Y and Z locations.");
RNA_def_property_update(prop, NC_TEXTURE, NULL);
- prop= RNA_def_property(srna, "size", PROP_FLOAT, PROP_VECTOR);
+ prop= RNA_def_property(srna, "size", PROP_FLOAT, PROP_XYZ);
RNA_def_property_ui_range(prop, -100, 100, 10, 2);
RNA_def_property_ui_text(prop, "Size", "Sets scaling for the texture's X, Y and Z sizes.");
RNA_def_property_update(prop, NC_TEXTURE, NULL);
@@ -325,23 +423,41 @@ static void rna_def_mtex(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "RGB to Intensity", "Converts texture RGB values to intensity (gray) values.");
RNA_def_property_update(prop, NC_TEXTURE, NULL);
- prop= RNA_def_property(srna, "default_value", PROP_FLOAT, PROP_VECTOR);
+ prop= RNA_def_property(srna, "angle", PROP_FLOAT, PROP_ANGLE);
+ RNA_def_property_float_sdna(prop, NULL, "rot");
+ RNA_def_property_range(prop, 0, 360);
+ RNA_def_property_float_funcs(prop, "rna_TextureSlot_angle_get", "rna_TextureSlot_angle_set", NULL);
+ RNA_def_property_ui_text(prop, "Angle", "Defines brush texture rotation.");
+ RNA_def_property_update(prop, NC_TEXTURE, NULL);
+
+ prop= RNA_def_property(srna, "brush_map_mode", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_items(prop, prop_map_mode_items);
+ RNA_def_property_ui_text(prop, "Mode", "");
+
+ prop= RNA_def_property(srna, "default_value", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "def_var");
RNA_def_property_ui_range(prop, 0, 1, 10, 3);
RNA_def_property_ui_text(prop, "Default Value", "Value to use for Ref, Spec, Amb, Emit, Alpha, RayMir, TransLu and Hard.");
RNA_def_property_update(prop, NC_TEXTURE, NULL);
- prop= RNA_def_property(srna, "variable_factor", PROP_FLOAT, PROP_VECTOR);
+ prop= RNA_def_property(srna, "variable_factor", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "varfac");
RNA_def_property_ui_range(prop, 0, 1, 10, 3);
RNA_def_property_ui_text(prop, "Variable Factor", "Amount texture affects other values.");
RNA_def_property_update(prop, NC_TEXTURE, NULL);
- prop= RNA_def_property(srna, "normal_factor", PROP_FLOAT, PROP_VECTOR);
+ prop= RNA_def_property(srna, "normal_factor", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "norfac");
RNA_def_property_ui_range(prop, 0, 5, 10, 3);
RNA_def_property_ui_text(prop, "Normal Factor", "Amount texture affects normal values.");
RNA_def_property_update(prop, NC_TEXTURE, NULL);
+
+ prop= RNA_def_property(srna, "output_node", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_sdna(prop, NULL, "which_output");
+ RNA_def_property_enum_items(prop, output_node_items);
+ RNA_def_property_enum_funcs(prop, "rna_TextureSlot_output_node_get", NULL, "rna_TextureSlot_output_node_itemf");
+ RNA_def_property_ui_text(prop, "Output Node", "Which output node to use, for node-based textures.");
+ RNA_def_property_update(prop, NC_TEXTURE, NULL);
}
static void rna_def_filter_size_common(StructRNA *srna)
@@ -1085,17 +1201,34 @@ static void rna_def_texture_voronoi(BlenderRNA *brna)
RNA_def_struct_ui_text(srna, "Voronoi", "Procedural voronoi texture.");
RNA_def_struct_sdna(srna, "Tex");
- prop= RNA_def_property(srna, "feature_weights", PROP_FLOAT, PROP_NONE);
+ prop= RNA_def_property(srna, "weight_1", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "vn_w1");
- RNA_def_property_array(prop, 4);
RNA_def_property_range(prop, -2, 2);
- RNA_def_property_ui_text(prop, "Feature Weights", "");
+ RNA_def_property_ui_text(prop, "Weight 1", "Voronoi feature weight 1");
+ RNA_def_property_update(prop, NC_TEXTURE, NULL);
+
+ prop= RNA_def_property(srna, "weight_2", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "vn_w2");
+ RNA_def_property_range(prop, -2, 2);
+ RNA_def_property_ui_text(prop, "Weight 2", "Voronoi feature weight 2");
+ RNA_def_property_update(prop, NC_TEXTURE, NULL);
+
+ prop= RNA_def_property(srna, "weight_3", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "vn_w3");
+ RNA_def_property_range(prop, -2, 2);
+ RNA_def_property_ui_text(prop, "Weight 3", "Voronoi feature weight 3");
+ RNA_def_property_update(prop, NC_TEXTURE, NULL);
+
+ prop= RNA_def_property(srna, "weight_4", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "vn_w4");
+ RNA_def_property_range(prop, -2, 2);
+ RNA_def_property_ui_text(prop, "Weight 4", "Voronoi feature weight 4");
RNA_def_property_update(prop, NC_TEXTURE, NULL);
prop= RNA_def_property(srna, "minkovsky_exponent", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "vn_mexp");
RNA_def_property_range(prop, 0.01, 10);
- RNA_def_property_ui_text(prop, "Minkovsky Exponent", "");
+ RNA_def_property_ui_text(prop, "Minkovsky Exponent", "Minkovsky exponent");
RNA_def_property_update(prop, NC_TEXTURE, NULL);
prop= RNA_def_property(srna, "distance_metric", PROP_ENUM, PROP_NONE);
@@ -1237,7 +1370,19 @@ static void rna_def_texture(BlenderRNA *brna)
RNA_def_property_range(prop, 0, 2);
RNA_def_property_ui_text(prop, "RGB Factor", "");
RNA_def_property_update(prop, NC_TEXTURE, NULL);
-
+
+ /* nodetree */
+ prop= RNA_def_property(srna, "use_nodes", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "use_nodes", 1);
+ RNA_def_property_boolean_funcs(prop, NULL, "rna_Texture_use_nodes_set");
+ RNA_def_property_ui_text(prop, "Use Nodes", "Make this a node-based texture");
+ RNA_def_property_update(prop, NC_TEXTURE, NULL);
+
+ prop= RNA_def_property(srna, "node_tree", PROP_POINTER, PROP_NONE);
+ RNA_def_property_pointer_sdna(prop, NULL, "nodetree");
+ RNA_def_property_ui_text(prop, "Node Tree", "Node tree for node-based textures");
+ RNA_def_property_update(prop, NC_TEXTURE, NULL);
+
rna_def_animdata_common(srna);
/* specific types */
diff --git a/source/blender/makesrna/intern/rna_timeline.c b/source/blender/makesrna/intern/rna_timeline.c
index d42603e1952..5e20fca15f0 100644
--- a/source/blender/makesrna/intern/rna_timeline.c
+++ b/source/blender/makesrna/intern/rna_timeline.c
@@ -49,7 +49,7 @@ static void rna_def_timeline_marker(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Name", "");
RNA_def_struct_name_property(srna, prop);
- prop= RNA_def_property(srna, "frame", PROP_INT, PROP_NONE);
+ prop= RNA_def_property(srna, "frame", PROP_INT, PROP_TIME);
RNA_def_property_ui_text(prop, "Frame", "The frame on which the timeline marker appears.");
}
diff --git a/source/blender/makesrna/intern/rna_ui.c b/source/blender/makesrna/intern/rna_ui.c
index 590f85fedd7..f16180451a7 100644
--- a/source/blender/makesrna/intern/rna_ui.c
+++ b/source/blender/makesrna/intern/rna_ui.c
@@ -138,6 +138,8 @@ static void rna_Panel_unregister(const bContext *C, StructRNA *type)
if(!(art=region_type_find(NULL, pt->space_type, pt->region_type)))
return;
+ RNA_struct_free_extension(type, &pt->ext);
+
BLI_freelinkN(&art->paneltypes, pt);
RNA_struct_free(&BLENDER_RNA, type);
@@ -146,7 +148,7 @@ static void rna_Panel_unregister(const bContext *C, StructRNA *type)
WM_event_add_notifier(C, NC_SCREEN|NA_EDITED, NULL);
}
-static StructRNA *rna_Panel_register(const bContext *C, ReportList *reports, void *data, StructValidateFunc validate, StructCallbackFunc call, StructFreeFunc free)
+static StructRNA *rna_Panel_register(const bContext *C, ReportList *reports, void *data, const char *identifier, StructValidateFunc validate, StructCallbackFunc call, StructFreeFunc free)
{
ARegionType *art;
PanelType *pt, dummypt = {0};
@@ -233,6 +235,8 @@ static void rna_Header_unregister(const bContext *C, StructRNA *type)
if(!(art=region_type_find(NULL, ht->space_type, RGN_TYPE_HEADER)))
return;
+ RNA_struct_free_extension(type, &ht->ext);
+
BLI_freelinkN(&art->headertypes, ht);
RNA_struct_free(&BLENDER_RNA, type);
@@ -241,7 +245,7 @@ static void rna_Header_unregister(const bContext *C, StructRNA *type)
WM_event_add_notifier(C, NC_SCREEN|NA_EDITED, NULL);
}
-static StructRNA *rna_Header_register(const bContext *C, ReportList *reports, void *data, StructValidateFunc validate, StructCallbackFunc call, StructFreeFunc free)
+static StructRNA *rna_Header_register(const bContext *C, ReportList *reports, void *data, const char *identifier, StructValidateFunc validate, StructCallbackFunc call, StructFreeFunc free)
{
ARegionType *art;
HeaderType *ht, dummyht = {0};
@@ -347,6 +351,8 @@ static void rna_Menu_unregister(const bContext *C, StructRNA *type)
if(!(art=region_type_find(NULL, mt->space_type, RGN_TYPE_HEADER)))
return;
+ RNA_struct_free_extension(type, &mt->ext);
+
BLI_freelinkN(&art->menutypes, mt);
RNA_struct_free(&BLENDER_RNA, type);
@@ -355,7 +361,7 @@ static void rna_Menu_unregister(const bContext *C, StructRNA *type)
WM_event_add_notifier(C, NC_SCREEN|NA_EDITED, NULL);
}
-static StructRNA *rna_Menu_register(const bContext *C, ReportList *reports, void *data, StructValidateFunc validate, StructCallbackFunc call, StructFreeFunc free)
+static StructRNA *rna_Menu_register(const bContext *C, ReportList *reports, void *data, const char *identifier, StructValidateFunc validate, StructCallbackFunc call, StructFreeFunc free)
{
ARegionType *art;
MenuType *mt, dummymt = {0};
diff --git a/source/blender/makesrna/intern/rna_ui_api.c b/source/blender/makesrna/intern/rna_ui_api.c
index 67ade9998ed..82694098e69 100644
--- a/source/blender/makesrna/intern/rna_ui_api.c
+++ b/source/blender/makesrna/intern/rna_ui_api.c
@@ -119,7 +119,7 @@ void RNA_api_ui_layout(StructRNA *srna)
func= RNA_def_function(srna, "split", "uiLayoutSplit");
parm= RNA_def_pointer(func, "layout", "UILayout", "", "Sub-layout to put items in.");
RNA_def_function_return(func, parm);
- RNA_def_float(func, "percentage", 0.5f, 0.0f, 1.0f, "Percentage", "Percentage of width to split at.", 0.0f, 1.0f);
+ RNA_def_float(func, "percentage", 0.0f, 0.0f, 1.0f, "Percentage", "Percentage of width to split at.", 0.0f, 1.0f);
/* items */
func= RNA_def_function(srna, "itemR", "uiItemR");
@@ -220,6 +220,7 @@ void RNA_api_ui_layout(StructRNA *srna)
/* templates */
func= RNA_def_function(srna, "template_header", "uiTemplateHeader");
RNA_def_function_flag(func, FUNC_USE_CONTEXT);
+ RNA_def_boolean(func, "menus", 1, "", "The header has menus, and should show menu expander.");
func= RNA_def_function(srna, "template_ID", "uiTemplateID");
RNA_def_function_flag(func, FUNC_USE_CONTEXT);
@@ -243,11 +244,13 @@ void RNA_api_ui_layout(StructRNA *srna)
parm= RNA_def_pointer(func, "id", "ID", "", "ID datablock.");
RNA_def_property_flag(parm, PROP_REQUIRED);
parm= RNA_def_pointer(func, "parent", "ID", "", "ID datablock.");
+ parm= RNA_def_pointer(func, "slot", "TextureSlot", "", "Texture slot.");
func= RNA_def_function(srna, "template_curve_mapping", "uiTemplateCurveMapping");
parm= RNA_def_pointer(func, "curvemap", "CurveMapping", "", "Curve mapping pointer.");
RNA_def_property_flag(parm, PROP_REQUIRED);
RNA_def_enum(func, "type", curve_type_items, 0, "Type", "Type of curves to display.");
+ RNA_def_boolean(func, "compact", 0, "", "Use more compact curve mapping.");
func= RNA_def_function(srna, "template_color_ramp", "uiTemplateColorRamp");
parm= RNA_def_pointer(func, "ramp", "ColorRamp", "", "Color ramp pointer.");
@@ -287,6 +290,15 @@ void RNA_api_ui_layout(StructRNA *srna)
func= RNA_def_function(srna, "template_header_3D", "uiTemplateHeader3D");
RNA_def_function_flag(func, FUNC_USE_CONTEXT);
+ func= RNA_def_function(srna, "view3d_select_metaballmenu", "uiTemplate_view3d_select_metaballmenu");
+ RNA_def_function_flag(func, FUNC_USE_CONTEXT);
+ func= RNA_def_function(srna, "view3d_select_armaturemenu", "uiTemplate_view3d_select_armaturemenu");
+ RNA_def_function_flag(func, FUNC_USE_CONTEXT);
+ func= RNA_def_function(srna, "view3d_select_posemenu", "uiTemplate_view3d_select_posemenu");
+ RNA_def_function_flag(func, FUNC_USE_CONTEXT);
+ func= RNA_def_function(srna, "view3d_select_faceselmenu", "uiTemplate_view3d_select_faceselmenu");
+ RNA_def_function_flag(func, FUNC_USE_CONTEXT);
+
func= RNA_def_function(srna, "template_texture_image", "uiTemplateTextureImage");
RNA_def_function_flag(func, FUNC_USE_CONTEXT);
parm= RNA_def_pointer(func, "texture", "Texture", "", "");
diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c
index f1fd11a0094..d1245528100 100644
--- a/source/blender/makesrna/intern/rna_userdef.c
+++ b/source/blender/makesrna/intern/rna_userdef.c
@@ -37,6 +37,8 @@
#include "BKE_utildefines.h"
+#include "BKE_sound.h"
+
#ifdef RNA_RUNTIME
static void rna_userdef_lmb_select_set(struct PointerRNA *ptr,int value)
@@ -116,6 +118,11 @@ static PointerRNA rna_UserDef_system_get(PointerRNA *ptr)
return rna_pointer_inherit_refine(ptr, &RNA_UserPreferencesSystem, ptr->data);
}
+static void rna_UserDef_audio_update(bContext *C, PointerRNA *ptr)
+{
+ sound_init(C);
+}
+
#else
static void rna_def_userdef_theme_ui_font_style(BlenderRNA *brna)
@@ -683,7 +690,7 @@ static void rna_def_userdef_theme_space_graph(BlenderRNA *brna)
srna= RNA_def_struct(brna, "ThemeGraphEditor", NULL);
RNA_def_struct_sdna(srna, "ThemeSpace");
- RNA_def_struct_ui_text(srna, "Theme Graph Editor", "Theme settings for the Ipo Editor.");
+ RNA_def_struct_ui_text(srna, "Theme Graph Editor", "Theme settings for the graph editor.");
rna_def_userdef_theme_spaces_main(srna, SPACE_IPO);
@@ -820,19 +827,33 @@ static void rna_def_userdef_theme_space_outliner(BlenderRNA *brna)
rna_def_userdef_theme_spaces_main(srna, SPACE_OUTLINER);
}
-static void rna_def_userdef_theme_space_info(BlenderRNA *brna)
+static void rna_def_userdef_theme_space_userpref(BlenderRNA *brna)
{
StructRNA *srna;
- /* space_info */
+ /* space_userpref */
srna= RNA_def_struct(brna, "ThemeUserPreferences", NULL);
RNA_def_struct_sdna(srna, "ThemeSpace");
RNA_def_struct_ui_text(srna, "Theme User Preferences", "Theme settings for the User Preferences.");
+ rna_def_userdef_theme_spaces_main(srna, SPACE_USERPREF);
+}
+
+static void rna_def_userdef_theme_space_info(BlenderRNA *brna)
+{
+ StructRNA *srna;
+
+ /* space_info */
+
+ srna= RNA_def_struct(brna, "ThemeInfo", NULL);
+ RNA_def_struct_sdna(srna, "ThemeSpace");
+ RNA_def_struct_ui_text(srna, "Theme Info", "Theme settings for Info.");
+
rna_def_userdef_theme_spaces_main(srna, SPACE_INFO);
}
+
static void rna_def_userdef_theme_space_text(BlenderRNA *brna)
{
StructRNA *srna;
@@ -990,9 +1011,9 @@ static void rna_def_userdef_theme_space_buts(BlenderRNA *brna)
/* space_buts */
- srna= RNA_def_struct(brna, "ThemeButtonsWindow", NULL);
+ srna= RNA_def_struct(brna, "ThemeProperties", NULL);
RNA_def_struct_sdna(srna, "ThemeSpace");
- RNA_def_struct_ui_text(srna, "Theme Buttons Window", "Theme settings for the Buttons Window.");
+ RNA_def_struct_ui_text(srna, "Theme Properties", "Theme settings for the Properties.");
rna_def_userdef_theme_spaces_main(srna, SPACE_BUTS);
@@ -1393,10 +1414,10 @@ static void rna_def_userdef_themes(BlenderRNA *brna)
RNA_def_property_struct_type(prop, "ThemeSequenceEditor");
RNA_def_property_ui_text(prop, "Sequence Editor", "");
- prop= RNA_def_property(srna, "buttons_window", PROP_POINTER, PROP_NEVER_NULL);
+ prop= RNA_def_property(srna, "properties", PROP_POINTER, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "tbuts");
- RNA_def_property_struct_type(prop, "ThemeButtonsWindow");
- RNA_def_property_ui_text(prop, "Buttons Window", "");
+ RNA_def_property_struct_type(prop, "ThemeProperties");
+ RNA_def_property_ui_text(prop, "Properties", "");
prop= RNA_def_property(srna, "text_editor", PROP_POINTER, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "text");
@@ -1423,8 +1444,13 @@ static void rna_def_userdef_themes(BlenderRNA *brna)
RNA_def_property_struct_type(prop, "ThemeOutliner");
RNA_def_property_ui_text(prop, "Outliner", "");
- prop= RNA_def_property(srna, "user_preferences", PROP_POINTER, PROP_NEVER_NULL);
+ prop= RNA_def_property(srna, "info", PROP_POINTER, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "tinfo");
+ RNA_def_property_struct_type(prop, "ThemeInfo");
+ RNA_def_property_ui_text(prop, "Info", "");
+
+ prop= RNA_def_property(srna, "user_preferences", PROP_POINTER, PROP_NEVER_NULL);
+ RNA_def_property_pointer_sdna(prop, NULL, "tuserpref");
RNA_def_property_struct_type(prop, "ThemeUserPreferences");
RNA_def_property_ui_text(prop, "User Preferences", "");
@@ -1453,6 +1479,7 @@ static void rna_def_userdef_dothemes(BlenderRNA *brna)
rna_def_userdef_theme_space_node(brna);
rna_def_userdef_theme_space_outliner(brna);
rna_def_userdef_theme_space_info(brna);
+ rna_def_userdef_theme_space_userpref(brna);
rna_def_userdef_theme_space_sound(brna);
rna_def_userdef_theme_space_logic(brna);
rna_def_userdef_theme_colorset(brna);
@@ -1472,7 +1499,7 @@ static void rna_def_userdef_solidlight(BlenderRNA *brna)
RNA_def_property_boolean_sdna(prop, NULL, "flag", 1);
RNA_def_property_ui_text(prop, "Enabled", "Enable this OpenGL light in solid draw mode.");
- prop= RNA_def_property(srna, "direction", PROP_FLOAT, PROP_VECTOR);
+ prop= RNA_def_property(srna, "direction", PROP_FLOAT, PROP_DIRECTION);
RNA_def_property_float_sdna(prop, NULL, "vec");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Direction", "The direction that the OpenGL light is shining.");
@@ -1819,11 +1846,9 @@ static void rna_def_userdef_edit(BlenderRNA *brna)
RNA_def_property_boolean_sdna(prop, NULL, "gp_settings", GP_PAINT_DOSMOOTH);
RNA_def_property_ui_text(prop, "Grease Pencil Smooth Stroke", "Smooth the final stroke.");
-#if 0
prop= RNA_def_property(srna, "grease_pencil_simplify_stroke", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "gp_settings", GP_PAINT_DOSIMPLIFY);
RNA_def_property_ui_text(prop, "Grease Pencil Simplify Stroke", "Simplify the final stroke.");
-#endif
prop= RNA_def_property(srna, "grease_pencil_eraser_radius", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "gp_eraser");
@@ -1977,6 +2002,47 @@ static void rna_def_userdef_system(BlenderRNA *brna)
{512, "AUDIO_SAMPLES_512", 0, "512", "Set audio mixing buffer size to 512 samples"},
{1024, "AUDIO_SAMPLES_1024", 0, "1024", "Set audio mixing buffer size to 1024 samples"},
{2048, "AUDIO_SAMPLES_2048", 0, "2048", "Set audio mixing buffer size to 2048 samples"},
+ {4096, "AUDIO_SAMPLES_4096", 0, "4096", "Set audio mixing buffer size to 4096 samples"},
+ {8192, "AUDIO_SAMPLES_8192", 0, "8192", "Set audio mixing buffer size to 8192 samples"},
+ {16384, "AUDIO_SAMPLES_16384", 0, "16384", "Set audio mixing buffer size to 16384 samples"},
+ {32768, "AUDIO_SAMPLES_32768", 0, "32768", "Set audio mixing buffer size to 32768 samples"},
+ {0, NULL, 0, NULL, NULL}};
+
+ static EnumPropertyItem audio_device_items[] = {
+ {0, "AUDIO_DEVICE_NULL", 0, "No Audio", "Null device - there will be no audio output."},
+ {1, "AUDIO_DEVICE_SDL", 0, "SDL", "SDL device - simple direct media layer, recommended for sequencer usage."},
+ {2, "AUDIO_DEVICE_OPENAL", 0, "OpenAL", "OpenAL device - supports 3D audio, recommended for game engine usage."},
+ {3, "AUDIO_DEVICE_JACK", 0, "Jack", "Jack device - open source pro audio, recommended for pro audio users."},
+ {0, NULL, 0, NULL, NULL}};
+
+ static EnumPropertyItem audio_rate_items[] = {
+// {8000, "AUDIO_RATE_8000", 0, "8 kHz", "Set audio sampling rate to 8000 samples per second."},
+// {11025, "AUDIO_RATE_11025", 0, "11.025 kHz", "Set audio sampling rate to 11025 samples per second."},
+// {16000, "AUDIO_RATE_16000", 0, "16 kHz", "Set audio sampling rate to 16000 samples per second."},
+// {22050, "AUDIO_RATE_22050", 0, "22.05 kHz", "Set audio sampling rate to 22050 samples per second."},
+// {32000, "AUDIO_RATE_32000", 0, "32 kHz", "Set audio sampling rate to 32000 samples per second."},
+ {44100, "AUDIO_RATE_44100", 0, "44.1 kHz", "Set audio sampling rate to 44100 samples per second."},
+ {48000, "AUDIO_RATE_48000", 0, "48 kHz", "Set audio sampling rate to 48000 samples per second."},
+// {88200, "AUDIO_RATE_88200", 0, "88.2 kHz", "Set audio sampling rate to 88200 samples per second."},
+ {96000, "AUDIO_RATE_96000", 0, "96 kHz", "Set audio sampling rate to 96000 samples per second."},
+ {192000, "AUDIO_RATE_192000", 0, "192 kHz", "Set audio sampling rate to 192000 samples per second."},
+ {0, NULL, 0, NULL, NULL}};
+
+ static EnumPropertyItem audio_format_items[] = {
+ {0x01, "AUDIO_FORMAT_U8", 0, "8-bit Unsigned", "Set audio sample format to 8 bit unsigned integer."},
+ {0x12, "AUDIO_FORMAT_S16", 0, "16-bit Signed", "Set audio sample format to 16 bit signed integer."},
+ {0x13, "AUDIO_FORMAT_S24", 0, "24-bit Signed", "Set audio sample format to 24 bit signed integer."},
+ {0x14, "AUDIO_FORMAT_S32", 0, "32-bit Signed", "Set audio sample format to 32 bit signed integer."},
+ {0x24, "AUDIO_FORMAT_FLOAT", 0, "32-bit Float", "Set audio sample format to 32 bit float."},
+ {0x28, "AUDIO_FORMAT_DOUBLE", 0, "64-bit Float", "Set audio sample format to 64 bit float."},
+ {0, NULL, 0, NULL, NULL}};
+
+ static EnumPropertyItem audio_channel_items[] = {
+ {1, "AUDIO_CHANNELS_MONO", 0, "Mono", "Set audio channels to mono."},
+ {2, "AUDIO_CHANNELS_STEREO", 0, "Stereo", "Set audio channels to stereo."},
+ {4, "AUDIO_CHANNELS_SURROUND4", 0, "4 Channels", "Set audio channels to 4 channels."},
+ {6, "AUDIO_CHANNELS_SURROUND51", 0, "5.1 Surround", "Set audio channels to 5.1 surround sound."},
+ {8, "AUDIO_CHANNELS_SURROUND71", 0, "7.1 Surround", "Set audio channels to 7.1 surround sound."},
{0, NULL, 0, NULL, NULL}};
static EnumPropertyItem draw_method_items[] = {
@@ -2078,6 +2144,31 @@ static void rna_def_userdef_system(BlenderRNA *brna)
RNA_def_property_enum_sdna(prop, NULL, "mixbufsize");
RNA_def_property_enum_items(prop, audio_mixing_samples_items);
RNA_def_property_ui_text(prop, "Audio Mixing Buffer", "Sets the number of samples used by the audio mixing buffer.");
+ RNA_def_property_update(prop, 0, "rna_UserDef_audio_update");
+
+ prop= RNA_def_property(srna, "audio_device", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_sdna(prop, NULL, "audiodevice");
+ RNA_def_property_enum_items(prop, audio_device_items);
+ RNA_def_property_ui_text(prop, "Audio Device", "Sets the audio output device.");
+ RNA_def_property_update(prop, 0, "rna_UserDef_audio_update");
+
+ prop= RNA_def_property(srna, "audio_sample_rate", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_sdna(prop, NULL, "audiorate");
+ RNA_def_property_enum_items(prop, audio_rate_items);
+ RNA_def_property_ui_text(prop, "Audio Sample Rate", "Sets the audio sample rate.");
+ RNA_def_property_update(prop, 0, "rna_UserDef_audio_update");
+
+ prop= RNA_def_property(srna, "audio_sample_format", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_sdna(prop, NULL, "audioformat");
+ RNA_def_property_enum_items(prop, audio_format_items);
+ RNA_def_property_ui_text(prop, "Audio Sample Format", "Sets the audio sample format.");
+ RNA_def_property_update(prop, 0, "rna_UserDef_audio_update");
+
+ prop= RNA_def_property(srna, "audio_channels", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_sdna(prop, NULL, "audiochannels");
+ RNA_def_property_enum_items(prop, audio_channel_items);
+ RNA_def_property_ui_text(prop, "Audio Channels", "Sets the audio channel count.");
+ RNA_def_property_update(prop, 0, "rna_UserDef_audio_update");
#if 0
prop= RNA_def_property(srna, "verse_master", PROP_STRING, PROP_NONE);
diff --git a/source/blender/makesrna/intern/rna_wm.c b/source/blender/makesrna/intern/rna_wm.c
index 4a2154bc3cf..eaed0100386 100644
--- a/source/blender/makesrna/intern/rna_wm.c
+++ b/source/blender/makesrna/intern/rna_wm.c
@@ -297,7 +297,7 @@ static void rna_def_operator_utils(BlenderRNA *brna)
srna= RNA_def_struct(brna, "OperatorMousePath", "IDPropertyGroup");
RNA_def_struct_ui_text(srna, "Operator Mouse Path", "Mouse path values for operators that record such paths.");
- prop= RNA_def_property(srna, "loc", PROP_FLOAT, PROP_VECTOR);
+ prop= RNA_def_property(srna, "loc", PROP_FLOAT, PROP_XYZ);
RNA_def_property_flag(prop, PROP_IDPROPERTY);
RNA_def_property_array(prop, 2);
RNA_def_property_ui_text(prop, "Location", "Mouse location.");
diff --git a/source/blender/makesrna/intern/rna_world.c b/source/blender/makesrna/intern/rna_world.c
index f23b893539d..525a4446932 100644
--- a/source/blender/makesrna/intern/rna_world.c
+++ b/source/blender/makesrna/intern/rna_world.c
@@ -154,25 +154,25 @@ static void rna_def_world_mtex(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Object", "Object to use for mapping with Object texture coordinates.");
RNA_def_property_update(prop, NC_TEXTURE, NULL);
- prop= RNA_def_property(srna, "blend_factor", PROP_FLOAT, PROP_VECTOR);
+ prop= RNA_def_property(srna, "blend_factor", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "varfac");
RNA_def_property_ui_range(prop, 0, 1, 10, 3);
RNA_def_property_ui_text(prop, "Blend Factor", "Amount texture affects color progression of the background.");
RNA_def_property_update(prop, NC_TEXTURE, NULL);
- prop= RNA_def_property(srna, "horizon_factor", PROP_FLOAT, PROP_VECTOR);
+ prop= RNA_def_property(srna, "horizon_factor", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "colfac");
RNA_def_property_ui_range(prop, 0, 1, 10, 3);
RNA_def_property_ui_text(prop, "Horizon Factor", "Amount texture affects color of the horizon.");
RNA_def_property_update(prop, NC_TEXTURE, NULL);
- prop= RNA_def_property(srna, "zenith_up_factor", PROP_FLOAT, PROP_VECTOR);
+ prop= RNA_def_property(srna, "zenith_up_factor", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "colfac");
RNA_def_property_ui_range(prop, 0, 1, 10, 3);
RNA_def_property_ui_text(prop, "Zenith Up Factor", "Amount texture affects color of the zenith above.");
RNA_def_property_update(prop, NC_TEXTURE, NULL);
- prop= RNA_def_property(srna, "zenith_down_factor", PROP_FLOAT, PROP_VECTOR);
+ prop= RNA_def_property(srna, "zenith_down_factor", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "colfac");
RNA_def_property_ui_range(prop, 0, 1, 10, 3);
RNA_def_property_ui_text(prop, "Zenith Down Factor", "Amount texture affects color of the zenith below.");
@@ -216,7 +216,7 @@ static void rna_def_ambient_occlusion(BlenderRNA *brna)
RNA_def_property_boolean_sdna(prop, NULL, "mode", WO_AMB_OCC);
RNA_def_property_ui_text(prop, "Enabled", "Use Ambient Occlusion to add light based on distance between elements, creating the illusion of omnipresent light");
- prop= RNA_def_property(srna, "distance", PROP_FLOAT, PROP_NONE);
+ prop= RNA_def_property(srna, "distance", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "aodist");
RNA_def_property_ui_text(prop, "Distance", "Length of rays, defines how far away other faces give occlusion effect.");
@@ -319,19 +319,19 @@ static void rna_def_world_mist(BlenderRNA *brna)
RNA_def_property_range(prop, 0, 1);
RNA_def_property_ui_text(prop, "Intensity", "Intensity of the mist effect.");
- prop= RNA_def_property(srna, "start", PROP_FLOAT, PROP_NONE);
+ prop= RNA_def_property(srna, "start", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "miststa");
RNA_def_property_range(prop, 0, FLT_MAX);
RNA_def_property_ui_range(prop, 0, 10000, 10, 2);
RNA_def_property_ui_text(prop, "Start", "Starting distance of the mist, measured from the camera");
- prop= RNA_def_property(srna, "depth", PROP_FLOAT, PROP_NONE);
+ prop= RNA_def_property(srna, "depth", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "mistdist");
RNA_def_property_range(prop, 0, FLT_MAX);
RNA_def_property_ui_range(prop, 0, 10000, 10, 2);
RNA_def_property_ui_text(prop, "Depth", "The distance over which the mist effect fades in");
- prop= RNA_def_property(srna, "height", PROP_FLOAT, PROP_NONE);
+ prop= RNA_def_property(srna, "height", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "misthi");
RNA_def_property_range(prop, 0, 100);
RNA_def_property_ui_text(prop, "Height", "Control how much mist density decreases with height");
@@ -363,7 +363,7 @@ static void rna_def_world_stars(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Size", "Average screen dimension of stars.");
RNA_def_property_update(prop, NC_WORLD, NULL);
- prop= RNA_def_property(srna, "min_distance", PROP_FLOAT, PROP_NONE);
+ prop= RNA_def_property(srna, "min_distance", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "starmindist");
RNA_def_property_range(prop, 0, 1000);
RNA_def_property_ui_text(prop, "Minimum Distance", "Minimum distance to the camera for stars.");