Final trueSpace 7.61 Beta 8 Unofficial Update

User avatar
trueBlue
Captain
Posts: 5208
Joined: 06 Jul 2009, 22:50
Type the number ten into the box: 10

Re: Final trueSpace 7.61 Beta 8 Unofficial Update

Post by trueBlue »

Thanks!
Still testing...
I think we are missing something! If the Bridge worked, Model would recognize the Eye cam and we would not have to set View(s) to a camera in Workspace and Model.
So if it did work, I would think that it would not restore the previous or saved Workspace view. It would just end in that state. Same for Model. Right?

Found another issue, a Link Editor has to be open in order for it to work.
User avatar
clintonman
Captain
Posts: 5422
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California
Contact:

Re: Final trueSpace 7.61 Beta 8 Unofficial Update

Post by clintonman »

trueBlue wrote: 26 Jul 2019, 00:13 Thanks!
Still testing...
I think we are missing something! If the Bridge worked, Model would recognize the Eye cam and we would not have to set View(s) to a camera in Workspace and Model.
So if it did work, I would think that it would not restore the previous or saved Workspace view. It would just end in that state. Same for Model. Right?

Found another issue, a Link Editor has to be open in order for it to work.
So you want it to behave as a camera and not so much like a temporary link with no side effects. If bridge worked it would be like it's always on. In that case why not just make it into a camera and keep it active? I can go either way, since I'm only interested in the bridge syncing aspects of it. The view sync is just a nice addition.

I thought you solved the link editor has to be open limitation. Did it stop working after these last changes or before that? I'll see what I can find out.

Edit:
Just did a test and it seems to work with the link editor closed.
Clinton Reese

http://clintons3d.com
User avatar
trueBlue
Captain
Posts: 5208
Joined: 06 Jul 2009, 22:50
Type the number ten into the box: 10

Re: Final trueSpace 7.61 Beta 8 Unofficial Update

Post by trueBlue »

More test, it is working really well! Thank YOU!
I am just thinking it should not restore the Workspace view.
So as I understand what you are doing, you are transferring the Eye to Cam, which is great.
But then you are restoring the saved state before it was activated.
What I am thinking is should transfer the Cam to Eye.

Code: Select all

function Execute(params)
{
Eye = Node.SubObject("/D3DView", 0);
Cam = System.ThisOwner();
if (Node.ConExists(Node.Selection(), "Camera"))
{
Node.Value("/D3DView/" + Eye,"tx") = Space.NodeMatrixElement(Cam,'tx');
Node.Value("/D3DView/" + Eye,"ty") = Space.NodeMatrixElement(Cam,'ty');
Node.Value("/D3DView/" + Eye,"tz") = Space.NodeMatrixElement(Cam,'tz');
Node.Value("/D3DView/" + Eye,"roll") = Space.NodeMatrixElement(Cam,'roll');
Node.Value("/D3DView/" + Eye,"pitch") = Space.NodeMatrixElement(Cam,'pitch');
Node.Value("/D3DView/" + Eye,"yaw") = Space.NodeMatrixElement(Cam,'yaw');
Node.Value("/D3DView/" + Eye,"FOV") = Node.Value(Cam, 'FOV')
}

}
Edit: With no Link Editor open Cam transformation works but Object transformation does not. This happens with all other versions too.
Edit: The floating panel is already set to use, you just have to un commit the command.
I do not see a use as your new script works really well.
The reason I set it to show in Panel with the Workspace aspect, is try to avoid a user from minimizing the node in the Link Editor. I do not know how to change the aspect on a floating panel.
User avatar
clintonman
Captain
Posts: 5422
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California
Contact:

Re: Final trueSpace 7.61 Beta 8 Unofficial Update

Post by clintonman »

Added your code to keep workspace view state.

I moved the button deactivate code on one aspect to a Deactivate script node, because I thought the code would be added there, but it was added to the Restore script instead.
Attachments
Synchronize.RsObj
(150.92 KiB) Downloaded 156 times
Clinton Reese

http://clintons3d.com
User avatar
trueBlue
Captain
Posts: 5208
Joined: 06 Jul 2009, 22:50
Type the number ten into the box: 10

Re: Final trueSpace 7.61 Beta 8 Unofficial Update

Post by trueBlue »

Cross post:
Edit: With no Link Editor open Cam transformation works but Object transformation does not. This happens with all other versions too.
Edit: The floating panel is already set to use, you just have to un commit the command.
I do not see a use as your new script works really well.
The reason I set it to show in Panel with the Workspace aspect, is try to avoid a user from minimizing the node in the Link Editor. I do not know how to change the aspect on a floating panel.
User avatar
trueBlue
Captain
Posts: 5208
Joined: 06 Jul 2009, 22:50
Type the number ten into the box: 10

Re: Final trueSpace 7.61 Beta 8 Unofficial Update

Post by trueBlue »

There was a script error in the Workspace aspect Deactivate button.
Guess it did not like the committed line.

File removed due to update.
User avatar
clintonman
Captain
Posts: 5422
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California
Contact:

Re: Final trueSpace 7.61 Beta 8 Unofficial Update

Post by clintonman »

Oops, I forgot to uncomment the Node.Delete line.
Clinton Reese

http://clintons3d.com
User avatar
clintonman
Captain
Posts: 5422
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California
Contact:

Re: Final trueSpace 7.61 Beta 8 Unofficial Update

Post by clintonman »

trueBlue wrote: 26 Jul 2019, 03:05 Cross post:
Edit: With no Link Editor open Cam transformation works but Object transformation does not. This happens with all other versions too.
Edit: The floating panel is already set to use, you just have to un commit the command.
I do not see a use as your new script works really well.
The reason I set it to show in Panel with the Workspace aspect, is try to avoid a user from minimizing the node in the Link Editor. I do not know how to change the aspect on a floating panel.
I added the command to switch to the workspace aspect in the floating window. The line is still commented though.
The RestoreView is checked, I thought you wanted the opposite for the default, where the view is maintained?
Attachments
Synchronize.RsObj
(148.35 KiB) Downloaded 152 times
Clinton Reese

http://clintons3d.com
User avatar
trueBlue
Captain
Posts: 5208
Joined: 06 Jul 2009, 22:50
Type the number ten into the box: 10

Re: Final trueSpace 7.61 Beta 8 Unofficial Update

Post by trueBlue »

Yes, I guess I misunderstood the difference.
Not a big deal but if you close a window before Deactivating you will get a script error.
Capture.PNG
Capture.PNG (10.6 KiB) Viewed 3129 times
I made a simple example on how I think this project should work.
It was easier to make then try to explain.
It was beyond my capabilities to incorporate your other scripts and I am not saying they should not be used.
The Activate button on the Default and Workspace aspect do the same thing with the exception that the Workspace button deletes the Synchronize.RsObj
The Activate button on the Default aspect works as I was hoping. Model and Workspace views do not change when you Deactivate the script.
The Workspace button does not work like the other does in with which the Workspace view changes. I guess it is the nature of the beast when you delete the Camera when you are viewing from it, as that is the way it works with other cameras. Oddly I watched the Eye camera in this process and it is not being replaced. Even though the Cam2Eye script works on the Default aspect, it does not work on the Workspace aspect. I tried several ways to get it to work to no avail.

In the end I have discovered having this setup in the Link Editor is more efficient. The Model's widget works better!
You just need to use Model and Workspace's interface to view from a camera.
Capture2.PNG
File removed due to update.
User avatar
clintonman
Captain
Posts: 5422
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California
Contact:

Re: Final trueSpace 7.61 Beta 8 Unofficial Update

Post by clintonman »

trueBlue wrote: 26 Jul 2019, 19:19 ...

In the end I have discovered having this setup in the Link Editor is more efficient. The Model's widget works better!
You just need to use Model and Workspace's interface to view from a camera.
Capture2.PNG
I don't understand what you are showing in the picture. The script I just downloaded doesn't match it.

Edit: Interesting. All the 3D views are set as the camera view.
You have this code which doesn't make sense because the node is not aware of the meaning of %WIN_ID%, only the ui elements can see it :

Code: Select all

Node.Select(System.ThisOwner())
D3DView.SetActiveCamera('', '%WIN_ID%');
tSBridge.SuggestTSStateByAlias("SV_VIEW_VIEW_CAMERA")
This code does the same thing.

Code: Select all

Node.Select(System.ThisOwner())
D3DView.SetActiveCamera('', 'this is crazy stuff');
tSBridge.SuggestTSStateByAlias("SV_VIEW_VIEW_CAMERA")
Ah! Just checked the documentation. It's still a little crazy, but it makes sense.

Code: Select all

Parameters:
    	bsCameraName 	specifies camera name to use (empty string uses selected camera).
    	bsViewName 	specifies the name of the view which should use the camera (empty string uses all views).
"empty string uses all views", it must be ignoring bad input by defaulting to an empty string. I think the way it works is good as long as there is only 1 workspace 3d view open, otherwise it needs to use the code I had before to choose 1 window. You can see in the 4view mode.

Edit: The problem with the delete is because you call Deactivate and then Delete scripts, but Deactivate is connected to Cam2Eye and would run after it except that the Delete runs first.
Clinton Reese

http://clintons3d.com
Post Reply