Face to Face Object Snapping

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

Re: Face to Face Object Snapping

Post by trueBlue »

LMB + Drag, Ctrl + LMB, and Shift + LMB works perfect for me
Maybe your missing something?
Also added

Code: Select all

if(Node.SubObjectCount("/D3DView")==0) return;
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
User avatar
clintonman
Captain
Posts: 5422
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California
Contact:

Re: Face to Face Object Snapping

Post by clintonman »

Thanks for the modelspace tip.
Sounds like you're avoiding shift + LMB drag.
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: Face to Face Object Snapping

Post by trueBlue »

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
Right click with no selection on the Source object.png (10.96 KiB) Viewed 2522 times
User avatar
clintonman
Captain
Posts: 5422
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California
Contact:

Re: Face to Face Object Snapping

Post by clintonman »

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
You found a bug.
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] == "") {
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: Face to Face Object Snapping

Post by trueBlue »

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

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";
User avatar
clintonman
Captain
Posts: 5422
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California
Contact:

Re: Face to Face Object Snapping

Post by clintonman »

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".
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: Face to Face Object Snapping

Post by trueBlue »

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?
User avatar
clintonman
Captain
Posts: 5422
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California
Contact:

Re: Face to Face Object Snapping

Post by clintonman »

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?
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.
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: Face to Face Object Snapping

Post by clintonman »

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
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: Face to Face Object Snapping

Post by trueBlue »

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. :cry:
Post Reply