No animation after export [solved]

overfloater
Posts: 754
Joined: 30 Jul 2017 18:09

Re: No animation after export

#11 Post by overfloater » 28 May 2019 18:16

I know the export looked alright, but the animation is not there anymore.

User avatar
Harven
Beta tester
Posts: 984
Joined: 29 Sep 2016 10:24
Location: 127.0.0.1
Contact:

Re: No animation after export

#12 Post by Harven » 29 May 2019 14:32

overfloater wrote:
28 May 2019 14:00
When i import my wipers back into blender, it appears as it never had animation. Meanwhile, i can import SCS's animations just fine.
How do you import it back? With .pim importer or with .scs importer? Just tried your .blend file, exported pim, pia, pis, pit files and then imported them back with .pim importer - animation is there and everything seems to be fine. But when I ran conversion tools and then imported the model back with .scs importer (converter_pix), the animation failed to load with following message:

Code: Select all

************************************
**      SCS PIA Importer          **
**      (c)2014 SCS Software      **
************************************

INFO	-     "wipers.pia" file REJECTED
************************************
converter_pix worked fine and wipers.pia is there so I tried to directly import .pia file from the "SCS Object Specials" panel of the Object tab of Armature object. This gave me more info:

Code: Select all

************************************
**      SCS PIA Importer          **
**      (c)2014 SCS Software      **
************************************


ERROR	-  The filepath '/wipers.pis' doesn't exist!
INFO	-  ++ "wipers.pia" IMPORTING animation data...
Traceback (most recent call last):
  File "/home/harven/.blender/addons/io_scs_tools/operators/scene.py", line 83, in execute
    imported_count = _import.pia.load(root_object, pia_files, armature)
  File "/home/harven/.blender/addons/io_scs_tools/imp/pia.py", line 294, in load
    bone_rest_matrix_scs = bones[bone_name][1].transposed()
TypeError: 'NoneType' object is not subscriptable
As you can see your .pia animation file after being converted from pma to pia with converter_pix has wrong skeleton file path: "/wipers.pis" - should be "wipers.pis" in this case. This seems to be an issue when you export your model/animation/skeleton to the root directory of your mod. Try exporting it to a subfolder instead, like "/vehicle/truck/yourtruck/interior" and also clear SCS Skeleton export path so that the .pis file is exported to the same folder as your model file. I tried that with your animation and was able to import it back with .scs importer (converter_pix) with no issues.
Image

overfloater
Posts: 754
Joined: 30 Jul 2017 18:09

Re: No animation after export [solved]

#13 Post by overfloater » 29 May 2019 23:38

All this time, that's what it was. I've now set default path to a sub folder, as well as the skeleton path. The animation works in-game. The dope sheet now even has those lines between the dots, after import :o

Thanks, everyone ❤️
How do you import it back?

so far, i only used the .scs import.

User avatar
CCFAN
Posts: 35
Joined: 05 Sep 2017 21:17

Re: No animation after export [solved]

#14 Post by CCFAN » 14 Jul 2019 03:44

May I ask how you import animations? I use ConverterPIX-master to convert .pmx into .pix but I don't get any animation files, no .pia.

irvinborder
Posts: 1
Joined: 06 Aug 2020 06:55

Re: No animation after export

#15 Post by irvinborder » 06 Aug 2020 06:58

Harven wrote:
29 May 2019 14:32
TypeError: 'NoneType' object is not subscriptable
A subscriptable object is any object that implements the __getitem__ special method (think lists, dictionaries). It is an object that records the operations done to it and it can store them as a "script" which can be replayed. You are trying to subscript an object which you think is a list or dict, but actually is None. NoneType is the type of the None object which represents a lack of value, for example, a function that does not explicitly return a value will return None. 'NoneType' object is not subscriptable is the one thrown by python when you use the square bracket notation object[key] where an object doesn't define the __getitem__ method . You might have noticed that the method sort() that only modify the list have no return value printed – they return the default None. This is a design principle for all mutable data structures in Python.

Post Reply

Return to “Blender Tools”

Who is online

Users browsing this forum: No registered users and 2 guests