Changeset View
Changeset View
Standalone View
Standalone View
release/scripts/startup/bl_operators/wm.py
| Show First 20 Lines • Show All 92 Lines • ▼ Show 20 Lines | return (isinstance(id_data, bpy.types.ID) and | ||||
| bpy.types.Brush, | bpy.types.Brush, | ||||
| )))) | )))) | ||||
| def operator_path_is_undo(context, data_path): | def operator_path_is_undo(context, data_path): | ||||
| # note that if we have data paths that use strings this could fail | # note that if we have data paths that use strings this could fail | ||||
| # luckily we don't do this! | # luckily we don't do this! | ||||
| # | # | ||||
| # When we cant find the data owner assume no undo is needed. | # When we can't find the data owner assume no undo is needed. | ||||
| data_path_head = data_path.rpartition(".")[0] | data_path_head = data_path.rpartition(".")[0] | ||||
| if not data_path_head: | if not data_path_head: | ||||
| return False | return False | ||||
| value = context_path_validate(context, data_path_head) | value = context_path_validate(context, data_path_head) | ||||
| return operator_value_is_undo(value) | return operator_value_is_undo(value) | ||||
| ▲ Show 20 Lines • Show All 2,285 Lines • Show Last 20 Lines | |||||