# Missing call to ChangeQueue.ApplyMaterialChanges

**URL:** <https://discourse.mcneel.com/t/missing-call-to-changequeue-applymaterialchanges/43730>\
**Category:** Developer\
**Created:** [May 2, 2017, 12:42pm UTC](https://discourse.mcneel.com/t/missing-call-to-changequeue-applymaterialchanges/43730 "2017-05-02T12:42:42Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![CarstenW](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/carstenw/32/63916_2.png) [@CarstenW](https://discourse.mcneel.com/u/CarstenW)\
**Post date:** [May 2, 2017, 12:42pm UTC](https://discourse.mcneel.com/t/missing-call-to-changequeue-applymaterialchanges/43730/1 "2017-05-02T12:42:42Z")

</div>

When we apply a material to the selection after our render has converged, the call to ChangeQueue.ApplyMaterialChanges is missing, and gets delayed until the next scene change takes place, like navigation.

The same happens in Cycles when we assign MDL materials (which we do translate, so we see the difference), but when I assign regular Rhino materials to the selected objects, Cycles does restart, so it seems related to the way we assign materials.

Can you think of anything we might handle incorrectly to cause this? @nathanletwory @andy

We make this call to attach the material:

`Rhino.RhinoDoc.ActiveDoc.Objects.ModifyRenderMaterial(obj, material);`

---

<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:** [May 3, 2017, 8:13am UTC](https://discourse.mcneel.com/t/missing-call-to-changequeue-applymaterialchanges/43730/4 "2017-05-03T08:13:43Z")

</div>

> [@CarstenW](#):
>
> Can you think of anything we might handle incorrectly to cause this?

We don’t know yet, but we’re investigating.

---

<div class="post-metadata">

**Author:** ![CarstenW](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/carstenw/32/63916_2.png) [@CarstenW](https://discourse.mcneel.com/u/CarstenW)\
**Post date:** [May 3, 2017, 8:26am UTC](https://discourse.mcneel.com/t/missing-call-to-changequeue-applymaterialchanges/43730/5 "2017-05-03T08:26:29Z")

</div>

While on the topic of material assignment, in your material pane, there is a right-click menu for the material list which contains some nice items, which we would love to reuse in the MDL Browser, if possible. They do not seem to correspond to commands, unfortunately. Is there some way to hook into this?

---

<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:** [May 3, 2017, 8:28am UTC](https://discourse.mcneel.com/t/missing-call-to-changequeue-applymaterialchanges/43730/6 "2017-05-03T08:28:43Z")

</div>

You mean you want to re-use the context menu?

---

<div class="post-metadata">

**Author:** ![CarstenW](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/carstenw/32/63916_2.png) [@CarstenW](https://discourse.mcneel.com/u/CarstenW)\
**Post date:** [May 3, 2017, 9:02am UTC](https://discourse.mcneel.com/t/missing-call-to-changequeue-applymaterialchanges/43730/7 "2017-05-03T09:02:39Z")

</div>

Yes, or at least the first few entries. Is there a way?

---

<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:** [May 3, 2017, 9:18am UTC](https://discourse.mcneel.com/t/missing-call-to-changequeue-applymaterialchanges/43730/8 "2017-05-03T09:18:06Z")

</div>

> [@CarstenW](#):
>
> Yes, or at least the first few entries. Is there a way?

My understanding is that we’ll have to show how to do that. I think @andy knows best this area.

---

<div class="post-metadata">

**Author:** ![nvp](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/nvp/32/66478_2.png) [@nvp](https://discourse.mcneel.com/u/nvp)\
**Post date:** [May 9, 2017, 9:34am UTC](https://discourse.mcneel.com/t/missing-call-to-changequeue-applymaterialchanges/43730/11 "2017-05-09T09:34:08Z")

</div>

Regarding the missing notification @andy logged: [https://mcneel.myjetbrains.com/youtrack/issue/RH-39242](https://mcneel.myjetbrains.com/youtrack/issue/RH-39242)

---

<div class="post-metadata">

**Author:** ![CarstenW](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/carstenw/32/63916_2.png) [@CarstenW](https://discourse.mcneel.com/u/CarstenW)\
**Post date:** [May 9, 2017, 10:09am UTC](https://discourse.mcneel.com/t/missing-call-to-changequeue-applymaterialchanges/43730/12 "2017-05-09T10:09:09Z")

</div>

Thanks.

---

<div class="post-metadata">

**Author:** ![andy](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/andy/32/110490_2.png) [@andy](https://discourse.mcneel.com/u/andy)\
**Post date:** [May 18, 2017, 12:58pm UTC](https://discourse.mcneel.com/t/missing-call-to-changequeue-applymaterialchanges/43730/13 "2017-05-18T12:58:08Z")

</div>

Carsten

I’m going to need a build of IRay to test this.

- Andy

---

<div class="post-metadata">

**Author:** ![nvp](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/nvp/32/66478_2.png) [@nvp](https://discourse.mcneel.com/u/nvp)\
**Post date:** [May 19, 2017, 8:15am UTC](https://discourse.mcneel.com/t/missing-call-to-changequeue-applymaterialchanges/43730/14 "2017-05-19T08:15:31Z")

</div>

@Andy

I updated GitHub as well  
[https://github.com/mcneel/MDL-for-Rhino](https://github.com/mcneel/MDL-for-Rhino)

Thx  
Pascal

---

<div class="post-metadata">

**Author:** ![CarstenW](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/carstenw/32/63916_2.png) [@CarstenW](https://discourse.mcneel.com/u/CarstenW)\
**Post date:** [May 22, 2017, 9:16am UTC](https://discourse.mcneel.com/t/missing-call-to-changequeue-applymaterialchanges/43730/15 "2017-05-22T09:16:42Z")

</div>

Did you get my message with the link, btw @andy?

---

<div class="post-metadata">

**Author:** ![andy](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/andy/32/110490_2.png) [@andy](https://discourse.mcneel.com/u/andy)\
**Post date:** [May 26, 2017, 7:06am UTC](https://discourse.mcneel.com/t/missing-call-to-changequeue-applymaterialchanges/43730/16 "2017-05-26T07:06:13Z")

</div>

Carsten

I can’t repeat this. It must be very specific to your workflow - so I’m going to need exact steps to repeat this.

- Andy
