Face to Face Object Snapping
-
clintonman
- Captain
- Posts: 5659
- Joined: 21 May 2009, 21:08
- Type the number ten into the box: 0
- Location: California
Face to Face Object Snapping
New script will snap objects together based on face selection.
Image shows yellow cylinders that have been face snapped into place on the blue torus.
http://www.clintons3d.com/plugins/trues ... index.html"
Update:
Added a RMB = copy behavior - thanks trueBlue for the copy function
The update is available on the website and here for convenience
http://www.clintons3d.com/plugins/trues ... index.html"
Update:
Added a RMB = copy behavior - thanks trueBlue for the copy function
The update is available on the website and here for convenience
- Attachments
-
- install face to face snap Button v1.5.zip
- (32.33 KiB) Downloaded 302 times
Last edited by clintonman on 18 Feb 2010, 17:01, edited 1 time in total.
-
pugman 1
- Captain
- Posts: 1555
- Joined: 21 May 2009, 19:26
- Type the number ten into the box: 0
- Location: Germany
Re: Face to Face Object Snapping
Hi clintonman, thank you so much for what you
are doing here. i think you and true blue will soon
have ts8 the way you are going.
maybe possible,
reformed ts7
thanks again Ralph
are doing here. i think you and true blue will soon
have ts8 the way you are going.
maybe possible,
thanks again Ralph
-
LeonRegis
- Captain
- Posts: 1946
- Joined: 18 Aug 2009, 17:36
- Type the number ten into the box: 0
- Location: Brazil/Earth/Orion Arm/Milky Way/4th Dimension/This Universe/Multiverse???/Singularity???
Re: Face to Face Object Snapping
Thank you very much men! it seems really cool! Can we snap a group or snap in a face loop?
Thanks
Thanks
Be the change you want to see in the world. - Mohandas Gandhi
-
clintonman
- Captain
- Posts: 5659
- Joined: 21 May 2009, 21:08
- Type the number ten into the box: 0
- Location: California
Re: Face to Face Object Snapping
Sorry, but no to both questions. It only works with single mesh objects and only with single face selections.leonregis wrote:Thank you very much men! it seems really cool! Can we snap a group or snap in a face loop?
Thanks
-
LeonRegis
- Captain
- Posts: 1946
- Joined: 18 Aug 2009, 17:36
- Type the number ten into the box: 0
- Location: Brazil/Earth/Orion Arm/Milky Way/4th Dimension/This Universe/Multiverse???/Singularity???
Re: Face to Face Object Snapping
Anyway it's amazing, keep the good work!
Be the change you want to see in the world. - Mohandas Gandhi
-
Steinie
- Captain
- Posts: 2958
- Joined: 21 May 2009, 17:38
- Type the number ten into the box: 10
Re: Face to Face Object Snapping
Face2Face example showing how cool this is.
Thanks Clintonman!
Thanks Clintonman!
- Attachments
-
- Face2Face.zip
- (652.52 KiB) Downloaded 297 times
-
LeonRegis
- Captain
- Posts: 1946
- Joined: 18 Aug 2009, 17:36
- Type the number ten into the box: 0
- Location: Brazil/Earth/Orion Arm/Milky Way/4th Dimension/This Universe/Multiverse???/Singularity???
Re: Face to Face Object Snapping
Great example Steinie, much better than click and drag to the position, or copy the location of the object and put it there. 
Be the change you want to see in the world. - Mohandas Gandhi
-
clintonman
- Captain
- Posts: 5659
- Joined: 21 May 2009, 21:08
- Type the number ten into the box: 0
- Location: California
Re: Face to Face Object Snapping
Wow, that's interesting. I wrote it like so:Steinie wrote:Face2Face example showing how cool this is.
Thanks Clintonman!
select 2 objects
push the button
select face on first object
select face on second object
you changed the order and it still works
select 2 objects
enter PE mode
select face on first object
ctrl select face on second object
push the button
-
trueBlue
- Captain
- Posts: 5548
- Joined: 06 Jul 2009, 22:50
- Type the number ten into the box: 10
Re: Face to Face Object Snapping
This is great Clinton! Thank you!
Since this is a Face to Face Snap tool, I have two suggestions:
1.) Add a script at the end of your chain of scripts that runs this command:
Node.Value('/Preferences/Mesh Editor Settings','PE selection mode') = 'face'
2.) Make the pivotParent Invisible.
Since this is a Face to Face Snap tool, I have two suggestions:
1.) Add a script at the end of your chain of scripts that runs this command:
Node.Value('/Preferences/Mesh Editor Settings','PE selection mode') = 'face'
2.) Make the pivotParent Invisible.
-
clintonman
- Captain
- Posts: 5659
- Joined: 21 May 2009, 21:08
- Type the number ten into the box: 0
- Location: California
Re: Face to Face Object Snapping
Before the script moves the object it has to exit out of PW mode so why set selection mode to face when it's done?trueBlue wrote:This is great Clinton! Thank you!
Since this is a Face to Face Snap tool, I have two suggestions:
1.) Add a script at the end of your chain of scripts that runs this command:
Node.Value('/Preferences/Mesh Editor Settings','PE selection mode') = 'face'
2.) Make the pivotParent Invisible.
The pivotParent isn't in the scene after the script is installed. I think you need to remove the installer node from the scene.
-
trueBlue
- Captain
- Posts: 5548
- Joined: 06 Jul 2009, 22:50
- Type the number ten into the box: 10
Re: Face to Face Object Snapping
Well for me before I added this command to your script (see capture), the script was changing from Face Selection to Point Selection. So when I was wanting to use your tool more then once, I had to switch to Face Selection again. I understand about the pivotParent object only showing during installation, I was just suggesting that you set it to Invisible. I'll leave up to you if you want to make the changes or not.
-
clintonman
- Captain
- Posts: 5659
- Joined: 21 May 2009, 21:08
- Type the number ten into the box: 0
- Location: California
Re: Face to Face Object Snapping
I see. It would be useful for the "Steinie" workflow. It won't take a lot of time to make the changes and I don't see any negative impact, so consider it done(soon). If I had not seen the Steine way I wouldn't bother because the script changes to face select when it starts.trueBlue wrote:Well for me before I added this command to your script (see capture), the script was changing from Face Selection to Point Selection. So when I was wanting to use your tool more then once, I had to switch to Face Selection again. I understand about the pivotParent object only showing during installation, I was just suggesting that you set it to Invisible. I'll leave up to you if you want to make the changes or not.
Edit: The requested changes are in place now. Thanks for the feedback.
-
trueBlue
- Captain
- Posts: 5548
- Joined: 06 Jul 2009, 22:50
- Type the number ten into the box: 10
Re: Face to Face Object Snapping
Thanks Clinton. I added a Copy Source to your Face to Face Object Snapping script.
LMB = Snap Face to Face
RMB = Copy source On/Off
Video included showing it's use.
LMB = Snap Face to Face
RMB = Copy source On/Off
Video included showing it's use.
- Attachments
-
- Face to Face Object snapping.zip
- (386.42 KiB) Downloaded 285 times
-
clintonman
- Captain
- Posts: 5659
- Joined: 21 May 2009, 21:08
- Type the number ten into the box: 0
- Location: California
Re: Face to Face Object Snapping
Good idea. What do you think of this change. LMB = move and RMB = copy. That way you don't have to keep track of what state the script is in.trueBlue wrote:Thanks Clinton. I added a Copy Source to your Face to Face Object Snapping script.
LMB = Snap Face to Face
RMB = Copy source On/Off
Video included showing it's use.
One more thing, you might want to change the name of the button or make the script the same name as the original. That way it installs a new button or replaces the old script and button. As it is now it replaces the button and adds a new script.
- Attachments
-
- Face to Face Snapping 2a.zip
- (32.21 KiB) Downloaded 266 times
-
trueBlue
- Captain
- Posts: 5548
- Joined: 06 Jul 2009, 22:50
- Type the number ten into the box: 10
Re: Face to Face Object Snapping
Better idea with the copy flag!
I did not mess with your install script and I never really noticed the duplication because I always answered Yes to replace the button and script. However I do notice that if they exist and you answer No, that is when the duplication happens. Also if you answer No to replace the button (1st Question) you do not have the opportunity to replace the script (2nd Question).
Edit: Here is what I came up with, with regards to the install script.
I did not mess with your install script and I never really noticed the duplication because I always answered Yes to replace the button and script. However I do notice that if they exist and you answer No, that is when the duplication happens. Also if you answer No to replace the button (1st Question) you do not have the opportunity to replace the script (2nd Question).
Edit: Here is what I came up with, with regards to the install script.
- Attachments
-
- tS761 Face to Face Snapping.zip
- (38.49 KiB) Downloaded 291 times
-
clintonman
- Captain
- Posts: 5659
- Joined: 21 May 2009, 21:08
- Type the number ten into the box: 0
- Location: California
Re: Face to Face Object Snapping
That isn't happening for me. I don't get any duplicates if the names match. The No on the first question = abort is by design since I can't think of any cases where you would want to update the button but not the script and it serves as a safety in case somehow 2 buttons with the same name but different functions won't override each other.trueBlue wrote:Better idea with the copy flag!
I did not mess with your install script and I never really noticed the duplication because I always answered Yes to replace the button and script. However I do notice that if they exist and you answer No, that is when the duplication happens. Also if you answer No to replace the button (1st Question) you do not have the opportunity to replace the script (2nd Question).
Edit: Here is what I came up with, with regards to the install script.
Edit: That explanation doesn't make sense. What I mean to say(I think) is that the the script update requires the button update since it might depend on it, but it's possible to install a button that does not use an external script. So you get 2 questions instead of one. It all boils down to giving the option to not overwrite any existing elements.
Here is the updated script(I'll add it to the first post). It doesn't have your updated installer since I didn't know about it till now and I can't reproduce the problem of duplicates anyway. One last enhancement is that the script maintains the apparent selection so it's easier to copy/move several times without the need to update the selection every time.
-
trueBlue
- Captain
- Posts: 5548
- Joined: 06 Jul 2009, 22:50
- Type the number ten into the box: 10
Re: Face to Face Object Snapping
Way cool it keeps getting better and better. Nice touch Clinton!
It was not working for me as intended until I reversed the order of the selection as shown:
It was not working for me as intended until I reversed the order of the selection as shown:
- Attachments
-

- Capture.PNG (2.75 KiB) Viewed 5593 times
-
clintonman
- Captain
- Posts: 5659
- Joined: 21 May 2009, 21:08
- Type the number ten into the box: 0
- Location: California
Re: Face to Face Object Snapping
I suspect it has to do with the way it is run. I think if you run it after entering PE mode it reverses the behavior. If both objects are not in PE mode it works as expected.trueBlue wrote:Way cool it keeps getting better and better. Nice touch Clinton!
It was not working for me as intended until I reversed the order of the selection as shown:
-
trueBlue
- Captain
- Posts: 5548
- Joined: 06 Jul 2009, 22:50
- Type the number ten into the box: 10
Re: Face to Face Object Snapping
Error
Select 2 Objects in PE mode.
Select your Face Snap button.
RMB in View to exit PE mode.
Suggestion:
Save and Restore the current PE selection mode.
Select your Face Snap button.
RMB in View to exit PE mode.
Suggestion:
Save and Restore the current PE selection mode.
Code: Select all
Node.Value('/Preferences/Mesh Editor Settings','PE selection mode') = Node.Value(System.ThisOwner() + "/selectFaceMode", "PEselectionMode")-
clintonman
- Captain
- Posts: 5659
- Joined: 21 May 2009, 21:08
- Type the number ten into the box: 0
- Location: California
Re: Face to Face Object Snapping
New version:
Fixed crash when exit PE mode before tool is complete
restores previous PE selection mode
if start in PE mode stays in PE mode
automatic installer
improved button highlighting and gui id
Fixed crash when exit PE mode before tool is complete
restores previous PE selection mode
if start in PE mode stays in PE mode
automatic installer
improved button highlighting and gui id
-
clintonman
- Captain
- Posts: 5659
- Joined: 21 May 2009, 21:08
- Type the number ten into the box: 0
- Location: California
Re: Face to Face Object Snapping
Update September 2020
I resurrected and updated this old script because I found the RMB copy to be awkward to use and I wanted the option to run the tool in object mode, not just point edit mode.
Updated to include the Unofficial Update enhancements.
RMB opens a panel to choose the copy option, instead of doing the copy action directly.
Toolbar button and script will work in object mode.
updated installer to persistent style
http://clintons3d.com/plugins/truespace ... facetoface
I resurrected and updated this old script because I found the RMB copy to be awkward to use and I wanted the option to run the tool in object mode, not just point edit mode.
Updated to include the Unofficial Update enhancements.
RMB opens a panel to choose the copy option, instead of doing the copy action directly.
Toolbar button and script will work in object mode.
updated installer to persistent style
http://clintons3d.com/plugins/truespace ... facetoface
-
trueBlue
- Captain
- Posts: 5548
- Joined: 06 Jul 2009, 22:50
- Type the number ten into the box: 10
-
clintonman
- Captain
- Posts: 5659
- Joined: 21 May 2009, 21:08
- Type the number ten into the box: 0
- Location: California
Re: Face to Face Object Snapping
Update October 2020
Complete rewrite of the tool.
Uses a plugin based widget to get triangle face selections
Does not use point edit mode.
Works with lights and cameras.
Copy option snaps the copy instead of the original object
Works with objects inside groups(maybe new, not sure)
http://clintons3d.com/plugins/truespace ... facetoface
requires latest plugin, Clintons3dPlugin.rsx, available here:
http://clintons3d.com/plugins/truespace ... index.html
INSTALLER BUG: FIXING NOW
WEBSITE IS DOWN. Will try again later
Website is back up, and the corrected installer has been uploaded.
Complete rewrite of the tool.
Uses a plugin based widget to get triangle face selections
Does not use point edit mode.
Works with lights and cameras.
Copy option snaps the copy instead of the original object
Works with objects inside groups(maybe new, not sure)
http://clintons3d.com/plugins/truespace ... facetoface
requires latest plugin, Clintons3dPlugin.rsx, available here:
http://clintons3d.com/plugins/truespace ... index.html
INSTALLER BUG: FIXING NOW
WEBSITE IS DOWN. Will try again later
Website is back up, and the corrected installer has been uploaded.
-
trueBlue
- Captain
- Posts: 5548
- Joined: 06 Jul 2009, 22:50
- Type the number ten into the box: 10
Re: Face to Face Object Snapping
Looks like your installer is not installing the PickFaceWidget
-
clintonman
- Captain
- Posts: 5659
- Joined: 21 May 2009, 21:08
- Type the number ten into the box: 0
- Location: California
Re: Face to Face Object Snapping
you were too quick, that's the installer bug mentioned above.trueBlue wrote: 14 Oct 2020, 03:22 Looks like your installer is not installing the PickFaceWidget
Error.png
PluginInstalled.png
I'm on a different machine now, I'll download and make sure the good one made it up.
Edit: Yep, verified, you were too quick, the good installer is up and working now.
Edit: Since you ran the bad installer you will want to delete the PickSelect node from inside /Widgets/Tools, that was the bug in the installer.
-
trueBlue
- Captain
- Posts: 5548
- Joined: 06 Jul 2009, 22:50
- Type the number ten into the box: 10
Re: Face to Face Object Snapping
Thanks!
I forgot to mention that I think you need to install your plugin and reboot tS before running the installer
This screen shot is taken from the Log View during installation It is working really well, nice work!
I like trueSpace's Select by Painting (LMB + Drag)
This setup allows you to use both LMB + Drag and Ctrl + Pick Another issue on a Context Reset Looks like this is the problem
I forgot to mention that I think you need to install your plugin and reboot tS before running the installer
This screen shot is taken from the Log View during installation It is working really well, nice work!
I like trueSpace's Select by Painting (LMB + Drag)
This setup allows you to use both LMB + Drag and Ctrl + Pick Another issue on a Context Reset Looks like this is the problem
-
clintonman
- Captain
- Posts: 5659
- Joined: 21 May 2009, 21:08
- Type the number ten into the box: 0
- Location: California
Re: Face to Face Object Snapping
Interesting setup, I'll give it a try.trueBlue wrote: 14 Oct 2020, 08:56 Thanks!
I forgot to mention that I think you need to install your plugin and reboot tS before running the installer
This screen shot is taken from the Log View during installation
Screenshot 2020-10-13 171448.png
It is working really well, nice work!
I like trueSpace's Select by Painting (LMB + Drag)
This setup allows you to use both LMB + Drag and Ctrl + Pick
SelectByPainting.png
Another issue on a Context Reset
ErrorLoadObject.png
ErrorOnResetDefaultContext.png
Looks like this is the problem
debuglog.png
Context reset no debug.log here. What's inside of it?
If you want to protect against invalid file types you can do something like this to the loop for ReloadCustomScripts command
Code: Select all
for (; !filesEnum.atEnd(); filesEnum.moveNext()) {
var thefile = filesEnum.item();
var basename = fso.GetBaseName(thefile);
if(Node.Exists("Scripts/CustomCommands/" + basename)) continue;
//check valid extension
var ext = fso.GetExtensionName(thefile);
if(ext.toLowerCase() != "rsobj") continue;
RsFileIO.LoadObject(thefile, "Scripts/CustomCommands/");
}
-
trueBlue
- Captain
- Posts: 5548
- Joined: 06 Jul 2009, 22:50
- Type the number ten into the box: 10
Re: Face to Face Object Snapping
After further investigation, it looks like it was created before installing your Face to Face snapping.
Tuesday, October 13, 2020, 11:11:43 AM
Have zero idea how it was created.
Here is what the log reads"
Tuesday, October 13, 2020, 11:11:43 AM
Have zero idea how it was created.
Here is what the log reads"
Code: Select all
[1013/111143.365:ERROR:directory_reader_win.cc(43)] FindFirstFile: The system cannot find the path specified. (0x3)
-
clintonman
- Captain
- Posts: 5659
- Joined: 21 May 2009, 21:08
- Type the number ten into the box: 0
- Location: California
Re: Face to Face Object Snapping
I tried your widget setup, but now the shift and ctrl are fighting each other. Shift to deselect is sometimes ignored.
-
clintonman
- Captain
- Posts: 5659
- Joined: 21 May 2009, 21:08
- Type the number ten into the box: 0
- Location: California
Re: Face to Face Object Snapping
I just realized I forgot to note on the website that holding both ctrl and shift will toggle the selection.
-
trueBlue
- Captain
- Posts: 5548
- Joined: 06 Jul 2009, 22:50
- Type the number ten into the box: 10
Re: Face to Face Object Snapping
LMB + Drag, Ctrl + LMB, and Shift + LMB works perfect for me
Maybe your missing something?
Also added
to the top of the save obj ref and save obj ref2 scripts
Stops the Status message and loading your widget if a user has the Model view open and no Workspace 3D View
Or with trying to use it with only a Link Editor view
Maybe your missing something?
Also added
Code: Select all
if(Node.SubObjectCount("/D3DView")==0) return;Stops the Status message and loading your widget if a user has the Model view open and no Workspace 3D View
Or with trying to use it with only a Link Editor view
-
clintonman
- Captain
- Posts: 5659
- Joined: 21 May 2009, 21:08
- Type the number ten into the box: 0
- Location: California
Re: Face to Face Object Snapping
Thanks for the modelspace tip.
Sounds like you're avoiding shift + LMB drag.
Sounds like you're avoiding shift + LMB drag.
-
trueBlue
- Captain
- Posts: 5548
- Joined: 06 Jul 2009, 22:50
- Type the number ten into the box: 10
Re: Face to Face Object Snapping
Shift is not setup with a LMB state
Is there anyway to stop this error when you right click and the Source does not have a selection?
Is there anyway to stop this error when you right click and the Source does not have a selection?
-
clintonman
- Captain
- Posts: 5659
- Joined: 21 May 2009, 21:08
- Type the number ten into the box: 0
- Location: California
Re: Face to Face Object Snapping
You found a bug.trueBlue wrote: 14 Oct 2020, 15:46 Shift is not setup with a LMB state
Is there anyway to stop this error when you right click and the Source does not have a selection?
Right click with no selection on the Source object.png
change to this in "save source and center" and "save destination and center" nodes
Code: Select all
//if(dataS == "" || dataArr.length < 2 || dataArr[0] == "") {
if(dataS == "" || dataArr.length < 2 || dataArr[0] == "" || dataArr[1] == "") {
-
trueBlue
- Captain
- Posts: 5548
- Joined: 06 Jul 2009, 22:50
- Type the number ten into the box: 10
Re: Face to Face Object Snapping
Dat works, thanks!
I separated the Status message in the save obj ref2 script to get a better idea with the two Right click events and Coping the Source
Added a Copy boolean and hooked it up
I separated the Status message in the save obj ref2 script to get a better idea with the two Right click events and Coping the Source
Added a Copy boolean and hooked it up
Code: Select all
if(!Node.ConExists("Status Line", "Model"))
Node.ConCreate("Status Line", "Model", "string", 4);
//Node.Value("Status Line", "Model") = "Select the Destination Face - Ctrl+LMB add to selection, Shift+LMB remove from selection, RMB commit selection";
if(Copy)
Node.Value("Status Line", "Model") = "Destination - RMB snap Copy to selection / RMB Cancel";
else
Node.Value("Status Line", "Model") = "Destination - RMB snap to selection";
-
clintonman
- Captain
- Posts: 5659
- Joined: 21 May 2009, 21:08
- Type the number ten into the box: 0
- Location: California
Re: Face to Face Object Snapping
One more thing, you need to change the name of your modified widget. Maybe call it "FaceToFaceWidget" and change the code to use it instead of "PickFaceWidget".
-
trueBlue
- Captain
- Posts: 5548
- Joined: 06 Jul 2009, 22:50
- Type the number ten into the box: 10
Re: Face to Face Object Snapping
Thanks!
I made the changes and saved the script and Widgets.
When I Reset the Default Context, the Load error and debug.log reappeared in your CustomScriptsStore folder.
So something is not right.
Is this debug.log file coming from your new plugin?
I made the changes and saved the script and Widgets.
When I Reset the Default Context, the Load error and debug.log reappeared in your CustomScriptsStore folder.
So something is not right.
Is this debug.log file coming from your new plugin?
-
clintonman
- Captain
- Posts: 5659
- Joined: 21 May 2009, 21:08
- Type the number ten into the box: 0
- Location: California
Re: Face to Face Object Snapping
Like I said before, I reset context and don't get any debug.log file. I don't think I installed it to the latest unofficial update version of tS yet, maybe that's a factor.trueBlue wrote: 14 Oct 2020, 16:58 Thanks!
I made the changes and saved the script and Widgets.
When I Reset the Default Context, the Load error and debug.log reappeared in your CustomScriptsStore folder.
So something is not right.
Is this debug.log file coming from your new plugin?
-
clintonman
- Captain
- Posts: 5659
- Joined: 21 May 2009, 21:08
- Type the number ten into the box: 0
- Location: California
Re: Face to Face Object Snapping
Test results were negative.
install latest UU and reset default, no debug
install face to face - can see errors mentioned
reset default, no debug
look at widget - pink outline as expected
uninstall the plugin and close ts
overwrite the rsx file with the latest with support for the face picking
start tS, install the plugin
widget node still pink as expected
reset default context, no debug, widget node no longer pink
Edit:
Recall that you run in vista compatibility mode, tried that still nothing
install latest UU and reset default, no debug
install face to face - can see errors mentioned
reset default, no debug
look at widget - pink outline as expected
uninstall the plugin and close ts
overwrite the rsx file with the latest with support for the face picking
start tS, install the plugin
widget node still pink as expected
reset default context, no debug, widget node no longer pink
Edit:
Recall that you run in vista compatibility mode, tried that still nothing
-
trueBlue
- Captain
- Posts: 5548
- Joined: 06 Jul 2009, 22:50
- Type the number ten into the box: 10
Re: Face to Face Object Snapping
Can you test this example?
Create two Primitive Cubes
Evenly Scale one of the Cubes
Select the other Cube
Start Face to Face and select the Cube's faces on one side
RMB click
Select the smaller Cube's faces on one side
RMB click to Snap it to the larger Cube
For me, the larger Cube's Normal looks inside out.
Create two Primitive Cubes
Evenly Scale one of the Cubes
Select the other Cube
Start Face to Face and select the Cube's faces on one side
RMB click
Select the smaller Cube's faces on one side
RMB click to Snap it to the larger Cube
For me, the larger Cube's Normal looks inside out.
-
clintonman
- Captain
- Posts: 5659
- Joined: 21 May 2009, 21:08
- Type the number ten into the box: 0
- Location: California
Re: Face to Face Object Snapping
I don't see anything unusual. Tried snapping smaller to larger and larger to smaller.
-
trueBlue
- Captain
- Posts: 5548
- Joined: 06 Jul 2009, 22:50
- Type the number ten into the box: 10
Re: Face to Face Object Snapping
Wow!clintonman wrote: 14 Oct 2020, 17:36 Test results were negative.
install latest UU and reset default, no debug
install face to face - can see errors mentioned
reset default, no debug
look at widget - pink outline as expected
uninstall the plugin and close ts
overwrite the rsx file with the latest with support for the face picking
start tS, install the plugin
widget node still pink as expected
reset default context, no debug, widget node no longer pink
Edit:
Recall that you run in vista compatibility mode, tried that still nothing
Try googling
ERROR:directory_reader_win.cc(43)]
-
clintonman
- Captain
- Posts: 5659
- Joined: 21 May 2009, 21:08
- Type the number ten into the box: 0
- Location: California
-
trueBlue
- Captain
- Posts: 5548
- Joined: 06 Jul 2009, 22:50
- Type the number ten into the box: 10
Re: Face to Face Object Snapping
Must of had a bad Clintons3dPlugin
Installed a new one and it has resolved the previous issue
Ugh!
That was short lived
Edit: Installed your latest Face to Face and I still have the above issue!
Installed a new one and it has resolved the previous issue
Ugh!
That was short lived
-
clintonman
- Captain
- Posts: 5659
- Joined: 21 May 2009, 21:08
- Type the number ten into the box: 0
- Location: California
Re: Face to Face Object Snapping
That's weird, can you share the scene. Maybe a before and after version?
-
trueBlue
- Captain
- Posts: 5548
- Joined: 06 Jul 2009, 22:50
- Type the number ten into the box: 10
Re: Face to Face Object Snapping
Before & After
- Attachments
-
- Before.RsScn
- (1.03 MiB) Downloaded 213 times
-
- After.RsScn
- (1.03 MiB) Downloaded 235 times
-
clintonman
- Captain
- Posts: 5659
- Joined: 21 May 2009, 21:08
- Type the number ten into the box: 0
- Location: California
Re: Face to Face Object Snapping
I don't think it has anything to do with the plugin/script. Your after scene looks normal here.
I'll try the link from your PM.
I'll try the link from your PM.
-
clintonman
- Captain
- Posts: 5659
- Joined: 21 May 2009, 21:08
- Type the number ten into the box: 0
- Location: California
Re: Face to Face Object Snapping
Correction, I see your bad after scene now. Maybe I loaded the before scene by accident.
Edit: Nope, Correct scene, I had show back faces turned on because of the NURBS dev I've been doing.
Edit: Nope, Correct scene, I had show back faces turned on because of the NURBS dev I've been doing.
Last edited by clintonman on 15 Oct 2020, 19:52, edited 1 time in total.
-
clintonman
- Captain
- Posts: 5659
- Joined: 21 May 2009, 21:08
- Type the number ten into the box: 0
- Location: California
Re: Face to Face Object Snapping
Looks like the cube has negative scale values.
I can simulate the effect using the code below. This will turn a mesh inside out. It will not fix the inside out cube because trueSpace seems to read the values as positive even if they are negative.
I can simulate the effect using the code below. This will turn a mesh inside out. It will not fix the inside out cube because trueSpace seems to read the values as positive even if they are negative.
Code: Select all
fs = Node.FirstSelected()
ma = System.CreateDO("Math Package/Matrix Float Data")
ma = Node.Value(fs, "Matrix");
sx = ma.GetScaleX();
sy = ma.GetScaleY();
sz = ma.GetScaleZ();
sx = -sx;
sy = -sy
sz = -sz;
ma.SetScaleX(sx)
ma.SetScaleY(sy)
ma.SetScaleZ(sz)
Node.Value(fs, "Matrix") = ma-
clintonman
- Captain
- Posts: 5659
- Joined: 21 May 2009, 21:08
- Type the number ten into the box: 0
- Location: California
Re: Face to Face Object Snapping
The dots make it easier to see which triangles are selected. Image shows a kind of simulation with point edit triangle edges on the left and the face widget selection on the right, each with 1 "triangle" deselected.
-
trueBlue
- Captain
- Posts: 5548
- Joined: 06 Jul 2009, 22:50
- Type the number ten into the box: 10
Re: Face to Face Object Snapping
Thank you for the explanation.
What I was referring to, is selecting small triangles.
The dots/squares become larger then the triangle edge's highlight
What I was referring to, is selecting small triangles.
The dots/squares become larger then the triangle edge's highlight
-
clintonman
- Captain
- Posts: 5659
- Joined: 21 May 2009, 21:08
- Type the number ten into the box: 0
- Location: California
Re: Face to Face Object Snapping
Yeah, I'm aware of that. I might add a dot size control or auto sizing or something. Right now it's not even clear how big a size value is. Now the size is something like 9 or 10. 9 or 10 what's? It's not meters and it doesn't seem to be pixels. It'll take a little time to figure out because of the dev cycle:trueBlue wrote: 16 Oct 2020, 15:01 Thank you for the explanation.
What I was referring to, is selecting small triangles.
The dots/squares become larger then the triangle edge's highlight
SmalltriangleSelection.png
close tS
make a change to the plugin code
compile the plugin code
start truespace
test it and hope it doesn't crash tS
repeat until it works/figure it out
-
trueBlue
- Captain
- Posts: 5548
- Joined: 06 Jul 2009, 22:50
- Type the number ten into the box: 10
Re: Face to Face Object Snapping
Yikes!
Baby steps takes hours!
Having preferences would be great...
dot size control or auto sizing, and No dot!
Thinking ahead, in case you develop other tools, like your Face to Face Snap...
If you incorporated your PickFace inside your Face to Face Snap scripts, you could have unique preferences verses global.
Baby steps takes hours!
Having preferences would be great...
dot size control or auto sizing, and No dot!
Thinking ahead, in case you develop other tools, like your Face to Face Snap...
If you incorporated your PickFace inside your Face to Face Snap scripts, you could have unique preferences verses global.
-
clintonman
- Captain
- Posts: 5659
- Joined: 21 May 2009, 21:08
- Type the number ten into the box: 0
- Location: California
Re: Face to Face Object Snapping
Well, there's good news, the dot size is pixels after all. So there won't be any auto-sizing, just a size control.
-
clintonman
- Captain
- Posts: 5659
- Joined: 21 May 2009, 21:08
- Type the number ten into the box: 0
- Location: California
Re: Face to Face Object Snapping
In your pm you mentioned that if you enable the copy option the inversion happens every other copy. So I tried it and finally saw what you saw. It only happens for me on the second time, not every other time.
This fixes it for me.You will need to test since we don't have the same results. I removed the unselect because it already is set to happen in the next command node.
bottom of the transform script:
This fixes it for me.You will need to test since we don't have the same results. I removed the unselect because it already is set to happen in the next command node.
bottom of the transform script:
Code: Select all
var sx = sourceMatrix.GetScaleX();
var sy = sourceMatrix.GetScaleY();
var sz = sourceMatrix.GetScaleZ();
sourceMatrix.SetScaleX(sx);
sourceMatrix.SetScaleY(sy);
sourceMatrix.SetScaleZ(sz);
Node.Value(sourceNode, "Matrix") = sourceMatrix;
//if(!Copy) {
//Space.Unselect()
//}-
trueBlue
- Captain
- Posts: 5548
- Joined: 06 Jul 2009, 22:50
- Type the number ten into the box: 10
Re: Face to Face Object Snapping
Added your code
The above is for when Copy is false, to give an indication of when the tool ends and also disabling the toolbar icon commands.
The next script, Copy is true, the Source is selected, which enables the toolbar icon commands.
I also added UserInterface.OpenToolPanelViewEx2("" , "" ,"Scripts/CustomCommands/facetoface", 3, 1, 0); in this next script
.
.
. Cube selected is the Source shown in the Info panel
The bottom other Cube, 1 is an unmodified primitive(1st Destination)
Checked "Copy Source"
Selected the Cube's top two faces as the Source
Selected the Cube, 1 top two faces as the Destination and Snap
Selected the Cube, 2 top two faces as the Destination and Snap
repeat...
Results:
The Z rotation is different on the 3rd, 4th, 5th and 6th copies, and the rest are 0
Code: Select all
if(!Copy) {
Space.Unselect()
}
The next script, Copy is true, the Source is selected, which enables the toolbar icon commands.
I also added UserInterface.OpenToolPanelViewEx2("" , "" ,"Scripts/CustomCommands/facetoface", 3, 1, 0); in this next script
.
.
. Cube selected is the Source shown in the Info panel
The bottom other Cube, 1 is an unmodified primitive(1st Destination)
Checked "Copy Source"
Selected the Cube's top two faces as the Source
Selected the Cube, 1 top two faces as the Destination and Snap
Selected the Cube, 2 top two faces as the Destination and Snap
repeat...
Results:
The Z rotation is different on the 3rd, 4th, 5th and 6th copies, and the rest are 0
-
trueBlue
- Captain
- Posts: 5548
- Joined: 06 Jul 2009, 22:50
- Type the number ten into the box: 10
Re: Face to Face Object Snapping
Reinstalled tS761Std
Installed the tS761Std Beta UU that includes my additional Pick Face Widget, and the additional code from the previous post for the transform script
No inside out meshes!!!
No debug.log files!
Everything seems to be working as expected except what I posted in the previous post with the Rotation Z values issue.
Also added...
to see it that helped, but no cigar.
Edit: 20 minutes latter...
Made some changes to the script
debug.log created in:
C:\trueSpace761Std/debug.log
Installed the tS761Std Beta UU that includes my additional Pick Face Widget, and the additional code from the previous post for the transform script
No inside out meshes!!!
No debug.log files!
Everything seems to be working as expected except what I posted in the previous post with the Rotation Z values issue.
Code: Select all
var rx = sourceMatrix.GetPitch()
var ry = sourceMatrix.GetRoll()
var rz = sourceMatrix.GetYaw()
sourceMatrix.SetPitch(rx)
sourceMatrix.SetRoll(ry)
sourceMatrix.SetYaw(rz)
Edit: 20 minutes latter...
Made some changes to the script
debug.log created in:
C:\trueSpace761Std/debug.log
-
clintonman
- Captain
- Posts: 5659
- Joined: 21 May 2009, 21:08
- Type the number ten into the box: 0
- Location: California
Re: Face to Face Object Snapping
Do you use Chrome or the new Edge browser? The internet at the moment is blaming them for the debug log. Seems it was showing up on their desktops. Maybe it shows in trueSpace because you spend more time in tS folders. All wild guesses.
-
trueBlue
- Captain
- Posts: 5548
- Joined: 06 Jul 2009, 22:50
- Type the number ten into the box: 10
Re: Face to Face Object Snapping
I am using Edge and do not have Chrome installed.clintonman wrote: 17 Oct 2020, 16:59 Do you use Chrome or the new Edge browser? The internet at the moment is blaming them for the debug log. Seems it was showing up on their desktops. Maybe it shows in trueSpace because you spend more time in tS folders. All wild guesses.
Microsoft Edge is based on Chromium
Been having issues with Edge, ever since the Win10 2004 update
Guessing that the debug.log was created when I had an error.
From the Rosetta.log
Code: Select all
09:31:46.206 ERR Source object: /Scripts/CustomCommands/RectSelect/RMB Error: Microsoft JScript runtime error Description: 'Rectangle' is undefined Error code: 0x800a1391 - (null) Line: 5, Char: 0 Script text: if(Rectangle) { 0x80020101 [RcScriptCmd.cpp(1170)]
-
clintonman
- Captain
- Posts: 5659
- Joined: 21 May 2009, 21:08
- Type the number ten into the box: 0
- Location: California
Re: Face to Face Object Snapping
Nope, doesn't mean anything to me.
-
trueBlue
- Captain
- Posts: 5548
- Joined: 06 Jul 2009, 22:50
- Type the number ten into the box: 10
Re: Face to Face Object Snapping
Getting closer to what I think is happening with these debug.log files popping up.
Cortana is evil
Why in the hell would "Inking and typing personalization" / "Getting to know you" / "Personal dictionary", list trueSpace as a personal dictionary???
Cortana is evil
Why in the hell would "Inking and typing personalization" / "Getting to know you" / "Personal dictionary", list trueSpace as a personal dictionary???
-
clintonman
- Captain
- Posts: 5659
- Joined: 21 May 2009, 21:08
- Type the number ten into the box: 0
- Location: California
Re: Face to Face Object Snapping
Wild, I wonder how that happened.

















