Final trueSpace 7.61 Beta 8 Unofficial Update

User avatar
clintonman
Captain
Posts: 5428
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: 15 Aug 2022, 17:32 ...
Some use: RsApp.RunScriptBuffer(cmd); (1 Undo)
Not even sure if you can use these in a Function Set
...
It does need testing. I did run into trouble with RunScriptBuffer Fix NURBS ORA inside of the VisUtility Function Set. I converted it to normal code using "util" for no undo instead of 1 undo. Need to find out if RunScriptBuffer actually does work inside a function set or not.
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: Final trueSpace 7.61 Beta 8 Unofficial Update

Post by trueBlue »

clintonman wrote: 16 Aug 2022, 04:34
trueBlue wrote: 15 Aug 2022, 17:32 ...
Some use: RsApp.RunScriptBuffer(cmd); (1 Undo)
Not even sure if you can use these in a Function Set
...
It does need testing. I did run into trouble with RunScriptBuffer Fix NURBS ORA inside of the VisUtility Function Set. I converted it to normal code using "util" for no undo instead of 1 undo. Need to find out if RunScriptBuffer actually does work inside a function set or not.
Have not had a chance to test if RunScriptBuffer can work in a Function Set yet

In the newest UUFunctionSet, you have:
var GlobalFS;
How in the heck does this work without adding the path?
IE: "Scripts/UUCommands/Global Function Set"

Code: Select all

// Use: Reset Default LMB command
//	 Modal Question for Resetting to Default Context
function ResetContext() 
{
	if (GlobalFS.Question("Reset to Default Context?","Default Context")) {
		RsApp.Reset()
		return;
	}
}
User avatar
clintonman
Captain
Posts: 5428
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: 16 Aug 2022, 14:17
clintonman wrote: 16 Aug 2022, 04:34
trueBlue wrote: 15 Aug 2022, 17:32 ...
Some use: RsApp.RunScriptBuffer(cmd); (1 Undo)
Not even sure if you can use these in a Function Set
...
It does need testing. I did run into trouble with RunScriptBuffer Fix NURBS ORA inside of the VisUtility Function Set. I converted it to normal code using "util" for no undo instead of 1 undo. Need to find out if RunScriptBuffer actually does work inside a function set or not.
Have not had a chance to test if RunScriptBuffer can work in a Function Set yet

In the newest UUFunctionSet, you have:
var GlobalFS;
How in the heck does this work without adding the path?
IE: "Scripts/UUCommands/Global Function Set"

Code: Select all

// Use: Reset Default LMB command
//	 Modal Question for Resetting to Default Context
function ResetContext() 
{
	if (GlobalFS.Question("Reset to Default Context?","Default Context")) {
		RsApp.Reset()
		return;
	}
}
The value is set before it's called. This is necessary because when you use a toolbar button to call a function set that uses another function set it doesn't know what Node.AccessFnSet is. Below the first line defines it and the third line assigns it inside the function set.

Code: Select all

//readable
GFS=Node.AccessFnSet("Scripts/UUCommands/Global Function Set");
UUFS=Node.AccessFnSet("Scripts/UUCommands/UUFunctionSet");
UUFS.GlobalFS=GFS;
UUFS.UVFlatten();
now that I look at it again it can be shortened slightly to

Code: Select all

//readable
UUFS=Node.AccessFnSet("Scripts/UUCommands/UUFunctionSet");
UUFS.GlobalFS=Node.AccessFnSet("Scripts/UUCommands/Global Function Set");
UUFS.UVFlatten();
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: Final trueSpace 7.61 Beta 8 Unofficial Update

Post by trueBlue »

I think I see how the path is recognized now, as you are using it in the toolbar command
cmd='GFS=Node.AccessFnSet("Scripts/UUCommands/Global Function Set");UUFS=Node.AccessFnSet("Scripts/UUCommands/UUFunctionSet");UUFS.GlobalFS=GFS;UUFS.UVFlatten();';RsApp.RunScriptBuffer(cmd);

Looking at the code in the Scripts/UUCommands/Global Function Set, I notice that there are functions for Mesh Origin, Scene View, and Parenting
I am a little confused about the possibility of having two Global Function Set(S)
One is in CustomCommands and now in UUCommands
User avatar
clintonman
Captain
Posts: 5428
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: 16 Aug 2022, 15:13 I think I see how the path is recognized now, as you are using it in the toolbar command
cmd='GFS=Node.AccessFnSet("Scripts/UUCommands/Global Function Set");UUFS=Node.AccessFnSet("Scripts/UUCommands/UUFunctionSet");UUFS.GlobalFS=GFS;UUFS.UVFlatten();';RsApp.RunScriptBuffer(cmd);

Looking at the code in the Scripts/UUCommands/Global Function Set, I notice that there are functions for Mesh Origin, Scene View, and Parenting
I am a little confused about the possibility of having two Global Function Set(S)
One is in CustomCommands and now in UUCommands
From another post
clintonman wrote: 12 Aug 2022, 21:33 No buttons need to be changed.
No widgets to change
2 scripts attached so can now move Global Function Set into UUCommands.

Share your Delete when you're done and I'll convert it to 1 undo format.
The 2 commands were for Mesh Origin and Scene View
The parenting inside the global function set refers to the new heirarchy (parenting/grouping) scripts:
http://clintons3d.com/plugins/truespace ... archy.html
The older parenting script does not use the function set.

So there is no reason for 2 Global Function Sets, only the UUCommands one is needed.
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: Final trueSpace 7.61 Beta 8 Unofficial Update

Post by trueBlue »

So there is no reason for 2 Global Function Sets, only the UUCommands one is needed.
Looks like 2 Global Function Sets to me
GlobalFunctionsAutoload

Code: Select all

	Node.Copy(owner + "/" + theScript,"/Scripts/CustomCommands");

	RsFileIO.SaveObject(mainDir + "\\Scripts\\clintonobjects\\CustomScriptsStore\\" + theScript + ".RsObj", "/Scripts/CustomCommands/" + theScript);
The Global Function Set included in the GlobalFunctionsAutoload does not have the updated Question function
User avatar
clintonman
Captain
Posts: 5428
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: 16 Aug 2022, 15:53
So there is no reason for 2 Global Function Sets, only the UUCommands one is needed.
Looks like 2 Global Function Sets to me
GlobalFunctionsAutoload

Code: Select all

	Node.Copy(owner + "/" + theScript,"/Scripts/CustomCommands");

	RsFileIO.SaveObject(mainDir + "\\Scripts\\clintonobjects\\CustomScriptsStore\\" + theScript + ".RsObj", "/Scripts/CustomCommands/" + theScript);
The Global Function Set included in the GlobalFunctionsAutoload does not have the updated Question function
GlobalFunctionsAutoload has nothing to do with the UU. The new UU that uses the UUCommands isn't even released yet. It's a case of putting the cart before the horse. I'm not changing any of my installers until after the release and even if I never did anything having 2 global fs would not break anything.
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: Final trueSpace 7.61 Beta 8 Unofficial Update

Post by trueBlue »

clintonman wrote: 16 Aug 2022, 16:11
trueBlue wrote: 16 Aug 2022, 15:53
So there is no reason for 2 Global Function Sets, only the UUCommands one is needed.
Looks like 2 Global Function Sets to me
GlobalFunctionsAutoload

Code: Select all

	Node.Copy(owner + "/" + theScript,"/Scripts/CustomCommands");

	RsFileIO.SaveObject(mainDir + "\\Scripts\\clintonobjects\\CustomScriptsStore\\" + theScript + ".RsObj", "/Scripts/CustomCommands/" + theScript);
The Global Function Set included in the GlobalFunctionsAutoload does not have the updated Question function
GlobalFunctionsAutoload has nothing to do with the UU. The new UU that uses the UUCommands isn't even released yet. It's a case of putting the cart before the horse. I'm not changing any of my installers until after the release and even if I never did anything having 2 global fs would not break anything.
This is why I am asking so that when the new UU9 is released, there will not be any issues or conflictions
I remember you saying that it is better to maintain one file in one place which is why I am confused about adding another Global Function Set to UUCommands
I am okay with using one Global Function Set in CustomCommands in the UU9
I am not asking for you to change your installers either, I am more concerned that your installers are compatible with the UU(S)
There is already a difference with the Question function in the two Global Function Set(s)
User avatar
clintonman
Captain
Posts: 5428
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: 16 Aug 2022, 16:34
clintonman wrote: 16 Aug 2022, 16:11
trueBlue wrote: 16 Aug 2022, 15:53
Looks like 2 Global Function Sets to me
GlobalFunctionsAutoload

Code: Select all

	Node.Copy(owner + "/" + theScript,"/Scripts/CustomCommands");

	RsFileIO.SaveObject(mainDir + "\\Scripts\\clintonobjects\\CustomScriptsStore\\" + theScript + ".RsObj", "/Scripts/CustomCommands/" + theScript);
The Global Function Set included in the GlobalFunctionsAutoload does not have the updated Question function
GlobalFunctionsAutoload has nothing to do with the UU. The new UU that uses the UUCommands isn't even released yet. It's a case of putting the cart before the horse. I'm not changing any of my installers until after the release and even if I never did anything having 2 global fs would not break anything.
This is why I am asking so that when the new UU9 is released, there will not be any issues or conflictions
I remember you saying that it is better to maintain one file in one place which is why I am confused about adding another Global Function Set to UUCommands
I am okay with using one Global Function Set in CustomCommands in the UU9
I am not asking for you to change your installers either, I am more concerned that your installers are compatible with the UU(S)
There is already a difference with the Question function in the two Global Function Set(s)
If anything in the installers breaks UU then maybe you should worry. None of them break the UU. If you place the Global Function Set back into the CustomCommands then yes, the installers would break the UU.
Clinton Reese

http://clintons3d.com
User avatar
clintonman
Captain
Posts: 5428
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 »

I did some tests and the RsApp.RunScriptBuffer will work inside a function set. I tested a simple System.Alert and then the UnLookAt script.
Clinton Reese

http://clintons3d.com
Post Reply