BGE: Sensor.frequency is badly named #42341
Labels
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
Interest: X11
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
4 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#42341
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The BGE class Sensor has a property frequency , that determines the frequency of the pulses it emits.
Expected behaviour: increase the property to increase the frequency of the pulses.
Observed behaviour: increasing the property decreases the frequency of the pulses.
The tooltip notes that it's actually the "Delay between repeated pulses". This matches the observed behaviour.
Based on these observations, the name "frequency" seems wrong, and "period" would be a better name, as this is the reciprocal of frequency .
Note that if only the name is changed to "period", it would still also require a change in values in order to be correct. Right now "frequency = 0" indicates a period of 1; "frequency = 1" indicates a period of 2, and so on.
I understand that changing a property name is not something trivial, as it introduces incompatibility with existing code/files. However, I do feel that this issue should be addressed, for two reasons:
PS: If I'm really nitpicky about this, even the word "delay" in the tooltip is a misnomer. If somebody ships 100 DVDs to a customer, and they are delayed, in the end all 100 DVDs still get delivered, or people wouldn't speak of "delaying" but "losing" or "misplacing". However, with 100 pulses and "frequency = 3", only 25 pulses would be "delivered".
Changed status to: 'Open'
Added subscriber: @sybrenstuvel
Added subscriber: @LukasTonne
Added subscriber: @JorgeBernalMartinez
Maybe we should change the tooltip to "Number of pulses omitted between 2 active pulses (in logic tics, 0 = no pulses omitted)" and the "Freq:" by "Omit:".
We could also change "freq" or "m_pulse_frequency" internal variables to a name more appropiated but I'm not totally convince of this one.
Added subscriber: @dr.sybren
For me "Number of pulses omitted (in logic ticks)" is hard to understand, as it implies that you can count pulses in logic ticks, whereas this setting is exactly there to change the relation between pulses and logic ticks.
"Number of logic ticks between 2 active pulses (0 = pulse every logic tick, 1 = skip 1 logic tick between pulses, etc.)" may be clearer.
I'm partial to either "period" or "skip" rather than "omit".
IMO that would certainly be an improvement. "period" would stop my head from hurting every time I see that variable name. Naming something the exact opposite of what it represents, which is the current situation, is Not Good.
Removed subscriber: @LukasTonne
Ok. Much better.
I'm for "skip" as it will avoid a do_versions to convert from 0 to 1 as default value (and also avoid internal logic coversion)
Following above election then i would use: tics_skipped, m_tics_skipped, ticskip, etc
If you are agree, I have a patch ready to upload to differential.
Fire it up! :)
Changed status from 'Open' to: 'Resolved'
Closed by commit
8c98b1649d