Psycrow101 / io_scene_gta_ifp

Import and export GTA 3/VC/SA animations (.ifp) into Blender 3D
16 stars 4 forks source link

Issue importing GTA VC ped.ifp file + Feature Request: Support GTA III's ifp animation. #5

Open jaigitrep159 opened 2 weeks ago

jaigitrep159 commented 2 weeks ago

If i import GTA VC's bones into ped.ifp using that addon, i get this error:

Traceback (most recent call last):
  File "C:\Users\USER\AppData\Roaming\Blender Foundation\Blender\3.6\scripts\addons\io_scene_gta_ifp-main\__init__.py", line 86, in execute
    return import_gta_ifp.load(context, **keywords)
  File "C:\Users\USER\AppData\Roaming\Blender Foundation\Blender\3.6\scripts\addons\io_scene_gta_ifp-main\import_gta_ifp.py", line 115, in load
    act, mb = create_action(arm_obj, anim, fps, global_matrix)
  File "C:\Users\USER\AppData\Roaming\Blender Foundation\Blender\3.6\scripts\addons\io_scene_gta_ifp-main\import_gta_ifp.py", line 54, in create_action
    cr = [act.fcurves.new(data_path=(POSEDATA_PREFIX % bone_name) + 'rotation_quaternion', index=i) for i in range(4)]
  File "C:\Users\USER\AppData\Roaming\Blender Foundation\Blender\3.6\scripts\addons\io_scene_gta_ifp-main\import_gta_ifp.py", line 54, in <listcomp>
    cr = [act.fcurves.new(data_path=(POSEDATA_PREFIX % bone_name) + 'rotation_quaternion', index=i) for i in range(4)]
RuntimeError: Error: F-Curve 'pose.bones["Root"].rotation_quaternion[0]' already exists in action 'bomber'

Any fix?

As for the feature request, i suggest support GTA III's ifp animations.

According to GTA III's player.dff's structure, it seems like it used multiple body parts instead of bones. Any workaround to do with this? Thanks.

Psycrow101 commented 2 weeks ago

Thanks for report!

This should fix it https://github.com/Psycrow101/io_scene_gta_ifp/commit/e730f5d22358b7181d98e7f31a3efde07aed136d

To support player.dff for GTA III, it will be necessary to make some changes to DragonFF. I don't plan to do this yet

jaigitrep159 commented 3 days ago

alright

jaigitrep159 commented 3 days ago

image it worked! thank you for this fix! Also, that would be cool if someone implement an ifp code for GTA III.