SOLVED Plugin causes Render Region to turn black

Hello! We have an OBJECT_MODIFIER plugin which already works fine, but with one minor problem. When you enable render region, it's just black. The plugin modifies an object, but render region turns black the moment you add the plugin to a scene, even when it has no object to modify. Did someone encounter this before or has any clues where to look at in the code?

Hello @danchyg1337,

Thank you for reaching out to us. Your question is unfortunately not answerable in its current form as there can be dozens of reasons for why this is happening, and without a more precise description of the problem and source code we will only be guessing.

Questions

  • What does your modifier plugin do (in abstract terms)?
  • You list 21, 23 and 25 as versions, your problem occurs in all of them?
  • On which operating system have you tested this?
  • What happens when you render into the Picture Viewer or do an Editor Render (non-regioned)?
  • What is the content of your test scene; is there only one object affected by your plugin or are there multiple objects which all vanish in the render?

What you should provide

  • Executable code: Please keep in mind that you should isolate the problem to a reasonable degree first by removing methods/implementation details which do not affect the problem. As stated in our forum guidelines, we cannot debug code for our users. So, we are happy to help when you ask "why is x going wrong in this stretch of 300 lines of code", but we cannot do the same with you giving us a full code base. But at the same time stuff must be executable, so just providing one method snippet alone is not enough, it should be the full plugin, but with everything removed that is not necessary.
  • An example scene: Providing a repeatable test case will remove a lot of guess work for us.
  • If you cannot share your code publicly, you can do it also confidentially as lined out in the forum guidelines.

With that being said, there are two things I would check:

  • Your modifier plugin could flag itself constantly dirty, but that would be a bit of an offshot, as you would have to do something really odd for that in a modifier plugin. As for example overwrite one of its own parameters in ModifyObject. If this happens, the modifier will constantly restart the interactive renderer and by that cause the output region to never be filled.
  • Something document related: You should not rely on the active document in any node plugin and you also cannot modify the content of a document in one of its non-main-thread methods (be it the active document or one attached to a node passed into your plugin).

Cheers,
Ferdinand

Hello @danchyg1337,

Thank you for reaching out to us. Your question is unfortunately not answerable in its current form as there can be dozens of reasons for why this is happening, and without a more precise description of the problem and source code we will only be guessing.

Questions

  • What does your modifier plugin do (in abstract terms)?
  • You list 21, 23 and 25 as versions, your problem occurs in all of them?
  • On which operating system have you tested this?
  • What happens when you render into the Picture Viewer or do an Editor Render (non-regioned)?
  • What is the content of your test scene; is there only one object affected by your plugin or are there multiple objects which all vanish in the render?

What you should provide

  • Executable code: Please keep in mind that you should isolate the problem to a reasonable degree first by removing methods/implementation details which do not affect the problem. As stated in our forum guidelines, we cannot debug code for our users. So, we are happy to help when you ask "why is x going wrong in this stretch of 300 lines of code", but we cannot do the same with you giving us a full code base. But at the same time stuff must be executable, so just providing one method snippet alone is not enough, it should be the full plugin, but with everything removed that is not necessary.
  • An example scene: Providing a repeatable test case will remove a lot of guess work for us.
  • If you cannot share your code publicly, you can do it also confidentially as lined out in the forum guidelines.

With that being said, there are two things I would check:

  • Your modifier plugin could flag itself constantly dirty, but that would be a bit of an offshot, as you would have to do something really odd for that in a modifier plugin. As for example overwrite one of its own parameters in ModifyObject. If this happens, the modifier will constantly restart the interactive renderer and by that cause the output region to never be filled.
  • Something document related: You should not rely on the active document in any node plugin and you also cannot modify the content of a document in one of its non-main-thread methods (be it the active document or one attached to a node passed into your plugin).

Cheers,
Ferdinand

Hello! Sorry for not providing any specific info about the problem, it was not really aything to provide in fact. Your last guess about document related stuff is absolutely correct. There is a piece of code responsible for handling a license which was indeed using documents. Thanks!