1
$\begingroup$

I'm loading the file like this:

logic.LibLoad(logic.expandPath('//car.blend'), 'Scene', verbose=True, load_actions=True)

And I get my object (without using addObject() BTW, is it how it's done?) fine, I can basically do what I want with it. But I cannot seem to use its actions.

And at loading time I can see the action being loaded in the console output:

SceneName: Scene
ActionName: Car.flipOver

This is how I start the action:

    name = "Car.flipOver"
    start = 1.0
    end = 10.0
    layer = 0
    priority = 1
    blendin = 1.0
    mode = logic.KX_ACTION_MODE_PLAY
    layerWeight = 0.0
    ipoFlags = 1
    speed = 1.0

    # (tests to see if the car is stuck)

    self.playAction(name, start, end, layer, priority, blendin, mode, layerWeight, ipoFlags, speed)

Not only the action does not play, I get no warning or error message of any kind! (at least when you omit the load_action parameter you get a fair "failed to load action").
Can somebody explain to me how one can access actions in externally loaded .blend files.

$\endgroup$
1
$\begingroup$

the problem seems to be in the playAction arguments exactly in ipoFlags = 1 it should be ipoFlags = 0

I have no idea why but this is what got it working at least in my test file

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.