Hi Erwan,

It's definitely a bug that Nuke crashes, however, you can't set an expression 
on the motionblur_shutter_offset_type knob because it's not possible to animate 
that knob.  You can set a single value on the knob instead:

r = nuke.toNode('Roto1')
k = r['motionblur_shutter_offset_type']
k.setValue('2')
print k.value()

Does that do what you want?

Thanks,  Ben


On 26 Jul 2015, at 07:51, Erwan Leroy wrote:

> Hello,
> 
> I was trying to expression link the motion_blur properties of a Roto shape's 
> motion blur and kept encountering crashes.
> I simplified my setup to the extreme and the crash still happens.
> 
> Procedure:
> Create a Roto node.
> In it, create a random shape.
> Select that shape.
> 
> In the script editor type:
> r = nuke.toNode('Roto1')
> k = r['feather_type']
> k.setExpression('2')
> 
> This works and sets the enumeration pulldown to index2, which is smooth1
> r = nuke.toNode('Roto1')
> k = r['feather_type']
> print k.value()
> # Result: smooth1
> 
> Now if I try on motionblur_shutter_offset_type: (value first, to check I can 
> access the knob)
> r = nuke.toNode('Roto1')
> k = r['motionblur_shutter_offset_type']
> print k.value()
> # Result: centred
> 
> No problems so far.
> Let's try setting the expression:
> r = nuke.toNode('Roto1')
> k = r['motionblur_shutter_offset_type']
> print k.setExpression('2')
> 
> Crash
> 
> I'm on windows 8.1, using nuke 9.0v5
> 
> Am I doing anything wrong or is that a bug?
> 
> 
> Thanks,
> 
> Erwan LEROY
> www.erwanleroy.com
> _______________________________________________
> 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

-- 
Ben Woodhall
Software Engineer
The Foundry Visionmongers Ltd 
5 Golden Square
London, W1F 9HT
Tel: +44(0)20 7473 4350
Web: www.thefoundry.co.uk
Email: ben.woodh...@thefoundry.co.uk

The Foundry Visionmongers Ltd.
Registered in England and Wales No: 4642027




_______________________________________________
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