Script Failure
SirNate0 opened this issue · 16 comments
When I try to run the script/addon, I get the following error (Windows 7 x64, Blender 2.74):
Traceback (most recent call last):
File "C:\Users\EDL\AppData\Roaming\Blender Foundation\Blender\2.74\scripts\addons\bake-rigify-master__init__.py", line 126, in execute
self.bake(ctx, arma, bpy.data.actions.get(name), keep=i==0)
File "C:\Users\EDL\AppData\Roaming\Blender Foundation\Blender\2.74\scripts\addons\bake-rigify-master__init__.py", line 204, in bake
frame_start=bakeArma.animation_data.action.frame_range[0],
AttributeError: 'NoneType' object has no attribute 'frame_range'location: :-1
Looks like there is no action on the armature that you are trying to bake? I will add a None
check and a warning to make it more clear.
I fixed this, could you confirm it works for you as expected?
No, while the error went away, it now seems to do nothing. When using the button, it creates the popup to allow me to select between all, selected, or active action. When calling it from the console, it just returns {'FINISHED'}. Aside from the popup, it doesn't seem to do anything (i.e it doesn't create a new armature with actions and re-parented bones, etc.).
Could it be because I have other bones that don't conform to the Rigify naming conventions (e.g. ears)? They aren't in the animations, but they are present in the armature itself.
Also, the version number in the bl_info of the script should probably be incremented as well (it is still 0.1.1).
One solution was to change line 116 to
if self.action_names:
as an empty string is not None.
if self.action_names != "":
may be better, however.
Note that this produced a lot of
Traceback (most recent call last):
File "", line 1, in
ZeroDivisionError: float division by zero
but I have a feeling that this is an internal blender error (perhaps with the constraints, but I really don't know). In any case, it worked with this change, despite the apparent error.
Also, the version number in the bl_info of the script should probably be incremented as well (it is still 0.1.1).
Good catch, I have changed the build script around a little, should work now.
I am going to have another look into the actual problem, is there any chance I could grab a broken sample off you?
i can provide my sample. as in my case, it show prompt to pick selected actions list and on checking that it does nothing. i mean, scene and orignal armature remains same. thanks for your time.
@lalamax3d Yes, if you could that would be great.
char_LearningGame.zip
just attached here, if size is issue, in future, i'll put dropbox link here
@lalamax3d I believe to have found the issue, please try the latest version (0.1.3) and let me know if that fixes your issue. Github automatically closed this issue by looking at my commit message, if you feel it's not closed please re-open.
i downloaded zip, remove previous version but unable to install this. as i install, it creates folder at >>C:\Users\alpha\AppData\Roaming\Blender Foundation\Blender\2.76\scripts\addons
but blender doesn't show or list addon to check and also didn't show button in object panel or armature panel. any ideas? do i need to build this?
I just did another test run and it works fine over here. Just open the addons tab in the User Preferences window and click "Install from file...", then select the zip file and it's working.
Ok, I see blender does not like numbers in the name. Or rather python does not, that makes sense, though. Just rename the folder to bake-rigify
. I will have to remove the version from the zip name.
Edit: Nah, it's funny. I do compress it correctly it seems https://github.com/felixSchl/bake-rigify/blob/master/build.js#L78 and that can be confirmed by running tar -xvzf $(npm --loglevel=silent run build)
-> It will expand to a folder called "bake-rigify/...". So it must be the behaviour of "Install from file...". For what it's worth, their unpacking code lives here: https://github.com/dfelinto/blender/blob/9137a4401440d3f3206e989f49f3539079d685b8/release/scripts/startup/bl_operators/wm.py#L1963-L2027. I'll just rename the folder then.
Edit: I updated the build script to not include the version name and uploaded a new release...
wow, thanks felix, it worked perfectly, i am grateful for super cool help, support and development.
you're welcome :)