svn merge ^/trunk/blender -r43611:43616
authorCampbell Barton <ideasman42@gmail.com>
Sun, 22 Jan 2012 20:15:05 +0000 (20:15 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Sun, 22 Jan 2012 20:15:05 +0000 (20:15 +0000)
source/blender/blenkernel/intern/dynamicpaint.c
source/blender/editors/interface/interface_layout.c
source/blender/editors/space_outliner/space_outliner.c
source/blender/editors/uvedit/uvedit_smart_stitch.c

index d5d1afef954e354580354b75f7ea0cb52ec754ed..0a3e928c2f64ef629c1b1e56c2e1755434cde579 100644 (file)
@@ -1698,9 +1698,6 @@ static struct DerivedMesh *dynamicPaint_Modifier_apply(DynamicPaintModifierData
                                        }
                                        /* vertex group paint */
                                        else if (surface->type == MOD_DPAINT_SURFACE_T_WEIGHT) {
-                                               MLoop *mloop = CDDM_get_loops(result);
-                                               int totloop = result->numLoopData;
-
                                                int defgrp_index = defgroup_name_index(ob, surface->output_name);
                                                MDeformVert *dvert = result->getVertDataArray(result, CD_MDEFORMVERT);
                                                float *weight = (float*)sData->type_data;
index b40c618c301f0ded4db028f14cf48e25bba0a2fb..429cd658dea6815d3846fa99980af5f670855482 100644 (file)
 #define EM_SEPR_X              6
 #define EM_SEPR_Y              6
 
+#define UI_OPERATOR_ERROR_RET(_ot, _opname, return_statement)                 \
+       if (ot == NULL) {                                                         \
+               ui_item_disabled(layout, _opname);                                    \
+               RNA_warning("'%s' unknown operator", _opname);                        \
+               return_statement;                                                     \
+       } (void)0                                                                 \
+
+
 /* uiLayoutRoot */
 
 typedef struct uiLayoutRoot {
@@ -690,14 +698,9 @@ PointerRNA uiItemFullO(uiLayout *layout, const char *opname, const char *name, i
 {
        wmOperatorType *ot = WM_operatortype_find(opname, 0); /* print error next */
 
-       if(ot) {
-               return uiItemFullO_ptr(layout, ot, name, icon, properties, context, flag);
-       }
-       else {
-               ui_item_disabled(layout, opname);
-               RNA_warning("unknown operator '%s'", opname);
-               return PointerRNA_NULL;
-       }
+       UI_OPERATOR_ERROR_RET(ot, opname, return PointerRNA_NULL);
+
+       return uiItemFullO_ptr(layout, ot, name, icon, properties, context, flag);
 }
 
 static const char *ui_menu_enumpropname(uiLayout *layout, PointerRNA *ptr, PropertyRNA *prop, int retval)
@@ -842,13 +845,6 @@ void uiItemsEnumO(uiLayout *layout, const char *opname, const char *propname)
        uiItemsFullEnumO(layout, opname, propname, NULL, layout->root->opcontext, 0);
 }
 
-#define UI_OPERATOR_ERROR_RET(_ot, _opname)                                   \
-       if (ot == NULL) {                                                         \
-               ui_item_disabled(layout, _opname);                                    \
-               RNA_warning("'%s' unknown operator", _opname);                        \
-               return;                                                               \
-       } (void)0
-
 /* for use in cases where we have */
 void uiItemEnumO_value(uiLayout *layout, const char *name, int icon, const char *opname, const char *propname, int value)
 {
@@ -856,7 +852,7 @@ void uiItemEnumO_value(uiLayout *layout, const char *name, int icon, const char
        PointerRNA ptr;
        PropertyRNA *prop;
 
-       UI_OPERATOR_ERROR_RET(ot, opname);
+       UI_OPERATOR_ERROR_RET(ot, opname, return);
 
        WM_operator_properties_create_ptr(&ptr, ot);
 
@@ -887,7 +883,7 @@ void uiItemEnumO_string(uiLayout *layout, const char *name, int icon, const char
        EnumPropertyItem *item;
        int value, free;
 
-       UI_OPERATOR_ERROR_RET(ot, opname);
+       UI_OPERATOR_ERROR_RET(ot, opname, return);
 
        WM_operator_properties_create_ptr(&ptr, ot);
        
@@ -925,7 +921,7 @@ void uiItemBooleanO(uiLayout *layout, const char *name, int icon, const char *op
        wmOperatorType *ot = WM_operatortype_find(opname, 0); /* print error next */
        PointerRNA ptr;
 
-       UI_OPERATOR_ERROR_RET(ot, opname);
+       UI_OPERATOR_ERROR_RET(ot, opname, return);
 
        WM_operator_properties_create_ptr(&ptr, ot);
        RNA_boolean_set(&ptr, propname, value);
@@ -938,7 +934,7 @@ void uiItemIntO(uiLayout *layout, const char *name, int icon, const char *opname
        wmOperatorType *ot = WM_operatortype_find(opname, 0); /* print error next */
        PointerRNA ptr;
 
-       UI_OPERATOR_ERROR_RET(ot, opname);
+       UI_OPERATOR_ERROR_RET(ot, opname, return);
 
        WM_operator_properties_create_ptr(&ptr, ot);
        RNA_int_set(&ptr, propname, value);
@@ -951,7 +947,7 @@ void uiItemFloatO(uiLayout *layout, const char *name, int icon, const char *opna
        wmOperatorType *ot = WM_operatortype_find(opname, 0); /* print error next */
        PointerRNA ptr;
 
-       UI_OPERATOR_ERROR_RET(ot, opname);
+       UI_OPERATOR_ERROR_RET(ot, opname, return);
 
        WM_operator_properties_create_ptr(&ptr, ot);
        RNA_float_set(&ptr, propname, value);
@@ -964,7 +960,7 @@ void uiItemStringO(uiLayout *layout, const char *name, int icon, const char *opn
        wmOperatorType *ot = WM_operatortype_find(opname, 0); /* print error next */
        PointerRNA ptr;
 
-       UI_OPERATOR_ERROR_RET(ot, opname);
+       UI_OPERATOR_ERROR_RET(ot, opname, return);
 
        WM_operator_properties_create_ptr(&ptr, ot);
        RNA_string_set(&ptr, propname, value);
@@ -1608,7 +1604,7 @@ void uiItemMenuEnumO(uiLayout *layout, const char *opname, const char *propname,
        wmOperatorType *ot = WM_operatortype_find(opname, 0); /* print error next */
        MenuItemLevel *lvl;
 
-       UI_OPERATOR_ERROR_RET(ot, opname);
+       UI_OPERATOR_ERROR_RET(ot, opname, return);
 
        if(!ot->srna) {
                ui_item_disabled(layout, opname);
index 5b20c17036227bfbd1b90777913a1e122eec5eb7..a040c63b2ab834f03a3115ae429ba00a43158c55 100644 (file)
@@ -139,9 +139,9 @@ static void outliner_parent_clear_copy(wmDrag *drag, wmDropBox *drop)
        RNA_string_set(drop->ptr, "dragged_obj", id->name+2);
 
        /* Set to simple parent clear type. Avoid menus for drag and drop if possible.
-         If desired, user can toggle the different "Clear Parent" types in the operator
-         menu on tool shelf. */
-       RNA_string_set(drop->ptr, "type", 0);
+        * If desired, user can toggle the different "Clear Parent" types in the operator
+        * menu on tool shelf. */
+       RNA_enum_set(drop->ptr, "type", 0);
 }
 
 /* region dropbox definition */
index 70c94ab0a54c4ebc8c42c9a6f5470b3117223d81..43fdcff2e61931e8b781ca514b84fd170d5a718b 100644 (file)
@@ -294,7 +294,8 @@ static int stitch_check_uvs_stitchable(UvElement *element, UvElement *element_it
 
 
 static int stitch_check_uvs_state_stitchable(UvElement *element, UvElement *element_iter, StitchState *state){
-       if(state->snap_islands && element->island == element_iter->island)
+       if((state->snap_islands && element->island == element_iter->island) ||
+                       (!state->midpoints && element->island == element_iter->island))
                return 0;
 
        return stitch_check_uvs_stitchable(element, element_iter, state);
@@ -547,9 +548,8 @@ static void stitch_validate_stichability(UvElement *element, StitchState *state,
                if(element_iter->separate){
                        if(element_iter == element)
                                continue;
-                       if(stitch_check_uvs_stitchable(element, element_iter, state)){
-                               if(((element_iter->island == state->static_island) || (element->island == state->static_island)) &&
-                                               !((element_iter->island == element->island) && state->snap_islands)){
+                       if(stitch_check_uvs_state_stitchable(element, element_iter, state)){
+                               if((element_iter->island == state->static_island) || (element->island == state->static_island)){
                                        element->flag |= STITCH_STITCHABLE;
                                        preview->num_stitchable++;
                                        stitch_setup_face_preview_for_uv_group(element, state, island_stitch_data);