Creating a morph via script and posing that figure

algovincianalgovincian Posts: 2,613

In last weeks episode of creating a morph via script, we learned that you have to call setCanAutoFollow( true ) on the property (not the morph) in order to get clothing to follow the morphed figure. Hoorah for progress! (shout out to the cat and the parrot)

In this week's episode, we hope to learn how to make sure the rigging of the figure morphed via script isn't messed up so it can be posed.

Here's where I'm at (once again using George for the morph applied via script because he's extreme, and rigging issues show up easily):

As you can see from the images, posing George after creating the morph via script and adjusting the rigging to shape results in a mess. However, this mess is automagically cleaned up when you save the scene, close DS and reload it.

What exactly is saving the scene, closing DS, then launching DS again and re-loading the scene doing?

More importantly, how does one accomplish the same thing via script so you don't have to save/close/launch/reload the scene?

I've tried ERC freezing the morph after adjusting rigging to shape, but that didn't do the trick:

As always, thanks in advance for any info, or any ideas, anyone may have!

- Greg

Post edited by algovincian on

Comments

  • algovincianalgovincian Posts: 2,613

    I found that if I save the scene after adjusting the rigging to shape, load a new scene, then re-load the saved scene, I get the same results without having to close DS. As I did so, watching the messages about clearing the scene and deleting objects made me wonder if what I have to do is force a refresh, or clear a cache via script? Gonna start blindly trying to find something along those lines for the property, the morph, the figure, the scene . . . maybe I'll get lucky and stumble upon something - who knows?

    - Greg

  • algovincianalgovincian Posts: 2,613

    Another thought - since the morphs are created via script, there is no geometry file involved. Maybe one is being created by saving and re-loading the scene?

    Anyway, found a silent Morph Loader Pro script that I'm going to try:

    http://docs.daz3d.com/doku.php/public/software/dazstudio/4/referenceguide/scripting/api_reference/samples/file_io/import_obj_morph_loader_silent/start

    - Greg

  • Richard HaseltineRichard Haseltine Posts: 100,960

    If no asset is saved then the morph is embedded in the saved file. I don't know why you are seeing this behaviour, if you can write a small test bed script to show it I would report it as a possible bug.

Sign In or Register to comment.