Post #4633: Sorry I’m late. Please use this script by sticking it in the command tab.To modi
📋 Metadata
- Author: Pluglug
- Date: 2023-02-17 01:36:17
- Type:
answer - Quality Score: 7/10
- Reply to: post_04627
- Replies (1): post_04634
🏷️ Tags
macro scripting advanced solved
⚙️ Related PME Features
- Macro Editor
- Python Scripting
- Command Tab
💬 Content
Sorry I’m late. Please use this script by sticking it in the command tab.To modify the colorspace of an image texture node that is located within a node group, you need to access the node group itself and its node_tree property.
m=C.active_object.active_material;[setattr(n.image.colorspace_settings,'name','Linear')for n in m.node_tree.nodes if n.type=="TEX_IMAGE"and n.select or(n.type=="GROUP"and[setattr(g.image.colorspace_settings,'name','Linear')for g in D.node_groups[n.node_tree.name].nodes if g.type=="TEX_IMAGE"and g.select])];O.ed.undo_push(message="Set Linear")
❤️ 1 likes