Changeset View
Changeset View
Standalone View
Standalone View
source/blender/modifiers/intern/MOD_wave.c
| Show First 20 Lines • Show All 366 Lines • ▼ Show 20 Lines | static void panel_draw(const bContext *UNUSED(C), Panel *panel) | ||||
| uiItemR(row, ptr, "use_normal", 0, "", ICON_NONE); | uiItemR(row, ptr, "use_normal", 0, "", ICON_NONE); | ||||
| sub = uiLayoutRow(row, true); | sub = uiLayoutRow(row, true); | ||||
| uiLayoutSetActive(sub, RNA_boolean_get(ptr, "use_normal")); | uiLayoutSetActive(sub, RNA_boolean_get(ptr, "use_normal")); | ||||
| uiItemR(sub, ptr, "use_normal_x", UI_ITEM_R_TOGGLE, "X", ICON_NONE); | uiItemR(sub, ptr, "use_normal_x", UI_ITEM_R_TOGGLE, "X", ICON_NONE); | ||||
| uiItemR(sub, ptr, "use_normal_y", UI_ITEM_R_TOGGLE, "Y", ICON_NONE); | uiItemR(sub, ptr, "use_normal_y", UI_ITEM_R_TOGGLE, "Y", ICON_NONE); | ||||
| uiItemR(sub, ptr, "use_normal_z", UI_ITEM_R_TOGGLE, "Z", ICON_NONE); | uiItemR(sub, ptr, "use_normal_z", UI_ITEM_R_TOGGLE, "Z", ICON_NONE); | ||||
| col = uiLayoutColumn(layout, false); | col = uiLayoutColumn(layout, false); | ||||
| uiItemR(col, ptr, "falloff_radius", 0, "Falloff", ICON_NONE); | uiItemR(col, ptr, "falloff_radius", 0, IFACE_("Falloff"), ICON_NONE); | ||||
| uiItemR(col, ptr, "height", UI_ITEM_R_SLIDER, NULL, ICON_NONE); | uiItemR(col, ptr, "height", UI_ITEM_R_SLIDER, NULL, ICON_NONE); | ||||
| uiItemR(col, ptr, "width", UI_ITEM_R_SLIDER, NULL, ICON_NONE); | uiItemR(col, ptr, "width", UI_ITEM_R_SLIDER, NULL, ICON_NONE); | ||||
| uiItemR(col, ptr, "narrowness", UI_ITEM_R_SLIDER, NULL, ICON_NONE); | uiItemR(col, ptr, "narrowness", UI_ITEM_R_SLIDER, NULL, ICON_NONE); | ||||
| modifier_vgroup_ui(layout, ptr, &ob_ptr, "vertex_group", "invert_vertex_group", NULL); | modifier_vgroup_ui(layout, ptr, &ob_ptr, "vertex_group", "invert_vertex_group", NULL); | ||||
| modifier_panel_end(layout, ptr); | modifier_panel_end(layout, ptr); | ||||
| } | } | ||||
| static void position_panel_draw(const bContext *UNUSED(C), Panel *panel) | static void position_panel_draw(const bContext *UNUSED(C), Panel *panel) | ||||
| { | { | ||||
| uiLayout *col; | uiLayout *col; | ||||
| uiLayout *layout = panel->layout; | uiLayout *layout = panel->layout; | ||||
| PointerRNA *ptr = modifier_panel_get_property_pointers(panel, NULL); | PointerRNA *ptr = modifier_panel_get_property_pointers(panel, NULL); | ||||
| uiLayoutSetPropSep(layout, true); | uiLayoutSetPropSep(layout, true); | ||||
| uiItemR(layout, ptr, "start_position_object", 0, IFACE_("Object"), ICON_NONE); | uiItemR(layout, ptr, "start_position_object", 0, IFACE_("Object"), ICON_NONE); | ||||
| col = uiLayoutColumn(layout, true); | col = uiLayoutColumn(layout, true); | ||||
| uiItemR(col, ptr, "start_position_x", 0, "Start Position X", ICON_NONE); | uiItemR(col, ptr, "start_position_x", 0, IFACE_("Start Position X"), ICON_NONE); | ||||
| uiItemR(col, ptr, "start_position_y", 0, "Y", ICON_NONE); | uiItemR(col, ptr, "start_position_y", 0, "Y", ICON_NONE); | ||||
| } | } | ||||
| static void time_panel_draw(const bContext *UNUSED(C), Panel *panel) | static void time_panel_draw(const bContext *UNUSED(C), Panel *panel) | ||||
| { | { | ||||
| uiLayout *col; | uiLayout *col; | ||||
| uiLayout *layout = panel->layout; | uiLayout *layout = panel->layout; | ||||
| PointerRNA *ptr = modifier_panel_get_property_pointers(panel, NULL); | PointerRNA *ptr = modifier_panel_get_property_pointers(panel, NULL); | ||||
| uiLayoutSetPropSep(layout, true); | uiLayoutSetPropSep(layout, true); | ||||
| col = uiLayoutColumn(layout, false); | col = uiLayoutColumn(layout, false); | ||||
| uiItemR(col, ptr, "time_offset", 0, "Offset", ICON_NONE); | uiItemR(col, ptr, "time_offset", 0, IFACE_("Offset"), ICON_NONE); | ||||
| uiItemR(col, ptr, "lifetime", 0, "Life", ICON_NONE); | uiItemR(col, ptr, "lifetime", 0, IFACE_("Life"), ICON_NONE); | ||||
| uiItemR(col, ptr, "damping_time", 0, "Damping", ICON_NONE); | uiItemR(col, ptr, "damping_time", 0, IFACE_("Damping"), ICON_NONE); | ||||
| uiItemR(col, ptr, "speed", UI_ITEM_R_SLIDER, NULL, ICON_NONE); | uiItemR(col, ptr, "speed", UI_ITEM_R_SLIDER, NULL, ICON_NONE); | ||||
| } | } | ||||
| static void texture_panel_draw(const bContext *C, Panel *panel) | static void texture_panel_draw(const bContext *C, Panel *panel) | ||||
| { | { | ||||
| uiLayout *col; | uiLayout *col; | ||||
| uiLayout *layout = panel->layout; | uiLayout *layout = panel->layout; | ||||
| Show All 35 Lines | static void panelRegister(ARegionType *region_type) | ||||
| modifier_subpanel_register( | modifier_subpanel_register( | ||||
| region_type, "position", "Start Position", NULL, position_panel_draw, panel_type); | region_type, "position", "Start Position", NULL, position_panel_draw, panel_type); | ||||
| modifier_subpanel_register(region_type, "time", "Time", NULL, time_panel_draw, panel_type); | modifier_subpanel_register(region_type, "time", "Time", NULL, time_panel_draw, panel_type); | ||||
| modifier_subpanel_register( | modifier_subpanel_register( | ||||
| region_type, "texture", "Texture", NULL, texture_panel_draw, panel_type); | region_type, "texture", "Texture", NULL, texture_panel_draw, panel_type); | ||||
| } | } | ||||
| ModifierTypeInfo modifierType_Wave = { | ModifierTypeInfo modifierType_Wave = { | ||||
| /* name */ "Wave", | /* name */ N_("Wave"), | ||||
| /* structName */ "WaveModifierData", | /* structName */ "WaveModifierData", | ||||
| /* structSize */ sizeof(WaveModifierData), | /* structSize */ sizeof(WaveModifierData), | ||||
| /* srna */ &RNA_WaveModifier, | /* srna */ &RNA_WaveModifier, | ||||
| /* type */ eModifierTypeType_OnlyDeform, | /* type */ eModifierTypeType_OnlyDeform, | ||||
| /* flags */ eModifierTypeFlag_AcceptsCVs | eModifierTypeFlag_AcceptsVertexCosOnly | | /* flags */ eModifierTypeFlag_AcceptsCVs | eModifierTypeFlag_AcceptsVertexCosOnly | | ||||
| eModifierTypeFlag_SupportsEditmode, | eModifierTypeFlag_SupportsEditmode, | ||||
| /* icon */ ICON_MOD_WAVE, | /* icon */ ICON_MOD_WAVE, | ||||
| Show All 23 Lines | |||||