animatedSnap3D v1.1


 
This location is for Registered Users Only.
Perhaps you need to login or register.
Contributor: Ivan Busquets
An extension to Nuke's "snap" options for animated 3D objects. Based on a selection of vertices, this allows for objects to match the position, rotation and scale of that selection over a specified frame range.
Requirements:
6.3 or later
08 Apr 2012
3878

animatedSnap3D

As the name suggests, this adds "animated" options to the snap_menu in 3d nodes since Nuke 6.1.

animatedSnap3D_nuke63

 

The 3 new options work exactly the same way as their original counterparts, but extends their use to animated geometry.

animatedSnap3D_1animatedSnap3D_2

Installation:

To install, simply extract the downloaded .zip file in your .nuke directory, or anywhere else inside your NUKE_PATH.

Please note that you need to copy the whole animatedSnap3D directory, not just the files inside it.

Then add the following line to the relevant menu.py

import animatedSnap3D

 

And that's it.

Note: Currently, animatedSnap3D uses a "hack" (executing a temporary CurveTool) to force all the script to be evaluated for each frame. This may make it run slower on heavy scripts, but it's a necessary workaround for now.

 


 

UPDATE (v 1.1) :

The name of the snap3d functions changed from Nuke 6.2 to 6.3, making version 1.0 of animatedSnap3D not work in Nuke 6.3.

This has been adressed in this version (1.1). The menu entries have also been changed to match the new names in 6.3.


Please login in order to download these files.

Comments   

 
0 # Michael Millspaugh 2011-10-21 13:36
When I run your script, I get an error 'module' object has no attribute 'snapToPoints'. Maybe this is easy to solve?
 
 
0 # Ivan Busquets 2011-10-22 16:06
Hi Michael,

Thanks, it looks like The Foundry changed the name of some of the snap functions in 6.3
I will make some changes, rename the menu entries so they match the new ones in 6.3 and re-upload soon.

In the meantime, you can type & execute this in the script editor to get it working again:

nukescripts.snap3d.snapToPoints = nukescripts.snap3d.translateRotateScaleToPoints
nukescripts.snap3d.scaleToPoints = nukescripts.snap3d.translateRotateToPoints


Cheers,
Ivan
 
 
0 # Michael Millspaugh 2011-10-24 07:41
Awesome!! Thanks so much. I'm just getting started in Nuke, and banging my head against the wall a bunch.

Is this still the only way to attach another object in nuke to an animated vertex from geometry? I spent some time trying to use the pythonGeo node, with some python scripting and an expression, but couldn't make it work (and of course, being a novice, couldn't troubleshoot it).
 
 
0 # John Thompson 2011-12-15 09:30
I`m using Nuke6.1v3
I`ve4 loaded the py file in the.nuke folder and added the import statement in the menu.py file but I do not get any snap to animated
Can you offer any suggestions
John Thopmpson
 
 
0 # Ivan Busquets 2012-04-07 20:51
John,

I'm sorry I missed your comment. Just saw it now when I was uploading an updated version.
Make sure you copy the whole animatedSnap3D directory into your .nuke/ directory, not just the files inside.

So, you should see a structure like this:

~/.nuke/animatedSnap3D/animatedSnap3D.py

Hope that helps.

Cheers,
Ivan

P.S. If you're using 6.3, make sure you download the latest version (1.1). I just uploaded it, it might take a little while until it shows up.
 
 
0 # Hans Gelpke 2012-05-28 13:25
When I use this on 6.3v7, I select a point and then snap it but after it goes a few frames, it says I need to select one or more points. I'm not sure what I am doing incorrectly.
 
 
0 # Ivan Busquets 2012-05-28 13:36
Hi Hans,
This sounds like your selected vertex might not exist in later frames. Where are you selecting your point from? This could be the case if your point comes from a point cloud, or geometry with varying topology (not the same number of vertices on each frame).
Are you able to "see" your selected point on the frame where it fails?
 
 
0 # Hans Gelpke 2012-05-28 14:29
That sounds like the exact problem. I do lose sight of the vertex after a few frames.
 
 
0 # Charles Taylor 2014-02-21 21:35
This seems to produce an Axis that just jumps around randomly - Nuke 7v9, snapping to a fairly heavy Alembic.
 
 
0 # Shaun Pinc 2014-03-07 03:28
Hi Ivan, the animated snap to points is awesome, thank you, but when I use it after a Transform Geo node is has an offset which does not seem consistent with the transform and I cannot figure out how to resolve this. Any information will be greatly appreciated. Thanks !
 
 
+1 # Alex Branton 2014-03-17 21:27
Most likely case is that the nukescript is reading information coming directly from the vertex - baked in from whatever program your geo is coming from. This means it wont gather the transform geo data as well. That, or they are both using to different world spaces or matrices - In any case, I would recommend snapping to a point on your ORIGINAL geo and re-applying your transform geo to whatever you have snapped.
 
 
0 # Jacqueline Cooper 2015-12-12 19:37
This plugin is so amazing. One thing it allows me to do that is beyond cool and fixes tons of issues, is to scale up alembic files from a single point that is now animated to the object and follows it. Thank you!
 
 
+1 # Joshua LaCross 2016-01-26 00:11
Has anyone used this in Nuke 9? I can't seem to get it working. I tried adding the animiated3D folder to the plugin path. I also tried to change the _init_ to add the menu to "Axis2" instead of Axis because that's what nuke 9 calls it. Any ideas? Thanks
 
 
0 # mike terpstra 2016-02-27 19:13
Josh! I'm interested in hearing if there's an update to this as well.
 
 
+1 # Sara Hilmarsdottir 2017-03-02 20:33
We're having some problems in Nuke 9/10, the curves come out quite jagged, missing frames etc Anyone else having this? Found a solution?
 
 
0 # Hiroki Iijima 2017-01-28 09:09
This could really help me on my current shot. Thank you so much! Ivan!
 
 
0 # li zhaohui 2017-11-18 19:38
Rotation error. After the map, you can see the problem.
 
 
+4 # li zhaohui 2018-08-23 18:12
No update?
 
 
+3 # Andreas Jablonka 2019-05-08 19:43
Hi Ivan, any update on this for nuke 11?
 
 
0 # Thomas Vu 2019-09-13 04:02
update it please
 
 
+1 # Lewis Carson 2020-02-28 04:53
I have switched to this and it works with the rotation

https://gist.github.com/jedypod/98dc18acd8008e7e5cbe
 
 
+2 # Mohamed Abuzeid 2020-02-23 16:48
it's really awesome , Thanks man
it's just worked when I replaced the text in " init " to " menu.py " and the text inside " menu " to " init " , you did the opposite in instructions .
 
 
0 # lufy Monnkey 2021-04-15 19:03
Not working for me =)
respect the install info, tried also to follow Mohamed comments
 
 
0 # Juan Salazar de Leon 2021-08-18 18:53
not working for me either
getting the following error

module 'animatedSnap3D ' has no attribute 'translateThisN odeToPointsAnim ated'
 
 
+6 # Andreé Knutsson 2021-11-23 13:57
Got it to work for Nuke13, I have not tested other versions.

animatedSnap3D.py

Line 116: except ValueError, e:

Change to:
except ValueError as e:

__init__.py

Renamed to:
menu.py

Line 1:
from animatedSnap3D import *
Change to:
import animatedSnap3D
 
 
0 # Oscar Knott 2022-01-11 07:21
Hi Andree, i am glad you fixed it, i am also trying to get it to work in nuke 13 but have had no luck.

i just want to check I am following your changes correctly, so you are changing the init.py file name to menu.py and keeping it in the animatedSnap3D folder? and then after that you are also changing line one to import animatedSnap3D?

or are these different changes, the menu.py is in the .nuke folder and I get an error in every way I have interpreted this

thanks so much, really need this!
 
 
0 # Mario Zorzi 2022-08-31 13:55
Oscar did you fix the problem? like you I still get an error...
 
 
0 # Andreé Knutsson 2022-09-06 11:36
Please see my reply to Oscar.
 
 
0 # Andreé Knutsson 2022-09-06 11:36
And let me know if it works for you
 
 
0 # Mario Zorzi 2022-09-07 15:29
Thank you very much andreè! it works..

This is the point
"Put the whole animatedSnap3D folder in your .nuke folder
Add the following line to your init.py in /.nuke.
nuke.pluginAddPath('./animatedSnap3D')"


Thank you!
 
 
0 # Andreé Knutsson 2022-09-06 09:43
Hello Oscar,
Sorry for the very late reply.

1. Quote:
so you are changing the init.py file name to menu.py and keeping it in the animatedSnap3D folder?
Yes, rename it into menu.py and keep it in the folder.
2.Quote:
and then after that you are also changing line one to import animatedSnap3D

Yes, I modified it to import the module here.
3. Quote:
the menu.py is in the .nuke folder and I get an error in every way I have interpreted this
This might be where you get your problem.

Could you try to
  • Put the whole animatedSnap3D folder in your .nuke folder
  • Add the following line to your init.py in /.nuke.
  • nuke.pluginAddP ath('./animated Snap3D')
 
 
+1 # Ran Xie 2023-09-19 23:13
Quote:
Could you try to
Put the whole animatedSnap3D folder in your .nuke folder
Add the following line to your init.py in /.nuke.
nuke.pluginAddP ath('./animated Snap3D')
For those who may still be having issues with this plugin after doing these changes that Andree suggested, for some reason when I use quotations " instead of apostraphes ' that works.

So in init.py, instead of nuke.pluginAddP ath('./animated Snap3D') I use
nuke.pluginAddPath("./animatedSnap3D")

From my limited understanding of Python this shouldn't make a difference but it was only after doing that, did this finally work.
 
 
+1 # Thomas Vu 2022-04-12 02:58
its does work, thank you....
sadlly seem like the owner drop this project... we have not seen any update...
 
 
0 # Jordan Vanderlinden 2022-03-07 04:41
It seems that its only been solved in studios so far, no luck for me either in nuke indie 13.1v2

Same error as others have reported, "module 'animatedSnap3D ' has no attribute 'translateThisN odeToPointsAnim ated'
 
 
-1 # Lundy Hu 2022-06-16 12:15
#Andreé Knutsson's reply.
 
 
0 # Pablo Fidalgo 2022-04-14 23:27
module "animatedSnap3D " has no attribute "translateThisN odeToPointsAnim ated" . I have installed and copied the folder fine. How can I solve this error in my version of NukeX 13.0v2 please. Thank you very much
 
 
0 # Lundy Hu 2022-06-16 12:14
The solution is in #Andreé Knutsson's reply.
 
 
0 # Sven Ahlstrom 2022-05-13 12:51
Thanks!
 
 
0 # Jake Hines 2024-01-23 15:42
So I've followed the steps of Andreé Knutsson's reply but having this line nuke.pluginAddP ath('./animated Snap3D') in the init.py of the /.nuke directory. I cant even open Nuke as when its opening an error comes up saying error interpreting the plugin and I have no choice but to close nuke down.

When I remove this line in init.py Nuke can open but the plugin doesnt show up in the snap menu.

It only shows up when I go back and rename the menu.py in the plugin folder back to __init__.py but then of course the first issue comes up where I get the error module 'animatedSnap3D ' has no attribute 'translateRotateThisNodeToPointsAnimated'

Please Help
 
 
0 # Andreé Knutsson 2024-01-26 11:44
I made a walkthrough for an easier approach. See the link below
https://pastecode.io/s/n858vgdg

Create the "menu.py" or "init.py" in your .nuke folder, if it does not already exist.

Edit:
if you create a new "menu.py, remember to start with Quote:
import nuke
 
 
0 # Lucas Newton 2024-04-05 00:13
SLIGHT CORRECTION

1) "Put the whole animatedSnap3D folder in your .nuke folder

2) if it does not already exist, Create the "menu.py" & "init.py" in your .nuke folder
if you create a new "menu.py, remember to start with import nuke

3) Add the following line to your Menu.py in /.nuke.
import animatedSnap3D

4) Add the following line to your init.py in /.nuke.
nuke.pluginAddPath('./animatedSnap3D')

5) inside the animatedSnap3D folder make changes to the animatedSnap3D.py

Line 116: except ValueError, e:

Change to:
except ValueError as e:


6) inside the animatedSnap3D folder firstly Rename __init__.py to: menu.py

now make these changes to that same file

Line 1:
from animatedSnap3D import *

Change to:
import animatedSnap3D

That worked in Nuke indie v15.0v04
 

You have no rights to post comments

We have 3600 guests and 125 members online