Community
Arnold for Cinema 4D Forum
Rendering with Arnold in CINEMA 4D using the C4DtoA plug-in.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Button for simple refresh if IPR is not automatically updating

23 REPLIES 23
Reply
Message 1 of 24
f.ribbeck
1459 Views, 23 Replies

Button for simple refresh if IPR is not automatically updating

Hi!

I am sometimes running into the problem that the IPR window loses connection to changes that I do (mostly when I move sliders in the network editor). That means to refresh and see the change I either have to move the camera, restart or pause/unpause the IPR or click on the reload textures button.

It would be really nice if there was a simple button that would just refresh the scene without reloading textures or restarting since this might take a while to start up on a complex scene. Or am I missing a feature/ simple script that can do that?


Tags (3)
Labels (3)
23 REPLIES 23
Message 2 of 24
lee_griggs
in reply to: f.ribbeck

Which attributes/sliders aren't updating?

Lee Griggs
Arnold rendering specialist
AUTODESK
Message 3 of 24

There could be two situations when the IPR does not update:

1) The logic in the plugin is wrong and does not detect the scene change. In this case a simple update won't help, only re-exporting (e.g. IPR restart or force an update of the specific object).

2) Cinema 4D does not notify the plugin about the change.

From your description, it seems like you are facing 2), which in theory must not happen, thus it sounds like a bug to me. I wonder how often does it happen and if it's reproducible or random.

Here's a simple script which triggers an IPR update:

import c4d

def main():
    c4d.EventAdd()

if __name__=='__main__':
    main()
Message 4 of 24
f.ribbeck
in reply to: f.ribbeck

Thank you for the script, i will probably make a custom button out of it to put in the IPR.

I actually encounter the situation of IPR link loss rather often for some tasks. Usually it's losing connection to the network editor but if I move the camera the IPR still updates. The attributes I'm updating are mostly very basic, either within the standard surface shader settings or within a color correct node. I do utilize some plugins, maybe one of them could possibly trigger that behavior?


Message 5 of 24
f.ribbeck
in reply to: f.ribbeck

I just tried to replicate the issue and was able to do so immediately without doing anything special. So I guess it's probably a concflict with my installation/ plugins/ scripts?

Message 6 of 24

You can try what happens when no other plugins are installed, but I'm not sure it's a conflict issue. I'll ask around if anyone else experienced similar issues. Just to clarify, do you change a value by a slider when it happens, right? Is it a color or a numeric value or does not matter? What if you type the number instead of using the slider? And finally, what's your Cinema 4D and C4DtoA version and which OS do you use (win or mac)?

Message 7 of 24

I am using R21.207, the C4DtoA 3.0.3.1 build and Windows 10. It does not seem to matter if it's a color or numeric value and typing in the number also makes no difference. What I noticed is that the material in the material manager flickers shortly when I update something in the network editor, but it doesn't update, neither does the IPR.

Message 8 of 24
f.ribbeck
in reply to: f.ribbeck

I just disabled all plugins except for Arnold and it seems that it still doesn' work correctly

Message 9 of 24
f.ribbeck
in reply to: f.ribbeck

The script does not seem to have an effect on my IPR, could you please check the attached screenshot if the script is set up correctly? 7115-iprrefreshscript.png

Message 10 of 24

Yes, that should do it. Maybe the problem is more complex. I'll try to reproduce it on my end.

You can try this script as well, although I'm not really expecting it to work in your case. It calls IPR update directly, without performing a scene check, so it won't do anything if there are no changes detected.

import c4d

ARNOLD_RENDER_COMMAND = 1038578

def main():
   # call IPR update
   c4d.CallCommand(ARNOLD_RENDER_COMMAND, 4)

if __name__=='__main__':
    main() 
Message 11 of 24

Or you can try this, which emulates a pause & unpause.

import c4d

ARNOLD_RENDER_COMMAND = 1038578

def main():
   # pause
   c4d.CallCommand(ARNOLD_RENDER_COMMAND, 3)
   # unpause
   c4d.CallCommand(ARNOLD_RENDER_COMMAND, 3)

if __name__=='__main__':
    main()
Message 12 of 24

Thanks, this one actually works for me:


  1. import c4d
  2. ARNOLD_RENDER_COMMAND = 1038578
  3. def main():
  4. # call IPR update
  5. c4d.CallCommand(ARNOLD_RENDER_COMMAND, 4)
  6. if __name__=='__main__':
  7. main()
Message 13 of 24

Hmm, that means the plugin is notified about the change, but does not rerender, or which is more likely, does not draw the output to the window. Can you test what happens if you just change the Zoom in the IPR window after it loses connection. If it updates, then it's an issue of drawing to the window.

I know for instance, if you keep the mouse button down on a slider or keep a combo box open, it blocks the application and the gui does not refresh, until you release the mouse.

Also drawing is attached to the viewport, so for instance if you hide the viewport, the IPR won't refresh.

Message 14 of 24

Oh the problem is the hidden viewport then. I have my Network editor as a tab next to my view window, so when I change to the editor, my view panel switches to the editor tab, and thus hides the view -

I just tried to open the network editor as a seperate window and now the IPR is updating properly again when changing the sliders. Thank you very much for your help, I will have to find another place for the editor in my UI.

Message 15 of 24

Glad we could find the source of the issue. I'll also take another look if I can make the IPR refresh even if the viewport is hidden, but unfortunately so far I could not find a good solution.

Message 16 of 24
leandro.cattani
in reply to: f.ribbeck

Hello!

I have the same problem. We talked about it in this post
https://answers.arnoldrenderer.com/questions/19610/ipr-has-a-slow-refresh-on-parameter-changes.html
Thank you!

Message 17 of 24

Is it the same issue? In that thread you said your viewport is open, but is it actually visible while you edit the scene? If not, then yes, the IPR does not update because of the viewport is hidden.

Message 18 of 24

Yes that would be great. For now your script also helps a lot. I think I may just settle with using it instead of changing my UI - when working with complex node systems I like to have a lot of space for the network editor

Message 19 of 24
leandro.cattani
in reply to: f.ribbeck

I forget to mention the script works well!

Message 20 of 24

I think I have found a possible workaround. If you have a valid license with maintenance and want to test it, please contact support(at)arnoldrenderer(dot)com and I send you a build.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report