Can Python do this with Poser?

  • I'm just asking, honest. I'm wondering if a Python script can control Poser to the point of opening and closing hierarchy lists and remember the settings on them. Also can Poser be made to recall the settings made in one of these lists? In other words, if I want to collapse a hierarchy list, can I do that in Python, and can poser be made to remember which boxes I had checked so that when I open the list again, the same boxes are checked or open? I'm wondering if maybe Poser could be set to remember that in preferences or maybe with a memory dot? I'm sorry if the question sounds confusing.

  • @eclark1849 Maybe Python could generate a little preference file or something that Poser would have to read and initiate the next time it was opened? Or at least the next tie the hierarchy list was opened?

  • Hi.
    Are you talking about the hierarchy lists stubborn determination to never be collapsed - I'd log it as a bug but I'm sure someone would argue it's by design or a feature lol.

    Python has the ability to run scripts when Poser starts yes

    and creators like Netherworks already have utilities that are able to auto start with poser, collapse list, remember favourites etc

    the Scene Toy Pro by Netherworks was close but not quite close enough for what you want to do as sadly it does not interact with the hierarchy lists in the way that you want.

    But if many of the feature are already in a store product then it's likely that Python should be able to do what you want to achieve

  • I once held a vote in the old forums of the most hated feature in Poser, and the hierarchy window resetting every time you open it won that!

    Man, that was years ago. The hierarchy window is definitely a long-lasting bugger.

  • I just answered this in another thread:

    Character dial groups can be expanded/collapsed by creating a temporary pose file which just references the groupNode collapsed attribute, and then load it.

    I'm not aware of any python API which references the hierarchy editor at all. That would certainly be nice. And the Copy Morphs From dialog originally had the ability to collapse the morphs for each actor without losing access to the actor hierarchy.

    That said, without API access to the hierarchy tool, the only insane thing I can conceive of which might do the job is to have Python tell the OS via appleScript (And, of course, this is a Mac only solution) to select the hierarchy tool window and deliver mouse clicks to certain coordinates. Once I've written an AI capable of deciphering an image of the hierarchy tool, I'll get started on that right away [Not]. Sorry, that's going to require features added to another Poser release.

    Please, someone tell me RTFM, and that Poser can actually do this from python. PLEASE!

  • The only other person I can think of that made a script that interacted with the hierarchy was Semidieu - but as far as we know he no longer has anything to do with the community - which is why i didn't mention it before as with his leaving and dimensions3Ds death so much knowledge has been lost - perhaps one day a repository of knowledge will be sucked from peoples brains so we don't keep going around in circles.

    Here is the youtube ad blurb for the Advanced Figure Manager 2

  • @eclark1849 what are the particular things you're trying to do with the Hierarchy Editor that need you to open and close it repeatedly?

    Knowing that there are innumerable things (like toggling IK, or changing which objects it displays) that cause it to refresh its list and abandon its memory of what was collapsed. I ask to see if what you need to do could be done by another script which could, in theory, remember it's hierarchy visibility state.

    @adi Interesting. Semidieu's AFM is completely bypassing the built-in Hierarchy Editor and replicating its function and more.

    While looking at this I just discovered something I didn't know existed. A right-click (double-finger tap on the Mac trackpad for me) on the hierarchy editor pops up a contextual menu allowing you to delete or toggle the visibility of the selection or choose from a hierarchical pop-up menu a new parent for the selection. Obviously a safer way to do reparenting than dragging until the hierarchy scrolls in the direction you need to find the intended parent. Also prevents accidental reparenting when scrolling.

  • @anomalaus

    I'm not sure if Semidieu's AFM bypasses the Hierarchy Editor or latches on to it and wraps the Hierarchy tool window in the AFM plugin and adds functions.

    Netherworks Scene Toy Pro can certainly latch on to the Hierarchy Editor and open and close it, it just doesn't seem to interact as well with it as it does the many other Poser functions

  • @adi I doubt if either of these do anything other than manipulate the accessible hierarchy from the Poser Python scene instance. A scene.DrawAll() is probably sufficient to force the hierarchy Editor to refresh its display. AFM is certainly not displaying the appearance of the actual, built-in hierarchy editor I see on my system. Just a panel which displays the top level figures and unparented props. It didn't seem to allow expansion of the figure. I may be wrong. I've never purchased or used the script and I only watched the first half of the clip.

    Opening and closing a tool panel is a different matter to interacting with it. The poser.ProcessCommand(int) with codes chosen from the AppLocation()/Runtime/ui/Poser.xrc (or PoserMac.xrc) can execute any command available from Poser's menus (that is listed in that file). I can open the hierarchy editor with poser.ProcessCommand(1488). But that doesn't actually let me do anything with it from within python scripts.