Fix: USD hooks leak
If hooks are not unregistered Blender will report a leak on exit. Store the hooks as unique_ptrs to remove manual memory management and encapsulate the previous global list inside a function. These changes ensure that everything is cleaned up on termination. Also makes a small change to the hook documentation for a missing `import` statement. Pull Request: https://projects.blender.org/blender/blender/pulls/118294
This commit is contained in:
committed by
Jesse Yurkovich
parent
401a2397db
commit
9e8bbc1129
@@ -55,6 +55,7 @@ import pxr.Gf as Gf
|
||||
import pxr.Sdf as Sdf
|
||||
import pxr.Usd as Usd
|
||||
import pxr.UsdShade as UsdShade
|
||||
import textwrap
|
||||
|
||||
|
||||
class USDHookExample(bpy.types.USDHook):
|
||||
|
||||
Reference in New Issue
Block a user