diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2013-09-17 20:12:05 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2013-09-17 20:12:05 +0400 |
commit | 394efd85bdf7c071d80e1723471a2dc8aea790db (patch) | |
tree | 2797203b2e0081df1c0e21e14ca80a772878e68d /source | |
parent | 5aeade4c6003237a6e6d803d4ed1b898b0d4dccd (diff) |
Fix crash with recently added remove_on_cancel transform property, and hide this
property in the user interface.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/editors/transform/transform_generics.c | 3 | ||||
-rw-r--r-- | source/blender/editors/transform/transform_ops.c | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/source/blender/editors/transform/transform_generics.c b/source/blender/editors/transform/transform_generics.c index ad572188f4c..233ef1d18a5 100644 --- a/source/blender/editors/transform/transform_generics.c +++ b/source/blender/editors/transform/transform_generics.c @@ -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; } diff --git a/source/blender/editors/transform/transform_ops.c b/source/blender/editors/transform/transform_ops.c index 53b43b6c969..e7c22fc0899 100644 --- a/source/blender/editors/transform/transform_ops.c +++ b/source/blender/editors/transform/transform_ops.c @@ -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) { |