pz2 or py to inject PBMCC channels ?

  • Hello,

    Since you can rename internal name of morphs, some of my PBMCC disappeared and i can't inject pz2 using them. Is there a way to regenerate them on my chararacter using a pz2 and/or a script ?


  • This post is deleted!

  • This post is deleted!

  • I used a python script from phoenix1966 and modified it :

    import poser



    for act in fig.Actors():
    if act.IsBodyPart() and act.Geometry():
    if act==fig.ParentActor():

    I know it's not totally academic. But it's a fast way to test the result.
    It works, but it has weird behavior.
    On Head it created custom channels up to PBMCC_96, when i asked to create PBMCC to 50 only.
    It's maybe linked to the fact that some PBMCC were still exist before i launched the script.
    Maybe i should test the existence of the channel before injecting it, how i do this ?

  • Here's an initial attempt in Python.

    Please note that Poser does not currently expose Parameter Groups to python, so the parameters will appear in the 'Other' group in reverse order of their creation. I've also assumed that you want 50 injection channels per body part and 50 value parameters on the body, though characters like V4 have 70 on the head and neck actors. I've excluded any body parts with no geometry, other than the 'Body' actor, which is parented to the scene's 'UNIVERSE' actor.

    Hope this helps.


  • Yes it works ! Thank you very much !

    Only one little thing, the custom channels are named PBMCC_xx (you forgot the underscore) so i changed your script in consequence.

  • @barnardino That's great, I was hand testing the code in the python shell on an Andy figure, so the script was created afterwards. I also had trouble posting the link since I have insufficient reputation to upload the script directly.

    I seem to remember that there was a change in how SpawnTarget worked some versions of Poser ago as I think it now takes the current vertex delta state into account, so it's safer to use SpawnTargetFromGeometry() when creating empty channels. I see the old script has a test if act==fig.ParentActor():. The python shell syntax help on ParentActor() is a bit ambiguous, but further testing shows me that after re-parenting a figure to a prop, fig.ParentActor() still returns the Body actor, so that is the correct means to determine the Body, not the test I put in the script.

  • @anomalaus said in pz2 or py to inject PBMCC channels ?:


    So it's safe (even better?) to replace this test :
    actor.Parent().Name() == 'UNIVERSE'

    and is it possible to integrate the channel in a groupnode this way :

    parm = actor.Parameter( name )

    I assume this is not the correct syntax, but it should be something like this ... ?

  • I can only guess that the syntax will be something like parm.SetGroup("InjChannel"), because, as I mentioned in my initial post, Poser does not expose the Parameter Groups to Python yet.

    [Edited to remove speculation prior to testing and link upload]

    OK! This appears to work. The python script linked below creates the valueParms on the Body and targetGeoms on the geometry actors then creates a temporary pose file and loads it to create the parameter groups in the UI and finally deletes the temporary file.


  • Nice ! :) it was not an easy part ! well done.

    I personnaly added this to hide and rename the morphs w/ "-" as other PBMCC


    This script is mandatory when you play w/ mulitple morphs that come on the same PBMCCs

    Next step (not a request ! :) ): a script to rename the same Internal Name Channels on all actors and body of the same figure.
    But , maybe it's bit more complicated since a channel can have a dependency with other channels

    Ty very much again.

  • @barnardino Just to clarify, to avoid conflict between multiple, unrelated V4/M4 addons which use the same injection channel number, you'd like a user selectable way to internally rename a specified injection channel on all body parts? Then you could just run the CreateINJParms.py script again to fill in the renamed injection channel?

    Or did you have some other scenario in mind?

  • Yes, that's exactly this.

    For example, GND4 use all PBMCC_01 channels on V4 and, first, it's a time consuming job to rename this channel on all actors. And secondly you need to use your script to recreate all PBMCC_01 lost on all actors in order to use a new morph using the PBMCC_01 channel.

  • OK, link below is to RenameINJParm.py which will:

    Prompt the user for a new parameter name to be applied to internal and external names of a selected morph injection
    channel (PBMCC_xx) on all body parts to allow simultaneous injection of morphs from different vendors which use the
    same channel number.


    NOTE: Renamed parameters will appear in the Other group, not remain in the INJection Channels:Community group, but that's probably what you want. Subsequently running CreateINJParms.py will "fill in" the empty injection channel slot ready for another injection without overwriting the one just renamed.

    {Embarrased aside: please upvote if you find this useful as good reputation allows posting more than once every 5 minutes and improves file upload options, Thanks]

  • @anomalaus

    It works ! :) i upvoted as much as i could for you :)


Log in to reply

Looks like your connection to Graphics Forum was lost, please wait while we try to reconnect.