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:
authorNicholas Bishop <nicholasbishop@gmail.com>2015-02-13 13:39:35 +0300
committerNicholas Bishop <nicholasbishop@gmail.com>2015-02-13 13:39:35 +0300
commit95be60e5c5db1135f19b28693ca6e7e45bd135d1 (patch)
tree3b26fb7c36b13b07ec999b5a9a5b7868dbd0fef2
parent05791c524ebd4e66536a944a6954787659aac98a (diff)
parent261cd7f6bfb29a665819c2cfc64da6edee9ca6e2 (diff)
Merge remote-tracking branch 'origin/master' into cycles-ptex-49
-rwxr-xr-xbuild_files/cmake/cmake_consistency_check.py2
-rw-r--r--intern/cycles/util/util_sseb.h4
-rw-r--r--intern/cycles/util/util_ssef.h4
-rw-r--r--intern/cycles/util/util_ssei.h4
-rw-r--r--intern/ghost/intern/GHOST_SystemX11.cpp6
-rw-r--r--intern/ghost/intern/GHOST_SystemX11.h6
-rw-r--r--intern/ghost/intern/GHOST_WindowX11.cpp14
-rw-r--r--release/scripts/modules/bl_i18n_utils/bl_extract_messages.py6
-rw-r--r--release/scripts/modules/bpy_extras/keyconfig_utils.py2
-rw-r--r--release/scripts/startup/bl_operators/clip.py4
-rw-r--r--release/scripts/startup/bl_ui/properties_game.py1
-rw-r--r--release/scripts/startup/bl_ui/space_filebrowser.py1
-rw-r--r--release/scripts/startup/bl_ui/space_sequencer.py14
-rw-r--r--release/scripts/startup/bl_ui/space_view3d.py4
-rw-r--r--release/scripts/startup/bl_ui/space_view3d_toolbar.py2
-rw-r--r--source/blender/blenkernel/BKE_blender.h2
-rw-r--r--source/blender/blenkernel/BKE_modifier.h2
-rw-r--r--source/blender/blenkernel/intern/modifier.c5
-rw-r--r--source/blender/blenlib/BLI_path_util.h2
-rw-r--r--source/blender/blenlib/intern/path_util.c8
-rw-r--r--source/blender/blenloader/intern/versioning_270.c15
-rw-r--r--source/blender/bmesh/intern/bmesh_interp.c36
-rw-r--r--source/blender/editors/interface/interface_layout.c34
-rw-r--r--source/blender/gpu/shaders/gpu_shader_material.glsl3
-rw-r--r--source/blender/makesrna/intern/rna_screen.c2
-rw-r--r--source/blender/python/generic/CMakeLists.txt3
-rw-r--r--source/gameengine/Physics/Bullet/CcdPhysicsController.cpp4
-rw-r--r--source/gameengine/Physics/Bullet/CcdPhysicsController.h1
-rw-r--r--source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLRasterizer.cpp46
-rw-r--r--tests/python/batch_import.py4
30 files changed, 141 insertions, 100 deletions
diff --git a/build_files/cmake/cmake_consistency_check.py b/build_files/cmake/cmake_consistency_check.py
index 3de27ffb1e4..4b220316548 100755
--- a/build_files/cmake/cmake_consistency_check.py
+++ b/build_files/cmake/cmake_consistency_check.py
@@ -187,6 +187,8 @@ def cmake_get_src(f):
pass
elif new_file.endswith(".osl"): # open shading language
pass
+ elif new_file.endswith(".glsl"):
+ pass
else:
raise Exception("unknown file type - not c or h %s -> %s" % (f, new_file))
diff --git a/intern/cycles/util/util_sseb.h b/intern/cycles/util/util_sseb.h
index b517dc95adc..61892f4a71f 100644
--- a/intern/cycles/util/util_sseb.h
+++ b/intern/cycles/util/util_sseb.h
@@ -153,14 +153,14 @@ __forceinline bool none ( const sseb& b ) { return _mm_movemask_ps(b) == 0x
__forceinline size_t movemask( const sseb& a ) { return _mm_movemask_ps(a); }
-#endif
-
ccl_device_inline void print_sseb(const char *label, const sseb &a)
{
printf("%s: %df %df %df %d\n",
label, a[0], a[1], a[2], a[3]);
}
+#endif
+
CCL_NAMESPACE_END
#endif
diff --git a/intern/cycles/util/util_ssef.h b/intern/cycles/util/util_ssef.h
index dfbc8416b96..80911cd7282 100644
--- a/intern/cycles/util/util_ssef.h
+++ b/intern/cycles/util/util_ssef.h
@@ -580,8 +580,6 @@ ccl_device_inline const ssef set_sign_bit(const ssef &a)
return a ^ cast(ssei(S1 << 31, S2 << 31, S3 << 31, S4 << 31));
}
-#endif
-
ccl_device_inline void print_ssef(const char *label, const ssef &a)
{
printf("%s: %.8f %.8f %.8f %.8f\n",
@@ -592,6 +590,8 @@ ccl_device_inline void print_ssef(const char *label, const ssef &a)
(double)a[3]);
}
+#endif
+
CCL_NAMESPACE_END
#endif
diff --git a/intern/cycles/util/util_ssei.h b/intern/cycles/util/util_ssei.h
index 45d2542acce..b2a71a8d396 100644
--- a/intern/cycles/util/util_ssei.h
+++ b/intern/cycles/util/util_ssei.h
@@ -286,14 +286,14 @@ __forceinline void store4i_nt(void* ptr, const ssei& v) {
#endif
}
-#endif
-
ccl_device_inline void print_ssei(const char *label, const ssei &a)
{
printf("%s: %df %df %df %d\n",
label, a[0], a[1], a[2], a[3]);
}
+#endif
+
CCL_NAMESPACE_END
#endif
diff --git a/intern/ghost/intern/GHOST_SystemX11.cpp b/intern/ghost/intern/GHOST_SystemX11.cpp
index d4693e99fa5..e8199288fb2 100644
--- a/intern/ghost/intern/GHOST_SystemX11.cpp
+++ b/intern/ghost/intern/GHOST_SystemX11.cpp
@@ -1181,7 +1181,11 @@ GHOST_SystemX11::processEvent(XEvent *xe)
default:
{
#ifdef WITH_X11_XINPUT
- if (xe->type == m_xtablet.MotionEvent) {
+ if (xe->type == m_xtablet.MotionEvent ||
+ xe->type == m_xtablet.MotionEventEraser ||
+ xe->type == m_xtablet.PressEvent ||
+ xe->type == m_xtablet.PressEventEraser)
+ {
XDeviceMotionEvent *data = (XDeviceMotionEvent *)xe;
const unsigned char axis_first = data->first_axis;
const unsigned char axes_end = axis_first + data->axes_count; /* after the last */
diff --git a/intern/ghost/intern/GHOST_SystemX11.h b/intern/ghost/intern/GHOST_SystemX11.h
index bc35b6c6026..378f07dd0bd 100644
--- a/intern/ghost/intern/GHOST_SystemX11.h
+++ b/intern/ghost/intern/GHOST_SystemX11.h
@@ -286,6 +286,12 @@ public:
int MotionEvent;
int ProxInEvent;
int ProxOutEvent;
+ int PressEvent;
+
+ int MotionEventEraser;
+ int ProxInEventEraser;
+ int ProxOutEventEraser;
+ int PressEventEraser;
int PressureLevels;
int XtiltLevels, YtiltLevels;
diff --git a/intern/ghost/intern/GHOST_WindowX11.cpp b/intern/ghost/intern/GHOST_WindowX11.cpp
index 5e2a881dd17..4e619264401 100644
--- a/intern/ghost/intern/GHOST_WindowX11.cpp
+++ b/intern/ghost/intern/GHOST_WindowX11.cpp
@@ -570,18 +570,18 @@ void GHOST_WindowX11::initXInputDevices()
if (version && (version != (XExtensionVersion *)NoSuchExtension)) {
if (version->present) {
GHOST_SystemX11::GHOST_TabletX11 &xtablet = m_system->GetXTablet();
- XEventClass xevents[10], ev;
+ XEventClass xevents[8], ev;
int dcount = 0;
/* With modern XInput (xlib 1.6.2 at least and/or evdev 2.9.0) and some 'no-name' tablets
- * like 'UC-LOGIC Tablet WP5540U', we also need to 'select' Button1 for motion event,
+ * like 'UC-LOGIC Tablet WP5540U', we also need to 'select' ButtonPress for motion event,
* otherwise we do not get any tablet motion event once pen is pressed... See T43367.
*/
if (xtablet.StylusDevice) {
DeviceMotionNotify(xtablet.StylusDevice, xtablet.MotionEvent, ev);
if (ev) xevents[dcount++] = ev;
- DeviceButton1Motion(xtablet.StylusDevice, xtablet.MotionEvent, ev);
+ DeviceButtonPress(xtablet.StylusDevice, xtablet.PressEvent, ev);
if (ev) xevents[dcount++] = ev;
ProximityIn(xtablet.StylusDevice, xtablet.ProxInEvent, ev);
if (ev) xevents[dcount++] = ev;
@@ -589,13 +589,13 @@ void GHOST_WindowX11::initXInputDevices()
if (ev) xevents[dcount++] = ev;
}
if (xtablet.EraserDevice) {
- DeviceMotionNotify(xtablet.EraserDevice, xtablet.MotionEvent, ev);
+ DeviceMotionNotify(xtablet.EraserDevice, xtablet.MotionEventEraser, ev);
if (ev) xevents[dcount++] = ev;
- DeviceButton1Motion(xtablet.EraserDevice, xtablet.MotionEvent, ev);
+ DeviceButtonPress(xtablet.EraserDevice, xtablet.PressEventEraser, ev);
if (ev) xevents[dcount++] = ev;
- ProximityIn(xtablet.EraserDevice, xtablet.ProxInEvent, ev);
+ ProximityIn(xtablet.EraserDevice, xtablet.ProxInEventEraser, ev);
if (ev) xevents[dcount++] = ev;
- ProximityOut(xtablet.EraserDevice, xtablet.ProxOutEvent, ev);
+ ProximityOut(xtablet.EraserDevice, xtablet.ProxOutEventEraser, ev);
if (ev) xevents[dcount++] = ev;
}
diff --git a/release/scripts/modules/bl_i18n_utils/bl_extract_messages.py b/release/scripts/modules/bl_i18n_utils/bl_extract_messages.py
index d434c6a79cd..c3b2ae9908b 100644
--- a/release/scripts/modules/bl_i18n_utils/bl_extract_messages.py
+++ b/release/scripts/modules/bl_i18n_utils/bl_extract_messages.py
@@ -258,7 +258,7 @@ def dump_rna_messages(msgs, reports, settings, verbose=False):
bpy.types.Panel.__subclasses__() +
bpy.types.Menu.__subclasses__() +
bpy.types.UIList.__subclasses__()
- if cls.__name__ not in _rna_clss_ids}
+ if cls.__name__ not in _rna_clss_ids}
# Collect internal operators
# extend with all internal operators
@@ -266,8 +266,8 @@ def dump_rna_messages(msgs, reports, settings, verbose=False):
# XXX Do not skip INTERNAL's anymore, some of those ops show up in UI now!
# all possible operator names
#op_ids = (set(cls.bl_rna.identifier for cls in bpy.types.OperatorProperties.__subclasses__()) |
- #set(cls.bl_rna.identifier for cls in bpy.types.Operator.__subclasses__()) |
- #set(cls.bl_rna.identifier for cls in bpy.types.OperatorMacro.__subclasses__()))
+ # set(cls.bl_rna.identifier for cls in bpy.types.Operator.__subclasses__()) |
+ # set(cls.bl_rna.identifier for cls in bpy.types.OperatorMacro.__subclasses__()))
#get_instance = __import__("_bpy").ops.get_instance
#path_resolve = type(bpy.context).__base__.path_resolve
diff --git a/release/scripts/modules/bpy_extras/keyconfig_utils.py b/release/scripts/modules/bpy_extras/keyconfig_utils.py
index abc613bfa14..7e4c9e885e7 100644
--- a/release/scripts/modules/bpy_extras/keyconfig_utils.py
+++ b/release/scripts/modules/bpy_extras/keyconfig_utils.py
@@ -33,7 +33,7 @@ KM_HIERARCHY = [
('View2D Buttons List', 'EMPTY', 'WINDOW', []), # view 2d with buttons navigation
('Header', 'EMPTY', 'WINDOW', []), # header stuff (per region)
- ('Grease Pencil', 'EMPTY', 'WINDOW', [ # grease pencil stuff (per region)
+ ('Grease Pencil', 'EMPTY', 'WINDOW', [ # grease pencil stuff (per region)
('Grease Pencil Stroke Edit Mode', 'EMPTY', 'WINDOW', []),
]),
diff --git a/release/scripts/startup/bl_operators/clip.py b/release/scripts/startup/bl_operators/clip.py
index 99819166adc..5ce09b30d1f 100644
--- a/release/scripts/startup/bl_operators/clip.py
+++ b/release/scripts/startup/bl_operators/clip.py
@@ -162,8 +162,8 @@ class CLIP_OT_filter_tracks(bpy.types.Operator):
# Find tracks with markers in both this frame and the previous one.
relevant_tracks = [
track for track in clip.tracking.tracks
- if track.markers.find_frame(frame) and
- track.markers.find_frame(frame - 1)]
+ if (track.markers.find_frame(frame) and
+ track.markers.find_frame(frame - 1))]
if not relevant_tracks:
continue
diff --git a/release/scripts/startup/bl_ui/properties_game.py b/release/scripts/startup/bl_ui/properties_game.py
index 4cb6929f290..3daf938d6b9 100644
--- a/release/scripts/startup/bl_ui/properties_game.py
+++ b/release/scripts/startup/bl_ui/properties_game.py
@@ -100,6 +100,7 @@ class PHYSICS_PT_game_physics(PhysicsButtonsPanel, Panel):
sub.prop(game, "damping", text="Translation", slider=True)
sub.prop(game, "rotation_damping", text="Rotation", slider=True)
+ if physics_type == 'RIGID_BODY':
layout.separator()
split = layout.split()
diff --git a/release/scripts/startup/bl_ui/space_filebrowser.py b/release/scripts/startup/bl_ui/space_filebrowser.py
index ded307e8680..bdd8a107197 100644
--- a/release/scripts/startup/bl_ui/space_filebrowser.py
+++ b/release/scripts/startup/bl_ui/space_filebrowser.py
@@ -81,7 +81,6 @@ class FILEBROWSER_HT_header(Header):
row.prop(params, "filter_search", text="", icon='VIEWZOOM')
-
class FILEBROWSER_UL_dir(bpy.types.UIList):
def draw_item(self, context, layout, data, item, icon, active_data, active_propname, index):
direntry = item
diff --git a/release/scripts/startup/bl_ui/space_sequencer.py b/release/scripts/startup/bl_ui/space_sequencer.py
index 834973a9a36..0be1bf0b90a 100644
--- a/release/scripts/startup/bl_ui/space_sequencer.py
+++ b/release/scripts/startup/bl_ui/space_sequencer.py
@@ -928,19 +928,19 @@ class SEQUENCER_PT_proxy(SequencerButtonsPanel, Panel):
enabled = ""
row = layout.row()
if (strip.proxy.build_25):
- enabled += "25% "
+ enabled += "25% "
if (strip.proxy.build_50):
- enabled += "50% "
+ enabled += "50% "
if (strip.proxy.build_75):
- enabled += "75% "
+ enabled += "75% "
if (strip.proxy.build_100):
- enabled += "100% "
+ enabled += "100% "
row.label(enabled)
if (strip.proxy.use_overwrite):
- layout.label("Overwrite On")
+ layout.label("Overwrite On")
else:
- layout.label("Overwrite Off")
+ layout.label("Overwrite Off")
col = layout.column()
col.label(text="Build JPEG quality")
@@ -953,7 +953,7 @@ class SEQUENCER_PT_proxy(SequencerButtonsPanel, Panel):
col.prop(strip.proxy, "timecode")
col = layout.column()
- col.operator("sequencer.enable_proxies")
+ col.operator("sequencer.enable_proxies")
col.operator("sequencer.rebuild_proxy")
diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py
index b5bd13781f7..845e568d106 100644
--- a/release/scripts/startup/bl_ui/space_view3d.py
+++ b/release/scripts/startup/bl_ui/space_view3d.py
@@ -3206,8 +3206,8 @@ class VIEW3D_PT_background_image(Panel):
row = box.row()
if bg.view_axis != 'CAMERA':
- row.prop(bg, "rotation")
- row.prop(bg, "size")
+ row.prop(bg, "rotation")
+ row.prop(bg, "size")
class VIEW3D_PT_transform_orientations(Panel):
diff --git a/release/scripts/startup/bl_ui/space_view3d_toolbar.py b/release/scripts/startup/bl_ui/space_view3d_toolbar.py
index c0baeafe5fc..3646d214bde 100644
--- a/release/scripts/startup/bl_ui/space_view3d_toolbar.py
+++ b/release/scripts/startup/bl_ui/space_view3d_toolbar.py
@@ -1724,7 +1724,7 @@ class VIEW3D_PT_tools_projectpaint(View3DPaintPanel, Panel):
layout.prop(ipaint, "use_cavity")
if ipaint.use_cavity:
layout.template_curve_mapping(ipaint, "cavity_curve", brush=True)
-
+
layout.prop(ipaint, "seam_bleed")
layout.prop(ipaint, "dither")
self.unified_paint_settings(layout, context)
diff --git a/source/blender/blenkernel/BKE_blender.h b/source/blender/blenkernel/BKE_blender.h
index 610a63cb954..34d34e92447 100644
--- a/source/blender/blenkernel/BKE_blender.h
+++ b/source/blender/blenkernel/BKE_blender.h
@@ -42,7 +42,7 @@ extern "C" {
* and keep comment above the defines.
* Use STRINGIFY() rather than defining with quotes */
#define BLENDER_VERSION 273
-#define BLENDER_SUBVERSION 7
+#define BLENDER_SUBVERSION 8
/* 262 was the last editmesh release but it has compatibility code for bmesh data */
#define BLENDER_MINVERSION 270
#define BLENDER_MINSUBVERSION 5
diff --git a/source/blender/blenkernel/BKE_modifier.h b/source/blender/blenkernel/BKE_modifier.h
index 75616b9df78..12eb78e422b 100644
--- a/source/blender/blenkernel/BKE_modifier.h
+++ b/source/blender/blenkernel/BKE_modifier.h
@@ -319,7 +319,7 @@ ModifierTypeInfo *modifierType_getInfo(ModifierType type);
struct ModifierData *modifier_new(int type);
void modifier_free(struct ModifierData *md);
-void modifier_unique_name(struct ListBase *modifiers, struct ModifierData *md);
+bool modifier_unique_name(struct ListBase *modifiers, struct ModifierData *md);
void modifier_copyData_generic(const struct ModifierData *md, struct ModifierData *target);
void modifier_copyData(struct ModifierData *md, struct ModifierData *target);
diff --git a/source/blender/blenkernel/intern/modifier.c b/source/blender/blenkernel/intern/modifier.c
index 021e564ef95..42247d866e4 100644
--- a/source/blender/blenkernel/intern/modifier.c
+++ b/source/blender/blenkernel/intern/modifier.c
@@ -143,13 +143,14 @@ void modifier_free(ModifierData *md)
MEM_freeN(md);
}
-void modifier_unique_name(ListBase *modifiers, ModifierData *md)
+bool modifier_unique_name(ListBase *modifiers, ModifierData *md)
{
if (modifiers && md) {
ModifierTypeInfo *mti = modifierType_getInfo(md->type);
- BLI_uniquename(modifiers, md, DATA_(mti->name), '.', offsetof(ModifierData, name), sizeof(md->name));
+ return BLI_uniquename(modifiers, md, DATA_(mti->name), '.', offsetof(ModifierData, name), sizeof(md->name));
}
+ return false;
}
bool modifier_dependsOnTime(ModifierData *md)
diff --git a/source/blender/blenlib/BLI_path_util.h b/source/blender/blenlib/BLI_path_util.h
index 7103f8a7597..d99df24aaf7 100644
--- a/source/blender/blenlib/BLI_path_util.h
+++ b/source/blender/blenlib/BLI_path_util.h
@@ -87,7 +87,7 @@ bool BLI_testextensie_glob(const char *str, const char *ext_fnmatch) ATTR_NONNUL
bool BLI_replace_extension(char *path, size_t maxlen, const char *ext) ATTR_NONNULL();
bool BLI_ensure_extension(char *path, size_t maxlen, const char *ext) ATTR_NONNULL();
bool BLI_ensure_filename(char *filepath, size_t maxlen, const char *filename) ATTR_NONNULL();
-void BLI_uniquename(struct ListBase *list, void *vlink, const char *defname, char delim, int name_offs, int len);
+bool BLI_uniquename(struct ListBase *list, void *vlink, const char *defname, char delim, int name_offs, int len);
bool BLI_uniquename_cb(bool (*unique_check)(void *arg, const char *name),
void *arg, const char *defname, char delim, char *name, int name_len);
void BLI_newname(char *name, int add);
diff --git a/source/blender/blenlib/intern/path_util.c b/source/blender/blenlib/intern/path_util.c
index fb4c31d5cdf..72739018399 100644
--- a/source/blender/blenlib/intern/path_util.c
+++ b/source/blender/blenlib/intern/path_util.c
@@ -290,7 +290,7 @@ static bool uniquename_unique_check(void *arg, const char *name)
/**
* Ensures that the specified block has a unique name within the containing list,
- * incrementing its numeric suffix as necessary.
+ * incrementing its numeric suffix as necessary. Returns true if name had to be adjusted.
*
* \param list List containing the block
* \param vlink The block to check the name for
@@ -299,7 +299,7 @@ static bool uniquename_unique_check(void *arg, const char *name)
* \param name_offs Offset of name within block structure
* \param name_len Maximum length of name area
*/
-void BLI_uniquename(ListBase *list, void *vlink, const char *defname, char delim, int name_offs, int name_len)
+bool BLI_uniquename(ListBase *list, void *vlink, const char *defname, char delim, int name_offs, int name_len)
{
struct {ListBase *lb; void *vlink; int name_offs; } data;
data.lb = list;
@@ -310,9 +310,9 @@ void BLI_uniquename(ListBase *list, void *vlink, const char *defname, char delim
/* See if we are given an empty string */
if (ELEM(NULL, vlink, defname))
- return;
+ return false;
- BLI_uniquename_cb(uniquename_unique_check, &data, defname, delim, GIVE_STRADDR(vlink, name_offs), name_len);
+ return BLI_uniquename_cb(uniquename_unique_check, &data, defname, delim, GIVE_STRADDR(vlink, name_offs), name_len);
}
static int BLI_path_unc_prefix_len(const char *path); /* defined below in same file */
diff --git a/source/blender/blenloader/intern/versioning_270.c b/source/blender/blenloader/intern/versioning_270.c
index 23bf291b981..1afdc348c24 100644
--- a/source/blender/blenloader/intern/versioning_270.c
+++ b/source/blender/blenloader/intern/versioning_270.c
@@ -51,6 +51,7 @@
#include "DNA_genfile.h"
#include "BKE_main.h"
+#include "BKE_modifier.h"
#include "BKE_node.h"
#include "BKE_screen.h"
@@ -602,4 +603,18 @@ void blo_do_versions_270(FileData *fd, Library *UNUSED(lib), Main *main)
}
}
}
+
+ if (!MAIN_VERSION_ATLEAST(main, 273, 8)) {
+ Object *ob;
+ for (ob = main->object.first; ob != NULL; ob = ob->id.next) {
+ ModifierData *md;
+ for (md = ob->modifiers.last; md != NULL; md = md->prev) {
+ if (modifier_unique_name(&ob->modifiers, md)) {
+ printf("Warning: Object '%s' had several modifiers with the "
+ "same name, renamed one of them to '%s'.\n",
+ ob->id.name + 2, md->name);
+ }
+ }
+ }
+ }
}
diff --git a/source/blender/bmesh/intern/bmesh_interp.c b/source/blender/bmesh/intern/bmesh_interp.c
index 45da3ce85bc..a88f38caf78 100644
--- a/source/blender/bmesh/intern/bmesh_interp.c
+++ b/source/blender/bmesh/intern/bmesh_interp.c
@@ -961,31 +961,27 @@ static void bm_loop_walk_add(struct LoopWalkCtx *lwc, BMLoop *l)
*/
static void bm_loop_walk_data(struct LoopWalkCtx *lwc, BMLoop *l_walk)
{
+ int i;
+
BLI_assert(CustomData_data_equals(lwc->type, lwc->data_ref, BM_ELEM_CD_GET_VOID_P(l_walk, lwc->cd_layer_offset)));
BLI_assert(BM_elem_flag_test(l_walk, BM_ELEM_INTERNAL_TAG) == false);
bm_loop_walk_add(lwc, l_walk);
-#define WALK_LOOP(l_test) \
-{ \
- BMLoop *l_other = l_test; \
- if (l_other->v != l_walk->v) { \
- l_other = l_other->next; \
- } \
- BLI_assert(l_other->v == l_walk->v); \
- if (!BM_elem_flag_test(l_other, BM_ELEM_INTERNAL_TAG)) { \
- if (CustomData_data_equals(lwc->type, lwc->data_ref, BM_ELEM_CD_GET_VOID_P(l_other, lwc->cd_layer_offset))) { \
- bm_loop_walk_data(lwc, l_other); \
- } \
- } \
-} (void)0
-
- if (l_walk->radial_next != l_walk) {
- WALK_LOOP(l_walk->radial_next);
- }
-
- if (l_walk->prev->radial_next != l_walk->prev) {
- WALK_LOOP(l_walk->prev->radial_next);
+ /* recurse around this loop-fan (in both directions) */
+ for (i = 0; i < 2; i++) {
+ BMLoop *l_other = ((i == 0) ? l_walk : l_walk->prev)->radial_next;
+ if (l_other->radial_next != l_other) {
+ if (l_other->v != l_walk->v) {
+ l_other = l_other->next;
+ }
+ BLI_assert(l_other->v == l_walk->v);
+ if (!BM_elem_flag_test(l_other, BM_ELEM_INTERNAL_TAG)) {
+ if (CustomData_data_equals(lwc->type, lwc->data_ref, BM_ELEM_CD_GET_VOID_P(l_other, lwc->cd_layer_offset))) {
+ bm_loop_walk_data(lwc, l_other);
+ }
+ }
+ }
}
}
diff --git a/source/blender/editors/interface/interface_layout.c b/source/blender/editors/interface/interface_layout.c
index fb73b8ec34c..44c1ed474d5 100644
--- a/source/blender/editors/interface/interface_layout.c
+++ b/source/blender/editors/interface/interface_layout.c
@@ -184,7 +184,7 @@ static const char *ui_item_name_add_colon(const char *name, char namestr[UI_MAX_
return name;
}
-static int ui_item_fit(int item, int pos, int all, int available, int last, int alignment, int *offset)
+static int ui_item_fit(int item, int pos, int all, int available, bool is_last, int alignment, int *offset)
{
if (offset)
*offset = 0;
@@ -195,7 +195,7 @@ static int ui_item_fit(int item, int pos, int all, int available, int last, int
if (all > available) {
/* contents is bigger than available space */
- if (last)
+ if (is_last)
return available - pos;
else
return (item * available) / all;
@@ -203,7 +203,7 @@ static int ui_item_fit(int item, int pos, int all, int available, int last, int
else {
/* contents is smaller or equal to available space */
if (alignment == UI_LAYOUT_ALIGN_EXPAND) {
- if (last)
+ if (is_last)
return available - pos;
else
return (item * available) / all;
@@ -358,7 +358,7 @@ static void ui_layer_but_cb(bContext *C, void *arg_but, void *arg_index)
/* create buttons for an item with an RNA array */
static void ui_item_array(uiLayout *layout, uiBlock *block, const char *name, int icon,
PointerRNA *ptr, PropertyRNA *prop, int len, int x, int y, int w, int UNUSED(h),
- int expand, int slider, int toggle, int icon_only)
+ bool expand, bool slider, bool toggle, bool icon_only)
{
uiStyle *style = layout->root->style;
uiBut *but;
@@ -502,7 +502,7 @@ static void ui_item_array(uiLayout *layout, uiBlock *block, const char *name, in
/* show checkboxes for rna on a non-emboss block (menu for eg) */
if (type == PROP_BOOLEAN && ELEM(layout->root->block->dt, UI_EMBOSS_NONE, UI_EMBOSS_PULLDOWN)) {
- boolarr = MEM_callocN(sizeof(int) * len, "ui_item_array");
+ boolarr = MEM_callocN(sizeof(int) * len, __func__);
RNA_property_boolean_get_array(ptr, prop, boolarr);
}
@@ -546,7 +546,7 @@ static void ui_item_enum_expand_handle(bContext *C, void *arg1, void *arg2)
}
}
static void ui_item_enum_expand(uiLayout *layout, uiBlock *block, PointerRNA *ptr, PropertyRNA *prop,
- const char *uiname, int h, int icon_only)
+ const char *uiname, int h, bool icon_only)
{
/* XXX The way this function currently handles uiname parameter is insane and inconsistent with general UI API:
* * uiname is the *enum property* label.
@@ -1130,7 +1130,7 @@ void uiItemO(uiLayout *layout, const char *name, int icon, const char *opname)
/* RNA property items */
static void ui_item_rna_size(uiLayout *layout, const char *name, int icon, PointerRNA *ptr, PropertyRNA *prop,
- int index, int icon_only, int *r_w, int *r_h)
+ int index, bool icon_only, int *r_w, int *r_h)
{
PropertyType type;
PropertySubType subtype;
@@ -1200,7 +1200,8 @@ void uiItemFullR(uiLayout *layout, PointerRNA *ptr, PropertyRNA *prop, int index
uiBut *but = NULL;
PropertyType type;
char namestr[UI_MAX_NAME_STR];
- int len, w, h, slider, toggle, expand, icon_only, no_bg;
+ int len, w, h;
+ bool slider, toggle, expand, icon_only, no_bg;
bool is_array;
UI_block_layout_set_current(block, layout);
@@ -1236,7 +1237,8 @@ void uiItemFullR(uiLayout *layout, PointerRNA *ptr, PropertyRNA *prop, int index
name = ui_item_name_add_colon(name, namestr);
}
- if (layout->root->type == UI_LAYOUT_MENU) {
+ /* menus and pie-menus don't show checkbox without this */
+ if (ELEM(layout->root->type, UI_LAYOUT_MENU, UI_LAYOUT_PIEMENU)) {
if (type == PROP_BOOLEAN && ((is_array == false) || (index != RNA_NO_INDEX))) {
if (is_array) icon = (RNA_property_boolean_get_index(ptr, prop, index)) ? ICON_CHECKBOX_HLT : ICON_CHECKBOX_DEHLT;
else icon = (RNA_property_boolean_get(ptr, prop)) ? ICON_CHECKBOX_HLT : ICON_CHECKBOX_DEHLT;
@@ -1252,10 +1254,10 @@ void uiItemFullR(uiLayout *layout, PointerRNA *ptr, PropertyRNA *prop, int index
}
}
- slider = (flag & UI_ITEM_R_SLIDER);
- toggle = (flag & UI_ITEM_R_TOGGLE);
- expand = (flag & UI_ITEM_R_EXPAND);
- icon_only = (flag & UI_ITEM_R_ICON_ONLY);
+ slider = (flag & UI_ITEM_R_SLIDER) != 0;
+ toggle = (flag & UI_ITEM_R_TOGGLE) != 0;
+ expand = (flag & UI_ITEM_R_EXPAND) != 0;
+ icon_only = (flag & UI_ITEM_R_ICON_ONLY) != 0;
no_bg = (flag & UI_ITEM_R_NO_BG);
/* get size */
@@ -1451,8 +1453,8 @@ typedef struct CollItemSearch {
static int sort_search_items_list(const void *a, const void *b)
{
- const CollItemSearch *cis1 = (CollItemSearch *)a;
- const CollItemSearch *cis2 = (CollItemSearch *)b;
+ const CollItemSearch *cis1 = a;
+ const CollItemSearch *cis2 = b;
if (BLI_strcasecmp(cis1->name, cis2->name) > 0)
return 1;
@@ -1467,7 +1469,7 @@ static void rna_search_cb(const struct bContext *C, void *arg_but, const char *s
int i = 0, iconid = 0, flag = RNA_property_flag(but->rnaprop);
ListBase *items_list = MEM_callocN(sizeof(ListBase), "items_list");
CollItemSearch *cis;
- const int skip_filter = !but->changed;
+ const bool skip_filter = !but->changed;
/* build a temporary list of relevant items first */
RNA_PROP_BEGIN (&but->rnasearchpoin, itemptr, but->rnasearchprop)
diff --git a/source/blender/gpu/shaders/gpu_shader_material.glsl b/source/blender/gpu/shaders/gpu_shader_material.glsl
index 78013de2aff..60e2213b72c 100644
--- a/source/blender/gpu/shaders/gpu_shader_material.glsl
+++ b/source/blender/gpu/shaders/gpu_shader_material.glsl
@@ -2357,7 +2357,7 @@ void node_uvmap(vec3 attr_uv, out vec3 outvec)
void node_geometry(vec3 I, vec3 N, mat4 toworld,
out vec3 position, out vec3 normal, out vec3 tangent,
out vec3 true_normal, out vec3 incoming, out vec3 parametric,
- out float backfacing)
+ out float backfacing, out float pointiness)
{
position = (toworld*vec4(I, 1.0)).xyz;
normal = (toworld*vec4(N, 0.0)).xyz;
@@ -2370,6 +2370,7 @@ void node_geometry(vec3 I, vec3 N, mat4 toworld,
parametric = vec3(0.0);
backfacing = (gl_FrontFacing)? 0.0: 1.0;
+ pointiness = 0.0;
}
void node_tex_coord(vec3 I, vec3 N, mat4 viewinvmat, mat4 obinvmat, vec4 camerafac,
diff --git a/source/blender/makesrna/intern/rna_screen.c b/source/blender/makesrna/intern/rna_screen.c
index 86d20e6e239..477a9dbca4f 100644
--- a/source/blender/makesrna/intern/rna_screen.c
+++ b/source/blender/makesrna/intern/rna_screen.c
@@ -415,7 +415,7 @@ static void rna_def_screen(BlenderRNA *brna)
prop = RNA_def_property(srna, "use_follow", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "redraws_flag", TIME_FOLLOW);
- RNA_def_property_ui_text(prop, "Follow", "Follow current frame in editors that update");
+ RNA_def_property_ui_text(prop, "Follow", "Follow current frame in editors");
RNA_def_property_update(prop, NC_SPACE | ND_SPACE_TIME, "rna_Screen_redraw_update");
prop = RNA_def_property(srna, "use_play_animation_editors", PROP_BOOLEAN, PROP_NONE);
diff --git a/source/blender/python/generic/CMakeLists.txt b/source/blender/python/generic/CMakeLists.txt
index 155247a4249..df611e00d00 100644
--- a/source/blender/python/generic/CMakeLists.txt
+++ b/source/blender/python/generic/CMakeLists.txt
@@ -46,6 +46,9 @@ set(SRC
bpy_internal_import.h
idprop_py_api.h
py_capi_utils.h
+
+ # header-only
+ python_utildefines.h
)
add_definitions(${GL_DEFINITIONS})
diff --git a/source/gameengine/Physics/Bullet/CcdPhysicsController.cpp b/source/gameengine/Physics/Bullet/CcdPhysicsController.cpp
index ff68021f09e..08fcb243445 100644
--- a/source/gameengine/Physics/Bullet/CcdPhysicsController.cpp
+++ b/source/gameengine/Physics/Bullet/CcdPhysicsController.cpp
@@ -148,6 +148,7 @@ CcdPhysicsController::CcdPhysicsController (const CcdConstructionInfo& ci)
m_savedCollisionFilterGroup = 0;
m_savedCollisionFilterMask = 0;
m_savedMass = 0.0;
+ m_savedDyna = false;
m_suspended = false;
CreateRigidbody();
@@ -1068,6 +1069,7 @@ void CcdPhysicsController::SuspendDynamics(bool ghost)
m_savedCollisionFlags = body->getCollisionFlags();
m_savedMass = GetMass();
+ m_savedDyna = m_cci.m_bDyna;
m_savedCollisionFilterGroup = handle->m_collisionFilterGroup;
m_savedCollisionFilterMask = handle->m_collisionFilterMask;
m_suspended = true;
@@ -1076,6 +1078,7 @@ void CcdPhysicsController::SuspendDynamics(bool ghost)
btCollisionObject::CF_STATIC_OBJECT|((ghost)?btCollisionObject::CF_NO_CONTACT_RESPONSE:(m_savedCollisionFlags&btCollisionObject::CF_NO_CONTACT_RESPONSE)),
btBroadphaseProxy::StaticFilter,
btBroadphaseProxy::AllFilter ^ btBroadphaseProxy::StaticFilter);
+ m_cci.m_bDyna = false;
}
}
@@ -1092,6 +1095,7 @@ void CcdPhysicsController::RestoreDynamics()
m_savedCollisionFilterGroup,
m_savedCollisionFilterMask);
body->activate();
+ m_cci.m_bDyna = m_savedDyna;
m_suspended = false;
}
}
diff --git a/source/gameengine/Physics/Bullet/CcdPhysicsController.h b/source/gameengine/Physics/Bullet/CcdPhysicsController.h
index 557a5fe603a..be393bbfa7f 100644
--- a/source/gameengine/Physics/Bullet/CcdPhysicsController.h
+++ b/source/gameengine/Physics/Bullet/CcdPhysicsController.h
@@ -480,6 +480,7 @@ protected:
short m_savedCollisionFilterGroup;
short m_savedCollisionFilterMask;
MT_Scalar m_savedMass;
+ bool m_savedDyna;
bool m_suspended;
diff --git a/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLRasterizer.cpp b/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLRasterizer.cpp
index 415ea87fb1b..116a11339d9 100644
--- a/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLRasterizer.cpp
+++ b/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLRasterizer.cpp
@@ -1269,28 +1269,32 @@ void RAS_OpenGLRasterizer::RemoveLight(RAS_ILightObject* lightobject)
bool RAS_OpenGLRasterizer::RayHit(struct KX_ClientObjectInfo *client, KX_RayCast *result, void * const data)
{
- double* const oglmatrix = (double* const) data;
-
- RAS_Polygon* poly = result->m_hitMesh->GetPolygon(result->m_hitPolygon);
- if (!poly->IsVisible())
+ if (result->m_hitMesh) {
+ double* const oglmatrix = (double* const) data;
+
+ RAS_Polygon* poly = result->m_hitMesh->GetPolygon(result->m_hitPolygon);
+ if (!poly->IsVisible())
+ return false;
+
+ MT_Vector3 resultnormal(result->m_hitNormal);
+ MT_Vector3 left(oglmatrix[0],oglmatrix[1],oglmatrix[2]);
+ MT_Vector3 dir = -(left.cross(resultnormal)).safe_normalized();
+ left = (dir.cross(resultnormal)).safe_normalized();
+ // for the up vector, we take the 'resultnormal' returned by the physics
+
+ double maat[16] = {left[0], left[1], left[2], 0,
+ dir[0], dir[1], dir[2], 0,
+ resultnormal[0], resultnormal[1], resultnormal[2], 0,
+ 0, 0, 0, 1};
+
+ glTranslated(oglmatrix[12],oglmatrix[13],oglmatrix[14]);
+ //glMultMatrixd(oglmatrix);
+ glMultMatrixd(maat);
+ return true;
+ }
+ else {
return false;
-
- MT_Point3 resultpoint(result->m_hitPoint);
- MT_Vector3 resultnormal(result->m_hitNormal);
- MT_Vector3 left(oglmatrix[0],oglmatrix[1],oglmatrix[2]);
- MT_Vector3 dir = -(left.cross(resultnormal)).safe_normalized();
- left = (dir.cross(resultnormal)).safe_normalized();
- // for the up vector, we take the 'resultnormal' returned by the physics
-
- double maat[16] = {left[0], left[1], left[2], 0,
- dir[0], dir[1], dir[2], 0,
- resultnormal[0], resultnormal[1], resultnormal[2], 0,
- 0, 0, 0, 1};
-
- glTranslated(resultpoint[0],resultpoint[1],resultpoint[2]);
- //glMultMatrixd(oglmatrix);
- glMultMatrixd(maat);
- return true;
+ }
}
void RAS_OpenGLRasterizer::applyTransform(double* oglmatrix,int objectdrawmode )
diff --git a/tests/python/batch_import.py b/tests/python/batch_import.py
index dea08b45c3a..8fc679a7c15 100644
--- a/tests/python/batch_import.py
+++ b/tests/python/batch_import.py
@@ -78,7 +78,9 @@ def batch_import(operator="",
path = os.path.abspath(path)
match_upper = match.upper()
- pattern_match = lambda a: fnmatch.fnmatchcase(a.upper(), match_upper)
+
+ def pattern_match(a):
+ return fnmatch.fnmatchcase(a.upper(), match_upper)
def file_generator(path):
for dirpath, dirnames, filenames in os.walk(path):