Ambiera ForumDiscussions, Help and Support. |
|
[ 1 2 ] Page 1 of 2 |
|
|||||
|
searching the net I found a few examples and I tried to create a script. var s = editorGetSelectedSceneNode(); Select an object and run the script. PS: Translation by Google |
||||
|
Thanks very much! Does this work? I tried to save this as a plugin but didn't work for me. Thanks anyway. I will look through the code and learn from it. Thank you! Ed. |
||||
|
to me via plugin does not work ,but if you do leave the dialog script works. View menu -> Show Windows scripting. PS: translation by Google |
||||
|
I tried it in the Windows scripting and It works fantastic!! Thanks. But I wonder why this dosn't work as a plugin: function snap(value, gridSize, roundFunction){ |
||||
|
Of course it works as plugin as well, you only forgot to wrap your code up into a function to be executed by the menu. Paste this into a file named for example 'snap.js', put it into the plugin directory and restart coppercube, and then it works: function snap(value, gridSize, roundFunction){ |
||||
|
Thanks pmax for this code !! CopperCube has endless features. Is there any plan in the future to add the plugins to the context menu (Right Click Menu) ? This would be fantastic |
||||
|
Thanks niko, I need to keep learning. :) Ed. |
||||
|
Thanks niko, for improving the script. |
||||
|
I added a command to enter the value you want. So there is no need to change every time the script. I left the default value of 5. function snap(value, gridSize, roundFunction){ |
||||
|
Fantastic! thanks to all!!! this group of people is great! ^_^ |
||||
|
And the script SNAP TO OBJECT? :D is possible? |
||||
|
Hey Niko. Can you add this script to the plugins download page? |
||||
|
Yes, just added it: http://www.ambiera.com/coppercub... Hope this is ok for you, pmax :) I also modified the script a bit in order to now have two commands: One, with the shortcut to snap an object to the grid, and a second command to specify the grid size (because you usually don't want to do this all the time when snapping an object) Snip to object: Yes, would be possible too. You would have to calculate the bounding box of both objects and then move one. Not sure how to mark both objects which are relevant, probably by selecting them one after another and hitting a different shortcut each, maybe. |
||||
|
Thanks pmax for the great plugin! It is very useful indeed! Ed. |
||||
|
Niko Thanks for putting me as the author of the plug-in and have it improved. Thanks to all for the compliments. |
[ 1 2 ] Page 1 of 2 |
|