Merging r49287 through r49299 from trunk into soc-2011-tomato
This commit is contained in:
@@ -5643,6 +5643,7 @@ void lib_link_screen_restore(Main *newmain, bScreen *curscreen, Scene *curscene)
|
||||
* so assume that here we're doing for undo only...
|
||||
*/
|
||||
sima->gpd = restore_pointer_by_name(newmain, (ID *)sima->gpd, 1);
|
||||
sima->mask_info.mask = restore_pointer_by_name(newmain, (ID *)sima->mask_info.mask, 1);
|
||||
}
|
||||
else if (sl->spacetype == SPACE_SEQ) {
|
||||
SpaceSeq *sseq = (SpaceSeq *)sl;
|
||||
|
||||
@@ -497,8 +497,6 @@ void ED_keymap_mask(wmKeyConfig *keyconf)
|
||||
WM_keymap_add_item(keymap, "MASK_OT_normals_make_consistent", NKEY, KM_PRESS, KM_CTRL, 0);
|
||||
// WM_keymap_add_item(keymap, "MASK_OT_feather_weight_clear", SKEY, KM_PRESS, KM_ALT, 0);
|
||||
/* ... matches curve editmode */
|
||||
RNA_enum_set(WM_keymap_add_item(keymap, "TRANSFORM_OT_transform", SKEY, KM_PRESS, KM_ALT, 0)->ptr,
|
||||
"mode", TFM_MASK_SHRINKFATTEN);
|
||||
|
||||
/* relationships */
|
||||
WM_keymap_add_item(keymap, "MASK_OT_parent_set", PKEY, KM_PRESS, KM_CTRL, 0);
|
||||
@@ -510,7 +508,13 @@ void ED_keymap_mask(wmKeyConfig *keyconf)
|
||||
/* for image editor only */
|
||||
WM_keymap_add_item(keymap, "UV_OT_cursor_set", ACTIONMOUSE, KM_PRESS, 0, 0);
|
||||
|
||||
transform_keymap_for_space(keyconf, keymap, SPACE_CLIP);
|
||||
/* Transform (don't use transform_keymap_for_space() since this maps to different spaces) */
|
||||
WM_keymap_add_item(keymap, "TRANSFORM_OT_translate", GKEY, KM_PRESS, 0, 0);
|
||||
WM_keymap_add_item(keymap, "TRANSFORM_OT_translate", EVT_TWEAK_S, KM_ANY, 0, 0);
|
||||
WM_keymap_add_item(keymap, "TRANSFORM_OT_resize", SKEY, KM_PRESS, 0, 0);
|
||||
WM_keymap_add_item(keymap, "TRANSFORM_OT_rotate", RKEY, KM_PRESS, 0, 0);
|
||||
kmi = WM_keymap_add_item(keymap, "TRANSFORM_OT_transform", SKEY, KM_PRESS, KM_ALT, 0);
|
||||
RNA_enum_set(kmi->ptr, "mode", TFM_MASK_SHRINKFATTEN);
|
||||
}
|
||||
|
||||
void ED_operatormacros_mask(void)
|
||||
|
||||
@@ -548,7 +548,6 @@ static int clip_lasso_select_exec(bContext *C, wmOperator *op)
|
||||
return OPERATOR_PASS_THROUGH;
|
||||
}
|
||||
|
||||
/* MASKTODO - image space */
|
||||
void MASK_OT_select_lasso(wmOperatorType *ot)
|
||||
{
|
||||
/* identifiers */
|
||||
|
||||
@@ -4646,6 +4646,7 @@ static int edbm_bevel_modal(bContext *C, wmOperator *op, wmEvent *event)
|
||||
return OPERATOR_RUNNING_MODAL;
|
||||
}
|
||||
}
|
||||
|
||||
switch (event->type) {
|
||||
case ESCKEY:
|
||||
case RIGHTMOUSE:
|
||||
@@ -4678,7 +4679,7 @@ static int edbm_bevel_modal(bContext *C, wmOperator *op, wmEvent *event)
|
||||
edbm_bevel_calc(C, op);
|
||||
edbm_bevel_update_header(op, C);
|
||||
}
|
||||
return OPERATOR_RUNNING_MODAL;
|
||||
break;
|
||||
|
||||
case LEFTMOUSE:
|
||||
case PADENTER:
|
||||
@@ -4695,7 +4696,7 @@ static int edbm_bevel_modal(bContext *C, wmOperator *op, wmEvent *event)
|
||||
edbm_bevel_calc(C, op);
|
||||
edbm_bevel_update_header(op, C);
|
||||
}
|
||||
return OPERATOR_RUNNING_MODAL;
|
||||
break;
|
||||
|
||||
case DKEY:
|
||||
if (event->val == KM_PRESS) {
|
||||
@@ -4705,7 +4706,7 @@ static int edbm_bevel_modal(bContext *C, wmOperator *op, wmEvent *event)
|
||||
edbm_bevel_calc(C, op);
|
||||
edbm_bevel_update_header(op, C);
|
||||
}
|
||||
return OPERATOR_RUNNING_MODAL;
|
||||
break;
|
||||
}
|
||||
|
||||
return OPERATOR_RUNNING_MODAL;
|
||||
@@ -4785,7 +4786,12 @@ static void edbm_inset_update_header(wmOperator *op, bContext *C)
|
||||
{
|
||||
InsetData *opdata = op->customdata;
|
||||
|
||||
static char str[] = "Confirm: Enter/LClick, Cancel: (Esc/RClick), thickness: %s, depth (Ctrl to tweak): %s (%s), Outset (O): (%s)";
|
||||
static const char str[] = "Confirm: Enter/LClick, "
|
||||
"Cancel: (Esc/RClick), "
|
||||
"thickness: %s, "
|
||||
"depth (Ctrl to tweak): %s (%s), "
|
||||
"Outset (O): (%s), "
|
||||
"Boundary (B): (%s)";
|
||||
|
||||
char msg[HEADER_LENGTH];
|
||||
ScrArea *sa = CTX_wm_area(C);
|
||||
@@ -4802,7 +4808,8 @@ static void edbm_inset_update_header(wmOperator *op, bContext *C)
|
||||
flts_str,
|
||||
flts_str + NUM_STR_REP_LEN,
|
||||
opdata->modify_depth ? "On" : "Off",
|
||||
RNA_boolean_get(op->ptr, "use_outset") ? "On" : "Off"
|
||||
RNA_boolean_get(op->ptr, "use_outset") ? "On" : "Off",
|
||||
RNA_boolean_get(op->ptr, "use_boundary") ? "On" : "Off"
|
||||
);
|
||||
|
||||
ED_area_headerprint(sa, msg);
|
||||
@@ -4982,6 +4989,7 @@ static int edbm_inset_modal(bContext *C, wmOperator *op, wmEvent *event)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
switch (event->type) {
|
||||
case ESCKEY:
|
||||
case RIGHTMOUSE:
|
||||
@@ -5019,7 +5027,7 @@ static int edbm_inset_modal(bContext *C, wmOperator *op, wmEvent *event)
|
||||
return OPERATOR_CANCELLED;
|
||||
}
|
||||
}
|
||||
return OPERATOR_RUNNING_MODAL;
|
||||
break;
|
||||
|
||||
case LEFTMOUSE:
|
||||
case PADENTER:
|
||||
@@ -5041,7 +5049,7 @@ static int edbm_inset_modal(bContext *C, wmOperator *op, wmEvent *event)
|
||||
opdata->shift_amount = 0.0f;
|
||||
opdata->shift = FALSE;
|
||||
}
|
||||
return OPERATOR_RUNNING_MODAL;
|
||||
break;
|
||||
|
||||
case LEFTCTRLKEY:
|
||||
case RIGHTCTRLKEY:
|
||||
@@ -5066,7 +5074,7 @@ static int edbm_inset_modal(bContext *C, wmOperator *op, wmEvent *event)
|
||||
opdata->initial_length = len_v2(mlen);
|
||||
|
||||
edbm_inset_update_header(op, C);
|
||||
return OPERATOR_RUNNING_MODAL;
|
||||
break;
|
||||
}
|
||||
|
||||
case OKEY:
|
||||
@@ -5075,13 +5083,26 @@ static int edbm_inset_modal(bContext *C, wmOperator *op, wmEvent *event)
|
||||
RNA_boolean_set(op->ptr, "use_outset", !use_outset);
|
||||
if (edbm_inset_calc(C, op)) {
|
||||
edbm_inset_update_header(op, C);
|
||||
return OPERATOR_RUNNING_MODAL;
|
||||
}
|
||||
else {
|
||||
edbm_inset_cancel(C, op);
|
||||
return OPERATOR_CANCELLED;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case BKEY:
|
||||
if (event->val == KM_PRESS) {
|
||||
int use_boundary = RNA_boolean_get(op->ptr, "use_boundary");
|
||||
RNA_boolean_set(op->ptr, "use_boundary", !use_boundary);
|
||||
if (edbm_inset_calc(C, op)) {
|
||||
edbm_inset_update_header(op, C);
|
||||
}
|
||||
else {
|
||||
edbm_inset_cancel(C, op);
|
||||
return OPERATOR_CANCELLED;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
return OPERATOR_RUNNING_MODAL;
|
||||
|
||||
@@ -4311,7 +4311,7 @@ static int node_add_file_exec(bContext *C, wmOperator *op)
|
||||
ima = BKE_image_load_exists(path);
|
||||
|
||||
if (!ima) {
|
||||
BKE_reportf(op->reports, RPT_ERROR, "Can't read: \"%s\", %s", path, errno ? strerror(errno) : "Unsupported image format");
|
||||
BKE_reportf(op->reports, RPT_ERROR, "Can't read image: \"%s\", %s", path, errno ? strerror(errno) : "Unsupported format");
|
||||
return OPERATOR_CANCELLED;
|
||||
}
|
||||
}
|
||||
@@ -4352,6 +4352,7 @@ static int node_add_file_exec(bContext *C, wmOperator *op)
|
||||
}
|
||||
|
||||
node->id = (ID *)ima;
|
||||
id_us_plus(node->id);
|
||||
|
||||
snode_notify(C, snode);
|
||||
snode_dag_update(C, snode);
|
||||
|
||||
@@ -574,6 +574,8 @@ void IMB_colormanagement_init(void)
|
||||
/* special views, which does not depend on OCIO */
|
||||
colormanage_view_add(ACES_ODT_TONECORVE);
|
||||
#endif
|
||||
|
||||
BLI_init_srgb_conversion();
|
||||
}
|
||||
|
||||
void IMB_colormanagement_exit(void)
|
||||
@@ -699,13 +701,6 @@ static void display_buffer_apply_threaded(ImBuf *ibuf, float *buffer, unsigned c
|
||||
{
|
||||
DisplayBufferInitData init_data;
|
||||
|
||||
/* XXX: IMB_buffer_byte_from_float_tonecurve isn't thread-safe because of
|
||||
* possible non-initialized sRGB conversion stuff. Make sure it's properly
|
||||
* initialized before starting threads, but likely this stuff should be
|
||||
* initialized somewhere before to avoid possible issues in other issues.
|
||||
*/
|
||||
BLI_init_srgb_conversion();
|
||||
|
||||
init_data.ibuf = ibuf;
|
||||
init_data.processor = processor;
|
||||
init_data.buffer = buffer;
|
||||
|
||||
@@ -206,7 +206,6 @@ void IMB_buffer_byte_from_float_tonecurve(uchar *rect_to, const float *rect_from
|
||||
BLI_assert(profile_to != IB_PROFILE_NONE);
|
||||
BLI_assert(profile_from != IB_PROFILE_NONE);
|
||||
|
||||
BLI_init_srgb_conversion();
|
||||
if (dither)
|
||||
di = create_dither_context(width, dither);
|
||||
|
||||
@@ -367,8 +366,6 @@ void IMB_buffer_float_from_byte(float *rect_to, const uchar *rect_from,
|
||||
BLI_assert(profile_to != IB_PROFILE_NONE);
|
||||
BLI_assert(profile_from != IB_PROFILE_NONE);
|
||||
|
||||
BLI_init_srgb_conversion();
|
||||
|
||||
/* RGBA input */
|
||||
for (y = 0; y < height; y++) {
|
||||
const uchar *from = rect_from + stride_from * y * 4;
|
||||
|
||||
Reference in New Issue
Block a user