samytichadou / Auto_Reload_Blender_addon

Handy automatic reload for Image Textures
429 stars 25 forks source link

Not realoding every mg file #13

Closed Kubanis closed 3 years ago

Kubanis commented 3 years ago

Hi, this is an amazing plugin - making my life easier - thank you for that. But it's not realoading all the image files - for example: If I do displacement modifier with image attached for displace - it won't refresh it after change...

Do you plan to update it?

samytichadou commented 3 years ago

thanks for reporting (and for the kind words) I'm working on it right now, check for next version in a few days

samytichadou commented 3 years ago

should be resolved in the v2 of the addon (no release yet, master branch)

Kubanis commented 3 years ago

Thank you for letting me know - I can't wait to get the new version with it :)

samytichadou commented 3 years ago

V2 is released, you can download it from the release page or the master branch page! Cheers!

Kubanis commented 3 years ago

Thank you - it works! :)

Kubanis commented 3 years ago

I really appreciate to option to reload libraries (linked objects)... is it possible o autoreload them after change as well? And if not - do you plan to include this option in the new version?

samytichadou commented 3 years ago

Hey thanks for the feedback !

Nope this will not be supported i think : the autoreload of libraries can cause some crashes because of the complexity of the operation (for example for a rigged character).

The addon sometimes reload twice an item because the file is being modified, for example, if you export a big texture from gimp, the export time can be superior to the timer frequency of autoreload. So the addon detects a change in the file, reload it, then another reload it...

I don't have a workaround for that except increase the timer frequency, which has some drawbacks too. And this limitation added to the complexity of a reload lib operation causes crashes 1 out of 3 or 4 times.

So for now, i prefer the stability over the comfort of automatically reload a library. But if you have some hints to prevent these crashes (segmentation error most of the times), don't hesitate :)

Cheers !

Kubanis commented 3 years ago

I understand your concern and you right it's better to leave it without this option for these reasons. The most user friendly solution, which would not make it crash, which I could imagine, would be this.

The autoreload for links make sense only when you working with 2 blenders open in the same time. Which is pretty convenient way of working, because in one you have heavy scene with your linked asset and in second session you are only adjusting your asset and just want to see a propagation of your change in the first blender session (imagine for axample, you have the "scene" blender on one second screen to see the changes...) The biggest paint it's actually switching one blender for a second blender, find and hit the reload buttons. So, no need for autoreload if there would be a button which would allow you to stay in you current blender session without a need to leave.

You would hit abutton and this would basically happen:

  1. It would save a file
  2. It would target all open blender sessions in bg and simple just reload the particular link

And that's it - with this you could add a hotkey for this button - for example ctrl+alt+s or something like this and you would hit it every time you would like to see your change propagated everywhere without the pain to leave.

What do you think about that?

samytichadou commented 3 years ago

Thanks for the suggestion ! I get what you mean, but the python side of getting all working process, filtering them to find blender instances, and force a command in it seems rather complicated (at least to me). And what if one of those instances is hanging (baking or something), this would raise an error, or miss the update. Furthermore, the code wouldn't be cross platform i think, so seems to me a lot of work for now giving my amount of free time ^^ But the "propagation" approach is definitely something to investigate. Maybe the recent asset manager module would solve these crashes by simplifying the reloading process of libraries, i'll have to take a serious look at it !

Kubanis commented 3 years ago

Thx - I wish you good luck :)