Prevent material preview update
-
Hi there,
is it possible to prevent rendering/update of the material preview of a standard c4d material?
I know it's possible for redshift materials in the preferences .. but I found nothing similar for standard c4d materials.why I want to do this:
I need some visual feedback while working in the editor window. So when two objects are in a special constellation, the material turns red (it will be more complex with the final plugin). Currently I use a python tag to check the conditions and update the material. This works fine so far.
Now when the condition is met and the material is set to red, the rendering of the material preview is triggered. This rendering interrupts my dragging motion of the selected object and freezes the viewport for the time of the rendering. Once it has finished the viewport is updated again and shows the object at the correct position of the mouse. The rendering only takes about 1 sec, but it is an irritating interruption - even more when it occurs multiple times while dragging the object. So I'd like to prevent this.
For now my only idea is to prevent the material updates, but I'm open to other suggestions.
Another solution might be to have two separate materials and switch between the two. But ultimately I'd like to update a gradient shader (more or less continuously), so switshing is no option there.If needed, I can prepare a demo scene ...
cheers sebastian
-
Hello @datamilch,
Thank you for reaching out to us. No, that is not possible. You are here mostly asking for an end-user feature (to add an option in the preferences) which is out of scope of support for SDK. I agree that this would be useful, but we cannot help you with that. Please use our Support Center to express end-user feature wishes.
In the API, the only way to do this would be to set a parameter without incrementing the data dirty counter of an atom so that it will not update. Doing this is not possible at the moment.
Cheers,
Ferdinand -
hi @ferdinand,
thanks for the information.
found a workaround, that is good enough so far. I use the 3d-gradient in texture space and transform the texture tag matrix as I need it. the change in color will not occur that often.