Merge branch 'master' into blender2.8
This commit is contained in:
@@ -27,6 +27,9 @@
|
||||
|
||||
CCL_NAMESPACE_BEGIN
|
||||
|
||||
/* Disable workarounds, seems to be working fine on latest drivers. */
|
||||
#define CYCLES_DISABLE_DRIVER_WORKAROUNDS
|
||||
|
||||
/* Define CYCLES_DISABLE_DRIVER_WORKAROUNDS to disable workaounds for testing */
|
||||
#ifndef CYCLES_DISABLE_DRIVER_WORKAROUNDS
|
||||
/* Work around AMD driver hangs by ensuring each command is finished before doing anything else. */
|
||||
|
||||
@@ -75,6 +75,16 @@
|
||||
|
||||
#include "MEM_guardedalloc.h"
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
using std::string;
|
||||
using std::vector;
|
||||
|
||||
#define STRINGIFY_ARG(x) "" #x
|
||||
#define STRINGIFY_APPEND(a, b) "" a #b
|
||||
#define STRINGIFY(x) STRINGIFY_APPEND("", x)
|
||||
|
||||
/* **************** Types declaration **************** */
|
||||
|
||||
using OpenSubdiv::Osd::GLMeshInterface;
|
||||
@@ -147,6 +157,38 @@ typedef Mesh<GLVertexBuffer,
|
||||
|
||||
namespace {
|
||||
|
||||
#if !defined(OPENSUBDIV_VERSION_NUMBER) && !defined(OPENSUBDIV_VERSION_MINOR)
|
||||
void stringSplit(vector<string>* tokens,
|
||||
const string& str,
|
||||
const string& separators,
|
||||
bool skip_empty) {
|
||||
size_t token_start = 0, token_length = 0;
|
||||
for (size_t i = 0; i < str.length(); ++i) {
|
||||
const char ch = str[i];
|
||||
if (separators.find(ch) == string::npos) {
|
||||
/* Append non-separator char to a token. */
|
||||
++token_length;
|
||||
} else {
|
||||
/* Append current token to the list (if any). */
|
||||
if (token_length > 0 || !skip_empty) {
|
||||
string token = str.substr(token_start, token_length);
|
||||
tokens->push_back(token);
|
||||
}
|
||||
/* Re-set token pointers, */
|
||||
token_start = i + 1;
|
||||
token_length = 0;
|
||||
}
|
||||
}
|
||||
/* Append token which might be at the end of the string. */
|
||||
if ((token_length != 0) ||
|
||||
(!skip_empty && token_start > 0 &&
|
||||
separators.find(str[token_start-1]) != string::npos)) {
|
||||
string token = str.substr(token_start, token_length);
|
||||
tokens->push_back(token);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
struct FVarVertex {
|
||||
float u, v;
|
||||
void Clear() {
|
||||
@@ -372,5 +414,27 @@ const struct OpenSubdiv_TopologyRefinerDescr *openSubdiv_getGLMeshTopologyRefine
|
||||
|
||||
int openSubdiv_getVersionHex(void)
|
||||
{
|
||||
#if defined(OPENSUBDIV_VERSION_NUMBER)
|
||||
return OPENSUBDIV_VERSION_NUMBER;
|
||||
#elif defined(OPENSUBDIV_VERSION_MAJOR)
|
||||
return OPENSUBDIV_VERSION_MAJOR * 10000 +
|
||||
OPENSUBDIV_VERSION_MINOR * 100 +
|
||||
OPENSUBDIV_VERSION_PATCH;
|
||||
#elif defined(OPENSUBDIV_VERSION)
|
||||
const char* version = STRINGIFY(OPENSUBDIV_VERSION);
|
||||
if (version[0] == 'v') {
|
||||
version += 1;
|
||||
}
|
||||
int major = 0, minor = 0, patch = 0;
|
||||
vector<string> tokens;
|
||||
stringSplit(&tokens, version, "_", true);
|
||||
if (tokens.size() == 3) {
|
||||
major = atoi(tokens[0].c_str());
|
||||
minor = atoi(tokens[1].c_str());
|
||||
patch = atoi(tokens[2].c_str());
|
||||
}
|
||||
return major * 10000 + minor * 100 + patch;
|
||||
#else
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -216,7 +216,7 @@
|
||||
<wcol_list_item>
|
||||
<ThemeWidgetColors outline="#e6e6e6"
|
||||
inner="#00000000"
|
||||
inner_sel="#5680c2ff"
|
||||
inner_sel="#446599ff"
|
||||
item="#80b1ffff"
|
||||
text="#1a1a1a"
|
||||
text_sel="#ffffff"
|
||||
@@ -238,30 +238,33 @@
|
||||
</ThemeUserInterface>
|
||||
</user_interface>
|
||||
<view_3d>
|
||||
<ThemeView3D grid="#414141"
|
||||
<ThemeView3D grid="#464646"
|
||||
clipping_border_3d="#313131ff"
|
||||
wire="#000000"
|
||||
wire_edit="#808080"
|
||||
gp_vertex="#000000"
|
||||
gp_vertex_select="#ff8500"
|
||||
gp_vertex_size="3"
|
||||
lamp="#00000028"
|
||||
speaker="#000000"
|
||||
camera="#000000"
|
||||
view_overlay="#808080"
|
||||
empty="#000000"
|
||||
text_grease_pencil="#b5e61d"
|
||||
object_selected="#f15800"
|
||||
object_active="#ffaa40"
|
||||
object_grouped="#083008"
|
||||
object_grouped="#004200"
|
||||
object_grouped_active="#55bb55"
|
||||
transform="#ffffff"
|
||||
text_keyframe="#ddd700"
|
||||
camera="#000000"
|
||||
empty="#000000"
|
||||
lamp="#00000028"
|
||||
speaker="#000000"
|
||||
vertex="#000000"
|
||||
vertex_select="#ff8500"
|
||||
vertex_size="3"
|
||||
vertex_bevel="#00a5ff"
|
||||
vertex_unreferenced="#000000"
|
||||
edge_select="#ffa000"
|
||||
edge_seam="#db2512"
|
||||
edge_sharp="#00ffff"
|
||||
edge_crease="#cc0099"
|
||||
edge_bevel="#00a5ff"
|
||||
edge_facesel="#4b4b4b"
|
||||
freestyle_edge_mark="#7fff7f"
|
||||
face="#00000012"
|
||||
@@ -291,19 +294,18 @@
|
||||
normal="#22dddd"
|
||||
vertex_normal="#2361dd"
|
||||
split_normal="#dd23dd"
|
||||
bone_solid="#c8c8c8"
|
||||
bone_pose="#50c8ff"
|
||||
bone_pose_active="#8cffff"
|
||||
frame_current="#60c040"
|
||||
outline_width="1"
|
||||
bone_solid="#c8c8c8"
|
||||
bundle_solid="#c8c8c8"
|
||||
camera_path="#000000"
|
||||
skin_root="#b44d4d"
|
||||
clipping_border_3d="#313131ff"
|
||||
text_keyframe="#ddd700"
|
||||
text_grease_pencil="#b5e61d"
|
||||
view_overlay="#808080"
|
||||
transform="#ffffff"
|
||||
frame_current="#60c040"
|
||||
paint_curve_handle="#7fff7f7f"
|
||||
paint_curve_pivot="#ff7f7f7f">
|
||||
paint_curve_pivot="#ff7f7f7f"
|
||||
outline_width="1">
|
||||
<space>
|
||||
<ThemeSpaceGradient title="#000000"
|
||||
text="#000000"
|
||||
@@ -321,8 +323,8 @@
|
||||
tab_outline="#999999">
|
||||
<gradients>
|
||||
<ThemeGradientColors show_grad="TRUE"
|
||||
gradient="#1b1b1b"
|
||||
high_gradient="#3a3a3a">
|
||||
gradient="#444444"
|
||||
high_gradient="#858585">
|
||||
</ThemeGradientColors>
|
||||
</gradients>
|
||||
<panelcolors>
|
||||
@@ -348,6 +350,7 @@
|
||||
vertex="#000000"
|
||||
vertex_select="#ff8500"
|
||||
vertex_size="6"
|
||||
vertex_bevel="#000000"
|
||||
vertex_unreferenced="#000000"
|
||||
handle_free="#000000"
|
||||
handle_auto="#909000"
|
||||
@@ -372,13 +375,13 @@
|
||||
header_text="#000000"
|
||||
header_text_hi="#ffffff"
|
||||
button="#999999e6"
|
||||
button_title="#000000"
|
||||
button_title="#1a1a1a"
|
||||
button_text="#000000"
|
||||
button_text_hi="#ffffff"
|
||||
tab_active="#727272"
|
||||
tab_inactive="#535353"
|
||||
tab_back="#404040ff"
|
||||
tab_outline="#3c3c3c">
|
||||
tab_active="#6697e6"
|
||||
tab_inactive="#cccccc"
|
||||
tab_back="#999999ff"
|
||||
tab_outline="#999999">
|
||||
<panelcolors>
|
||||
<ThemePanelColors header="#c2c2c2ea"
|
||||
back="#999999ff"
|
||||
@@ -398,23 +401,23 @@
|
||||
</ThemeGraphEditor>
|
||||
</graph_editor>
|
||||
<file_browser>
|
||||
<ThemeFileBrowser selected_file="#ff8c19">
|
||||
<ThemeFileBrowser selected_file="#5680c2">
|
||||
<space>
|
||||
<ThemeSpaceGeneric back="#404040"
|
||||
title="#000000"
|
||||
text="#f1f1f1"
|
||||
text_hi="#0f0f0f"
|
||||
header="#b3b3b3"
|
||||
text="#eeeeee"
|
||||
text_hi="#ffffff"
|
||||
header="#adadad"
|
||||
header_text="#000000"
|
||||
header_text_hi="#ffffff"
|
||||
button="#7272727f"
|
||||
button_title="#000000"
|
||||
button="#999999e6"
|
||||
button_title="#1a1a1a"
|
||||
button_text="#000000"
|
||||
button_text_hi="#ffffff"
|
||||
tab_active="#6697e6"
|
||||
tab_inactive="#535353"
|
||||
tab_back="#404040ff"
|
||||
tab_outline="#3c3c3c">
|
||||
tab_inactive="#cccccc"
|
||||
tab_back="#999999ff"
|
||||
tab_outline="#999999">
|
||||
<panelcolors>
|
||||
<ThemePanelColors header="#c2c2c2ea"
|
||||
back="#99999980"
|
||||
@@ -501,6 +504,7 @@
|
||||
keyframe_jitter_selected="#61c042"
|
||||
keyframe_border="#000000ff"
|
||||
keyframe_border_selected="#000000ff"
|
||||
keyframe_scale_factor="1"
|
||||
summary="#d3660066">
|
||||
<space>
|
||||
<ThemeSpaceGeneric back="#6b6b6b"
|
||||
@@ -543,6 +547,7 @@
|
||||
vertex="#000000"
|
||||
vertex_select="#ff8500"
|
||||
vertex_size="3"
|
||||
vertex_bevel="#000000"
|
||||
vertex_unreferenced="#000000"
|
||||
face="#ffffff0a"
|
||||
face_select="#ff85003c"
|
||||
|
||||
@@ -1700,11 +1700,12 @@ static void node_free_node_ex(bNodeTree *ntree, bNode *node, bool remove_animdat
|
||||
ntreeTexEndExecTree(ntree->execdata);
|
||||
ntree->execdata = NULL;
|
||||
}
|
||||
|
||||
if (node->typeinfo->freefunc)
|
||||
node->typeinfo->freefunc(node);
|
||||
}
|
||||
|
||||
|
||||
if (node->typeinfo->freefunc) {
|
||||
node->typeinfo->freefunc(node);
|
||||
}
|
||||
|
||||
for (sock = node->inputs.first; sock; sock = nextsock) {
|
||||
nextsock = sock->next;
|
||||
node_socket_free(ntree, sock, node);
|
||||
|
||||
@@ -1037,7 +1037,7 @@ static BMOpDefine bmo_extrude_face_region_def = {
|
||||
/* slots_in */
|
||||
{{"geom", BMO_OP_SLOT_ELEMENT_BUF, {BM_VERT | BM_EDGE | BM_FACE}}, /* edges and faces */
|
||||
{"edges_exclude", BMO_OP_SLOT_MAPPING, {(int)BMO_OP_SLOT_SUBTYPE_MAP_EMPTY}},
|
||||
{"use_keep_orig", BMO_OP_SLOT_BOOL}, /* keep original geometry */
|
||||
{"use_keep_orig", BMO_OP_SLOT_BOOL}, /* keep original geometry (requires ``geom`` to include edges). */
|
||||
{"use_select_history", BMO_OP_SLOT_BOOL}, /* pass to duplicate */
|
||||
{{'\0'}},
|
||||
},
|
||||
|
||||
@@ -462,6 +462,17 @@ uiButStore *UI_butstore_create(uiBlock *block)
|
||||
|
||||
void UI_butstore_free(uiBlock *block, uiButStore *bs_handle)
|
||||
{
|
||||
/* Workaround for button store being moved into new block,
|
||||
* which then can't use the previous buttons state ('ui_but_update_from_old_block' fails to find a match),
|
||||
* keeping the active button in the old block holding a reference to the button-state in the new block: see T49034.
|
||||
*
|
||||
* Ideally we would manage moving the 'uiButStore', keeping a correct state.
|
||||
* All things considered this is the most straightforward fix - Campbell.
|
||||
*/
|
||||
if (block != bs_handle->block && bs_handle->block != NULL) {
|
||||
block = bs_handle->block;
|
||||
}
|
||||
|
||||
BLI_freelistN(&bs_handle->items);
|
||||
BLI_remlink(&block->butstore, bs_handle);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user