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:
authorMiika Hamalainen <blender@miikah.org>2011-11-10 14:24:34 +0400
committerMiika Hamalainen <blender@miikah.org>2011-11-10 14:24:34 +0400
commitafeb0eeaf0e8caf5e46a5dd6fbea3786e9fb1354 (patch)
tree36ab74ff3fa36d27c0f35527d3b55e68e3d27fe5 /source/blender/editors/space_buttons
parent1e035381d10068eb17345a88d42cebc0d579adf3 (diff)
parent1b4a54ad73c058baa59ffdc9e5f18b0b79030fb0 (diff)
Dynamic Paint merge:
Commit Dynamic Paint from "soc-2011-carrot" branch into trunk. End-user documentation: http://wiki.blender.org/index.php/Doc:2.6/Manual/Modifiers/Simulation/Dynamic_Paint GSoC wiki page: http://wiki.blender.org/index.php/User:MiikaH/GSoC-2011-DynamicPaint
Diffstat (limited to 'source/blender/editors/space_buttons')
-rw-r--r--source/blender/editors/space_buttons/buttons_context.c12
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 */
}