diff options
author | Thomas Dinges <blender@dingto.org> | 2009-07-28 10:26:10 +0400 |
---|---|---|
committer | Thomas Dinges <blender@dingto.org> | 2009-07-28 10:26:10 +0400 |
commit | 9cbdf73cf0ce53bdf256b1b28efbb066a71e43b9 (patch) | |
tree | fa26fb8fba8cf844435196b42438cab4c4ba66fe /source | |
parent | 0b3eb956c4f2faa3c4ae7153fe62da5eda80a751 (diff) |
2.5 Part 2 of Layout Code Cleanup:
* Cleanup of Modifier and Text Data Panels.
* Made some small layout tweaks.
* Added missing RNA properties for Cast Modifier.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/makesrna/intern/rna_modifier.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_modifier.c b/source/blender/makesrna/intern/rna_modifier.c index b3dfc6a8dd6..c89cc4ad63e 100644 --- a/source/blender/makesrna/intern/rna_modifier.c +++ b/source/blender/makesrna/intern/rna_modifier.c @@ -311,6 +311,11 @@ static void rna_CurveModifier_object_set(PointerRNA *ptr, PointerRNA value) modifier_object_set(&((CurveModifierData*)ptr->data)->object, OB_CURVE, value); } +static void rna_CastModifier_object_set(PointerRNA *ptr, PointerRNA value) +{ + modifier_object_set(&((CastModifierData*)ptr->data)->object, OB_MESH, value); +} + static void rna_ArmatureModifier_object_set(PointerRNA *ptr, PointerRNA value) { modifier_object_set(&((ArmatureModifierData*)ptr->data)->object, OB_ARMATURE, value); @@ -1203,6 +1208,12 @@ static void rna_def_modifier_cast(BlenderRNA *brna) RNA_def_property_enum_items(prop, prop_cast_type_items); RNA_def_property_ui_text(prop, "Cast Type", ""); RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update"); + + prop= RNA_def_property(srna, "object", PROP_POINTER, PROP_NONE); + RNA_def_property_ui_text(prop, "Object", "Control object: if available, its location determines the center of the effect"); + RNA_def_property_pointer_funcs(prop, NULL, "rna_CastModifier_object_set", NULL); + RNA_def_property_flag(prop, PROP_EDITABLE); + RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_dependency_update"); prop= RNA_def_property(srna, "x", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", MOD_CAST_X); @@ -1219,6 +1230,16 @@ static void rna_def_modifier_cast(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Z", ""); RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update"); + prop= RNA_def_property(srna, "from_radius", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "flag", MOD_CAST_SIZE_FROM_RADIUS); + RNA_def_property_ui_text(prop, "From Radius", "Use radius as size of projection shape (0 = auto)"); + RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update"); + + prop= RNA_def_property(srna, "use_transform", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "flag", MOD_CAST_USE_OB_TRANSFORM); + RNA_def_property_ui_text(prop, "Use transform", "Use object transform to control projection shape"); + RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update"); + prop= RNA_def_property(srna, "factor", PROP_FLOAT, PROP_NONE); RNA_def_property_float_sdna(prop, NULL, "fac"); RNA_def_property_range(prop, -FLT_MAX, FLT_MAX); |