I have written an add-on which visualizes objects on a racing game track.
Each in-game object is an empty object in Blender with one or more children mesh objects being the visible model as seen in-game. The empty holds the game-relevant properties in a PropertyGroup
which are visualized in a custom Panel
.
Basically, the object hierarchy looks like this:
- ItemBox < Empty object holding custom properties the user is interested in
- ItemBoxOuter < A model the user selects
- ItemBoxQuestionMark < Just another model the user might also select
- Start < Another empty holding custom properties
- StartLine < Another model
- and so on
Since empties are hard to select and often covered and encased by the models, I want to redirect the selection of such child mesh objects to the parent empty object. Is it possible to modify how the selection operator works here?
Background: At first I worked around this by letting the Panel
which displays the PropertyGroup
use the parent object to show its data. However, users began to move around the child model objects (having selected those), effectively keeping the in-game object at the same place as it uses the transform of the empty object.