two clic to make a line

hello

I wonder if somebody could make a simple script to create a line by two clics and make the pivot of the line to have its x axis aligned to the line.
Thanks.
(no ui, just run script, clic, clic, and voilà)

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
obaida's picture

it's amazing

it's amazing (linepivot.mcr) working like a sharm .
Thank you "barigazy" , and the point now , how to change the local dir of an object pivot by two click , like in your script but without creating line (apply to selected object) .

barigazy's picture

What do you expect to do this

What do you expect to do this without matrix :)
Use my code and try to find the way how to build a simle tool.
I've already solved the hard part and I leave you a easy part.
You can look this example of very nice tool by OYH
http://www.scriptspot.com/3ds-max/scripts/cline-2-08
Have fun. I will track your progress.
Cheers!

barigazy

titane357's picture

Thanks. Matrix is domething

Thanks. Matrix is domething like Maths, is it ? :-)
Maths = Devil for me.
I'll try to do it before chrismas...

barigazy's picture

Matrix is awesome, especially

Matrix is awesome, especially the movie.
But i already finish that part for you.
Now you only need to create the tool.

barigazy

titane357's picture

Thanks barigazy. I don't

Thanks barigazy.
I don't understand how it works, but it works....

AttachmentSize
linepivot.mcr 1.59 KB
obaida's picture

it's amazing working like a

it's amazing working like a sharm .
but the point now , how to change the local dir of an object pivot by to click , like in your script but without creating line (apply to selected object) .

barigazy's picture

Are you writte this? :)

It's better if you use UI (not Macroscript) because you have different axis options and center pivot position.
Why don't you create two verisons (ms and mcr) and post it like finished tool.

barigazy

kimarotta's picture

did not understand what

did not understand what you're willing, when you create the line gives you the first click and then the second and the line is already created with the central pivot axis X. better explains what you need ...

kimarotta.com.br
3d Artist  

titane357's picture

Hello. I need a tool to make

Hello. I need a tool to make a line with the pivot direction going through the two clicked vertexes.
So, for geometric constuctions, it is easy in local mode to extend or shorten these so created lines.

barigazy's picture

I have already small script

I have already small script that sets the selection axis parallel to the line direction. But titane357 want tool to be able to create this line. I don't have time right now to finish "tool" part. If you want you can writte the rest of script.

AttachmentSize
line_with_parallel_axis.ms 2.28 KB

barigazy

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.