Commit: eee79641c362c974c40cbd289cf14685c6b86f92
Author: Campbell Barton
Date:   Thu Feb 19 10:02:51 2015 +1100
Branches: master
https://developer.blender.org/rBeee79641c362c974c40cbd289cf14685c6b86f92

RNA: poll functions restricting object types

D1100,D1105,D1106 by @lichtwerk

===================================================================

M       source/blender/makesrna/intern/rna_constraint.c
M       source/blender/makesrna/intern/rna_modifier.c

===================================================================

diff --git a/source/blender/makesrna/intern/rna_constraint.c 
b/source/blender/makesrna/intern/rna_constraint.c
index b6845b1..aaacf07 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 75a1def..656c19e 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");

_______________________________________________
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to