animaide icon indicating copy to clipboard operation
animaide copied to clipboard

Scene.frame_current expected an int type, not float error

Open mjoe67887 opened this issue 3 years ago • 18 comments
trafficstars

I keep getting this error when I'm trying use the anim offset tool. First it happened on a character I brought into blender with the daz to blender bridge so I thought it was an issue related to that but now it's happening when animating just a basic mesh object ....this is happening in blender 3.1

mjoe67887 avatar Mar 13 '22 19:03 mjoe67887

Thanks for reporting this. I'll take a look as soon as I can. in the meantime check to see if a previous version doesn't have this bug. Maybe I added the bug when fixing something else.

aresdevo avatar Mar 24 '22 16:03 aresdevo

Thank you so much I really like this add on

On Thu, Mar 24, 2022 at 9:40 AM aresdevo @.***> wrote:

Thanks for reporting this. This is the same issue as #73 https://github.com/aresdevo/animaide/issues/73. I'll take a look as soon as I can. in the meantime check to see if a previous version https://github.com/aresdevo/animaide/releases doesn't have this bug.

— Reply to this email directly, view it on GitHub https://github.com/aresdevo/animaide/issues/74#issuecomment-1077822441, or unsubscribe https://github.com/notifications/unsubscribe-auth/AXRH6GLOTWFBDWHPVOUX5JLVBSLJFANCNFSM5QTYWECA . You are receiving this because you authored the thread.Message ID: @.***>

mjoe67887 avatar Mar 24 '22 19:03 mjoe67887

Can you give me a specific example of when this error happened? That would help me pin-point the issue

aresdevo avatar Mar 25 '22 03:03 aresdevo

oh... I see you have an example on the other report

aresdevo avatar Mar 25 '22 03:03 aresdevo

I can not reproduce the bug, but I have a newer version of the addon. Let me finish something I'm adding to it and then after I push the new version you can test it again to see if you still get the error.

aresdevo avatar Mar 25 '22 03:03 aresdevo

By the way... glad you like the addon. I can not take much credit for it, I'm just bringing to Blender things I've used in the industry as an animator.

aresdevo avatar Mar 25 '22 04:03 aresdevo

Yeah this add-on is seriously amazing..do you still need example?

On Thu, Mar 24, 2022 at 9:11 PM aresdevo @.***> wrote:

By the way... glad you like the addon. I can not take much credit for it, I'm just bringing to Blender things I've used in the industry as an animator.

— Reply to this email directly, view it on GitHub https://github.com/aresdevo/animaide/issues/74#issuecomment-1078634547, or unsubscribe https://github.com/notifications/unsubscribe-auth/AXRH6GKEN6MWM7XO65MRG6DVBU4GVANCNFSM5QTYWECA . You are receiving this because you authored the thread.Message ID: @.***>

mjoe67887 avatar Mar 25 '22 21:03 mjoe67887

Oh... sorry, have been busy. Yes please, if you can give me an example of how that error happens would be amazing.

aresdevo avatar Mar 27 '22 07:03 aresdevo

i have also faced this issue. when we try to use anim offset mask.

Screenshot (27)

after selecting range for mask it gives this error without mask addon works fine. it happens with 3.1 beta, 3.2 alpha and 3.1 stable

Dhruvin743 avatar Mar 30 '22 13:03 Dhruvin743

i tried this and it worked...

scene.frame_current = int((end + start)/2)

Dhruvin743 avatar Mar 30 '22 13:03 Dhruvin743

This is happening with all tools using current frame, something changed in python someone mentioned.

RiggingDojoAdmin avatar Mar 31 '22 04:03 RiggingDojoAdmin

There is a new? >>> bpy.context.scene.frame_float that takes Floats but frame_current is now INT

RiggingDojoAdmin avatar Mar 31 '22 19:03 RiggingDojoAdmin

Python's automatic conversion from decimals to Ints in 3.10

RiggingDojoAdmin avatar Mar 31 '22 19:03 RiggingDojoAdmin

here is my example....If I click anim offset and mask in pose mode with all the controllers selected i get this RuntimeError: Error: Use 'Time_Translate' transform mode instead of 'Translation' mode for translating keyframes in Dope Sheet Editor

if I deselect them all then reselect them right after and then run anim offset and mask i get : Scene.frame_current expected an int type, not float RAIN character from the blender website on a brand new file of it on 3.1 of course my blender file is right here https://drive.google.com/file/d/1rUOomAGcz8Ab86eUceU7n5uIXxUneXEF/view?usp=sharing

On Thu, Mar 24, 2022 at 9:40 AM aresdevo @.***> wrote:

Thanks for reporting this. This is the same issue as #73 https://github.com/aresdevo/animaide/issues/73. I'll take a look as soon as I can. in the meantime check to see if a previous version https://github.com/aresdevo/animaide/releases doesn't have this bug.

— Reply to this email directly, view it on GitHub https://github.com/aresdevo/animaide/issues/74#issuecomment-1077822441, or unsubscribe https://github.com/notifications/unsubscribe-auth/AXRH6GLOTWFBDWHPVOUX5JLVBSLJFANCNFSM5QTYWECA . You are receiving this because you authored the thread.Message ID: @.***>

mjoe67887 avatar Apr 01 '22 00:04 mjoe67887

Sorry guys, life is getting in the way, I'm in a pickle at the moment but as soon as I'm in a calmer state I will address this issue.

aresdevo avatar Apr 08 '22 06:04 aresdevo

Well, @Festivize did the work for me. Thanks so much! I created a new version with his commit. I have not tested it, so let me know if the problem is solved.

aresdevo avatar Apr 08 '22 06:04 aresdevo

I created a new version with his commit.

Unfortunately, there is a bug in version too. This happens when first activate AnimOffset Mask.

image

Morphinometr avatar Apr 12 '22 13:04 Morphinometr

I created a new version with his commit.

Unfortunately, there is a bug in version too. This happens when first activate AnimOffset Mask.

image

I think I fixed it by changing file curve.py located in %AppData%\Blender Foundation\Blender\3.1\scripts\addons\animaide-master\utils LINE 56 FROM: bpy.ops.transform.translate(value=(0, 0, 0)) LINE 56 TO: bpy.ops.transform.transform(mode='TIME_TRANSLATE', value=(0, 0, 0, 0))

I have not used it extensively but it seems to work with this change.

DmitryPechkin avatar Jun 03 '22 22:06 DmitryPechkin

Sorry for the delay. I have not been actively working on the addon. There is a contribution that fixed this error. There is a new release with the fix

aresdevo avatar Nov 09 '22 23:11 aresdevo