Loading smart props without parents



  • Is there a way to load a smart prop without it being parented to a figure in the scene? So often I want a dagger or a piece of jewelry as a prop on a table rather than something a figure is wearing or holding but the prop is a smart prop so I have to load it and then un-parent it.



  • @redphantom said in Loading smart props without parents:

    Is there a way to load a smart prop without it being parented to a figure in the scene? So often I want a dagger or a piece of jewelry as a prop on a table rather than something a figure is wearing or holding but the prop is a smart prop so I have to load it and then un-parent it.

    It's a "smart" prop, but it's still just a prop. As long as there's no figure selected, it will load just like a normal regular prop.



  • @eclark1849 Actually, I think that depends on the prop because, for instance, if it's say a sword, or a gun, it may be set up for either hand, so you'll get a prompt for which hand you want it in. Of course I haven't tried it, so I could be wrong, but I'm not sure whether you have the character selected or not will matter.



  • @redphantom if you're prepared to look in the .pp2 (or .ppz file with a gzip-aware text editor like Notepad+ or BBEdit), you can search for the parent or smartparent line and change that (in a separate, renamed copy, of course) to just read "parent UNIVERSE", which essentially unparents the prop.

    I should add that although I have Python scripts which can mostly supplant Poser's own library loading routines, there are still a few things which do not have Python equivalents, and therefore cannot yet be done with a script.



  • @Miss-B You may or may not get the prompt. Depends on how it was saved. But, ultimately a sword is still just a sword. I've used props for M3 with M4, for example.



  • @eclark1849 the trick that @redphantom 's looking for is a way to override the smart parenting on load. Even if a referenced figure is not selected, but still exists in the scene, the smartparenting will activate upon loading the prop.

    @redphantom perhaps I'm making it too hard. The obvious and straightforward way is to unparent the prop once loaded, and then save it back to the library with a different name, where it will, henceforth, no longer be a smart prop, just an ordinary Joe prop.


  • Poser Ambassadors

    Load the prop.
    Set : Parent to Universe.
    Now your prop is "parent free". :-)



  • So there's no easy way, but it can be done manually.

    Eclark, how do you unselect a figure? It seems my scenes always have a figure selected. Even if a select a prop, the parented prop gets parented to what ever figure is listed in the figure menu.

    Tony, that's exactly what I was looking to avoid. when you have half a dozen or more props in a scene all parented and you don't want any of them parented, it can be a pain to have to do that.



  • smart-propping is always to an actor, not to a figure.
    So if the sword is smartpropped to 'left hand' and the current figure has no 'left hand' actor, the prop will not be parented to anything.
    Try to add a dummy figure with no actors named such they may kick in as parent.



  • @vilters thanks, that is the "right" way to unparent a prop, as in, remove it's parenting to any other actor. All actors within the scene are either parented to the UNIVERSE (unparented) or another actor. The UNIVERSE actor is the only one in the scene which will return actor.Parent() == False.



  • @redphantom Maybe a little Pythons script may help:

    SCENE = poser.Scene()
    _last_unparent = list()
    
    def unparent():
        global _last_unparent
        universe = SCENE.ActorByInternalName("UNIVERSE")
        _last_unparent = list()
        actorlist = SCENE.Actors()
    
        for actor in actorlist:
            if actor.IsProp and actor.Parent() != universe:
                if actor.IsDeformer() or actor.IsBase() or actor.IsZone():
                    continue
                _last_unparent.append((actor.InternalName(), actor.Parent().InternalName()))
                actor.SetParent(universe)
    
        if __name__ == "__main__":
            if not _last_unparent:
                print "No Smartprop found."
            else:
                print "%s props unparented." % len(_last_unparent)
    
    
    def undo():
        global _last_unparent
        for actor_name, parent_name in _last_unparent:
            try:
                actor = SCENE.ActorByInternalName(actor_name)
                parent = SCENE.ActorByInternalName(parent_name)
            except Exception:
                continue
            if actor.IsProp() and parent:
                actor.SetParent(parent)
    
        _last_unparent = list()
    
    
    if __name__ == "__main__":
        unparent()
    
    

Log in to reply
 

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