forked from bartvdbraak/blender
Fix crash with recently added remove_on_cancel transform property, and hide this
property in the user interface.
This commit is contained in:
parent
5aeade4c60
commit
394efd85bd
@ -1106,7 +1106,8 @@ int initTransInfo(bContext *C, TransInfo *t, wmOperator *op, const wmEvent *even
|
||||
}
|
||||
|
||||
t->remove_on_cancel = false;
|
||||
if ((prop = RNA_struct_find_property(op->ptr, "remove_on_cancel")) && RNA_property_is_set(op->ptr, prop)) {
|
||||
|
||||
if (op && (prop = RNA_struct_find_property(op->ptr, "remove_on_cancel")) && RNA_property_is_set(op->ptr, prop)) {
|
||||
if (RNA_property_boolean_get(op->ptr, prop)) {
|
||||
t->remove_on_cancel = true;
|
||||
}
|
||||
|
@ -537,7 +537,8 @@ void Transform_Properties(struct wmOperatorType *ot, int flags)
|
||||
|
||||
if (flags & P_OPTIONS) {
|
||||
RNA_def_boolean(ot->srna, "texture_space", 0, "Edit Texture Space", "Edit Object data texture space");
|
||||
RNA_def_boolean(ot->srna, "remove_on_cancel", 0, "Remove on Cancel", "Remove elements on cancel");
|
||||
prop = RNA_def_boolean(ot->srna, "remove_on_cancel", 0, "Remove on Cancel", "Remove elements on cancel");
|
||||
RNA_def_property_flag(prop, PROP_HIDDEN);
|
||||
}
|
||||
|
||||
if (flags & P_CORRECT_UV) {
|
||||
|
Loading…
Reference in New Issue
Block a user