Just tried your code (pure copy and paste) in both nuke 8 and 9(windows),
and it removed the CCs and TSs, but not the dot..
Maybe some incompatibility with some other plugin?
On 21 Jun 2015 18:34, "Mads Lund" <madshl...@gmail.com> wrote:

> I have a custom function that i want to be able to undo.
> If you run the following code:
>
> If you add a node, like a dot,
> run the following code:
>
> nuke.Undo.name("test python")
>
> nuke.Undo.begin()
>
> for i in range(0,5):
>
>     nuke.createNode("ColorCorrect","name CC_%s" % i,False)
>
>     nuke.createNode("Transform","name TS_%s" % i,False)
>
> nuke.Undo.end()
>
>
> hit CTRL+Z it will remove the nodes created AND the dot, so the
> "nuke.Undo" function does nothing.
>
>
>
>
>
>
>
> On Sun, Jun 21, 2015 at 12:28 PM, Erwan Leroy <er...@erwanleroy.com>
> wrote:
>
>> What are you trying to achieve with nuke.undo()?
>> It works perfectly as intended for me. (It does the same as pressing
>> ctrl+z)
>> On 21 Jun 2015 18:24, "Mads Lund" <madshl...@gmail.com> wrote:
>>
>>> I can see serval posts regarding this on the forums going back all the
>>> way to around 2011 but i still can't seem to get nuke.Undo() to work as
>>> intended.
>>>
>>> Have this still not been fixed?
>>>
>>> _______________________________________________
>>> Nuke-python mailing list
>>> Nuke-python@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/
>>> http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python
>>>
>>>
>> _______________________________________________
>> Nuke-python mailing list
>> Nuke-python@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/
>> http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python
>>
>>
>
> _______________________________________________
> Nuke-python mailing list
> Nuke-python@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/
> http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python
>
>
_______________________________________________
Nuke-python mailing list
Nuke-python@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python

Reply via email to