<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic (BUG) clipSchedule() function is not returning correct values. in Maya Programming Forum</title>
    <link>https://forums.autodesk.com/t5/maya-programming-forum/bug-clipschedule-function-is-not-returning-correct-values/m-p/10246093#M4389</link>
    <description>&lt;P&gt;&lt;SPAN style="font-family: inherit; font-size: 16px; background-color: #ffffff; color: #666666; white-space: normal;"&gt;The following example is from the official clipSchedule documentation found &lt;A href="https://help.autodesk.com/cloudhelp/2019/ENU/Maya-Tech-Docs/CommandsPython/clipSchedule.html#flagclipIndex" target="_blank" rel="noopener"&gt;here&lt;/A&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;# Query the clip index of the latest instance of handWave. Each instance
# of a clip received a unique clipIndex. The clip index is used to
# edit and query data for existing clips.
#
cmds.clipSchedule( 'armScheduler1', name='handWave1', query=True, ci=True )&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This does not return the clip index of 'handWave1', and instead will always return the clip scheduled at index[1], due to the True statement in the clip index parameter.&lt;BR /&gt;&lt;BR /&gt;This is not the described or desired behavior.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Here is additional code for testing on any character that has more than 1 animation scheduled.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;character = mel.eval("currentCharacters")
scheduler = cmds.character(character, query=True, scheduler=True)
selection = cmds.ls(selection=True, long=True)
clipIndex = cmds.clipSchedule(scheduler, name=selection, query=True, ci=True)

# result = The name of the clip at index [1], not the index for the clip name that was given.&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 17 Apr 2021 03:29:43 GMT</pubDate>
    <dc:creator>admin1</dc:creator>
    <dc:date>2021-04-17T03:29:43Z</dc:date>
    <item>
      <title>(BUG) clipSchedule() function is not returning correct values.</title>
      <link>https://forums.autodesk.com/t5/maya-programming-forum/bug-clipschedule-function-is-not-returning-correct-values/m-p/10246093#M4389</link>
      <description>&lt;P&gt;&lt;SPAN style="font-family: inherit; font-size: 16px; background-color: #ffffff; color: #666666; white-space: normal;"&gt;The following example is from the official clipSchedule documentation found &lt;A href="https://help.autodesk.com/cloudhelp/2019/ENU/Maya-Tech-Docs/CommandsPython/clipSchedule.html#flagclipIndex" target="_blank" rel="noopener"&gt;here&lt;/A&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;# Query the clip index of the latest instance of handWave. Each instance
# of a clip received a unique clipIndex. The clip index is used to
# edit and query data for existing clips.
#
cmds.clipSchedule( 'armScheduler1', name='handWave1', query=True, ci=True )&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This does not return the clip index of 'handWave1', and instead will always return the clip scheduled at index[1], due to the True statement in the clip index parameter.&lt;BR /&gt;&lt;BR /&gt;This is not the described or desired behavior.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Here is additional code for testing on any character that has more than 1 animation scheduled.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;character = mel.eval("currentCharacters")
scheduler = cmds.character(character, query=True, scheduler=True)
selection = cmds.ls(selection=True, long=True)
clipIndex = cmds.clipSchedule(scheduler, name=selection, query=True, ci=True)

# result = The name of the clip at index [1], not the index for the clip name that was given.&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 17 Apr 2021 03:29:43 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/maya-programming-forum/bug-clipschedule-function-is-not-returning-correct-values/m-p/10246093#M4389</guid>
      <dc:creator>admin1</dc:creator>
      <dc:date>2021-04-17T03:29:43Z</dc:date>
    </item>
  </channel>
</rss>

