Image file caching

It seems that DAZ Studio will cache image file information at some point (for sure during rendering), and "source" Image file updates that happen "behind the scenes" do not take effect until DAZ Studio is restarted. Seemingly this caching is by filename. Changing the property filename will cause the Image file to be re-evaluated.

Is there a way to tell DAZ Studio to re-assess the Image files so the changes take effect?

In my specific example, there are images which are referenced by DzColorProperty objects, and the underlying image file, when changed, does not take effect. A change to the file name does take effect.

I am ok with commands that would either "re-assess all images" or "re-assess these specific images".

Thus far, I have tried:

App.getImageMgr().autoRefreshChanged(true);App.getImageMgr().prepareAllImages(App.getRenderMgr().getActiveRenderer());

to no avail.

Any ideas?

Comments

  • algovincianalgovincian Posts: 2,581

    Maybe this?

    void DzImageMgr::refresh    (         )     
    Reloads any images whose source files have changed

    I believe you may be able to do it for a specific texture, too:

    void DzTexture::refresh    (         )     
    Reloads the image if its source file has changed

    - Greg

  • hphoenixhphoenix Posts: 1,335

    During some earlier work, I discovered that there are two different ways that have to be used to properly update textures, depending on exactly what kind of property they apply to.  Change it the wrong way, and you won't get errors, but the image won't update.

    Check out the next to last post in this thread:  http://www.daz3d.com/forums/discussion/91931/setting-a-dzimageproperty-value-to-a-new-dztexture-solved#latest

     

  • djigneodjigneo Posts: 283

    @algovincian DzImageMgr:refresh() looks promising. Thanks, I'll try it out.

    @hphoenix the issue I'm experiencing doesn't have to do with setting a property to a new filename. That part works in my script. The issue is that once a filename is used, changes to that same image file (if for example it gets overwritten) don't take effect until a DAZ Studio restart.

Sign In or Register to comment.