diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2009-05-29 03:23:47 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2009-05-29 03:23:47 +0400 |
commit | a591a47c4337b62304a1d69b0e7de009bf3742bd (patch) | |
tree | 12e8c556da00b868b2c0015669fd0b4c501a0fc1 /source/blender/makesrna/intern/rna_modifier.c | |
parent | 9cc638fb161c1a9795dc3351520ad16c573b4f1f (diff) |
RNA:
* Automatically do us++ and us-- reference counting in ID pointer
set functions.
* Added an enum property callback to dynamically vary the list of
available items.
* Added some functions to do removes on pointers and collections
runtime defined for RNA and using ID properties.
* Constraints now have owner/target space wrapped, and most
pointers made editable. They can be ported to use python layouts.
* Also other pointers made editable that I think are see now with
the automatic reference counting.
Diffstat (limited to 'source/blender/makesrna/intern/rna_modifier.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_modifier.c | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/source/blender/makesrna/intern/rna_modifier.c b/source/blender/makesrna/intern/rna_modifier.c index 35892cefc8a..bc3da3b5a9e 100644 --- a/source/blender/makesrna/intern/rna_modifier.c +++ b/source/blender/makesrna/intern/rna_modifier.c @@ -293,18 +293,6 @@ static void modifier_object_set(Object **ob_p, int type, PointerRNA value) *ob_p= ob; } -static void modifier_ID_set(ID **id_p, PointerRNA value) -{ - ID *id= value.data; - - if(*id_p) - id_us_min(*id_p); - if(id) - id_us_plus(id); - - *id_p = id; -} - static void rna_LatticeModifier_object_set(PointerRNA *ptr, PointerRNA value) { modifier_object_set(&((LatticeModifierData*)ptr->data)->object, OB_LATTICE, value); @@ -360,21 +348,6 @@ static void rna_ArrayModifier_curve_set(PointerRNA *ptr, PointerRNA value) modifier_object_set(&((ArrayModifierData*)ptr->data)->curve_ob, OB_CURVE, value); } -static void rna_WaveModifier_texture_set(PointerRNA *ptr, PointerRNA value) -{ - modifier_ID_set((ID**)&((WaveModifierData*)ptr->data)->texture, value); -} - -static void rna_DisplaceModifier_texture_set(PointerRNA *ptr, PointerRNA value) -{ - modifier_ID_set((ID**)&((DisplaceModifierData*)ptr->data)->texture, value); -} - -static void rna_UVProjectModifier_image_set(PointerRNA *ptr, PointerRNA value) -{ - modifier_ID_set((ID**)&((UVProjectModifierData*)ptr->data)->image, value); -} - #else static void rna_def_property_subdivision_common(StructRNA *srna, const char type[]) @@ -714,7 +687,6 @@ static void rna_def_modifier_wave(BlenderRNA *brna) prop= RNA_def_property(srna, "texture", PROP_POINTER, PROP_NONE); RNA_def_property_ui_text(prop, "Texture", "Texture for modulating the wave."); - RNA_def_property_pointer_funcs(prop, NULL, "rna_WaveModifier_texture_set"); RNA_def_property_flag(prop, PROP_EDITABLE); RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update"); @@ -1045,7 +1017,6 @@ static void rna_def_modifier_displace(BlenderRNA *brna) prop= RNA_def_property(srna, "texture", PROP_POINTER, PROP_NONE); RNA_def_property_ui_text(prop, "Texture", ""); - RNA_def_property_pointer_funcs(prop, NULL, "rna_DisplaceModifier_texture_set"); RNA_def_property_flag(prop, PROP_EDITABLE); RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update"); @@ -1107,7 +1078,6 @@ static void rna_def_modifier_uvproject(BlenderRNA *brna) prop= RNA_def_property(srna, "image", PROP_POINTER, PROP_NONE); RNA_def_property_ui_text(prop, "Image", ""); - RNA_def_property_pointer_funcs(prop, NULL, "rna_UVProjectModifier_image_set"); RNA_def_property_flag(prop, PROP_EDITABLE); RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update"); |