Post #4866: Thanks, that was pretty easy… replaced Linear with non-color and it worked.
📋 Metadata
- Author: RobertLe
- Date: 2023-10-26 09:08:10
- Type:
answer - Quality Score: 7/10
- Reply to: post_04865
🏷️ Tags
macro scripting intermediate solved
⚙️ Related PME Features
- Macro Editor
- Python Scripting
💬 Content
Thanks, that was pretty easy… replaced Linear with non-color and it worked.
m=C.active_object.active_material;[setattr(n.image.colorspace_settings,'name','**Non-Color**')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','**Non-Color**')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 **Non-Color**")
❤️ 1 likes