svn merge ^/trunk/blender -r43611:43616
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -66,6 +66,14 @@
|
||||
#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);
|
||||
|
||||
@@ -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 */
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user