an0malaus opened this issue on Jul 10, 2019 ยท 5 posts
an0malaus posted Wed, 10 July 2019 at 4:40 AM
In the absence of a macOS compatible version of the late, lamented Ralf Sessler's (D3D) Poser File Editor, I've found that the next best thing was a text editor which could perform syntax colouring for Poser files. BBEdit is one such editor (my preferred) and I've just been requested to share that information.
Since I've opened my first GitHub repository to collaborate on Python Libraries to augment Poser's Python API, this seemed an obvious way to fulfil Perpetualrevision's request, and will allow others to contribute and maintain code for the community, should I suddenly and inexplicably become enamored of the underside of a motor omnibus in perpetuity.
In the repository PoserLanguageModuleForBBEdit lives a single .plist file, which can be placed in BBEdit's Language Module preferences folder.
I'm releasing the module this way to allow others to contribute and provide updates whenever new Poser releases add new keywords.
Let me know if you'd like to use this, but will struggle with getting it from GitHub.
Cheers, an0malaus
Verbosity: Profusely promulgating Graham's number epics of complete and utter verbiage by the metric monkey barrel.
perpetualrevision posted Thu, 11 July 2019 at 9:29 PM
Thank you so much for sharing this. It definitely makes editing Poser library files easier to do in BBEdit!
TOOLS: MacBook Pro; Poser Pro 11; Cheetah3D; Photoshop CC
FIGURES: S-16 (improved V4 by Karina), M4, K4, Mavka, Toons, and Nursoda's people
GOALS: Stylized and non-photorealistic renders in various fantasy styles
Snarlygribbly posted Mon, 15 July 2019 at 6:27 AM
Tell me more about the project to augment the Poser Python API ?
Free stuff @ https://poser.cobrablade.net/
an0malaus posted Tue, 16 July 2019 at 3:23 AM
Snarlygribbly posted at 5:29PM Tue, 16 July 2019 - #4357048
Tell me more about the project to augment the Poser Python API ?
I've spoken to ADP about combining our Python Libraries and got as far as posting mine on GitHub so others can collaborate. It's early days, so I haven't had anything to merge with my offerings yet, but so far I have 3 modules: PoserDialValue, PoserPrefs and PoserUI.
PoserDialValue was the first one I developed, prior to the implementation of the parm.UnaffectedValue() method, to extract the dial value of a channel, without valueOperation influences, as I kept having problems reapplying saved poses on ERC channels doubling the ERC effect, since a saved pose recorded the influenced value, not what was displayed on the dial. It started with simple linear regression, then progressed to importing SciPy and an updated version of NumPy, to use the spline interpolation methods to determine actual parameter dial values with keyed valueOperations. Eventually Poser implemented methods to remove and restore value Operations, which meant the valops could be recorded and removed, allowing determination of the dial value, then restored. Finally the UnaffectedValue() method was implemented, rendering some of the routines redundant, but there is still no equivalent to the ValueFrame() for UnaffectedValueFrame(), which means each frame must be made current before parameter dial values can be determined. This is all done as an adjunct to routines which allow saving specific sets of parameters (including scales, which aren't normally saved). These routines are not yet part of the libraries, but are intended to be, including a Poser file parser.
The PoserPrefs module started out as a way to access Poser's own preference file to determine recent directories when saving files. It encapsulated the requirements to match whatever version of Poser was running at the time with where that version stored its preference files (which changed many times). It then grew to be a method by which scripts could record their own preferences in the same format that Poser uses, but without risking any corruption of Poser's own preferences, and also fallback to Poser preference info in the case that local preferences did not exist yet. Scripts can read and save their own preferences, meaning it's easy to edit a pref file and set or clear a debugging or logging flag (where implemented) without having to edit the script. Since I often have a rapid development cycle for scripts, it was important that I increment and record a script's version number with the preferences saved, in case there would be a drastic change of file format or information where a script would need to know what information would be available in a certain version of preference file.
The PoserUI module implements some other functions which are not part of the default Python API, but ought to be. Translating Poser constant int values into the string literals they represent, handling and determining equivalent compressed or uncompressed file suffixes (.pz2 or .p2z, etc.), a library file save dispatcher keyed by file extension, test methods to record and report whether certain methods have been implemented in the currently running version of Poser for script compatibility with older Poser versions, methods to determine actor types when there is no explicit test method implemented yet, unit conversions and camera focus methods, animSet handlers - since Poser does not yet provide python access to animSet names which the UI displays, CustomData management methods to create and maintain a list of CustomData keys used, since Poser does not provide access to them.
My intention beyond these is to release (whether free/open source or commercial) other scripts which rely on these libraries. The libraries will be maintained to support a range of Poser versions (and both macOS and Windows), using newly implemented features of Poser when they become available or an alternative workaround (if possible) for older versions without those methods.
I have macOS compatible routines which parallel many commercial script features only available to Windows users. I have obj and Poser file parsers and pose savers with as much capability as Poser's Python API allows (they cannot yet create figures or groups in object meshes, without resorting to Poser's own loading routines). The file parsing will almost certainly be added to the free/open source repository in a new module.
I have scripts which are intended to save and load base figure poses and corresponding conformed figure fitting poses in a single action, by making use of readScript functionality and adjunct scripts to change and restore the currently selected figure. Many of the scripts share common code which deserves to be extracted into a library module.
Please let me know if you would like to contribute or make use of what's already there, and I'll sitemail you the repo link.
Verbosity: Profusely promulgating Graham's number epics of complete and utter verbiage by the metric monkey barrel.
Snarlygribbly posted Tue, 16 July 2019 at 5:50 AM
an0malaus posted at 11:47AM Tue, 16 July 2019 - #4357118
Please let me know if you would like to contribute or make use of what's already there, and I'll sitemail you the repo link.
That all sounds very interesting. It's been a very long time since I looked at any of my code, but perhaps I can find stuff that would be of use to others. I'm certainly interested in the code that others write, so yes please - do send the repo link.
Free stuff @ https://poser.cobrablade.net/