Freeze Transform Script Update

free scripts, plugins, models, textures
User avatar
clintonman
Captain
Posts: 5422
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California
Contact:

Freeze Transform Script Update

Post by clintonman »

The freeze transform script is for setting the location to (0,0,0), rotation to (0,0,0) and scale to (1,1,1,) without changing the appearance of the mesh. I just discovered that the commands it uses don't take shear into account. I added an option to set shear to (0,0,0). This option only works with single mesh objects not groups like the other 3 options.

Found on the utilities page
http://www.clintons3d.com/plugins/trues ... tml#freeze

Update:
added shear option
automatic installer
new snowflake icon

Fixed shear option
Last edited by clintonman on 13 Sep 2019, 20:39, edited 1 time in total.
Clinton Reese

http://clintons3d.com
User avatar
MikomDude
Captain
Posts: 1928
Joined: 04 Oct 2010, 11:12
Type the number ten into the box: 0
Location: The Hague, Netherlands
Contact:

Re: Freeze Transform Script Update

Post by MikomDude »

Useful tool, only problem could be/is that undo doesn't seem to work after. Are you planning on making a version allowing the action to be undone? It would make the tool less final.
User avatar
clintonman
Captain
Posts: 5422
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California
Contact:

Re: Freeze Transform Script Update

Post by clintonman »

MikomDude wrote:Useful tool, only problem could be/is that undo doesn't seem to work after. Are you planning on making a version allowing the action to be undone? It would make the tool less final.
Well, in a word...no. It can be undone by pressing the undo button several times to get back to the original state. The only way to make a proper 1 step undo would be to recode the script into C++ using the SDK. This is true of all scripts. Only plugins can have undo built in to them.
Clinton Reese

http://clintons3d.com
User avatar
MikomDude
Captain
Posts: 1928
Joined: 04 Oct 2010, 11:12
Type the number ten into the box: 0
Location: The Hague, Netherlands
Contact:

Re: Freeze Transform Script Update

Post by MikomDude »

Ah, that's a shame. I'll try pressing the undo button a couple of times and see if that undos the move, if so I can start using this tool more often :)
User avatar
trueBlue
Captain
Posts: 5206
Joined: 06 Jul 2009, 22:50
Type the number ten into the box: 10

Re: Freeze Transform Script Update

Post by trueBlue »

The Translation attribute, checked or unchecked does not seem to be working.
Both move the Pivot to the World origin.
User avatar
clintonman
Captain
Posts: 5422
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California
Contact:

Re: Freeze Transform Script Update

Post by clintonman »

trueBlue wrote: 12 Sep 2019, 06:36 The Translation attribute, checked or unchecked does not seem to be working.
Both move the Pivot to the World origin.
I see,
Looks like shear is overriding the unchecked translate.
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: Freeze Transform Script Update

Post by clintonman »

Fixed shear portion of the script. Added defaults of "checked" for all the checkbox options.
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: Freeze Transform Script Update

Post by trueBlue »

Less I am missing something, I do not think this part of your script is necessary:

Code: Select all

//	ScriptObject.RunCmd("mesh modifiers package/apply pivot transform to mesh", 
//		"ConntrolIn", 0, "Selection", "");
As soon as you run this command:

Code: Select all

ScriptObject.RunCmd("tools package/show axes", "Selection", "");
The Pivot (Axis) is created.
The difference that I am seeing, is you do not get this message:
Freeze1.PNG
Freeze1.PNG (7.3 KiB) Viewed 3797 times
And it does not have to be converted to an Editable mesh!
User avatar
clintonman
Captain
Posts: 5422
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California
Contact:

Re: Freeze Transform Script Update

Post by clintonman »

trueBlue wrote: 03 Feb 2020, 19:40 Less I am missing something, I do not think this part of your script is necessary:

Code: Select all

//	ScriptObject.RunCmd("mesh modifiers package/apply pivot transform to mesh", 
//		"ConntrolIn", 0, "Selection", "");
As soon as you run this command:

Code: Select all

ScriptObject.RunCmd("tools package/show axes", "Selection", "");
The Pivot (Axis) is created.
The difference that I am seeing, is you do not get this message:
Freeze1.PNG
And it does not have to be converted to an Editable mesh!
Part of the process of fully freezing transforms is to alter the mesh forcing it into an editable mesh form. It's pretty much the whole point of the tool, especially when exporting meshes out of truespace, they end up not where you expect when importing to the destination. If truespace treated pivots like all other 3d programs then the command to bake the transform into the vertices wouldn't exist or even be needed.
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: Freeze Transform Script Update

Post by trueBlue »

Okay, thank you for the explanation!
Post Reply