diff options
author | Miika Hamalainen <blender@miikah.org> | 2011-05-24 11:08:58 +0400 |
---|---|---|
committer | Miika Hamalainen <blender@miikah.org> | 2011-05-24 11:08:58 +0400 |
commit | 3b41ab432badf2d4598b798e0d0c6c9ece51172b (patch) | |
tree | 8b646a88ae5dbc8441b0434fc925f7e3f09c7bb5 /source/blender/editors/space_buttons/buttons_context.c | |
parent | 25e276d3570d292f7e0a1306a864419024465d3b (diff) |
Applied Dynamic Paint 1.18f patch as a codebase for GSoC.
Diffstat (limited to 'source/blender/editors/space_buttons/buttons_context.c')
-rw-r--r-- | source/blender/editors/space_buttons/buttons_context.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/source/blender/editors/space_buttons/buttons_context.c b/source/blender/editors/space_buttons/buttons_context.c index f91e830d52e..8d5a54908f3 100644 --- a/source/blender/editors/space_buttons/buttons_context.c +++ b/source/blender/editors/space_buttons/buttons_context.c @@ -647,7 +647,7 @@ const char *buttons_context_dir[] = { "world", "object", "mesh", "armature", "lattice", "curve", "meta_ball", "lamp", "camera", "material", "material_slot", "texture", "texture_slot", "bone", "edit_bone", "pose_bone", "particle_system", "particle_system_editable", - "cloth", "soft_body", "fluid", "smoke", "collision", "brush", NULL}; + "cloth", "soft_body", "fluid", "smoke", "collision", "brush", "dynamic_paint", NULL}; int buttons_context(const bContext *C, const char *member, bContextDataResult *result) { @@ -859,6 +859,16 @@ int buttons_context(const bContext *C, const char *member, bContextDataResult *r set_pointer_type(path, result, &RNA_Brush); return 1; } + else if(CTX_data_equals(member, "dynamic_paint")) { + PointerRNA *ptr= get_pointer_type(path, &RNA_Object); + + if(ptr && ptr->data) { + Object *ob= ptr->data; + ModifierData *md= modifiers_findByType(ob, eModifierType_DynamicPaint); + CTX_data_pointer_set(result, &ob->id, &RNA_DynamicPaintModifier, md); + return 1; + } + } else { return 0; /* not found */ } |