In my current project I'm facing some strange, but necessary operation to be done with my models, and what is worst, this operation is REALLY annoying when repeated manually again and again for thousand times. Is there any way to script it out?
So here it is:
- At the beginning, lets say I have two objects. Active is the Original one (ORIG) and the second (selected) is the Clone (CLONE). Firstly, I have to transfer Location, Rotation and Scale from active to selected. I'm using "Copy all to Selected" for this step;
2. Secondly, I have to self-copy a material on selected object (copy existing and rename with that "two sheets of paper" button, so that it would be unique and dont affect on the same materials on other similar objects) and name it exactly as an Object.Name of active object. I DO NOT copy any materials from selected to active. Moreover, this type of material is having a texture, which also has to be recreated (without alpha channel) with 1024x1024 resolution and named as an Object.Name of active object after new material was already made;
import bpy name = bpy.context.active_object.name suffix = "_A" for object in bpy.context.selected_objects: if not object.name == name: object.name = bpy.context.active_object.name + suffix break
Please provide any help! I think it's quiete an easy peace of code, but not for a dumb guy like me :(