"Mouse Over Any" sensor "Pulse" button missing since 2.5x [Patch] #32538

Closed
opened 2012-09-11 22:24:57 +02:00 by Thomas Szepe · 6 comments
Member

Category: Logic

%%%The mouse over any sensor pulse (new pulse when moving mouse over a other object) button from Blender 2.49b is missing since Blender 2.5x.

I made a patch which adding this button back to the sensor.

Should I commit patches direkt to the pachtracker or should I post it here in the Bug Tracker?%%%

**Category**: Logic %%%The mouse over any sensor pulse (new pulse when moving mouse over a other object) button from Blender 2.49b is missing since Blender 2.5x. I made a patch which adding this button back to the sensor. Should I commit patches direkt to the pachtracker or should I post it here in the Bug Tracker?%%%
Author
Member

Changed status to: 'Open'

Changed status to: 'Open'

%%%I wouldn't use a switch in this case since you're just using it like an if:

if (event_type == MOUSE_OVER_ANY) {

 do_ui_with_pulse();

} else {

 do_regular_ui();

}%%%

%%%I wouldn't use a switch in this case since you're just using it like an if: if (event_type == MOUSE_OVER_ANY) { ``` do_ui_with_pulse(); ``` } else { ``` do_regular_ui(); ``` }%%%

%%%Assigning this to Dalai for further feedback since he's did the initial 2.5 logic ui.

Aside from the switch, the patch looks fine to me.%%%

%%%Assigning this to Dalai for further feedback since he's did the initial 2.5 logic ui. Aside from the switch, the patch looks fine to me.%%%

%%%I committed a fix based on your patch in rev. 50536 (see below)
Thanks for the report and the patch

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);
    

}%%%

%%%I committed a fix based on your patch in rev. 50536 (see below) Thanks for the report and the patch 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); }%%%

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'
Author
Member

%%%LOL first I used an If condition. But then I changed it to a switch case.

I don't know what I have done wrong yesterday, but without the two additional uiItemR the layout doesn't show up correctly (both elements on the right).
But today it works fine with only the uiLayoutSplit. Very strange.

Thanks for your answers.

%%%

%%%LOL first I used an If condition. But then I changed it to a switch case. I don't know what I have done wrong yesterday, but without the two additional uiItemR the layout doesn't show up correctly (both elements on the right). But today it works fine with only the uiLayoutSplit. Very strange. Thanks for your answers. %%%
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#32538
No description provided.