Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tx Manger - remove unused textures #627

Open
TzurH opened this issue Sep 28, 2021 · 7 comments
Open

Tx Manger - remove unused textures #627

TzurH opened this issue Sep 28, 2021 · 7 comments

Comments

@TzurH
Copy link

TzurH commented Sep 28, 2021

I think it would be great to have a 'remove unused' textures button. The Tx Manager UI can get quite cluttered without this.

Similar functionality to the "Reset" button, but without clearing the user's manual rules.

@prman-pixar
Copy link
Owner

@TzurH can you give me some steps to follow to get it into a state where there are unused textures in the manager? Right now, I can't get it into that state.

@TzurH
Copy link
Author

TzurH commented Sep 29, 2021

Hmm, I'm not sure how it happened to be honest. If I come across it again, I'll report here.

@prman-pixar
Copy link
Owner

@TzurH I added a button to do this. Let me know if it works or not.

@TzurH
Copy link
Author

TzurH commented Nov 11, 2021

I get the following error when I try it.

Python: Traceback (most recent call last):
  File "C:\Users\zurho\AppData\Roaming\Blender Foundation\Blender\2.93\scripts\addons\RenderManForBlender-main\rman_ui\rman_ui_txmanager.py", line 249, in execute
    if getattr(node, param) != item.name:
AttributeError: 'NoneType' object has no attribute 'filename'

location: <unknown location>:-1

I have loaded .tex textures just so they're loaded into texture manager, then I've replaced those with the .exr files.

prman-pixar pushed a commit that referenced this issue Nov 11, 2021
Double check the node returned is not None.
@prman-pixar
Copy link
Owner

@TzurH Can you see if the latest commit fixes the problem?

@TzurH
Copy link
Author

TzurH commented Nov 12, 2021

@prman-pixar I no longer get an error, but the unused textured aren't getting cleared from the tx manager.

maybe I'm not using it properly?

started a new scene
added a cube
add pxrSurface material to the cube
load in a few textures using PxrTexture nodes
delete a few textures from the material - they are still loaded in tx manager
hit the clear unused button - nothing happens. unused textures are still in tx manager

@prman-pixar
Copy link
Owner

@TzurH OK, good to know. I think this is also related to GitHub #638. The IDs just aren't unique enough, so I'll have to come up with a workaround.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants