Scene View 2

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

Re: Scene View 2

Post by trueBlue »

Just noticed if something is selected and you open the Scene Graph Utilities, it does not populate.
User avatar
clintonman
Captain
Posts: 5422
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California
Contact:

Re: Scene View 2

Post by clintonman »

trueBlue wrote: 24 Mar 2023, 21:16 Just noticed if something is selected and you open the Scene Graph Utilities, it does not populate.
Ha, so it's the opposite of the Scene View. Noted...
Clinton Reese

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

Re: Scene View 2

Post by trueBlue »

clintonman wrote: 24 Mar 2023, 21:20
trueBlue wrote: 24 Mar 2023, 21:16 Just noticed if something is selected and you open the Scene Graph Utilities, it does not populate.
Ha, so it's the opposite of the Scene View. Noted...
This works

Code: Select all

Space.Unselect()
	//will start blank if nothing is selected
	if(Node.SelectedCount() == 0) {
		var scene = Space.CurrentScene();
		Space.Select(scene + "/" + Node.SubObject(scene, 0));
}

	WindowsManager.CreateWindowFromCLSID('{DD2E0D6B-ED84-4b80-A624-757525B8A591}', '', '', '', 1);//node view window

	//WindowsManager.CreateWindowFromCLSID('{E9C4FE3C-C3C9-4dfd-8C85-E7F0F81029B4}', '', '', '', 1);//scene view 2 
Space.Unselect()
	return;
Edit: On further testing, the second/last Space.Unselect() does not work
User avatar
trueBlue
Captain
Posts: 5206
Joined: 06 Jul 2009, 22:50
Type the number ten into the box: 10

Re: Scene View 2

Post by trueBlue »

Ended up doing this:
Node Graph.png
Node Graph.png (11.55 KiB) Viewed 747 times
The openNodeGraphView script still needs Space.Unselect() at the beginning of the script
After the open scripts run they run the Unselect script
User avatar
clintonman
Captain
Posts: 5422
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California
Contact:

Re: Scene View 2

Post by clintonman »

The openNodeGraphView will populate as soon as you make a selection. This one is more random in whether it populates or not. but it's better to just select something than remove a selection without permission.


Here is a modified openSceneView2 that does not remove the users selection. It works the same as before by selecting a scene item and opening the scene view, the new last step is removing the selection, then any mouse movement in the 3D view fills the tree.

Code: Select all

// Execute 
// Called to execute the command 
function Execute(params)
{
	//clear the store

	var store = "/Scripts/CustomCommands/SceneView/Store";

	var subObjCount = Node.SubObjectCount(store);

	if(subObjCount > 0) {
		for(var i=subObjCount-1; i>=0; i--) {
			Node.Delete(store + "/"+ Node.SubObject(store,i));
		}
	}

	var selCount = Node.SelectedCount();

	//will start blank if nothing is selected - select first scene item
	if(selCount == 0) {
		var scene = Space.CurrentScene();
		Space.Select(scene + "/" + Node.SubObject(scene, 0));
	}

	WindowsManager.CreateWindowFromCLSID('{E9C4FE3C-C3C9-4dfd-8C85-E7F0F81029B4}', '', '', '', 1);//scene view 2 

	if(selCount == 0) {
		Space.Unselect();
	}

}
Clinton Reese

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

Re: Scene View 2

Post by trueBlue »

clintonman wrote: 24 Mar 2023, 22:13 The openNodeGraphView will populate as soon as you make a selection. This one is more random in whether it populates or not. but it's better to just select something than remove a selection without permission.


Here is a modified openSceneView2 that does not remove the users selection. It works the same as before by selecting a scene item and opening the scene view, the new last step is removing the selection, then any mouse movement in the 3D view fills the tree.

Code: Select all

// Execute 
// Called to execute the command 
function Execute(params)
{
	//clear the store

	var store = "/Scripts/CustomCommands/SceneView/Store";

	var subObjCount = Node.SubObjectCount(store);

	if(subObjCount > 0) {
		for(var i=subObjCount-1; i>=0; i--) {
			Node.Delete(store + "/"+ Node.SubObject(store,i));
		}
	}

	var selCount = Node.SelectedCount();

	//will start blank if nothing is selected - select first scene item
	if(selCount == 0) {
		var scene = Space.CurrentScene();
		Space.Select(scene + "/" + Node.SubObject(scene, 0));
	}

	WindowsManager.CreateWindowFromCLSID('{E9C4FE3C-C3C9-4dfd-8C85-E7F0F81029B4}', '', '', '', 1);//scene view 2 

	if(selCount == 0) {
		Space.Unselect();
	}

}
That works great!
Can you do something for the openNodeGraphView script?
User avatar
clintonman
Captain
Posts: 5422
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California
Contact:

Re: Scene View 2

Post by clintonman »

trueBlue wrote: 24 Mar 2023, 22:32
clintonman wrote: 24 Mar 2023, 22:13 The openNodeGraphView will populate as soon as you make a selection. This one is more random in whether it populates or not. but it's better to just select something than remove a selection without permission.


Here is a modified openSceneView2 that does not remove the users selection. It works the same as before by selecting a scene item and opening the scene view, the new last step is removing the selection, then any mouse movement in the 3D view fills the tree.

Code: Select all

// Execute 
// Called to execute the command 
function Execute(params)
{
	//clear the store

	var store = "/Scripts/CustomCommands/SceneView/Store";

	var subObjCount = Node.SubObjectCount(store);

	if(subObjCount > 0) {
		for(var i=subObjCount-1; i>=0; i--) {
			Node.Delete(store + "/"+ Node.SubObject(store,i));
		}
	}

	var selCount = Node.SelectedCount();

	//will start blank if nothing is selected - select first scene item
	if(selCount == 0) {
		var scene = Space.CurrentScene();
		Space.Select(scene + "/" + Node.SubObject(scene, 0));
	}

	WindowsManager.CreateWindowFromCLSID('{E9C4FE3C-C3C9-4dfd-8C85-E7F0F81029B4}', '', '', '', 1);//scene view 2 

	if(selCount == 0) {
		Space.Unselect();
	}

}
That works great!
Can you do something for the openNodeGraphView script?
Can't think of anything because it's unpredictable. If something is selected it will populate, if nothing is selected it will populate, if something is selected this time it won't populate, same for nothing selected.
Most of the time it works, so only way to fix it would be to come up with a set of steps that makes it fail consistently.
Clinton Reese

http://clintons3d.com
Saul
Senior Chief Petty Officer
Posts: 296
Joined: 22 May 2009, 16:50

Re: Scene View 2

Post by Saul »

Install instructions followed and successfull up to:
'6.start tS and drag the installer into the link editor and press the install button'
Where is the 'installer'?
User avatar
clintonman
Captain
Posts: 5422
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California
Contact:

Re: Scene View 2

Post by clintonman »

Saul wrote: 25 Mar 2023, 12:56 Install instructions followed and successfull up to:
'6.start tS and drag the installer into the link editor and press the install button'
Where is the 'installer'?
Click on the title to get the installer.


ClickHere.jpg
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: Scene View 2

Post by clintonman »

Updates/Fixes

fixed a browse in link editor bug
added support for UU deletes
removed alert from the installer
new rsx plugin version 1638412

http://clintons3d.com/plugins/truespace ... view2.html


statistics updated to work with the scene view 2
statistics gives object counts, mesh element counts and alternate views into the matrix transforms for scene objects

added matrix shear
fixed face selection buttons
removed update button used for manual updates - it did not give good counts
removed triangle selected count - tS gives bad info for this value

http://clintons3d.com/plugins/truespace ... stics.html
Clinton Reese

http://clintons3d.com
Post Reply