Loading Scene loses Camera CustomData



  • Can anyone confirm that saving a scene with CustomData applied to a camera fails to load any CustomData for the camera when the scene is opened again?

    I'm using CustomData with a fixed name Key that keeps a delimited string of all of the other keys that I have assigned CustomData to, so I can keep track of what pose file has been applied at a particular frame number across a range of figures, actors and cameras. Figure and prop CustomData seems to reload successfully with the scene, but Cameras don't. Since the Poser Python API doesn't have a mechanism to report what CustomData keys have been saved, I've made my own, but if that's empty, it means that none of the previously saved CustomData is accessible.

    What's in the saved scene for one camera looks like this:

    	smoothPolys 1
    	customData
    		{
    		data PoseName#8 1 0 "<Removed absolute path to runtime>/Runtime/libraries/Camera/Slime Attack/Dolly1/Get Off My Leg 25mm f12.cm2"
    		data PoseName#9 1 0 "<Removed absolute path to runtime>/Runtime/libraries/Camera/Slime Attack/Dolly1/Hanging 25mm f12.cm2"
    		data Keys 0 0 "PoseName#0;PoseName#1;PoseName#2;PoseName#3;PoseName#4;PoseName#5;PoseName#6;PoseName#7;PoseName#8;PoseName#9;PoseName#10;PoseName#11;PoseName#12;PoseName#13;PoseName#14;PoseName#15;PoseName#16;PoseName#17;PoseName#18;PoseName#19;PoseName#20;PoseName#21;PoseName#22;PoseName#23;PoseName#24;PoseName#25;PoseName#26;PoseName#27"
    		data PoseName#20 1 0 "<Removed absolute path to runtime>/Runtime/libraries/Camera/Slime Attack/Dolly1/Stronger 25mm f9,9.cm2"
    		data PoseName#21 1 0 "<Removed absolute path to runtime>/Runtime/libraries/Camera/Slime Attack/Dolly1/Stuck 25mm f11.cm2"
    		data PoseName#10 1 0 "<Removed absolute path to runtime>/Runtime/libraries/Camera/Slime Attack/Dolly1/I Can't See Anything 25mm f13.cm2"
    		data PoseName#22 1 0 "<Removed absolute path to runtime>/Runtime/libraries/Camera/Slime Attack/Dolly1/Surprised 25mm f12.cm2"
    		data PoseName#11 1 0 "<Removed absolute path to runtime>/Runtime/libraries/Camera/Slime Attack/Dolly1/Leave My Arm 25mm f13.cm2"
    		data PoseName#23 1 0 "<Removed absolute path to runtime>/Runtime/libraries/Camera/Slime Attack/Dolly1/That's My Hand 25mm f17.cm2"
    		data PoseName#12 1 0 "<Removed absolute path to runtime>/Runtime/libraries/Camera/Slime Attack/Dolly1/Motionless 25mm f17.cm2"
    		data PoseName#24 1 0 "<Removed absolute path to runtime>/Runtime/libraries/Camera/Slime Attack/Dolly1/Trapped 25mm f12.cm2"
    		data PoseName#13 1 0 "<Removed absolute path to runtime>/Runtime/libraries/Camera/Slime Attack/Dolly1/On The Hands 25mm f14.cm2"
    		data PoseName#25 1 0 "<Removed absolute path to runtime>/Runtime/libraries/Camera/Slime Attack/Dolly1/Trodden 25mm f10.cm2"
    		data PoseName#14 1 0 "<Removed absolute path to runtime>/Runtime/libraries/Camera/Slime Attack/Dolly1/On The Wall 25mm f11.cm2"
    		data PoseName#26 1 0 "<Removed absolute path to runtime>/Runtime/libraries/Camera/Slime Attack/Dolly1/Trouble Tub 25mm f12.cm2"
    		data PoseName#15 1 0 "<Removed absolute path to runtime>/Runtime/libraries/Camera/Slime Attack/Dolly1/Prisoned 25mm f15.cm2"
    		data PoseName#0 1 0 "<Removed absolute path to runtime>/Runtime/libraries/Camera/Slime Attack/Dolly1/Alien Cage 25mm f7,5.cm2"
    		data PoseName#27 1 0 "<Removed absolute path to runtime>/Runtime/libraries/Camera/Slime Attack/Dolly1/What Is This 25mm f9,1.cm2"
    		data PoseName#16 1 0 "<Removed absolute path to runtime>/Runtime/libraries/Camera/Slime Attack/Dolly1/Running Away 25mm f11.cm2"
    		data PoseName#1 1 0 "<Removed absolute path to runtime>/Runtime/libraries/Camera/Slime Attack/Dolly1/Bleah 25mm f9,5.cm2"
    		data PoseName#17 1 0 "<Removed absolute path to runtime>/Runtime/libraries/Camera/Slime Attack/Dolly1/Screaming 25mm f11.cm2"
    		data PoseName#2 1 0 "<Removed absolute path to runtime>/Runtime/libraries/Camera/Slime Attack/Dolly1/Bucket On Her 25mm f9,4.cm2"
    		data PoseName#18 1 0 "<Removed absolute path to runtime>/Runtime/libraries/Camera/Slime Attack/Dolly1/Sinking 25mm f15.cm2"
    		data PoseName#3 1 0 "<Removed absolute path to runtime>/Runtime/libraries/Camera/Slime Attack/Dolly1/Cloning 25mm f11.cm2"
    		data PoseName#19 1 0 "<Removed absolute path to runtime>/Runtime/libraries/Camera/Slime Attack/Dolly1/Stretching 25mm f12.cm2"
    		data PoseName#4 1 0 "<Removed absolute path to runtime>/Runtime/libraries/Camera/Slime Attack/Dolly1/Crawling 25mm f12.cm2"
    		data PoseName#5 1 0 "<Removed absolute path to runtime>/Runtime/libraries/Camera/Slime Attack/Dolly1/Do Not Enter 25mm f9,9.cm2"
    		data PoseName#6 1 0 "<Removed absolute path to runtime>/Runtime/libraries/Camera/Slime Attack/Dolly1/Don't Touch it 25mm f12.cm2"
    		data PoseName#7 1 0 "<Removed absolute path to runtime>/Runtime/libraries/Camera/Slime Attack/Dolly1/Get Off My Face 25mm f15.cm2"
    		}
    	cameraModel real
    	userCreated 1
    

    But when I load the scene, the Python script I have for listing all CustomData cannot find the "Keys" key on any cameras, so it seems to be failing to load it, despite all the figures having theirs reported.

    I'm running Poser Pro 11.1.35540 under MacOS, but I quite expect this to occur on Windows as well.



  • @anomalaus I know absolutely nothing about this, but I am curious, are you applying your customdata to the camera itself or just the scene?



  • @eclark1849 the camera directly. The scene object itself doesn't support CustomData, but the UNIVERSE actor could be used for that purpose. As with props not parented to figures, I'm not sure Poser supports applying poses directly to the UNIVERSE actor.

    It seems to be simple oversight that CustomData would be used by Poser to communicate with external software during a single session (e.g. an external renderer) that needs more information than what is saved in Poser scene files, or some translation of that information, but not that all actors which support saving CustomData might also want to read back that information when a scene is loaded, for the benefit of whatever Python scripts are managing the interface to the external software.

    This is just another example of a swathe of minor features that don't work symmetrically between saving and loading scenes. I imagine it's just a conceptual oversight, along the lines of "Oh, when we load a scene, cameras can't make use of saved CustomData, so we won't bother loading it". Yet cameras are just another type of actor, so they automatically get the CustomData() and SetCustomData() methods, but the scene file parser doesn't include CustomData for cameras, even though the scene save routine does.

    All of which assumes that I'm not the only one with the problem and that others see the same effect.



  • @anomalaus
    Yes in the organic myriad of functions there are many such inconsistencies.

    Just an odd idea which will no doubt be totally off but I will mention it anyway. What if you parent the camera to a prop and save your data in that?



  • @fverbaas unless the prop itself is parented to a figure, poses can't be applied to it, by default [I have a custom Python script which parses pz2 files and can overcome that limitation, to an extent]. The Poser devs seemed to have this cognitive disassociation between figures and the rest of the scene. Perhaps that's understandable, given Poser's original intent, but the further we get from that date, and the more capable Poser becomes, the more urgent it is that such straightjacketed concepts be smoothed back into the overall cohesiveness of the product and its capabilities.

    Regarding the camera CustomData ignored on scene loading, I've written a script that can derive the information I need to replace it, from the main figure in the scene. The whole concept is somewhat of a parallel to the DS integrated library, where metadata links all the relevant pieces together and presents or allows appropriate filtering to only present directly related features, based on the current selection.

    Since I have a figure with many pieces of conforming clothing which require fitting poses, it seemed logical to me that there should be a way to apply all of those associated poses, and cameras framing those poses, in one hit, from the library. The .PZ2 pose file format allows this with the readScript command, and the figure switching is accomplished by a couple of adjunct Python scripts.

    When those poses get applied, the CustomData for each figure and referenced camera also get applied, so cameras can have .CM2 poses apply CustomData to them, but loading a scene fails to parse this same data saved in the scene file for cameras.

    As you suggest, I could indeed put the CustomData anywhere, but the logical place to have it is directly associated with the actor it refers to.