Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/makesrna/intern')
-rw-r--r--source/blender/makesrna/intern/rna_ID.c53
-rw-r--r--source/blender/makesrna/intern/rna_access.c2
-rw-r--r--source/blender/makesrna/intern/rna_animation.c8
-rw-r--r--source/blender/makesrna/intern/rna_animation_api.c2
-rw-r--r--source/blender/makesrna/intern/rna_armature.c19
-rw-r--r--source/blender/makesrna/intern/rna_fcurve.c8
-rw-r--r--source/blender/makesrna/intern/rna_internal.h1
-rw-r--r--source/blender/makesrna/intern/rna_modifier.c9
-rw-r--r--source/blender/makesrna/intern/rna_object.c9
-rw-r--r--source/blender/makesrna/intern/rna_scene.c3
-rw-r--r--source/blender/makesrna/intern/rna_sequence.c77
-rw-r--r--source/blender/makesrna/intern/rna_space.c17
-rw-r--r--source/blender/makesrna/intern/rna_ui_api.c3
-rw-r--r--source/blender/makesrna/intern/rna_userdef.c21
-rw-r--r--source/blender/makesrna/intern/rna_wm.c25
-rw-r--r--source/blender/makesrna/intern/rna_wm_api.c17
16 files changed, 235 insertions, 39 deletions
diff --git a/source/blender/makesrna/intern/rna_ID.c b/source/blender/makesrna/intern/rna_ID.c
index 3bcdf373c43..ed73ddef3f5 100644
--- a/source/blender/makesrna/intern/rna_ID.c
+++ b/source/blender/makesrna/intern/rna_ID.c
@@ -225,6 +225,40 @@ ID *rna_ID_copy(ID *id)
return NULL;
}
+static int rna_IDPropertyGroup_name_length(PointerRNA *ptr)
+{
+ IDProperty *group=(IDProperty*)ptr->id.data;
+ IDProperty *idprop;
+ idprop= IDP_GetPropertyFromGroup(group, "name");
+
+ if(idprop && idprop->type == IDP_STRING)
+ return strlen(idprop->data.pointer);
+ else
+ return 0;
+}
+
+static void rna_IDPropertyGroup_name_get(PointerRNA *ptr, char *str)
+{
+ IDProperty *group=(IDProperty*)ptr->id.data;
+ IDProperty *idprop;
+ idprop= IDP_GetPropertyFromGroup(group, "name");
+
+ if(idprop && idprop->type == IDP_STRING)
+ strcpy(str, idprop->data.pointer);
+ else
+ strcpy(str, "");
+}
+
+void rna_IDPropertyGroup_name_set(PointerRNA *ptr, const char *value)
+{
+ IDProperty *group=(IDProperty*)ptr->id.data;
+ IDProperty *idprop;
+ IDPropertyTemplate val = {0};
+ val.str= (char *)value;
+ idprop = IDP_New(IDP_STRING, val, "name");
+ IDP_ReplaceInGroup(group, idprop);
+}
+
#else
static void rna_def_ID_properties(BlenderRNA *brna)
@@ -275,6 +309,15 @@ static void rna_def_ID_properties(BlenderRNA *brna)
RNA_def_property_flag(prop, PROP_EXPORT|PROP_IDPROPERTY);
RNA_def_property_struct_type(prop, "IDPropertyGroup");
+ // never tested, maybe its useful to have this?
+#if 0
+ prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
+ RNA_def_property_flag(prop, PROP_EXPORT|PROP_IDPROPERTY);
+ RNA_def_property_clear_flag(prop, PROP_EDITABLE);
+ RNA_def_property_ui_text(prop, "Name", "Unique name used in the code and scripting.");
+ RNA_def_struct_name_property(srna, prop);
+#endif
+
/* IDP_ID -- not implemented yet in id properties */
/* ID property groups > level 0, since level 0 group is merged
@@ -285,6 +328,16 @@ static void rna_def_ID_properties(BlenderRNA *brna)
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");
+
+ /* important so python types can have their name used in list views
+ * however this isnt prefect because it overrides how python would set the name
+ * when we only really want this so RNA_def_struct_name_property() is set to something useful */
+ prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
+ RNA_def_property_flag(prop, PROP_EXPORT|PROP_IDPROPERTY);
+ //RNA_def_property_clear_flag(prop, PROP_EDITABLE);
+ RNA_def_property_ui_text(prop, "Name", "Unique name used in the code and scripting.");
+ RNA_def_property_string_funcs(prop, "rna_IDPropertyGroup_name_get", "rna_IDPropertyGroup_name_length", "rna_IDPropertyGroup_name_set");
+ RNA_def_struct_name_property(srna, prop);
}
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 174cb13b0cd..7bfb6d7249f 100644
--- a/source/blender/makesrna/intern/rna_access.c
+++ b/source/blender/makesrna/intern/rna_access.c
@@ -885,6 +885,7 @@ void RNA_property_float_ui_range(PointerRNA *ptr, PropertyRNA *prop, float *soft
*precision= (float)fprop->precision;
}
+/* this is the max length including \0 terminator */
int RNA_property_string_maxlength(PropertyRNA *prop)
{
StringPropertyRNA *sprop= (StringPropertyRNA*)rna_ensure_property(prop);
@@ -1588,6 +1589,7 @@ char *RNA_property_string_get_alloc(PointerRNA *ptr, PropertyRNA *prop, char *fi
return buf;
}
+/* this is the length without \0 terminator */
int RNA_property_string_length(PointerRNA *ptr, PropertyRNA *prop)
{
StringPropertyRNA *sprop= (StringPropertyRNA*)prop;
diff --git a/source/blender/makesrna/intern/rna_animation.c b/source/blender/makesrna/intern/rna_animation.c
index 3e7638b3d51..035194e0d9f 100644
--- a/source/blender/makesrna/intern/rna_animation.c
+++ b/source/blender/makesrna/intern/rna_animation.c
@@ -203,9 +203,9 @@ static void rna_def_keyingset_path(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Grouping Method", "Method used to define which Group-name to use.");
/* Path + Array Index */
- prop= RNA_def_property(srna, "rna_path", PROP_STRING, PROP_NONE);
+ prop= RNA_def_property(srna, "data_path", PROP_STRING, PROP_NONE);
RNA_def_property_string_funcs(prop, "rna_ksPath_RnaPath_get", "rna_ksPath_RnaPath_length", "rna_ksPath_RnaPath_set");
- RNA_def_property_ui_text(prop, "RNA Path", "RNA Path to property setting.");
+ RNA_def_property_ui_text(prop, "Data Path", "Path to property setting.");
RNA_def_struct_name_property(srna, prop); // XXX this is the best indicator for now...
prop= RNA_def_property(srna, "array_index", PROP_INT, PROP_NONE);
@@ -267,6 +267,10 @@ static void rna_def_keyingset(BlenderRNA *brna)
RNA_def_property_boolean_sdna(prop, NULL, "keyingflag", INSERTKEY_MATRIX);
RNA_def_property_ui_text(prop, "Insert Keyframes - Visual", "Insert keyframes based on 'visual transforms'.");
+ prop= RNA_def_property(srna, "insertkey_xyz_to_rgb", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "keyingflag", INSERTKEY_XYZ2RGB);
+ RNA_def_property_ui_text(prop, "XYZ Transforms to RGB", "Color for newly added transformation F-Curves (Location, Rotation, Scale) and also Color is based on the transform axis.");
+
/* Keying Set API */
RNA_api_keyingset(srna);
}
diff --git a/source/blender/makesrna/intern/rna_animation_api.c b/source/blender/makesrna/intern/rna_animation_api.c
index 5852c494936..fc36bab29af 100644
--- a/source/blender/makesrna/intern/rna_animation_api.c
+++ b/source/blender/makesrna/intern/rna_animation_api.c
@@ -76,7 +76,7 @@ void RNA_api_keyingset(StructRNA *srna)
parm= RNA_def_pointer(func, "target_id", "ID", "Target ID", "ID-Datablock for the destination.");
RNA_def_property_flag(parm, PROP_REQUIRED);
/* rna-path */
- parm= RNA_def_string(func, "rna_path", "", 256, "RNA-Path", "RNA-Path to destination property."); // xxx hopefully this is long enough
+ parm= RNA_def_string(func, "data_path", "", 256, "Data-Path", "RNA-Path to destination property."); // xxx hopefully this is long enough
RNA_def_property_flag(parm, PROP_REQUIRED);
parm=RNA_def_int(func, "array_index", 0, 0, INT_MAX, "Array Index", "If applicable, the index ", 0, INT_MAX);
/* flags */
diff --git a/source/blender/makesrna/intern/rna_armature.c b/source/blender/makesrna/intern/rna_armature.c
index 4859f23967f..bc01c22de1c 100644
--- a/source/blender/makesrna/intern/rna_armature.c
+++ b/source/blender/makesrna/intern/rna_armature.c
@@ -94,13 +94,21 @@ static void rna_Armature_act_edit_bone_set(PointerRNA *ptr, PointerRNA value)
}
}
-EditBone *rna_Armature_edit_bone_new(bArmature *arm, char *name)
+EditBone *rna_Armature_edit_bone_new(bArmature *arm, ReportList *reports, char *name)
{
+ if(arm->edbo==NULL) {
+ BKE_reportf(reports, RPT_ERROR, "Armature '%s' not in editmode, cant add an editbone.", arm->id.name+2);
+ return NULL;
+ }
return ED_armature_edit_bone_add(arm, name);
}
-void rna_Armature_edit_bone_remove(bArmature *arm, EditBone *ebone)
+void rna_Armature_edit_bone_remove(bArmature *arm, ReportList *reports, EditBone *ebone)
{
+ if(arm->edbo==NULL) {
+ BKE_reportf(reports, RPT_ERROR, "Armature '%s' not in editmode, cant remove an editbone.", arm->id.name+2);
+ return;
+ }
ED_armature_edit_bone_remove(arm, ebone);
}
@@ -701,15 +709,18 @@ static void rna_def_armature_edit_bones(BlenderRNA *brna, PropertyRNA *cprop)
/* add target */
func= RNA_def_function(srna, "new", "rna_Armature_edit_bone_new");
+ RNA_def_function_flag(func, FUNC_USE_REPORTS);
RNA_def_function_ui_description(func, "Add a new bone.");
parm= RNA_def_string(func, "name", "Object", 0, "", "New name for the bone.");
RNA_def_property_flag(parm, PROP_REQUIRED);
+
/* return type */
parm= RNA_def_pointer(func, "bone", "EditBone", "", "Newly created edit bone.");
RNA_def_function_return(func, parm);
/* remove target */
func= RNA_def_function(srna, "remove", "rna_Armature_edit_bone_remove");
+ RNA_def_function_flag(func, FUNC_USE_REPORTS);
RNA_def_function_ui_description(func, "Remove an existing bone from the armature.");
/* target to remove*/
parm= RNA_def_pointer(func, "bone", "EditBone", "", "EditBone to remove.");
@@ -741,8 +752,8 @@ static void rna_def_armature(BlenderRNA *brna)
{0, "TAILS", 0, "Tails", "Calculate bone paths from tails"},
{0, NULL, 0, NULL, NULL}};
static const EnumPropertyItem prop_pose_position_items[]= {
- {0, "POSE_POSITION", 0, "Pose Position", "Show armature in posed state."},
- {ARM_RESTPOS, "REST_POSITION", 0, "Rest Position", "Show Armature in binding pose state. No posing possible."},
+ {0, "POSE", 0, "Pose Position", "Show armature in posed state."},
+ {ARM_RESTPOS, "REST", 0, "Rest Position", "Show Armature in binding pose state. No posing possible."},
{0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "Armature", "ID");
diff --git a/source/blender/makesrna/intern/rna_fcurve.c b/source/blender/makesrna/intern/rna_fcurve.c
index 23cd4b2c892..97918556976 100644
--- a/source/blender/makesrna/intern/rna_fcurve.c
+++ b/source/blender/makesrna/intern/rna_fcurve.c
@@ -747,9 +747,9 @@ static void rna_def_drivertarget(BlenderRNA *brna)
RNA_def_property_update(prop, 0, "rna_DriverTarget_update_data");
/* Target Properties - Property to Drive */
- prop= RNA_def_property(srna, "rna_path", PROP_STRING, PROP_NONE);
+ prop= RNA_def_property(srna, "data_path", PROP_STRING, PROP_NONE);
RNA_def_property_string_funcs(prop, "rna_DriverTarget_RnaPath_get", "rna_DriverTarget_RnaPath_length", "rna_DriverTarget_RnaPath_set");
- RNA_def_property_ui_text(prop, "RNA Path", "RNA Path (from Object) to property used");
+ RNA_def_property_ui_text(prop, "Data Path", "RNA Path (from Object) to property used");
RNA_def_property_update(prop, 0, "rna_DriverTarget_update_data");
prop= RNA_def_property(srna, "array_index", PROP_INT, PROP_NONE);
@@ -926,9 +926,9 @@ static void rna_def_fcurve(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Driver", "Channel Driver (only set for Driver F-Curves)");
/* Path + Array Index */
- prop= RNA_def_property(srna, "rna_path", PROP_STRING, PROP_NONE);
+ prop= RNA_def_property(srna, "data_path", PROP_STRING, PROP_NONE);
RNA_def_property_string_funcs(prop, "rna_FCurve_RnaPath_get", "rna_FCurve_RnaPath_length", "rna_FCurve_RnaPath_set");
- RNA_def_property_ui_text(prop, "RNA Path", "RNA Path to property affected by F-Curve.");
+ RNA_def_property_ui_text(prop, "Data Path", "RNA Path to property affected by F-Curve.");
RNA_def_property_update(prop, NC_ANIMATION, NULL); // XXX need an update callback for this to that animation gets evaluated
prop= RNA_def_property(srna, "array_index", PROP_INT, PROP_NONE);
diff --git a/source/blender/makesrna/intern/rna_internal.h b/source/blender/makesrna/intern/rna_internal.h
index df1dd249dd1..6f4233b9337 100644
--- a/source/blender/makesrna/intern/rna_internal.h
+++ b/source/blender/makesrna/intern/rna_internal.h
@@ -207,6 +207,7 @@ void RNA_api_action(StructRNA *srna);
void RNA_api_armature_edit_bone(StructRNA *srna);
void RNA_api_drivers(StructRNA *srna);
void RNA_api_image(struct StructRNA *srna);
+void RNA_api_operator(struct StructRNA *srna);
void RNA_api_keyconfig(struct StructRNA *srna);
void RNA_api_keyingset(struct StructRNA *srna);
void RNA_api_keymap(struct StructRNA *srna);
diff --git a/source/blender/makesrna/intern/rna_modifier.c b/source/blender/makesrna/intern/rna_modifier.c
index 5a534a8ce14..aee2b048f6b 100644
--- a/source/blender/makesrna/intern/rna_modifier.c
+++ b/source/blender/makesrna/intern/rna_modifier.c
@@ -39,7 +39,6 @@
#include "BKE_animsys.h"
#include "BKE_bmesh.h" /* For BevelModifierData */
-#include "BKE_global.h"
#include "BKE_smoke.h" /* For smokeModifier_free & smokeModifier_createType */
#include "WM_api.h"
@@ -382,13 +381,6 @@ static int rna_MultiresModifier_filename_length(PointerRNA *ptr)
return strlen((external)? external->filename: "");
}
-static int rna_MultiresModifier_external_editable(PointerRNA *ptr)
-{
- MultiresModifierData *mmd = ptr->data;
-
- return (G.save_over && mmd->totlvl > 0);
-}
-
static void modifier_object_set(Object *self, Object **ob_p, int type, PointerRNA value)
{
Object *ob= value.data;
@@ -596,7 +588,6 @@ static void rna_def_modifier_multires(BlenderRNA *brna)
prop= RNA_def_property(srna, "external", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_boolean_funcs(prop, "rna_MultiresModifier_external_get", NULL);
- RNA_def_property_editable_func(prop, "rna_MultiresModifier_external_editable");
RNA_def_property_ui_text(prop, "External", "Store multires displacements outside the .blend file, to save memory.");
prop= RNA_def_property(srna, "filename", PROP_STRING, PROP_FILEPATH);
diff --git a/source/blender/makesrna/intern/rna_object.c b/source/blender/makesrna/intern/rna_object.c
index 31358a38993..c4bfb9e0197 100644
--- a/source/blender/makesrna/intern/rna_object.c
+++ b/source/blender/makesrna/intern/rna_object.c
@@ -670,6 +670,7 @@ static int rna_Object_rotation_4d_editable(PointerRNA *ptr, int index)
return PROP_EDITABLE;
}
+
static PointerRNA rna_MaterialSlot_material_get(PointerRNA *ptr)
{
Object *ob= (Object*)ptr->id.data;
@@ -1039,13 +1040,13 @@ static void rna_def_material_slot(BlenderRNA *brna)
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_pointer_funcs(prop, "rna_MaterialSlot_material_get", "rna_MaterialSlot_material_set", NULL);
RNA_def_property_ui_text(prop, "Material", "Material datablock used by this material slot.");
- RNA_def_property_update(prop, NC_OBJECT|ND_SHADING, "rna_Object_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, "rna_Object_update");
prop= RNA_def_property(srna, "link", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, link_items);
RNA_def_property_enum_funcs(prop, "rna_MaterialSlot_link_get", "rna_MaterialSlot_link_set", NULL);
RNA_def_property_ui_text(prop, "Link", "Link material to object or the object's data.");
- RNA_def_property_update(prop, NC_OBJECT|ND_SHADING, "rna_Object_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, "rna_Object_update");
prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
RNA_def_property_string_funcs(prop, "rna_MaterialSlot_name_get", "rna_MaterialSlot_name_length", NULL);
@@ -1527,13 +1528,13 @@ static void rna_def_object(BlenderRNA *brna)
RNA_def_property_pointer_funcs(prop, "rna_Object_active_material_get", "rna_Object_active_material_set", NULL);
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Active Material", "Active material being displayed.");
- RNA_def_property_update(prop, NC_OBJECT|ND_SHADING, "rna_Object_update");
+ RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, "rna_Object_update");
prop= RNA_def_property(srna, "active_material_index", PROP_INT, PROP_UNSIGNED);
RNA_def_property_int_sdna(prop, NULL, "actcol");
RNA_def_property_int_funcs(prop, "rna_Object_active_material_index_get", "rna_Object_active_material_index_set", "rna_Object_active_material_index_range");
RNA_def_property_ui_text(prop, "Active Material Index", "Index of active material slot.");
- RNA_def_property_update(prop, NC_OBJECT|ND_SHADING, NULL);
+ RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, NULL);
/* transform */
prop= RNA_def_property(srna, "location", PROP_FLOAT, PROP_TRANSLATION);
diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c
index 033a8f45809..100df4645c7 100644
--- a/source/blender/makesrna/intern/rna_scene.c
+++ b/source/blender/makesrna/intern/rna_scene.c
@@ -722,15 +722,18 @@ static void rna_def_tool_settings(BlenderRNA *brna)
RNA_def_property_enum_sdna(prop, NULL, "uv_selectmode");
RNA_def_property_enum_items(prop, uv_select_mode_items);
RNA_def_property_ui_text(prop, "UV Selection Mode", "UV selection and display mode.");
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_IMAGE, NULL);
prop= RNA_def_property(srna, "uv_sync_selection", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "uv_flag", UV_SYNC_SELECTION);
RNA_def_property_ui_text(prop, "UV Sync Selection", "Keep UV and edit mode mesh selection in sync.");
RNA_def_property_ui_icon(prop, ICON_EDIT, 0);
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_IMAGE, NULL);
prop= RNA_def_property(srna, "uv_local_view", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "uv_flag", UV_SHOW_SAME_IMAGE);
RNA_def_property_ui_text(prop, "UV Local View", "Draw only faces with the currently displayed image assigned.");
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_IMAGE, NULL);
/* Mesh */
prop= RNA_def_property(srna, "mesh_selection_mode", PROP_ENUM, PROP_NONE);
diff --git a/source/blender/makesrna/intern/rna_sequence.c b/source/blender/makesrna/intern/rna_sequence.c
index 68bfea7161d..52ce9bd721d 100644
--- a/source/blender/makesrna/intern/rna_sequence.c
+++ b/source/blender/makesrna/intern/rna_sequence.c
@@ -43,6 +43,51 @@
#ifdef RNA_RUNTIME
+/* build a temp referene to the parent */
+static void meta_tmp_ref(Sequence *seq_par, Sequence *seq)
+{
+ for (; seq; seq= seq->next) {
+ seq->tmp= seq_par;
+ if(seq->type == SEQ_META) {
+ meta_tmp_ref(seq, seq->seqbase.first);
+ }
+ }
+}
+
+static void rna_SequenceEditor_sequences_all_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
+{
+ Scene *sce= (Scene*)ptr->id.data;
+ Editing *ed= seq_give_editing(sce, FALSE);
+
+ meta_tmp_ref(NULL, ed->seqbase.first);
+
+ rna_iterator_listbase_begin(iter, &ed->seqbase, NULL);
+}
+
+static void rna_SequenceEditor_sequences_all_next(CollectionPropertyIterator *iter)
+{
+ ListBaseIterator *internal= iter->internal;
+ Sequence *seq= (Sequence*)internal->link;
+
+ if(seq->seqbase.first)
+ internal->link= (Link*)seq->seqbase.first;
+ else if(seq->next)
+ internal->link= (Link*)seq->next;
+ else {
+ internal->link= NULL;
+
+ do {
+ seq= seq->tmp; // XXX - seq's dont reference their parents!
+ if(seq && seq->next) {
+ internal->link= (Link*)seq->next;
+ break;
+ }
+ } while(seq);
+ }
+
+ iter->valid= (internal->link != NULL);
+}
+
static void rna_Sequence_start_frame_set(PointerRNA *ptr, int value)
{
Sequence *seq= (Sequence*)ptr->data;
@@ -222,7 +267,7 @@ static char *rna_Sequence_path(PointerRNA *ptr)
* TODO: would be nice to make SequenceEditor data a datablock of its own (for shorter paths)
*/
if (seq->name+2)
- return BLI_sprintfN("sequence_editor.sequences[\"%s\"]", seq->name+2);
+ return BLI_sprintfN("sequence_editor.sequences_all[\"%s\"]", seq->name+2);
else
return BLI_strdup("");
}
@@ -613,6 +658,12 @@ static void rna_def_editor(BlenderRNA *brna)
RNA_def_property_struct_type(prop, "Sequence");
RNA_def_property_ui_text(prop, "Sequences", "");
+ prop= RNA_def_property(srna, "sequences_all", PROP_COLLECTION, PROP_NONE);
+ RNA_def_property_collection_sdna(prop, NULL, "seqbase", NULL);
+ RNA_def_property_struct_type(prop, "Sequence");
+ RNA_def_property_ui_text(prop, "Sequences", "");
+ RNA_def_property_collection_funcs(prop, "rna_SequenceEditor_sequences_all_begin", "rna_SequenceEditor_sequences_all_next", 0, 0, 0, 0, 0);
+
prop= RNA_def_property(srna, "meta_stack", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_sdna(prop, NULL, "metastack", NULL);
RNA_def_property_struct_type(prop, "Sequence");
@@ -1012,72 +1063,90 @@ static void rna_def_transform(BlenderRNA *brna)
prop= RNA_def_property(srna, "scale_start_x", PROP_FLOAT, PROP_UNSIGNED);
RNA_def_property_float_sdna(prop, NULL, "ScalexIni");
+ RNA_def_property_clear_flag(prop, PROP_ANIMATEABLE); /* seq->facf0 is used to animate this */
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, "rna_Sequence_update");
prop= RNA_def_property(srna, "scale_start_y", PROP_FLOAT, PROP_UNSIGNED);
RNA_def_property_float_sdna(prop, NULL, "ScaleyIni");
+ RNA_def_property_clear_flag(prop, PROP_ANIMATEABLE); /* seq->facf0 is used to animate this */
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, "rna_Sequence_update");
prop= RNA_def_property(srna, "scale_end_x", PROP_FLOAT, PROP_UNSIGNED);
RNA_def_property_float_sdna(prop, NULL, "ScalexFin");
+ RNA_def_property_clear_flag(prop, PROP_ANIMATEABLE); /* seq->facf0 is used to animate this */
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, "rna_Sequence_update");
prop= RNA_def_property(srna, "scale_end_y", PROP_FLOAT, PROP_UNSIGNED);
RNA_def_property_float_sdna(prop, NULL, "ScaleyFin");
+ RNA_def_property_clear_flag(prop, PROP_ANIMATEABLE); /* seq->facf0 is used to animate this */
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, "rna_Sequence_update");
+
+ prop= RNA_def_property(srna, "uniform_scale", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "uniform_scale", 0);
+ RNA_def_property_clear_flag(prop, PROP_ANIMATEABLE); /* not meant to be animated */
+ RNA_def_property_ui_text(prop, "Uniform Scale", "Scale uniformly, preserving aspect ratio.");
+ RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
prop= RNA_def_property(srna, "translate_start_x", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "xIni");
+ RNA_def_property_clear_flag(prop, PROP_ANIMATEABLE); /* seq->facf0 is used to animate this */
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, "rna_Sequence_update");
prop= RNA_def_property(srna, "translate_start_y", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "yIni");
+ RNA_def_property_clear_flag(prop, PROP_ANIMATEABLE); /* seq->facf0 is used to animate this */
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, "rna_Sequence_update");
prop= RNA_def_property(srna, "translate_end_x", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "xFin");
+ RNA_def_property_clear_flag(prop, PROP_ANIMATEABLE); /* seq->facf0 is used to animate this */
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, "rna_Sequence_update");
prop= RNA_def_property(srna, "translate_end_y", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "yFin");
+ RNA_def_property_clear_flag(prop, PROP_ANIMATEABLE); /* seq->facf0 is used to animate this */
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, "rna_Sequence_update");
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_clear_flag(prop, PROP_ANIMATEABLE); /* seq->facf0 is used to animate this */
+ RNA_def_property_range(prop, -360.0f, 360.0f);
RNA_def_property_ui_text(prop, "Rotation Start", "");
RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
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_clear_flag(prop, PROP_ANIMATEABLE); /* seq->facf0 is used to animate this */
+ RNA_def_property_range(prop, -360.0f, 360.0f);
RNA_def_property_ui_text(prop, "Rotation End", "");
RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
prop= RNA_def_property(srna, "translation_unit", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "percent");
+ RNA_def_property_clear_flag(prop, PROP_ANIMATEABLE); /* not meant to be animated */
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, "rna_Sequence_update");
prop= RNA_def_property(srna, "interpolation", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, interpolation_items);
+ RNA_def_property_clear_flag(prop, PROP_ANIMATEABLE); /* not meant to be animated */
RNA_def_property_ui_text(prop, "Interpolation", "");
RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
}
@@ -1086,7 +1155,7 @@ static void rna_def_solid_color(BlenderRNA *brna)
{
StructRNA *srna;
PropertyRNA *prop;
-
+
srna = RNA_def_struct(brna, "ColorSequence", "EffectSequence");
RNA_def_struct_ui_text(srna, "Color Sequence", "Sequence strip creating an image filled with a single color.");
RNA_def_struct_sdna_from(srna, "SolidColorVars", "effectdata");
diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c
index ef72b6cbf1f..20ef8519bb2 100644
--- a/source/blender/makesrna/intern/rna_space.c
+++ b/source/blender/makesrna/intern/rna_space.c
@@ -1042,7 +1042,6 @@ static void rna_def_space_image(BlenderRNA *brna)
/* update */
prop= RNA_def_property(srna, "update_automatically", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "lock", 0);
- RNA_def_property_ui_icon(prop, ICON_UNLOCKED, 1);
RNA_def_property_ui_text(prop, "Update Automatically", "Update other affected window spaces automatically to reflect changes during interactive operations such as transform.");
/* state */
@@ -1351,7 +1350,7 @@ static void rna_def_space_graph(BlenderRNA *brna)
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_GRAPH, NULL);
prop= RNA_def_property(srna, "show_handles", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "flag", SIPO_NOHANDLES);
+ RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", SIPO_NOHANDLES);
RNA_def_property_ui_text(prop, "Show Handles", "Show handles of Bezier control points.");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_GRAPH, NULL);
@@ -1459,7 +1458,6 @@ static void rna_def_space_time(BlenderRNA *brna)
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", "");
@@ -1495,17 +1493,16 @@ static void rna_def_space_time(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Node Windows", "");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_TIME, "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");
- RNA_def_property_update(prop, NC_SPACE|ND_SPACE_TIME, NULL);
-
+ /* Other options */
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_SPACE|ND_SPACE_TIME, NULL);
+
+ prop= RNA_def_property(srna, "show_cframe_indicator", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", TIME_CFRA_NUM);
+ RNA_def_property_ui_text(prop, "Show Frame Number Indicator", "Show frame number beside the current frame indicator line.");
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_TIME, NULL);
}
static void rna_def_console_line(BlenderRNA *brna)
diff --git a/source/blender/makesrna/intern/rna_ui_api.c b/source/blender/makesrna/intern/rna_ui_api.c
index 6086cdfdec2..0955ec1c581 100644
--- a/source/blender/makesrna/intern/rna_ui_api.c
+++ b/source/blender/makesrna/intern/rna_ui_api.c
@@ -64,7 +64,7 @@ static PointerRNA rna_uiItemO(uiLayout *layout, char *name, int icon, char *opna
#else
-#define DEF_ICON(name) {name, #name, 0, #name, ""},
+#define DEF_ICON(name) {name, (#name)+5, 0, (#name)+5, ""},
static EnumPropertyItem icon_items[] = {
#include "UI_icons.h"
{0, NULL, 0, NULL, NULL}};
@@ -145,6 +145,7 @@ void RNA_api_ui_layout(StructRNA *srna)
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.0f, 0.0f, 1.0f, "Percentage", "Percentage of width to split at.", 0.0f, 1.0f);
+ RNA_def_boolean(func, "align", 0, "", "Align buttons to each other.");
/* items */
func= RNA_def_function(srna, "prop", "rna_uiItemR");
diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c
index 2424a72b6a3..21e601c3ba3 100644
--- a/source/blender/makesrna/intern/rna_userdef.c
+++ b/source/blender/makesrna/intern/rna_userdef.c
@@ -2338,6 +2338,11 @@ static void rna_def_userdef_input(BlenderRNA *brna)
RNA_def_property_range(prop, 0, 200);
RNA_def_property_ui_text(prop, "NDof Rotation Speed", "The overall rotation speed of an NDOF device, as percent of standard.");
+ prop= RNA_def_property(srna, "double_click_time", PROP_INT, PROP_NONE);
+ RNA_def_property_int_sdna(prop, NULL, "dbl_click_time");
+ RNA_def_property_range(prop, 1, 1000);
+ RNA_def_property_ui_text(prop, "Double Click Timeout", "The time (in ms) for a double click.");
+
prop= RNA_def_property(srna, "emulate_3_button_mouse", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", USER_TWOBUTTONMOUSE);
RNA_def_property_boolean_funcs(prop, NULL, "rna_userdef_emulate_set");
@@ -2353,6 +2358,13 @@ static void rna_def_userdef_filepaths(BlenderRNA *brna)
PropertyRNA *prop;
StructRNA *srna;
+ static EnumPropertyItem anim_player_presets[] = {
+ //{0, "INTERNAL", 0, "Internal", "Built-in animation player"}, // doesn't work yet!
+ {0, "BLENDER24", 0, "Blender 2.4", "Blender command line animation playback - path to Blender 2.4"},
+ {2, "DJV", 0, "Djv", "Open source frame player: http://djv.sourceforge.net"},
+ {3, "CUSTOM", 0, "Custom", "Custom animation player executable path"},
+ {0, NULL, 0, NULL, NULL}};
+
srna= RNA_def_struct(brna, "UserPreferencesFilePaths", NULL);
RNA_def_struct_sdna(srna, "UserDef");
RNA_def_struct_nested(brna, srna, "UserPreferences");
@@ -2409,7 +2421,16 @@ static void rna_def_userdef_filepaths(BlenderRNA *brna)
prop= RNA_def_property(srna, "temporary_directory", PROP_STRING, PROP_DIRPATH);
RNA_def_property_string_sdna(prop, NULL, "tempdir");
RNA_def_property_ui_text(prop, "Temporary Directory", "The directory for storing temporary save files.");
+
+ prop= RNA_def_property(srna, "animation_player", PROP_STRING, PROP_DIRPATH);
+ RNA_def_property_string_sdna(prop, NULL, "anim_player");
+ RNA_def_property_ui_text(prop, "Animation Player", "Path to a custom animation/frame sequence player.");
+ prop= RNA_def_property(srna, "animation_player_preset", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_sdna(prop, NULL, "anim_player_preset");
+ RNA_def_property_enum_items(prop, anim_player_presets);
+ RNA_def_property_ui_text(prop, "Animation Player Preset", "Preset configs for external animation players");
+
/* Autosave */
prop= RNA_def_property(srna, "save_version", PROP_INT, PROP_NONE);
diff --git a/source/blender/makesrna/intern/rna_wm.c b/source/blender/makesrna/intern/rna_wm.c
index 6459e5d7c48..5cf9c245b05 100644
--- a/source/blender/makesrna/intern/rna_wm.c
+++ b/source/blender/makesrna/intern/rna_wm.c
@@ -43,6 +43,7 @@ EnumPropertyItem event_keymouse_value_items[] = {
{KM_PRESS, "PRESS", 0, "Press", ""},
{KM_RELEASE, "RELEASE", 0, "Release", ""},
{KM_CLICK, "CLICK", 0, "Click", ""},
+ {KM_DBL_CLICK, "DOUBLE_CLICK", 0, "Double Click", ""},
{0, NULL, 0, NULL, NULL}};
EnumPropertyItem event_tweak_value_items[]= {
@@ -251,6 +252,18 @@ EnumPropertyItem operator_return_items[] = {
{OPERATOR_PASS_THROUGH, "PASS_THROUGH", 0, "Pass Through", ""}, // used as a flag
{0, NULL, 0, NULL, NULL}};
+/* flag/enum */
+EnumPropertyItem wm_report_items[] = {
+ {RPT_DEBUG, "DEBUG", 0, "Debug", ""},
+ {RPT_INFO, "INFO", 0, "Info", ""},
+ {RPT_OPERATOR, "OPERATOR", 0, "Operator", ""},
+ {RPT_WARNING, "WARNING", 0, "Warning", ""},
+ {RPT_ERROR, "ERROR", 0, "Error", ""},
+ {RPT_ERROR_INVALID_INPUT, "ERROR_INVALID_INPUT", 0, "Invalid Input", ""},\
+ {RPT_ERROR_INVALID_CONTEXT, "ERROR_INVALID_CONTEXT", 0, "Invalid Context", ""},
+ {RPT_ERROR_OUT_OF_MEMORY, "ERROR_OUT_OF_MEMORY", 0, "Out of Memory", ""},
+ {0, NULL, 0, NULL, NULL}};
+
#define KMI_TYPE_KEYBOARD 0
#define KMI_TYPE_MOUSE 1
#define KMI_TYPE_TWEAK 2
@@ -601,10 +614,13 @@ static void rna_def_operator(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Properties", "");
RNA_def_property_pointer_funcs(prop, "rna_Operator_properties_get", NULL, NULL);
+ RNA_api_operator(srna);
+
srna= RNA_def_struct(brna, "OperatorProperties", NULL);
RNA_def_struct_ui_text(srna, "Operator Properties", "Input properties of an Operator.");
RNA_def_struct_refine_func(srna, "rna_OperatorProperties_refine");
RNA_def_struct_idproperties_func(srna, "rna_OperatorProperties_idproperties");
+
}
static void rna_def_macro_operator(BlenderRNA *brna)
@@ -856,16 +872,19 @@ static void rna_def_keyconfig(BlenderRNA *brna)
prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "idname");
+ RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Name", "Name of the key map.");
RNA_def_struct_name_property(srna, prop);
prop= RNA_def_property(srna, "space_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "spaceid");
+ RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_enum_items(prop, space_type_items);
RNA_def_property_ui_text(prop, "Space Type", "Optional space type keymap is associated with.");
prop= RNA_def_property(srna, "region_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "regionid");
+ RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_enum_items(prop, region_type_items);
RNA_def_property_ui_text(prop, "Region Type", "Optional region type keymap is associated with.");
@@ -879,8 +898,14 @@ static void rna_def_keyconfig(BlenderRNA *brna)
prop= RNA_def_property(srna, "modal", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", KEYMAP_MODAL);
+ RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Modal Keymap", "Indicates that a keymap is used for translate modal events for an operator.");
+ prop= RNA_def_property(srna, "expanded", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", KEYMAP_EXPANDED);
+ RNA_def_property_ui_text(prop, "Expanded", "Expanded in the user interface.");
+
+
RNA_api_keymap(srna);
/* KeyMapItem */
diff --git a/source/blender/makesrna/intern/rna_wm_api.c b/source/blender/makesrna/intern/rna_wm_api.c
index 2fbcd2f4ae3..47d15c87596 100644
--- a/source/blender/makesrna/intern/rna_wm_api.c
+++ b/source/blender/makesrna/intern/rna_wm_api.c
@@ -134,6 +134,11 @@ static wmKeyMapItem *rna_KeyMap_add_item(wmKeyMap *km, ReportList *reports, char
return WM_keymap_add_item(km, idname, type, value, modifier, keymodifier);
}
+static void rna_Operator_report(wmOperator *op, int type, char *msg)
+{
+ BKE_report(op->reports, type, msg);
+}
+
#else
void RNA_api_wm(StructRNA *srna)
@@ -177,6 +182,18 @@ void RNA_api_wm(StructRNA *srna)
parm= RNA_def_int(func, "height", 20, 0, INT_MAX, "", "Height of the popup.", 0, INT_MAX);
}
+void RNA_api_operator(StructRNA *srna)
+{
+ FunctionRNA *func;
+ PropertyRNA *parm;
+
+ func= RNA_def_function(srna, "report", "rna_Operator_report");
+ parm= RNA_def_enum(func, "type", wm_report_items, 0, "Type", "");
+ RNA_def_property_flag(parm, PROP_REQUIRED|PROP_ENUM_FLAG);
+ parm= RNA_def_string(func, "message", "", 0, "Report Message", "");
+ RNA_def_property_flag(parm, PROP_REQUIRED);
+}
+
void RNA_api_keyconfig(StructRNA *srna)
{
FunctionRNA *func;