User Data keyframes not rendering with animation

On 06/07/2018 at 01:41, xxxxxxxx wrote:

Hi guys,

Apologies for the vague title! I'm having an issue that may be more of a C4D thing than Python but either way here goes...

Essentially, i've created a plugin that swaps (Octane) image textures using user data. I can keyframe the user data and the textures all swap accordingly - this works fine in the viewport and also when rendering a single frame.

The issue i'm having is if I render out as an animation the keyframes on the user data aren't recognised, and it only renders out whatever the user data is set to on the current frame.

I'm wondering if this is some sort of priority thing and maybe I can fix this by adding something to my code?

I have workaround in which I can write a script that will create a take for each frame of the animation, but I would much prefer (and our animator will be less likely to strangle me) if we could render the animation directly.

Any thoughts on this would be great.



On 06/07/2018 at 02:08, xxxxxxxx wrote:


what kind of plugin did you write? How exactly does it work?

Just from the "symptoms" you describe: when something works in the viewport but not in animation rendering this is often caused by using GetActiveDocument() in a NodeData based plugin e.g. to resolve a link. That of course won't work since the "active" document is the document in the viewport, not necessary the documented rendered.

Could that be an issue?

best wishes,

On 10/07/2018 at 23:56, xxxxxxxx wrote:

Hi Sebastian,

Just want to say thanks for your help with this and it turns out your answer was exactly right.

Managed to correct it by using node.GetDocument() instead of GetActiveDocument().

Many thanks!