Troubleshooting
Solutions to the most common issues when building Blender addons with blendcss.
Panel is blank or HAS_RMLUI is False
Cause: The native rmlui_engine .pyd binary for your Blender version's Python interpreter is missing from blendcss/binaries/.
- Blender 4.2 – 4.5 uses Python 3.11 → requires
rmlui_engine.cp311-win_amd64.pyd - Blender 5.0+ uses Python 3.13 → requires
rmlui_engine.cp313-win_amd64.pyd
Fix: Verify that blendcss/binaries/ was copied completely into your addon and check in Blender's Python console:
import sys
from my_addon import blendcss
print(sys.version, blendcss.HAS_RMLUI, blendcss.HAS_ENGINE)Panel bounds are offset or misaligned
Cause: my_engine (the native DNA bounds inspector) could not be loaded for your Python version, or the panel is in a region type without DNA bounds support.
Fix:
- Confirm
my_engine.cp313-win_amd64.pyd(or the matching.pydfor your Python version) is present inblendcss/binaries/. - Check that your panel uses
space_type = 'VIEW_3D'andregion_type = 'UI'.
CSS property has no effect
blendcss renders CSS with RmlUi 6.4, not a full web browser. Common differences:
- Border shorthand: RmlUi uses
border: 1px #444;(width + color, withoutsolid). Writingborder: 1px solid #444;may be ignored depending on the rule. - Colors with alpha: Use 8-digit hex (
#ffffff40) orrgba(255, 255, 255, 128)where alpha in RmlUi is0–255(not0.0–1.0). - Grid layout: RmlUi does not implement CSS Grid (
display: grid). Use Flexbox (display: flex; flex-direction: row | column; flex-wrap: wrap;) instead. - SVG icon color: Tint SVGs using
image-color: var(--bl-accent);(notcolororfillin CSS).
See CSS & GPU Rendering for a complete overview of supported CSS features.
Operator button is always disabled (.is-disabled)
Cause: OperatorBinding runs op.poll() under context_override (default "AUTO"). If the operator requires a different editor space or active selection, poll() returns False.
Fix:
- Check whether the operator requires an active object or specific mode (for example, Edit Mode).
- If your operator belongs to another editor (such as
NODE_EDITORorIMAGE_EDITOR), passcontext_override="NODE_EDITOR". - If you want to manage enabled state manually, pass
sync_poll=False.
@blendcss.on prints "could not find element #..."
Cause: The element id referenced by @blendcss.on("my_btn", "click") does not exist in the mounted DOM when on_mount() finishes.
Fix:
- In
html/html_file, verify the element has a matchingid="my_btn"attribute. - In
draw(self, ui, context), if an element is only rendered inside a conditional branch (such as an inactive tab), preferon_click=self.my_handlerdirectly onui.button(...)instead of@blendcss.on(...).
Typing in a number field triggers Blender viewport hotkeys
Cause: Keyboard isolation is managed by GpuManager's modal handler. This can only happen if GpuManager is not registered or was manually torn down.
Fix: Always register panels through blendcss.register(MyPanel) (or MyPanel.register()) rather than registering the generated bpy.types.Panel directly.
Changes to external .html or .css files do not appear
Fix: Call self.reload() on your panel instance (for example via a temporary dev button ui.button("Reload", on_click=self.reload)). self.reload() re-reads html_file and css_file from disk without needing to restart Blender or re-enable the addon.