1
$\begingroup$

Try this:

  1. Manually set checkbox "Denoising Data" on
  2. Log shows bpy.context.scene.denoising_store_passes = True
  3. Copypaste exactly that into console and hit enter
  4. Throws AttributeError: 'Scene' object has no attribute 'denoising_store_passes'

Same with i.e. cryptomatte. Am i doing anything wrong or is this simply not supported yet?

$\endgroup$
4
$\begingroup$

The Python tooltips are currently a bit broken for property groups, which also affects the commands displayed in the Info area.

The correct command for setting this option for the current view layer is:

bpy.context.view_layer.cycles.denoising_store_passes = True

If you want to refer to the scene and view layer by name:

bpy.data.scenes['Scene'].view_layers['View Layer'].cycles.denoising_store_passes = True

Whenever you see a Python tooltip with an ellipsis (...) the command in the Info area is inaccurate.

Example tooltip

The issue is known and reported in T69803.

$\endgroup$
  • $\begingroup$ Thanks, Robert! Works like a charm. $\endgroup$ – Axel Dec 13 '19 at 11:58
3
$\begingroup$

The type is shown.

In addition to RJG's answer can always see the registered type bpy.types.Foo in this example Foo is CyclesRenderLayerSettings. The scene context.scene is Scene type (the context of the error message in question, whereas) scene.cycles is CyclesRenderLayerSettings type.

Searching the docs on type

https://docs.blender.org/api/blender2.8/search.html?q=cyclesrendersettings&check_keywords=yes&area=default

We see it hits both the Scene and Object types. Scene is the choice here and

https://docs.blender.org/api/blender2.8/bpy.types.Scene.html?highlight=cyclesrendersettings#bpy.types.Scene.cycles

points us to scene.cycles. A quick trip to the python console to confirm and Bob's your uncle.

Edit: on closer inspection needed to be the viewlayer settings, but more often than not it points one in the right direction.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.