Skip to content

Commit

Permalink
Suppress useless property saving
Browse files Browse the repository at this point in the history
  • Loading branch information
UuuNyaa committed Dec 29, 2021
1 parent f18a22b commit 6c2dcb1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions mmd_tools/properties/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,12 @@ def __patch(properties): # temporary patching, should be removed in the future
prop_obj['select'] = bpy.props.BoolProperty(
get=lambda prop: prop.select_get(),
set=lambda prop, value: prop.select_set(value),
options={'SKIP_SAVE', 'ANIMATABLE', 'LIBRARY_EDITABLE', },
)
prop_obj['hide'] = bpy.props.BoolProperty(
get=lambda prop: prop.hide_get(),
set=lambda prop, value: prop.hide_set(value) or setattr(prop, 'hide_viewport', False),
options={'SKIP_SAVE', 'ANIMATABLE', 'LIBRARY_EDITABLE', },
)

if bpy.app.version >= (2, 80, 0):
Expand Down

0 comments on commit 6c2dcb1

Please sign in to comment.