On 15/12/2016 at 01:01, xxxxxxxx wrote:
Hello I would like to know if it's possible to catch the msg when a bitmap is reloaded / created / deleted
Here is my project. We currently have huge slow down when we use the texture manager from c4d(cause it's refresh every time you move it or you do something in the UI), and since we got a lot of relative texture path wich can be on a lot of directory.
It often just take 40/50s just to show up and as said at each move we have to rewait 40/50s wich is not possible for us.
So I firstly thinked about rebuilding the texture manager witout the auto refresh... (Don't know if it's the good place for c4d feature request but it should be really good to have an option for disallow this.)
Then I thinked about another way for removing extra time. Wich will be at each time user modifiate path / reload a Xbitmap it will search for the path and then add to an array.
Technically I thinked about using messageplugin to catch the event about the change on any xbitmap (but is there a way for knowing which BaseList2d invok the event?) and then create background thread for the search like that it will not freeze the ui.
Again I'm not sticky to python... But since I never really dealing with thread (even if I understand the concept I never have to handle them. So handle them in c++ afraid me a bit ^^)
Btw can you confirm me the order for checking texture are still this one
Originally posted by xxxxxxxx
suggestedfolder + srcname
- if srcname has a path, it tries to use it as is
- GetDocumentPath() and GetDocumentPath()/tex
- GeGetStartupWritePath() and GeGetStartupWritePath()/tex
- GeGetStartupPath() and GeGetStartupPath()/tex
- then all GetGlobalTexturePath() recursively
- and as if this wasn't enough, it checks for a NetRenderService context and runs through all assets using ConvertRelative2Absolute()
Thanks in advance !
Gonna look to the chrismas competition for a training about threading gonna be a good idea