# Cycles Raytraced mode Enable/Disable Shadow

**URL:** <https://discourse.mcneel.com/t/cycles-raytraced-mode-enable-disable-shadow/54990>\
**Category:** Rhino Developer\
**Created:** [February 10, 2018, 11:49am UTC](https://discourse.mcneel.com/t/cycles-raytraced-mode-enable-disable-shadow/54990 "2018-02-10T11:49:49Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![henrydm](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/henrydm/32/78092_2.png) [@henrydm](https://discourse.mcneel.com/u/henrydm)\
**Post date:** [February 10, 2018, 11:49am UTC](https://discourse.mcneel.com/t/cycles-raytraced-mode-enable-disable-shadow/54990/1 "2018-02-10T11:49:49Z")

</div>

Hello,

Do you know if is there any way to enable/disable shadow in raytraced mode by code?

 ![image](https://global.discourse-cdn.com/mcneel/uploads/default/original/3X/e/9/e9f1b78adcb20c2118427167a72853a2c845fd11.jpg)  
 ![image](https://global.discourse-cdn.com/mcneel/uploads/default/original/3X/9/c/9c01903f2e61def4b94956dd38536a79c4a80d64.jpg)

Thanks and best regards

---

<div class="post-metadata">

**Author:** ![nathanletwory](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/nathanletwory/32/482880_2.png) [@nathanletwory](https://discourse.mcneel.com/u/nathanletwory)\
**Post date:** [February 10, 2018, 2:02pm UTC](https://discourse.mcneel.com/t/cycles-raytraced-mode-enable-disable-shadow/54990/2 "2018-02-10T14:02:37Z")

</div>

Apparently DisplayPipelineAttributes isn’t completely wrapping all possible settings. Casting of shadows is not available, and some others are missing too. I have logged [RH-44100](https://mcneel.myjetbrains.com/youtrack/issue/RH-44100) for this.

Note btw that you still see shadow generated by skylight, even though shadows are turned off. It is on my list to fix ([RH-38107](https://mcneel.myjetbrains.com/youtrack/issue/RH-38107)).

Access to [`DisplayPipelineAttributes`](http://developer.rhino3d.com/api/RhinoCommon/html/T_Rhino_Display_DisplayPipelineAttributes.htm) for Raytraced: use [`RaytracedId`](http://developer.rhino3d.com/api/RhinoCommon/html/P_Rhino_Display_DisplayModeDescription_RaytracedId.htm) as argument for [`GetDisplayMode`](http://developer.rhino3d.com/api/RhinoCommon/html/M_Rhino_Display_DisplayModeDescription_GetDisplayMode.htm), then use [`DisplayAttributes`](http://developer.rhino3d.com/api/RhinoCommon/html/P_Rhino_Display_DisplayModeDescription_DisplayAttributes.htm) on the `DisplayModeDescription` to get the [`DisplayPipelineAttributes`](http://developer.rhino3d.com/api/RhinoCommon/html/T_Rhino_Display_DisplayPipelineAttributes.htm)

/Nathan

---

<div class="post-metadata">

**Author:** ![henrydm](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/henrydm/32/78092_2.png) [@henrydm](https://discourse.mcneel.com/u/henrydm)\
**Post date:** [February 13, 2018, 7:42am UTC](https://discourse.mcneel.com/t/cycles-raytraced-mode-enable-disable-shadow/54990/3 "2018-02-13T07:42:24Z")

</div>

Ok Nathan, Thank you for let me know it!

Best Regards  
Enric
