Timewarp node - export to Nuke or CG as text document

Hey there Logik. A little task I have been given to fit into a nuke pipeline is to export my timewarp node setups as a text document. In a format like this.

1136 1094
1137 1097.142822
1138 1100.285767
1139 1103.428589
1140 1106.571411
1141 1109.714233
1142 1112.857178
1143 1116
1144 1119.142822
1145 1122.285767
1146 1125.428589
1147 1128.571411
1148 1131.714233
1149 1134.857178
1150 1138
1151 1141

First column being the frame number of the result, and the second column being the frame number of the source.

Would love any tips?

Not sure how nuke reads this or interprets fractional frames, but Flame always rounds down to the closest integer ('cause ya can’t have a fraction of a frame) so to be safe I would do that with your text file. I’m not sure how you are building the text file, but the expression “floor” rounds down.

Bake your timewarp curve’s frame channel, copy it and paste it to a channel of an axis in action and export raw from action with that channel selected in action.

That’s most of the way there. Nuke used to be able to import that directly as a discreet “lut”.

1 Like

@jamesjohnston - this might get you in the ballpark:

extract_flame_tw_key_values.py (4.9 KB)

GPLv3_LIcense.zip (12.0 KB)

  • From flame, save your timewarps individually, with meaningful names.
  • Run this python script and point to /opt/Autodesk/$my_projekt/timewarp/flame/
  • Harvest the new files. (*.tw_key_values)

I would have written the conversion directly to nuke, but my beta license has expired, and the non-commercial version writes out hashed/encrypted gibberish.

N.B. this operates on keyframes from the timing channel, not from the speed channel. Read a couple of the '.timewarp_node’ files and you’ll figure out what data you want to keep or not.

i think this is what you are looking for: