Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2018-07-26 08:51:29 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-07-26 08:51:29 +0300
commite91bdb10e9c11acf98a2e986d490f2de3c272489 (patch)
tree4b66a04e7c2a153093d0306f31e8ee7bd6dadedc /source
parent0dd3b200b06883796ad18bddd53cb97f12c94ee9 (diff)
parent44370a307cc77435880793a6420be143004b34f7 (diff)
Merge branch 'master' into blender2.8
Diffstat (limited to 'source')
-rw-r--r--source/blender/editors/transform/transform.c6
-rw-r--r--source/blender/editors/transform/transform_ops.c11
2 files changed, 16 insertions, 1 deletions
diff --git a/source/blender/editors/transform/transform.c b/source/blender/editors/transform/transform.c
index dab53c04806..07ef6b9a819 100644
--- a/source/blender/editors/transform/transform.c
+++ b/source/blender/editors/transform/transform.c
@@ -2153,7 +2153,11 @@ void saveTransform(bContext *C, TransInfo *t, wmOperator *op)
}
}
- RNA_property_boolean_set_array(op->ptr, prop, constraint_axis);
+ /* Only set if needed, so we can hide in the UI when nothing is set.
+ * See 'transform_poll_property'. */
+ if (ELEM(true, UNPACK3(constraint_axis))) {
+ RNA_property_boolean_set_array(op->ptr, prop, constraint_axis);
+ }
}
{
diff --git a/source/blender/editors/transform/transform_ops.c b/source/blender/editors/transform/transform_ops.c
index 5d930a8406b..580bae71cc8 100644
--- a/source/blender/editors/transform/transform_ops.c
+++ b/source/blender/editors/transform/transform_ops.c
@@ -511,6 +511,17 @@ static bool transform_poll_property(const bContext *UNUSED(C), wmOperator *op, c
{
const char *prop_id = RNA_property_identifier(prop);
+ /* Orientation/Constraints. */
+ {
+ /* Hide orientation axis if no constraints are set, since it wont be used. */
+ PropertyRNA *prop_con = RNA_struct_find_property(op->ptr, "constraint_axis");
+ if (prop_con && !RNA_property_is_set(op->ptr, prop_con)) {
+ if (STRPREFIX(prop_id, "constraint")) {
+ return false;
+ }
+ }
+ }
+
/* Proportional Editing. */
{
PropertyRNA *prop_pet = RNA_struct_find_property(op->ptr, "proportional");