diff options
Diffstat (limited to 'source/blender/makesrna/intern/rna_curve.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_curve.c | 40 |
1 files changed, 36 insertions, 4 deletions
diff --git a/source/blender/makesrna/intern/rna_curve.c b/source/blender/makesrna/intern/rna_curve.c index 179bc8bcd7d..faef93247d9 100644 --- a/source/blender/makesrna/intern/rna_curve.c +++ b/source/blender/makesrna/intern/rna_curve.c @@ -229,6 +229,38 @@ static void rna_Curve_update_deps(bContext *C, PointerRNA *ptr) rna_Curve_update_data(C, ptr); } +static void rna_Curve_resolution_u_update_data(bContext *C, PointerRNA *ptr) +{ + Curve *cu= (Curve*)ptr->id.data; + Nurb *nu=NULL; + + if (cu->editnurb) nu= cu->editnurb->first; + else nu=cu->nurb.first; + + while(nu) { + nu->resolu= cu->resolu; + nu= nu->next; + } + + rna_Curve_update_data(C, ptr); +} + +static void rna_Curve_resolution_v_update_data(bContext *C, PointerRNA *ptr) +{ + Curve *cu= (Curve*)ptr->id.data; + Nurb *nu=NULL; + + if (cu->editnurb) nu= cu->editnurb->first; + else nu=cu->nurb.first; + + while(nu) { + nu->resolv= cu->resolv; + nu= nu->next; + } + + rna_Curve_update_data(C, ptr); +} + /* name functions that ignore the first two ID characters */ void rna_Curve_body_get(PointerRNA *ptr, char *value) { @@ -547,13 +579,13 @@ static void rna_def_font(BlenderRNA *brna, StructRNA *srna) prop= RNA_def_property(srna, "offset_x", 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_ui_text(prop, "X Offset", "Horizontal offset from the object origin"); RNA_def_property_update(prop, 0, "rna_Curve_update_data"); prop= RNA_def_property(srna, "offset_y", 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_ui_text(prop, "Y Offset", "Vertical offset from the object origin"); RNA_def_property_update(prop, 0, "rna_Curve_update_data"); prop= RNA_def_property(srna, "ul_position", PROP_FLOAT, PROP_NONE); @@ -792,13 +824,13 @@ static void rna_def_curve(BlenderRNA *brna) 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"); + RNA_def_property_update(prop, 0, "rna_Curve_resolution_u_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"); + RNA_def_property_update(prop, 0, "rna_Curve_resolution_v_update_data"); prop= RNA_def_property(srna, "render_resolution_u", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "resolu_ren"); |