Merge with trunk r39928
[blender-staging.git] / source / blender / makesrna / intern / rna_modifier.c
index 22fdfcea29cecc9575189d0c96bce71be24fc2b8..c6e200dac73ad3e10c414caa8f5ba0bbee55e5d4 100644 (file)
@@ -48,6 +48,7 @@
 
 #include "BKE_animsys.h"
 #include "BKE_bmesh.h" /* For BevelModifierData */
+#include "BKE_dynamicpaint.h" /* For dynamicPaint_Modifier_free & *_createType */
 #include "BKE_multires.h"
 #include "BKE_smoke.h" /* For smokeModifier_free & smokeModifier_createType */
 
@@ -92,6 +93,7 @@ EnumPropertyItem modifier_type_items[] ={
        {eModifierType_Smoke, "SMOKE", ICON_MOD_SMOKE, "Smoke", ""},
        {eModifierType_Softbody, "SOFT_BODY", ICON_MOD_SOFT, "Soft Body", ""},
        {eModifierType_Surface, "SURFACE", ICON_MOD_PHYSICS, "Surface", ""},
+       {eModifierType_DynamicPaint, "DYNAMIC_PAINT", ICON_MOD_DYNAMICPAINT, "Dynamic Paint", ""},
        {0, NULL, 0, NULL, NULL}};
 
 #ifdef RNA_RUNTIME
@@ -184,6 +186,8 @@ static StructRNA* rna_Modifier_refine(struct PointerRNA *ptr)
                        return &RNA_ScrewModifier;
                case eModifierType_Warp:
                        return &RNA_WarpModifier;
+               case eModifierType_DynamicPaint:
+                       return &RNA_DynamicPaintModifier;
                default:
                        return &RNA_Modifier;
        }
@@ -1943,6 +1947,31 @@ static void rna_def_modifier_smoke(BlenderRNA *brna)
        RNA_def_property_update(prop, 0, "rna_Smoke_set_type");
 }
 
+static void rna_def_modifier_dynamic_paint(BlenderRNA *brna)
+{
+       StructRNA *srna;
+       PropertyRNA *prop;
+       
+       srna= RNA_def_struct(brna, "DynamicPaintModifier", "Modifier");
+       RNA_def_struct_ui_text(srna, "Dynamic Paint Modifier", "Dynamic Paint modifier");
+       RNA_def_struct_sdna(srna, "DynamicPaintModifierData");
+       RNA_def_struct_ui_icon(srna, ICON_MOD_DYNAMICPAINT);
+       
+       prop= RNA_def_property(srna, "canvas_settings", PROP_POINTER, PROP_NONE);
+       RNA_def_property_pointer_sdna(prop, NULL, "canvas");
+       RNA_def_property_ui_text(prop, "Canvas Settings", "");
+       
+       prop= RNA_def_property(srna, "brush_settings", PROP_POINTER, PROP_NONE);
+       RNA_def_property_pointer_sdna(prop, NULL, "brush");
+       RNA_def_property_ui_text(prop, "Brush Settings", "");
+
+       prop= RNA_def_property(srna, "ui_type", PROP_ENUM, PROP_NONE);
+       RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
+       RNA_def_property_enum_sdna(prop, NULL, "type");
+       RNA_def_property_enum_items(prop, prop_dynamicpaint_type_items);
+       RNA_def_property_ui_text(prop, "Type", "");
+}
+
 static void rna_def_modifier_collision(BlenderRNA *brna)
 {
        StructRNA *srna;
@@ -2517,6 +2546,7 @@ void RNA_def_modifier(BlenderRNA *brna)
        rna_def_modifier_smoke(brna);
        rna_def_modifier_solidify(brna);
        rna_def_modifier_screw(brna);
+       rna_def_modifier_dynamic_paint(brna);
 }
 
 #endif