Historical example · current compatibility unverified Original context: PME 1.18.7 is visible in a source image; Blender version was not stated; July 2023.

What it shows

The conversation begins with Nanomanpro’s animation need: adjust only an object’s alpha channel, key that value, and see whether the current value matches the key at the current frame.

An animated Blender Shading workspace where a custom alpha control changes an object's transparency while its material node setup remains visible.

The solution is the maintainer’s own example: Pluglug replied with a setup that moved the complex logic into a Python helper, exposed an instance to PME, and used a Boolean PME Property as a compact keyframe control. A custom menu item then chose its icon from the current keyframe state. Nanomanpro confirmed that the result improved the workflow.

Pattern to borrow

One control can do four things, with the logic kept in a helper rather than in the menu item:

  1. read the Blender value;
  2. compare it with the current animation state;
  3. perform a focused action such as inserting a key;
  4. reflect the result with a state-aware icon.

The same split works for keyed custom properties, visibility, rig settings, and any value whose keyed state you want to see.

About the historical helper

The source bootstraps its helper through the old pme.context.add_global("my_alpha", my_alpha) pattern. PME 2.1 retains pme.context.add_global() for backward compatibility, but a new version should give the helper clear registration, reload, and cleanup behavior.

The downloaded helper also depends on Blender’s object-colour, animation-data, and keyframe APIs as they existed when it was shared. Those calls need checking before the helper is used with a newer Blender build.

Media and attachment

Sources