Asset Pipeline: Use a weak ref for Asset Collection to improve performance #213
@ -167,7 +167,6 @@ class AssetPipeline(bpy.types.PropertyGroup):
|
||||
)
|
||||
|
||||
|
||||
@staticmethod
|
||||
@bpy.app.handlers.persistent
|
||||
def set_asset_collection_name_post_file_load(_):
|
||||
# Version the PointerProperty to the StringProperty, and the left-over pointer.
|
||||
@ -197,7 +196,7 @@ def register():
|
||||
bpy.types.ID.asset_id_surrender = bpy.props.BoolProperty(
|
||||
name="Surrender Ownership", default=False
|
||||
)
|
||||
bpy.app.handlers.load_post.append(AssetPipeline.set_asset_collection_name_post_file_load)
|
||||
bpy.app.handlers.load_post.append(set_asset_collection_name_post_file_load)
|
||||
|
||||
|
||||
def unregister():
|
||||
@ -206,4 +205,4 @@ def unregister():
|
||||
del bpy.types.Object.transfer_data_ownership
|
||||
del bpy.types.Scene.asset_pipeline
|
||||
del bpy.types.ID.asset_id_owner
|
||||
bpy.app.handlers.load_post.remove(AssetPipeline.set_asset_collection_name_post_file_load)
|
||||
bpy.app.handlers.load_post.remove(set_asset_collection_name_post_file_load)
|
||||
|
Loading…
Reference in New Issue
Block a user