Hi. I apologize in advance for posting this here. I am not sure where to ask about why the script I am running shows an error. I am following the Jeep Wrangler tutorial from Cg Masters. Once the model of the Jeep is finished the instructor shows how to run a script that scales every mesh at the same time without messing with modifiers. He is running it in Blender 2.79 and I am using 2.9 which might be a problem.
I am not familiarized at all with python, my skills only goes as far as pressing “run script” . Unfortunately an errors comes when I try to do the same as him. I managed to copy paste the message in my blocnotes (attached)error.txt (42.4 KB)
In case this is cause of my Blender version maybe someone knows how to run it and avoid the error or might be new solutions to applying the scale of multiple meshes at the same time without affecting modifiers ?
Traceback (most recent call last):
File “C:\Users\Bruno\Documents\Tutorials\Jeep_Wrangler\untitled_85.blend\scale_master_flex_updated.py”, line 25, in
IndexError: list index out of range
Error: Python script failed, check the message in the system console
Without knowing the script, i guess this error comes up cause the selection for the script is invalid.
Check if you need to select a minimum, maximum and/or an active selection for the script.
Otherwise it can be just an incompatibility of the script with 2.9.
Luckily the instructor from the video will help me to fix the script. I appreciate your help a lot, but I am afraid I am not able to follow those instructions, my knowledge is really scarce when it comes to scripts.
Just in case I explain a little bit the situation:
I am following a tutorial. The goal is to model a Jeep Wrangler. In the last part of the tutorial we need to apply a script that will apply all the scales to the different meshes and will set the general scale of the scene to 1, but without messing with the modifiers in the scene. At least that is what I understand.
Talking to the instructor from CG Masters he explained to me after working a little bit on it and how to make it compatible to 2.9 or 2.83 (the script was made for 2.79) that one of the problems was that I was also selecting the image references and the script will kind of not work on those…So I erased them, I also unlocked the locked meshes, which apparently also was a problem …But still I am getting an error.
So basically the tutor manipulates the unit scale in order to make the jeep 6 grid squares tall. After applying the script he will get the scene scale unit reset to 1 with the new scale. On top of that each mesh will reset to 1 without interfering in the modifiers active in each of the meshes.
Do you have your objects selected, when you run the script??
Because it gets the selected objects, and set the first one as active. Because the index called is 0, you’d only get an IndexError if there are no selected objects (and the objects collection is empty, so objects fails).