Forum: Poser Python Scripting


Subject: Callback created using parm.SetUpdateCallback() not behaving as expected

3dcheapskate opened this issue on Sep 25, 2021 ยท 16 posts


3dcheapskate posted Sun, 03 October 2021 at 6:14 AM

Okay, it's looking as if the parm.SetUpdateCallback() is ONLY intended for setting the parameter itself, not anything else - after all the manual does say "Set a per-update callback for calculating THIS parameter value".


The three sample scripts that use it (parmCallback.py, blinkChannels.py, and muscleMag.py) do just that, and nothing more - here's a screenshot showing the callback functions set using parm.SetUpdateCallback() from those three files:


My initial reason for using a callback was to ensure that the parameter in question was modulo 360, and that does indeed work as expected - so thanks adp001 for that :)

The problem came when I thought "if I'm going to have to do that bit in Python, why not do the rest of the maths there too?"


The 3Dcheapskate* occasionally posts sensible stuff. Usually by accident.
And it usually uses Poser 11, with units set to inches. Except when it's using Poser 6 or PP2014, or when its units are set to PNU.

*also available in ShareCG, DAZ, and HiveWire3D flavours (the DeviantArt and CGBytes flavour have been discontinued).