Dizzi's Support Forum

Python Scripts for Poser 8 => Hampelmann => Topic started by: Dizzi on January 07, 2010, 03:11:51 AM

Title: Hampelmann - Figure posing tool for Poser 8
Post by: Dizzi on January 07, 2010, 03:11:51 AM
Short summary:

This Python script for Poser 8 allows to select one or multiple body parts from a visual 2D representation (layout) of the selected Poser figure and to manipulate their rotations.

Or just use it to select the current Poser actor ;-)

This script comes with layouts for the Poser 8 figures "Ryan" and "Alyson" and does not work for other figures without additional layouts.

Please check out the HTML help contained in the ZIP file on how to use the script.
Title: Re: Hampelmann - Figure posing tool for Poser 8
Post by: Dizzi on January 07, 2010, 03:55:50 AM
Hampelmann v1.0
Overview
This Python script for Poser 8 allows to select one or multiple actors from a visual 2D representation (layout) of the selected Poser figure, if a layout for the figure exists. Layout information for the Bodies and Hands of the Poser 8 figures "Ryan" and "Alyson" are included. Other layouts can be created and/or may become available for download.

The screenshot shows how Hampelmann may look like if you've got Poser 8's "Ryan" selected. There are two layouts available: Body and Hands, with Body being the currently used layout. The body parts (actors) Collar, Shoulder, Forearm and Hand are currently selected. Tooltip information for the Forearm shows its name, and how its rotations are setup up in Hampelmann (more detail further down).

Pressing mouse buttons and moving the mouse the selected actors will rotate according to the setup.

Selecting an actor on the layout also selects the actor in Poser, so you can use Hampelmann to just select actors in Poser, too.

The main purpose of this script in its current version is to test different ways to pose Poser figures. So if you'd like something changed, feel free to contact me. If you like this script, you should contact me, too - that increases the chance of additional layouts for other figures appearing :-)

(http://neocron.webspaceforme.net/alforum/index.php?action=dlattach;topic=1517.0;attach=63;image)

Quick start
There are just a few steps you need to take to test drive Hampelmann:


You should have seen the selected actor(s) rotate and how to store and recall selected actor groups.

(http://neocron.webspaceforme.net/alforum/index.php?action=dlattach;topic=1517.0;attach=65;image)

How to work with Hampelmann
Working with Hampelmann is quite simple:
Run the Python script "Hampelmann.py" and place the script's window where you like it. It'll dock to Poser's layout, if you like (and should be altready there the next time you start the script). If you don't want it to dock, right click somewhere outside the layout area and uncheck "Drag-Docking Enabled".

If no figure is selected or no layout for the selected figure exists then only the *Setup* tab will be shown. This tab currently allows to choose from two different change types (how actor rotations are modified), to select which mouse movement changes the rotations and to specify if the last selected actor in Hampelmann should become the selected actor in Poser. It also provides information about the geometry file of the selected figure and allows to import figure and layout definitions.

If you selected a figure that has one or more layouts, then the layouts will be shown, like above Body and Hands. Here, the layout Body contains the shown actors from the body excluding hands, fingers, eyes, tongue, etc. The layout Hands contains the hand actors. The name and number of layouts is not limited, use the left and right arrow buttons to scroll through the layouts. Changes to the layouts are made with the Script "Hampelmann Setup.pyc" (not yet included in this ZIP).

To select an actor, just click on it using the left mouse button.
To select multiple actors hold SHIFT, CTRL/CMD, ALT while clicking. Deselecting one of multiple actors works the same.
You can store the selected actors to the keyboard keys A through Z by holding down SHIFT and one of the keys.
You can recall the stored actors by clicking the keys A through Z by pressing one of the keys (without holding down SHIFT).

Depending on the change type (see *Setup* tab) you can rotate the selected actors. Wiith change type one, you rotate the selected actors moving the mouse while keeping mouse buttons pressed. Keeping the left mouse button pressed will do the rotation type 1, pressing the middle mouse button will do the rotation type 2, right mouse button the rotation type 3 while you're moving the mouse left/right* or up/down* (*: can be changed on *Setup* tab). The rotation type is defined via the layout and can be either X-, Y- or Z-rotation. (X-, Y-, Z-rotations can be named eg. "Side-Side", "Bend", "Up-Down", etc. in Poser's User Interface).

The screenshot shows that Forearm has no rotation type 1 assigned . So it will not move when rotation type 1 is applied to the actors. The other actors (not shown) do have a rotation set up, so they will move. The other rotation types are assigned: 2 is Twist, 3 is Bend.

Mirror will mirror left and right side.
Pressing Undo will undo the last action you made with Hampelmann, pressing it again will undo the action before. As the actions done by Hampelmann are not saved to Poser's undo history, you'll have to work with this... An Undo is saved when you stop pressing a mouse button. If you want to reset the Undo history, ALT-click the button. If you delete a figure and replace it by another you should reset the Undo history otherwise the wrong actor may be affected by Undo.
Press Redo if you used Undo a bit to often.
Sensitivity can be changed via the slider. The higher the sensitivity, the lower the rotation change. To be precise, the change is 1/sensitivity - so sensitivity at 100 will change the rotation by 0.01 for each pixel you move the mouse, sensitivity at 1 will rotate by 1 for each pixel you move the mouse.

The different change types
Currently there are two change types to choose from (see *Setup* tab):

Setup
Here's just some information on the not yet described options:

Mouse X change and Mouse Y change define if mouse movement along X or Y axis will change the rotation or not according to the change type. If you have "None" selected for both Mouse X and Mouse Y change then the change types won't do any rotations at all. Selecting "Normal" will add to the rotation if you move right or down and substract from the rotation if you move left or up. Selecting "Inverted" will just do the opposite of "Normal".

Installation
You can either run the scripts (that are the file with the .py or .pyc extension) from Poser's File menu Run Python Script (how complicated!) or put it in Poser's Scripts menu. To do the later just save the script into (or in a subfolder of) Runtime\Python\poserScripts\ScriptsMenu beneath Poser 8's installation folder. You'll have to restart Poser before you can find the entry in the Scripts menu, though. You can also assign a shortcut to the script if it's placed there (click here for more info (http://neocron.webspaceforme.net/alforum/index.php?topic=1512.0)). There are other options, but these should be sufficient :-)

The configuration files for the layouts are stored in a subfolder (acb/figurePosing) of the folder Poser stores its configuration data. To find out where that is, just run the script "show_config_location.py" and then place all the files ending with ".config" there or use Import figure and layout definitions from the *Setup* tab - it'll copy the configuration files into the correct location.

About the config files - adding new figures with same actors
There are three types of config files:

"Body.p8_fem.layout.config" is a layout definition. Only the part up to the first dot is displayed as layout name. This allows to have multiple layouts named "Body". So a fish can also have a "Body" layout, but lacking arms it shouldn't use that of the Poser 8 characters ;-). These are created with "Hampelmann_Setup.pyc".
"Body.p8_fem.P8Alyson_HR.figure.config" is a figure definition. Its name starts like the layout definition followed by the name of the geometry file for the figure. So if you have another Poser character with the same layout as the Poser 8 guys, check the "*Setup*" tab for the name of the geometry file and then copy the figure definition and change the bold highlit part to the geometry name. These
files are usually also created with "Hampelmann_Setup.pyc".
"Body.p8_fem.keys.config" is a key definition and created/changed when you assign actors to a keyboard key.

Setting up new layouts
Layouts are created and changed with "Hampelmann_Setup.pyc". Figures and rotations are also setup with it.
(http://neocron.webspaceforme.net/alforum/index.php?action=dlattach;topic=1517.0;attach=67;image)

Other
Please do not redistribute this script, you can tell your friends, where they can download it, though.
Layout and figure definitions for this product may not be sold without my permission, they may be provided for free or with a figure you got hold the copyright for though.

If you have any proplems or improvement suggestions please send me a PM or post to this board.


Happy posing

Dizzi
Title: Re: Hampelmann - Figure posing tool for Poser 8
Post by: Dizzi on January 17, 2010, 10:47:12 PM
Title: Re: Hampelmann - Figure posing tool for Poser 8
Post by: Dizzi on January 31, 2010, 08:47:16 PM
Information about the latest changes on the Hampelmann Homepage (http://neocron.webspaceforme.net/hampelmann).
Title: Re: Hampelmann - Figure posing tool for Poser 8
Post by: Dizzi on September 20, 2011, 10:57:29 PM
Updated Script for Poser 9 / Pro 2012