Merge branch 'master' into blender2.8
Conflicts: source/blender/blenkernel/intern/blender.c source/blender/makesdna/DNA_ID.h
This commit is contained in:
@@ -175,6 +175,10 @@ ccl_device_inline void object_inverse_normal_transform(KernelGlobals *kg, const
|
||||
Transform tfm = object_fetch_transform(kg, sd->object, OBJECT_TRANSFORM);
|
||||
*N = normalize(transform_direction_transposed(&tfm, *N));
|
||||
}
|
||||
else if(sd->type == PRIMITIVE_LAMP) {
|
||||
Transform tfm = lamp_fetch_transform(kg, sd->lamp, false);
|
||||
*N = normalize(transform_direction_transposed(&tfm, *N));
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -318,6 +318,9 @@ class USERPREF_PT_interface(Panel):
|
||||
col.separator()
|
||||
col.separator()
|
||||
|
||||
col.label(text="Screen:")
|
||||
col.prop(view, "show_layout_ui")
|
||||
|
||||
col.prop(view, "show_splash")
|
||||
|
||||
|
||||
|
||||
@@ -262,6 +262,16 @@ void BKE_blender_userdef_app_template_data_swap(UserDef *userdef_a, UserDef *use
|
||||
SWAP(ListBase, userdef_a->id, userdef_b->id); \
|
||||
} ((void)0)
|
||||
|
||||
#define FLAG_SWAP(id, ty, flags) { \
|
||||
CHECK_TYPE(&(userdef_a->id), ty *); \
|
||||
const ty f = flags; \
|
||||
const ty a = userdef_a->id; \
|
||||
const ty b = userdef_b->id; \
|
||||
userdef_a->id = (userdef_a->id & ~f) | (b & f); \
|
||||
userdef_b->id = (userdef_b->id & ~f) | (a & f); \
|
||||
} ((void)0)
|
||||
|
||||
|
||||
LIST_SWAP(uistyles);
|
||||
LIST_SWAP(uifonts);
|
||||
LIST_SWAP(themes);
|
||||
@@ -276,9 +286,12 @@ void BKE_blender_userdef_app_template_data_swap(UserDef *userdef_a, UserDef *use
|
||||
|
||||
DATA_SWAP(manipulator_flag);
|
||||
|
||||
FLAG_SWAP(uiflag, int, USER_LOCK_UI_LAYOUT);
|
||||
|
||||
#undef SWAP_TYPELESS
|
||||
#undef LIST_SWAP
|
||||
#undef DATA_SWAP
|
||||
#undef LIST_SWAP
|
||||
#undef FLAG_SWAP
|
||||
}
|
||||
|
||||
void BKE_blender_userdef_app_template_data_set(UserDef *userdef)
|
||||
|
||||
@@ -2923,7 +2923,7 @@ void init_userdef_do_versions(void)
|
||||
USER_FLAG_DEPRECATED_6 | USER_FLAG_DEPRECATED_7 |
|
||||
USER_FLAG_DEPRECATED_9 | USER_FLAG_DEPRECATED_10);
|
||||
U.uiflag &= ~(
|
||||
USER_UIFLAG_DEPRECATED_7);
|
||||
USER_LOCK_UI_LAYOUT);
|
||||
U.transopts &= ~(
|
||||
USER_TR_DEPRECATED_2 | USER_TR_DEPRECATED_3 | USER_TR_DEPRECATED_4 |
|
||||
USER_TR_DEPRECATED_6 | USER_TR_DEPRECATED_7);
|
||||
|
||||
@@ -769,6 +769,10 @@ static void area_azone_initialize(wmWindow *win, const bScreen *screen, ScrArea
|
||||
return;
|
||||
}
|
||||
|
||||
if (U.uiflag & USER_LOCK_UI_LAYOUT) {
|
||||
return;
|
||||
}
|
||||
|
||||
/* can't click on bottom corners on OS X, already used for resizing */
|
||||
#ifdef __APPLE__
|
||||
if (!(sa->totrct.xmin == 0 && sa->totrct.ymin == 0) || WM_window_is_fullscreen(win))
|
||||
|
||||
@@ -735,10 +735,19 @@ int getTransformOrientation_ex(const bContext *C, float normal[3], float plane[3
|
||||
SWAP(BMVert *, v_pair[0], v_pair[1]);
|
||||
}
|
||||
|
||||
add_v3_v3v3(normal, v_pair[0]->no, v_pair[1]->no);
|
||||
sub_v3_v3v3(plane, v_pair[0]->co, v_pair[1]->co);
|
||||
/* flip the plane normal so we point outwards */
|
||||
negate_v3(plane);
|
||||
add_v3_v3v3(normal, v_pair[1]->no, v_pair[0]->no);
|
||||
sub_v3_v3v3(plane, v_pair[1]->co, v_pair[0]->co);
|
||||
|
||||
if (normalize_v3(plane) != 0.0f) {
|
||||
/* For edges it'd important the resulting matrix can rotate around the edge,
|
||||
* project onto the plane so we can use a fallback value. */
|
||||
project_plane_normalized_v3_v3v3(normal, normal, plane);
|
||||
if (UNLIKELY(normalize_v3(normal) == 0.0f)) {
|
||||
/* in the case the normal and plane are aligned,
|
||||
* use a fallback normal which is orthogonal to the plane. */
|
||||
ortho_v3_v3(normal, plane);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
result = ORIENTATION_EDGE;
|
||||
|
||||
@@ -679,7 +679,9 @@ typedef enum eUserpref_UI_Flag {
|
||||
USER_DRAWVIEWINFO = (1 << 4),
|
||||
USER_PLAINMENUS = (1 << 5),
|
||||
USER_LOCK_CURSOR_ADJUST = (1 << 6),
|
||||
USER_UIFLAG_DEPRECATED_7 = (1 << 7), /* cleared */
|
||||
/* Avoid accidentally adjusting the layout
|
||||
* (exact behavior may change based on whats considered reasonable to lock down). */
|
||||
USER_LOCK_UI_LAYOUT = (1 << 7),
|
||||
USER_ALLWINCODECS = (1 << 8),
|
||||
USER_MENUOPENAUTO = (1 << 9),
|
||||
USER_ZBUF_CURSOR = (1 << 10),
|
||||
|
||||
@@ -147,6 +147,12 @@ static void rna_userdef_dpi_update(Main *bmain, Scene *UNUSED(scene), PointerRNA
|
||||
WM_main_add_notifier(NC_SCREEN | NA_EDITED, NULL); /* refresh region sizes */
|
||||
}
|
||||
|
||||
static void rna_userdef_update_ui(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *UNUSED(ptr))
|
||||
{
|
||||
WM_main_add_notifier(NC_WINDOW, NULL);
|
||||
WM_main_add_notifier(NC_SCREEN | NA_EDITED, NULL); /* refresh region sizes */
|
||||
}
|
||||
|
||||
static void rna_userdef_language_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *UNUSED(ptr))
|
||||
{
|
||||
BLF_cache_clear();
|
||||
@@ -3393,6 +3399,11 @@ static void rna_def_userdef_view(BlenderRNA *brna)
|
||||
RNA_def_property_boolean_negative_sdna(prop, NULL, "uiflag", USER_SPLASH_DISABLE);
|
||||
RNA_def_property_ui_text(prop, "Show Splash", "Display splash screen on startup");
|
||||
|
||||
prop = RNA_def_property(srna, "show_layout_ui", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_negative_sdna(prop, NULL, "uiflag", USER_LOCK_UI_LAYOUT);
|
||||
RNA_def_property_ui_text(prop, "Show Layout Widgets", "Show screen layout editing UI");
|
||||
RNA_def_property_update(prop, 0, "rna_userdef_update_ui");
|
||||
|
||||
prop = RNA_def_property(srna, "show_playback_fps", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_SHOW_FPS);
|
||||
RNA_def_property_ui_text(prop, "Show Playback FPS",
|
||||
|
||||
Reference in New Issue
Block a user