Merging r38951 through r38987 from trunk into soc-2011-tomato
[blender.git] / source / blender / editors / transform / transform_generics.c
index d62005c1074302bd68377d36be150656068c25b0..837bc1cf3eadb7c68f3f907c958e7ee6a42c0d1e 100644 (file)
@@ -1056,6 +1056,22 @@ int initTransInfo (bContext *C, TransInfo *t, wmOperator *op, wmEvent *event)
                                t->options |= CTX_NO_PET;
                        }
                }
                                t->options |= CTX_NO_PET;
                        }
                }
+
+               /* initialize UV transform from */
+               if (RNA_struct_find_property(op->ptr, "correct_uv")) {
+                       if(RNA_property_is_set(op->ptr, "correct_uv")) {
+                               if(RNA_boolean_get(op->ptr, "correct_uv")) {
+                                       t->settings->uvcalc_flag |= UVCALC_TRANSFORM_CORRECT;
+                               }
+                               else {
+                                       t->settings->uvcalc_flag &= ~UVCALC_TRANSFORM_CORRECT;
+                               }
+                       }
+                       else {
+                               RNA_boolean_set(op->ptr, "correct_uv", t->settings->uvcalc_flag & UVCALC_TRANSFORM_CORRECT);
+                       }
+               }
+
        }
        else if(t->spacetype==SPACE_IMAGE)
        {
        }
        else if(t->spacetype==SPACE_IMAGE)
        {