Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2009-12-08 20:23:48 +0300
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2009-12-08 20:23:48 +0300
commit07904712e8943b5845df9559093018c8473f72f3 (patch)
tree03cdc6ea24ac87a2ee2a3c1a7299874040675489 /source/blender/makesrna/intern/rna_constraint.c
parentee74e720a82b7a1fb5f732cd8ceacbb26fa7e0d3 (diff)
RNA:
* Property update functions no longer get context, instead they get only Main and Scene. The RNA api was intended to be as context-less as possible, since it doesn't really matter who is changing the property, everything that uses the property should be updated. * There's still one exception case that use it now, screen operations still depend on context too much. It also revealed a few places using context where they shouldn't. * Ideally Scene shouldn't be passed, but much of Blender still depends on it, should be dropped when we try to support multiple scene editing. Change was planned for a while, but need this now to be able to call update without a context pointer.
Diffstat (limited to 'source/blender/makesrna/intern/rna_constraint.c')
-rw-r--r--source/blender/makesrna/intern/rna_constraint.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/makesrna/intern/rna_constraint.c b/source/blender/makesrna/intern/rna_constraint.c
index 226554f9ee6..f9405dec531 100644
--- a/source/blender/makesrna/intern/rna_constraint.c
+++ b/source/blender/makesrna/intern/rna_constraint.c
@@ -198,24 +198,24 @@ static char *rna_Constraint_path(PointerRNA *ptr)
return BLI_sprintfN("constraints[\"%s\"]", con->name);
}
-static void rna_Constraint_update(bContext *C, PointerRNA *ptr)
+static void rna_Constraint_update(Main *bmain, Scene *scene, PointerRNA *ptr)
{
ED_object_constraint_update(ptr->id.data);
}
-static void rna_Constraint_dependency_update(bContext *C, PointerRNA *ptr)
+static void rna_Constraint_dependency_update(Main *bmain, Scene *scene, PointerRNA *ptr)
{
- ED_object_constraint_dependency_update(CTX_data_scene(C), ptr->id.data);
+ ED_object_constraint_dependency_update(scene, ptr->id.data);
}
-static void rna_Constraint_influence_update(bContext *C, PointerRNA *ptr)
+static void rna_Constraint_influence_update(Main *bmain, Scene *scene, PointerRNA *ptr)
{
Object *ob= ptr->id.data;
if(ob->pose)
ob->pose->flag |= (POSE_LOCKED|POSE_DO_UNLOCK);
- rna_Constraint_update(C, ptr);
+ rna_Constraint_update(bmain, scene, ptr);
}
static void rna_Constraint_ik_type_set(struct PointerRNA *ptr, int value)