- Thu Apr 01, 2010 3:20 pm
#321488
What about camera projection? I have had to model just like JD mentioned to get something like this to work, but I have had some success in the past by using the camera projection... try this-- text is not mine and I can not for the life of me remember who posted it but I copied the entire thread so hope this helps.
Cary
Quoted text below
hmm, you are talking about Rhino commands (not Rhino-script native methods). Yes, it seems possible. You don't even need a Rhinoscript for this. It can be done with a macro.
Try this in a button:
Code:
'_CPlane _View _applyplanarmapping 1 _changeplane -50,-50,0 50,50,0 _single 1 1
hyltom wrote:
how do you know the sequence of the _ApplyPlanarMapping command.
Well, the macro will fail if you have not pre-selected some objects (that's because the sequence is a little different without pre-selection; there's an extra step in there).
When you make a macro like this, generally, you run the command once manually until it does exactly what you want and you write down the options you followed in each step. For example in this case the first thing the command asks you is channel number, so the first parameter in the macro is "1", then you have to select a custom plane (otherwise you are being constrained to the world plane) so the next parameter is "changeplane" ... and so on
Quote:
Obviously, if i m not wrong, it's not possible to change the UVW rotation as their is no macro, am i correct?
You mean to rotate the planar mapping ? ...
There are two ways.
1. you can add a parameter "3point" after the "changeplane" and then use three points to create a rotated plane --> '_CPlane _View _applyplanarmapping 1 _changeplane _3point 0,-70.711,0 70.711,0,0 0,70.711,0 _single 1 1 <-- ... but it is difficult to control the rotation like this.
2. you can work around it by having a modified macro like this:
--> '_CPlane _View _CPlane _rotate 0,0,0 0,0,1 30 _applyplanarmapping 1 _changeplane -50,-50,0 50,50,0 _single 1 1 <--
In this case the last number after the "rotate" parameter is the rotation angle. This way you get a prededermined rotation each time you press the button.
You can also have the macro to pause so that you can enter a rotation angle like this:
Code:
'_CPlane _View _CPlane _rotate 0,0,0 0,0,1 pause _applyplanarmapping 1 _changeplane -50,-50,0 50,50,0 _single 1 1
... but when it asks, then you **have** to type in an angle, otherwise, if you click for a point, the rest of the macro will not work.
Of course all this can be done a little more elegantly with a script ... but ...