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:
authorCampbell Barton <ideasman42@gmail.com>2017-11-30 10:30:41 +0300
committerCampbell Barton <ideasman42@gmail.com>2017-11-30 10:30:41 +0300
commit03a5eccc945497da3cffafdf050c17fb4ccf999c (patch)
treeb451841a8bb0e614184de8a530322f4e45736b51 /source/blender
parent84d39ab97bba5d4885a062363c8b3f3d28cb7da7 (diff)
parent28d2148b09a2d975876f4418bd5ba15ab5edea8d (diff)
Merge branch 'master' into blender2.8
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/blenkernel/intern/texture.c4
-rw-r--r--source/blender/blenlib/BLI_sys_types.h4
-rw-r--r--source/blender/blenlib/intern/fileops.c16
-rw-r--r--source/blender/blenlib/intern/storage.c2
-rw-r--r--source/blender/editors/armature/armature_select.c14
5 files changed, 36 insertions, 4 deletions
diff --git a/source/blender/blenkernel/intern/texture.c b/source/blender/blenkernel/intern/texture.c
index 50bb3a5f10d..122b605f160 100644
--- a/source/blender/blenkernel/intern/texture.c
+++ b/source/blender/blenkernel/intern/texture.c
@@ -1165,6 +1165,10 @@ void set_current_material_texture(Material *ma, Tex *newtex)
ma->mtex[act] = BKE_texture_mtex_add();
/* Reset this slot's ON/OFF toggle, for materials, when slot was empty. */
ma->septex &= ~(1 << act);
+ /* For volumes the default UV texture coordinates are not available. */
+ if (ma->material_type == MA_TYPE_VOLUME) {
+ ma->mtex[act]->texco = TEXCO_ORCO;
+ }
}
ma->mtex[act]->tex = newtex;
diff --git a/source/blender/blenlib/BLI_sys_types.h b/source/blender/blenlib/BLI_sys_types.h
index 9477f61713c..80ee50621ca 100644
--- a/source/blender/blenlib/BLI_sys_types.h
+++ b/source/blender/blenlib/BLI_sys_types.h
@@ -47,7 +47,9 @@
extern "C" {
#endif
-#if defined(__linux__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__FreeBSD_kernel__) || defined(__GNU__)
+#if defined(__linux__) || defined(__GNU__) || \
+ defined(__NetBSD__) || defined(__OpenBSD__) || defined(__FreeBSD_kernel__) || \
+ defined(__HAIKU__)
/* Linux-i386, Linux-Alpha, Linux-ppc */
#include <stdint.h>
diff --git a/source/blender/blenlib/intern/fileops.c b/source/blender/blenlib/intern/fileops.c
index 36a0d1c1641..ad53457f863 100644
--- a/source/blender/blenlib/intern/fileops.c
+++ b/source/blender/blenlib/intern/fileops.c
@@ -621,7 +621,21 @@ static int recursive_operation(const char *startfrom, const char *startto,
if (to)
join_dirfile_alloc(&to_path, &to_alloc_len, to, dirent->d_name);
- if (dirent->d_type == DT_DIR) {
+ bool is_dir;
+
+#ifdef __HAIKU__
+ {
+ struct stat st_dir;
+ char filename[FILE_MAX];
+ BLI_path_join(filename, sizeof(filename), startfrom, dirent->d_name, NULL);
+ lstat(filename, &st_dir);
+ is_dir = S_ISDIR(st_dir.st_mode);
+ }
+#else
+ is_dir = (dirent->d_type == DT_DIR);
+#endif
+
+ if (is_dir) {
/* recursively dig into a subfolder */
ret = recursive_operation(from_path, to_path, callback_dir_pre, callback_file, callback_dir_post);
}
diff --git a/source/blender/blenlib/intern/storage.c b/source/blender/blenlib/intern/storage.c
index e31659c35d9..c08329ef34f 100644
--- a/source/blender/blenlib/intern/storage.c
+++ b/source/blender/blenlib/intern/storage.c
@@ -37,7 +37,7 @@
#include <sys/stat.h>
-#if defined(__NetBSD__) || defined(__DragonFly__)
+#if defined(__NetBSD__) || defined(__DragonFly__) || defined(__HAIKU__)
/* Other modern unix os's should probably use this also */
# include <sys/statvfs.h>
# define USE_STATFS_STATVFS
diff --git a/source/blender/editors/armature/armature_select.c b/source/blender/editors/armature/armature_select.c
index e32324d25f9..b87942fed84 100644
--- a/source/blender/editors/armature/armature_select.c
+++ b/source/blender/editors/armature/armature_select.c
@@ -807,6 +807,7 @@ enum {
SIMEDBONE_PREFIX,
SIMEDBONE_SUFFIX,
SIMEDBONE_LAYER,
+ SIMEDBONE_GROUP,
SIMEDBONE_SHAPE,
};
@@ -819,6 +820,7 @@ static const EnumPropertyItem prop_similar_types[] = {
{SIMEDBONE_PREFIX, "PREFIX", 0, "Prefix", ""},
{SIMEDBONE_SUFFIX, "SUFFIX", 0, "Suffix", ""},
{SIMEDBONE_LAYER, "LAYER", 0, "Layer", ""},
+ {SIMEDBONE_GROUP, "GROUP", 0, "Group", ""},
{SIMEDBONE_SHAPE, "SHAPE", 0, "Shape", ""},
{0, NULL, 0, NULL, NULL}
};
@@ -1009,6 +1011,9 @@ static int armature_select_similar_exec(bContext *C, wmOperator *op)
return OPERATOR_CANCELLED;
}
+#define STRUCT_SIZE_AND_OFFSET(_struct, _member) \
+ sizeof(((_struct *)NULL)->_member), offsetof(_struct, _member)
+
switch (type) {
case SIMEDBONE_CHILDREN:
select_similar_children(arm, ebone_act);
@@ -1034,13 +1039,20 @@ static int armature_select_similar_exec(bContext *C, wmOperator *op)
case SIMEDBONE_LAYER:
select_similar_layer(arm, ebone_act);
break;
+ case SIMEDBONE_GROUP:
+ select_similar_data_pchan(
+ arm, obedit, ebone_act,
+ STRUCT_SIZE_AND_OFFSET(bPoseChannel, agrp_index));
+ break;
case SIMEDBONE_SHAPE:
select_similar_data_pchan(
arm, obedit, ebone_act,
- sizeof(void *), offsetof(bPoseChannel, custom));
+ STRUCT_SIZE_AND_OFFSET(bPoseChannel, custom));
break;
}
+#undef STRUCT_SIZE_AND_OFFSET
+
WM_event_add_notifier(C, NC_OBJECT | ND_BONE_SELECT, obedit);
return OPERATOR_FINISHED;