Post #585:
Ma
📋 Metadata
- Author: roaoao
- Date: 2017-03-07 06:21:51
- Type:
answer - Quality Score: 8/10
- Reply to: post_00584
🏷️ Tags
popup-dialog custom-ui intermediate solved
⚙️ Related PME Features
- Popup Dialog Editor
- Custom Tab
- Python Scripting
💬 Content
MatsuikoHiroka:
id like to create header UI for node editor ( Label : )
Hi, try to use this code in Custom tab:
areas = [a for a in C.screen.areas if a.spaces.active.type == 'NODE_EDITOR']; a = areas and areas[0]; node = a and a.spaces.active.node_tree.nodes.active; node and L.prop(node, "label", "", icon='NODE')
Note that it will be visible only when the window has a selected node.
MatsuikoHiroka:
also id like to create in 3d header View ( selected material item )
Try this:
ao = C.active_object; ao and L.prop(ao.active_material, "name", "", icon='MATERIAL_DATA')