I was trying to make it move while it was in the viewport. Either way, we were able to get this scene corrected from the maker, eliminating the need for this script.
Thanks,
Original Message:
Sent: 11-02-2022 17:18
From: Garner Millward
Subject: Cannot Set Positioner Position Values
I tested Roma's script in the Keyboard Map Script OnKeyPress event and it works for me. I put the scene online on Framebuffer 1 layer 0 with an object called "Positioner" and when I execute the keyboard macro it moves the Y position of the object to 320 while online.
Dim positioner As xpBaseObject Dim hold As xpScene Dim fb As xpOutputFrameBuffer engine.GetOutputFrameBuffer(0, fb) fb.GetSceneOnLayer(0, hold) hold.GetObjectByName("Positioner", positioner) positioner.PosY = 320.0
Its important to be aware that when a scene is online in the Sequencer or preview that it is a copy of the original scene, is it not the scene itself. In your original script, Jack, you call:
engine.GetSceneByID(9535,hold)
That call will not affect an online scene or a scene in preview, because those are scene copies, not the scene. That's why Roma's script calls
fb.GetSceneOnLayer(0, hold)
Which would retrieve the scene copy.
Are you trying to make the object move while it is online in a framebuffer or while it is in the viewport of XPression?
Original Message:
Sent: 11-02-2022 14:24
From: Roman Yaroshenko
Subject: Cannot Set Positioner Position Values
Do I understand correctly what you want to see how the Y-Pos changes after you click the button, even if you run scene in Sequencer?
------------------------------
Roman Yaroshenko
chief specialist
RBC-TV
Moscow Russian Federation
Original Message:
Sent: 11-02-2022 12:12
From: Jack Reynolds
Subject: Cannot Set Positioner Position Values
The screenshots are all in my original message, but I want to write Y-Pos = 320 into the positioner object in my scene 9535. The screenshot of the scene objects is above.
------------------------------
Jack Reynolds
Original Message:
Sent: 11-02-2022 11:56
From: Roman Yaroshenko
Subject: Cannot Set Positioner Position Values
OK.
What values do you want to write and where?
------------------------------
Roman Yaroshenko
chief specialist
RBC-TV
Moscow Russian Federation
Original Message:
Sent: 11-02-2022 11:40
From: Jack Reynolds
Subject: Cannot Set Positioner Position Values
I put your script into the keyboard file and did not have success. As I said in my original post, the script will run with no issues, but it cannot write values. The script you provided me did run, but it had the same issue as I did, where it will not modify any values.
------------------------------
Jack Reynolds
Original Message:
Sent: 11-02-2022 11:27
From: Roman Yaroshenko
Subject: Cannot Set Positioner Position Values
rename in main.kbd
------------------------------
Roman Yaroshenko
chief specialist
RBC-TV
Moscow Russian Federation
Original Message:
Sent: 11-02-2022 11:22
From: Roman Yaroshenko
Subject: Cannot Set Positioner Position Values
Hi Jack.
Have you created two hotkeys with two scripts?
Put main.kbd into XPression program folder. Run Xpression, open Keyboard/GPI Mapping and in Current keyboard Map select main.
After that run the scene and press 1 then 7 on numpad
------------------------------
Roman Yaroshenko
chief specialist
RBC-TV
Moscow Russian Federation
Original Message:
Sent: 11-02-2022 10:43
From: Jack Reynolds
Subject: Cannot Set Positioner Position Values
I just tested that script and it does not seem to do anything. I ran it on the correct FB and layer, and nothing changes on the output or in the preview. Checking the layout confirms that the value is unchanged.
------------------------------
Jack Reynolds
Original Message:
Sent: 11-01-2022 11:49
From: Roman Yaroshenko
Subject: Cannot Set Positioner Position Values
Here is a script. In a string fb.GetSCeneOnLayer(0, fb) you must set the number of layer were you are running the scene.
Dim positioner As xpBaseObject Dim hold As xpScene Dim fb As xpOutputFrameBuffer engine.GetOutputFrameBuffer(0, fb) fb.GetSceneOnLayer(0, hold) hold.GetObjectByName("Positioner", positioner) positioner.PosY = 320.0
------------------------------
Roman Yaroshenko
chief specialist
RBC-TV
Moscow Russian Federation
Original Message:
Sent: 11-01-2022 10:51
From: Jack Reynolds
Subject: Cannot Set Positioner Position Values
I am running the script from the Keyboard/GPI Mapping menu globally, using the OnKeyPress. I am running it from the sequencer. Though, when I try to run the command in the layout it exhibits the same behavior.
------------------------------
Jack Reynolds
Original Message:
Sent: 11-01-2022 10:44
From: Roman Yaroshenko
Subject: Cannot Set Positioner Position Values
ОК.
Where do you set your script and from where are you running your scene, from layout or from Sequence
------------------------------
Roman Yaroshenko
chief specialist
RBC-TV
Moscow Russian Federation
Original Message:
Sent: 11-01-2022 10:23
From: Jack Reynolds
Subject: Cannot Set Positioner Position Values
Thank you for your replay. I am trying to make a keyboard script that toggles that specific scene's positioner object between Y320.0 and Y360.0. The challenge is this script has to be a keyboard script that modifies this value, as we cannot edit the scene itself to add a function that allows for position changing. The script I wrote functions correctly according to the debug. When I do a .GetPosXYZ, it returns the initial value. After I set new values to it and run another get, it returns that those values are then newly written ones. However they do not appear to make it to the actual scenes.
Thank you,
Jack
------------------------------
Jack Reynolds
Original Message:
Sent: 11-01-2022 05:40
From: Roman Yaroshenko
Subject: Cannot Set Positioner Position Values
Hi Jack.
First: I noticed that the work of the script is distributed only in this scene. Then why are you declaring this scene in a script?
Second: engine.GetSceneByID(9535,hold) is written incorrectly, the third parameter is missing, true or false
Third: why reapply the Y position
positioner.SetPosXYZ(640.0, 320.0, 0.0)
positioner.PosY = 320.0
dim positioner as xpBaseObjectscene.GetObjectByName("Positioner",positioner)positioner.PosY = 320.0
In general, it would be better if you described the task in full
------------------------------
Roman Yaroshenko
chief specialist
RBC-TV
Moscow Russian Federation
Original Message:
Sent: 10-31-2022 17:55
From: Jack Reynolds
Subject: Cannot Set Positioner Position Values
Hello,
I am trying to write the following keyboard script that changes the position of a scene. I can successfully locate the scene and get the XYZ positions from it, but I cannot set the values. Interestingly, when I test the script, it returns that the value has been updated, but the preview window or the values in the editor do not reflect that.
Both the .PosY and the .SetPosXYZ do nothing apparently. The commented is what I hope to achieve, toggling between the two values for the scene.
dim positioner as xpBaseObjectdim hold as xpScenedim xInit, yInit, zInit as doubleengine.GetSceneByID(9535,hold)hold.GetObjectByName("Positioner",positioner)positioner.SetPosXYZ(640.0, 320.0, 0.0)positioner.PosY = 320.0'if yInit = 360 then'positioner.SetPosXYZ(640.0,320.0,0.0)'else if yInit = 320 then'positioner.SetPosXYZ(640.0,360.0,0.0)'else'positioner.SetPosXYZ(640.0,360.0,0.0)'end if
------------------------------
Jack Reynolds
------------------------------