[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [43542] branches/vgroup_modifiers: Merged with trunk (-r43491:43541).

Bastien Montagne montagne29 at wanadoo.fr
Thu Jan 19 22:25:23 CET 2012


Revision: 43542
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=43542
Author:   mont29
Date:     2012-01-19 21:25:14 +0000 (Thu, 19 Jan 2012)
Log Message:
-----------
Merged with trunk (-r43491:43541).

Revision Links:
--------------
    http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=43491

Modified Paths:
--------------
    branches/vgroup_modifiers/intern/cycles/kernel/kernel_shader.h
    branches/vgroup_modifiers/intern/cycles/render/light.cpp
    branches/vgroup_modifiers/intern/ghost/intern/GHOST_NDOFManager.cpp
    branches/vgroup_modifiers/intern/ghost/intern/GHOST_NDOFManager.h
    branches/vgroup_modifiers/intern/ghost/intern/GHOST_SystemX11.cpp
    branches/vgroup_modifiers/release/scripts/startup/bl_ui/properties_data_modifier.py
    branches/vgroup_modifiers/release/scripts/startup/bl_ui/properties_physics_dynamicpaint.py
    branches/vgroup_modifiers/release/scripts/startup/bl_ui/space_image.py
    branches/vgroup_modifiers/release/scripts/startup/bl_ui/space_view3d_toolbar.py
    branches/vgroup_modifiers/source/blender/blenkernel/BKE_DerivedMesh.h
    branches/vgroup_modifiers/source/blender/blenkernel/BKE_image.h
    branches/vgroup_modifiers/source/blender/blenkernel/intern/DerivedMesh.c
    branches/vgroup_modifiers/source/blender/blenkernel/intern/brush.c
    branches/vgroup_modifiers/source/blender/blenkernel/intern/dynamicpaint.c
    branches/vgroup_modifiers/source/blender/blenkernel/intern/image_gen.c
    branches/vgroup_modifiers/source/blender/blenkernel/intern/node.c
    branches/vgroup_modifiers/source/blender/blenkernel/intern/sequencer.c
    branches/vgroup_modifiers/source/blender/blenlib/BLI_math_color.h
    branches/vgroup_modifiers/source/blender/blenlib/intern/math_color.c
    branches/vgroup_modifiers/source/blender/blenlib/intern/math_color_inline.c
    branches/vgroup_modifiers/source/blender/editors/animation/anim_channels_defines.c
    branches/vgroup_modifiers/source/blender/editors/include/UI_resources.h
    branches/vgroup_modifiers/source/blender/editors/interface/interface_intern.h
    branches/vgroup_modifiers/source/blender/editors/interface/interface_templates.c
    branches/vgroup_modifiers/source/blender/editors/interface/interface_widgets.c
    branches/vgroup_modifiers/source/blender/editors/object/object_bake.c
    branches/vgroup_modifiers/source/blender/editors/sculpt_paint/CMakeLists.txt
    branches/vgroup_modifiers/source/blender/editors/sculpt_paint/paint_intern.h
    branches/vgroup_modifiers/source/blender/editors/sculpt_paint/paint_stroke.c
    branches/vgroup_modifiers/source/blender/editors/sculpt_paint/sculpt.c
    branches/vgroup_modifiers/source/blender/editors/sculpt_paint/sculpt_intern.h
    branches/vgroup_modifiers/source/blender/editors/space_clip/clip_graph_draw.c
    branches/vgroup_modifiers/source/blender/editors/space_clip/clip_graph_ops.c
    branches/vgroup_modifiers/source/blender/editors/space_clip/clip_utils.c
    branches/vgroup_modifiers/source/blender/editors/space_clip/space_clip.c
    branches/vgroup_modifiers/source/blender/editors/space_outliner/outliner_intern.h
    branches/vgroup_modifiers/source/blender/editors/space_outliner/outliner_ops.c
    branches/vgroup_modifiers/source/blender/editors/space_outliner/outliner_select.c
    branches/vgroup_modifiers/source/blender/editors/space_sequencer/sequencer_draw.c
    branches/vgroup_modifiers/source/blender/editors/space_view3d/drawarmature.c
    branches/vgroup_modifiers/source/blender/editors/space_view3d/drawmesh.c
    branches/vgroup_modifiers/source/blender/editors/space_view3d/drawobject.c
    branches/vgroup_modifiers/source/blender/editors/space_view3d/drawvolume.c
    branches/vgroup_modifiers/source/blender/editors/space_view3d/space_view3d.c
    branches/vgroup_modifiers/source/blender/editors/space_view3d/view3d_draw.c
    branches/vgroup_modifiers/source/blender/editors/space_view3d/view3d_edit.c
    branches/vgroup_modifiers/source/blender/editors/space_view3d/view3d_fly.c
    branches/vgroup_modifiers/source/blender/editors/space_view3d/view3d_intern.h
    branches/vgroup_modifiers/source/blender/editors/space_view3d/view3d_select.c
    branches/vgroup_modifiers/source/blender/editors/space_view3d/view3d_view.c
    branches/vgroup_modifiers/source/blender/editors/transform/transform_conversions.c
    branches/vgroup_modifiers/source/blender/editors/transform/transform_generics.c
    branches/vgroup_modifiers/source/blender/editors/uvedit/uvedit_ops.c
    branches/vgroup_modifiers/source/blender/imbuf/intern/divers.c
    branches/vgroup_modifiers/source/blender/makesdna/DNA_tracking_types.h
    branches/vgroup_modifiers/source/blender/makesrna/intern/SConscript
    branches/vgroup_modifiers/source/blender/makesrna/intern/rna_controller.c
    branches/vgroup_modifiers/source/blender/makesrna/intern/rna_object_api.c
    branches/vgroup_modifiers/source/blender/makesrna/intern/rna_scene.c
    branches/vgroup_modifiers/source/blender/makesrna/intern/rna_sculpt_paint.c
    branches/vgroup_modifiers/source/blender/makesrna/intern/rna_sensor.c
    branches/vgroup_modifiers/source/blender/python/intern/bpy_rna.c
    branches/vgroup_modifiers/source/blender/render/intern/source/render_texture.c
    branches/vgroup_modifiers/source/blender/render/intern/source/rendercore.c
    branches/vgroup_modifiers/source/blender/windowmanager/intern/wm_operators.c
    branches/vgroup_modifiers/source/tests/bl_mesh_modifiers.py

Added Paths:
-----------
    branches/vgroup_modifiers/source/blender/editors/sculpt_paint/paint_cursor.c

Property Changed:
----------------
    branches/vgroup_modifiers/
    branches/vgroup_modifiers/release/scripts/startup/bl_ui/properties_paint_common.py
    branches/vgroup_modifiers/source/blender/editors/space_outliner/


Property changes on: branches/vgroup_modifiers
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/soc-2011-cucumber:37517,38384,38387,38403-38404,38407,38968,38970,38973,39045,40845,42997-42998
/branches/soc-2011-tomato:42376,42378-42379,42383,42385,42395,42397-42400,42407,42411,42418,42443-42444,42446,42467,42472,42486,42650-42652,42654-42655,42709-42710,42733-42734,42801
/trunk/blender:38694-38739,38741-39198,39200-39651,39653-39988,39990-43491
   + /branches/soc-2011-cucumber:37517,38384,38387,38403-38404,38407,38968,38970,38973,39045,40845,42997-42998
/branches/soc-2011-tomato:42376,42378-42379,42383,42385,42395,42397-42400,42407,42411,42418,42443-42444,42446,42467,42472,42486,42650-42652,42654-42655,42709-42710,42733-42734,42801
/trunk/blender:38694-38739,38741-39198,39200-39651,39653-39988,39990-43541

Modified: branches/vgroup_modifiers/intern/cycles/kernel/kernel_shader.h
===================================================================
--- branches/vgroup_modifiers/intern/cycles/kernel/kernel_shader.h	2012-01-19 21:02:17 UTC (rev 43541)
+++ branches/vgroup_modifiers/intern/cycles/kernel/kernel_shader.h	2012-01-19 21:25:14 UTC (rev 43542)
@@ -151,7 +151,7 @@
 			instanced = true;
 		else
 #endif
-			sd->object = -sd->object-1;
+			sd->object = ~sd->object;
 #ifdef __INSTANCING__
 	}
 #endif

Modified: branches/vgroup_modifiers/intern/cycles/render/light.cpp
===================================================================
--- branches/vgroup_modifiers/intern/cycles/render/light.cpp	2012-01-19 21:02:17 UTC (rev 43541)
+++ branches/vgroup_modifiers/intern/cycles/render/light.cpp	2012-01-19 21:25:14 UTC (rev 43542)
@@ -109,7 +109,7 @@
 
 	/* triangles */
 	size_t offset = 0;
-	size_t j = 0;
+	int j = 0;
 
 	foreach(Object *object, scene->objects) {
 		Mesh *mesh = object->mesh;
@@ -128,8 +128,11 @@
 		/* sum area */
 		if(have_emission) {
 			Transform tfm = object->tfm;
-			int object_id = (mesh->transform_applied)? -j-1: j;
+			int object_id = j;
 
+			if(mesh->transform_applied)
+				object_id = ~object_id;
+
 			for(size_t i = 0; i < mesh->triangles.size(); i++) {
 				Shader *shader = scene->shaders[mesh->shader[i]];
 
@@ -161,9 +164,9 @@
 	if(!multi_light) {
 		float lightarea = (totarea > 0.0f)? totarea/scene->lights.size(): 1.0f;
 
-		for(size_t i = 0; i < scene->lights.size(); i++, offset++) {
+		for(int i = 0; i < scene->lights.size(); i++, offset++) {
 			distribution[offset].x = totarea;
-			distribution[offset].y = __int_as_float(-i-1);
+			distribution[offset].y = __int_as_float(~(int)i);
 			distribution[offset].z = 1.0f;
 			distribution[offset].w = scene->lights[i]->size;
 			totarea += lightarea;

Modified: branches/vgroup_modifiers/intern/ghost/intern/GHOST_NDOFManager.cpp
===================================================================
--- branches/vgroup_modifiers/intern/ghost/intern/GHOST_NDOFManager.cpp	2012-01-19 21:02:17 UTC (rev 43541)
+++ branches/vgroup_modifiers/intern/ghost/intern/GHOST_NDOFManager.cpp	2012-01-19 21:25:14 UTC (rev 43542)
@@ -137,6 +137,37 @@
 	NDOF_BUTTON_MINUS
 };
 
+// latest HW: button-compatible with SpacePilotPro, just fewer of them
+static const NDOF_ButtonT SpaceMousePro_HID_map[] = {
+	NDOF_BUTTON_MENU,
+	NDOF_BUTTON_FIT,
+	NDOF_BUTTON_TOP,
+	NDOF_BUTTON_NONE, // left
+	NDOF_BUTTON_RIGHT,
+	NDOF_BUTTON_FRONT,
+	NDOF_BUTTON_NONE, // bottom
+	NDOF_BUTTON_NONE, // back
+	NDOF_BUTTON_ROLL_CW,
+	NDOF_BUTTON_NONE, // roll ccw
+	NDOF_BUTTON_NONE, // iso 1
+	NDOF_BUTTON_NONE, // iso 2
+	NDOF_BUTTON_1,
+	NDOF_BUTTON_2,
+	NDOF_BUTTON_3,
+	NDOF_BUTTON_4,
+	NDOF_BUTTON_NONE, // 5
+	NDOF_BUTTON_NONE, // 6
+	NDOF_BUTTON_NONE, // 7
+	NDOF_BUTTON_NONE, // 8
+	NDOF_BUTTON_NONE, // 9
+	NDOF_BUTTON_NONE, // 10
+	NDOF_BUTTON_NONE, // esc key
+	NDOF_BUTTON_NONE, // alt key
+	NDOF_BUTTON_NONE, // shift key
+	NDOF_BUTTON_NONE, // ctrl key
+	NDOF_BUTTON_ROTATE,
+};
+
 /* this is the older SpacePilot (sans Pro)
  * thanks to polosson for the info in this table */
 static const NDOF_ButtonT SpacePilot_HID_map[] = {
@@ -210,6 +241,12 @@
 					m_deviceType = NDOF_SpacePilotPro;
 					m_buttonCount = 31;
 					break;
+				case 0xC62B:
+					puts("ndof: using SpaceMousePro");
+					m_deviceType = NDOF_SpaceMousePro;
+					m_buttonCount = 27;
+					// ^^ actually has 15 buttons, but their HID codes range from 0 to 26
+					break;
 
 				// -- older devices --
 				case 0xC625:
@@ -237,6 +274,8 @@
 	else {
 		m_buttonMask = ~(-1 << m_buttonCount);
 
+		// special case for SpaceMousePro? maybe...
+
 #ifdef DEBUG_NDOF_BUTTONS
 		printf("ndof: %d buttons -> hex:%X\n", m_buttonCount, m_buttonMask);
 #endif
@@ -261,6 +300,16 @@
 
 void GHOST_NDOFManager::sendButtonEvent(NDOF_ButtonT button, bool press, GHOST_TUns64 time, GHOST_IWindow* window)
 {
+	if (button == NDOF_BUTTON_NONE) {
+		// just being exceptionally cautious...
+		// air-tight button masking and proper function key emulation
+		// should guarantee we never get to this point
+#ifdef DEBUG_NDOF_BUTTONS
+		printf("discarding NDOF_BUTTON_NONE (should not escape the NDOF manager)\n");
+#endif
+		return;
+	}
+
 	GHOST_EventNDOFButton* event = new GHOST_EventNDOFButton(time, window);
 	GHOST_TEventNDOFButtonData* data = (GHOST_TEventNDOFButtonData*) event->getData();
 
@@ -317,6 +366,15 @@
 				default: sendButtonEvent(SpacePilotPro_HID_map[button_number], press, time, window);
 			}
 			break;
+		case NDOF_SpaceMousePro:
+			switch (button_number) {
+				case 22: sendKeyEvent(GHOST_kKeyEsc, press, time, window); break;
+				case 23: sendKeyEvent(GHOST_kKeyLeftAlt, press, time, window); break;
+				case 24: sendKeyEvent(GHOST_kKeyLeftShift, press, time, window); break;
+				case 25: sendKeyEvent(GHOST_kKeyLeftControl, press, time, window); break;
+				default: sendButtonEvent(SpaceMousePro_HID_map[button_number], press, time, window);
+			}
+			break;
 		case NDOF_SpacePilot:
 			switch (button_number) {
 				case 10: sendKeyEvent(GHOST_kKeyEsc, press, time, window); break;

Modified: branches/vgroup_modifiers/intern/ghost/intern/GHOST_NDOFManager.h
===================================================================
--- branches/vgroup_modifiers/intern/ghost/intern/GHOST_NDOFManager.h	2012-01-19 21:02:17 UTC (rev 43541)
+++ branches/vgroup_modifiers/intern/ghost/intern/GHOST_NDOFManager.h	2012-01-19 21:25:14 UTC (rev 43542)
@@ -37,6 +37,7 @@
 	NDOF_SpaceNavigator,
 	NDOF_SpaceExplorer,
 	NDOF_SpacePilotPro,
+	NDOF_SpaceMousePro,
 
 	// older devices
 	NDOF_SpacePilot

Modified: branches/vgroup_modifiers/intern/ghost/intern/GHOST_SystemX11.cpp
===================================================================
--- branches/vgroup_modifiers/intern/ghost/intern/GHOST_SystemX11.cpp	2012-01-19 21:02:17 UTC (rev 43541)
+++ branches/vgroup_modifiers/intern/ghost/intern/GHOST_SystemX11.cpp	2012-01-19 21:25:14 UTC (rev 43542)
@@ -422,6 +422,8 @@
 	return anyProcessed;
 }
 
+
+#ifdef WITH_X11_XINPUT
 /* set currently using tablet mode (stylus or eraser) depending on device ID */
 static void setTabletMode(GHOST_WindowX11 * window, XID deviceid)
 {
@@ -430,6 +432,7 @@
 	else if(deviceid == window->GetXTablet().EraserID)
 		window->GetXTablet().CommonData.Active= GHOST_kTabletModeEraser;
 }
+#endif /* WITH_X11_XINPUT */
 
 	void
 GHOST_SystemX11::processEvent(XEvent *xe)

Modified: branches/vgroup_modifiers/release/scripts/startup/bl_ui/properties_data_modifier.py
===================================================================
--- branches/vgroup_modifiers/release/scripts/startup/bl_ui/properties_data_modifier.py	2012-01-19 21:02:17 UTC (rev 43541)
+++ branches/vgroup_modifiers/release/scripts/startup/bl_ui/properties_data_modifier.py	2012-01-19 21:25:14 UTC (rev 43542)
@@ -814,13 +814,14 @@
 
     def REMESH(self, layout, ob, md):
         layout.prop(md, "mode")
-
-        layout.prop(md, "octree_depth")
-        layout.prop(md, "scale")
+        
         row = layout.row()
-        row.active = md.mode == "SHARP"
-        row.prop(md, "sharpness")
+        row.prop(md, "octree_depth")
+        row.prop(md, "scale")
 
+        if md.mode == "SHARP":
+            layout.prop(md, "sharpness")
+
         layout.prop(md, "remove_disconnected_pieces")
         row = layout.row()
         row.active = md.remove_disconnected_pieces


Property changes on: branches/vgroup_modifiers/release/scripts/startup/bl_ui/properties_paint_common.py
___________________________________________________________________
Added: svn:eol-style
   + native

Modified: branches/vgroup_modifiers/release/scripts/startup/bl_ui/properties_physics_dynamicpaint.py
===================================================================
--- branches/vgroup_modifiers/release/scripts/startup/bl_ui/properties_physics_dynamicpaint.py	2012-01-19 21:02:17 UTC (rev 43541)
+++ branches/vgroup_modifiers/release/scripts/startup/bl_ui/properties_physics_dynamicpaint.py	2012-01-19 21:25:14 UTC (rev 43542)
@@ -412,14 +412,14 @@
             col.prop(brush, "paint_distance", text="Paint Distance")
             split = layout.row().split(percentage=0.4)
             sub = split.column()
-            if brush.paint_source == 'DISTANCE':
+            if brush.paint_source in {'DISTANCE', 'VOLUME_DISTANCE'}:
                 sub.prop(brush, "use_proximity_project")
-            elif brush.paint_source == 'VOLUME_DISTANCE':
+            if brush.paint_source == 'VOLUME_DISTANCE':
                 sub.prop(brush, "invert_proximity")
                 sub.prop(brush, "use_negative_volume")
 
             sub = split.column()
-            if brush.paint_source == 'DISTANCE':
+            if brush.paint_source in {'DISTANCE', 'VOLUME_DISTANCE'}:
                 column = sub.column()
                 column.active = brush.use_proximity_project
                 column.prop(brush, "ray_direction")

Modified: branches/vgroup_modifiers/release/scripts/startup/bl_ui/space_image.py
===================================================================
--- branches/vgroup_modifiers/release/scripts/startup/bl_ui/space_image.py	2012-01-19 21:02:17 UTC (rev 43541)
+++ branches/vgroup_modifiers/release/scripts/startup/bl_ui/space_image.py	2012-01-19 21:25:14 UTC (rev 43542)
@@ -671,11 +671,11 @@
             col.prop(brush, "color", text="")
 
             row = col.row(align=True)
-            self.prop_unified_size(row, context, brush, "size", slider=True)

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list