Hello there I'm trying to learn how to python to help me automate parts of my workflow which take a long time and are repetetive (so i can go do the ironing while it does all that). But I thought I better ask if scripting can possibly do it first, as its the only real need I'll have for scripts, I believe. I have written down a list of what I want the script to do in quasi-programming terms. I know some of it is possible, but would like to know if it all is!
(I've also put in ITALICS how i would MANUALLY accomplish these operations, just in case descriptions dont work out well)
Run-script //tex_directory is the hard disk location where blender will look for the texture to replace the one already on the object tex_directory = "c:\mytextures\" // Below command loads a list of "applicable" object names. The aim is that it will later scan through all objects in the scene, and if their name matches, it will perform the texture/optimization commands on them. load_a_list_of_applicable_object_names go_through_all_objects_in_scene //compare names of scene objects with loaded list to see if we find an object we want to modify. if object_name = any_applicable_object_name // apply planar_decimation modifier to object to remove extra faces not needed. remove_object_faces modifiers > decimation > planar decimation > apply // retexture object from a multi-texture file to a single texture image retexture_object MATERIALS > duplicate material (plus button) > rename new material to object name TEXTURES > duplicate texture (plus button) > rename new material to object name+"_tex" TEXTURES > texture's TYPE to "image or movie" TEXTURES > image > open > TEX_Directory+object name+".jpg" TEXTURES > MAPPING: coordinates - "global" projection "cubic" SIZE X,Y and Z = "10" TEXTURES > Influence > Diffuse > Alpha = 1 end if //return to comparing rest of scene objects to "applicable" objects list. if end of scene objects - end script
Has anyone even the foggiest idea how to do this? I've managed to create a decimate modifier (with default values which I dont want) and thats about it!