diff options
author | Campbell Barton <ideasman42@gmail.com> | 2010-07-30 10:48:18 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2010-07-30 10:48:18 +0400 |
commit | 648f40f409f1f3fd351a9baa3d0a9f29c4033cf1 (patch) | |
tree | 9828641c5e9333c697c5d8647e1fa2eb1c9820bf /source/blender/makesrna/intern | |
parent | 449f8ce4feeef8cfa57a8cbe299e0e718b9473b4 (diff) |
bugfix [#22660] Text Boxes properties are not animateable.
suggestion [#23093] Curve -> CurveMapping in brush...
Diffstat (limited to 'source/blender/makesrna/intern')
-rw-r--r-- | source/blender/makesrna/intern/rna_brush.c | 2 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_curve.c | 15 |
2 files changed, 15 insertions, 2 deletions
diff --git a/source/blender/makesrna/intern/rna_brush.c b/source/blender/makesrna/intern/rna_brush.c index 7a08e1403e3..b9664c556db 100644 --- a/source/blender/makesrna/intern/rna_brush.c +++ b/source/blender/makesrna/intern/rna_brush.c @@ -731,7 +731,7 @@ static void rna_def_brush(BlenderRNA *brna) prop= RNA_def_property(srna, "curve", PROP_POINTER, PROP_NONE); RNA_def_property_flag(prop, PROP_NEVER_NULL); - RNA_def_property_ui_text(prop, "Curve", "Editable falloff curve"); + RNA_def_property_ui_text(prop, "CurveMapping", "Editable falloff curve"); RNA_def_property_update(prop, 0, "rna_Brush_update"); /* texture */ diff --git a/source/blender/makesrna/intern/rna_curve.c b/source/blender/makesrna/intern/rna_curve.c index 84807446f50..e006f3444b0 100644 --- a/source/blender/makesrna/intern/rna_curve.c +++ b/source/blender/makesrna/intern/rna_curve.c @@ -510,6 +510,18 @@ static void rna_Curve_active_spline_set(PointerRNA *ptr, PointerRNA value) cu->actnu= BLI_findindex(nubase, nu); } +static char *rna_TextBox_path(PointerRNA *ptr) +{ + Curve *cu= (Curve*)ptr->id.data; + TextBox *tb= ptr->data; + int index= (int)(tb - cu->tb); + + if (index >= 0 && index < cu->totbox) + return BLI_sprintfN("textboxes[%d]", index); + else + return BLI_strdup(""); +} + #else static void rna_def_bpoint(BlenderRNA *brna) @@ -841,7 +853,6 @@ static void rna_def_textbox(BlenderRNA *brna) srna= RNA_def_struct(brna, "TextBox", NULL); RNA_def_struct_ui_text(srna, "Text Box", "Text bounding box for layout"); - // XXX: still needs path function /* number values */ prop= RNA_def_property(srna, "x", PROP_FLOAT, PROP_NONE); @@ -867,6 +878,8 @@ static void rna_def_textbox(BlenderRNA *brna) 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"); + + RNA_def_struct_path_func(srna, "rna_TextBox_path"); } static void rna_def_charinfo(BlenderRNA *brna) |