Forum: New Poser Users Help


Subject: How to Method

Tekitoumen opened this issue on Jul 05, 2022 ยท 5 posts


Tekitoumen posted Tue, 05 July 2022 at 3:25 AM

hello.


The manual has a sample program as shown below.


scene = Poser.Scene()

actor = Scene.CurrentActor()

parm = actor.ParameterByCode(Poser.ParmCodeXSCALE)


The sample script works fine.


But, I get an error when I try to use the other methods in the same way.
ex.) test = poser.Geometry()

AttributeError: "module 'poser' has no attribute 'Geometry' "

Do I need to make any special settings if I want to use other methods?

Thank you.



Y-Phil posted Tue, 05 July 2022 at 4:08 AM Online Now!

In your case, the method "Geometry()" is not for the module named "poser". This is Python: each function must be related to the object.

If you would like to learn and test, you may launch Poser's Python shell (Menu: Scripts) and test each line of Python.
One function to know: dir(...), which lists the methods available for the object.
Example in your case: dir(actor)
And when you type the object and the method, Poser will display the parameters and a description as soon as you enter the opening parenthesis:


๐’ซ๐’ฝ๐“Ž๐“


(ใฃโ—”โ—กโ—”)ใฃ

๐Ÿ‘ฟ Win11 on i9-13900K@5GHz, 64GB, RoG Strix B760F Gamng, Asus Tuf Gaming RTX 4070 OC Edition, 1 TB SSD, 6+4+8TB HD
๐Ÿ‘ฟ Mac Mini M2, Sequoia 15.2, 16GB, 500GB SSD
๐Ÿ‘ฟ Nas 10TB
๐Ÿ‘ฟ Poser 13 and soon 14 โค๏ธ


Y-Phil posted Tue, 05 July 2022 at 4:10 AM Online Now!

Poser's Python is  based on wxPython, more informations on wxPython here.

๐’ซ๐’ฝ๐“Ž๐“


(ใฃโ—”โ—กโ—”)ใฃ

๐Ÿ‘ฟ Win11 on i9-13900K@5GHz, 64GB, RoG Strix B760F Gamng, Asus Tuf Gaming RTX 4070 OC Edition, 1 TB SSD, 6+4+8TB HD
๐Ÿ‘ฟ Mac Mini M2, Sequoia 15.2, 16GB, 500GB SSD
๐Ÿ‘ฟ Nas 10TB
๐Ÿ‘ฟ Poser 13 and soon 14 โค๏ธ


Tekitoumen posted Wed, 20 July 2022 at 11:36 PM

Sorry for replying late.


The problem has been resolved.

Thank you for your kindness.


Y-Phil posted Thu, 21 July 2022 at 3:52 AM Online Now!

You're welcome :-)

๐’ซ๐’ฝ๐“Ž๐“


(ใฃโ—”โ—กโ—”)ใฃ

๐Ÿ‘ฟ Win11 on i9-13900K@5GHz, 64GB, RoG Strix B760F Gamng, Asus Tuf Gaming RTX 4070 OC Edition, 1 TB SSD, 6+4+8TB HD
๐Ÿ‘ฟ Mac Mini M2, Sequoia 15.2, 16GB, 500GB SSD
๐Ÿ‘ฟ Nas 10TB
๐Ÿ‘ฟ Poser 13 and soon 14 โค๏ธ