Forum: Poser Python Scripting


Subject: export by python

Tekitoumen opened this issue on Aug 04, 2022 · 4 posts


Tekitoumen posted Thu, 04 August 2022 at 1:57 AM

Hello.

I have a question about exporting from python.

I want to do import->edit model->export in python.

Exporting from python with the model open and selected in Poser succeeds.



But the following process fails.

・The model is not displayed in Poser(Poser has no model selected)

・Import the model with python

・Export this model with python

(The file is output, but it is 0 bytes in size)


If What do I need to export in python for a model imported in python?

you know how to solve this problem please let me know.


Thank you.



FVerbaas posted Thu, 04 August 2022 at 6:43 AM Forum Coordinator



You say: 'the model is not displayed.' Did you tell Poser to do  a redraw?

Likewise, to have it selected in the UI you may have to tell the UI to select it.


Tekitoumen posted Mon, 08 August 2022 at 12:38 AM

Thank you very much.

I thought I was redrawing, but it was missing. .

sorry.



Tekitoumen posted Wed, 17 August 2022 at 12:48 AM

sorry.  I checked it and it didn't work....


After importing in python,

actor = scene.Actor("target_name")

scene. SelectActor(actor)

scene. DrawAll()

After recognizing the model like this, exporting from Python fails.

When I do the export, I get an obj file, but it's 0 bytes in size.


Since actor.Delete() succeeds, I think Poser is aware of the model.

What am I missing to recognize the model from python as well as the GUI?


Thank you.