Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2017-04-03 16:15:56 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2017-04-03 16:15:56 +0300
commit5884c9f1ba45b8285930508b8ee04279a7b0b387 (patch)
tree11a71aea12aa2e4bf6121f21c041d0da7296928d
parent3b6eaf8d96bce59756f669e0c5105ae3bb31bef8 (diff)
parentcc93a66e71a9de09cb41d4433be86e0f056d2b6f (diff)
Merge branch 'master' into blender2.8
-rw-r--r--.gitmodules4
-rw-r--r--build_files/buildbot/master_unpack.py3
-rw-r--r--build_files/buildbot/slave_pack.py6
-rw-r--r--intern/cycles/blender/blender_shader.cpp32
-rw-r--r--intern/cycles/blender/blender_sync.h1
-rw-r--r--intern/cycles/render/graph.cpp3
-rw-r--r--source/blender/alembic/intern/abc_exporter.cc2
-rw-r--r--source/blender/collada/ArmatureExporter.cpp4
-rw-r--r--source/blender/collada/ControllerExporter.cpp3
-rw-r--r--source/blender/collada/ExportSettings.h1
-rw-r--r--source/blender/collada/collada.cpp8
-rw-r--r--source/blender/collada/collada.h1
-rw-r--r--source/blender/collada/collada_utils.cpp22
-rw-r--r--source/blender/collada/collada_utils.h3
-rw-r--r--source/blender/depsgraph/intern/depsgraph_tag.cc17
-rw-r--r--source/blender/editors/gpencil/gpencil_edit.c8
-rw-r--r--source/blender/editors/interface/interface_layout.c9
-rw-r--r--source/blender/editors/io/io_collada.c12
-rw-r--r--source/blender/editors/transform/transform_snap_object.c5
-rw-r--r--source/blender/makesrna/intern/rna_scene_api.c9
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_normal_map.c2
-rw-r--r--source/blender/render/intern/source/render_texture.c61
-rw-r--r--source/blender/windowmanager/intern/wm_files.c2
-rw-r--r--source/blender/windowmanager/intern/wm_window.c2
-rw-r--r--source/blenderplayer/bad_level_call_stubs/stubs.c1
25 files changed, 143 insertions, 78 deletions
diff --git a/.gitmodules b/.gitmodules
index 02875320630..11ce247b455 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -3,18 +3,22 @@
url = ../blender-addons.git
branch = blender2.8
ignore = all
+ branch = master
[submodule "release/scripts/addons_contrib"]
path = release/scripts/addons_contrib
url = ../blender-addons-contrib.git
branch = master
ignore = all
+ branch = master
[submodule "release/datafiles/locale"]
path = release/datafiles/locale
url = ../blender-translations.git
branch = master
ignore = all
+ branch = master
[submodule "source/tools"]
path = source/tools
url = ../blender-dev-tools.git
branch = master
ignore = all
+ branch = master
diff --git a/build_files/buildbot/master_unpack.py b/build_files/buildbot/master_unpack.py
index ec44705931c..67b628f668a 100644
--- a/build_files/buildbot/master_unpack.py
+++ b/build_files/buildbot/master_unpack.py
@@ -67,6 +67,9 @@ def get_platform(filename):
def get_branch(filename):
+ if filename.startswith("blender-2.8"):
+ return "blender2.8"
+
tokens = filename.split("-")
branch = ""
diff --git a/build_files/buildbot/slave_pack.py b/build_files/buildbot/slave_pack.py
index 490f0456045..6929be85003 100644
--- a/build_files/buildbot/slave_pack.py
+++ b/build_files/buildbot/slave_pack.py
@@ -111,7 +111,8 @@ if builder.find('cmake') != -1:
if builder.endswith('vc2015'):
platform += "-vc14"
builderified_name = 'blender-{}-{}-{}'.format(blender_full_version, git_hash, platform)
- if branch != '':
+ # NOTE: Blender 2.8 is already respected by blender_full_version.
+ if branch != '' and branch != 'blender2.8':
builderified_name = branch + "-" + builderified_name
os.rename(result_file, "{}.zip".format(builderified_name))
@@ -177,7 +178,8 @@ if builder.find('cmake') != -1:
blender_hash,
blender_glibc,
blender_arch)
- if branch != '':
+ # NOTE: Blender 2.8 is already respected by blender_full_version.
+ if branch != '' and branch != 'blender2.8':
package_name = branch + "-" + package_name
upload_filename = package_name + ".tar.bz2"
diff --git a/intern/cycles/blender/blender_shader.cpp b/intern/cycles/blender/blender_shader.cpp
index 0cd4b90340b..df21e2640bd 100644
--- a/intern/cycles/blender/blender_shader.cpp
+++ b/intern/cycles/blender/blender_shader.cpp
@@ -1158,6 +1158,13 @@ static void add_nodes(Scene *scene,
/* Sync Materials */
+void BlenderSync::sync_materials_simpligy(Shader *shader)
+{
+ ShaderGraph *graph = shader->graph;
+ graph->simplify(scene);
+ shader->tag_update(scene);
+}
+
void BlenderSync::sync_materials(bool update_all)
{
shader_map.set_default(scene->default_surface);
@@ -1203,17 +1210,26 @@ void BlenderSync::sync_materials(bool update_all)
shader->set_graph(graph);
- /* By simplifying the shader graph as soon as possible, some redundant shader nodes
- * might be removed which prevents loading unneccessary attributes later.
+ /* By simplifying the shader graph as soon as possible, some
+ * redundant shader nodes might be removed which prevents loading
+ * unnecessary attributes later.
*
- * However, since graph simplification also accounts for e.g. mix weight, this would
- * cause frequent expensive resyncs in interactive sessions, so for those sessions
- * optimization is only performed right before compiling. */
+ * However, since graph simplification also accounts for e.g. mix
+ * weight, this would cause frequent expensive resyncs in interactive
+ * sessions, so for those sessions optimization is only performed
+ * right before compiling.
+ */
if(!preview) {
- pool.push(function_bind(&ShaderGraph::simplify, shader->graph, scene));
+ pool.push(function_bind(&BlenderSync::sync_materials_simpligy,
+ this,
+ shader));
+ }
+ else {
+ /* NOTE: Update tagging can access links which are being
+ * optimized out.
+ */
+ shader->tag_update(scene);
}
-
- shader->tag_update(scene);
}
}
diff --git a/intern/cycles/blender/blender_sync.h b/intern/cycles/blender/blender_sync.h
index 36bedc505af..62e2f8f563a 100644
--- a/intern/cycles/blender/blender_sync.h
+++ b/intern/cycles/blender/blender_sync.h
@@ -96,6 +96,7 @@ public:
private:
/* sync */
void sync_lamps(bool update_all);
+ void sync_materials_simpligy(Shader *shader);
void sync_materials(bool update_all);
void sync_objects(BL::SpaceView3D& b_v3d, float motion_time = 0.0f);
void sync_motion(BL::RenderSettings& b_render,
diff --git a/intern/cycles/render/graph.cpp b/intern/cycles/render/graph.cpp
index 0362e8f834a..12fff8e5587 100644
--- a/intern/cycles/render/graph.cpp
+++ b/intern/cycles/render/graph.cpp
@@ -238,6 +238,8 @@ ShaderGraph *ShaderGraph::copy()
foreach(ShaderNode *node, nodes)
newgraph->add(nodes_copy[node]);
+ newgraph->simplified = simplified;
+
return newgraph;
}
@@ -245,7 +247,6 @@ void ShaderGraph::connect(ShaderOutput *from, ShaderInput *to)
{
assert(!finalized);
assert(from && to);
- simplified = false;
if(to->link) {
fprintf(stderr, "Cycles shader graph connect: input already connected.\n");
diff --git a/source/blender/alembic/intern/abc_exporter.cc b/source/blender/alembic/intern/abc_exporter.cc
index 62e779e7fd6..9986db89131 100644
--- a/source/blender/alembic/intern/abc_exporter.cc
+++ b/source/blender/alembic/intern/abc_exporter.cc
@@ -412,7 +412,7 @@ void AbcExporter::createTransformWriter(Object *ob, Object *parent, Object *dupl
BLI_assert(ob != dupliObParent);
/* check if we have already created a transform writer for this object */
- if (getXForm(name) != NULL){
+ if (getXForm(name) != NULL) {
std::cerr << "xform " << name << " already exists\n";
return;
}
diff --git a/source/blender/collada/ArmatureExporter.cpp b/source/blender/collada/ArmatureExporter.cpp
index 49722873a91..9348f3b3285 100644
--- a/source/blender/collada/ArmatureExporter.cpp
+++ b/source/blender/collada/ArmatureExporter.cpp
@@ -304,7 +304,9 @@ void ArmatureExporter::add_bone_transform(Object *ob_arm, Bone *bone, COLLADASW:
}
}
- bc_sanitize_mat(mat, 6); // XXX: Make this optional ?
+ if (this->export_settings->limit_precision)
+ bc_sanitize_mat(mat, 6);
+
TransformWriter::add_node_transform(node, mat, NULL);
}
diff --git a/source/blender/collada/ControllerExporter.cpp b/source/blender/collada/ControllerExporter.cpp
index 5444c9dfa6b..1c2642e8313 100644
--- a/source/blender/collada/ControllerExporter.cpp
+++ b/source/blender/collada/ControllerExporter.cpp
@@ -533,7 +533,8 @@ std::string ControllerExporter::add_inv_bind_mats_source(Object *ob_arm, ListBas
invert_m4_m4(mat, world);
converter.mat4_to_dae(inv_bind_mat, mat);
- bc_sanitize_mat(inv_bind_mat, 6); // XXX: Make this optional ?
+ if (this->export_settings->limit_precision)
+ bc_sanitize_mat(inv_bind_mat, 6);
source.appendValues(inv_bind_mat);
}
}
diff --git a/source/blender/collada/ExportSettings.h b/source/blender/collada/ExportSettings.h
index 03e380dc198..de91f68a492 100644
--- a/source/blender/collada/ExportSettings.h
+++ b/source/blender/collada/ExportSettings.h
@@ -53,6 +53,7 @@ public:
BC_export_transformation_type export_transformation_type;
bool open_sim;
+ bool limit_precision;
bool keep_bind_info;
char *filepath;
diff --git a/source/blender/collada/collada.cpp b/source/blender/collada/collada.cpp
index c0784ca8eb5..bfe3180909b 100644
--- a/source/blender/collada/collada.cpp
+++ b/source/blender/collada/collada.cpp
@@ -59,7 +59,7 @@ int collada_import(bContext *C,
import_settings.find_chains = find_chains != 0;
import_settings.fix_orientation = fix_orientation != 0;
import_settings.min_chain_length = min_chain_length;
- import_settings.keep_bind_info = keep_bind_info;
+ import_settings.keep_bind_info = keep_bind_info !=0;
DocumentImporter imp(C, &import_settings);
if (imp.import()) return 1;
@@ -90,7 +90,7 @@ int collada_export(Scene *sce,
int sort_by_name,
BC_export_transformation_type export_transformation_type,
int open_sim,
-
+ int limit_precision,
int keep_bind_info)
{
ExportSettings export_settings;
@@ -116,8 +116,8 @@ int collada_export(Scene *sce,
export_settings.sort_by_name = sort_by_name != 0;
export_settings.export_transformation_type = export_transformation_type;
export_settings.open_sim = open_sim != 0;
-
- export_settings.keep_bind_info = keep_bind_info;
+ export_settings.limit_precision = limit_precision != 0;
+ export_settings.keep_bind_info = keep_bind_info !=0;
int includeFilter = OB_REL_NONE;
if (export_settings.include_armatures) includeFilter |= OB_REL_MOD_ARMATURE;
diff --git a/source/blender/collada/collada.h b/source/blender/collada/collada.h
index 09acc4a064b..8035af59c8b 100644
--- a/source/blender/collada/collada.h
+++ b/source/blender/collada/collada.h
@@ -85,6 +85,7 @@ int collada_export(struct Scene *sce,
BC_export_transformation_type export_transformation_type,
int open_sim,
+ int limit_precision,
int keep_bind_info);
#ifdef __cplusplus
diff --git a/source/blender/collada/collada_utils.cpp b/source/blender/collada/collada_utils.cpp
index 407f0799014..ac4395e1430 100644
--- a/source/blender/collada/collada_utils.cpp
+++ b/source/blender/collada/collada_utils.cpp
@@ -32,9 +32,6 @@
#include "COLLADAFWMeshPrimitive.h"
#include "COLLADAFWMeshVertexData.h"
-#include "collada_utils.h"
-#include "ExportSettings.h"
-
extern "C" {
#include "DNA_modifier_types.h"
#include "DNA_customdata_types.h"
@@ -64,6 +61,9 @@ extern "C" {
#include "bmesh_tools.h"
}
+#include "collada_utils.h"
+#include "ExportSettings.h"
+
float bc_get_float_value(const COLLADAFW::FloatOrDoubleArray& array, unsigned int index)
{
if (index >= array.getValuesCount())
@@ -824,23 +824,11 @@ void bc_create_restpose_mat(const ExportSettings *export_settings, Bone *bone, f
}
/*
- To get rid of those lengthy float values which make the numbers unreadable.
-*/
-float bc_sanitize_float(float value, float precision)
-{
- float result = floor((value * pow(10, precision) + 0.5)) / pow(10, precision);
- if (abs(result) < 1 / pow(10, precision)) {
- result = 0;
- }
- return result;
-}
-
-/*
Make 4*4 matrices better readable
*/
-void bc_sanitize_mat(float mat[4][4], float precision)
+void bc_sanitize_mat(float mat[4][4], int precision)
{
for (int i = 0; i < 4; i++)
for (int j = 0; j < 4; j++)
- mat[i][j] = bc_sanitize_float(mat[i][j], precision);
+ mat[i][j] = double_round(mat[i][j], precision);
} \ No newline at end of file
diff --git a/source/blender/collada/collada_utils.h b/source/blender/collada/collada_utils.h
index b98f8bfb188..38c0bd5096a 100644
--- a/source/blender/collada/collada_utils.h
+++ b/source/blender/collada/collada_utils.h
@@ -97,8 +97,7 @@ extern bool bc_is_leaf_bone(Bone *bone);
extern EditBone *bc_get_edit_bone(bArmature * armature, char *name);
extern int bc_set_layer(int bitfield, int layer, bool enable);
extern int bc_set_layer(int bitfield, int layer);
-extern float bc_sanitize_float(float value, float precision);
-extern void bc_sanitize_mat(float mat[4][4], float precision);
+extern void bc_sanitize_mat(float mat[4][4], int precision);
extern IDProperty *bc_get_IDProperty(Bone *bone, std::string key);
extern void bc_set_IDProperty(EditBone *ebone, const char *key, float value);
diff --git a/source/blender/depsgraph/intern/depsgraph_tag.cc b/source/blender/depsgraph/intern/depsgraph_tag.cc
index 76d3c8a751c..8e7f8e01a59 100644
--- a/source/blender/depsgraph/intern/depsgraph_tag.cc
+++ b/source/blender/depsgraph/intern/depsgraph_tag.cc
@@ -351,15 +351,24 @@ void DEG_graph_on_visible_update(Main *bmain, Scene *scene)
/* Special trick to get local view to work. */
LINKLIST_FOREACH (Base *, base, &scene->base) {
Object *object = base->object;
- DEG::IDDepsNode *node = graph->find_id_node(&object->id);
- node->layers = 0;
+ DEG::IDDepsNode *id_node = graph->find_id_node(&object->id);
+ id_node->layers = 0;
}
LINKLIST_FOREACH (Base *, base, &scene->base) {
Object *object = base->object;
- DEG::IDDepsNode *node = graph->find_id_node(&object->id);
- node->layers |= base->lay;
+ DEG::IDDepsNode *id_node = graph->find_id_node(&object->id);
+ id_node->layers |= base->lay;
}
DEG::deg_graph_build_flush_layers(graph);
+ LINKLIST_FOREACH (Base *, base, &scene->base) {
+ Object *object = base->object;
+ DEG::IDDepsNode *id_node = graph->find_id_node(&object->id);
+ GHASH_FOREACH_BEGIN(DEG::ComponentDepsNode *, comp, id_node->components)
+ {
+ id_node->layers |= comp->layers;
+ }
+ GHASH_FOREACH_END();
+ }
}
void DEG_on_visible_update(Main *bmain, const bool UNUSED(do_time))
diff --git a/source/blender/editors/gpencil/gpencil_edit.c b/source/blender/editors/gpencil/gpencil_edit.c
index fa9acc36a2b..601a86b97cb 100644
--- a/source/blender/editors/gpencil/gpencil_edit.c
+++ b/source/blender/editors/gpencil/gpencil_edit.c
@@ -2126,10 +2126,10 @@ static int gp_count_subdivision_cuts(bGPDstroke *gps)
int totnewpoints = 0;
for (i = 0, pt = gps->points; i < gps->totpoints && pt; i++, pt++) {
if (pt->flag & GP_SPOINT_SELECT) {
- if (i + 1 < gps->totpoints){
+ if (i + 1 < gps->totpoints) {
if (gps->points[i + 1].flag & GP_SPOINT_SELECT) {
++totnewpoints;
- };
+ }
}
}
}
@@ -2184,7 +2184,7 @@ static int gp_stroke_subdivide_exec(bContext *C, wmOperator *op)
/* if next point is selected add a half way point */
if (pt->flag & GP_SPOINT_SELECT) {
- if (i + 1 < oldtotpoints){
+ if (i + 1 < oldtotpoints) {
if (temp_points[i + 1].flag & GP_SPOINT_SELECT) {
pt_final = &gps->points[i2];
/* Interpolate all values */
@@ -2196,7 +2196,7 @@ static int gp_stroke_subdivide_exec(bContext *C, wmOperator *op)
pt_final->time = interpf(pt->time, next->time, 0.5f);
pt_final->flag |= GP_SPOINT_SELECT;
++i2;
- };
+ }
}
}
}
diff --git a/source/blender/editors/interface/interface_layout.c b/source/blender/editors/interface/interface_layout.c
index 7b0921941e7..9b6547cf8a1 100644
--- a/source/blender/editors/interface/interface_layout.c
+++ b/source/blender/editors/interface/interface_layout.c
@@ -2174,12 +2174,13 @@ static void ui_litem_layout_row(uiLayout *litem)
bool min_flag = item->flag & UI_ITEM_MIN;
/* ignore min flag for rows with right or center alignment */
if (item->type != ITEM_BUTTON &&
- ELEM(((uiLayout *)item)->alignment, UI_LAYOUT_ALIGN_RIGHT, UI_LAYOUT_ALIGN_CENTER) &&
- litem->alignment == UI_LAYOUT_ALIGN_EXPAND &&
- ((uiItem *)litem)->flag & UI_ITEM_MIN) {
+ ELEM(((uiLayout *)item)->alignment, UI_LAYOUT_ALIGN_RIGHT, UI_LAYOUT_ALIGN_CENTER) &&
+ litem->alignment == UI_LAYOUT_ALIGN_EXPAND &&
+ ((uiItem *)litem)->flag & UI_ITEM_MIN)
+ {
min_flag = false;
}
-
+
if ((neww < minw || min_flag) && w != 0) {
/* fixed size */
item->flag |= UI_ITEM_FIXED;
diff --git a/source/blender/editors/io/io_collada.c b/source/blender/editors/io/io_collada.c
index 9b12aa6d475..139c9817437 100644
--- a/source/blender/editors/io/io_collada.c
+++ b/source/blender/editors/io/io_collada.c
@@ -99,6 +99,7 @@ static int wm_collada_export_exec(bContext *C, wmOperator *op)
int export_transformation_type;
int open_sim;
+ int limit_precision;
int keep_bind_info;
int export_count;
@@ -150,6 +151,7 @@ static int wm_collada_export_exec(bContext *C, wmOperator *op)
export_transformation_type = RNA_enum_get(op->ptr, "export_transformation_type_selection");
open_sim = RNA_boolean_get(op->ptr, "open_sim");
+ limit_precision = RNA_boolean_get(op->ptr, "limit_precision");
keep_bind_info = RNA_boolean_get(op->ptr, "keep_bind_info");
/* get editmode results */
@@ -178,6 +180,7 @@ static int wm_collada_export_exec(bContext *C, wmOperator *op)
export_transformation_type,
open_sim,
+ limit_precision,
keep_bind_info
);
@@ -276,9 +279,13 @@ static void uiCollada_exportSettings(uiLayout *layout, PointerRNA *imfptr)
row = uiLayoutRow(box, false);
uiItemR(row, imfptr, "sort_by_name", 0, NULL, ICON_NONE);
+
row = uiLayoutRow(box, false);
uiItemR(row, imfptr, "keep_bind_info", 0, NULL, ICON_NONE);
+ row = uiLayoutRow(box, false);
+ uiItemR(row, imfptr, "limit_precision", 0, NULL, ICON_NONE);
+
}
static void wm_collada_export_draw(bContext *UNUSED(C), wmOperator *op)
@@ -396,6 +403,9 @@ void WM_OT_collada_export(wmOperatorType *ot)
RNA_def_boolean(func, "open_sim", 0, "Export to SL/OpenSim",
"Compatibility mode for SL, OpenSim and other compatible online worlds");
+ RNA_def_boolean(func, "limit_precision", 0,
+ "Limit Precision", "Reduce the precision of the exported data to 6 digits");
+
RNA_def_boolean(func, "keep_bind_info", 0,
"Keep Bind Info", "Store Bindpose information in custom bone properties for later use during Collada export");
@@ -437,7 +447,7 @@ static int wm_collada_import_exec(bContext *C, wmOperator *op)
auto_connect,
fix_orientation,
min_chain_length,
- keep_bind_info) )
+ keep_bind_info) )
{
return OPERATOR_FINISHED;
}
diff --git a/source/blender/editors/transform/transform_snap_object.c b/source/blender/editors/transform/transform_snap_object.c
index 89eb8f787bc..587a62d017d 100644
--- a/source/blender/editors/transform/transform_snap_object.c
+++ b/source/blender/editors/transform/transform_snap_object.c
@@ -1122,15 +1122,14 @@ static bool snapDerivedMesh(
float dist_px_sq = dist_squared_to_projected_aabb_simple(
lpmat, snapdata->win_half, ray_min_dist, snapdata->mval,
ray_org_local, ray_normal_local, bb->vec[0], bb->vec[6]);
- if (dist_px_sq > SQUARE(*dist_px))
- {
+ if (dist_px_sq > SQUARE(*dist_px)) {
return retval;
}
}
else {
/* was BKE_boundbox_ray_hit_check, see: cf6ca226fa58 */
if (!isect_ray_aabb_v3_simple(
- ray_start_local, ray_normal_local, bb->vec[0], bb->vec[6], NULL, NULL))
+ ray_start_local, ray_normal_local, bb->vec[0], bb->vec[6], NULL, NULL))
{
return retval;
}
diff --git a/source/blender/makesrna/intern/rna_scene_api.c b/source/blender/makesrna/intern/rna_scene_api.c
index f3146c9e6a8..9b202120b82 100644
--- a/source/blender/makesrna/intern/rna_scene_api.c
+++ b/source/blender/makesrna/intern/rna_scene_api.c
@@ -285,6 +285,7 @@ static void rna_Scene_collada_export(
int sort_by_name,
int export_transformation_type,
int open_sim,
+ int limit_precision,
int keep_bind_info)
{
collada_export(scene,
@@ -311,6 +312,7 @@ static void rna_Scene_collada_export(
export_transformation_type,
open_sim,
+ limit_precision,
keep_bind_info);
}
@@ -422,7 +424,12 @@ void RNA_api_scene(StructRNA *srna)
RNA_def_boolean(func, "open_sim", false,
"Export to SL/OpenSim", "Compatibility mode for SL, OpenSim and other compatible online worlds");
- RNA_def_boolean(func, "keep_bind_info", false, "Keep Bind Info",
+ RNA_def_boolean(func, "limit_precision", false,
+ "Limit Precision",
+ "Reduce the precision of the exported data to 6 digits");
+
+ RNA_def_boolean(func, "keep_bind_info", false,
+ "Keep Bind Info",
"Store bind pose information in custom bone properties for later use during Collada export");
#endif
diff --git a/source/blender/nodes/shader/nodes/node_shader_normal_map.c b/source/blender/nodes/shader/nodes/node_shader_normal_map.c
index 48d1688c386..e0bf34f42e4 100644
--- a/source/blender/nodes/shader/nodes/node_shader_normal_map.c
+++ b/source/blender/nodes/shader/nodes/node_shader_normal_map.c
@@ -63,7 +63,7 @@ static void node_shader_exec_normal_map(void *data, int UNUSED(thread), bNode *n
CLAMP_MIN(strength, 0.0f);
- float *N = shi->vno;
+ float *N = shi->nmapnorm;
int uv_index = 0;
switch (nm->space) {
case SHD_NORMAL_MAP_TANGENT:
diff --git a/source/blender/render/intern/source/render_texture.c b/source/blender/render/intern/source/render_texture.c
index b4a14f5337d..42e4d4f27f6 100644
--- a/source/blender/render/intern/source/render_texture.c
+++ b/source/blender/render/intern/source/render_texture.c
@@ -1112,14 +1112,15 @@ static int multitex(Tex *tex,
const short which_output,
struct ImagePool *pool,
const bool skip_load_image,
- const bool texnode_preview)
+ const bool texnode_preview,
+ const bool use_nodes)
{
float tmpvec[3];
int retval = 0; /* return value, int:0, col:1, nor:2, everything:3 */
texres->talpha = false; /* is set when image texture returns alpha (considered premul) */
- if (tex->use_nodes && tex->nodetree) {
+ if (use_nodes && tex->use_nodes && tex->nodetree) {
retval = ntreeTexExecTree(tex->nodetree, texres, texvec, dxt, dyt, osatex, thread,
tex, which_output, R.r.cfra, texnode_preview, NULL, NULL);
}
@@ -1239,7 +1240,8 @@ static int multitex_nodes_intern(Tex *tex,
ImagePool *pool,
const bool scene_color_manage,
const bool skip_load_image,
- const bool texnode_preview)
+ const bool texnode_preview,
+ const bool use_nodes)
{
if (tex==NULL) {
memset(texres, 0, sizeof(TexResult));
@@ -1264,7 +1266,8 @@ static int multitex_nodes_intern(Tex *tex,
which_output,
pool,
skip_load_image,
- texnode_preview);
+ texnode_preview,
+ use_nodes);
if (mtex->mapto & (MAP_COL+MAP_COLSPEC+MAP_COLMIR)) {
ImBuf *ibuf = BKE_image_pool_acquire_ibuf(tex->ima, &tex->iuser, pool);
@@ -1311,7 +1314,8 @@ static int multitex_nodes_intern(Tex *tex,
which_output,
pool,
skip_load_image,
- texnode_preview);
+ texnode_preview,
+ use_nodes);
{
ImBuf *ibuf = BKE_image_pool_acquire_ibuf(tex->ima, &tex->iuser, pool);
@@ -1341,7 +1345,8 @@ static int multitex_nodes_intern(Tex *tex,
which_output,
pool,
skip_load_image,
- texnode_preview);
+ texnode_preview,
+ use_nodes);
}
}
@@ -1354,7 +1359,8 @@ int multitex_nodes(Tex *tex, float texvec[3], float dxt[3], float dyt[3], int os
return multitex_nodes_intern(tex, texvec, dxt, dyt, osatex, texres,
thread, which_output, shi, mtex, pool, R.scene_color_manage,
(R.r.scemode & R_NO_IMAGE_LOAD) != 0,
- (R.r.scemode & R_TEXNODE_PREVIEW) != 0);
+ (R.r.scemode & R_TEXNODE_PREVIEW) != 0,
+ true);
}
/* this is called for surface shading */
@@ -1378,7 +1384,8 @@ static int multitex_mtex(ShadeInput *shi, MTex *mtex, float texvec[3], float dxt
mtex->which_output,
pool,
skip_load_image,
- (R.r.scemode & R_TEXNODE_PREVIEW) != 0);
+ (R.r.scemode & R_TEXNODE_PREVIEW) != 0,
+ true);
}
}
@@ -1408,7 +1415,8 @@ int multitex_ext(Tex *tex,
pool,
scene_color_manage,
skip_load_image,
- false);
+ false,
+ true);
}
/* extern-tex doesn't support nodes (ntreeBeginExec() can't be called when rendering is going on)\
@@ -1417,13 +1425,19 @@ int multitex_ext(Tex *tex,
*/
int multitex_ext_safe(Tex *tex, float texvec[3], TexResult *texres, struct ImagePool *pool, bool scene_color_manage, const bool skip_load_image)
{
- int use_nodes= tex->use_nodes, retval;
-
- tex->use_nodes = false;
- retval= multitex_nodes_intern(tex, texvec, NULL, NULL, 0, texres, 0, 0, NULL, NULL, pool, scene_color_manage, skip_load_image, false);
- tex->use_nodes= use_nodes;
-
- return retval;
+ return multitex_nodes_intern(tex,
+ texvec,
+ NULL, NULL,
+ 0,
+ texres,
+ 0,
+ 0,
+ NULL, NULL,
+ pool,
+ scene_color_manage,
+ skip_load_image,
+ false,
+ false);
}
@@ -2873,7 +2887,8 @@ void do_volume_tex(ShadeInput *shi, const float *xyz, int mapto_flag, float col_
mtex->which_output,
re->pool,
skip_load_image,
- texnode_preview); /* NULL = dxt/dyt, 0 = shi->osatex - not supported */
+ texnode_preview,
+ true); /* NULL = dxt/dyt, 0 = shi->osatex - not supported */
/* texture output */
@@ -3051,7 +3066,8 @@ void do_halo_tex(HaloRen *har, float xn, float yn, float col_r[4])
mtex->which_output,
har->pool,
skip_load_image,
- texnode_preview);
+ texnode_preview,
+ true);
/* texture output */
if (rgb && (mtex->texflag & MTEX_RGBTOINT)) {
@@ -3274,7 +3290,8 @@ void do_sky_tex(
mtex->which_output,
R.pool,
skip_load_image,
- texnode_preview);
+ texnode_preview,
+ true);
/* texture output */
if (rgb && (mtex->texflag & MTEX_RGBTOINT)) {
@@ -3500,7 +3517,8 @@ void do_lamp_tex(LampRen *la, const float lavec[3], ShadeInput *shi, float col_r
mtex->which_output,
R.pool,
skip_load_image,
- texnode_preview);
+ texnode_preview,
+ true);
/* texture output */
if (rgb && (mtex->texflag & MTEX_RGBTOINT)) {
@@ -3614,7 +3632,8 @@ int externtex(MTex *mtex,
mtex->which_output,
pool,
skip_load_image,
- texnode_preview);
+ texnode_preview,
+ true);
if (rgb) {
texr.tin = IMB_colormanagement_get_luminance(&texr.tr);
diff --git a/source/blender/windowmanager/intern/wm_files.c b/source/blender/windowmanager/intern/wm_files.c
index 59ba0b6182d..1095195acd5 100644
--- a/source/blender/windowmanager/intern/wm_files.c
+++ b/source/blender/windowmanager/intern/wm_files.c
@@ -809,7 +809,7 @@ int wm_homefile_read(
if (userdef_template == NULL) {
/* we need to have preferences load to overwrite preferences from previous template */
userdef_template = BKE_blendfile_userdef_read_from_memory(
- datatoc_startup_blend, datatoc_startup_blend_size, NULL);
+ datatoc_startup_blend, datatoc_startup_blend_size, NULL);
}
if (userdef_template) {
BKE_blender_userdef_set_app_template(userdef_template);
diff --git a/source/blender/windowmanager/intern/wm_window.c b/source/blender/windowmanager/intern/wm_window.c
index 151c21d3cdd..2027afef103 100644
--- a/source/blender/windowmanager/intern/wm_window.c
+++ b/source/blender/windowmanager/intern/wm_window.c
@@ -421,7 +421,7 @@ static void wm_window_set_dpi(wmWindow *win)
/* Blender's UI drawing assumes DPI 72 as a good default following macOS
* while Windows and Linux use DPI 96. GHOST assumes a default 96 so we
* remap the DPI to Blender's convention. */
- int dpi = auto_dpi * U.ui_scale * (72.0/96.0f);
+ int dpi = auto_dpi * U.ui_scale * (72.0 / 96.0f);
/* Automatically set larger pixel size for high DPI. */
int pixelsize = MAX2(1, dpi / 54);
diff --git a/source/blenderplayer/bad_level_call_stubs/stubs.c b/source/blenderplayer/bad_level_call_stubs/stubs.c
index c8cefc94fe5..010209f3b27 100644
--- a/source/blenderplayer/bad_level_call_stubs/stubs.c
+++ b/source/blenderplayer/bad_level_call_stubs/stubs.c
@@ -756,6 +756,7 @@ int collada_export(struct Scene *sce,
int sort_by_name,
BC_export_transformation_type export_transformation_type,
int open_sim,
+ int limit_precision,
int keep_bind_info) RET_ZERO
void ED_mesh_calc_tessface(struct Mesh *mesh, bool free_mpoly) RET_NONE