diff options
author | Campbell Barton <ideasman42@gmail.com> | 2010-08-03 10:51:36 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2010-08-03 10:51:36 +0400 |
commit | 109a3b319830e6680c8d4eaf0d7076cfb1e7729c (patch) | |
tree | de4eec8a3eeb8b737a3224a17272b0b598046346 /source/blender/makesrna/intern/rna_constraint.c | |
parent | 6d0769bc4216e79939c06888a8109796dc4824e5 (diff) |
pointer poll functions for object's, mainly for modifiers, constraints.
Lattice modifier only shows lattices types, Shrink wrap only meshes etc.
Diffstat (limited to 'source/blender/makesrna/intern/rna_constraint.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_constraint.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/source/blender/makesrna/intern/rna_constraint.c b/source/blender/makesrna/intern/rna_constraint.c index 05bddfa7a32..566e6fc0b83 100644 --- a/source/blender/makesrna/intern/rna_constraint.c +++ b/source/blender/makesrna/intern/rna_constraint.c @@ -1067,6 +1067,7 @@ static void rna_def_constraint_follow_path(BlenderRNA *brna) 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", "Target Object"); RNA_def_property_flag(prop, PROP_EDITABLE); RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_dependency_update"); @@ -1273,7 +1274,8 @@ static void rna_def_constraint_clamp_to(BlenderRNA *brna) RNA_def_struct_sdna_from(srna, "bClampToConstraint", "data"); prop= RNA_def_property(srna, "target", PROP_POINTER, PROP_NONE); - RNA_def_property_pointer_sdna(prop, NULL, "tar"); // TODO: curve only! + RNA_def_property_pointer_sdna(prop, NULL, "tar"); // TODO: curve only for set function! + RNA_def_property_pointer_funcs(prop, NULL, NULL, NULL, "rna_Curve_object_poll"); RNA_def_property_ui_text(prop, "Target", "Target Object"); RNA_def_property_flag(prop, PROP_EDITABLE); RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_dependency_update"); @@ -1707,7 +1709,8 @@ static void rna_def_constraint_shrinkwrap(BlenderRNA *brna) RNA_def_struct_sdna_from(srna, "bShrinkwrapConstraint", "data"); prop= RNA_def_property(srna, "target", PROP_POINTER, PROP_NONE); - RNA_def_property_pointer_sdna(prop, NULL, "target"); + RNA_def_property_pointer_sdna(prop, NULL, "target"); /* TODO, mesh type */ + RNA_def_property_pointer_funcs(prop, NULL, NULL, NULL, "rna_Mesh_object_poll"); RNA_def_property_ui_text(prop, "Target", "Target Object"); RNA_def_property_flag(prop, PROP_EDITABLE); RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_dependency_update"); |