diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2008-12-31 18:02:40 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2008-12-31 18:02:40 +0300 |
commit | b65a3e9337ac1d9c3870e0e04ee96090bc7e9b23 (patch) | |
tree | b9eb920e1c9dfab0900d9277c31442330ced7870 /source/blender | |
parent | ba91587183105fb7edcab3d4f4e37ce0078bd86e (diff) |
RNA
* DNA_text_types.h done, patch by Roelf de Kock.
* Minor naming fixes in RNA-RNA.
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/editors/space_outliner/outliner.c | 12 | ||||
-rw-r--r-- | source/blender/makesrna/RNA_access.h | 1 | ||||
-rw-r--r-- | source/blender/makesrna/intern/makesrna.c | 1 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_ID.c | 1 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_internal.h | 1 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_main.c | 2 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_rna.c | 12 |
7 files changed, 18 insertions, 12 deletions
diff --git a/source/blender/editors/space_outliner/outliner.c b/source/blender/editors/space_outliner/outliner.c index 47e6613834b..536f49db82d 100644 --- a/source/blender/editors/space_outliner/outliner.c +++ b/source/blender/editors/space_outliner/outliner.c @@ -3180,19 +3180,19 @@ static int tselem_rna_icon(PointerRNA *ptr) else if(rnatype == &RNA_Group) return ICON_GROUP; /*else if(rnatype == &RNA_Particle) - return ICON_PARTICLES);*/ + return ICON_PARTICLES;*/ else if(rnatype == &RNA_Material) return ICON_MATERIAL; /*else if(rnatype == &RNA_Texture) - return ICON_TEXTURE);*/ + return ICON_TEXTURE;*/ else if(rnatype == &RNA_Image) return ICON_TEXTURE; else if(rnatype == &RNA_Screen) return ICON_SPLITSCREEN; else if(rnatype == &RNA_NodeTree) return ICON_NODE; - /*else if(rnatype == &RNA_Text) - return ICON_TEXT);*/ + else if(rnatype == &RNA_Text) + return ICON_TEXT; else if(rnatype == &RNA_Sound) return ICON_SOUND; else if(rnatype == &RNA_Brush) @@ -3200,7 +3200,7 @@ static int tselem_rna_icon(PointerRNA *ptr) else if(rnatype == &RNA_Library) return ICON_LIBRARY_DEHLT; /*else if(rnatype == &RNA_Action) - return ICON_ACTION);*/ + return ICON_ACTION;*/ else if(rnatype == &RNA_Ipo) return ICON_IPO_DEHLT; else if(rnatype == &RNA_Key) @@ -3217,6 +3217,8 @@ static int tselem_rna_icon(PointerRNA *ptr) return ICON_RNA; else if(rnatype == &RNA_FloatProperty) return ICON_RNA; + else if(rnatype == &RNA_StringProperty) + return ICON_RNA; else if(rnatype == &RNA_EnumProperty) return ICON_RNA; else if(rnatype == &RNA_EnumPropertyItem) diff --git a/source/blender/makesrna/RNA_access.h b/source/blender/makesrna/RNA_access.h index 20ef6436bd2..ce5160b66a4 100644 --- a/source/blender/makesrna/RNA_access.h +++ b/source/blender/makesrna/RNA_access.h @@ -192,6 +192,7 @@ extern StructRNA RNA_SpeedControlSequence; extern StructRNA RNA_StringProperty; extern StructRNA RNA_Struct; extern StructRNA RNA_SubsurfModifier; +extern StructRNA RNA_Text; extern StructRNA RNA_TextBox; extern StructRNA RNA_TouchSensor; extern StructRNA RNA_TransformSequence; diff --git a/source/blender/makesrna/intern/makesrna.c b/source/blender/makesrna/intern/makesrna.c index 90ea78c54ea..aac2c668c87 100644 --- a/source/blender/makesrna/intern/makesrna.c +++ b/source/blender/makesrna/intern/makesrna.c @@ -928,6 +928,7 @@ RNAProcessItem PROCESS_ITEMS[]= { {"rna_screen.c", RNA_def_screen}, {"rna_sensor.c", RNA_def_sensor}, {"rna_sequence.c", RNA_def_sequence}, + {"rna_text.c", RNA_def_text}, {"rna_sound.c", RNA_def_sound}, {"rna_vfont.c", RNA_def_vfont}, {"rna_wm.c", RNA_def_wm}, diff --git a/source/blender/makesrna/intern/rna_ID.c b/source/blender/makesrna/intern/rna_ID.c index ba252f30994..af72efcba28 100644 --- a/source/blender/makesrna/intern/rna_ID.c +++ b/source/blender/makesrna/intern/rna_ID.c @@ -77,6 +77,7 @@ static StructRNA *rna_ID_refine(PointerRNA *ptr) case ID_SCE: return &RNA_Scene; case ID_SCR: return &RNA_Screen; case ID_SO: return &RNA_Sound; + case ID_TXT: return &RNA_Text; case ID_VF: return &RNA_VectorFont; case ID_WO: return &RNA_World; case ID_WM: return &RNA_WindowManager; diff --git a/source/blender/makesrna/intern/rna_internal.h b/source/blender/makesrna/intern/rna_internal.h index e3c84f88fc9..e1df48ecff6 100644 --- a/source/blender/makesrna/intern/rna_internal.h +++ b/source/blender/makesrna/intern/rna_internal.h @@ -125,6 +125,7 @@ void RNA_def_scene(struct BlenderRNA *brna); void RNA_def_screen(struct BlenderRNA *brna); void RNA_def_sensor(struct BlenderRNA *brna); void RNA_def_sequence(struct BlenderRNA *brna); +void RNA_def_text(struct BlenderRNA *brna); void RNA_def_sound(struct BlenderRNA *brna); void RNA_def_vfont(struct BlenderRNA *brna); void RNA_def_wm(struct BlenderRNA *brna); diff --git a/source/blender/makesrna/intern/rna_main.c b/source/blender/makesrna/intern/rna_main.c index cf6ebce2db6..0f809b99edc 100644 --- a/source/blender/makesrna/intern/rna_main.c +++ b/source/blender/makesrna/intern/rna_main.c @@ -243,7 +243,7 @@ void RNA_def_main(BlenderRNA *brna) {"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", "ID", "rna_Main_text_begin", "Texts", "Text 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", "ID", "rna_Main_action_begin", "Actions", "Action datablocks."}, diff --git a/source/blender/makesrna/intern/rna_rna.c b/source/blender/makesrna/intern/rna_rna.c index 66cfa0c5d9a..47bfb1c8a4e 100644 --- a/source/blender/makesrna/intern/rna_rna.c +++ b/source/blender/makesrna/intern/rna_rna.c @@ -242,10 +242,10 @@ static int rna_Property_subtype_get(PointerRNA *ptr) return prop->subtype; } -static int rna_Property_readonly_get(PointerRNA *ptr) +static int rna_Property_editable_get(PointerRNA *ptr) { PropertyRNA *prop= (PropertyRNA*)ptr->data; - return RNA_property_editable(ptr, prop) ? 0 : 1; + return RNA_property_editable(ptr, prop); } static int rna_Property_array_length_get(PointerRNA *ptr) @@ -420,7 +420,7 @@ static void rna_def_struct(BlenderRNA *brna) prop= RNA_def_property(srna, "description", PROP_STRING, PROP_NONE); RNA_def_property_flag(prop, PROP_NOT_EDITABLE); RNA_def_property_string_funcs(prop, "rna_Struct_description_get", "rna_Struct_description_length", NULL); - RNA_def_property_ui_text(prop, "description", "This field explains the Struct's purpose"); + RNA_def_property_ui_text(prop, "Description", "Description of the Struct's purpose."); prop= RNA_def_property(srna, "base", PROP_POINTER, PROP_NONE); RNA_def_property_flag(prop, PROP_NOT_EDITABLE); @@ -497,10 +497,10 @@ static void rna_def_property(BlenderRNA *brna) RNA_def_property_enum_funcs(prop, "rna_Property_subtype_get", NULL); RNA_def_property_ui_text(prop, "Subtype", "Semantic interpretation of the property."); - prop= RNA_def_property(srna, "readonly", PROP_INT, PROP_NONE); + prop= RNA_def_property(srna, "editable", PROP_BOOLEAN, PROP_NONE); RNA_def_property_flag(prop, PROP_NOT_EDITABLE); - RNA_def_property_int_funcs(prop, "rna_Property_readonly_get", NULL, NULL); - RNA_def_property_ui_text(prop, "Read Only", "Read Only setting for this property"); + RNA_def_property_boolean_funcs(prop, "rna_Property_editable_get", NULL); + RNA_def_property_ui_text(prop, "Editable", "Property is editable through RNA."); } static void rna_def_number_property(StructRNA *srna, PropertyType type) |