Post #3993: It works with the image from the active camera in the scene
📋 Metadata
- Author: Motiomancer
- Date: 2021-08-11 16:29:49
- Type:
answer - Quality Score: 8/10
- Reply to: post_03992
- Replies (1): post_03994
🏷️ Tags
macro scripting advanced solved
⚙️ Related PME Features
- Macro Editor
- Python Scripting
- Property Editor
💬 Content
It works with the image from the active camera in the scene
solo
L.prop(C.scene.camera.data.background_images[-1], 'alpha', slider=True, text=text, icon=icon)
or with contexts
None if C.scene.camera == None else( None if len(C.scene.camera.data.background_images) == 0 or not C.scene.camera.data.background_images else (None if C.scene.camera.data.background_images[-1].source != 'IMAGE' else L.prop(C.scene.camera.data.background_images[-1], 'alpha', slider=True, text=text, icon=icon)))