diff options
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 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 */ } |