bugfix [#32538] 'Mouse Over Any' sensor 'Pulse' button missing since 2.5x [Patch] - based on the patch from HG1
This commit is contained in:
@@ -3398,7 +3398,13 @@ static void draw_sensor_message(uiLayout *layout, PointerRNA *ptr)
|
||||
|
||||
static void draw_sensor_mouse(uiLayout *layout, PointerRNA *ptr)
|
||||
{
|
||||
uiItemR(layout, ptr, "mouse_event", 0, NULL, ICON_NONE);
|
||||
uiLayout *split;
|
||||
|
||||
split = uiLayoutSplit(layout, 0.8f, FALSE);
|
||||
uiItemR(split, ptr, "mouse_event", 0, NULL, ICON_NONE);
|
||||
|
||||
if (RNA_enum_get(ptr, "mouse_event") == BL_SENS_MOUSE_MOUSEOVER_ANY)
|
||||
uiItemR(split, ptr, "use_pulse", UI_ITEM_R_TOGGLE, NULL, ICON_NONE);
|
||||
}
|
||||
|
||||
static void draw_sensor_near(uiLayout *layout, PointerRNA *ptr)
|
||||
|
||||
@@ -417,6 +417,11 @@ static void rna_def_mouse_sensor(BlenderRNA *brna)
|
||||
RNA_def_property_enum_items(prop, mouse_event_items);
|
||||
RNA_def_property_ui_text(prop, "Mouse Event", "Type of event this mouse sensor should trigger on");
|
||||
RNA_def_property_update(prop, NC_LOGIC, NULL);
|
||||
|
||||
prop = RNA_def_property(srna, "use_pulse", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_sdna(prop, NULL, "flag", SENS_MOUSE_FOCUS_PULSE);
|
||||
RNA_def_property_ui_text(prop, "Pulse", "Moving the mouse over a different object generates a pulse");
|
||||
RNA_def_property_update(prop, NC_LOGIC, NULL);
|
||||
}
|
||||
|
||||
static void rna_def_touch_sensor(BlenderRNA *brna)
|
||||
|
||||
Reference in New Issue
Block a user