diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-11-11 10:25:45 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-11-11 10:25:45 +0400 |
commit | 92d35b74e79e63ae95732cf3161e84ace1e79e59 (patch) | |
tree | 19a8ecf74bfcae5187a4e25520f4e55384e7707b /source/blender/editors/space_buttons | |
parent | 67386c003d5d4bd5355323acdfbef1aa9fa2b71d (diff) | |
parent | afeb0eeaf0e8caf5e46a5dd6fbea3786e9fb1354 (diff) |
svn merge -r41722:41723 ^/trunk/blender
Diffstat (limited to 'source/blender/editors/space_buttons')
-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 e38ac7bd413..9de804d275f 100644 --- a/source/blender/editors/space_buttons/buttons_context.c +++ b/source/blender/editors/space_buttons/buttons_context.c @@ -684,7 +684,7 @@ const char *buttons_context_dir[] = { "meta_ball", "lamp", "speaker", "camera", "material", "material_slot", "texture", "texture_slot", "texture_user", "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) { @@ -943,6 +943,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 */ } |