Wed, Dec 4, 8:06 PM CST

Renderosity Forums / Poser Python Scripting



Welcome to the Poser Python Scripting Forum

Forum Moderators: Staff

Poser Python Scripting F.A.Q (Last Updated: 2024 Dec 02 3:16 pm)

We now have a ProPack Section in the Poser FreeStuff.
Check out the new Poser Python Wish List thread. If you have an idea for a script, jot it down and maybe someone can write it. If you're looking to write a script, check out this thread for useful suggestions.

Also, check out the official Python site for interpreters, sample code, applications, cool links and debuggers. This is THE central site for Python.

You can now attach text files to your posts to pass around scripts. Just attach the script as a txt file like you would a jpg or gif. Since the forum will use a random name for the file in the link, you should give instructions on what the file name should be and where to install it. Its a good idea to usually put that info right in the script file as well.

Checkout the Renderosity MarketPlace - Your source for digital art content!



Subject: svdl's morphfromobjp6.py Python Script


mathman ( ) posted Sat, 05 January 2008 at 8:38 AM · edited Sat, 21 September 2024 at 9:31 AM

Attached Link: http://www.renderosity.com/mod/forumpro/showthread.php?thread_id=2709542

Hi all,

I've imported Vic3's obj file into zBrush, made a few changes and exported the result. I then opened up Vic3's character(figure) into Poser, and ran this script (its referenced in the attached link). It ran OK for part of the way and then crashed with a traceback.

Here is the log that the python script spits out :

Importing C:Vic3.OBJ
The file was not found. Do you want to continue looking for missing files?
Spawning props
Turning off IK for Figure 1
Setting Figure 1 to zero morph/pose
Traceback (most recent call last):
  File "C:Program Filese frontierPoser 7RuntimePythonposerScriptssvdlMorphFromOBJP6.py", line 657, in ?
    SpawnFBM(fig,morphChannel,morphName,plist,useFBM)
  File "C:Program Filese frontierPoser 7RuntimePythonposerScriptssvdlMorphFromOBJP6.py", line 412, in SpawnFBM
    act=fig.ActorByInternalName(actName)
poser.error: Figure has no actor by that name

Note : the error in line 2 "The file was not found. Do you want to continue looking for missing files?" is in reference to a bmp that it is looking for, and I cancel out of.

Any help appreciated.

thanks,
Andrew


nruddock ( ) posted Sat, 05 January 2008 at 12:06 PM

I suspect that you don't have the right item selected when running the script.
It's possible the "File not found" error is causing Poser not to select what it would normally when loading a figure, so I'd track that down and fix it just to be sure it's not part of the problem.


svdl ( ) posted Sat, 05 January 2008 at 1:56 PM · edited Sat, 05 January 2008 at 1:57 PM

Attached Link: http://www.svdlinden.nl/webposerstuff/downloads/MorphFromObjP6.zip

There is a possibility that the current figure does not have an actor with an InternalName that's identical to a spawned prop name. This will happen when you create new groups in ZBrush.

I've updated the script with error handling in the case of non-matching names - the mismatch will be reported, but the script will continue.

The pen is mightier than the sword. But if you literally want to have some impact, use a typewriter

My gallery   My freestuff


mathman ( ) posted Sat, 05 January 2008 at 8:10 PM · edited Sat, 05 January 2008 at 8:11 PM

Thanks, svdl.

I'm now not getting any errors, but on the other hand I'm not getting any results either. After running the script (with 'Body' selected), there is a dial set to 1.000 on the Body actor when I open up the new character. There are no dials on the other actors.

When I twiddle this dial, it is completely unresponsive. Also, nothing happens when I apply the INJ pose, i.e. there is still the single dial for the main 'Body' only, which is still unresponsive when I twiddle it.

FWIW, here is a dump of the log when I ran the script :

Importing C:Vic2.OBJ
The file was not found. Do you want to continue looking for missing files? Spawning props
Turning off IK for Figure 1
Setting Figure 1 to zero morph/pose
Actor 'SkinHip' does not exist in figure 'Figure 1'
Actor 'SkinTorso' does not exist in figure 'Figure 1'
Actor 'PubicHair' does not exist in figure 'Figure 1'
Actor 'SkinNeck' does not exist in figure 'Figure 1'
Actor 'SkinHead' does not exist in figure 'Figure 1'
Actor 'SkinScalp' does not exist in figure 'Figure 1'
Actor 'Lips' does not exist in figure 'Figure 1'
Actor 'EyeSocket' does not exist in figure 'Figure 1'
Actor 'InnerMouth' does not exist in figure 'Figure 1'
Actor 'Nostrils' does not exist in figure 'Figure 1'
Actor 'Lacrimal' does not exist in figure 'Figure 1'
Actor 'Eyelashes' does not exist in figure 'Figure 1'
Actor 'Eyebrows' does not exist in figure 'Figure 1'
Actor 'Teeth' does not exist in figure 'Figure 1'
Actor 'Gums' does not exist in figure 'Figure 1'
Actor 'Tongue' does not exist in figure 'Figure 1'
Actor 'LCornea' does not exist in figure 'Figure 1'
Actor 'LEyewhite' does not exist in figure 'Figure 1'
Actor 'LPupil' does not exist in figure 'Figure 1'
Actor 'LIris' does not exist in figure 'Figure 1'
Actor 'RCornea' does not exist in figure 'Figure 1'
Actor 'REyewhite' does not exist in figure 'Figure 1'
Actor 'RPupil' does not exist in figure 'Figure 1'
Actor 'RIris' does not exist in figure 'Figure 1'
Actor 'Nipples' does not exist in figure 'Figure 1'
Actor 'SkinForearm' does not exist in figure 'Figure 1'
Actor 'SkinArm' does not exist in figure 'Figure 1'
Actor 'SkinHand' does not exist in figure 'Figure 1'
Actor 'Fingernails' does not exist in figure 'Figure 1'
Actor 'SkinLeg' does not exist in figure 'Figure 1'
Actor 'SkinFeet' does not exist in figure 'Figure 1'
Actor 'Toenails' does not exist in figure 'Figure 1'
Creating Full Body morph
Restoring IK  for Figure 1
Done
Saving figure Sofi2 to library
Saving INJ Sofi2 to library
Writing INJ for actor Hip
Writing INJ for actor Abdomen
Writing INJ for actor Chest
Writing INJ for actor Neck
Writing INJ for actor Head
Writing INJ for actor Left Eye
Writing INJ for actor Right Eye
Writing INJ for actor Right Collar
Writing INJ for actor Right Shoulder
Writing INJ for actor Right Forearm
Writing INJ for actor Right Hand
Writing INJ for actor Right Thumb 1
Writing INJ for actor Right Thumb 2
Writing INJ for actor Right Thumb 3
Writing INJ for actor Right Index 1
Writing INJ for actor Right Index 2
Writing INJ for actor Right Index 3
Writing INJ for actor Right Mid 1
Writing INJ for actor Right Mid 2
Writing INJ for actor Right Mid 3
Writing INJ for actor Right Ring 1
Writing INJ for actor Right Ring 2
Writing INJ for actor Right Ring 3
Writing INJ for actor Right Pinky 1
Writing INJ for actor Right Pinky 2
Writing INJ for actor Right Pinky 3
Writing INJ for actor Left Collar
Writing INJ for actor Left Shoulder
Writing INJ for actor Left Forearm
Writing INJ for actor Left Hand
Writing INJ for actor Left Thumb 1
Writing INJ for actor Left Thumb 2
Writing INJ for actor Left Thumb 3
Writing INJ for actor Left Index 1
Writing INJ for actor Left Index 2
Writing INJ for actor Left Index 3
Writing INJ for actor Left Mid 1
Writing INJ for actor Left Mid 2
Writing INJ for actor Left Mid 3
Writing INJ for actor Left Ring 1
Writing INJ for actor Left Ring 2
Writing INJ for actor Left Ring 3
Writing INJ for actor Left Pinky 1
Writing INJ for actor Left Pinky 2
Writing INJ for actor Left Pinky 3
Writing INJ for actor Right Buttock
Writing INJ for actor Right Thigh
Writing INJ for actor Right Shin
Writing INJ for actor Right Foot
Writing INJ for actor Right Toe
Writing INJ for actor Left Buttock
Writing INJ for actor Left Thigh
Writing INJ for actor Left Shin
Writing INJ for actor Left Foot
Writing INJ for actor Left Toe
Saving REM Sofi2 to library
Done

regards,
Andrew


nruddock ( ) posted Sat, 05 January 2008 at 8:37 PM

It would appear that the OBJ your getting out of Zbrush is grouped by material rather than by body part.
This probably happened when importing to or exporting from Zbrush, so check the options your using for these steps and see if you can work out the right ones to use.


mathman ( ) posted Sat, 05 January 2008 at 8:57 PM

file_396945.jpg

Thanks, nruddock.

It would most likely be the export from Poser - seeing as their doesnt appear to be any such export options from zBrush v3.

The attached image illustrates what options I normally choose. Does this give you any further clue?

thanks,
Andrew


mathman ( ) posted Sat, 05 January 2008 at 8:57 PM

file_396946.jpg

...and then


svdl ( ) posted Sun, 06 January 2008 at 8:50 AM

That looks like the correct export options.
On the other hand, if you're going to create your morphs from the figure in zero pose, it's easier to work on a copy of the .OBJ file in Runtime:Geometries (that's what I usually do).

The pen is mightier than the sword. But if you literally want to have some impact, use a typewriter

My gallery   My freestuff


mathman ( ) posted Sun, 06 January 2008 at 2:33 PM

Yes that is what I did as well. Unfortunately, it didn't work.


svdl ( ) posted Sun, 06 January 2008 at 4:47 PM

Then it must be something in the ZBrush import or export. I don't have ZBrush, so I can't help you there.

The pen is mightier than the sword. But if you literally want to have some impact, use a typewriter

My gallery   My freestuff


nruddock ( ) posted Sun, 06 January 2008 at 6:58 PM

Quote - I don't have ZBrush, so I can't help you there.

Ditto.

There have been several tutorials and threads recently about making Poser morphs in  Zbrush, so one of those may help.
One thing that may work is to save the original grouping and UVs using UVMapper (either version) and then using the saved UVS file to restore the correct grouping to your morphed OBJ.


3doutlaw ( ) posted Fri, 24 September 2010 at 12:13 PM · edited Fri, 24 September 2010 at 12:15 PM

file_459580.JPG

Yes this is an old post....but a useful script if I could get it working! ;-)

I got the same results as mathman above.  It creates a new figure called the morph name, creates a new dial INJChannels->Community area, and creates a INJ in the pose area....

But none of that does anything.

Here are the settings I used, what about the no object selected at the bottom?  Is that right?

Not sure what the morph channel or the morph precision are getting me there...?


Privacy Notice

This site uses cookies to deliver the best experience. Our own cookies make user accounts and other features possible. Third-party cookies are used to display relevant ads and to analyze how Renderosity is used. By using our site, you acknowledge that you have read and understood our Terms of Service, including our Cookie Policy and our Privacy Policy.