Scene View 2

User avatar
clintonman
Captain
Posts: 5428
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: 23 Mar 2023, 16:57
clintonman wrote: 23 Mar 2023, 16:35
trueBlue wrote: 23 Mar 2023, 16:31 I changed the scene16.bmp from a Perspective View icon to a New Scene icon
SceneView2NewScenIcon.png
Good idea.
Did you have to zip it, did I forget to add bmp files to the forum upload options?
Yes, I had to zip the bmp

I would like to use:
var UUFS = Node.AccessFnSet('Scripts/UUCommands/UUFunctionSet');UUFS.Delete();
in your Clintons3dView Function Set for the UU9
Not sure where and where not to put it as there a lot of Node.Delete commands
The function set has 3 sections: Node List, Scene View and checkbox context
These are the changes you would make for UUFS.Delete()

change openSceneView2, add the if statement before the return:

Code: Select all

	//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));
		}
	}


	//will start blank if nothing is selected - select first scene item
	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 

	if(Node.Exists('Scripts/UUCommands/UUFunctionSet')) {
		var sceneViewFS = "/Scripts/CustomCommands/SceneView/Clintons3dView Function Set";
		var UUFS = Node.AccessFnSet('Scripts/UUCommands/UUFunctionSet');
		sceneViewFS.UUFS = UUFS;
	}

return;
change Clintons3dView Function Set, top section, add var UUFS:

Code: Select all

// This is a jScript Function Set
// Put usefull functions, constants, enumerators here and share them across your project
// Use Node.AccessFnSet / Node.AccessNearFnSet to get access here from your script commands
// Hint: do not use commands like System.ThisOwner, System.ThisName or Node.NearValue here, as they reffer to caller's command location

var UUFS;
change Clintons3dView Function Set, Scene View section

Code: Select all

function SceneView_Delete(theselection)
{
	if(Node.Exists('Scripts/UUCommands/UUFunctionSet')) {
		Space.Select(theselection);
		UUFS.Delete();
		return;
	}

	Node.Delete(theselection);
}

change Clintons3dView Function Set, checkbox section:

Code: Select all

function SceneView_Delete_Ctx(thenodes)
{
	var selArr = thenodes.split(";");
	if(selArr[1] == "") return;//nothing checked

	if(Node.Exists('Scripts/UUCommands/UUFunctionSet')) {
		selArr.shift();
		var selStr = selArr.join(";");
		Space.Select(selStr);
		UUFS.Delete();
		return;
	}

	cmd = 'thenodes = "' + thenodes + '";'
	cmd += 'var selArr = thenodes.split(";");'
	cmd += 'selArr.shift();'
	cmd += 'while(delnode = selArr.pop()) {'
	cmd += '	Node.Delete(delnode);'
	cmd += '}'
	cmd += 'Space.Unselect();'

	RsApp.RunScriptBuffer(cmd);

//
	//var selArr = thenodes.split(";");
	//if(selArr[1] == "") return;//nothing checked

	//remove first item - the rmb clicked on item
	//selArr.shift();

	//TODO single delete form
	//while(delnode = selArr.pop()) {
	//	Node.Delete(delnode);
	//}

	//Space.Unselect();//cleanup for script selection reads
}
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 »

Following install instructions, rename .rsx to .dll etc. Upon opening tS i get the following:
Screenshot 2023-03-23 180001.jpg
Then this:
Screenshot 2023-03-23 180022.jpg
How to find the install file?
User avatar
clintonman
Captain
Posts: 5428
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: 23 Mar 2023, 18:37 Following install instructions, rename .rsx to .dll etc. Upon opening tS i get the following:
Screenshot 2023-03-23 180001.jpg
Then this:
Screenshot 2023-03-23 180022.jpg

How to find the install file?
Need more information. List the actual steps you took. Maybe a screenshot of the folder with the files you renamed to dll, so can see if they are in the correct location. Did you delete or rename the original dll files?
There are a lot of scenarios, need more information to figure out what went wrong.

@trueBlue: are those the sort of errors that happen when the dll files are bad?
Clinton Reese

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

Re: Scene View 2

Post by trueBlue »

I have not seen these errors
I just manually ran both of these scripts and no errors

Instructions on your website:
Copy the 2 rsx files into the tS install folder - and change the file extension from 'rsx' to 'dll'

Maybe Saul put the plugin(s) in the tS folder?
Should be in the main folder"
Examples:
C:\trueSpace761
C:\trueSpace761Std
User avatar
trueBlue
Captain
Posts: 5213
Joined: 06 Jul 2009, 22:50
Type the number ten into the box: 10

Re: Scene View 2

Post by trueBlue »

clintonman wrote: 23 Mar 2023, 18:09
trueBlue wrote: 23 Mar 2023, 16:57
clintonman wrote: 23 Mar 2023, 16:35

Good idea.
Did you have to zip it, did I forget to add bmp files to the forum upload options?
Yes, I had to zip the bmp

I would like to use:
var UUFS = Node.AccessFnSet('Scripts/UUCommands/UUFunctionSet');UUFS.Delete();
in your Clintons3dView Function Set for the UU9
Not sure where and where not to put it as there a lot of Node.Delete commands
The function set has 3 sections: Node List, Scene View and checkbox context
These are the changes you would make for UUFS.Delete()

change openSceneView2, add the if statement before the return:

Code: Select all

	//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));
		}
	}


	//will start blank if nothing is selected - select first scene item
	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 

	if(Node.Exists('Scripts/UUCommands/UUFunctionSet')) {
		var sceneViewFS = "/Scripts/CustomCommands/SceneView/Clintons3dView Function Set";
		var UUFS = Node.AccessFnSet('Scripts/UUCommands/UUFunctionSet');
		sceneViewFS.UUFS = UUFS;
	}

return;
change Clintons3dView Function Set, top section, add var UUFS:

Code: Select all

// This is a jScript Function Set
// Put usefull functions, constants, enumerators here and share them across your project
// Use Node.AccessFnSet / Node.AccessNearFnSet to get access here from your script commands
// Hint: do not use commands like System.ThisOwner, System.ThisName or Node.NearValue here, as they reffer to caller's command location

var UUFS;
change Clintons3dView Function Set, Scene View section

Code: Select all

function SceneView_Delete(theselection)
{
	if(Node.Exists('Scripts/UUCommands/UUFunctionSet')) {
		Space.Select(theselection);
		UUFS.Delete();
		return;
	}

	Node.Delete(theselection);
}

change Clintons3dView Function Set, checkbox section:

Code: Select all

function SceneView_Delete_Ctx(thenodes)
{
	var selArr = thenodes.split(";");
	if(selArr[1] == "") return;//nothing checked

	if(Node.Exists('Scripts/UUCommands/UUFunctionSet')) {
		selArr.shift();
		var selStr = selArr.join(";");
		Space.Select(selStr);
		UUFS.Delete();
		return;
	}

	cmd = 'thenodes = "' + thenodes + '";'
	cmd += 'var selArr = thenodes.split(";");'
	cmd += 'selArr.shift();'
	cmd += 'while(delnode = selArr.pop()) {'
	cmd += '	Node.Delete(delnode);'
	cmd += '}'
	cmd += 'Space.Unselect();'

	RsApp.RunScriptBuffer(cmd);

//
	//var selArr = thenodes.split(";");
	//if(selArr[1] == "") return;//nothing checked

	//remove first item - the rmb clicked on item
	//selArr.shift();

	//TODO single delete form
	//while(delnode = selArr.pop()) {
	//	Node.Delete(delnode);
	//}

	//Space.Unselect();//cleanup for script selection reads
}
Unfortunately, this is not going to Work
Tried Deleting the MaterialEditor and Yafaray Folder
Did not get the warning
Delete warning.png
Delete warning.png (19.43 KiB) Viewed 691 times
The item was removed from the Scene View 2 panel, but was not deleted
Tried deleting a scene item
The item was removed from the Scene View 2 panel, but was not deleted
User avatar
clintonman
Captain
Posts: 5428
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: 23 Mar 2023, 19:24
clintonman wrote: 23 Mar 2023, 18:09
trueBlue wrote: 23 Mar 2023, 16:57
Yes, I had to zip the bmp

I would like to use:
var UUFS = Node.AccessFnSet('Scripts/UUCommands/UUFunctionSet');UUFS.Delete();
in your Clintons3dView Function Set for the UU9
Not sure where and where not to put it as there a lot of Node.Delete commands
The function set has 3 sections: Node List, Scene View and checkbox context
These are the changes you would make for UUFS.Delete()

change openSceneView2, add the if statement before the return:

Code: Select all

	//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));
		}
	}


	//will start blank if nothing is selected - select first scene item
	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 

	if(Node.Exists('Scripts/UUCommands/UUFunctionSet')) {
		var sceneViewFS = "/Scripts/CustomCommands/SceneView/Clintons3dView Function Set";
		var UUFS = Node.AccessFnSet('Scripts/UUCommands/UUFunctionSet');
		sceneViewFS.UUFS = UUFS;
	}

return;
change Clintons3dView Function Set, top section, add var UUFS:

Code: Select all

// This is a jScript Function Set
// Put usefull functions, constants, enumerators here and share them across your project
// Use Node.AccessFnSet / Node.AccessNearFnSet to get access here from your script commands
// Hint: do not use commands like System.ThisOwner, System.ThisName or Node.NearValue here, as they reffer to caller's command location

var UUFS;
change Clintons3dView Function Set, Scene View section

Code: Select all

function SceneView_Delete(theselection)
{
	if(Node.Exists('Scripts/UUCommands/UUFunctionSet')) {
		Space.Select(theselection);
		UUFS.Delete();
		return;
	}

	Node.Delete(theselection);
}

change Clintons3dView Function Set, checkbox section:

Code: Select all

function SceneView_Delete_Ctx(thenodes)
{
	var selArr = thenodes.split(";");
	if(selArr[1] == "") return;//nothing checked

	if(Node.Exists('Scripts/UUCommands/UUFunctionSet')) {
		selArr.shift();
		var selStr = selArr.join(";");
		Space.Select(selStr);
		UUFS.Delete();
		return;
	}

	cmd = 'thenodes = "' + thenodes + '";'
	cmd += 'var selArr = thenodes.split(";");'
	cmd += 'selArr.shift();'
	cmd += 'while(delnode = selArr.pop()) {'
	cmd += '	Node.Delete(delnode);'
	cmd += '}'
	cmd += 'Space.Unselect();'

	RsApp.RunScriptBuffer(cmd);

//
	//var selArr = thenodes.split(";");
	//if(selArr[1] == "") return;//nothing checked

	//remove first item - the rmb clicked on item
	//selArr.shift();

	//TODO single delete form
	//while(delnode = selArr.pop()) {
	//	Node.Delete(delnode);
	//}

	//Space.Unselect();//cleanup for script selection reads
}
Unfortunately, this is not going to Work
Tried Deleting the MaterialEditor and Yafaray Folder
Did not get the warning
Delete warning.png
The item was removed from the Scene View 2 panel, but was not deleted
Tried deleting a scene item
The item was removed from the Scene View 2 panel, but was not deleted
Oops,

openSceneView2

Had var sceneViewFS = "/Scripts/CustomCommands/SceneView/Clintons3dView Function Set";
should have been var sceneViewFS = Node.AccessFnSet("/Scripts/CustomCommands/SceneView/Clintons3dView Function Set");

Code: Select all

	//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));
		}
	}


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


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

	if(Node.Exists('Scripts/UUCommands/UUFunctionSet')) {
		var sceneViewFS = Node.AccessFnSet("/Scripts/CustomCommands/SceneView/Clintons3dView Function Set");
		var UUFS = Node.AccessFnSet('/Scripts/UUCommands/UUFunctionSet');
		sceneViewFS.UUFS = UUFS;
	}

return;
If you choose delete from the scene view and then don't delete it will disappear from the scene view no matter what. So have to click an icon to rebuild the tree or reselect _Scene in the drop down list or rmb context Rebuild Branch.
Clinton Reese

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

Re: Scene View 2

Post by trueBlue »

Thats bizarre!
It works now, but why the change to opening Scene View 2 corrects it is really bizarre!

Just noticed that when using Browse in LE makes the Orange Triangle not work
I selected the Material Editor, right click Browse in the LE
It navigates to inside the Material Editor
User avatar
clintonman
Captain
Posts: 5428
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: 23 Mar 2023, 20:04 Thats bizarre!
It works now, but why the change to opening Scene View 2 corrects it is really bizarre!

Just noticed that when using Browse in LE makes the Orange Triangle not work
I selected the Material Editor, right click Browse in the LE
It navigates to inside the Material Editor
You can't use Node.AccessFnSet inside of a function set, so you have run it before and copy it in.

Browse in LE opens inside the node, Show in LE shows the node in the LE

I don't see any broken orange triangles, they all seem to work.
Clinton Reese

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

Re: Scene View 2

Post by trueBlue »

clintonman wrote: 23 Mar 2023, 20:26
trueBlue wrote: 23 Mar 2023, 20:04 Thats bizarre!
It works now, but why the change to opening Scene View 2 corrects it is really bizarre!

Just noticed that when using Browse in LE makes the Orange Triangle not work
I selected the Material Editor, right click Browse in the LE
It navigates to inside the Material Editor
You can't use Node.AccessFnSet inside of a function set, so you have run it before and copy it in.

Browse in LE opens inside the node, Show in LE shows the node in the LE

I don't see any broken orange triangles, they all seem to work.
It happens for me when using Root not Scene
User avatar
clintonman
Captain
Posts: 5428
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: 23 Mar 2023, 20:31
clintonman wrote: 23 Mar 2023, 20:26
trueBlue wrote: 23 Mar 2023, 20:04 Thats bizarre!
It works now, but why the change to opening Scene View 2 corrects it is really bizarre!

Just noticed that when using Browse in LE makes the Orange Triangle not work
I selected the Material Editor, right click Browse in the LE
It navigates to inside the Material Editor
You can't use Node.AccessFnSet inside of a function set, so you have run it before and copy it in.

Browse in LE opens inside the node, Show in LE shows the node in the LE

I don't see any broken orange triangles, they all seem to work.
It happens for me when using Root not Scene
You can't get to the material editor without first going to _Root, so like I said I don't see any broken triangles.
Clinton Reese

http://clintons3d.com
Post Reply