<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Disable all animation in document]]></title><description><![CDATA[<p dir="auto">Hi,<br />
is there a way to disable in Dope sheet all animation in a document? Bascially trigger the Eye Icon function in timeline Summary</p>
]]></description><link>http://developers.maxon.net/forum/topic/16439/disable-all-animation-in-document</link><generator>RSS for Node</generator><lastBuildDate>Thu, 13 Aug 2026 16:45:02 GMT</lastBuildDate><atom:link href="http://developers.maxon.net/forum/topic/16439.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 12 Aug 2026 18:04:11 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Disable all animation in document on Thu, 13 Aug 2026 12:48:55 GMT]]></title><description><![CDATA[<p dir="auto">Hi,<br />
<a class="plugin-mentions-user plugin-mentions-a" href="/forum/user/ferdinand">@<bdi>ferdinand</bdi></a> and <a class="plugin-mentions-user plugin-mentions-a" href="/forum/user/anlv">@<bdi>Anlv</bdi></a> this is most awesome! All way beyond my capablities so thanks a lot for the scripts!</p>
]]></description><link>http://developers.maxon.net/forum/post/77315</link><guid isPermaLink="true">http://developers.maxon.net/forum/post/77315</guid><dc:creator><![CDATA[ceen]]></dc:creator><pubDate>Thu, 13 Aug 2026 12:48:55 GMT</pubDate></item><item><title><![CDATA[Reply to Disable all animation in document on Thu, 13 Aug 2026 11:29:38 GMT]]></title><description><![CDATA[<p dir="auto">Hi <a class="plugin-mentions-user plugin-mentions-a" href="/forum/user/ferdinand">@<bdi>ferdinand</bdi></a>,</p>
<p dir="auto">using the <code>mxutils.RecurseGraph</code> method is much clearer and simpler. Thank you, I've learned something new again.</p>
<p dir="auto">Cheers,<br />
Anlv</p>
]]></description><link>http://developers.maxon.net/forum/post/77314</link><guid isPermaLink="true">http://developers.maxon.net/forum/post/77314</guid><dc:creator><![CDATA[Anlv]]></dc:creator><pubDate>Thu, 13 Aug 2026 11:29:38 GMT</pubDate></item><item><title><![CDATA[Reply to Disable all animation in document on Thu, 13 Aug 2026 11:18:39 GMT]]></title><description><![CDATA[<p dir="auto">Hello <a class="plugin-mentions-user plugin-mentions-a" href="/forum/user/ceen">@<bdi>ceen</bdi></a>,</p>
<p dir="auto">Yes, this is possible. <a class="plugin-mentions-user plugin-mentions-a" href="/forum/user/anlv">@<bdi>Anlv</bdi></a> is right that <code>ID_CTRACK_ANIMOFF</code> is the toggle you are looking for (thank you for helping out!). You can then either combine it with manual scene traversal code, or use <a href="https://developers.maxon.net/docs/py/2026_3_0/modules/mxutils/index.html#mxutils.RecurseGraph" target="_blank" rel="noopener noreferrer nofollow ugc">mxutils.RecurseGraph</a> which is for most users probably the simpler option when they do not have intimate knowledge of the Cinema scene graph.</p>
<p dir="auto">Cheers,<br />
Ferdinand</p>
<pre><code class="language-py">"""Loops over all tracks in the scene and toggles their animation state.

I.e., running this once will disable all tracks, running it again will enable all tracks, and so on.
"""

import c4d
import mxutils

doc: c4d.documents.BaseDocument  # The currently active document.
op: c4d.BaseObject | None  # The primary selected object in `doc`. Can be `None`.

def main() -&gt; None:
    """Called by Cinema 4D when the script is being executed.
    """
    # We walk the document using RecurseGraph, finding all tracks in the scene, no matter where they
    # are hiding. This is a relatively inefficient call as we really walk everything, and experts
    # could fine tune this. But for a simple script like this or any code that is not performance 
    # critical, this is just fine.
    for track in mxutils.RecurseGraph(doc, yieldBranches=True, yieldHierarchy=True, nodeFilter=[c4d.CTbase]):
        track[c4d.ID_CTRACK_ANIMOFF] = not track[c4d.ID_CTRACK_ANIMOFF]

    c4d.EventAdd()


if __name__ == '__main__':
    main()
</code></pre>
]]></description><link>http://developers.maxon.net/forum/post/77312</link><guid isPermaLink="true">http://developers.maxon.net/forum/post/77312</guid><dc:creator><![CDATA[ferdinand]]></dc:creator><pubDate>Thu, 13 Aug 2026 11:18:39 GMT</pubDate></item><item><title><![CDATA[Reply to Disable all animation in document on Thu, 13 Aug 2026 06:33:11 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/forum/user/ceen">@<bdi>ceen</bdi></a> Hi, The Summary row mey only a UI aggregate; it is not a single CTrack that can be switched directly.<br />
To reproduce its Animation switch, collect the real CTrack objects and set their  <code>c4d.ID_CTRACK_ANIMOFF</code>  value:</p>
<pre><code class="language-python"># True = animation enabled, False = animation disabled
track[c4d.ID_CTRACK_ANIMOFF] = False
</code></pre>
<p dir="auto">This does not delete keyframes and does not hide Timeline rows. Do not use NBIT_TLx_HIDE for this, because those flags only hide rows in the Timeline.<br />
A complete document-wide solution must also traverse Motion Sources in  <code>doc.GetNLARoot()</code> .  <code>Add Motion Source</code>  moves/copies animation into that separate NLA hierarchy, so iterating only normal scene objects and tags will miss tracks such as Time and 2D Tracks.</p>
<p dir="auto">It should be noted that <code>doc.GetNLARoot()</code> is marked as <code>Private</code> in the SDK, and I'm not sure whether it should be used.</p>
<pre><code class="language-python">"""Toggle the Summary Animation switch for all collected CTracks."""

import c4d


def iter_nodes(node):
    while node:
        yield node
        yield from iter_nodes(node.GetDown())
        node = node.GetNext()


def main():
    doc = c4d.documents.GetActiveDocument()
    tracks, seen = [], set()

    def add_tracks(owner):
        for track in (owner.GetCTracks() or []) if owner else []:
            if id(track) not in seen:
                seen.add(id(track))
                tracks.append(track)

    def add_tree(root, include_tags=False):
        for node in iter_nodes(root):
            add_tracks(node)
            if include_tags:
                for tag in node.GetTags() or []:
                    add_tracks(tag)

    add_tracks(doc)
    add_tree(doc.GetFirstObject(), include_tags=True)

    material = doc.GetFirstMaterial()
    while material:
        add_tracks(material)
        add_tree(material.GetFirstShader())
        material = material.GetNext()

    render_data = doc.GetFirstRenderData()
    while render_data:
        add_tracks(render_data)
        video_post = render_data.GetFirstVideoPost()
        while video_post:
            add_tracks(video_post)
            video_post = video_post.GetNext()
        render_data = render_data.GetNext()

    layer_root = doc.GetLayerObjectRoot()
    add_tree(layer_root.GetDown() if layer_root else None)

    # Private API, but required for Add Motion Source tracks in C4D 2026.
    add_tree(doc.GetNLARoot().GetDown(), include_tags=True)

    enabled = any(track[c4d.ID_CTRACK_ANIMOFF] for track in tracks)
    for track in tracks:
        track[c4d.ID_CTRACK_ANIMOFF] = not enabled
    c4d.EventAdd()


if __name__ == "__main__":
    main()
</code></pre>
<p dir="auto">Cheers,<br />
Anlv</p>
]]></description><link>http://developers.maxon.net/forum/post/77311</link><guid isPermaLink="true">http://developers.maxon.net/forum/post/77311</guid><dc:creator><![CDATA[Anlv]]></dc:creator><pubDate>Thu, 13 Aug 2026 06:33:11 GMT</pubDate></item></channel></rss>