diff options
Diffstat (limited to 'source/blender/modifiers/intern/MOD_simulation.cc')
-rw-r--r-- | source/blender/modifiers/intern/MOD_simulation.cc | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/source/blender/modifiers/intern/MOD_simulation.cc b/source/blender/modifiers/intern/MOD_simulation.cc index f52daf53186..a9af48b682f 100644 --- a/source/blender/modifiers/intern/MOD_simulation.cc +++ b/source/blender/modifiers/intern/MOD_simulation.cc @@ -34,6 +34,7 @@ #include "DNA_object_types.h" #include "DNA_pointcloud_types.h" #include "DNA_scene_types.h" +#include "DNA_screen_types.h" #include "DNA_simulation_types.h" #include "BKE_customdata.h" @@ -41,10 +42,22 @@ #include "BKE_mesh.h" #include "BKE_modifier.h" +/* SpaceType struct has a member called 'new' which obviously conflicts with C++ + * so temporarily redefining the new keyword to make it compile. */ +#define new extern_new +#include "BKE_screen.h" +#undef new + +#include "UI_interface.h" +#include "UI_resources.h" + +#include "RNA_access.h" + #include "DEG_depsgraph_build.h" #include "DEG_depsgraph_query.h" #include "MOD_modifiertypes.h" +#include "MOD_ui_common.h" static void updateDepsgraph(ModifierData *md, const ModifierUpdateDepsgraphContext *ctx) { @@ -77,6 +90,25 @@ static PointCloud *modifyPointCloud(ModifierData *md, return pointcloud; } +static void panel_draw(const bContext *C, Panel *panel) +{ + uiLayout *layout = panel->layout; + + PointerRNA ptr; + PointerRNA ob_ptr; + modifier_panel_get_property_pointers(C, panel, &ob_ptr, &ptr); + + uiItemR(layout, &ptr, "simulation", 0, NULL, ICON_NONE); + uiItemR(layout, &ptr, "data_path", 0, NULL, ICON_NONE); + + modifier_panel_end(layout, &ptr); +} + +static void panelRegister(ARegionType *region_type) +{ + modifier_panel_register(region_type, eModifierType_Mask, panel_draw); +} + ModifierTypeInfo modifierType_Simulation = { /* name */ "Simulation", /* structName */ "SimulationModifierData", @@ -106,4 +138,5 @@ ModifierTypeInfo modifierType_Simulation = { /* foreachIDLink */ foreachIDLink, /* foreachTexLink */ NULL, /* freeRuntimeData */ NULL, + /* panelRegister */ panelRegister, }; |