diff options
author | Campbell Barton <ideasman42@gmail.com> | 2015-02-19 02:02:51 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2015-02-19 03:59:24 +0300 |
commit | eee79641c362c974c40cbd289cf14685c6b86f92 (patch) | |
tree | bffc66186dff72c3424a81a2866b928c6fbbf1f4 /source/blender | |
parent | a74bd1bec743ab35418f9b23fa5dce545cd14930 (diff) |
RNA: poll functions restricting object types
D1100,D1105,D1106 by @lichtwerk
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/makesrna/intern/rna_constraint.c | 1 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_modifier.c | 3 |
2 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/makesrna/intern/rna_constraint.c b/source/blender/makesrna/intern/rna_constraint.c index b6845b1df2e..aaacf07567e 100644 --- a/source/blender/makesrna/intern/rna_constraint.c +++ b/source/blender/makesrna/intern/rna_constraint.c @@ -2286,6 +2286,7 @@ static void rna_def_constraint_spline_ik(BlenderRNA *brna) /* target chain */ prop = RNA_def_property(srna, "target", PROP_POINTER, PROP_NONE); RNA_def_property_pointer_sdna(prop, NULL, "tar"); + RNA_def_property_pointer_funcs(prop, NULL, NULL, NULL, "rna_Curve_object_poll"); RNA_def_property_ui_text(prop, "Target", "Curve that controls this relationship"); RNA_def_property_flag(prop, PROP_EDITABLE); RNA_def_property_update(prop, NC_OBJECT | ND_CONSTRAINT, "rna_Constraint_dependency_update"); diff --git a/source/blender/makesrna/intern/rna_modifier.c b/source/blender/makesrna/intern/rna_modifier.c index 75a1def036d..656c19e8108 100644 --- a/source/blender/makesrna/intern/rna_modifier.c +++ b/source/blender/makesrna/intern/rna_modifier.c @@ -2276,7 +2276,7 @@ static void rna_def_modifier_meshdeform(BlenderRNA *brna) prop = RNA_def_property(srna, "object", PROP_POINTER, PROP_NONE); RNA_def_property_ui_text(prop, "Object", "Mesh object to deform with"); - RNA_def_property_pointer_funcs(prop, NULL, "rna_MeshDeformModifier_object_set", NULL, NULL); + RNA_def_property_pointer_funcs(prop, NULL, "rna_MeshDeformModifier_object_set", NULL, "rna_Mesh_object_poll"); RNA_def_property_flag(prop, PROP_EDITABLE | PROP_ID_SELF_CHECK); RNA_def_property_update(prop, 0, "rna_Modifier_dependency_update"); @@ -2352,6 +2352,7 @@ static void rna_def_modifier_particleinstance(BlenderRNA *brna) prop = RNA_def_property(srna, "object", PROP_POINTER, PROP_NONE); RNA_def_property_pointer_sdna(prop, NULL, "ob"); + RNA_def_property_pointer_funcs(prop, NULL, NULL, NULL, "rna_Mesh_object_poll"); RNA_def_property_ui_text(prop, "Object", "Object that has the particle system"); RNA_def_property_flag(prop, PROP_EDITABLE | PROP_ID_SELF_CHECK); RNA_def_property_update(prop, 0, "rna_Modifier_dependency_update"); |