svn merge -r 22628:22753 https://svn.blender.org/svnroot/bf-blender/branches/blender2... volume25
authorMatt Ebb <matt@mke3.net>
Tue, 25 Aug 2009 01:37:08 +0000 (01:37 +0000)
committerMatt Ebb <matt@mke3.net>
Tue, 25 Aug 2009 01:37:08 +0000 (01:37 +0000)
54 files changed:
CMakeLists.txt
SConstruct
config/win32-mingw-config.py
config/win32-vc-config.py
release/io/engine_render_pov.py
release/ui/buttons_data_bone.py
release/ui/buttons_data_modifier.py
release/ui/space_image.py
release/ui/space_time.py
release/ui/space_view3d.py
source/blender/blenkernel/intern/modifier.c
source/blender/editors/animation/anim_channels_defines.c
source/blender/editors/animation/anim_ipo_utils.c
source/blender/editors/animation/keyframing.c
source/blender/editors/include/UI_interface.h
source/blender/editors/interface/interface_layout.c
source/blender/editors/interface/interface_widgets.c
source/blender/editors/interface/resources.c
source/blender/editors/mesh/editmesh_mods.c
source/blender/editors/screen/screen_ops.c
source/blender/editors/sculpt_paint/sculpt_stroke.c [deleted file]
source/blender/editors/space_action/action_draw.c
source/blender/editors/space_action/action_header.c
source/blender/editors/space_action/space_action.c
source/blender/editors/space_console/console_ops.c
source/blender/editors/space_console/console_report.c
source/blender/editors/space_graph/graph_header.c
source/blender/editors/space_logic/logic_window.c
source/blender/editors/space_text/text_header.c
source/blender/editors/space_text/text_ops.c
source/blender/editors/space_view3d/drawvolume.c
source/blender/editors/space_view3d/view3d_header.c
source/blender/editors/transform/transform_generics.c
source/blender/editors/transform/transform_ops.c
source/blender/editors/util/undo.c
source/blender/gpu/intern/gpu_extensions.c
source/blender/imbuf/intern/openexr/SConscript
source/blender/imbuf/intern/openexr/openexr_api.cpp
source/blender/makesdna/DNA_sensor_types.h
source/blender/makesdna/DNA_space_types.h
source/blender/makesrna/intern/rna_modifier.c
source/blender/makesrna/intern/rna_pose.c
source/blender/makesrna/intern/rna_space.c
source/blender/makesrna/intern/rna_ui_api.c
source/blender/makesrna/intern/rna_userdef.c
source/blender/windowmanager/intern/wm_operators.c
source/creator/CMakeLists.txt
source/gameengine/Converter/BL_BlenderDataConversion.cpp
source/gameengine/Converter/KX_ConvertSensors.cpp
source/gameengine/GameLogic/SCA_PropertyEventManager.h
source/gameengine/Ketsji/KX_KetsjiEngine.cpp
source/gameengine/Ketsji/KX_MouseFocusSensor.cpp
source/gameengine/Ketsji/KX_MouseFocusSensor.h
source/gameengine/PyDoc/GameTypes.py

index 8ef4296e2667c10d44c9bcb0f379853c8459c6c8..d1e18723f5db4e34741a2f9c06b4ef39048a26b6 100644 (file)
@@ -251,8 +251,8 @@ IF(WIN32)
 
   IF(WITH_JACK)
     SET(JACK ${LIBDIR}/jack)
-    SET(JACK_INC ${JACK}/include/jack)
-    SET(JACK_LIB jack)
+    SET(JACK_INC ${JACK}/include/jack ${JACK}/include)
+    SET(JACK_LIB libjack)
     SET(JACK_LIBPATH ${JACK}/lib)
   ENDIF(WITH_JACK)
 
index dad9ef544462459734a42c1784ef0fe62890c8d9..f2eb7146930b79e7804871389a1cfea05e4f7195 100644 (file)
@@ -580,11 +580,11 @@ if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'win64-vc'):
                                                '${LCGDIR}/ffmpeg/lib/avformat-52.dll',
                                                '${LCGDIR}/ffmpeg/lib/avdevice-52.dll',
                                                '${LCGDIR}/ffmpeg/lib/avutil-50.dll',
-                                               '${LCGDIR}/ffmpeg/lib/libfaad-2.dll',
-                                               '${LCGDIR}/ffmpeg/lib/libfaac-0.dll',
-                                               '${LCGDIR}/ffmpeg/lib/libmp3lame-0.dll',
-                                               '${LCGDIR}/ffmpeg/lib/libx264-67.dll',
-                                               '${LCGDIR}/ffmpeg/lib/xvidcore.dll',
+#                                              '${LCGDIR}/ffmpeg/lib/libfaad-2.dll',
+#                                              '${LCGDIR}/ffmpeg/lib/libfaac-0.dll',
+#                                              '${LCGDIR}/ffmpeg/lib/libmp3lame-0.dll',
+#                                              '${LCGDIR}/ffmpeg/lib/libx264-67.dll',
+#                                              '${LCGDIR}/ffmpeg/lib/xvidcore.dll',
                                                '${LCGDIR}/ffmpeg/lib/swscale-0.dll']
        if env['WITH_BF_JACK']:
                dllsources += ['${LCGDIR}/jack/lib/libjack.dll']
index a7de3f6111e55ad55c22e0f2a68be3142ec1803c..cde41d6ffba7459637ed00ff45cd9c4debc18f33 100644 (file)
@@ -22,9 +22,9 @@ BF_OPENAL_LIB = 'wrap_oal'
 BF_OPENAL_LIBPATH = '${BF_OPENAL}/lib'
 
 WITH_BF_FFMPEG = False
-BF_FFMPEG_LIB = 'avformat swscale avcodec avutil avdevice xvidcore x264'
-BF_FFMPEG_LIBPATH = LIBDIR + '/gcc/ffmpeg/lib'
-BF_FFMPEG_INC =  LIBDIR + '/gcc/ffmpeg/include'
+BF_FFMPEG_LIB = 'avformat-52 avcodec-52 avdevice-52 avutil-50 swscale-0'
+BF_FFMPEG_LIBPATH = LIBDIR + '/ffmpeg/lib'
+BF_FFMPEG_INC =  LIBDIR + '/ffmpeg/include'
 
 BF_LIBSAMPLERATE = LIBDIR + '/samplerate'
 BF_LIBSAMPLERATE_INC = '${BF_LIBSAMPLERATE}/include'
index e9bbd42e915126859e1ea15d245964d63195d94e..2c21963354062187dc86d115464d2b1fdf0ca75f 100644 (file)
@@ -4,7 +4,7 @@ LIBDIR = '${LCGDIR}'
 # enable ffmpeg  support
 WITH_BF_FFMPEG = True  # -DWITH_FFMPEG
 BF_FFMPEG = LIBDIR +'/ffmpeg'
-BF_FFMPEG_INC = '${BF_FFMPEG}/include'
+BF_FFMPEG_INC = '${BF_FFMPEG}/include ${BF_FFMPEG}/include/msvc'
 BF_FFMPEG_LIBPATH='${BF_FFMPEG}/lib'
 BF_FFMPEG_LIB = 'avformat-52.lib avcodec-52.lib avdevice-52.lib avutil-50.lib swscale-0.lib'
 
index f89bdd05e0624c47f1f575681098868e7e69e479..b68f5767b135665882da6330708cc75fdc48f3d8 100644 (file)
@@ -635,11 +635,89 @@ def write_pov_ini(filename_ini, filename_pov, filename_image):
        
        file.close()
 
+# Radiosity panel, use in the scene for now.
+FloatProperty= bpy.types.Scene.FloatProperty
+IntProperty= bpy.types.Scene.IntProperty
+BoolProperty= bpy.types.Scene.BoolProperty
+
+# Not a real pov option, just to know if we should write
+BoolProperty(  attr="pov_radio_enable",
+                               name="Enable Radiosity",
+                               description="Enable povrays radiosity calculation.",
+                               default= False)
+BoolProperty(  attr="pov_radio_display_advanced",
+                               name="Advanced Options",
+                               description="Show advanced options.",
+                               default= False)
+
+# Real pov options
+FloatProperty( attr="pov_radio_adc_bailout",
+                               name="ADC Bailout",
+                               description="The adc_bailout for radiosity rays. Use adc_bailout = 0.01 / brightest_ambient_object for good results.",
+                               min=0.0, max=1000.0, soft_min=0.0, soft_max=1.0, default= 0.01)
+
+BoolProperty(  attr="pov_radio_always_sample",
+                               name="Always Sample",
+                               description="Only use the data from the pretrace step and not gather any new samples during the final radiosity pass..",
+                               default= True)
+
+FloatProperty( attr="pov_radio_brightness",
+                               name="Brightness",
+                               description="Ammount objects are brightened before being returned upwards to the rest of the system.",
+                               min=0.0, max=1000.0, soft_min=0.0, soft_max=10.0, default= 1.0)
+
+IntProperty(   attr="pov_radio_count",
+                               name="Ray Count",
+                               description="number of rays that are sent out whenever a new radiosity value has to be calculated.",
+                               min=1, max=1600, default= 35)
+
+FloatProperty( attr="pov_radio_error_bound",
+                               name="Error Bound",
+                               description="one of the two main speed/quality tuning values, lower values are more accurate.",
+                               min=0.0, max=1000.0, soft_min=0.1, soft_max=10.0, default= 1.8)
+
+FloatProperty( attr="pov_radio_gray_threshold",
+                               name="Gray Threshold",
+                               description="one of the two main speed/quality tuning values, lower values are more accurate.",
+                               min=0.0, max=1.0, soft_min=0, soft_max=1, default= 0.0)
+                                                               
+FloatProperty( attr="pov_radio_low_error_factor",
+                               name="Low Error Factor",
+                               description="If you calculate just enough samples, but no more, you will get an image which has slightly blotchy lighting.",
+                               min=0.0, max=1.0, soft_min=0.0, soft_max=1.0, default= 0.5)
+
+# max_sample - not available yet
+BoolProperty(  attr="pov_radio_media", 
+                               name="Media",
+                               description="Radiosity estimation can be affected by media.",
+                               default= False)
+
+FloatProperty( attr="pov_radio_minimum_reuse",
+                               name="Minimum Reuse",
+                               description="Fraction of the screen width which sets the minimum radius of reuse for each sample point (At values higher than 2% expect errors).",
+                               min=0.0, max=1.0, soft_min=0.1, soft_max=0.1, default= 0.015)
+                               
+IntProperty(   attr="pov_radio_nearest_count",
+                               name="Nearest Count",
+                               description="Number of old ambient values blended together to create a new interpolated value.",
+                               min=1, max=20, default= 5)
+                               
+BoolProperty(  attr="pov_radio_normal",
+                               name="Normals",
+                               description="Radiosity estimation can be affected by normals.",
+                               default= False)
+
+IntProperty(   attr="pov_radio_recursion_limit",
+                               name="Recursion Limit",
+                               description="how many recursion levels are used to calculate the diffuse inter-reflection.",
+                               min=1, max=20, default= 3)
+       
 
 class PovrayRender(bpy.types.RenderEngine):
        __idname__ = 'POVRAY_RENDER'
        __label__ = "Povray"
        DELAY = 0.02
+       
        def _export(self, scene):
                import tempfile
                
@@ -761,11 +839,8 @@ class PovrayRender(bpy.types.RenderEngine):
                
                self._cleanup()
 
-
 bpy.types.register(PovrayRender)
 
-
-
 # Use some of the existing buttons.
 import buttons_scene
 buttons_scene.SCENE_PT_render.COMPAT_ENGINES.add('POVRAY_RENDER')
@@ -800,89 +875,10 @@ class RenderButtonsPanel(bpy.types.Panel):
                rd = context.scene.render_data
                return (rd.use_game_engine==False) and (rd.engine in self.COMPAT_ENGINES)
 
-# Radiosity panel, use in the scene for now.
-FloatProperty= bpy.types.Scene.FloatProperty
-IntProperty= bpy.types.Scene.IntProperty
-BoolProperty= bpy.types.Scene.BoolProperty
-               
 class SCENE_PT_povray_radiosity(RenderButtonsPanel):
        __label__ = "Radiosity"
        COMPAT_ENGINES = set(['POVRAY_RENDER'])
        
-       __props__ = [ \
-               # Not a real pov option, just to know if we should write
-               BoolProperty(   attr="pov_radio_enable",
-                                               name="Enable Radiosity",
-                                               description="Enable povrays radiosity calculation.",
-                                               default= False),
-               BoolProperty(   attr="pov_radio_display_advanced",
-                                               name="Advanced Options",
-                                               description="Show advanced options.",
-                                               default= False),
-
-               # Real pov options
-               FloatProperty(  attr="pov_radio_adc_bailout",
-                                               name="ADC Bailout",
-                                               description="The adc_bailout for radiosity rays. Use adc_bailout = 0.01 / brightest_ambient_object for good results.",
-                                               min=0.0, max=1000.0, soft_min=0.0, soft_max=1.0, default= 0.01),
-
-               BoolProperty(   attr="pov_radio_always_sample",
-                                               name="Always Sample",
-                                               description="Only use the data from the pretrace step and not gather any new samples during the final radiosity pass..",
-                                               default= True),
-
-               FloatProperty(  attr="pov_radio_brightness",
-                                               name="Brightness",
-                                               description="Ammount objects are brightened before being returned upwards to the rest of the system.",
-                                               min=0.0, max=1000.0, soft_min=0.0, soft_max=10.0, default= 1.0),
-
-               IntProperty(    attr="pov_radio_count",
-                                               name="Ray Count",
-                                               description="number of rays that are sent out whenever a new radiosity value has to be calculated.",
-                                               min=1, max=1600, default= 35),
-
-               FloatProperty(  attr="pov_radio_error_bound",
-                                               name="Error Bound",
-                                               description="one of the two main speed/quality tuning values, lower values are more accurate.",
-                                               min=0.0, max=1000.0, soft_min=0.1, soft_max=10.0, default= 1.8),
-
-               FloatProperty(  attr="pov_radio_gray_threshold",
-                                               name="Gray Threshold",
-                                               description="one of the two main speed/quality tuning values, lower values are more accurate.",
-                                               min=0.0, max=1.0, soft_min=0, soft_max=1, default= 0.0),
-                                                                               
-               FloatProperty(  attr="pov_radio_low_error_factor",
-                                               name="Low Error Factor",
-                                               description="If you calculate just enough samples, but no more, you will get an image which has slightly blotchy lighting.",
-                                               min=0.0, max=1.0, soft_min=0.0, soft_max=1.0, default= 0.5),
-               
-               # max_sample - not available yet
-               BoolProperty(   attr="pov_radio_media", 
-                                               name="Media",
-                                               description="Radiosity estimation can be affected by media.",
-                                               default= False),
-
-               FloatProperty(  attr="pov_radio_minimum_reuse",
-                                               name="Minimum Reuse",
-                                               description="Fraction of the screen width which sets the minimum radius of reuse for each sample point (At values higher than 2% expect errors).",
-                                               min=0.0, max=1.0, soft_min=0.1, soft_max=0.1, default= 0.015),
-                                               
-               IntProperty(    attr="pov_radio_nearest_count",
-                                               name="Nearest Count",
-                                               description="Number of old ambient values blended together to create a new interpolated value.",
-                                               min=1, max=20, default= 5),
-                                               
-               BoolProperty(   attr="pov_radio_normal",
-                                               name="Normals",
-                                               description="Radiosity estimation can be affected by normals.",
-                                               default= False),
-
-               IntProperty(    attr="pov_radio_recursion_limit",
-                                               name="Recursion Limit",
-                                               description="how many recursion levels are used to calculate the diffuse inter-reflection.",
-                                               min=1, max=20, default= 3),
-       ]
-
        def draw_header(self, context):
                layout = self.layout
                scene = context.scene
index 17c9c2d89d986a167b840539c86b779313f88d50..1d6a725a105c6c24d051ae9fca39cd194a2130a9 100644 (file)
@@ -74,10 +74,13 @@ class BONE_PT_bone(BoneButtonsPanel):
        def draw(self, context):
                layout = self.layout
                
+               ob = context.object
                bone = context.bone
                arm = context.armature
                if not bone:
                        bone = context.edit_bone
+               else:
+                       pchan = ob.pose.pose_channels[context.bone.name]
 
                split = layout.split()
 
@@ -103,6 +106,17 @@ class BONE_PT_bone(BoneButtonsPanel):
                col.itemR(bone, "draw_wire", text="Wireframe")
                col.itemR(bone, "hidden", text="Hide")
 
+               if ob and pchan:
+                       split = layout.split()
+                       
+                       col = split.column()
+                       col.itemL(text="Bone Group:")
+                       col.item_pointerR(pchan, "bone_group", ob.pose, "bone_groups", text="")
+                       
+                       col = split.column()
+                       col.itemL(text="Custom Shape:")
+                       col.itemR(pchan, "custom_shape", text="")
+
 class BONE_PT_inverse_kinematics(BoneButtonsPanel):
        __label__ = "Inverse Kinematics"
        __default_closed__ = True
index 9b2481b0195176133bdd22a076a2f3db3cdf2bc0..98d354a2fa022e238f525325c2472a3629bf4a0f 100644 (file)
@@ -397,19 +397,29 @@ class DATA_PT_modifiers(DataButtonsPanel):
                
                col = split.column()
                col.itemR(md, "normals")
-               sub = col.row(align=True)
+               sub = col.column()
                sub.active = md.normals
-               sub.itemR(md, "x_normal", text="X", toggle=True)
-               sub.itemR(md, "y_normal", text="Y", toggle=True)
-               sub.itemR(md, "z_normal", text="Z", toggle=True)
+               sub.itemR(md, "x_normal", text="X")
+               sub.itemR(md, "y_normal", text="Y")
+               sub.itemR(md, "z_normal", text="Z")
                
-               flow = layout.column_flow()
-               flow.itemR(md, "time_offset")
-               flow.itemR(md, "lifetime")
-               flow.itemR(md, "damping_time")
-               flow.itemR(md, "falloff_radius")
-               flow.itemR(md, "start_position_x")
-               flow.itemR(md, "start_position_y")
+               split = layout.split()
+               
+               col = split.column()
+               col.itemL(text="Time:")
+               sub = col.column(align=True)
+               sub.itemR(md, "time_offset", text="Offset")
+               sub.itemR(md, "lifetime", text="Life")
+               col.itemR(md, "damping_time", text="Damping")
+               
+               col = split.column()
+               col.itemL(text="Position:")
+               sub = col.column(align=True)
+               sub.itemR(md, "start_position_x", text="X")
+               sub.itemR(md, "start_position_y", text="Y")
+               col.itemR(md, "falloff_radius", text="Falloff")
+               
+               layout.itemS()
                
                layout.itemR(md, "start_position_object")
                layout.item_pointerR(md, "vertex_group", ob, "vertex_groups")
@@ -420,6 +430,8 @@ class DATA_PT_modifiers(DataButtonsPanel):
                elif md.texture_coordinates == 'OBJECT':
                        layout.itemR(md, "texture_coordinates_object")
                
+               layout.itemS()
+               
                flow = layout.column_flow()
                flow.itemR(md, "speed", slider=True)
                flow.itemR(md, "height", slider=True)
index aa43b14b974eb757265b3225c854cc45c0bba150..82e3319ea5931461bf4af25f35727adaf378f383 100644 (file)
@@ -317,7 +317,7 @@ class IMAGE_PT_game_properties(bpy.types.Panel):
 class IMAGE_PT_view_properties(bpy.types.Panel):
        __space_type__ = 'IMAGE_EDITOR'
        __region_type__ = 'UI'
-       __label__ = "View Properties"
+       __label__ = "Display"
 
        def poll(self, context):
                sima = context.space_data
@@ -335,26 +335,33 @@ class IMAGE_PT_view_properties(bpy.types.Panel):
 
                col = split.column()
                if ima:
-                       col.itemR(ima, "display_aspect")
+                       col.itemR(ima, "display_aspect", text="Aspect Ratio")
 
                        col = split.column()
+                       col.itemL(text="Coordinates:")
                        col.itemR(sima, "draw_repeated", text="Repeat")
                        if show_uvedit:
                                col.itemR(uvedit, "normalized_coordinates", text="Normalized")
                elif show_uvedit:
+                       col.itemL(text="Coordinates:")
                        col.itemR(uvedit, "normalized_coordinates", text="Normalized")
 
                if show_uvedit:
                        col = layout.column()
                        row = col.row()
                        row.itemR(uvedit, "edge_draw_type", expand=True)
-                       row = col.row()
-                       row.itemR(uvedit, "draw_smooth_edges", text="Smooth")
-                       row.itemR(uvedit, "draw_modified_edges", text="Modified")
 
-                       row = col.row()
-                       row.itemR(uvedit, "draw_stretch", text="Stretch")
-                       row.itemR(uvedit, "draw_stretch_type", text="")
+                       split = layout.split()
+
+                       col = split.column()
+                       col.itemR(uvedit, "draw_stretch", text="Stretch")
+                       sub = col.column()
+                       sub.active = uvedit.draw_stretch
+                       sub.row().itemR(uvedit, "draw_stretch_type", expand=True)
+                       
+                       col = split.column()
+                       col.itemR(uvedit, "draw_smooth_edges", text="Smooth")
+                       col.itemR(uvedit, "draw_modified_edges", text="Modified")
                        #col.itemR(uvedit, "draw_edges")
                        #col.itemR(uvedit, "draw_faces")
 
index bfa4d5b64852d6b6025444010fe8d6014438cdef..6e4b5beb161de6fd16003ea404425b9d20995c77 100644 (file)
@@ -22,7 +22,7 @@ class TIME_HT_header(bpy.types.Header):
                        sub.itemM("TIME_MT_frame")
                        sub.itemM("TIME_MT_playback")
 
-               layout.itemR(scene, "use_preview_range", text="PR", toggle=True)
+               layout.itemR(scene, "use_preview_range", text="PR")
                
                row = layout.row(align=True)
                if not scene.use_preview_range:
index 8e5bc100af10bb2247ca5ee489ff3d0468518fe8..2062f6e22926ec69bc1060e08065d1e8b02909ec 100644 (file)
@@ -24,8 +24,7 @@ class VIEW3D_HT_header(bpy.types.Header):
                        sub.itemM("VIEW3D_MT_view")
                        
                        # Select Menu
-                       if mode_string not in ('EDIT_TEXT', 'SCULPT', 'PAINT_WEIGHT', 'PAINT_VERTEX', 'PAINT_TEXTURE', 'PARTICLE'):
-                               # XXX: Particle Mode has Select Menu.
+                       if mode_string not in ('EDIT_TEXT', 'SCULPT', 'PAINT_WEIGHT', 'PAINT_VERTEX', 'PAINT_TEXTURE'):
                                sub.itemM("VIEW3D_MT_select_%s" % mode_string)
                        
                        if edit_object:
@@ -33,17 +32,44 @@ class VIEW3D_HT_header(bpy.types.Header):
                        elif object:
                                ob_mode_string = object.mode
                                
-                               if ob_mode_string == 'OBJECT':
-                                       sub.itemM("VIEW3D_MT_object")
-                               elif ob_mode_string == 'SCULPT':
-                                       sub.itemM("VIEW3D_MT_sculpt")
-                               elif ob_mode_string == 'VERTEX_PAINT':
-                                       sub.itemM("VIEW3D_MT_vertex_paint")
+                               if mode_string not in ['PAINT_WEIGHT', 'PAINT_TEXTURE']:
+                                       sub.itemM("VIEW3D_MT_%s" % mode_string)
 
                layout.template_header_3D()
 
 # ********** Menu **********
 
+# ********** Utilities **********
+
+class VIEW3D_MT_showhide(bpy.types.Menu):
+       __space_type__ = "VIEW_3D"
+       __label__ = "Show/Hide"
+       _operator_name = ""
+
+       def draw(self, context):
+               layout = self.layout
+               
+               layout.itemO("%s.reveal" % self._operator_name, text="Show Hidden")
+               layout.itemO("%s.hide" % self._operator_name, text="Hide Selected")
+               layout.item_booleanO("%s.hide" % self._operator_name, "unselected", True, text="Hide Unselected")
+
+class VIEW3D_MT_snap(bpy.types.Menu):
+       __space_type__ = "VIEW_3D"
+       __label__ = "Snap"
+
+       def draw(self, context):
+               layout = self.layout
+               
+               layout.itemO("view3d.snap_selected_to_grid", text="Selection to Grid")
+               layout.itemO("view3d.snap_selected_to_cursor", text="Selection to Cursor")
+               layout.itemO("view3d.snap_selected_to_center", text="Selection to Center")
+               
+               layout.itemS()
+               
+               layout.itemO("view3d.snap_cursor_to_selected", text="Cursor to Selected")
+               layout.itemO("view3d.snap_cursor_to_grid", text="Cursor to Grid")
+               layout.itemO("view3d.snap_cursor_to_active", text="Cursor to Active")
+
 # ********** View menus **********
 
 class VIEW3D_MT_view(bpy.types.Menu):
@@ -63,7 +89,7 @@ class VIEW3D_MT_view(bpy.types.Menu):
                layout.item_enumO("view3d.viewnumpad", "type", 'FRONT')
                layout.item_enumO("view3d.viewnumpad", "type", 'RIGHT')
                
-               layout.itemM("VIEW3D_MT_view_cameras", text="Cameras")
+               layout.itemM("VIEW3D_MT_view_cameras", text="Cameras")
                
                layout.itemS()
 
@@ -71,24 +97,15 @@ class VIEW3D_MT_view(bpy.types.Menu):
                
                layout.itemS()
                
-               # layout.itemO("view3d.view_show_all_layers")
-               
-               # layout.itemS()
-               
-               # layout.itemO("view3d.view_local_view")
-               # layout.itemO("view3d.view_global_view")
-               
-               # layout.itemS()
-               
                layout.itemM("VIEW3D_MT_view_navigation")
-               # layout.itemM("VIEW3D_MT_view_align", text="Align View")
+               layout.itemM("VIEW3D_MT_view_align")
                
                layout.itemS()
 
                layout.operator_context = "INVOKE_REGION_WIN"
 
-               layout.itemO("view3d.clip_border")
-               layout.itemO("view3d.zoom_border")
+               layout.itemO("view3d.clip_border", text="Clipping Border...")
+               layout.itemO("view3d.zoom_border", text="Zoom Border...")
                
                layout.itemS()
                
@@ -107,9 +124,6 @@ class VIEW3D_MT_view_navigation(bpy.types.Menu):
        def draw(self, context):
                layout = self.layout
 
-               # layout.itemO("view3d.view_fly_mode")
-               # layout.itemS()
-               
                layout.items_enumO("view3d.view_orbit", "type")
                
                layout.itemS()
@@ -121,6 +135,22 @@ class VIEW3D_MT_view_navigation(bpy.types.Menu):
                layout.item_floatO("view3d.zoom", "delta", 1.0, text="Zoom In")
                layout.item_floatO("view3d.zoom", "delta", -1.0, text="Zoom Out")
 
+class VIEW3D_MT_view_align(bpy.types.Menu):
+       __space_type__ = "VIEW_3D"
+       __label__ = "Align View"
+
+       def draw(self, context):
+               layout = self.layout
+               
+               layout.itemO("view3d.view_center")
+               
+class VIEW3D_MT_view_cameras(bpy.types.Menu):
+       __space_type__ = "VIEW_3D"
+       __label__ = "Cameras"
+
+       def draw(self, context):
+               layout = self.layout
+
 # ********** Select menus, suffix from context.mode **********
 
 class VIEW3D_MT_select_OBJECT(bpy.types.Menu):
@@ -138,8 +168,8 @@ class VIEW3D_MT_select_OBJECT(bpy.types.Menu):
                layout.itemO("object.select_inverse", text="Inverse")
                layout.itemO("object.select_random", text="Random")
                layout.itemO("object.select_by_layer", text="Select All by Layer")
-               layout.item_enumO("object.select_by_type", "type", "", text="Select All by Type")
-               layout.itemO("object.select_grouped", text="Select Grouped")
+               layout.item_enumO("object.select_by_type", "type", "", text="Select All by Type...")
+               layout.itemO("object.select_grouped", text="Select Grouped...")
 
 class VIEW3D_MT_select_POSE(bpy.types.Menu):
        __space_type__ = 'VIEW_3D'
@@ -148,7 +178,7 @@ class VIEW3D_MT_select_POSE(bpy.types.Menu):
        def draw(self, context):
                layout = self.layout
 
-               layout.itemO("view3d.select_border")
+               layout.itemO("view3d.select_border", text="Border Select...")
 
                layout.itemS()
                
@@ -187,9 +217,6 @@ class VIEW3D_MT_select_PARTICLE(bpy.types.Menu):
                
                layout.itemS()
                
-               #layout.itemO("particle.select_last")
-               #layout.itemO("particle.select_first")
-               
                layout.itemO("particle.select_more")
                layout.itemO("particle.select_less")
 
@@ -200,7 +227,7 @@ class VIEW3D_MT_select_EDIT_MESH(bpy.types.Menu):
        def draw(self, context):
                layout = self.layout
 
-               layout.itemO("view3d.select_border")
+               layout.itemO("view3d.select_border", text="Border Select...")
 
                layout.itemS()
 
@@ -244,8 +271,8 @@ class VIEW3D_MT_select_EDIT_CURVE(bpy.types.Menu):
        def draw(self, context):
                layout = self.layout
 
-               layout.itemO("view3d.select_border")
-               layout.itemO("view3d.select_circle")
+               layout.itemO("view3d.select_border", text="Border Select...")
+               layout.itemO("view3d.select_circle", text="Circle Select...")
 
                layout.itemS()
                
@@ -273,8 +300,8 @@ class VIEW3D_MT_select_EDIT_SURFACE(bpy.types.Menu):
        def draw(self, context):
                layout = self.layout
 
-               layout.itemO("view3d.select_border")
-               layout.itemO("view3d.select_circle")
+               layout.itemO("view3d.select_border", text="Border Select...")
+               layout.itemO("view3d.select_circle", text="Circle Select...")
 
                layout.itemS()
                
@@ -303,12 +330,12 @@ class VIEW3D_MT_select_EDIT_METABALL(bpy.types.Menu):
                
                layout.itemS()
                
-               layout.itemL(text="Select/Deselect All")
-               layout.itemL(text="Inverse")
+               layout.itemO("mball.select_deselect_all_metaelems")
+               layout.itemO("mball.select_inverse_metaelems")
                
                layout.itemS()
                
-               layout.itemL(text="Random")
+               layout.itemO("mball.select_random_metaelems")
 
 class VIEW3D_MT_select_EDIT_LATTICE(bpy.types.Menu):
        __space_type__ = 'VIEW_3D'
@@ -330,7 +357,7 @@ class VIEW3D_MT_select_EDIT_ARMATURE(bpy.types.Menu):
        def draw(self, context):
                layout = self.layout
 
-               layout.itemO("view3d.select_border")
+               layout.itemO("view3d.select_border", text="Border Select...")
 
                layout.itemS()
                
@@ -363,7 +390,7 @@ class VIEW3D_MT_select_FACE(bpy.types.Menu):# XXX no matching enum
 
 # ********** Object menu **********
 
-class VIEW3D_MT_object(bpy.types.Menu):
+class VIEW3D_MT_OBJECT(bpy.types.Menu):
        __space_type__ = 'VIEW_3D'
        __context__ = "objectmode"
        __label__ = "Object"
@@ -371,27 +398,27 @@ class VIEW3D_MT_object(bpy.types.Menu):
        def draw(self, context):
                layout = self.layout
 
-               layout.itemM("VIEW3D_MT_object_clear")
-               layout.itemM("VIEW3D_MT_object_snap")
+               layout.itemM("VIEW3D_MT_OBJECT_clear")
+               layout.itemM("VIEW3D_MT_snap")
                
                layout.itemS()
                
-               layout.itemO("anim.insert_keyframe_menu")
-               layout.itemO("anim.delete_keyframe_v3d")
+               layout.itemO("anim.insert_keyframe_menu", text="Insert Keyframe...")
+               layout.itemO("anim.delete_keyframe_v3d", text="Delete Keyframe...")
                
                layout.itemS()
                
                layout.itemO("object.duplicate")
                layout.item_booleanO("object.duplicate", "linked", True, text="Duplicate Linked")
-               layout.itemO("object.delete")
-               layout.itemO("object.proxy_make")
+               layout.itemO("object.delete", text="Delete...")
+               layout.itemO("object.proxy_make", text="Make Proxy...")
                
                layout.itemS()
                
-               layout.itemM("VIEW3D_MT_object_parent")
-               layout.itemM("VIEW3D_MT_object_track")
-               layout.itemM("VIEW3D_MT_object_group")
-               layout.itemM("VIEW3D_MT_object_constraints")
+               layout.itemM("VIEW3D_MT_OBJECT_parent")
+               layout.itemM("VIEW3D_MT_OBJECT_track")
+               layout.itemM("VIEW3D_MT_OBJECT_group")
+               layout.itemM("VIEW3D_MT_OBJECT_constraints")
                
                layout.itemS()
                
@@ -399,58 +426,41 @@ class VIEW3D_MT_object(bpy.types.Menu):
                
                layout.itemS()
                
-               layout.itemM("VIEW3D_MT_object_show")
+               layout.itemM("VIEW3D_MT_OBJECT_showhide")
                
-class VIEW3D_MT_object_clear(bpy.types.Menu):
+class VIEW3D_MT_OBJECT_clear(bpy.types.Menu):
        __space_type__ = 'VIEW_3D'
        __label__ = "Clear"
 
        def draw(self, context):
                layout = self.layout
                
-               layout.itemO("object.location_clear")
-               layout.itemO("object.rotation_clear")
-               layout.itemO("object.scale_clear")
-               layout.itemO("object.origin_clear")
+               layout.itemO("object.location_clear", text="Location")
+               layout.itemO("object.rotation_clear", text="Rotation")
+               layout.itemO("object.scale_clear", text="Scale")
+               layout.itemO("object.origin_clear", text="Origin")
                
-class VIEW3D_MT_object_snap(bpy.types.Menu):
-       __space_type__ = 'VIEW_3D'
-       __label__ = "Snap"
-
-       def draw(self, context):
-               layout = self.layout
-               
-               layout.itemO("view3d.snap_selected_to_grid")
-               layout.itemO("view3d.snap_selected_to_cursor")
-               layout.itemO("view3d.snap_selected_to_center")
-               
-               layout.itemS()
-               
-               layout.itemO("view3d.snap_cursor_to_selected")
-               layout.itemO("view3d.snap_cursor_to_grid")
-               layout.itemO("view3d.snap_cursor_to_active")
-               
-class VIEW3D_MT_object_parent(bpy.types.Menu):
+class VIEW3D_MT_OBJECT_parent(bpy.types.Menu):
        __space_type__ = 'VIEW_3D'
        __label__ = "Parent"
 
        def draw(self, context):
                layout = self.layout
                
-               layout.itemO("object.parent_set")
-               layout.itemO("object.parent_clear")
+               layout.itemO("object.parent_set", text="Set")
+               layout.itemO("object.parent_clear", text="Clear")
                
-class VIEW3D_MT_object_track(bpy.types.Menu):
+class VIEW3D_MT_OBJECT_track(bpy.types.Menu):
        __space_type__ = 'VIEW_3D'
        __label__ = "Track"
 
        def draw(self, context):
                layout = self.layout
                
-               layout.itemO("object.track_set")
-               layout.itemO("object.track_clear")
+               layout.itemO("object.track_set", text="Set")
+               layout.itemO("object.track_clear", text="Clear")
                
-class VIEW3D_MT_object_group(bpy.types.Menu):
+class VIEW3D_MT_OBJECT_group(bpy.types.Menu):
        __space_type__ = 'VIEW_3D'
        __label__ = "Group"
 
@@ -465,7 +475,7 @@ class VIEW3D_MT_object_group(bpy.types.Menu):
                layout.itemO("group.objects_add_active")
                layout.itemO("group.objects_remove_active")
                
-class VIEW3D_MT_object_constraints(bpy.types.Menu):
+class VIEW3D_MT_OBJECT_constraints(bpy.types.Menu):
        __space_type__ = 'VIEW_3D'
        __label__ = "Constraints"
 
@@ -475,20 +485,20 @@ class VIEW3D_MT_object_constraints(bpy.types.Menu):
                layout.itemO("object.constraint_add_with_targets")
                layout.itemO("object.constraints_clear")
                
-class VIEW3D_MT_object_show(bpy.types.Menu):
+class VIEW3D_MT_OBJECT_showhide(bpy.types.Menu):
        __space_type__ = 'VIEW_3D'
        __label__ = "Show/Hide"
 
        def draw(self, context):
                layout = self.layout
                
-               layout.itemO("object.restrictview_clear")
-               layout.itemO("object.restrictview_set")
+               layout.itemO("object.restrictview_clear", text="Show Hidden")
+               layout.itemO("object.restrictview_set", text="Hide Selected")
                layout.item_booleanO("object.restrictview_set", "unselected", True, text="Hide Unselected")
 
 # ********** Vertex paint menu **********      
        
-class VIEW3D_MT_vertex_paint(bpy.types.Menu):
+class VIEW3D_MT_PAINT_VERTEX(bpy.types.Menu):
        __space_type__ = 'VIEW_3D'
        __label__ = "Paint"
 
@@ -503,7 +513,7 @@ class VIEW3D_MT_vertex_paint(bpy.types.Menu):
 
 # ********** Sculpt menu **********    
        
-class VIEW3D_MT_sculpt(bpy.types.Menu):
+class VIEW3D_MT_SCULPT(bpy.types.Menu):
        __space_type__ = 'VIEW_3D'
        __label__ = "Sculpt"
 
@@ -537,24 +547,175 @@ class VIEW3D_MT_sculpt(bpy.types.Menu):
                                layout.itemR(brush, "persistent")
                                layout.itemO("sculpt.set_persistent_base")
 
-# ********** Edit Menus, suffix from ob.type **********
+# ********** Particle menu **********  
 
-class VIEW3D_MT_edit_snap(bpy.types.Menu):
+class VIEW3D_MT_PARTICLE(bpy.types.Menu):
        __space_type__ = 'VIEW_3D'
-       __label__ = "Snap"
+       __label__ = "Particle"
+
+       def draw(self, context):
+               layout = self.layout
+               
+               particle_edit = context.tool_settings.particle_edit
+               
+               layout.itemO("particle.mirror")
+               
+               layout.itemS()
+               
+               layout.itemO("particle.remove_doubles")
+               layout.itemO("particle.delete")
+
+               if particle_edit.selection_mode == 'POINT':
+                       layout.itemO("particle.subdivide")
+               
+               layout.itemO("particle.rekey")
+               
+               layout.itemS()
+               
+               layout.itemM("VIEW3D_MT_PARTICLE_showhide")
+
+class VIEW3D_MT_PARTICLE_showhide(VIEW3D_MT_showhide):
+       _operator_name = "particle"
+
+# ********** Pose Menu **********
+
+class VIEW3D_MT_POSE(bpy.types.Menu):
+       __space_type__ = "VIEW_3D"
+       __label__ = "Pose"
+
+       def draw(self, context):
+               layout = self.layout
+               
+               arm = context.active_object.data
+               
+               if arm.drawtype in ('BBONE', 'ENVELOPE'):
+                       layout.item_enumO("tfm.transform", "mode", 'BONESIZE', text="Scale Envelope Distance")
+               
+               layout.itemM("VIEW3D_MT_POSE_transform")
+               
+               layout.itemS()
+               
+               layout.itemO("anim.insert_keyframe_menu", text="Insert Keyframe...")
+               layout.itemO("anim.delete_keyframe_v3d", text="Delete Keyframe...")
+               
+               layout.itemS()
+               
+               layout.itemO("pose.apply")
+               
+               layout.itemS()
+               
+               layout.itemO("pose.copy")
+               layout.itemO("pose.paste")
+               layout.item_booleanO("pose.paste", "flipped", True, text="Paste X-Flipped Pose")
+               
+               layout.itemS()
+               
+               layout.itemM("VIEW3D_MT_POSE_pose")
+               layout.itemM("VIEW3D_MT_POSE_motion")
+               layout.itemM("VIEW3D_MT_POSE_group")
+               
+               layout.itemS()
+               
+               layout.itemM("VIEW3D_MT_POSE_ik")
+               layout.itemM("VIEW3D_MT_POSE_constraints")
+               
+               layout.itemS()
+               
+               layout.item_enumO("pose.autoside_names", "axis", 'XAXIS', text="AutoName Left/Right")
+               layout.item_enumO("pose.autoside_names", "axis", 'YAXIS', text="AutoName Front/Back")
+               layout.item_enumO("pose.autoside_names", "axis", 'ZAXIS', text="AutoName Top/Bottom")
+               
+               layout.itemO("pose.flip_names")
+               
+               layout.itemS()
+               
+               layout.itemO("pose.armature_layers", text="Change Armature Layers...")
+               layout.itemO("pose.bone_layers", text="Change Bone Layers...")
+               
+               layout.itemS()
+               
+               layout.itemM("VIEW3D_MT_POSE_showhide")
+               layout.item_menu_enumO("pose.flags_set", 'mode', text="Bone Settings")
+
+class VIEW3D_MT_POSE_transform(bpy.types.Menu):
+       __space_type__ = "VIEW_3D"
+       __label__ = "Clear Transform"
+
+       def draw(self, context):
+               layout = self.layout
+               
+               layout.itemL(text="User Transform")
+               
+               layout.itemO("pose.loc_clear", text="Location")
+               layout.itemO("pose.rot_clear", text="Rotation")
+               layout.itemO("pose.scale_clear", text="Scale")
+               
+               layout.itemL(text="Origin")
+               
+class VIEW3D_MT_POSE_pose(bpy.types.Menu):
+       __space_type__ = "VIEW_3D"
+       __label__ = "Pose Library"
 
        def draw(self, context):
                layout = self.layout
                
-               layout.itemO("view3d.snap_selected_to_grid")
-               layout.itemO("view3d.snap_selected_to_cursor")
-               layout.itemO("view3d.snap_selected_to_center")
+               layout.itemO("poselib.browse_interactive", text="Browse Poses...")
                
                layout.itemS()
                
-               layout.itemO("view3d.snap_cursor_to_selected")
-               layout.itemO("view3d.snap_cursor_to_grid")
-               layout.itemO("view3d.snap_cursor_to_active")
+               layout.itemO("poselib.pose_add", text="Add Pose...")
+               layout.itemO("poselib.pose_rename", text="Rename Pose...")
+               layout.itemO("poselib.pose_remove", text="Remove Pose...")
+
+class VIEW3D_MT_POSE_motion(bpy.types.Menu):
+       __space_type__ = "VIEW_3D"
+       __label__ = "Motion Paths"
+
+       def draw(self, context):
+               layout = self.layout
+               
+               layout.itemO("pose.paths_calculate", text="Calculate")
+               layout.itemO("pose.paths_clear", text="Clear")
+               
+class VIEW3D_MT_POSE_group(bpy.types.Menu):
+       __space_type__ = "VIEW_3D"
+       __label__ = "Bone Groups"
+
+       def draw(self, context):
+               layout = self.layout
+               layout.itemO("pose.group_add")
+               layout.itemO("pose.group_remove")
+               
+               layout.itemS()
+               
+               layout.itemO("pose.group_assign")
+               layout.itemO("pose.group_unassign")
+               
+               
+class VIEW3D_MT_POSE_ik(bpy.types.Menu):
+       __space_type__ = "VIEW_3D"
+       __label__ = "Inverse Kinematics"
+
+       def draw(self, context):
+               layout = self.layout
+               
+               layout.itemO("pose.ik_add")
+               layout.itemO("pose.ik_clear")
+               
+class VIEW3D_MT_POSE_constraints(bpy.types.Menu):
+       __space_type__ = "VIEW_3D"
+       __label__ = "Constraints"
+
+       def draw(self, context):
+               layout = self.layout
+               
+               layout.itemO("pose.constraint_add_with_targets", text="Add (With Targets)...")
+               layout.itemO("pose.constraints_clear")
+               
+class VIEW3D_MT_POSE_showhide(VIEW3D_MT_showhide):
+       _operator_name = "pose"
+
+# ********** Edit Menus, suffix from ob.type **********
 
 # Edit MESH
 class VIEW3D_MT_edit_MESH(bpy.types.Menu):
@@ -571,17 +732,17 @@ class VIEW3D_MT_edit_MESH(bpy.types.Menu):
                
                layout.itemS()
                
-               layout.itemM("VIEW3D_MT_edit_snap")
+               layout.itemM("VIEW3D_MT_snap")
                
                layout.itemS()
                
-               layout.itemO("uv.mapping_menu")
+               layout.itemO("uv.mapping_menu", text="UV Unwrap...")
                
                layout.itemS()
                
                layout.itemO("mesh.extrude")
                layout.itemO("mesh.duplicate")
-               layout.itemO("mesh.delete")
+               layout.itemO("mesh.delete", text="Delete...")
                
                layout.itemS()
                
@@ -626,7 +787,6 @@ class VIEW3D_MT_edit_MESH_edges(bpy.types.Menu):
 
                layout.itemO("mesh.edge_face_add")
                layout.itemO("mesh.subdivide")
-               layout.item_floatO("mesh.subdivide", "smoothness", 1.0, text="Subdivide Smooth")
 
                layout.itemS()
                
@@ -679,16 +839,8 @@ class VIEW3D_MT_edit_MESH_normals(bpy.types.Menu):
                
                layout.itemO("mesh.flip_normals")
                
-class VIEW3D_MT_edit_MESH_showhide(bpy.types.Menu):
-       __space_type__ = 'VIEW_3D'
-       __label__ = "Show/Hide"
-
-       def draw(self, context):
-               layout = self.layout
-
-               layout.itemO("mesh.reveal")
-               layout.itemO("mesh.hide")
-               layout.item_booleanO("mesh.hide", "unselected", True, text="Hide Unselected")
+class VIEW3D_MT_edit_MESH_showhide(VIEW3D_MT_showhide):
+       _operator_name = "mesh"
 
 # Edit CURVE
 
@@ -698,7 +850,7 @@ def draw_CURVE(self, context):
        
        settings = context.tool_settings
 
-       layout.itemM("VIEW3D_MT_edit_snap")
+       layout.itemM("VIEW3D_MT_snap")
        
        layout.itemS()
        
@@ -707,7 +859,7 @@ def draw_CURVE(self, context):
        layout.itemO("curve.separate")
        layout.itemO("curve.make_segment")
        layout.itemO("curve.cyclic_toggle")
-       layout.itemO("curve.delete")
+       layout.itemO("curve.delete", text="Delete...")
        
        layout.itemS()
        
@@ -757,16 +909,8 @@ class VIEW3D_MT_edit_CURVE_segments(bpy.types.Menu):
                layout.itemO("curve.subdivide")
                layout.itemO("curve.switch_direction")
 
-class VIEW3D_MT_edit_CURVE_showhide(bpy.types.Menu):
-       __space_type__ = 'VIEW_3D'
-       __label__ = "Show/Hide"
-
-       def draw(self, context):
-               layout = self.layout
-               
-               layout.itemO("curve.reveal")
-               layout.itemO("curve.hide")
-               layout.item_booleanO("curve.hide", "unselected", True, text="Hide Unselected")
+class VIEW3D_MT_edit_CURVE_showhide(VIEW3D_MT_showhide):
+       _operator_name = "curve"
 
 # Edit SURFACE
 class VIEW3D_MT_edit_SURFACE(bpy.types.Menu):
@@ -838,11 +982,11 @@ class VIEW3D_MT_edit_META(bpy.types.Menu):
                
                layout.itemS()
                
-               layout.itemM("VIEW3D_MT_edit_snap")
+               layout.itemM("VIEW3D_MT_snap")
                
                layout.itemS()
                
-               layout.itemO("mball.delete_metaelems")
+               layout.itemO("mball.delete_metaelems", text="Delete...")
                layout.itemO("mball.duplicate_metaelems")
                
                layout.itemS()
@@ -861,8 +1005,8 @@ class VIEW3D_MT_edit_META_showhide(bpy.types.Menu):
        def draw(self, context):
                layout = self.layout
                
-               layout.itemO("mball.reveal_metaelems")
-               layout.itemO("mball.hide_metaelems")
+               layout.itemO("mball.reveal_metaelems", text="Show Hidden")
+               layout.itemO("mball.hide_metaelems", text="Hide Selected")
                layout.item_booleanO("mball.hide_metaelems", "unselected", True, text="Hide Unselected")
 
 # Edit LATTICE
@@ -875,7 +1019,7 @@ class VIEW3D_MT_edit_LATTICE(bpy.types.Menu):
                
                settings = context.tool_settings
 
-               layout.itemM("VIEW3D_MT_edit_snap")
+               layout.itemM("VIEW3D_MT_snap")
                
                layout.itemS()
                
@@ -897,7 +1041,7 @@ class VIEW3D_MT_edit_ARMATURE(bpy.types.Menu):
                edit_object = context.edit_object
                arm = edit_object.data
                
-               layout.itemM("VIEW3D_MT_edit_snap")
+               layout.itemM("VIEW3D_MT_snap")
                layout.itemM("VIEW3D_MT_edit_ARMATURE_roll")
                
                if arm.drawtype == 'ENVELOPE':
@@ -920,8 +1064,7 @@ class VIEW3D_MT_edit_ARMATURE(bpy.types.Menu):
 
                layout.itemS()
 
-               layout.itemO("armature.subdivide_simple")
-               layout.itemO("armature.subdivide_multi")
+               layout.itemO("armature.subdivide_multi", text="Subdivide")
                
                layout.itemS()
 
@@ -950,8 +1093,8 @@ class VIEW3D_MT_edit_ARMATURE_parent(bpy.types.Menu):
        def draw(self, context):
                layout = self.layout
                
-               layout.itemO("armature.parent_set")
-               layout.itemO("armature.parent_clear")
+               layout.itemO("armature.parent_set", text="Make")
+               layout.itemO("armature.parent_clear", text="Clear")
 
 class VIEW3D_MT_edit_ARMATURE_roll(bpy.types.Menu):
        __space_type__ = 'VIEW_3D'
@@ -1108,6 +1251,8 @@ bpy.types.register(VIEW3D_HT_header) # Header
 
 bpy.types.register(VIEW3D_MT_view) #View Menus
 bpy.types.register(VIEW3D_MT_view_navigation)
+bpy.types.register(VIEW3D_MT_view_align)
+bpy.types.register(VIEW3D_MT_view_cameras)
 
 bpy.types.register(VIEW3D_MT_select_OBJECT) # Select Menus
 bpy.types.register(VIEW3D_MT_select_POSE)
@@ -1120,20 +1265,31 @@ bpy.types.register(VIEW3D_MT_select_EDIT_LATTICE)
 bpy.types.register(VIEW3D_MT_select_EDIT_ARMATURE)
 bpy.types.register(VIEW3D_MT_select_FACE) # XXX todo
 
-bpy.types.register(VIEW3D_MT_object) # Object Menu
-bpy.types.register(VIEW3D_MT_object_clear)
-bpy.types.register(VIEW3D_MT_object_snap)
-bpy.types.register(VIEW3D_MT_object_parent)
-bpy.types.register(VIEW3D_MT_object_track)
-bpy.types.register(VIEW3D_MT_object_group)
-bpy.types.register(VIEW3D_MT_object_constraints)
-bpy.types.register(VIEW3D_MT_object_show)
+bpy.types.register(VIEW3D_MT_OBJECT) # Object Menu
+bpy.types.register(VIEW3D_MT_OBJECT_clear)
+bpy.types.register(VIEW3D_MT_OBJECT_parent)
+bpy.types.register(VIEW3D_MT_OBJECT_track)
+bpy.types.register(VIEW3D_MT_OBJECT_group)
+bpy.types.register(VIEW3D_MT_OBJECT_constraints)
+bpy.types.register(VIEW3D_MT_OBJECT_showhide)
+
+bpy.types.register(VIEW3D_MT_SCULPT) # Sculpt Menu
+
+bpy.types.register(VIEW3D_MT_PAINT_VERTEX)
 
-bpy.types.register(VIEW3D_MT_sculpt) # Sculpt Menu
+bpy.types.register(VIEW3D_MT_PARTICLE) # Particle Menu
+bpy.types.register(VIEW3D_MT_PARTICLE_showhide)
 
-bpy.types.register(VIEW3D_MT_vertex_paint)
+bpy.types.register(VIEW3D_MT_POSE) # POSE Menu
+bpy.types.register(VIEW3D_MT_POSE_transform)
+bpy.types.register(VIEW3D_MT_POSE_pose)
+bpy.types.register(VIEW3D_MT_POSE_motion)
+bpy.types.register(VIEW3D_MT_POSE_group)
+bpy.types.register(VIEW3D_MT_POSE_ik)
+bpy.types.register(VIEW3D_MT_POSE_constraints)
+bpy.types.register(VIEW3D_MT_POSE_showhide)
 
-bpy.types.register(VIEW3D_MT_edit_snap) # Edit Menus
+bpy.types.register(VIEW3D_MT_snap) # Edit Menus
 
 bpy.types.register(VIEW3D_MT_edit_MESH)
 bpy.types.register(VIEW3D_MT_edit_MESH_vertices)
index 1cb163a4de713130a35afefadf3a6a65b9ce73ec..c78227a363fbd95d206f270111384273f3463103 100644 (file)
@@ -78,6 +78,7 @@
 
 #include "BKE_main.h"
 #include "BKE_anim.h"
+#include "BKE_action.h"
 #include "BKE_bmesh.h"
 // XXX #include "BKE_booleanops.h"
 #include "BKE_cloth.h"
index acf7467713b83b259f4b8c2adb39f7c329e75f45..0ef470a698e0d38153b8f5d2e61496ed68083516 100644 (file)
@@ -79,6 +79,7 @@
 #include "UI_view2d.h"
 
 #include "ED_anim_api.h"
+#include "ED_keyframing.h"
 #include "ED_keyframes_edit.h" // XXX move the select modes out of there!
 #include "ED_screen.h"
 #include "ED_space_api.h"
@@ -1869,13 +1870,14 @@ void ANIM_channel_setting_set (bAnimContext *ac, bAnimListElem *ale, int setting
 
 // XXX hardcoded size of icons
 #define ICON_WIDTH             17
+// XXX hardcoded width of sliders
+#define SLIDER_WIDTH   70
 
 /* Draw the given channel */
 // TODO: make this use UI controls for the buttons
 void ANIM_channel_draw (bAnimContext *ac, bAnimListElem *ale, float yminc, float ymaxc)
 {
        bAnimChannelType *acf= ANIM_channel_get_typeinfo(ale);
-       View2D *v2d= &ac->ar->v2d;
        short selected, offset;
        float y, ymid, ytext;
        
@@ -1970,27 +1972,7 @@ void ANIM_channel_draw (bAnimContext *ac, bAnimListElem *ale, float yminc, float
                offset += 3;
                UI_DrawString(offset, ytext, name);
        }
-       
-       /* step 6) draw mute+protection toggles + (sliders) ....................... */
-       /* reset offset - now goes from RHS of panel */
-       offset = 0;
-       
-       // TODO: we need a mechanism of drawing over (and hiding) stuff from here...
-       // TODO: when drawing sliders, make those draw instead of these toggles if not enough space
-       
-       if (v2d) {
-               /* protect... */
-               if (acf->has_setting(ac, ale, ACHANNEL_SETTING_PROTECT)) {
-                       /* just skip - drawn as widget now */
-                       offset += ICON_WIDTH;
-               }
-               /* mute... */
-               if (acf->has_setting(ac, ale, ACHANNEL_SETTING_MUTE)) {
-                       /* just skip - drawn as widget now */
-                       offset += ICON_WIDTH;
                }
-       }
-}
 
 /* ------------------ */
 
@@ -2000,6 +1982,44 @@ static void achannel_setting_widget_cb(bContext *C, void *poin, void *poin2)
        WM_event_add_notifier(C, NC_ANIMATION|ND_ANIMCHAN_EDIT, NULL);
 }
 
+/* callback for widget sliders - insert keyframes */
+static void achannel_setting_slider_cb(bContext *C, void *id_poin, void *fcu_poin)
+{
+       ID *id= (ID *)id_poin;
+       FCurve *fcu= (FCurve *)fcu_poin;
+       
+       Scene *scene= CTX_data_scene(C);
+       PointerRNA id_ptr, ptr;
+       PropertyRNA *prop;
+       short flag=0, done=0;
+       float cfra;
+       
+       /* get current frame */
+       // NOTE: this will do for now...
+       cfra= (float)CFRA;
+       
+       /* get flags for keyframing */
+       if (IS_AUTOKEY_FLAG(INSERTNEEDED))
+               flag |= INSERTKEY_NEEDED;
+       if (IS_AUTOKEY_FLAG(AUTOMATKEY))
+               flag |= INSERTKEY_MATRIX;
+       
+       
+       /* get RNA pointer, and resolve the path */
+       RNA_id_pointer_create(id, &id_ptr);
+       
+       /* try to resolve the path stored in the F-Curve */
+       if (RNA_path_resolve(&id_ptr, fcu->rna_path, &ptr, &prop)) {
+               /* insert a keyframe for this F-Curve */
+               done= insert_keyframe_direct(ptr, prop, fcu, cfra, flag);
+               
+               if (done)
+                       WM_event_add_notifier(C, NC_ANIMATION|ND_ANIMCHAN_EDIT, NULL);
+       }
+}
+
+
+
 /* Draw a widget for some setting */
 static void draw_setting_widget (bAnimContext *ac, bAnimListElem *ale, bAnimChannelType *acf, uiBlock *block, int xpos, int ypos, int setting)
 {
@@ -2164,6 +2184,28 @@ void ANIM_channel_draw_widgets (bAnimContext *ac, bAnimListElem *ale, uiBlock *b
        // TODO: when drawing sliders, make those draw instead of these toggles if not enough space
        
        if (v2d) {
+               short draw_sliders = 0;
+               
+               /* check if we need to show the sliders */
+               if ((ac->sa) && ELEM(ac->spacetype, SPACE_ACTION, SPACE_IPO)) {
+                       switch (ac->spacetype) {
+                               case SPACE_ACTION:
+                               {
+                                       SpaceAction *saction= (SpaceAction *)ac->sa->spacedata.first;
+                                       draw_sliders= (saction->flag & SACTION_SLIDERS);
+                               }
+                                       break;
+                               case SPACE_IPO:
+                               {
+                                       SpaceIpo *sipo= (SpaceIpo *)ac->sa->spacedata.first;
+                                       draw_sliders= (sipo->flag & SIPO_SLIDERS);
+                               }
+                                       break;
+                       }
+               }
+               
+               /* check if there's enough space for the toggles if the sliders are drawn too */
+               if ( !(draw_sliders) || ((v2d->mask.xmax-v2d->mask.xmin) > ACHANNEL_BUTTON_WIDTH/2) ) {
                /* protect... */
                if (acf->has_setting(ac, ale, ACHANNEL_SETTING_PROTECT)) {
                        offset += ICON_WIDTH; 
@@ -2175,6 +2217,44 @@ void ANIM_channel_draw_widgets (bAnimContext *ac, bAnimListElem *ale, uiBlock *b
                        draw_setting_widget(ac, ale, acf, block, (int)v2d->cur.xmax-offset, ymid, ACHANNEL_SETTING_MUTE);
                }
        }
+               
+               /* draw slider
+                *      - even if we can draw sliders for this view, we must also check that the channel-type supports them
+                *        (only only F-Curves really can support them for now)
+                *      - to make things easier, we use RNA-autobuts for this so that changes are reflected immediately, 
+                *        whereever they occurred. BUT, we don't use the layout engine, otherwise we'd get wrong alignment,
+                *        and wouldn't be able to auto-keyframe...
+                *      - slider should start before the toggles (if they're visible) to keep a clean line down the side
+                */
+               if ((draw_sliders) && (ale->type == ANIMTYPE_FCURVE)) {
+                       /* adjust offset */
+                       offset += SLIDER_WIDTH;
+                       
+                       /* need backdrop behind sliders... */
+                       uiBlockSetEmboss(block, UI_EMBOSS);
+                       
+                       if (ale->id) { /* Slider using RNA Access -------------------- */
+                               FCurve *fcu= (FCurve *)ale->data;
+                               PointerRNA id_ptr, ptr;
+                               PropertyRNA *prop;
+                               
+                               /* get RNA pointer, and resolve the path */
+                               RNA_id_pointer_create(ale->id, &id_ptr);
+                               
+                               /* try to resolve the path */
+                               if (RNA_path_resolve(&id_ptr, fcu->rna_path, &ptr, &prop)) {
+                                       uiBut *but;
+                                       
+                                       /* create the slider button, and assign relevant callback to ensure keyframes are inserted... */
+                                       but= uiDefAutoButR(block, &ptr, prop, fcu->array_index, "", 0, (int)v2d->cur.xmax-offset, ymid, SLIDER_WIDTH, (int)ymaxc-yminc);
+                                       uiButSetFunc(but, achannel_setting_slider_cb, ale->id, fcu);
+}
+                       }
+                       else { /* Special Slider for stuff without RNA Access ---------- */
+                               // TODO: only implement this case when we really need it...
+                       }
+               }
+       }
 }
 
 /* *********************************************** */
index 394cc53dda23cc70c3cb9abee20fe2ccb70c8460..ecf0bdbf285e317810ff384602aa3a903a589c63 100644 (file)
@@ -93,9 +93,8 @@ int geticon_anim_blocktype(short blocktype)
 }
 
 /* Write into "name" buffer, the name of the property (retrieved using RNA from the curve's settings) 
- * WARNING: name buffer we're writing to cannot exceed 128 chars (check action_draw.c for details)
+ * WARNING: name buffer we're writing to cannot exceed 256 chars (check anim_channels_defines.c for details)
  */
-// TODO: have an extra var to indicate if prop was valid?
 void getname_anim_fcurve(char *name, ID *id, FCurve *fcu)
 {
        /* sanity checks */
index 2da082a9b7cd5bdf3da40c20370c5056bf008755..b62c69c7b38edbfa26358032b01377be7bce1179 100644 (file)
@@ -740,6 +740,12 @@ short insert_keyframe_direct (PointerRNA ptr, PropertyRNA *prop, FCurve *fcu, fl
                printf("ERROR: no F-Curve to add keyframes to \n");
                return 0;
        }
+       /* F-Curve not editable? */
+       if ( (fcu->flag & FCURVE_PROTECTED) || ((fcu->grp) && (fcu->grp->flag & AGRP_PROTECTED)) ) {
+               if (G.f & G_DEBUG)
+                       printf("WARNING: not inserting keyframe for locked F-Curve \n");
+               return 0;
+       }
        
        /* if no property given yet, try to validate from F-Curve info */
        if ((ptr.id.data == NULL) && (ptr.data==NULL)) {
@@ -911,8 +917,19 @@ short delete_keyframe (ID *id, bAction *act, const char group[], const char rna_
        /* we don't check the validity of the path here yet, but it should be ok... */
        fcu= verify_fcurve(act, group, rna_path, array_index, 0);
        
-       /* only continue if we have an F-Curve to remove keyframes from */
-       if (act && fcu) {
+       /* check if F-Curve exists and/or whether it can be edited */
+       if ELEM(NULL, act, fcu) {
+               printf("ERROR: no F-Curve and/or Action to delete keyframe from \n");
+               return 0;
+       }
+       if ( (fcu->flag & FCURVE_PROTECTED) || ((fcu->grp) && (fcu->grp->flag & AGRP_PROTECTED)) ) {
+               if (G.f & G_DEBUG)
+                       printf("WARNING: not inserting keyframe for locked F-Curve \n");
+               return 0;
+       }
+       
+       /* it should be fine to continue now... */
+       {
                short found = -1;
                int i;
                
index 5f93743493acfb8f7054d0d9f7141766f6404e09..0cb6964b39eb13da80f6fd14822651e2920be291 100644 (file)
@@ -645,7 +645,6 @@ void uiTemplateImageLayers(uiLayout *layout, struct bContext *C, struct Image *i
 void uiTemplateRunningJobs(uiLayout *layout, struct bContext *C);
 void uiTemplateOperatorSearch(uiLayout *layout);
 void uiTemplateHeader3D(uiLayout *layout, struct bContext *C);
-void uiTemplate_view3d_select_metaballmenu(uiLayout *layout, struct bContext *C);
 void uiTemplate_view3d_select_faceselmenu(uiLayout *layout, struct bContext *C);
 void uiTemplateTextureImage(uiLayout *layout, struct bContext *C, struct Tex *tex);
 
index 8676fe62a3aca9f0238ef6bacae69d0c2dd71a63..3b4471bd4b95cc0dfffbd19833a8647823f435b4 100644 (file)
@@ -793,11 +793,11 @@ static void ui_item_rna_size(uiLayout *layout, char *name, int icon, PropertyRNA
        }
        else if(ui_layout_vary_direction(layout) == UI_ITEM_VARY_X) {
                if(type == PROP_BOOLEAN && strcmp(name, "") != 0)
-                       w += UI_UNIT_X;
+                       w += UI_UNIT_X/5;
                else if(type == PROP_ENUM)
                        w += UI_UNIT_X/2;
                else if(type == PROP_FLOAT || type == PROP_INT)
-                       w += UI_UNIT_X*2;
+                       w += UI_UNIT_X*3;
        }
 
        *r_w= w;
index 48de2343c9778e86f8b804f9fb8346b60e5dfd3e..a55b11afe48f62b57e89c17dca4295bce38a212b 100644 (file)
@@ -1085,7 +1085,7 @@ static struct uiWidgetColors wcol_tool= {
        {255, 255, 255, 255},
        
        1,
-       25, -25
+       15, -15
 };
 
 static struct uiWidgetColors wcol_box= {
@@ -1897,7 +1897,7 @@ static void widget_swatch(uiBut *but, uiWidgetColors *wcol, rcti *rect, int stat
        widget_init(&wtb);
        
        /* half rounded */
-       round_box_edges(&wtb, roundboxalign, rect, 4.0f);
+       round_box_edges(&wtb, roundboxalign, rect, 5.0f);
                
        ui_get_but_vectorf(but, col);
        wcol->inner[0]= FTOCHAR(col[0]);
@@ -1916,7 +1916,7 @@ static void widget_textbut(uiWidgetColors *wcol, rcti *rect, int state, int roun
        widget_init(&wtb);
        
        /* half rounded */
-       round_box_edges(&wtb, roundboxalign, rect, 5.0f);
+       round_box_edges(&wtb, roundboxalign, rect, 4.0f);
        
        widgetbase_draw(&wtb, wcol);
 
@@ -1950,8 +1950,8 @@ static void widget_pulldownbut(uiWidgetColors *wcol, rcti *rect, int state, int
                
                widget_init(&wtb);
                
-               /* fully rounded */
-               round_box_edges(&wtb, 15, rect, rad);
+               /* half rounded */
+               round_box_edges(&wtb, 15, rect, 4.0f);
                
                widgetbase_draw(&wtb, wcol);
        }
@@ -2049,8 +2049,8 @@ static void widget_roundbut(uiWidgetColors *wcol, rcti *rect, int state, int rou
        
        widget_init(&wtb);
        
-       /* fully rounded */
-       round_box_edges(&wtb, roundboxalign, rect, rad);
+       /* half rounded */
+       round_box_edges(&wtb, roundboxalign, rect, 5.0f);
 
        widgetbase_draw(&wtb, wcol);
 }
index 5b51d898235dc74e73d0a73db25b7e008cffa7ad..8aaede7515a9dcad5f7970afdd323498fbfdb370 100644 (file)
@@ -445,6 +445,7 @@ void ui_theme_init_userdef(void)
        SETCOL(btheme->tv3d.text_hi, 255, 255, 255, 255);
        
        SETCOLF(btheme->tv3d.header,    0.45, 0.45, 0.45, 1.0);
+       SETCOLF(btheme->tv3d.button,    0.45, 0.45, 0.45, 1.0);
        SETCOL(btheme->tv3d.panel,      165, 165, 165, 127);
        
        SETCOL(btheme->tv3d.shade1,  160, 160, 160, 100);
index d27aa3f7e3a31ef90b4af956b115b4cf0eeabab7..f2c5b7fb727b709dcc79eb03a0eb4e80fb4ec7fb 100644 (file)
@@ -4349,7 +4349,7 @@ void MESH_OT_vertices_smooth(wmOperatorType *ot)
        /* flags */
        ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
 
-       RNA_def_int(ot->srna, "repeat", 1, 1, 100, "Number of times to smooth the mesh", "", 1, INT_MAX);
+       RNA_def_int(ot->srna, "repeat", 1, 1, 100, "Smooth Iterations", "", 1, INT_MAX);
 }
 
 void vertexnoise(Object *obedit, EditMesh *em)
@@ -4475,7 +4475,8 @@ void MESH_OT_vertices_transform_to_sphere(wmOperatorType *ot)
 {
        /* identifiers */
        ot->name= "Vertices to Sphere";
-       ot->description= "Move selected vertices outward in a spherical shape.";
+       //added "around cursor" to differentiate between "TFM_OT_tosphere()"
+       ot->description= "Move selected vertices outward in a spherical shape around cursor.";
        ot->idname= "MESH_OT_vertices_transform_to_sphere";
        
        /* api callbacks */
index 380390cf543b46a579ef8f28a6015d09a1ba0ec2..799bb0741f3c944fec4b2bf2cafeb50b2c7d61f9 100644 (file)
@@ -3329,7 +3329,6 @@ void ED_keymap_screen(wmWindowManager *wm)
        WM_keymap_verify_item(keymap, "SCREEN_OT_repeat_history", F3KEY, KM_PRESS, 0, 0);
        WM_keymap_add_item(keymap, "SCREEN_OT_repeat_last", RKEY, KM_PRESS, KM_CTRL, 0);
        WM_keymap_add_item(keymap, "SCREEN_OT_repeat_last", RKEY, KM_PRESS, KM_OSKEY, 0);
-       WM_keymap_add_item(keymap, "SCREEN_OT_repeat_last", F4KEY, KM_PRESS, 0, 0);
        WM_keymap_add_item(keymap, "SCREEN_OT_region_flip", F5KEY, KM_PRESS, 0, 0);
        WM_keymap_verify_item(keymap, "SCREEN_OT_redo_last", F6KEY, KM_PRESS, 0, 0);
        
@@ -3348,18 +3347,17 @@ void ED_keymap_screen(wmWindowManager *wm)
                                                  
        /* render */
        WM_keymap_add_item(keymap, "SCREEN_OT_render", F12KEY, KM_PRESS, 0, 0);
-       WM_keymap_add_item(keymap, "SCREEN_OT_render", RETKEY, KM_PRESS, KM_CTRL, 0);
-       WM_keymap_add_item(keymap, "SCREEN_OT_render", RETKEY, KM_PRESS, KM_OSKEY, 0);
+//     WM_keymap_add_item(keymap, "SCREEN_OT_render", RETKEY, KM_PRESS, KM_CTRL, 0);
+//     WM_keymap_add_item(keymap, "SCREEN_OT_render", RETKEY, KM_PRESS, KM_OSKEY, 0);
        RNA_boolean_set(WM_keymap_add_item(keymap, "SCREEN_OT_render", F12KEY, KM_PRESS, KM_CTRL, 0)->ptr, "animation", 1);
-       RNA_boolean_set(WM_keymap_add_item(keymap, "SCREEN_OT_render", RETKEY, KM_PRESS, KM_CTRL|KM_SHIFT, 0)->ptr, "animation", 1);
-       RNA_boolean_set(WM_keymap_add_item(keymap, "SCREEN_OT_render", RETKEY, KM_PRESS, KM_OSKEY|KM_SHIFT, 0)->ptr, "animation", 1);
+//     RNA_boolean_set(WM_keymap_add_item(keymap, "SCREEN_OT_render", RETKEY, KM_PRESS, KM_CTRL|KM_SHIFT, 0)->ptr, "animation", 1);
+//     RNA_boolean_set(WM_keymap_add_item(keymap, "SCREEN_OT_render", RETKEY, KM_PRESS, KM_OSKEY|KM_SHIFT, 0)->ptr, "animation", 1);
        WM_keymap_add_item(keymap, "SCREEN_OT_render_view_cancel", ESCKEY, KM_PRESS, 0, 0);
        WM_keymap_add_item(keymap, "SCREEN_OT_render_view_show", F11KEY, KM_PRESS, 0, 0);
        
        /* user prefs */
        WM_keymap_add_item(keymap, "SCREEN_OT_userpref_show", COMMAKEY, KM_PRESS, KM_CTRL, 0);
        WM_keymap_add_item(keymap, "SCREEN_OT_userpref_show", COMMAKEY, KM_PRESS, KM_OSKEY, 0);
-       WM_keymap_add_item(keymap, "SCREEN_OT_userpref_show", UKEY, KM_PRESS, KM_ALT, 0);
        
        /* Anim Playback ------------------------------------------------ */
        keymap= WM_keymap_listbase(wm, "Frames", 0, 0);
diff --git a/source/blender/editors/sculpt_paint/sculpt_stroke.c b/source/blender/editors/sculpt_paint/sculpt_stroke.c
deleted file mode 100644 (file)
index 554ff58..0000000
+++ /dev/null
@@ -1,274 +0,0 @@
-/*
- * $Id$
- *
- * ***** BEGIN GPL LICENSE BLOCK *****
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software  Foundation,
- * Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
- *
- * The Original Code is Copyright (C) 2007 by Nicholas Bishop
- * All rights reserved.
- *
- * The Original Code is: all of this file.
- *
- * Contributor(s): none yet.
- *
- * ***** END GPL LICENSE BLOCK *****
- *
- * Storage and manipulation of sculptmode brush strokes.
- *
- */
-
-#include "MEM_guardedalloc.h"
-
-#include "DNA_listBase.h"
-#include "DNA_scene_types.h"
-
-#include "BKE_sculpt.h"
-#include "BLI_blenlib.h"
-#include "BIF_gl.h"
-
-#include "sculpt_intern.h"
-
-#include <math.h>
-
-/* Temporary storage of input stroke control points */
-typedef struct StrokePoint {
-       struct StrokePoint *next, *prev;
-       short x, y;
-} StrokePoint;
-typedef struct SculptStroke {
-       short (*loc)[2];
-       int max;
-       int index;
-       float length;
-       ListBase final;
-       StrokePoint *final_mem;
-       float offset;
-} SculptStroke;
-
-SculptStroke *sculpt_stroke_new(const int max)
-{
-       SculptStroke *stroke = MEM_callocN(sizeof(SculptStroke), "SculptStroke");
-       stroke->loc = MEM_callocN(sizeof(short) * 4 * max, "SculptStroke.loc");
-       stroke->max = max;
-       stroke->index = -1;
-       return stroke;
-}
-
-void sculpt_stroke_free(SculptStroke *stroke)
-{
-       if(stroke) {
-               if(stroke->loc) MEM_freeN(stroke->loc);
-               if(stroke->final_mem) MEM_freeN(stroke->final_mem);
-
-               MEM_freeN(stroke);
-       }
-}
-
-void sculpt_stroke_add_point(SculptStroke *stroke, const short x, const short y)
-{
-       const int next = stroke->index + 1;
-
-       if(stroke->index == -1) {
-               stroke->loc[0][0] = x;
-               stroke->loc[0][1] = y;
-               stroke->index = 0;
-       }
-       else if(next < stroke->max) {
-               const int dx = x - stroke->loc[stroke->index][0];
-               const int dy = y - stroke->loc[stroke->index][1];
-               stroke->loc[next][0] = x;
-               stroke->loc[next][1] = y;
-               stroke->length += sqrt(dx*dx + dy*dy);
-               stroke->index = next;
-       }
-}
-
-static void sculpt_stroke_smooth(SculptStroke *stroke)
-{
-       /* Apply smoothing (exclude the first and last points)*/
-       StrokePoint *p = stroke->final.first;
-       if(p && p->next && p->next->next) {
-               for(p = p->next->next; p && p->next && p->next->next; p = p->next) {
-                       p->x = p->prev->prev->x*0.1 + p->prev->x*0.2 + p->x*0.4 + p->next->x*0.2 + p->next->next->x*0.1;
-                       p->y = p->prev->prev->y*0.1 + p->prev->y*0.2 + p->y*0.4 + p->next->y*0.2 + p->next->next->y*0.1;
-               }
-       }       
-}
-
-static void sculpt_stroke_create_final(SculptStroke *stroke)
-{
-       if(stroke) {
-               StrokePoint *p, *pnext;
-               int i;
-
-               /* Copy loc into final */
-               if(stroke->final_mem)
-                       MEM_freeN(stroke->final_mem);
-               stroke->final_mem = MEM_callocN(sizeof(StrokePoint) * (stroke->index + 1) * 2, "SculptStroke.final");
-               stroke->final.first = stroke->final.last = NULL;
-               for(i = 0; i <= stroke->index; ++i) {
-                       p = &stroke->final_mem[i];
-                       p->x = stroke->loc[i][0];
-                       p->y = stroke->loc[i][1];
-                       BLI_addtail(&stroke->final, p);
-               }
-
-               /* Remove shortest edges */
-               if(stroke->final.first) {
-                       for(p = ((StrokePoint*)stroke->final.first)->next; p && p->next; p = pnext) {
-                               const int dx = p->x - p->prev->x;
-                               const int dy = p->y - p->prev->y;
-                               const float len = sqrt(dx*dx + dy*dy);
-                               pnext = p->next;
-                               if(len < 10) {
-                                       BLI_remlink(&stroke->final, p);
-                               }
-                       }
-               }
-
-               sculpt_stroke_smooth(stroke);
-
-               /* Subdivide edges */
-               for(p = stroke->final.first; p && p->next; p = pnext) {
-                       StrokePoint *np = &stroke->final_mem[i++];
-
-                       pnext = p->next;
-                       np->x = (p->x + p->next->x) / 2;
-                       np->y = (p->y + p->next->y) / 2;
-                       BLI_insertlink(&stroke->final, p, np);
-               }
-
-               sculpt_stroke_smooth(stroke);
-       }
-}
-
-static float sculpt_stroke_seglen(StrokePoint *p1, StrokePoint *p2)
-{
-       int dx = p2->x - p1->x;
-       int dy = p2->y - p1->y;
-       return sqrt(dx*dx + dy*dy);
-}
-
-static float sculpt_stroke_final_length(SculptStroke *stroke)
-{
-       StrokePoint *p;
-       float len = 0;
-       for(p = stroke->final.first; p && p->next; ++p)
-               len += sculpt_stroke_seglen(p, p->next);
-       return len;
-}
-
-/* If partial is nonzero, cuts off apply after that length has been processed */
-static StrokePoint *sculpt_stroke_apply_generic(Sculpt *sd, SculptStroke *stroke, const int partial)
-{
-       const int sdspace = 0; //XXX: sd->spacing;
-       const short spacing = sdspace > 0 ? sdspace : 2;
-       const int dots = sculpt_stroke_final_length(stroke) / spacing;
-       int i;
-       StrokePoint *p = stroke->final.first;
-       float startloc = stroke->offset;
-
-       for(i = 0; i < dots && p && p->next; ++i) {
-               const float dotloc = spacing * i;
-               short co[2];
-               float len = sculpt_stroke_seglen(p, p->next);
-               float u, v;
-
-               /* Find edge containing dot */
-               while(dotloc > startloc + len && p && p->next && p->next->next) {
-                       p = p->next;
-                       startloc += len;
-                       len = sculpt_stroke_seglen(p, p->next);
-               }
-
-               if(!p || !p->next || dotloc > startloc + len)
-                       break;
-
-               if(partial && startloc > partial) {
-                       /* Calculate offset for next stroke segment */
-                       stroke->offset = startloc + len - dotloc;
-                       break;
-               }
-
-               u = (dotloc - startloc) / len;
-               v = 1 - u;
-                                       
-               co[0] = p->x*v + p->next->x*u;
-               co[1] = p->y*v + p->next->y*u;
-
-               //do_symmetrical_brush_actions(sd, a, co, NULL);
-       }
-
-       return p ? p->next : NULL;
-}
-
-void sculpt_stroke_apply(Sculpt *sd, SculptStroke *stroke)
-{
-       /* TODO: make these values user-modifiable? */
-       const int partial_len = 100;
-       const int min_len = 200;
-
-       if(stroke) {
-               sculpt_stroke_create_final(stroke);
-
-               if(sculpt_stroke_final_length(stroke) > min_len) {
-                       StrokePoint *p = sculpt_stroke_apply_generic(sd, stroke, partial_len);
-
-                       /* Replace remaining values in stroke->loc with remaining stroke->final values */
-                       stroke->index = -1;
-                       stroke->length = 0;
-                       for(; p; p = p->next) {
-                               ++stroke->index;
-                               stroke->loc[stroke->index][0] = p->x;
-                               stroke->loc[stroke->index][1] = p->y;
-                               if(p->next) {
-                                       stroke->length += sculpt_stroke_seglen(p, p->next);
-                               }
-                       }
-               }
-       }
-}
-
-void sculpt_stroke_apply_all(Sculpt *sd, SculptStroke *stroke)
-{
-       sculpt_stroke_create_final(stroke);
-
-       if(stroke) {
-               sculpt_stroke_apply_generic(sd, stroke, 0);
-       }
-}
-
-/* XXX: drawing goes elsewhere */
-void sculpt_stroke_draw(SculptStroke *stroke)
-{
-       if(stroke) {
-               StrokePoint *p;
-
-               /* Draws the original stroke */
-               /*glColor3f(1, 0, 0);           
-               glBegin(GL_LINE_STRIP);
-               for(i = 0; i <= stroke->index; ++i)
-                       glVertex2s(stroke->loc[i][0], stroke->loc[i][1]);
-               glEnd();*/
-
-               /* Draws the smoothed stroke */
-               glColor3f(0, 1, 0);
-               glBegin(GL_LINE_STRIP);
-               for(p = stroke->final.first; p; p = p->next)
-                       glVertex2s(p->x, p->y);
-               glEnd();
-       }
-}
index 4fb22064c1765ddb7a36752fb4da61c0b8dd5406..1403b6c8ff69654471d2af7dcc32b10b40be0226 100644 (file)
 #include "ED_screen.h"
 #include "ED_space_api.h"
 
-#if 0 // XXX old includes for reference only
-       #include "BIF_editaction.h"
-       #include "BIF_editkey.h"
-       #include "BIF_editnla.h"
-       #include "BIF_drawgpencil.h"
-       #include "BIF_keyframing.h"
-       #include "BIF_language.h"
-       #include "BIF_space.h"
        
-       #include "BDR_editcurve.h"
-       #include "BDR_gpencil.h"
-
-       #include "BSE_drawnla.h"
-       #include "BSE_drawipo.h"
-       #include "BSE_drawview.h"
-       #include "BSE_editaction_types.h"
-       #include "BSE_editipo.h"
-       #include "BSE_headerbuttons.h"
-       #include "BSE_time.h"
-       #include "BSE_view.h"
-#endif // XXX old defines for reference only
-
-/* XXX */
-extern void gl_round_box(int mode, float minx, float miny, float maxx, float maxy, float rad);
-
-/********************************** Slider Stuff **************************** */
-
-#if 0 // XXX all of this slider stuff will need a rethink!
-/* sliders for shapekeys */
-static void meshactionbuts(SpaceAction *saction, Object *ob, Key *key)
-{
-       int           i;
-       char          str[64];
-       float         x, y;
-       uiBlock       *block;
-       uiBut             *but;
-       
-       /* lets make the shapekey sliders */
-       
-       /* reset the damn myortho2 or the sliders won't draw/redraw
-        * correctly *grumble*
-        */
-       mywinset(curarea->win);
-       myortho2(-0.375f, curarea->winx-0.375f, G.v2d->cur.ymin, G.v2d->cur.ymax);
-       
-    sprintf(str, "actionbuttonswin %d", curarea->win);
-    block= uiNewBlock (&curarea->uiblocks, str, UI_EMBOSS);
-
-       x = ACHANNEL_NAMEWIDTH + 1;
-    y = 0.0f;
-       
-       uiBlockSetEmboss(block, UI_EMBOSSN);
-
-       if (!(G.saction->flag & SACTION_SLIDERS)) {
-               ACTWIDTH = ACHANNEL_NAMEWIDTH;
-               but=uiDefIconButBitS(block, TOG, SACTION_SLIDERS, B_REDR, 
-                                         ICON_DISCLOSURE_TRI_RIGHT,
-                                         ACHANNEL_NAMEWIDTH - XIC - 5, (short)y + CHANNELHEIGHT,
-                                         XIC,YIC-2,
-                                         &(G.saction->flag), 0, 0, 0, 0, 
-                                         "Show action window sliders");
-               /* no hilite, the winmatrix is not correct later on... */
-               uiButSetFlag(but, UI_NO_HILITE);
-       }
-       else {
-               but= uiDefIconButBitS(block, TOG, SACTION_SLIDERS, B_REDR, 
-                                         ICON_DISCLOSURE_TRI_DOWN,
-                                         ACHANNEL_NAMEWIDTH - XIC - 5, (short)y + CHANNELHEIGHT,
-                                         XIC,YIC-2,
-                                         &(G.saction->flag), 0, 0, 0, 0, 
-                                         "Hide action window sliders");
-               /* no hilite, the winmatrix is not correct later on... */
-               uiButSetFlag(but, UI_NO_HILITE);
-               
-               ACTWIDTH = ACHANNEL_NAMEWIDTH + SLIDERWIDTH;
-               
-               /* sliders are open so draw them */
-               BIF_ThemeColor(TH_FACE); 
-               
-               glRects(ACHANNEL_NAMEWIDTH,  0,  ACHANNEL_NAMEWIDTH+SLIDERWIDTH,  curarea->winy);
-               uiBlockSetEmboss(block, UI_EMBOSS);
-               for (i=1; i < key->totkey; i++) {
-                       make_rvk_slider(block, ob, i, 
-                                                       (int)x, (int)y, SLIDERWIDTH-2, CHANNELHEIGHT-1, "Slider to control Shape Keys");
-                       
-                       y-=CHANNELHEIGHT+CHANNELSKIP;
-                       
-                       /* see sliderval array in editkey.c */
-                       if (i >= 255) break;
-               }
-       }
-       uiDrawBlock(C, block);
-}
-
-static void icu_slider_func(void *voidicu, void *voidignore) 
-{
-       /* the callback for the icu sliders ... copies the
-        * value from the icu->curval into a bezier at the
-        * right frame on the right ipo curve (creating both the
-        * ipo curve and the bezier if needed).
-        */
-       IpoCurve  *icu= voidicu;
-       BezTriple *bezt=NULL;
-       float cfra, icuval;
-
-       cfra = frame_to_float(CFRA);
-       if (G.saction->pin==0 && OBACT)
-               cfra= get_action_frame(OBACT, cfra);
-       
-       /* if the ipocurve exists, try to get a bezier
-        * for this frame
-        */
-       bezt = get_bezt_icu_time(icu, &cfra, &icuval);
-
-       /* create the bezier triple if one doesn't exist,
-        * otherwise modify it's value
-        */
-       if (bezt == NULL) {
-               insert_vert_icu(icu, cfra, icu->curval, 0);
-       }
-       else {
-               bezt->vec[1][1] = icu->curval;
-       }
-
-       /* make sure the Ipo's are properly processed and
-        * redraw as necessary
-        */
-       sort_time_ipocurve(icu);
-       testhandles_ipocurve(icu);
-       
-       /* nla-update (in case this affects anything) */
-       synchronize_action_strips();
-       
-       /* do redraw pushes, and also the depsgraph flushes */
-       if (OBACT->pose || ob_get_key(OBACT))
-               DAG_object_flush_update(G.scene, OBACT, OB_RECALC);
-       else
-               DAG_object_flush_update(G.scene, OBACT, OB_RECALC_OB);
-       
-       allqueue(REDRAWVIEW3D, 0);
-       allqueue(REDRAWACTION, 0);
-       allqueue(REDRAWNLA, 0);
-       allqueue(REDRAWIPO, 0);
-       allspace(REMAKEIPO, 0);
-       allqueue(REDRAWBUTSALL, 0);
-}
-
-static void make_icu_slider(uiBlock *block, IpoCurve *icu,
-                                        int x, int y, int w, int h, char *tip)
-{
-       /* create a slider for the ipo-curve*/
-       uiBut *but;
-       
-       if(icu == NULL) return;
-       
-       if (IS_EQ(icu->slide_max, icu->slide_min)) {
-               if (IS_EQ(icu->ymax, icu->ymin)) {
-                       if (ELEM(icu->blocktype, ID_CO, ID_KE)) {
-                               /* hack for constraints and shapekeys (and maybe a few others) */
-                               icu->slide_min= 0.0;
-                               icu->slide_max= 1.0;
-                       }
-                       else {
-                               icu->slide_min= -100;
-                               icu->slide_max= 100;
-                       }
-               }
-               else {
-                       icu->slide_min= icu->ymin;
-                       icu->slide_max= icu->ymax;
-               }
-       }
-       if (icu->slide_min >= icu->slide_max) {
-               SWAP(float, icu->slide_min, icu->slide_max);
-       }
-
-       but=uiDefButF(block, NUMSLI, REDRAWVIEW3D, "",
-                                 x, y , w, h,
-                                 &(icu->curval), icu->slide_min, icu->slide_max, 
-                                 10, 2, tip);
-       
-       uiButSetFunc(but, icu_slider_func, icu, NULL);
-       
-       // no hilite, the winmatrix is not correct later on...
-       uiButSetFlag(but, UI_NO_HILITE);
-}
-
-/* sliders for ipo-curves of active action-channel */
-static void action_icu_buts(SpaceAction *saction)
-{
-       ListBase act_data = {NULL, NULL};
-       bActListElem *ale;
-       int filter;
-       void *data;
-       short datatype;
-       
-       char          str[64];
-       float           x, y;
-       uiBlock       *block;
-
-       /* lets make the action sliders */
-
-       /* reset the damn myortho2 or the sliders won't draw/redraw
-        * correctly *grumble*
-        */
-       mywinset(curarea->win);
-       myortho2(-0.375f, curarea->winx-0.375f, G.v2d->cur.ymin, G.v2d->cur.ymax);
-       
-    sprintf(str, "actionbuttonswin %d", curarea->win);
-    block= uiNewBlock (&curarea->uiblocks, str, UI_EMBOSS);
-
-       x = (float)ACHANNEL_NAMEWIDTH + 1;
-    y = 0.0f;
-       
-       uiBlockSetEmboss(block, UI_EMBOSSN);
-
-       if (G.saction->flag & SACTION_SLIDERS) {
-               /* sliders are open so draw them */
-               
-               /* get editor data */
-               data= get_action_context(&datatype);
-               if (data == NULL) return;
-               
-               /* build list of channels to draw */
-               filter= (ACTFILTER_FORDRAWING|ACTFILTER_VISIBLE|ACTFILTER_CHANNELS);
-               actdata_filter(&act_data, filter, data, datatype);
-               
-               /* draw backdrop first */
-               BIF_ThemeColor(TH_FACE); // change this color... it's ugly
-               glRects(ACHANNEL_NAMEWIDTH,  (short)G.v2d->cur.ymin,  ACHANNEL_NAMEWIDTH+SLIDERWIDTH,  (short)G.v2d->cur.ymax);
-               
-               uiBlockSetEmboss(block, UI_EMBOSS);
-               for (ale= act_data.first; ale; ale= ale->next) {
-                       const float yminc= y-CHANNELHEIGHT/2;
-                       const float ymaxc= y+CHANNELHEIGHT/2;
-                       
-                       /* check if visible */
-                       if ( IN_RANGE(yminc, G.v2d->cur.ymin, G.v2d->cur.ymax) ||
-                                IN_RANGE(ymaxc, G.v2d->cur.ymin, G.v2d->cur.ymax) ) 
-                       {
-                               /* determine what needs to be drawn */
-                               switch (ale->type) {
-                                       case ACTTYPE_CONCHAN: /* constraint channel */
-                                       {
-                                               bActionChannel *achan = (bActionChannel *)ale->owner;
-                                               IpoCurve *icu = (IpoCurve *)ale->key_data;
-                                               
-                                               /* only show if owner is selected */
-                                               if ((ale->ownertype == ACTTYPE_OBJECT) || SEL_ACHAN(achan)) {
-                                                       make_icu_slider(block, icu,
-                                                                                       (int)x, (int)y, SLIDERWIDTH-2, CHANNELHEIGHT-2, 
-                                                                                       "Slider to control current value of Constraint Influence");
-                                               }
-                                       }
-                                               break;
-                                       case ACTTYPE_ICU: /* ipo-curve channel */
-                                       {
-                                               bActionChannel *achan = (bActionChannel *)ale->owner;
-                                               IpoCurve *icu = (IpoCurve *)ale->key_data;
-                                               
-                                               /* only show if owner is selected */
-                                               if ((ale->ownertype == ACTTYPE_OBJECT) || SEL_ACHAN(achan)) {
-                                                       make_icu_slider(block, icu,
-                                                                                       (int)x, (int)y, SLIDERWIDTH-2, CHANNELHEIGHT-2, 
-                                                                                       "Slider to control current value of IPO-Curve");
-                                               }
-                                       }
-                                               break;
-                                       case ACTTYPE_SHAPEKEY: /* shapekey channel */
-                                       {
-                                               Object *ob= (Object *)ale->id;
-                                               IpoCurve *icu= (IpoCurve *)ale->key_data;
-                                               
-                                               // TODO: only show if object is active 
-                                               if (icu) {
-                                                       make_icu_slider(block, icu,
-                                                                               (int)x, (int)y, SLIDERWIDTH-2, CHANNELHEIGHT-2, 
-                                                                               "Slider to control ShapeKey");
-                                               }
-                                               else if (ob && ale->index) {
-                                                       make_rvk_slider(block, ob, ale->index, 
-                                                                       (int)x, (int)y, SLIDERWIDTH-2, CHANNELHEIGHT-1, "Slider to control Shape Keys");
-                                               }
-                                       }
-                                               break;
-                               }
-                       }
-                       
-                       /* adjust y-position for next one */
-                       y-=CHANNELHEIGHT+CHANNELSKIP;
-               }
-               
-               /* free tempolary channels */
-               BLI_freelistN(&act_data);
-       }
-       uiDrawBlock(C, block);
-}
-
-#endif // XXX all of this slider stuff will need a rethink 
-
-
 /* ************************************************************************* */
 /* Channel List */
 
@@ -518,7 +218,6 @@ void draw_channel_strips(bAnimContext *ac, SpaceAction *saction, ARegion *ar)
                adt= ANIM_nla_mapping_get(ac, NULL);
                
                /* start and end of action itself */
-               // TODO: this has not had scaling applied
                calc_action_range(ac->data, &act_start, &act_end, 0);
        }
        
@@ -550,43 +249,14 @@ void draw_channel_strips(bAnimContext *ac, SpaceAction *saction, ARegion *ar)
                if ( IN_RANGE(yminc, v2d->cur.ymin, v2d->cur.ymax) ||
                         IN_RANGE(ymaxc, v2d->cur.ymin, v2d->cur.ymax) ) 
                {
+                       bAnimChannelType *acf= ANIM_channel_get_typeinfo(ale);
                        int sel=0;
                        
                        /* determine if any need to draw channel */
                        if (ale->datatype != ALE_NONE) {
                                /* determine if channel is selected */
-                               switch (ale->type) {
-                                       case ANIMTYPE_SCENE:
-                                       {
-                                               Scene *sce= (Scene *)ale->data;
-                                               sel = SEL_SCEC(sce);
-                                       }
-                                               break;
-                                       case ANIMTYPE_OBJECT:
-                                       {
-                                               Base *base= (Base *)ale->data;
-                                               sel = SEL_OBJC(base);
-                                       }
-                                               break;
-                                       case ANIMTYPE_GROUP:
-                                       {
-                                               bActionGroup *agrp = (bActionGroup *)ale->data;
-                                               sel = SEL_AGRP(agrp);
-                                       }
-                                               break;
-                                       case ANIMTYPE_FCURVE:
-                                       {
-                                               FCurve *fcu = (FCurve *)ale->data;
-                                               sel = SEL_FCU(fcu);
-                                       }
-                                               break;
-                                       case ANIMTYPE_GPLAYER:
-                                       {
-                                               bGPDlayer *gpl = (bGPDlayer *)ale->data;
-                                               sel = SEL_GPL(gpl);
-                                       }
-                                               break;
-                               }
+                               if (acf->has_setting(ac, ale, ACHANNEL_SETTING_SELECT))
+                                       sel= ANIM_channel_setting_get(ac, ale, ACHANNEL_SETTING_SELECT);
                                
                                if (ELEM(ac->datatype, ANIMCONT_ACTION, ANIMCONT_DOPESHEET)) {
                                        switch (ale->type) {
index 375136d199efbaaffcc70efe7a20639559eb0344..33a97b5a80ab720695845c979424349d7b650566 100644 (file)
@@ -404,13 +404,13 @@ void action_header_buttons(const bContext *C, ARegion *ar)
                        if (saction->flag & SACTION_DRAWTIME) {
                                uiDefButC(block, MENU, B_REDR,
                                                "Auto-Snap Keyframes %t|No Snap %x0|Second Step %x1|Nearest Second %x2|Nearest Marker %x3", 
-                                               xco,yco,70,YIC, &(saction->autosnap), 0, 1, 0, 0, 
+                                               xco,yco,90,YIC, &(saction->autosnap), 0, 1, 0, 0, 
                                                "Auto-snapping mode for keyframes when transforming");
                        }
                        else {
                                uiDefButC(block, MENU, B_REDR, 
                                                "Auto-Snap Keyframes %t|No Snap %x0|Frame Step %x1|Nearest Frame %x2|Nearest Marker %x3", 
-                                               xco,yco,70,YIC, &(saction->autosnap), 0, 1, 0, 0, 
+                                               xco,yco,90,YIC, &(saction->autosnap), 0, 1, 0, 0, 
                                                "Auto-snapping mode for keyframes when transforming");
                        }
                        
index 275ac4ea4c18691eb4e7bf67f56acabb4ccdf2fe..2977d07d8457be065889261ce23d5666ad0eaf00 100644 (file)
@@ -243,7 +243,7 @@ static void action_channel_area_draw(const bContext *C, ARegion *ar)
        
        /* data */
        if (ANIM_animdata_get_context(C, &ac)) {
-               draw_channel_names(C, &ac, saction, ar);
+               draw_channel_names((bContext *)C, &ac, saction, ar);
        }
        
        /* reset view matrix */
@@ -294,6 +294,7 @@ static void action_channel_area_listener(ARegion *ar, wmNotifier *wmn)
                case NC_SCENE:
                        switch(wmn->data) {
                                case ND_OB_ACTIVE:
+                               case ND_FRAME:
                                        ED_region_tag_redraw(ar);
                                        break;
                        }
index fa9055f2d8d1772e8953b06b25ebfcbe6c0ff8c0..f8dbe0c3dd41d15eb46056b0969b55640a005f0b 100644 (file)
@@ -280,6 +280,7 @@ void CONSOLE_OT_move(wmOperatorType *ot)
 {
        /* identifiers */
        ot->name= "Move Cursor";
+    ot->description= "Move cursor position.";
        ot->idname= "CONSOLE_OT_move";
        
        /* api callbacks */
@@ -324,6 +325,7 @@ void CONSOLE_OT_insert(wmOperatorType *ot)
 {
        /* identifiers */
        ot->name= "Insert";
+    ot->description= "Insert text at cursor position.";
        ot->idname= "CONSOLE_OT_insert";
        
        /* api callbacks */
@@ -391,6 +393,7 @@ void CONSOLE_OT_delete(wmOperatorType *ot)
 {
        /* identifiers */
        ot->name= "Delete";
+    ot->description= "Delete text by cursor position.";
        ot->idname= "CONSOLE_OT_delete";
        
        /* api callbacks */
@@ -434,6 +437,7 @@ void CONSOLE_OT_clear(wmOperatorType *ot)
 {
        /* identifiers */
        ot->name= "Clear";
+    ot->description= "Clear text by type.";
        ot->idname= "CONSOLE_OT_clear";
        
        /* api callbacks */
@@ -478,6 +482,7 @@ void CONSOLE_OT_history_cycle(wmOperatorType *ot)
 {
        /* identifiers */
        ot->name= "History Cycle";
+    ot->description= "Cycle through history.";
        ot->idname= "CONSOLE_OT_history_cycle";
        
        /* api callbacks */
@@ -525,6 +530,7 @@ void CONSOLE_OT_history_append(wmOperatorType *ot)
 {
        /* identifiers */
        ot->name= "History Append";
+    ot->description= "Append history at cursor position.";
        ot->idname= "CONSOLE_OT_history_append";
        
        /* api callbacks */
@@ -572,6 +578,7 @@ void CONSOLE_OT_scrollback_append(wmOperatorType *ot)
 
        /* identifiers */
        ot->name= "Scrollback Append";
+    ot->description= "Append scrollback text by type.";
        ot->idname= "CONSOLE_OT_scrollback_append";
        
        /* api callbacks */
@@ -614,6 +621,7 @@ void CONSOLE_OT_copy(wmOperatorType *ot)
 {
        /* identifiers */
        ot->name= "Copy to Clipboard";
+    ot->description= "Copy selected text to clipboard.";
        ot->idname= "CONSOLE_OT_copy";
 
        /* api callbacks */
@@ -648,6 +656,7 @@ void CONSOLE_OT_paste(wmOperatorType *ot)
 {
        /* identifiers */
        ot->name= "Paste from Clipboard";
+    ot->description= "Paste text from clipboard.";
        ot->idname= "CONSOLE_OT_paste";
 
        /* api callbacks */
@@ -679,6 +688,9 @@ void CONSOLE_OT_zoom(wmOperatorType *ot)
 {
        /* identifiers */
        ot->name= "Console Zoom";
+    /*optionals - 
+      "Zoom view font." */
+    ot->description= "Zoom screen area.";
        ot->idname= "CONSOLE_OT_zoom";
        
        /* api callbacks */
index 2e23c4039f153da9ed0ca15e94370ec5f78a9aaf..08d003f070644c4375afe48ffc8a78a328e4e665 100644 (file)
@@ -114,6 +114,7 @@ void CONSOLE_OT_report_replay(wmOperatorType *ot)
 {
        /* identifiers */
        ot->name= "Replay Operators";
+    ot->description= "Replay selected reports.";
        ot->idname= "CONSOLE_OT_report_replay";
 
        /* api callbacks */
@@ -160,6 +161,7 @@ void CONSOLE_OT_select_pick(wmOperatorType *ot)
 {
        /* identifiers */
        ot->name= "Select report";
+    ot->description= "Select reports by index.";
        ot->idname= "CONSOLE_OT_select_pick";
 
        /* api callbacks */
@@ -213,6 +215,7 @@ void CONSOLE_OT_select_all_toggle(wmOperatorType *ot)
 {
        /* identifiers */
        ot->name= "(De)Select All";
+    ot->description= "(de)select all reports.";
        ot->idname= "CONSOLE_OT_select_all_toggle";
 
        /* api callbacks */
@@ -304,6 +307,7 @@ void CONSOLE_OT_select_border(wmOperatorType *ot)
 {
        /* identifiers */
        ot->name= "Border Select";
+    ot->description= "Toggle border selection.";
        ot->idname= "CONSOLE_OT_select_border";
 
        /* api callbacks */
@@ -357,6 +361,7 @@ void CONSOLE_OT_report_delete(wmOperatorType *ot)
 {
        /* identifiers */
        ot->name= "Delete Reports";
+    ot->description= "Delete selected reports.";
        ot->idname= "CONSOLE_OT_report_delete";
 
        /* api callbacks */
@@ -401,6 +406,7 @@ void CONSOLE_OT_report_copy(wmOperatorType *ot)
 {
        /* identifiers */
        ot->name= "Copy Reports to Clipboard";
+    ot->description= "Copy selected reports to Clipboard.";
        ot->idname= "CONSOLE_OT_report_copy";
 
        /* api callbacks */
index fc02cadb47502c610d4d6150a666f5a3acdfb34a..06d48fe20f3e288b99b67b0df6c189f85f577469 100644 (file)
@@ -81,6 +81,8 @@ static void graph_viewmenu(bContext *C, uiLayout *layout, void *arg_unused)
        uiItemS(layout);
        
        uiItemR(layout, NULL, 0, &spaceptr, "show_cframe_indicator", 0);
+       uiItemR(layout, NULL, 0, &spaceptr, "show_sliders", 0);
+       uiItemR(layout, NULL, 0, &spaceptr, "automerge_keyframes", 0);
        
        if (sipo->flag & SIPO_NOHANDLES)
                uiItemO(layout, "Show Handles", ICON_CHECKBOX_DEHLT, "GRAPH_OT_handles_view_toggle");
@@ -88,7 +90,7 @@ static void graph_viewmenu(bContext *C, uiLayout *layout, void *arg_unused)
                uiItemO(layout, "Show Handles", ICON_CHECKBOX_HLT, "GRAPH_OT_handles_view_toggle");
        
        uiItemR(layout, NULL, 0, &spaceptr, "only_selected_curves_handles", 0);
-       uiItemR(layout, NULL, 0, &spaceptr, "automerge_keyframes", 0);
+       
        
        if (sipo->flag & SIPO_DRAWTIME)
                uiItemO(layout, "Show Frames", 0, "ANIM_OT_time_toggle");
index cda79ea0764e737b48bc4523e70468742c5c74c1..06bd95f060f724f616de40080db525a1210f60b5 100644 (file)
@@ -1314,10 +1314,16 @@ static short draw_sensorbuttons(bSensor *sens, uiBlock *block, short xco, short
                        * proper compatibility with older .blend files. */
                        str= "Type %t|Left button %x1|Middle button %x2|"
                                "Right button %x4|Wheel Up %x5|Wheel Down %x6|Movement %x8|Mouse over %x16|Mouse over any%x32"; 
-                       uiDefButS(block, MENU, B_REDR, str, xco+10, yco-44, width-20, 19,
+                       uiDefButS(block, MENU, B_REDR, str, xco+10, yco-44, (width*0.8f)-20, 19,
                                &ms->type, 0, 31, 0, 0,
                                "Specify the type of event this mouse sensor should trigger on");
                        
+                       if(ms->type==32) {
+                               uiDefButBitS(block, TOG, SENS_MOUSE_FOCUS_PULSE, B_REDR, "Pulse",(short)(xco + 10) + (width*0.8f)-20,(short)(yco - 44),
+                                       (short)(0.20 * (width-20)), 19, &ms->flag, 0.0, 0.0, 0, 0,
+                                       "Moving the mouse over a different object generates a pulse");  
+                       }
+                       
                        yco-= ysize;
                        break;
                }
index 0e2d2ce1698f07d02c584ae519c17fd2136a70db..089436cfcf97dab9d3deb74ff9af94be293e90a5 100644 (file)
@@ -215,6 +215,7 @@ void TEXT_OT_properties(wmOperatorType *ot)
 {
        /* identifiers */
        ot->name= "Properties";
+    ot->description= "Toggle text properties panel.";
        ot->idname= "TEXT_OT_properties";
        
        /* api callbacks */
index 4c9f47ed170e1b1e5ed55ef67a9443f7fd74a633..7e514ea723a281b0b6cb5a158356743ef6c22fea 100644 (file)
@@ -176,6 +176,7 @@ void TEXT_OT_new(wmOperatorType *ot)
 {
        /* identifiers */
        ot->name= "New";
+    ot->description= "Create a new text data block.";
        ot->idname= "TEXT_OT_new";
 
        /* api callbacks */
@@ -223,6 +224,7 @@ void TEXT_OT_open(wmOperatorType *ot)
 {
        /* identifiers */
        ot->name= "Open";
+    ot->description= "Open a new text data block.";
        ot->idname= "TEXT_OT_open";
 
        /* api callbacks */
@@ -260,6 +262,7 @@ void TEXT_OT_reload(wmOperatorType *ot)
 {
        /* identifiers */
        ot->name= "Reload";
+    ot->description= "Reload active text data block from its file.";
        ot->idname= "TEXT_OT_reload";
 
        /* api callbacks */
@@ -337,6 +340,7 @@ void TEXT_OT_unlink(wmOperatorType *ot)
 {
        /* identifiers */
        ot->name= "Unlink";
+    ot->description= "Unlink active text data block.";
        ot->idname= "TEXT_OT_unlink";
 
        /* api callbacks */
@@ -367,6 +371,7 @@ void TEXT_OT_make_internal(wmOperatorType *ot)
 {
        /* identifiers */
        ot->name= "Make Internal";
+    ot->description= "Make active text file internal.";
        ot->idname= "TEXT_OT_make_internal";
 
        /* api callbacks */
@@ -435,6 +440,7 @@ void TEXT_OT_save(wmOperatorType *ot)
 {
        /* identifiers */
        ot->name= "Save";
+    ot->description= "Save active text data block.";
        ot->idname= "TEXT_OT_save";
 
        /* api callbacks */
@@ -490,6 +496,7 @@ void TEXT_OT_save_as(wmOperatorType *ot)
 {
        /* identifiers */
        ot->name= "Save As";
+    ot->description= "Save active text file with options.";
        ot->idname= "TEXT_OT_save_as";
 
        /* api callbacks */
@@ -527,6 +534,7 @@ void TEXT_OT_run_script(wmOperatorType *ot)
 {
        /* identifiers */
        ot->name= "Run Script";
+    ot->description= "Run active script.";
        ot->idname= "TEXT_OT_run_script";
 
        /* api callbacks */
@@ -583,6 +591,7 @@ void TEXT_OT_refresh_pyconstraints(wmOperatorType *ot)
 {
        /* identifiers */
        ot->name= "Refresh PyConstraints";
+    ot->description= "Refresh all pyconstraints.";
        ot->idname= "TEXT_OT_refresh_pyconstraints";
 
        /* api callbacks */
@@ -704,6 +713,7 @@ void TEXT_OT_paste(wmOperatorType *ot)
 {
        /* identifiers */
        ot->name= "Paste";
+    ot->description= "Paste text from clipboard.";
        ot->idname= "TEXT_OT_paste";
 
        /* api callbacks */
@@ -744,6 +754,7 @@ void TEXT_OT_copy(wmOperatorType *ot)
 {
        /* identifiers */
        ot->name= "Copy";
+    ot->description= "Copy selected text to clipboard.";
        ot->idname= "TEXT_OT_copy";
 
        /* api callbacks */
@@ -774,6 +785,7 @@ void TEXT_OT_cut(wmOperatorType *ot)
 {
        /* identifiers */
        ot->name= "Cut";
+    ot->description= "Cut selected text to clipboard.";
        ot->idname= "TEXT_OT_cut";
 
        /* api callbacks */
@@ -809,6 +821,7 @@ void TEXT_OT_indent(wmOperatorType *ot)
 {
        /* identifiers */
        ot->name= "Indent";
+    ot->description= "Indent selected text.";
        ot->idname= "TEXT_OT_indent";
 
        /* api callbacks */
@@ -844,6 +857,7 @@ void TEXT_OT_unindent(wmOperatorType *ot)
 {
        /* identifiers */
        ot->name= "Unindent";
+    ot->description= "Unindent selected text.";
        ot->idname= "TEXT_OT_unindent";
 
        /* api callbacks */
@@ -884,6 +898,7 @@ void TEXT_OT_line_break(wmOperatorType *ot)
 {
        /* identifiers */
        ot->name= "Line Break";
+    ot->description= "Insert line break at cursor position.";
        ot->idname= "TEXT_OT_line_break";
 
        /* api callbacks */
@@ -916,6 +931,7 @@ void TEXT_OT_comment(wmOperatorType *ot)
 {
        /* identifiers */
        ot->name= "Comment";
+    ot->description= "Convert selected text to comment.";
        ot->idname= "TEXT_OT_comment";
 
        /* api callbacks */
@@ -949,6 +965,7 @@ void TEXT_OT_uncomment(wmOperatorType *ot)
 {
        /* identifiers */
        ot->name= "Uncomment";
+    ot->description= "Convert selected comment to text.";
        ot->idname= "TEXT_OT_uncomment";
 
        /* api callbacks */
@@ -1090,6 +1107,7 @@ void TEXT_OT_convert_whitespace(wmOperatorType *ot)
 {
        /* identifiers */
        ot->name= "Convert Whitespace";
+    ot->description= "Convert whitespaces by type.";
        ot->idname= "TEXT_OT_convert_whitespace";
 
        /* api callbacks */
@@ -1120,6 +1138,7 @@ void TEXT_OT_select_all(wmOperatorType *ot)
 {
        /* identifiers */
        ot->name= "Select All";
+    ot->description= "Select all text.";
        ot->idname= "TEXT_OT_select_all";
 
        /* api callbacks */
@@ -1147,6 +1166,7 @@ void TEXT_OT_select_line(wmOperatorType *ot)
 {
        /* identifiers */
        ot->name= "Select Line";
+    ot->description= "Select text by line.";
        ot->idname= "TEXT_OT_select_line";
 
        /* api clinebacks */
@@ -1184,6 +1204,7 @@ void TEXT_OT_previous_marker(wmOperatorType *ot)
 {
        /* identifiers */
        ot->name= "Previous Marker";
+    ot->description= "Move to previous marker.";
        ot->idname= "TEXT_OT_previous_marker";
 
        /* api callbacks */
@@ -1221,6 +1242,7 @@ void TEXT_OT_next_marker(wmOperatorType *ot)
 {
        /* identifiers */
        ot->name= "Next Marker";
+    ot->description= "Move to next marker";
        ot->idname= "TEXT_OT_next_marker";
 
        /* api callbacks */
@@ -1248,6 +1270,7 @@ void TEXT_OT_markers_clear(wmOperatorType *ot)
 {
        /* identifiers */
        ot->name= "Clear All Markers";
+    ot->description= "Clear all markers.";
        ot->idname= "TEXT_OT_markers_clear";
 
        /* api callbacks */
@@ -1531,6 +1554,7 @@ void TEXT_OT_move(wmOperatorType *ot)
 {
        /* identifiers */
        ot->name= "Move Cursor";
+    ot->description= "Move cursor to position type.";
        ot->idname= "TEXT_OT_move";
        
        /* api callbacks */
@@ -1557,6 +1581,7 @@ void TEXT_OT_move_select(wmOperatorType *ot)
 {
        /* identifiers */
        ot->name= "Move Select";
+    ot->description= "Make selection from current cursor position to new cursor position type.";
        ot->idname= "TEXT_OT_move_select";
        
        /* api callbacks */
@@ -1596,6 +1621,7 @@ void TEXT_OT_jump(wmOperatorType *ot)
 {
        /* identifiers */
        ot->name= "Jump";
+    ot->description= "Jump cursor to line.";
        ot->idname= "TEXT_OT_jump";
 
        /* api callbacks */
@@ -1648,6 +1674,7 @@ void TEXT_OT_delete(wmOperatorType *ot)
 {
        /* identifiers */
        ot->name= "Delete";
+    ot->description= "Delete text by cursor position.";
        ot->idname= "TEXT_OT_delete";
        
        /* api callbacks */
@@ -1828,6 +1855,10 @@ void TEXT_OT_scroll(wmOperatorType *ot)
 {
        /* identifiers */
        ot->name= "Scroll";
+    /*don't really see the difference between this and
+      scroll_bar. Both do basically the same thing (aside 
+      from keymaps).*/
+    ot->description= "Scroll text screen.";
        ot->idname= "TEXT_OT_scroll";
        
        /* api callbacks */
@@ -1876,6 +1907,10 @@ void TEXT_OT_scroll_bar(wmOperatorType *ot)
 {
        /* identifiers */
        ot->name= "Scrollbar";
+    /*don't really see the difference between this and
+      scroll. Both do basically the same thing (aside 
+      from keymaps).*/
+    ot->description= "Scroll text screen.";
        ot->idname= "TEXT_OT_scroll_bar";
        
        /* api callbacks */
@@ -2151,6 +2186,7 @@ void TEXT_OT_cursor_set(wmOperatorType *ot)
 {
        /* identifiers */
        ot->name= "Set Cursor";
+    ot->description= "Set cursor selection.";
        ot->idname= "TEXT_OT_cursor_set";
        
        /* api callbacks */
@@ -2274,6 +2310,7 @@ void TEXT_OT_insert(wmOperatorType *ot)
 {
        /* identifiers */
        ot->name= "Insert";
+    ot->description= "Insert text at cursor position.";
        ot->idname= "TEXT_OT_insert";
        
        /* api callbacks */
@@ -2378,6 +2415,7 @@ void TEXT_OT_find(wmOperatorType *ot)
 {
        /* identifiers */
        ot->name= "Find";
+    ot->description= "Find specified text.";
        ot->idname= "TEXT_OT_find";
 
        /* api callbacks */
@@ -2396,6 +2434,7 @@ void TEXT_OT_replace(wmOperatorType *ot)
 {
        /* identifiers */
        ot->name= "Replace";
+    ot->description= "Replace text with specified text.";
        ot->idname= "TEXT_OT_replace";
 
        /* api callbacks */
@@ -2414,6 +2453,7 @@ void TEXT_OT_mark_all(wmOperatorType *ot)
 {
        /* identifiers */
        ot->name= "Mark All";
+    ot->description= "Mark all specified text.";
        ot->idname= "TEXT_OT_mark_all";
 
        /* api callbacks */
@@ -2443,6 +2483,7 @@ void TEXT_OT_find_set_selected(wmOperatorType *ot)
 {
        /* identifiers */
        ot->name= "Find Set Selected";
+    ot->description= "Find specified text and set as selected.";
        ot->idname= "TEXT_OT_find_set_selected";
 
        /* api callbacks */
@@ -2469,6 +2510,7 @@ void TEXT_OT_replace_set_selected(wmOperatorType *ot)
 {
        /* identifiers */
        ot->name= "Replace Set Selected";
+    ot->description= "Replace text with specified text and set as selected.";
        ot->idname= "TEXT_OT_replace_set_selected";
 
        /* api callbacks */
@@ -2631,6 +2673,7 @@ void TEXT_OT_to_3d_object(wmOperatorType *ot)
 {
        /* identifiers */
        ot->name= "To 3D Object";
+    ot->description= "Create 3d text object from active text data block.";
        ot->idname= "TEXT_OT_to_3d_object";
        
        /* api callbacks */
index 53f193382bdec9c356ae2ae9c260ee613cc0d66d..bc5db5e906ff792d327924e6b381ba7741bc2be8 100644 (file)
@@ -197,7 +197,6 @@ void draw_volume(Scene *scene, ARegion *ar, View3D *v3d, Base *base, GPUTexture
        RegionView3D *rv3d= ar->regiondata;
 
        float viewnormal[3];
-       // int res[3];
        int i, j, n;
        float d, d0, dd;
        float *points = NULL;
@@ -237,9 +236,12 @@ void draw_volume(Scene *scene, ARegion *ar, View3D *v3d, Base *base, GPUTexture
 
        GPU_texture_bind(tex, 0);
 
+       if (!GLEW_ARB_texture_non_power_of_two) 
+       {
        cor[0] = (float)res[0]/(float)larger_pow2(res[0]);
        cor[1] = (float)res[1]/(float)larger_pow2(res[1]);
        cor[2] = (float)res[2]/(float)larger_pow2(res[2]);
+       }
 
        // our slices are defined by the plane equation a*x + b*y +c*z + d = 0
        // (a,b,c), the plane normal, are given by viewdir
index 73cd65cafcd5a5081bf5bdc39dcc6211d4fc0236..6773985e07c983711e2d9fd6c8440697f45b8cf2 100644 (file)
@@ -188,55 +188,6 @@ static void handle_view3d_lock(bContext *C)
        }
 }
 
-/* XXX; all this context stuff...  should become operator */
-void do_layer_buttons(bContext *C, short event)
-{
-       wmWindow *win= CTX_wm_window(C);
-       Scene *scene= CTX_data_scene(C);
-       ScrArea *sa= CTX_wm_area(C);
-       View3D *v3d= sa->spacedata.first;
-       static int oldlay= 1;
-       short shift, alt, ctrl;
-       
-       shift= win->eventstate->shift;
-       alt= win->eventstate->alt;
-       ctrl= win->eventstate->ctrl;
-       
-       if(v3d==0) return;
-       if(v3d->localview) return;
-       
-       if(event==-1 && ctrl) {
-               v3d->scenelock= !v3d->scenelock;
-               do_view3d_header_buttons(C, NULL, B_SCENELOCK);
-       } else if (event<0) {
-               if(v3d->lay== (1<<20)-1) {
-                       if(event==-2 || shift) v3d->lay= oldlay;
-               }
-               else {
-                       oldlay= v3d->lay;
-                       v3d->lay= (1<<20)-1;
-               }
-               
-               if(v3d->scenelock) handle_view3d_lock(C);
-               
-               /* new layers might need unflushed events events */
-               DAG_scene_update_flags(scene, v3d->lay);        /* tags all that moves and flushes */
-       }
-       else {
-               if(alt) {
-                       if(event<11) event+= 10;
-               }
-               if(shift) {
-                       if(v3d->lay & (1<<event)) v3d->lay -= (1<<event);
-                       else    v3d->lay += (1<<event);
-               }
-               do_view3d_header_buttons(C, NULL, event+B_LAY);
-       }
-       ED_area_tag_redraw(sa);
-       
-       if(v3d->drawtype == OB_SHADED) reshadeall_displist(scene);
-}
-
 static int layers_exec(bContext *C, wmOperator *op)
 {
        Scene *scene= CTX_data_scene(C);
@@ -315,403 +266,6 @@ void VIEW3D_OT_layers(wmOperatorType *ot)
        RNA_def_boolean(ot->srna, "extend", 0, "Extend", "");
 }
 
-
-#if 0
-static void do_view3d_view_camerasmenu(bContext *C, void *arg, int event)
-{
-       Scene *scene= CTX_data_scene(C);
-       Base *base;
-       int i=1;
-       
-       if (event == 1) {
-               /* Set Active Object as Active Camera */
-               /* XXX ugly hack alert */
-//             G.qual |= LR_CTRLKEY;
-//             persptoetsen(PAD0);
-//             G.qual &= ~LR_CTRLKEY;
-       } else {
-
-               for( base = FIRSTBASE; base; base = base->next ) {
-                       if (base->object->type == OB_CAMERA) {
-                               i++;
-                               
-                               if (event==i) {
-                                       /* XXX use api call! */
-                                       
-                                       break;
-                               }
-                       }
-               }
-       }
-       
-}
-
-
-static uiBlock *view3d_view_camerasmenu(bContext *C, ARegion *ar, void *arg_unused)
-{
-       Scene *scene= CTX_data_scene(C);
-       Base *base;
-       uiBlock *block;
-       short yco= 0, menuwidth=120;
-       int i=1;
-       char camname[48];
-       
-       block= uiBeginBlock(C, ar, "view3d_view_camerasmenu", UI_EMBOSSP);
-       uiBlockSetButmFunc(block, do_view3d_view_camerasmenu, NULL);
-
-       uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Set Active Object as Active Camera|Ctrl NumPad 0",       0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 1, "");
-
-       uiDefBut(block, SEPR, 0, "",                                    0, yco-=6, 140, 6, NULL, 0.0, 0.0, 0, 0, "");
-       
-       for( base = FIRSTBASE; base; base = base->next ) {
-               if (base->object->type == OB_CAMERA) {
-                       i++;
-                       
-                       strcpy(camname, base->object->id.name+2);
-                       if (base->object == scene->camera) strcat(camname, " (Active)");
-                       
-                       uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, camname,  0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0,  i, "");
-               }
-       }
-       
-       uiBlockSetDirection(block, UI_RIGHT);
-       uiTextBoundsBlock(block, 50);
-       return block;
-}
-#endif
-
-#if 0
-static void do_view3d_view_cameracontrolsmenu(bContext *C, void *arg, int event)
-{
-       switch(event) {
-       case 0: /* Orbit Left */
-               persptoetsen(PAD4);
-               break;
-       case 1: /* Orbit Right */
-               persptoetsen(PAD6);
-               break;
-       case 2: /* Orbit Up */
-               persptoetsen(PAD8);
-               break;
-       case 3: /* Orbit Down */
-               persptoetsen(PAD2);
-               break;
-       case 4: /* Pan left */
-               /* XXX ugly hack alert */
-//             G.qual |= LR_CTRLKEY;
-               persptoetsen(PAD4);
-//             G.qual &= ~LR_CTRLKEY;
-               break;
-       case 5: /* Pan right */
-               /* XXX ugly hack alert */
-//             G.qual |= LR_CTRLKEY;
-               persptoetsen(PAD6);
-//             G.qual &= ~LR_CTRLKEY;
-               break;
-       case 6: /* Pan up */
-               /* ugly hack alert */
-//             G.qual |= LR_CTRLKEY;
-               persptoetsen(PAD8);
-//             G.qual &= ~LR_CTRLKEY;
-               break;
-       case 7: /* Pan down */
-               /* ugly hack alert */
-//             G.qual |= LR_CTRLKEY;
-               persptoetsen(PAD2);
-//             G.qual &= ~LR_CTRLKEY;
-               break;
-       case 8: /* Zoom In */
-               persptoetsen(PADPLUSKEY);
-               break;
-       case 9: /* Zoom Out */
-               persptoetsen(PADMINUS);
-               break;
-       case 10: /* Reset Zoom */
-               persptoetsen(PADENTER);
-               break;
-       case 11: /* Camera Fly mode */
-               fly();
-               break;
-       }
-}
-
-
-static uiBlock *view3d_view_cameracontrolsmenu(bContext *C, ARegion *ar, void *arg_unused)
-{
-/*             static short tog=0; */
-       uiBlock *block;
-       short yco= 0, menuwidth=120;
-       
-       block= uiBeginBlock(C, ar, "view3d_view_cameracontrolsmenu", UI_EMBOSSP);
-       uiBlockSetButmFunc(block, do_view3d_view_cameracontrolsmenu, NULL);
-
-       uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Camera Fly Mode|Shift F",        0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 11, "");
-       
-       uiDefBut(block, SEPR, 0, "",                                    0, yco-=6, 140, 6, NULL, 0.0, 0.0, 0, 0, "");
-       
-       uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Orbit Left|NumPad 4",    0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 0, "");
-       uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Orbit Right|NumPad 6", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 1, "");
-       uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Orbit Up|NumPad 8",      0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 2, "");
-       uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Orbit Down|NumPad 2",    0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 3, "");
-       
-       uiDefBut(block, SEPR, 0, "",                                    0, yco-=6, 140, 6, NULL, 0.0, 0.0, 0, 0, "");
-       
-       uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Pan Left|Ctrl NumPad 4", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 4, "");
-       uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Pan Right|Ctrl NumPad 6", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 5, "");
-       uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Pan Up|Ctrl NumPad 8",   0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 6, "");
-       uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Pan Down|Ctrl NumPad 2", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 7, "");
-       
-       uiDefBut(block, SEPR, 0, "",                                    0, yco-=6, 140, 6, NULL, 0.0, 0.0, 0, 0, "");
-       
-       uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Zoom In|NumPad +", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 8, "");
-       uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Zoom Out|NumPad -",      0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 9, "");
-       uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Reset Zoom|NumPad Enter",        0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 10, "");
-
-       uiBlockSetDirection(block, UI_RIGHT);
-       uiTextBoundsBlock(block, 50);
-       return block;
-}
-
-static void do_view3d_view_alignviewmenu(bContext *C, void *arg, int event)
-{
-       Scene *scene= CTX_data_scene(C);
-       ScrArea *sa= CTX_wm_area(C);
-       View3D *v3d= sa->spacedata.first;
-       Object *obedit = CTX_data_edit_object(C);
-       float *curs;
-       
-       switch(event) {
-
-       case 0: /* Align View to Selected (edit/faceselect mode) */
-       case 1:
-       case 2:
-               if ((obedit) && (obedit->type == OB_MESH)) {
-                       editmesh_align_view_to_selected(v3d, event + 1);
-               } 
-               else if (paint_facesel_test(CTX_data_active_object(C))) {
-                       Object *obact= OBACT;
-                       if (obact && obact->type==OB_MESH) {
-                               Mesh *me= obact->data;
-
-                               if (me->mtface) {
-// XXX                                 faceselect_align_view_to_selected(v3d, me, event + 1);
-                                       ED_area_tag_redraw(sa);
-                               }
-                       }
-               }
-               break;
-       case 3: /* Center View to Cursor */
-               curs= give_cursor(scene, v3d);
-               v3d->ofs[0]= -curs[0];
-               v3d->ofs[1]= -curs[1];
-               v3d->ofs[2]= -curs[2];
-               ED_area_tag_redraw(sa);
-               break;
-       case 4: /* Align Active Camera to View */
-               /* XXX This ugly hack is a symptom of the nasty persptoetsen function, 
-                * but at least it works for now.
-                */
-//             G.qual |= LR_CTRLKEY|LR_ALTKEY;
-               persptoetsen(PAD0);
-//             G.qual &= ~(LR_CTRLKEY|LR_ALTKEY);
-               break;
-       case 5: /* Align View to Selected (object mode) */
-// XXX         mainqenter(PADASTERKEY, 1);
-               break;
-       case 6: /* Center View and Cursor to Origin */
-               WM_operator_name_call(C, "VIEW3D_OT_view_center", WM_OP_EXEC_REGION_WIN, NULL);
-               curs= give_cursor(scene, v3d);
-               curs[0]=curs[1]=curs[2]= 0.0;
-               break;
-       }
-}
-
-static uiBlock *view3d_view_alignviewmenu(bContext *C, ARegion *ar, void *arg_unused)
-{
-/*             static short tog=0; */
-       uiBlock *block;
-       Object *obedit = CTX_data_edit_object(C);
-       short yco= 0, menuwidth=120;
-       
-       block= uiBeginBlock(C, ar, "view3d_view_alignviewmenu", UI_EMBOSSP);
-       uiBlockSetButmFunc(block, do_view3d_view_alignviewmenu, NULL);
-
-       uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Center View to Cursor|C",                        0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 3, "");
-       uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Center Cursor and View All|Shift C",                     0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 6, "");
-       uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Align Active Camera to View|Ctrl Alt NumPad 0",                  0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 4, "");   
-
-       if (((obedit) && (obedit->type == OB_MESH)) || (paint_facesel_test(CTX_data_active_object(C)))) {
-               uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Align View to Selected (Top)|Shift V",                   0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 2, "");
-               uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Align View to Selected (Front)|Shift V",                 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 1, "");
-               uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Align View to Selected (Side)|Shift V",                  0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 0, "");
-       } else {
-               uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Align View to Selected|NumPad *",                        0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 5, "");
-       }
-       
-       uiBlockSetDirection(block, UI_RIGHT);
-       uiTextBoundsBlock(block, 50);
-       return block;
-}
-#endif
-
-#if 0
-static uiBlock *view3d_view_spacehandlers(bContext *C, ARegion *ar, void *arg_unused)
-{
-       /* XXX */
-       return NULL;
-}
-
-
-static void do_view3d_viewmenu(bContext *C, void *arg, int event)
-{
-       
-       switch(event) {
-       case 0: /* User */
-               break;
-       case 1: /* Camera */
-               break;
-       case 2: /* Top */
-               break;
-       case 3: /* Front */
-               break;
-       case 4: /* Side */
-               break;
-       case 5: /* Perspective */
-               break;
-       case 6: /* Orthographic */
-               break;
-       case 7: /* Local View */
-               break;
-       case 8: /* Global View */
-               break;
-       case 9: /* View All (Home) */
-               WM_operator_name_call(C, "VIEW3D_OT_view_all", WM_OP_EXEC_REGION_WIN, NULL);
-               break;
-       case 11: /* View Selected */
-               WM_operator_name_call(C, "VIEW3D_OT_view_center", WM_OP_EXEC_REGION_WIN, NULL);
-               break;
-       case 13: /* Play Back Animation */
-               break;
-       case 15: /* Background Image... */
-//             add_blockhandler(sa, VIEW3D_HANDLER_BACKGROUND, UI_PNL_UNSTOW);
-               break;
-       case 16: /* View  Panel */
-//             add_blockhandler(sa, VIEW3D_HANDLER_PROPERTIES, UI_PNL_UNSTOW);
-               break;
-       case 17: /* Set Clipping Border */
-               WM_operator_name_call(C, "VIEW3D_OT_clip_border", WM_OP_INVOKE_REGION_WIN, NULL);
-               break;
-       case 18: /* render preview */
-//             toggle_blockhandler(sa, VIEW3D_HANDLER_PREVIEW, 0);
-               break;
-       case 19: /* zoom within border */
-//             view3d_border_zoom();
-               break;
-       case 20: /* Transform  Space Panel */
-//             add_blockhandler(sa, VIEW3D_HANDLER_TRANSFORM, UI_PNL_UNSTOW);
-               break;  
-       case 21: /* Grease Pencil */
-//             add_blockhandler(sa, VIEW3D_HANDLER_GREASEPENCIL, UI_PNL_UNSTOW);
-               break;          
-       case 22: /* View all layers */
-               do_layer_buttons(C, -2);
-               break;
-       }
-}
-#endif
-
-#if 0
-static uiBlock *view3d_viewmenu(bContext *C, ARegion *ar, void *arg_unused)
-{
-       ScrArea *sa= CTX_wm_area(C);
-       View3D *v3d= sa->spacedata.first;
-       RegionView3D *rv3d= wm_region_view3d(C);
-       uiBlock *block;
-       short yco= 0, menuwidth=120;
-       
-       block= uiBeginBlock(C, ar, "view3d_viewmenu", UI_EMBOSSP);
-       uiBlockSetButmFunc(block, do_view3d_viewmenu, NULL);
-       
-       uiDefIconTextBut(block, BUTM, 1, ICON_MENU_PANEL, "Transform Orientations...",  0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 20, "");
-       uiDefIconTextBut(block, BUTM, 1, ICON_MENU_PANEL, "Render Preview...|Shift P",  0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 18, "");
-       uiDefIconTextBut(block, BUTM, 1, ICON_MENU_PANEL, "View Properties...", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 16, "");
-       uiDefIconTextBut(block, BUTM, 1, ICON_MENU_PANEL, "Background Image...",        0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 15, "");
-       uiDefIconTextBut(block, BUTM, 1, ICON_MENU_PANEL, "Grease Pencil...",   0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 21, "");
-       
-       uiDefBut(block, SEPR, 0, "",                                    0, yco-=6, menuwidth, 6, NULL, 0.0, 0.0, 0, 0, "");
-       
-       if ((rv3d->viewbut == 0) && !(rv3d->persp == V3D_CAMOB)) uiDefIconTextBut(block, BUTM, 1, ICON_CHECKBOX_HLT, "User",                    0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 0, "");
-       else uiDefIconTextBut(block, BUTM, 1, ICON_CHECKBOX_DEHLT, "User",                                              0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 0, "");
-       if (rv3d->persp == V3D_CAMOB) uiDefIconTextBut(block, BUTM, 1, ICON_CHECKBOX_HLT, "Camera|NumPad 0",    0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 1, "");
-       else uiDefIconTextBut(block, BUTM, 1, ICON_CHECKBOX_DEHLT, "Camera|NumPad 0",                   0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 1, "");
-       if (rv3d->viewbut == 1) uiDefIconTextBut(block, BUTM, 1, ICON_CHECKBOX_HLT, "Top|NumPad 7",                     0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 2, "");
-       else uiDefIconTextBut(block, BUTM, 1, ICON_CHECKBOX_DEHLT, "Top|NumPad 7",                              0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 2, "");
-       if (rv3d->viewbut == 2) uiDefIconTextBut(block, BUTM, 1, ICON_CHECKBOX_HLT, "Front|NumPad 1",           0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 3, "");
-       else uiDefIconTextBut(block, BUTM, 1, ICON_CHECKBOX_DEHLT, "Front|NumPad 1",                    0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 3, "");
-       if (rv3d->viewbut == 3) uiDefIconTextBut(block, BUTM, 1, ICON_CHECKBOX_HLT, "Side|NumPad 3",            0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 4, "");
-       else uiDefIconTextBut(block, BUTM, 1, ICON_CHECKBOX_DEHLT, "Side|NumPad 3",                     0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 4, "");
-       
-       uiDefIconTextBlockBut(block, view3d_view_camerasmenu, NULL, ICON_RIGHTARROW_THIN, "Cameras", 0, yco-=20, 120, 19, "");
-       
-       uiDefBut(block, SEPR, 0, "",                                    0, yco-=6, menuwidth, 6, NULL, 0.0, 0.0, 0, 0, "");
-       
-       if(rv3d->persp==V3D_PERSP) uiDefIconTextBut(block, BUTM, 1, ICON_CHECKBOX_HLT, "Perspective|NumPad 5",  0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 5, "");
-       else uiDefIconTextBut(block, BUTM, 1, ICON_CHECKBOX_DEHLT, "Perspective|NumPad 5",      0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 5, "");
-       if(rv3d->persp==V3D_ORTHO) uiDefIconTextBut(block, BUTM, 1, ICON_CHECKBOX_HLT, "Orthographic|NumPad 5", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 6, "");
-       else uiDefIconTextBut(block, BUTM, 1, ICON_CHECKBOX_DEHLT, "Orthographic|NumPad 5", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 6, "");
-       
-       uiDefBut(block, SEPR, 0, "",                                    0, yco-=6, menuwidth, 6, NULL, 0.0, 0.0, 0, 0, "");
-       
-       if(v3d->lay== (1<<20)-1) uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Show Previous Layers|Shift ~", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 22, "");
-       else uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Show All Layers| ~", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 22, "");
-       
-       uiDefBut(block, SEPR, 0, "",                                    0, yco-=6, menuwidth, 6, NULL, 0.0, 0.0, 0, 0, "");
-       
-       if(v3d->localview) uiDefIconTextBut(block, BUTM, 1, ICON_CHECKBOX_HLT, "Local View|NumPad /",   0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 7, "");
-       else uiDefIconTextBut(block, BUTM, 1, ICON_CHECKBOX_DEHLT, "Local View|NumPad /", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 7, "");
-       if(!v3d->localview) uiDefIconTextBut(block, BUTM, 1, ICON_CHECKBOX_HLT, "Global View|NumPad /", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 8, "");
-       else uiDefIconTextBut(block, BUTM, 1, ICON_CHECKBOX_DEHLT, "Global View|NumPad /",      0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 8, "");
-       
-       uiDefBut(block, SEPR, 0, "",                                    0, yco-=6, menuwidth, 6, NULL, 0.0, 0.0, 0, 0, "");
-       
-       uiDefIconTextBlockBut(block, view3d_view_cameracontrolsmenu, NULL, ICON_RIGHTARROW_THIN, "View Navigation", 0, yco-=20, 120, 19, "");
-       uiDefIconTextBlockBut(block, view3d_view_alignviewmenu, NULL, ICON_RIGHTARROW_THIN, "Align View", 0, yco-=20, 120, 19, "");
-       
-       uiDefBut(block, SEPR, 0, "",                                    0, yco-=6, menuwidth, 6, NULL, 0.0, 0.0, 0, 0, "");
-       
-       if(rv3d->rflag & RV3D_CLIPPING)
-               uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Clear Clipping Border|Alt B",                    0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 17, "");
-       else
-               uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Set Clipping Border|Alt B",                      0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 17, "");
-       if (rv3d->persp==V3D_ORTHO) uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Zoom Within Border...|Shift B",                      0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 19, "");
-       uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "View Selected|NumPad .",                 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 11, "");
-       uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "View All|Home",          0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 9, "");
-       if(!sa->full) uiDefIconTextBut(block, BUTM, B_FULL, ICON_BLANK1, "Maximize Window|Ctrl UpArrow", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 99, "");
-       else uiDefIconTextBut(block, BUTM, B_FULL, ICON_BLANK1, "Tile Window|Ctrl DownArrow", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 99, "");
-
-       uiDefBut(block, SEPR, 0, "",                                    0, yco-=6, menuwidth, 6, NULL, 0.0, 0.0, 0, 0, "");
-       
-       uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Play Back Animation|Alt A",              0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 13, "");
-
-#ifndef DISABLE_PYTHON
-       uiDefBut(block, SEPR, 0, "",                                    0, yco-=6, menuwidth, 6, NULL, 0.0, 0.0, 0, 0, "");
-       uiDefIconTextBlockBut(block, view3d_view_spacehandlers, NULL, ICON_RIGHTARROW_THIN, "Space Handler Scripts", 0, yco-=20, 120, 19, "");
-#endif
-
-       if(ar->alignment==RGN_ALIGN_TOP) {
-               uiBlockSetDirection(block, UI_DOWN);
-       }
-       else {
-               uiBlockSetDirection(block, UI_TOP);
-               uiBlockFlipOrder(block);
-       }
-
-       uiTextBoundsBlock(block, 50);
-       
-       return block;
-}
-#endif
-
 #if 0
 void do_view3d_select_object_typemenu(bContext *C, void *arg, int event)
 {
@@ -932,23 +486,6 @@ static uiBlock *view3d_select_object_groupedmenu(bContext *C, ARegion *ar, void
 
 #endif
 
-static void view3d_select_metaballmenu(bContext *C, uiLayout *layout, void *arg_unused)
-{
-       uiItemO(layout, NULL, 0, "VIEW3D_OT_select_border");
-       uiItemS(layout);
-       uiItemO(layout, NULL, 0, "MBALL_OT_select_deselect_all_metaelems");
-       uiItemO(layout, NULL, 0, "MBALL_OT_select_inverse_metaelems");
-       uiItemS(layout);
-       uiItemO(layout, NULL, 0, "MBALL_OT_select_random_metaelems");
-}
-
-/* wrapper for python layouts */
-void uiTemplate_view3d_select_metaballmenu(uiLayout *layout, bContext *C)
-{
-       void *arg_unused = NULL;
-       view3d_select_metaballmenu(C, layout, arg_unused);
-}
-
 void do_view3d_select_faceselmenu(bContext *C, void *arg, int event)
 {
 #if 0
@@ -1027,19 +564,6 @@ void uiTemplate_view3d_select_faceselmenu(uiLayout *layout, bContext *C)
        view3d_select_faceselmenu(C, ar, arg_unused);
 }
 
-static void view3d_edit_snapmenu(bContext *C, uiLayout *layout, void *arg_unused)
-{
-       uiItemO(layout, NULL, 0, "VIEW3D_OT_snap_selected_to_grid");
-       uiItemO(layout, NULL, 0, "VIEW3D_OT_snap_selected_to_cursor");
-       uiItemO(layout, NULL, 0, "VIEW3D_OT_snap_selected_to_center");
-
-       uiItemS(layout);
-
-       uiItemO(layout, NULL, 0, "VIEW3D_OT_snap_cursor_to_selected");
-       uiItemO(layout, NULL, 0, "VIEW3D_OT_snap_cursor_to_grid");
-       uiItemO(layout, NULL, 0, "VIEW3D_OT_snap_cursor_to_active");
-}
-
 #if 0
 void do_view3d_transform_moveaxismenu(bContext *C, void *arg, int event)
 {
@@ -1813,654 +1337,42 @@ static void do_view3d_edit_objectmenu(bContext *C, void *arg, int event)
 }
 #endif
 
-#if 0
-/* visible buttons ported to python, check ifedout buttons */
-static void view3d_edit_mesh_verticesmenu(bContext *C, uiLayout *layout, void *arg_unused)
-{
-       uiItemO(layout, "Merge...", 0, "MESH_OT_merge");
-       uiItemO(layout, "Rip", 0, "MESH_OT_rip");
-       uiItemO(layout, "Split", 0, "MESH_OT_split");
-       uiItemO(layout, "Separate", 0, "MESH_OT_separate");
-
-       uiItemS(layout);
-
-       uiItemO(layout, "Smooth", 0, "MESH_OT_vertices_smooth");
-       uiItemO(layout, "Remove Doubles", 0, "MESH_OT_remove_doubles");
 
+/* texture paint menu (placeholder, no items yet??) */
+static void do_view3d_tpaintmenu(bContext *C, void *arg, int event)
+{
 #if 0
-       uiItemS(layout);
+       switch(event) {
+       case 0: /* undo image painting */
+               undo_imagepaint_step(1);
+               break;
+       }
 
-       uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Make Vertex Parent|Ctrl P",      0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 0, ""); // add_hook_menu();
-       uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Add Hook|Ctrl H",                        0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 6, ""); // make_parent();
 #endif
 }
-#endif
 
-#if 0
-/* visible buttons ported to python, check ifedout buttons */
-static void view3d_edit_mesh_edgesmenu(bContext *C, uiLayout *layout, void *arg_unused)
+static uiBlock *view3d_tpaintmenu(bContext *C, ARegion *ar, void *arg_unused)
 {
-       uiItemO(layout, NULL, 0, "MESH_OT_edge_face_add");
+       uiBlock *block;
+       short yco= 0, menuwidth=120;
+       
+       block= uiBeginBlock(C, ar, "view3d_paintmenu", UI_EMBOSSP);
+       uiBlockSetButmFunc(block, do_view3d_tpaintmenu, NULL);
+       
+       uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Undo Texture Painting|U",                0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 0, "");
+       uiDefBut(block, SEPR, 0, "",                            0, yco-=6, menuwidth, 6, NULL, 0.0, 0.0, 0, 0, "");
+       
+       if(ar->alignment==RGN_ALIGN_TOP) {
+               uiBlockSetDirection(block, UI_DOWN);
+       }
+       else {
+               uiBlockSetDirection(block, UI_TOP);
+               uiBlockFlipOrder(block);
+       }
 
-#if 0
-       uiItemO(layout, "Bevel", 0, "MESH_OT_bevel"); // bevelmenu(em)
-       uiItemO(layout, "Loop Subdivide...", 0, "MESH_OT_loop_subdivide"); // Ctr R, CutEdgeloop(1);
-       uiItemO(layout, "Knife Subdivide...", 0, "MESH_OT_loop_subdivide"); // Shift K, KnifeSubdivide(KNIFE_PROMPT);
-
-       uiItemS(layout);
-#endif
-
-       uiItemO(layout, "Subdivide", 0, "MESH_OT_subdivide");
-       uiItemFloatO(layout, "Subdivide Smooth", 0, "MESH_OT_subdivide", "smoothness", 1.0f);
-
-       uiItemS(layout);
-
-       uiItemO(layout, "Mark Seam", 0, "MESH_OT_mark_seam");
-       uiItemBooleanO(layout, "Clear Seam", 0, "MESH_OT_mark_seam", "clear", 1);
-
-       uiItemS(layout);
-
-       uiItemO(layout, "Mark Sharp", 0, "MESH_OT_mark_sharp");
-       uiItemBooleanO(layout, "Clear Sharp", 0, "MESH_OT_mark_sharp", "clear", 1);
-
-#if 0
-       uiItemS(layout);
-       uiDefBut(block, SEPR, 0, "",                            0, yco-=6, menuwidth, 6, NULL, 0.0, 0.0, 0, 0, "");
-       uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Adjust Bevel Weight|Ctrl Shift E",                       0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 17, "");
-
-       uiDefBut(block, SEPR, 0, "",                            0, yco-=6, menuwidth, 6, NULL, 0.0, 0.0, 0, 0, "");
-       uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Crease SubSurf|Shift E",                 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 9, "");
-#endif
-
-       uiItemS(layout);
-
-       uiItemEnumO(layout, "Rotate Edge CW", 0, "MESH_OT_edge_rotate", "direction", 1);
-       uiItemEnumO(layout, "Rotate Edge CCW", 0, "MESH_OT_edge_rotate", "direction", 2);
-
-#if 0
-       uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Slide Edge |Ctrl E",                     0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 12, "");  
-       uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Delete Edge Loop|X",                     0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 13, "");  
-
-       uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Collapse",                               0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 14, "");  
-#endif
-}
-#endif
-
-#if 0
-void do_view3d_edit_mirrormenu(bContext *C, void *arg, int event)
-{
-       float mat[3][3];
-       
-       Mat3One(mat);
-       
-       switch(event) {
-               case 0:
-                       initTransform(TFM_MIRROR, CTX_NO_PET);
-                       Transform();
-                       break;
-               case 1:
-                       initTransform(TFM_MIRROR, CTX_NO_PET|CTX_AUTOCONFIRM);
-                       BIF_setSingleAxisConstraint(mat[0], " on global X axis");
-                       Transform();
-                       break;
-               case 2:
-                       initTransform(TFM_MIRROR, CTX_NO_PET|CTX_AUTOCONFIRM);
-                       BIF_setSingleAxisConstraint(mat[1], " on global Y axis");
-                       Transform();
-                       break;
-               case 3:
-                       initTransform(TFM_MIRROR, CTX_NO_PET|CTX_AUTOCONFIRM);
-                       BIF_setSingleAxisConstraint(mat[2], "on global Z axis");
-                       Transform();
-                       break;
-               case 4:
-                       initTransform(TFM_MIRROR, CTX_NO_PET|CTX_AUTOCONFIRM);
-                       BIF_setLocalAxisConstraint('X', " on local X axis");
-                       Transform();
-                       break;
-               case 5:
-                       initTransform(TFM_MIRROR, CTX_NO_PET|CTX_AUTOCONFIRM);
-                       BIF_setLocalAxisConstraint('Y', " on local Y axis");
-                       Transform();
-                       break;
-               case 6:
-                       initTransform(TFM_MIRROR, CTX_NO_PET|CTX_AUTOCONFIRM);
-                       BIF_setLocalAxisConstraint('Z', " on local Z axis");
-                       Transform();
-                       break;
-       }
-}
-
-static uiBlock *view3d_edit_mirrormenu(bContext *C, ARegion *ar, void *arg_unused)
-{
-       uiBlock *block;
-       short yco = 20, menuwidth = 120;
-
-       block= uiBeginBlock(C, ar, "view3d_edit_mirrormenu", UI_EMBOSSP);
-       uiBlockSetButmFunc(block, do_view3d_edit_mirrormenu, NULL);
-       
-       uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Interactive Mirror|Ctrl M",                      0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 0, "");
-
-       uiDefBut(block, SEPR, 0, "",                            0, yco-=6, menuwidth, 6, NULL, 0.0, 0.0, 0, 0, "");
-       
-       uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "X Global|Ctrl M, X",                     0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 1, "");
-       uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Y Global|Ctrl M, Y",                     0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 2, "");
-       uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Z Global|Ctrl M, Z",                     0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 3, "");
-       
-       uiDefBut(block, SEPR, 0, "",                            0, yco-=6, menuwidth, 6, NULL, 0.0, 0.0, 0, 0, "");
-       
-       uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "X Local|Ctrl M, X X",                    0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 4, "");
-       uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Y Local|Ctrl M, Y Y",                    0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 5, "");
-       uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Z Local|Ctrl M, Z Z",                    0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 6, "");
-
-       uiBlockSetDirection(block, UI_RIGHT);
-       uiTextBoundsBlock(block, 60);
-       return block;
-}
-#endif
-
-#ifndef DISABLE_PYTHON
-#if 0
-static void do_view3d_edit_mesh_scriptsmenu(bContext *C, void *arg, int event)
-{
-       BPY_menu_do_python(PYMENU_MESH, event);
-}
-
-static uiBlock *view3d_edit_mesh_scriptsmenu(bContext *C, ARegion *ar, void *arg_unused)
-{
-       uiBlock *block;
-//     short yco = 20, menuwidth = 120;
-// XXX BPyMenu *pym;
-//     int i = 0;
-
-       block= uiBeginBlock(C, ar, "v3d_emesh_pymenu", UI_EMBOSSP);
-       uiBlockSetButmFunc(block, do_view3d_edit_mesh_scriptsmenu, NULL);
-
-//     for (pym = BPyMenuTable[PYMENU_MESH]; pym; pym = pym->next, i++) {
-//             uiDefIconTextBut(block, BUTM, 1, ICON_PYTHON, pym->name, 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, i, pym->tooltip?pym->tooltip:pym->filename);
-//     }
-
-       uiBlockSetDirection(block, UI_RIGHT);
-       uiTextBoundsBlock(block, 60);
-
-       return block;
-}
-#endif
-#endif /* DISABLE_PYTHON */
-
-#if 0
-static void do_view3d_edit_meshmenu(bContext *C, void *arg, int event)
-{
-       ScrArea *sa= CTX_wm_area(C);
-       
-       switch(event) {
-       
-       case 2: /* transform properties */
-               add_blockhandler(sa, VIEW3D_HANDLER_OBJECT, 0);
-               break;
-       case 4: /* insert keyframe */
-               common_insertkey();
-               break;
-       case 16: /* delete keyframe */
-               common_deletekey();
-               break;
-       }
-}
-#endif
-
-#if 0
-/* visible buttons ported to python, check ifedout buttons */
-static void view3d_edit_meshmenu(bContext *C, uiLayout *layout, void *arg_unused)
-{
-       Scene *scene= CTX_data_scene(C);
-       ToolSettings *ts= CTX_data_tool_settings(C);
-       PointerRNA tsptr;
-       
-       RNA_pointer_create(&scene->id, &RNA_ToolSettings, ts, &tsptr);
-
-       uiItemO(layout, "Undo Editing", 0, "ED_OT_undo");
-       uiItemO(layout, "Redo Editing", 0, "ED_OT_redo");
-
-#if 0
-       uiDefIconTextBlockBut(block, editmode_undohistorymenu, NULL, ICON_RIGHTARROW_THIN, "Undo History", 0, yco-=20, 120, 19, "");
-#endif
-
-       uiItemS(layout);
-       
-#if 0
-       uiDefIconTextBlockBut(block, view3d_transformmenu, NULL, ICON_RIGHTARROW_THIN, "Transform", 0, yco-=20, 120, 19, "");
-       uiDefIconTextBlockBut(block, view3d_edit_mirrormenu, NULL, ICON_RIGHTARROW_THIN, "Mirror", 0, yco-=20, 120, 19, "");
-       uiDefIconTextBlockBut(block, view3d_edit_snapmenu, NULL, ICON_RIGHTARROW_THIN, "Snap", 0, yco-=20, 120, 19, "");
-#endif
-
-       uiItemMenuF(layout, "Snap", 0, view3d_edit_snapmenu, NULL);
-
-       uiItemS(layout);
-
-#if 0
-       uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Insert Keyframe|I",      0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 4, "");
-       uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Delete Keyframe|Alt I",  0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 16, "");
-               
-       uiItemS(layout);
-#endif
-
-       uiItemO(layout, NULL, 0, "UV_OT_mapping_menu");
-
-       uiItemS(layout);
-
-       uiItemO(layout, NULL, 0, "MESH_OT_extrude");
-       uiItemO(layout, NULL, 0, "MESH_OT_duplicate");
-       uiItemO(layout, "Delete...", 0, "MESH_OT_delete");
-
-       uiItemS(layout);
-
-       uiItemMenuF(layout, "Vertices", 0, view3d_edit_mesh_verticesmenu, NULL);
-       uiItemMenuF(layout, "Edges", 0, view3d_edit_mesh_edgesmenu, NULL);
-       uiItemMenuF(layout, "Faces", 0, view3d_edit_mesh_facesmenu, NULL);
-       uiItemMenuF(layout, "Normals", 0, view3d_edit_mesh_normalsmenu, NULL);
-
-       uiItemS(layout);
-
-       uiItemR(layout, NULL, 0, &tsptr, "automerge_editing", 0);
-       uiItemR(layout, NULL, 0, &tsptr, "proportional_editing", 0); // |O
-       uiItemMenuEnumR(layout, NULL, 0, &tsptr, "proportional_editing_falloff"); // |Shift O
-
-       uiItemS(layout);
-
-       uiItemMenuF(layout, "Show/Hide", 0, view3d_edit_mesh_showhidemenu, NULL);
-
-#if 0
-#ifndef DISABLE_PYTHON
-       uiItemS(layout);
-       uiDefIconTextBlockBut(block, view3d_edit_mesh_scriptsmenu, NULL, ICON_RIGHTARROW_THIN, "Scripts", 0, yco-=20, 120, 19, "");
-#endif
-#endif
-}
-#endif
-
-#if 0
-/* visible buttons ported to python, check ifedout buttons */
-static void view3d_edit_curve_controlpointsmenu(bContext *C, uiLayout *layout, void *arg_unused)
-{
-       Object *obedit= CTX_data_edit_object(C);
-
-       if(obedit->type == OB_CURVE) {
-               uiItemEnumO(layout, NULL, 0, "TFM_OT_transform", "mode", TFM_TILT);
-               uiItemO(layout, NULL, 0, "CURVE_OT_tilt_clear");
-               uiItemO(layout, NULL, 0, "CURVE_OT_separate");
-               
-               uiItemS(layout);
-
-               uiItemEnumO(layout, NULL, 0, "CURVE_OT_handle_type_set", "type", 1);
-               uiItemEnumO(layout, NULL, 0, "CURVE_OT_handle_type_set", "type", 3);
-               uiItemEnumO(layout, NULL, 0, "CURVE_OT_handle_type_set", "type", 2);
-
-               uiItemS(layout);
-       }
-
-       // XXX uiItemO(layout, NULL, 0, "OBJECT_OT_make_vertex_parent"); Make VertexParent|Ctrl P
-       // make_parent()
-       // XXX uiItemO(layout, NULL, 0, "OBJECT_OT_add_hook"); Add Hook| Ctrl H
-       // add_hook_menu()
-}
-#endif
-
-#if 0
-/* visible buttons ported to python, check ifedout buttons */
-static void view3d_edit_curvemenu(bContext *C, uiLayout *layout, void *arg_unused)
-{
-       Scene *scene= CTX_data_scene(C);
-       ToolSettings *ts= CTX_data_tool_settings(C);
-       PointerRNA tsptr;
-       
-       RNA_pointer_create(&scene->id, &RNA_ToolSettings, ts, &tsptr);
-
-#if 0
-       uiDefIconTextBut(block, BUTM, 1, ICON_MENU_PANEL, "Transform Properties...|N",          0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 1, "");
-       uiDefIconTextBlockBut(block, view3d_transformmenu, NULL, ICON_RIGHTARROW_THIN, "Transform", 0, yco-=20, 120, 19, "");
-       uiDefIconTextBlockBut(block, view3d_edit_mirrormenu, NULL, ICON_RIGHTARROW_THIN, "Mirror", 0, yco-=20, menuwidth, 19, "");      
-#endif
-
-       uiItemMenuF(layout, "Snap", 0, view3d_edit_snapmenu, NULL);
-
-       uiItemS(layout);
-       
-       // XXX uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Insert Keyframe|I",                               0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 2, "");
-       // common_insertkey();
-       // XXX uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Delete Keyframe|Alt I",                           0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 16, "");
-       // common_deletekey();
-
-
-       uiItemO(layout, NULL, 0, "CURVE_OT_extrude");
-       uiItemO(layout, NULL, 0, "CURVE_OT_duplicate");
-       uiItemO(layout, NULL, 0, "CURVE_OT_separate");
-       uiItemO(layout, NULL, 0, "CURVE_OT_make_segment");
-       uiItemO(layout, NULL, 0, "CURVE_OT_cyclic_toggle");
-       uiItemO(layout, NULL, 0, "CURVE_OT_delete"); // Delete...
-
-       uiItemS(layout);
-
-       uiItemMenuF(layout, "Control Points", 0, view3d_edit_curve_controlpointsmenu, NULL);
-       uiItemMenuF(layout, "Segments", 0, view3d_edit_curve_segmentsmenu, NULL);
-
-       uiItemS(layout);
-
-       uiItemR(layout, NULL, 0, &tsptr, "proportional_editing", 0); // |O
-       uiItemMenuEnumR(layout, NULL, 0, &tsptr, "proportional_editing_falloff"); // |Shift O
-
-       uiItemS(layout);
-
-       uiItemMenuF(layout, "Show/Hide Control Points", 0, view3d_edit_curve_showhidemenu, NULL);
-}
-#endif
-
-#if 0
-/* visible buttons ported to python, check ifedout buttons */
-static void view3d_edit_latticemenu(bContext *C, uiLayout *layout, void *arg_unused)
-{
-       Scene *scene= CTX_data_scene(C);
-       ToolSettings *ts= CTX_data_tool_settings(C);
-       PointerRNA tsptr;
-       
-       RNA_pointer_create(&scene->id, &RNA_ToolSettings, ts, &tsptr);
-
-#if 0
-       uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Undo Editing|U",         0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 0, "");
-       
-       uiDefBut(block, SEPR, 0, "",                            0, yco-=6, menuwidth, 6, NULL, 0.0, 0.0, 0, 0, "");
-       
-       uiDefIconTextBlockBut(block, view3d_transformmenu, NULL, ICON_RIGHTARROW_THIN, "Transform", 0, yco-=20, 120, 19, "");
-       uiDefIconTextBlockBut(block, view3d_edit_mirrormenu, NULL, ICON_RIGHTARROW_THIN, "Mirror", 0, yco-=20, menuwidth, 19, "");              
-#endif
-
-       uiItemMenuF(layout, "Snap", 0, view3d_edit_snapmenu, NULL);
-
-       uiItemS(layout);
-
-       // XXX uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Insert Keyframe|I",                               0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 2, "");
-       // common_insertkey();
-       // XXX uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Delete Keyframe|Alt I",                           0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 16, "");
-       // common_deletekey();
-       
-       uiItemO(layout, NULL, 0, "LATTICE_OT_make_regular");
-
-       uiItemS(layout);
-
-       uiItemR(layout, NULL, 0, &tsptr, "proportional_editing", 0); // |O
-       uiItemMenuEnumR(layout, NULL, 0, &tsptr, "proportional_editing_falloff"); // |Shift O
-}
-#endif
-
-#if 0
-static void do_view3d_edit_armaturemenu(bContext *C, void *arg, int event)
-{
-       static short numcuts= 2;
-
-       switch(event) {
-       case 0: /* Undo Editing */
-               remake_editArmature();
-               break;
-       
-       case 6: /* Shear */
-               initTransform(TFM_SHEAR, CTX_NONE);
-               Transform();
-               break;
-       case 7: /* Warp */
-               initTransform(TFM_WARP, CTX_NONE);
-               Transform();
-       case 23: /* bone sketching panel */
-               add_blockhandler(curarea, VIEW3D_HANDLER_BONESKETCH, UI_PNL_UNSTOW);
-               break;
-       }
-}
-#endif
-
-#if 0
-/* visible buttons ported to python, check ifedout buttons */
-static void view3d_edit_armaturemenu(bContext *C, uiLayout *layout, void *arg_unused)
-{
-       Object *obedit = CTX_data_edit_object(C);
-       bArmature *arm= obedit->data;
-       
-#if 0
-       uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Undo Editing|U",         0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 0, "");
-       uiDefIconTextBut(block, BUTM, 1, ICON_MENU_PANEL, "Bone Sketching|P", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 23, "");
-       uiDefIconTextBlockBut(block, view3d_transformmenu, NULL, ICON_RIGHTARROW_THIN, "Transform", 0, yco-=20, 120, 19, "");
-       uiDefIconTextBlockBut(block, view3d_edit_mirrormenu, NULL, ICON_RIGHTARROW_THIN, "Mirror", 0, yco-=20, menuwidth, 19, "");
-#endif
-       uiItemMenuF(layout, "Snap", 0, view3d_edit_snapmenu, NULL);
-       uiItemMenuF(layout, "Bone Roll", 0, view3d_edit_armature_rollmenu, NULL);
-       
-       if (arm->drawtype == ARM_ENVELOPE)
-               uiItemEnumO(layout, "Scale Envelope Distance", 0, "TFM_OT_transform", "mode", TFM_BONESIZE);
-       else
-               uiItemEnumO(layout, "Scale B-Bone Width", 0, "TFM_OT_transform", "mode", TFM_BONESIZE);
-       
-       uiItemS(layout);
-       
-       uiItemO(layout, "Extrude", 0, "ARMATURE_OT_extrude");
-       if (arm->flag & ARM_MIRROR_EDIT)
-               uiItemBooleanO(layout, "Extrude Forked", 0, "ARMATURE_OT_extrude", "forked", 1);
-       
-       uiItemO(layout, NULL, 0, "ARMATURE_OT_duplicate");
-       uiItemO(layout, NULL, 0, "ARMATURE_OT_merge");
-       uiItemO(layout, NULL, 0, "ARMATURE_OT_fill");
-       uiItemO(layout, NULL, 0, "ARMATURE_OT_delete");
-       uiItemO(layout, NULL, 0, "ARMATURE_OT_separate");
-       
-       uiItemS(layout);
-       
-       uiItemO(layout, NULL, 0, "ARMATURE_OT_subdivide_simple");
-       uiItemO(layout, NULL, 0, "ARMATURE_OT_subdivide_multi");
-       
-       uiItemEnumO(layout, "AutoName Left/Right", 0, "ARMATURE_OT_autoside_names", "axis", 0);
-       uiItemEnumO(layout, "AutoName Front/Back", 0, "ARMATURE_OT_autoside_names", "axis", 1);
-       uiItemEnumO(layout, "AutoName Top/Bottom", 0, "ARMATURE_OT_autoside_names", "axis", 2);
-       
-       uiItemO(layout, "Flip Left/Right Names", 0, "ARMATURE_OT_flip_names");
-       
-       uiItemS(layout);
-       
-       uiItemO(layout, NULL, 0, "ARMATURE_OT_armature_layers");
-       uiItemO(layout, NULL, 0, "ARMATURE_OT_bone_layers");
-       
-       uiItemS(layout);
-       
-       uiItemMenuF(layout, "Parent", 0, view3d_edit_armature_parentmenu, NULL);
-       
-       uiItemS(layout);
-       
-       uiItemMenuF(layout, "Bone Settings ", 0, view3d_edit_armature_settingsmenu, NULL);
-}
-#endif
-
-static void view3d_pose_armature_transformmenu(bContext *C, uiLayout *layout, void *arg_unused)
-{
-       //uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Clear User Transform|W", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 4, "");
-               //used: clear_user_transform(scene, ob);
-       //uiDefBut(block, SEPR, 0, "",                          0, yco-=6, menuwidth, 6, NULL, 0.0, 0.0, 0, 0, "");
-       
-       uiItemO(layout, NULL, 0, "POSE_OT_loc_clear");
-       uiItemO(layout, NULL, 0, "POSE_OT_rot_clear");
-       uiItemO(layout, NULL, 0, "POSE_OT_scale_clear");
-       
-       // ???
-       //uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Clear Origin|Alt O",           0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 0, "");
-               //used:clear_object('o');
-}
-
-static void view3d_pose_armature_showhidemenu(bContext *C, uiLayout *layout, void *arg_unused)
-{
-       uiItemO(layout, "Show Hidden", 0, "POSE_OT_reveal");
-       
-       uiItemO(layout, "Hide Selected", 0, "POSE_OT_hide");
-       uiItemBooleanO(layout, "Hide Unselected", 0, "POSE_OT_hide", "unselected", 1);
-}
-
-static void view3d_pose_armature_ikmenu(bContext *C, uiLayout *layout, void *arg_unused)
-{
-       uiItemO(layout, NULL, 0, "POSE_OT_ik_add");
-       uiItemO(layout, NULL, 0, "POSE_OT_ik_clear");
-}
-
-static void view3d_pose_armature_constraintsmenu(bContext *C, uiLayout *layout, void *arg_unused)
-{
-       uiItemO(layout, NULL, 0, "POSE_OT_constraint_add_with_targets");
-       uiItemO(layout, NULL, 0, "POSE_OT_constraints_clear");
-}
-
-static void view3d_pose_armature_groupmenu(bContext *C, uiLayout *layout, void *arg_unused)
-{
-       uiItemO(layout, "Add Selected to Active Group", 0, "POSE_OT_group_assign");
-       //uiItemO(layout, "Add Selected to Group", 0, "POSE_OT_group_assign");
-       
-       uiItemO(layout, "Add New Group", 0, "POSE_OT_group_add");
-       
-       uiItemO(layout, "Remove from All Groups", 0, "POSE_OT_group_unassign");
-       uiItemO(layout, "Remove Active Group", 0, "POSE_OT_group_remove");
-}
-
-static void view3d_pose_armature_motionpathsmenu(bContext *C, uiLayout *layout, void *arg_unused)
-{
-       uiItemO(layout, NULL, 0, "POSE_OT_paths_calculate");
-       uiItemO(layout, NULL, 0, "POSE_OT_paths_clear");
-}
-
-static void view3d_pose_armature_poselibmenu(bContext *C, uiLayout *layout, void *arg_unused)
-{
-       uiItemO(layout, NULL, 0, "POSELIB_OT_browse_interactive");
-       
-       uiItemS(layout);
-       
-       uiItemO(layout, NULL, 0, "POSELIB_OT_pose_add");
-       uiItemO(layout, NULL, 0, "POSELIB_OT_pose_rename");
-       uiItemO(layout, NULL, 0, "POSELIB_OT_pose_remove");
-}
-
-static void view3d_pose_armature_settingsmenu(bContext *C, uiLayout *layout, void *arg_unused)
-{
-       uiItemEnumO(layout, "Toggle a Setting", 0, "POSE_OT_flags_set", "mode", 2);
-       uiItemEnumO(layout, "Enable a Setting", 0, "POSE_OT_flags_set", "mode", 1);
-       uiItemEnumO(layout, "Disable a Setting", 0, "POSE_OT_flags_set", "mode", 0);
-}
-
-#if 0
-static void do_view3d_pose_armaturemenu(bContext *C, void *arg, int event)
-{
-       Object *ob;
-       ob=OBACT;
-       
-       switch(event) {
-       case 5:
-               pose_copy_menu();
-               break;
-       case 15:
-               pose_relax();
-               break;
-       }
-}
-#endif
-
-static void view3d_pose_armaturemenu(bContext *C, uiLayout *layout, void *arg_unused)
-{      
-       Object *ob = CTX_data_active_object(C);
-       bArmature *arm= ob->data;
-       
-#if 0 // XXX to be ported, using uiItemMenuF(layout, "<Name>", 0, view3d_pose_armature_<category>menu);
-       uiDefIconTextBlockBut(block, view3d_transformmenu, NULL, ICON_RIGHTARROW_THIN, "Transform", 0, yco-=20, 120, 19, "");
-#endif 
-       if ( (arm) && ((arm->drawtype == ARM_B_BONE) || (arm->drawtype == ARM_ENVELOPE)) )
-               uiItemEnumO(layout, "Scale Envelope Distance", 0, "TFM_OT_transform", "mode", TFM_BONESIZE);
-       uiItemMenuF(layout, "Clear Transform", 0, view3d_pose_armature_transformmenu, NULL);
-       
-       uiItemS(layout);
-       
-       // TODO: these operators may get renamed
-       uiItemO(layout, NULL, 0, "ANIM_OT_insert_keyframe_menu");
-       uiItemO(layout, NULL, 0, "ANIM_OT_delete_keyframe_v3d");
-
-       uiItemS(layout);
-       
-#if 0
-       uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Relax Pose|W",                           0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 15, "");
-#endif
-       uiItemO(layout, NULL, 0, "POSE_OT_apply");
-       
-       uiItemS(layout);
-       
-       uiItemO(layout, "Copy Current Pose", 0, "POSE_OT_copy");
-       uiItemO(layout, "Paste Pose", 0, "POSE_OT_paste");
-       uiItemBooleanO(layout, "Paste X-Flipped Pose", 0, "POSE_OT_paste", "flipped", 1);
-       
-       uiItemS(layout);
-
-       uiItemMenuF(layout, "Pose Library", 0, view3d_pose_armature_poselibmenu, NULL);
-       uiItemMenuF(layout, "Motion Paths", 0, view3d_pose_armature_motionpathsmenu, NULL);
-       uiItemMenuF(layout, "Bone Groups", 0, view3d_pose_armature_groupmenu, NULL);
-       
-       uiItemS(layout);
-       
-       uiItemMenuF(layout, "Inverse Kinematics", 0, view3d_pose_armature_ikmenu, NULL);
-       uiItemMenuF(layout, "Constraints", 0, view3d_pose_armature_constraintsmenu, NULL);
-       
-       uiItemS(layout);
-       
-       uiItemEnumO(layout, "AutoName Left/Right", 0, "POSE_OT_autoside_names", "axis", 0);
-       uiItemEnumO(layout, "AutoName Front/Back", 0, "POSE_OT_autoside_names", "axis", 1);
-       uiItemEnumO(layout, "AutoName Top/Bottom", 0, "POSE_OT_autoside_names", "axis", 2);
-       
-       uiItemO(layout, "Flip Left/Right Names", 0, "POSE_OT_flip_names");
-       
-       uiItemS(layout);
-       
-       uiItemO(layout, NULL, 0, "POSE_OT_armature_layers");
-       uiItemO(layout, NULL, 0, "POSE_OT_bone_layers");
-       
-       uiItemS(layout);
-       
-       uiItemMenuF(layout, "Show/Hide Bones", 0, view3d_pose_armature_showhidemenu, NULL);
-       uiItemMenuF(layout, "Bone Settings", 0, view3d_pose_armature_settingsmenu, NULL);
-       
-#if 0
-       uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Copy Attributes...|Ctrl C",                      0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 5, "");
-#endif
-}
-
-/* texture paint menu (placeholder, no items yet??) */
-static void do_view3d_tpaintmenu(bContext *C, void *arg, int event)
-{
-#if 0
-       switch(event) {
-       case 0: /* undo image painting */
-               undo_imagepaint_step(1);
-               break;
-       }
-
-#endif
-}
-
-static uiBlock *view3d_tpaintmenu(bContext *C, ARegion *ar, void *arg_unused)
-{
-       uiBlock *block;
-       short yco= 0, menuwidth=120;
-       
-       block= uiBeginBlock(C, ar, "view3d_paintmenu", UI_EMBOSSP);
-       uiBlockSetButmFunc(block, do_view3d_tpaintmenu, NULL);
-       
-       uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Undo Texture Painting|U",                0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 0, "");
-       uiDefBut(block, SEPR, 0, "",                            0, yco-=6, menuwidth, 6, NULL, 0.0, 0.0, 0, 0, "");
-       
-       if(ar->alignment==RGN_ALIGN_TOP) {
-               uiBlockSetDirection(block, UI_DOWN);
-       }
-       else {
-               uiBlockSetDirection(block, UI_TOP);
-               uiBlockFlipOrder(block);
-       }
-
-       uiTextBoundsBlock(block, 50);
-       return block;
-}
+       uiTextBoundsBlock(block, 50);
+       return block;
+}
 
 
 static void do_view3d_wpaintmenu(bContext *C, void *arg, int event)
@@ -2622,39 +1534,6 @@ static uiBlock *view3d_faceselmenu(bContext *C, ARegion *ar, void *arg_unused)
        return block;
 }
 
-static void view3d_particle_showhidemenu(bContext *C, uiLayout *layout, void *arg_unused)
-{
-       uiItemO(layout, NULL, 0, "PARTICLE_OT_reveal");
-       uiItemO(layout, NULL, 0, "PARTICLE_OT_hide");
-       uiItemBooleanO(layout, "Hide Unselected", 0, "PARTICLE_OT_hide", "unselected", 1);
-}
-
-static void view3d_particlemenu(bContext *C, uiLayout *layout, void *arg_unused)
-{
-       ToolSettings *ts= CTX_data_tool_settings(C);
-
-       // XXX uiDefIconTextBut(block, BUTM, 1, ICON_MENU_PANEL, "Particle Edit Properties|N", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 1, "");
-       // add_blockhandler(sa, VIEW3D_HANDLER_OBJECT, UI_PNL_UNSTOW);
-       // XXX uiItemS(layout);
-       //
-       // XXX uiDefIconTextBut(block, BUTM, 1, (pset->flag & PE_X_MIRROR)? ICON_CHECKBOX_HLT: ICON_CHECKBOX_DEHLT, "X-Axis Mirror Editing", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 6, "");
-       // pset->flag ^= PE_X_MIRROR;
-
-       uiItemO(layout, NULL, 0, "PARTICLE_OT_mirror"); // |Ctrl M
-
-       uiItemS(layout);
-
-       uiItemO(layout, NULL, 0, "PARTICLE_OT_remove_doubles"); // |W, 5
-       uiItemO(layout, NULL, 0, "PARTICLE_OT_delete");
-       if(ts->particle.selectmode & SCE_SELECT_POINT)
-               uiItemO(layout, NULL, 0, "PARTICLE_OT_subdivide"); // |W, 2
-       uiItemO(layout, NULL, 0, "PARTICLE_OT_rekey"); // |W, 1
-
-       uiItemS(layout);
-
-       uiItemMenuF(layout, "Show/Hide Particles", 0, view3d_particle_showhidemenu, NULL);
-}
-
 static char *view3d_modeselect_pup(Scene *scene)
 {
        Object *ob= OBACT;
@@ -2998,15 +1877,11 @@ static void view3d_header_pulldowns(const bContext *C, uiBlock *block, Object *o
                }
        }
        else if(ob && ob->mode & OB_MODE_PARTICLE_EDIT) {
-               xmax= GetButStringLength("Particle");
-               uiDefMenuBut(block, view3d_particlemenu, NULL, "Particle",      xco,yco, xmax-3, 20, "");
-               xco+= xmax;
+               /* ported to python */
        }
        else {
                if (ob && (ob->mode & OB_MODE_POSE)) {
-                       xmax= GetButStringLength("Pose");
-                       uiDefMenuBut(block, view3d_pose_armaturemenu, NULL, "Pose",     xco,yco, xmax-3, 20, "");
-                       xco+= xmax;
+               /* ported to python */
                }
        }
 
index 168a65a2e75eb810d1340412313ed75ada37bfe8..edcbd858e37fdfacb9f57b5c1b6534cc79c94bf7 100644 (file)
@@ -269,7 +269,7 @@ static void editmesh_apply_to_mirror(TransInfo *t)
 /* tags the given ID block for refreshes (if applicable) due to 
  * Animation Editor editing
  */
-static void animedit_refresh_id_tags (ID *id)
+static void animedit_refresh_id_tags (Scene *scene, ID *id)
 {
        if (id) {
                AnimData *adt= BKE_animdata_from_id(id);
@@ -279,12 +279,11 @@ static void animedit_refresh_id_tags (ID *id)
                        adt->recalc |= ADT_RECALC_ANIM;
                        
                /* if ID-block is Object, set recalc flags */
-               // TODO: this should probably go through the depsgraph instead... but for now, let's be lazy
                switch (GS(id->name)) {
                        case ID_OB:
                        {
                                Object *ob= (Object *)id;
-                               ob->recalc |= OB_RECALC;
+                               DAG_object_flush_update(scene, ob, OB_RECALC_DATA);  /* sets recalc flags */
                        }
                                break;
                }
@@ -384,7 +383,7 @@ void recalcData(TransInfo *t)
                /* just tag these animdata-blocks to recalc, assuming that some data there changed */
                for (ale= anim_data.first; ale; ale= ale->next) {
                        /* set refresh tags for objects using this animation */
-                       animedit_refresh_id_tags(ale->id);
+                       animedit_refresh_id_tags(t->scene, ale->id);
                }
                
                /* now free temp channels */
@@ -432,7 +431,7 @@ void recalcData(TransInfo *t)
                                calchandles_fcurve(fcu);
                                
                        /* set refresh tags for objects using this animation */
-                       animedit_refresh_id_tags(ale->id);
+                       animedit_refresh_id_tags(t->scene, ale->id);
                }
                
                /* do resort and other updates? */
@@ -463,7 +462,7 @@ void recalcData(TransInfo *t)
                                continue;
                        
                        /* set refresh tags for objects using this animation */
-                       animedit_refresh_id_tags(tdn->id);
+                       animedit_refresh_id_tags(t->scene, tdn->id);
                        
                        /* if cancelling transform, just write the values without validating, then move on */
                        if (t->state == TRANS_CANCEL) {
index 081e9589fb8d46f8b39e5380117c98eb72ab8d9b..08d22faf7e71f4face0bc9cdfdec23e678fdd7fd 100644 (file)
@@ -148,6 +148,7 @@ void TFM_OT_select_orientation(struct wmOperatorType *ot)
 
        /* identifiers */
        ot->name   = "Select Orientation";
+       ot->description= "Select orientation type.";
        ot->idname = "TFM_OT_select_orientation";
 
        /* api callbacks */
@@ -308,6 +309,7 @@ void TFM_OT_translate(struct wmOperatorType *ot)
 {
        /* identifiers */
        ot->name   = "Translate";
+       ot->description= "Translate selected items.";
        ot->idname = OP_TRANSLATION;
        ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING;
 
@@ -333,6 +335,7 @@ void TFM_OT_resize(struct wmOperatorType *ot)
 {
        /* identifiers */
        ot->name   = "Resize";
+       ot->description= "Resize selected items."; 
        ot->idname = OP_RESIZE;
        ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING;
 
@@ -359,6 +362,7 @@ void TFM_OT_trackball(struct wmOperatorType *ot)
 {
        /* identifiers */
        ot->name   = "Trackball";
+       ot->description= "Trackball style rotation of selected items.";
        ot->idname = OP_TRACKBALL;
        ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING;
 
@@ -380,6 +384,7 @@ void TFM_OT_rotate(struct wmOperatorType *ot)
 {
        /* identifiers */
        ot->name   = "Rotate";
+       ot->description= "Rotate selected items.";
        ot->idname = OP_ROTATION;
        ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING;
 
@@ -405,6 +410,10 @@ void TFM_OT_tilt(struct wmOperatorType *ot)
 {
        /* identifiers */
        ot->name   = "Tilt";
+    /*optionals - 
+        "Tilt selected vertices."
+        "Specify an extra axis rotation for selected vertices of 3d curve." */
+       ot->description= "Tilt selected control vertices of 3d curve."; 
        ot->idname = OP_TILT;
        ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING;
 
@@ -428,6 +437,7 @@ void TFM_OT_warp(struct wmOperatorType *ot)
 {
        /* identifiers */
        ot->name   = "Warp";
+       ot->description= "Warp selected items around the cursor.";
        ot->idname = OP_WARP;
        ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING;
 
@@ -452,6 +462,7 @@ void TFM_OT_shear(struct wmOperatorType *ot)
 {
        /* identifiers */
        ot->name   = "Shear";
+       ot->description= "Shear selected items along the horizontal screen axis.";
        ot->idname = OP_SHEAR;
        ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING;
 
@@ -476,6 +487,7 @@ void TFM_OT_shrink_fatten(struct wmOperatorType *ot)
 {
        /* identifiers */
        ot->name   = "Shrink/Fatten";
+       ot->description= "Shrink/fatten selected vertices along normals.";
        ot->idname = OP_SHRINK_FATTEN;
        ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING;
 
@@ -497,6 +509,8 @@ void TFM_OT_tosphere(struct wmOperatorType *ot)
 {
        /* identifiers */
        ot->name   = "To Sphere";
+    //added "around mesh center" to differentiate between "MESH_OT_vertices_to_sphere()" 
+       ot->description= "Move selected vertices outward in a spherical shape around mesh center.";
        ot->idname = OP_TOSPHERE;
        ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING;
 
@@ -548,6 +562,7 @@ void TFM_OT_transform(struct wmOperatorType *ot)
 
        /* identifiers */
        ot->name   = "Transform";
+       ot->description= "Transform selected items by mode type.";
        ot->idname = "TFM_OT_transform";
        ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO|OPTYPE_BLOCKING;
 
index 18159414cf60d0267985f81a63dd1dc43ebd3251..41159397634c05a06314b65d6d8818a617ef387a 100644 (file)
@@ -239,6 +239,7 @@ void ED_OT_undo(wmOperatorType *ot)
 {
        /* identifiers */
        ot->name= "Undo";
+    ot->description= "Undo previous action.";
        ot->idname= "ED_OT_undo";
        
        /* api callbacks */
@@ -250,6 +251,7 @@ void ED_OT_redo(wmOperatorType *ot)
 {
        /* identifiers */
        ot->name= "Redo";
+    ot->description= "Redo previous action.";
        ot->idname= "ED_OT_redo";
        
        /* api callbacks */
index 0b6640b9e2741a2428e697aa89c65d9c40c0bb22..c61731cef837c863e8cf7869935cd03558ef3ae5 100644 (file)
@@ -318,6 +318,7 @@ GPUTexture *GPU_texture_create_3D(int w, int h, int depth, float *fpixels)
        GPUTexture *tex;
        GLenum type, format, internalformat;
        void *pixels = NULL;
+       float vfBorderColor[4] = {0.0f, 0.0f, 0.0f, 0.0f};
 
        tex = MEM_callocN(sizeof(GPUTexture), "GPUTexture");
        tex->w = w;
@@ -336,7 +337,7 @@ GPUTexture *GPU_texture_create_3D(int w, int h, int depth, float *fpixels)
                return NULL;
        }
 
-       // if (!GLEW_ARB_texture_non_power_of_two) 
+       if (!GLEW_ARB_texture_non_power_of_two) 
        {
                tex->w = larger_pow2(tex->w);
                tex->h = larger_pow2(tex->h);
@@ -357,24 +358,15 @@ GPUTexture *GPU_texture_create_3D(int w, int h, int depth, float *fpixels)
 
        if (fpixels) {
                glTexSubImage3D(tex->target, 0, 0, 0, 0, w, h, depth, format, type, pixels);
-
-               /*
-               if (tex->w > w)
-                       GPU_glTexSubImageEmpty(tex->target, format, w, 0, tex->w-w, tex->h);
-               if (tex->h > h)
-                       GPU_glTexSubImageEmpty(tex->target, format, 0, h, w, tex->h-h);
-               */
        }
 
-       // glTexImage3D(tex->target, 0, GL_RGBA, w, h, depth, 0, GL_RGBA, GL_FLOAT, fpixels);
-
+       glTexParameterfv(GL_TEXTURE_3D, GL_TEXTURE_BORDER_COLOR, vfBorderColor);
        glTexParameteri(GL_TEXTURE_3D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
        glTexParameteri(GL_TEXTURE_3D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
        glTexParameteri(GL_TEXTURE_3D, GL_TEXTURE_WRAP_S,GL_CLAMP_TO_BORDER);
        glTexParameteri(GL_TEXTURE_3D, GL_TEXTURE_WRAP_T,GL_CLAMP_TO_BORDER);
        glTexParameteri(GL_TEXTURE_3D, GL_TEXTURE_WRAP_R,GL_CLAMP_TO_BORDER);
 
-
        if (pixels)
                MEM_freeN(pixels);
 
index aa166a1983c207c123740d4c469cf4531420ade0..30757db1cef83a8ef426aafc0958a8b8b93d63a9 100644 (file)
@@ -13,6 +13,6 @@ incs = ['.',
        '../../../makesdna']
 incs += Split(env['BF_OPENEXR_INC'])
 
-defs = []
+defs = ['WITH_OPENEXR']
 
 env.BlenderLib ('bf_openexr', source_files, incs, defs, libtype=['core','player'], priority = [225, 85])
index 32d97d79bd79680d6155be57042372f3fabffa1f..a780727b1a2dc3e8288fdbfe520d37436d187ce1 100644 (file)
@@ -51,7 +51,6 @@ _CRTIMP void __cdecl _invalid_parameter_noinfo(void)
 #include "IMB_imbuf.h"
 #include "IMB_allocimbuf.h"
 
-#define WITH_OPENEXR
 #include "openexr_multi.h"
 }
 
index 8b29ce1338dd3a1a83bbca906c9a2fd27673ee88..cc998de7eecf18118e365db62171bb6375688273 100644 (file)
@@ -178,6 +178,9 @@ typedef struct bJoystickSensor {
 
 /* bMouseSensor->type: uses blender event defines */
 
+/* bMouseSensor->flag: only pulse for now */
+#define SENS_MOUSE_FOCUS_PULSE 1
+
 /* propertysensor->type */
 #define SENS_PROP_EQUAL                0
 #define SENS_PROP_NEQUAL       1
index 37f28cfeaa6e10e484c46e3212cc3573cc6af736..6fdc3a7787b89c666325e4af1b33696d353ccddd 100644 (file)
@@ -720,6 +720,7 @@ enum FileSortTypeE {
 #define SIPO_DRAWTIME                  (1<<4)
 #define SIPO_SELCUVERTSONLY            (1<<5)
 #define SIPO_DRAWNAMES                 (1<<6)
+#define SIPO_SLIDERS                   (1<<7)
 
 /* SpaceIpo->mode (Graph Editor Mode) */
 enum {
index bfd93a4218b331e794d342675e70a5847c5b8e59..4845ad28d47a129e213dd0547f532bcff3c9edb1 100644 (file)
@@ -55,7 +55,7 @@ EnumPropertyItem modifier_type_items[] ={
        {eModifierType_Multires, "MULTIRES", ICON_MOD_MULTIRES, "Multiresolution", ""},
        {eModifierType_Subsurf, "SUBSURF", ICON_MOD_SUBSURF, "Subdivision Surface", ""},
        {eModifierType_UVProject, "UV_PROJECT", ICON_MOD_UVPROJECT, "UV Project", ""},
-       {0, "", 0, "Deformers", ""},
+       {0, "", 0, "Deform", ""},
        {eModifierType_Armature, "ARMATURE", ICON_MOD_ARMATURE, "Armature", ""},
        {eModifierType_Cast, "CAST", ICON_MOD_CAST, "Cast", ""},
        {eModifierType_Curve, "CURVE", ICON_MOD_CURVE, "Curve", ""},
index 6cf4722494f9ab31af0f2796ec9fa03678fe447c..b90c3505d7312b050ab770030980920b32665894 100644 (file)
@@ -151,12 +151,72 @@ static int rna_PoseChannel_has_ik_get(PointerRNA *ptr)
        return ED_pose_channel_in_IK_chain(ob, pchan);
 }
 
+static PointerRNA rna_PoseChannel_bone_group_get(PointerRNA *ptr)
+{
+       Object *ob= (Object*)ptr->id.data;
+       bPose *pose= (ob) ? ob->pose : NULL;
+       bPoseChannel *pchan= (bPoseChannel*)ptr->data;
+       bActionGroup *grp;
+       
+       if (pose)
+               grp= BLI_findlink(&pose->agroups, pchan->agrp_index-1);
+       else
+               grp= NULL;
+       
+       return rna_pointer_inherit_refine(ptr, &RNA_BoneGroup, grp);
+}
+
+static void rna_PoseChannel_bone_group_set(PointerRNA *ptr, PointerRNA value)
+{
+       Object *ob= (Object*)ptr->id.data;
+       bPose *pose= (ob) ? ob->pose : NULL;
+       bPoseChannel *pchan= (bPoseChannel*)ptr->data;
+       
+       if (pose)
+               pchan->agrp_index= BLI_findindex(&pose->agroups, value.data) + 1;
+       else
+               pchan->agrp_index= 0;
+}
+
+static int rna_PoseChannel_bone_group_index_get(PointerRNA *ptr)
+{
+       bPoseChannel *pchan= (bPoseChannel*)ptr->data;
+       return MAX2(pchan->agrp_index-1, 0);
+}
+
+static void rna_PoseChannel_bone_group_index_set(PointerRNA *ptr, int value)
+{
+       bPoseChannel *pchan= (bPoseChannel*)ptr->data;
+       pchan->agrp_index= value+1;
+}
+
+static void rna_PoseChannel_bone_group_index_range(PointerRNA *ptr, int *min, int *max)
+{
+       Object *ob= (Object*)ptr->id.data;
+       bPose *pose= (ob) ? ob->pose : NULL;
+       
+       *min= 0;
+       
+       if (pose) {
+               *max= BLI_countlist(&pose->agroups)-1;
+               *max= MAX2(0, *max);
+       }
+       else
+               *max= 0;
+}
+
 static PointerRNA rna_Pose_active_bone_group_get(PointerRNA *ptr)
 {
        bPose *pose= (bPose*)ptr->data;
        return rna_pointer_inherit_refine(ptr, &RNA_BoneGroup, BLI_findlink(&pose->agroups, pose->active_group-1));
 }
 
+static void rna_Pose_active_bone_group_set(PointerRNA *ptr, PointerRNA value)
+{
+       bPose *pose= (bPose*)ptr->data;
+       pose->active_group= BLI_findindex(&pose->agroups, value.data) + 1;
+}
+
 static int rna_Pose_active_bone_group_index_get(PointerRNA *ptr)
 {
        bPose *pose= (bPose*)ptr->data;
@@ -305,59 +365,22 @@ static void rna_def_pose_channel(BlenderRNA *brna)
        RNA_def_struct_path_func(srna, "rna_PoseChannel_path");
        RNA_def_struct_idproperties_func(srna, "rna_PoseChannel_idproperties");
 
+       /* Bone Constraints */
        prop= RNA_def_property(srna, "constraints", PROP_COLLECTION, PROP_NONE);
        RNA_def_property_struct_type(prop, "Constraint");
        RNA_def_property_ui_text(prop, "Constraints", "Constraints that act on this PoseChannel."); 
 
+       /* Name + Selection Status */
        prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
        RNA_def_property_string_funcs(prop, NULL, NULL, "rna_PoseChannel_name_set");
        RNA_def_property_ui_text(prop, "Name", "");
        RNA_def_struct_name_property(srna, prop);
 
-       prop= RNA_def_property(srna, "has_ik", PROP_BOOLEAN, PROP_NONE);
-       RNA_def_property_boolean_funcs(prop,  "rna_PoseChannel_has_ik_get", NULL);
-       RNA_def_property_clear_flag(prop, PROP_EDITABLE);
-       RNA_def_property_ui_text(prop, "Has IK", "Is part of an IK chain.");
-       RNA_def_property_update(prop, NC_OBJECT|ND_POSE|ND_TRANSFORM, "rna_Pose_update");
-
-       prop= RNA_def_property(srna, "ik_dof_x", PROP_BOOLEAN, PROP_NONE);
-       RNA_def_property_boolean_negative_sdna(prop, NULL, "ikflag", BONE_IK_NO_XDOF);
-       RNA_def_property_ui_text(prop, "IK X DoF", "Allow movement around the X axis.");
-       RNA_def_property_update(prop, NC_OBJECT|ND_POSE|ND_TRANSFORM, "rna_Pose_update");
-
-       prop= RNA_def_property(srna, "ik_dof_y", PROP_BOOLEAN, PROP_NONE);
-       RNA_def_property_boolean_negative_sdna(prop, NULL, "ikflag", BONE_IK_NO_YDOF);
-       RNA_def_property_ui_text(prop, "IK Y DoF", "Allow movement around the Y axis.");
-       RNA_def_property_update(prop, NC_OBJECT|ND_POSE|ND_TRANSFORM, "rna_Pose_update");
-
-       prop= RNA_def_property(srna, "ik_dof_z", PROP_BOOLEAN, PROP_NONE);
-       RNA_def_property_boolean_negative_sdna(prop, NULL, "ikflag", BONE_IK_NO_ZDOF);
-       RNA_def_property_ui_text(prop, "IK Z DoF", "Allow movement around the Z axis.");
-       RNA_def_property_update(prop, NC_OBJECT|ND_POSE|ND_TRANSFORM, "rna_Pose_update");
-
-       prop= RNA_def_property(srna, "ik_limit_x", PROP_BOOLEAN, PROP_NONE);
-       RNA_def_property_boolean_sdna(prop, NULL, "ikflag", BONE_IK_XLIMIT);
-       RNA_def_property_ui_text(prop, "IK X Limit", "Limit movement around the X axis.");
-       RNA_def_property_update(prop, NC_OBJECT|ND_POSE|ND_TRANSFORM, "rna_Pose_update");
-
-       prop= RNA_def_property(srna, "ik_limit_y", PROP_BOOLEAN, PROP_NONE);
-       RNA_def_property_boolean_sdna(prop, NULL, "ikflag", BONE_IK_YLIMIT);
-       RNA_def_property_ui_text(prop, "IK Y Limit", "Limit movement around the Y axis.");
-       RNA_def_property_update(prop, NC_OBJECT|ND_POSE|ND_TRANSFORM, "rna_Pose_update");
-
-       prop= RNA_def_property(srna, "ik_limit_z", PROP_BOOLEAN, PROP_NONE);
-       RNA_def_property_boolean_sdna(prop, NULL, "ikflag", BONE_IK_ZLIMIT);
-       RNA_def_property_ui_text(prop, "IK Z Limit", "Limit movement around the Z axis.");
-       RNA_def_property_update(prop, NC_OBJECT|ND_POSE|ND_TRANSFORM, "rna_Pose_update");
-       
        prop= RNA_def_property(srna, "selected", PROP_BOOLEAN, PROP_NONE);
        RNA_def_property_boolean_sdna(prop, NULL, "selectflag", BONE_SELECTED);
        RNA_def_property_ui_text(prop, "Selected", "");
        
-       prop= RNA_def_property(srna, "bone_group_index", PROP_INT, PROP_NONE);
-       RNA_def_property_int_sdna(prop, NULL, "agrp_index");
-       RNA_def_property_ui_text(prop, "Bone Group Index", "Bone Group this pose channel belongs to (0=no group).");
-
+       /* Baked Bone Path cache data s*/
        prop= RNA_def_property(srna, "path_start_frame", PROP_INT, PROP_TIME);
        RNA_def_property_int_sdna(prop, NULL, "pathsf");
        RNA_def_property_clear_flag(prop, PROP_EDITABLE);
@@ -370,6 +393,7 @@ static void rna_def_pose_channel(BlenderRNA *brna)
        RNA_def_property_ui_text(prop, "Bone Paths Calculation End Frame", "End frame of range of frames to use for Bone Path calculations.");
        RNA_def_property_update(prop, NC_OBJECT|ND_POSE|ND_TRANSFORM, "rna_Pose_update");
 
+       /* Relationships to other bones */
        prop= RNA_def_property(srna, "bone", PROP_POINTER, PROP_NEVER_NULL);
        RNA_def_property_struct_type(prop, "Bone");
        RNA_def_property_clear_flag(prop, PROP_EDITABLE);
@@ -385,6 +409,7 @@ static void rna_def_pose_channel(BlenderRNA *brna)
        RNA_def_property_clear_flag(prop, PROP_EDITABLE);
        RNA_def_property_ui_text(prop, "Child", "Child of this pose channel.");
 
+       /* Transformation settings */
        prop= RNA_def_property(srna, "location", PROP_FLOAT, PROP_TRANSLATION);
        RNA_def_property_float_sdna(prop, NULL, "loc");
        RNA_def_property_ui_text(prop, "Location", "");
@@ -429,6 +454,7 @@ static void rna_def_pose_channel(BlenderRNA *brna)
        RNA_def_property_clear_flag(prop, PROP_EDITABLE);
        RNA_def_property_ui_text(prop, "Constraint Inverse Matrix", "4x4 matrix, defines transform from final position to unconstrained position."); */
        
+       /* Head/Tail Coordinates (in Pose Space) - Automatically calculated... */
        prop= RNA_def_property(srna, "pose_head", PROP_FLOAT, PROP_TRANSLATION);
        RNA_def_property_clear_flag(prop, PROP_EDITABLE);
        RNA_def_property_ui_text(prop, "Pose Head Position", "Location of head of the channel's bone.");
@@ -437,6 +463,43 @@ static void rna_def_pose_channel(BlenderRNA *brna)
        RNA_def_property_clear_flag(prop, PROP_EDITABLE);
        RNA_def_property_ui_text(prop, "Pose Tail Position", "Location of tail of the channel's bone.");
 
+       /* IK Settings */
+       prop= RNA_def_property(srna, "has_ik", PROP_BOOLEAN, PROP_NONE);
+       RNA_def_property_boolean_funcs(prop,  "rna_PoseChannel_has_ik_get", NULL);
+       RNA_def_property_clear_flag(prop, PROP_EDITABLE);
+       RNA_def_property_ui_text(prop, "Has IK", "Is part of an IK chain.");
+       RNA_def_property_update(prop, NC_OBJECT|ND_POSE|ND_TRANSFORM, "rna_Pose_update");
+
+       prop= RNA_def_property(srna, "ik_dof_x", PROP_BOOLEAN, PROP_NONE);
+       RNA_def_property_boolean_negative_sdna(prop, NULL, "ikflag", BONE_IK_NO_XDOF);
+       RNA_def_property_ui_text(prop, "IK X DoF", "Allow movement around the X axis.");
+       RNA_def_property_update(prop, NC_OBJECT|ND_POSE|ND_TRANSFORM, "rna_Pose_update");
+
+       prop= RNA_def_property(srna, "ik_dof_y", PROP_BOOLEAN, PROP_NONE);
+       RNA_def_property_boolean_negative_sdna(prop, NULL, "ikflag", BONE_IK_NO_YDOF);
+       RNA_def_property_ui_text(prop, "IK Y DoF", "Allow movement around the Y axis.");
+       RNA_def_property_update(prop, NC_OBJECT|ND_POSE|ND_TRANSFORM, "rna_Pose_update");
+
+       prop= RNA_def_property(srna, "ik_dof_z", PROP_BOOLEAN, PROP_NONE);
+       RNA_def_property_boolean_negative_sdna(prop, NULL, "ikflag", BONE_IK_NO_ZDOF);
+       RNA_def_property_ui_text(prop, "IK Z DoF", "Allow movement around the Z axis.");
+       RNA_def_property_update(prop, NC_OBJECT|ND_POSE|ND_TRANSFORM, "rna_Pose_update");
+
+       prop= RNA_def_property(srna, "ik_limit_x", PROP_BOOLEAN, PROP_NONE);
+       RNA_def_property_boolean_sdna(prop, NULL, "ikflag", BONE_IK_XLIMIT);
+       RNA_def_property_ui_text(prop, "IK X Limit", "Limit movement around the X axis.");
+       RNA_def_property_update(prop, NC_OBJECT|ND_POSE|ND_TRANSFORM, "rna_Pose_update");
+
+       prop= RNA_def_property(srna, "ik_limit_y", PROP_BOOLEAN, PROP_NONE);
+       RNA_def_property_boolean_sdna(prop, NULL, "ikflag", BONE_IK_YLIMIT);
+       RNA_def_property_ui_text(prop, "IK Y Limit", "Limit movement around the Y axis.");
+       RNA_def_property_update(prop, NC_OBJECT|ND_POSE|ND_TRANSFORM, "rna_Pose_update");
+
+       prop= RNA_def_property(srna, "ik_limit_z", PROP_BOOLEAN, PROP_NONE);
+       RNA_def_property_boolean_sdna(prop, NULL, "ikflag", BONE_IK_ZLIMIT);
+       RNA_def_property_ui_text(prop, "IK Z Limit", "Limit movement around the Z axis.");
+       RNA_def_property_update(prop, NC_OBJECT|ND_POSE|ND_TRANSFORM, "rna_Pose_update");
+       
        prop= RNA_def_property(srna, "ik_min_x", PROP_FLOAT, PROP_ANGLE);
        RNA_def_property_float_sdna(prop, NULL, "limitmin[0]");
        RNA_def_property_range(prop, -180.0f, 0.0f);
@@ -497,10 +560,30 @@ static void rna_def_pose_channel(BlenderRNA *brna)
        RNA_def_property_ui_text(prop, "IK Stretch", "Allow scaling of the bone for IK.");
        RNA_def_property_update(prop, NC_OBJECT|ND_POSE|ND_TRANSFORM, "rna_Pose_update");
 
-       prop= RNA_def_property(srna, "custom", PROP_POINTER, PROP_NONE);
+       /* custom bone shapes */
+       prop= RNA_def_property(srna, "custom_shape", PROP_POINTER, PROP_NONE);
+       RNA_def_property_pointer_sdna(prop, NULL, "custom");
+       RNA_def_property_struct_type(prop, "Object");
+       RNA_def_property_flag(prop, PROP_EDITABLE);
        RNA_def_property_ui_text(prop, "Custom Object", "Object that defines custom draw type for this bone.");
-       RNA_def_property_update(prop, NC_OBJECT|ND_POSE|ND_TRANSFORM, "rna_Pose_update");
+       RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_update");
 
+       /* bone groups */
+       prop= RNA_def_property(srna, "bone_group_index", PROP_INT, PROP_NONE);
+       RNA_def_property_int_sdna(prop, NULL, "agrp_index");
+       RNA_def_property_flag(prop, PROP_EDITABLE);
+       RNA_def_property_int_funcs(prop, "rna_PoseChannel_bone_group_index_get", "rna_PoseChannel_bone_group_index_set", "rna_PoseChannel_bone_group_index_range");
+       RNA_def_property_ui_text(prop, "Bone Group Index", "Bone Group this pose channel belongs to (0=no group).");
+       RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_update");
+       
+       prop= RNA_def_property(srna, "bone_group", PROP_POINTER, PROP_NONE);
+       RNA_def_property_struct_type(prop, "BoneGroup");
+       RNA_def_property_flag(prop, PROP_EDITABLE);
+       RNA_def_property_pointer_funcs(prop, "rna_PoseChannel_bone_group_get", "rna_PoseChannel_bone_group_set", NULL);
+       RNA_def_property_ui_text(prop, "Bone Group", "Bone Group this pose channel belongs to");
+       RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_update");
+       
+       /* transform locks */
        prop= RNA_def_property(srna, "lock_location", PROP_BOOLEAN, PROP_XYZ);
        RNA_def_property_boolean_sdna(prop, NULL, "protectflag", OB_LOCK_LOCX);
        RNA_def_property_array(prop, 3);
@@ -541,8 +624,9 @@ static void rna_def_pose(BlenderRNA *brna)
 
        prop= RNA_def_property(srna, "active_bone_group", PROP_POINTER, PROP_NONE);
        RNA_def_property_struct_type(prop, "BoneGroup");
+       RNA_def_property_flag(prop, PROP_EDITABLE);
        RNA_def_property_pointer_funcs(prop, "rna_Pose_active_bone_group_get", "rna_Pose_active_bone_group_set", NULL);
-       RNA_def_property_ui_text(prop, "Active Bone Group", "Bone groups of the pose.");
+       RNA_def_property_ui_text(prop, "Active Bone Group", "Active bone group for this pose.");
        RNA_def_property_update(prop, NC_OBJECT|ND_POSE, "rna_Pose_update");
 
        prop= RNA_def_property(srna, "active_bone_group_index", PROP_INT, PROP_NONE);
index 8e8c9a9837c3eaa7b279dd179ac73d37d6ef47be..a754d61974124acea969099a9fa37e1067f7d66a 100644 (file)
@@ -1075,6 +1075,10 @@ static void rna_def_space_graph(BlenderRNA *brna)
        RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", SIPO_NODRAWCFRANUM);
        RNA_def_property_ui_text(prop, "Show Frame Number Indicator", "Show frame number beside the current frame indicator line.");
        
+       prop= RNA_def_property(srna, "show_sliders", PROP_BOOLEAN, PROP_NONE);
+       RNA_def_property_boolean_sdna(prop, NULL, "flag", SIPO_SLIDERS);
+       RNA_def_property_ui_text(prop, "Show Sliders", "Show sliders beside F-Curve channels.");
+       
        prop= RNA_def_property(srna, "show_handles", PROP_BOOLEAN, PROP_NONE);
        RNA_def_property_boolean_sdna(prop, NULL, "flag", SIPO_NOHANDLES);
        RNA_def_property_ui_text(prop, "Show Handles", "Show handles of Bezier control points.");
index 587ff57a0b57cfeae0f0fb1a1d573b0f840e02b8..7fc2d75a708b83a6054e3afc7335976c2a3e0ecc 100644 (file)
@@ -311,8 +311,6 @@ void RNA_api_ui_layout(StructRNA *srna)
        func= RNA_def_function(srna, "template_header_3D", "uiTemplateHeader3D");
        RNA_def_function_flag(func, FUNC_USE_CONTEXT);
 
-       func= RNA_def_function(srna, "view3d_select_metaballmenu", "uiTemplate_view3d_select_metaballmenu");
-       RNA_def_function_flag(func, FUNC_USE_CONTEXT);
        func= RNA_def_function(srna, "view3d_select_faceselmenu", "uiTemplate_view3d_select_faceselmenu");
        RNA_def_function_flag(func, FUNC_USE_CONTEXT);
 
index b74dc6f757b40778b909e2aec5e0e3f152bfbbff..946aa1cd682bfde12ca3474ef04b6473b8c4c387 100644 (file)
@@ -1662,16 +1662,19 @@ static void rna_def_userdef_view(BlenderRNA *brna)
        prop= RNA_def_property(srna, "show_mini_axis", PROP_BOOLEAN, PROP_NONE);
        RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_SHOW_ROTVIEWICON);
        RNA_def_property_ui_text(prop, "Show Mini Axis", "Show a small rotating 3D axis in the bottom left corner of the 3D View.");
+       RNA_def_property_update(prop, NC_WINDOW, NULL);
 
        prop= RNA_def_property(srna, "mini_axis_size", PROP_INT, PROP_NONE);
        RNA_def_property_int_sdna(prop, NULL, "rvisize");
        RNA_def_property_range(prop, 10, 64);
        RNA_def_property_ui_text(prop, "Mini Axis Size", "The axis icon's size.");
+       RNA_def_property_update(prop, NC_WINDOW, NULL);
 
        prop= RNA_def_property(srna, "mini_axis_brightness", PROP_INT, PROP_NONE);
        RNA_def_property_int_sdna(prop, NULL, "rvibright");
        RNA_def_property_range(prop, 0, 10);
        RNA_def_property_ui_text(prop, "Mini Axis Brightness", "The brightness of the icon.");
+       RNA_def_property_update(prop, NC_WINDOW, NULL);
 
        /* middle mouse button */
        prop= RNA_def_property(srna, "middle_mouse_rotate", PROP_BOOLEAN, PROP_NONE);
@@ -1705,16 +1708,19 @@ static void rna_def_userdef_view(BlenderRNA *brna)
        prop= RNA_def_property(srna, "use_manipulator", PROP_BOOLEAN, PROP_NONE);
        RNA_def_property_boolean_sdna(prop, NULL, "tw_flag", 1);
        RNA_def_property_ui_text(prop, "Manipulator", "Use 3d transform manipulator.");
+       RNA_def_property_update(prop, NC_WINDOW, NULL);
 
        prop= RNA_def_property(srna, "manipulator_size", PROP_INT, PROP_NONE);
        RNA_def_property_int_sdna(prop, NULL, "tw_size");
        RNA_def_property_range(prop, 2, 40);
        RNA_def_property_ui_text(prop, "Manipulator Size", "Diameter of widget, in 10 pixel units.");
+       RNA_def_property_update(prop, NC_WINDOW, NULL);
 
        prop= RNA_def_property(srna, "manipulator_handle_size", PROP_INT, PROP_NONE);
        RNA_def_property_int_sdna(prop, NULL, "tw_handlesize");
        RNA_def_property_range(prop, 2, 40);
        RNA_def_property_ui_text(prop, "Manipulator Handle Size", "Size of widget handles as percentage of widget radius.");
+       RNA_def_property_update(prop, NC_WINDOW, NULL);
 
        prop= RNA_def_property(srna, "manipulator_hotspot", PROP_INT, PROP_NONE);
        RNA_def_property_int_sdna(prop, NULL, "tw_hotspot");
@@ -1725,6 +1731,7 @@ static void rna_def_userdef_view(BlenderRNA *brna)
        RNA_def_property_int_sdna(prop, NULL, "obcenter_dia");
        RNA_def_property_range(prop, 4, 10);
        RNA_def_property_ui_text(prop, "Object Center Size", "Diameter in Pixels for Object/Lamp center display.");
+       RNA_def_property_update(prop, NC_WINDOW, NULL);
 
        prop= RNA_def_property(srna, "ndof_pan_speed", PROP_INT, PROP_NONE);
        RNA_def_property_int_sdna(prop, NULL, "ndof_pan");
index 22c7b6ae277abc72b7c4d70e502d6e1585d79930..5a385418e5d9afafc3e478165cab7e68feb40116 100644 (file)
@@ -720,6 +720,7 @@ int wm_search_menu_poll(bContext *C)
 {
        if(CTX_wm_window(C)==NULL) return 0;
        if(CTX_wm_area(C) && CTX_wm_area(C)->spacetype==SPACE_CONSOLE) return 0;  // XXX - so we can use the shortcut in the console
+       if(CTX_wm_area(C) && CTX_wm_area(C)->spacetype==SPACE_TEXT) return 0;  // XXX - so we can use the spacebar in the text editor
        return 1;
 }
 
@@ -1908,22 +1909,22 @@ void wm_window_keymap(wmWindowManager *wm)
        
        /* note, this doesn't replace existing keymap items */
        WM_keymap_verify_item(keymap, "WM_OT_window_duplicate", WKEY, KM_PRESS, KM_CTRL|KM_ALT, 0);
-       WM_keymap_add_item(keymap, "WM_OT_read_homefile", NKEY, KM_PRESS, KM_CTRL, 0);
-       WM_keymap_add_item(keymap, "WM_OT_read_homefile", NKEY, KM_PRESS, KM_OSKEY, 0);
+//     WM_keymap_add_item(keymap, "WM_OT_read_homefile", NKEY, KM_PRESS, KM_CTRL, 0);
        WM_keymap_add_item(keymap, "WM_OT_read_homefile", XKEY, KM_PRESS, KM_CTRL, 0);
+       WM_keymap_add_item(keymap, "WM_OT_read_homefile", NKEY, KM_PRESS, KM_OSKEY, 0);
        WM_keymap_add_item(keymap, "WM_OT_save_homefile", UKEY, KM_PRESS, KM_CTRL, 0);
        WM_keymap_add_item(keymap, "WM_OT_save_homefile", UKEY, KM_PRESS, KM_OSKEY, 0);
        WM_keymap_add_item(keymap, "WM_OT_open_recentfile", OKEY, KM_PRESS, KM_SHIFT|KM_CTRL, 0);
        WM_keymap_add_item(keymap, "WM_OT_open_recentfile", OKEY, KM_PRESS, KM_SHIFT|KM_OSKEY, 0);
-       WM_keymap_add_item(keymap, "WM_OT_open_mainfile", OKEY, KM_PRESS, KM_CTRL, 0);
-       WM_keymap_add_item(keymap, "WM_OT_open_mainfile", OKEY, KM_PRESS, KM_OSKEY, 0);
+//     WM_keymap_add_item(keymap, "WM_OT_open_mainfile", OKEY, KM_PRESS, KM_CTRL, 0);
        WM_keymap_add_item(keymap, "WM_OT_open_mainfile", F1KEY, KM_PRESS, 0, 0);
-       WM_keymap_add_item(keymap, "WM_OT_save_mainfile", SKEY, KM_PRESS, KM_CTRL, 0);
-       WM_keymap_add_item(keymap, "WM_OT_save_mainfile", SKEY, KM_PRESS, KM_OSKEY, 0);
+       WM_keymap_add_item(keymap, "WM_OT_open_mainfile", OKEY, KM_PRESS, KM_OSKEY, 0);
+//     WM_keymap_add_item(keymap, "WM_OT_save_mainfile", SKEY, KM_PRESS, KM_CTRL, 0);
        WM_keymap_add_item(keymap, "WM_OT_save_mainfile", WKEY, KM_PRESS, KM_CTRL, 0);
-       WM_keymap_add_item(keymap, "WM_OT_save_as_mainfile", SKEY, KM_PRESS, KM_SHIFT|KM_CTRL, 0);
-       WM_keymap_add_item(keymap, "WM_OT_save_as_mainfile", SKEY, KM_PRESS, KM_SHIFT|KM_OSKEY, 0);
+       WM_keymap_add_item(keymap, "WM_OT_save_mainfile", SKEY, KM_PRESS, KM_OSKEY, 0);
+//     WM_keymap_add_item(keymap, "WM_OT_save_as_mainfile", SKEY, KM_PRESS, KM_SHIFT|KM_CTRL, 0);
        WM_keymap_add_item(keymap, "WM_OT_save_as_mainfile", F2KEY, KM_PRESS, 0, 0);
+       WM_keymap_add_item(keymap, "WM_OT_save_as_mainfile", SKEY, KM_PRESS, KM_SHIFT|KM_OSKEY, 0);
        WM_keymap_verify_item(keymap, "WM_OT_window_fullscreen_toggle", F11KEY, KM_PRESS, KM_SHIFT, 0);
        WM_keymap_verify_item(keymap, "WM_OT_exit_blender", QKEY, KM_PRESS, KM_CTRL, 0);
 
index 3b95c409b30d1a449e07cf3ea8376aa2b1a1547f..0d9d0fe885688835c9aa8021b69d3bfcca12663c 100644 (file)
@@ -261,6 +261,34 @@ IF(WITH_INSTALL)
         COMMAND copy /Y \"${WIN_LIBDIR}\\ffmpeg\\lib\\xvidcore.dll\" \"${TARGETDIR}\\\"
       )
     ENDIF(WITH_FFMPEG)
+
+    IF(WITH_SNDFILE)
+      ADD_CUSTOM_COMMAND(TARGET blender
+        POST_BUILD
+        MAIN_DEPENDENCY blender
+        COMMAND copy /Y \"${WIN_LIBDIR}\\sndfile\\lib\\libsndfile-1.dll\" \"${TARGETDIR}\\\"
+      )
+    ENDIF(WITH_SNDFILE)
+
+    IF(WITH_JACK)
+      ADD_CUSTOM_COMMAND(TARGET blender
+        POST_BUILD
+        MAIN_DEPENDENCY blender
+        COMMAND copy /Y \"${WIN_LIBDIR}\\jack\\lib\\libjack.dll\" \"${TARGETDIR}\\\"
+      )
+    ENDIF(WITH_JACK)
+
+    IF(WITH_OPENAL)
+      ADD_CUSTOM_COMMAND(TARGET blender
+        POST_BUILD
+        MAIN_DEPENDENCY blender
+        COMMAND copy /Y \"${WIN_LIBDIR}\\openal\\lib\\OpenAL32.dll\" \"${TARGETDIR}\\\"
+        COMMAND copy /Y \"${WIN_LIBDIR}\\openal\\lib\\wrap_oal.dll\" \"${TARGETDIR}\\\"
+
+      )
+    ENDIF(WITH_OPENAL)
+
+
   ENDIF(WIN32)
 ENDIF(WITH_INSTALL)
 
index 6cb4e980a3de05c0692ca86b1036ebfacb0e48ae..ed03bb0bdd56300e06c9958c23edb96eb2b0f082 100644 (file)
@@ -2485,10 +2485,10 @@ void BL_ConvertBlenderObjects(struct Main* maggie,
                        }
                }
                if (occlusion)
-                       kxscene->SetDbvtOcclusionRes(blenderscene->world->occlusionRes);
+                       kxscene->SetDbvtOcclusionRes(blenderscene->gm.occlusionRes);
        }
        if (blenderscene->world)
-               kxscene->GetPhysicsEnvironment()->setNumTimeSubSteps(blenderscene->world->physubstep);
+               kxscene->GetPhysicsEnvironment()->setNumTimeSubSteps(blenderscene->gm.physubstep);
 
        // now that the scenegraph is complete, let's instantiate the deformers.
        // We need that to create reusable derived mesh and physic shapes
index eb77e087de57cc2af7b20cfaee66e7e6960b880e..09027f188440510a19028b462d72a2f04e2c2238 100644 (file)
@@ -536,6 +536,7 @@ void BL_ConvertSensors(struct Object* blenderobject,
                                                        starty,
                                                        keytype,
                                                        trackfocus,
+                                                       (bmouse->flag & SENS_MOUSE_FOCUS_PULSE) ? true:false,
                                                        kxscene,
                                                        kxengine,
                                                        gameobj); 
index 011f3285f637f780356025cb80a9fd60ca814a43..a9692377df80a89fad2fb4b9e63d1a6c7d89a3a4 100644 (file)
@@ -40,16 +40,17 @@ class SCA_PropertyEventManager : public SCA_EventManager
        class SCA_LogicManager* m_logicmgr;
 
 public:
+       SCA_PropertyEventManager(class SCA_LogicManager* logicmgr);
+       virtual ~SCA_PropertyEventManager();
+       virtual void NextFrame();
+       //SCA_LogicManager* GetLogicManager() { return m_logicmgr;}
+
 
 #ifdef WITH_CXX_GUARDEDALLOC
+public:
        void *operator new( unsigned int num_bytes) { return MEM_mallocN(num_bytes, "GE:SCA_PropertyEventManager"); }
        void operator delete( void *mem ) { MEM_freeN(mem); }
 #endif
-
-       SCA_PropertyEventManager(class SCA_LogicManager* logicmgr);
-       virtual ~SCA_PropertyEventManager();
-       virtual void NextFrame();
-       //SCA_LogicManager* GetLogicManager() { return m_logicmgr;}
 };
 
 #endif //__KX_PROPERTYEVENTMANAGER
index 13643e3a1acc13b7d0fb433d41304431048f8603..4117e493322976256be6041f211739de36c5bca2 100644 (file)
@@ -382,12 +382,12 @@ void KX_KetsjiEngine::StartEngine(bool clearIpo)
        m_firstframe = true;
        m_bInitialized = true;
        // there is always one scene enabled at startup
-       World* world = m_scenes[0]->GetBlenderScene()->world;
-       if (world)
+       Scene* scene = m_scenes[0]->GetBlenderScene();
+       if (scene)
        {
-               m_ticrate = world->ticrate ? world->ticrate : DEFAULT_LOGIC_TIC_RATE;
-               m_maxLogicFrame = world->maxlogicstep ? world->maxlogicstep : 5;
-               m_maxPhysicsFrame = world->maxphystep ? world->maxlogicstep : 5;
+               m_ticrate = scene->gm.ticrate ? scene->gm.ticrate : DEFAULT_LOGIC_TIC_RATE;
+               m_maxLogicFrame = scene->gm.maxlogicstep ? scene->gm.maxlogicstep : 5;
+               m_maxPhysicsFrame = scene->gm.maxphystep ? scene->gm.maxlogicstep : 5;
        }
        else
        {
index 58053e1038d3fbb80e2bdb954981f53fafc096dd..7d3519247444d3a8e5b7cd95545ef19271b2c618 100644 (file)
@@ -61,11 +61,13 @@ KX_MouseFocusSensor::KX_MouseFocusSensor(SCA_MouseManager* eventmgr,
                                                                                 int starty,
                                                                                 short int mousemode,
                                                                                 int focusmode,
+                                                                                bool bTouchPulse,
                                                                                 KX_Scene* kxscene,
                                                                                 KX_KetsjiEngine *kxengine,
                                                                                 SCA_IObject* gameobj)
        : SCA_MouseSensor(eventmgr, startx, starty, mousemode, gameobj),
          m_focusmode(focusmode),
+         m_bTouchPulse(bTouchPulse),
          m_kxscene(kxscene),
          m_kxengine(kxengine)
 {
@@ -77,6 +79,7 @@ void KX_MouseFocusSensor::Init()
        m_mouse_over_in_previous_frame = (m_invert)?true:false;
        m_positive_event = false;
        m_hitObject = 0;
+       m_hitObject_Last = NULL;
        m_reset = true;
        
        m_hitPosition.setValue(0,0,0);
@@ -108,6 +111,9 @@ bool KX_MouseFocusSensor::Evaluate()
                        if (!m_mouse_over_in_previous_frame) {
                                result = true;
                        } 
+                       else if(m_bTouchPulse && (m_hitObject != m_hitObject_Last)) {
+                               result = true;
+               } 
                } 
                if (reset) {
                        // force an event 
@@ -123,6 +129,7 @@ bool KX_MouseFocusSensor::Evaluate()
        }
 
        m_mouse_over_in_previous_frame = obHasFocus;
+       m_hitObject_Last = (void *)m_hitObject;
 
        return result;
 }
@@ -378,6 +385,7 @@ PyAttributeDef KX_MouseFocusSensor::Attributes[] = {
        KX_PYATTRIBUTE_RO_FUNCTION("hitObject",         KX_MouseFocusSensor, pyattr_get_hit_object),
        KX_PYATTRIBUTE_RO_FUNCTION("hitPosition",       KX_MouseFocusSensor, pyattr_get_hit_position),
        KX_PYATTRIBUTE_RO_FUNCTION("hitNormal",         KX_MouseFocusSensor, pyattr_get_hit_normal),
+       KX_PYATTRIBUTE_BOOL_RW("usePulseFocus", KX_MouseFocusSensor,m_bTouchPulse),
        { NULL }        //Sentinel
 };
 
index dfada7a59ccbf049ff42d43289755c86b0cdddde..89ac012c068938586690be24ff980af14e4003d7 100644 (file)
@@ -49,11 +49,12 @@ class KX_MouseFocusSensor : public SCA_MouseSensor
        
  public:
        
-       KX_MouseFocusSensor(class SCA_MouseManager* keybdmgr,
+       KX_MouseFocusSensor(class SCA_MouseManager* eventmgr,
                                                int startx,
                                                int starty,
                                                short int mousemode,
                                                int focusmode,
+                                               bool bTouchPulse,
                                                KX_Scene* kxscene,
                                                KX_KetsjiEngine* kxengine,
                                                SCA_IObject* gameobj);
@@ -107,6 +108,7 @@ class KX_MouseFocusSensor : public SCA_MouseSensor
                
        /* --------------------------------------------------------------------- */
        SCA_IObject*    m_hitObject;
+       void*                   m_hitObject_Last; /* only use for comparison, never access */
 
  private:
        /**
@@ -119,6 +121,11 @@ class KX_MouseFocusSensor : public SCA_MouseSensor
         */
        bool m_mouse_over_in_previous_frame;
 
+       /**
+        * Flags whether changes in hit object should trigger a pulse
+        */
+       bool m_bTouchPulse;
+       
        /**
         * Flags whether the previous test evaluated positive.
         */
index 054b2cb4daf846190163bff6e00b1a8221c6c90b..c82623e64090fe63548f3edc758ab8d448b2a309 100644 (file)
@@ -2419,6 +2419,8 @@ class KX_MouseFocusSensor(SCA_MouseSensor):
        @type hitPosition: list (vector of 3 floats)
        @ivar hitNormal: the worldspace normal from the face at point of intersection.
        @type hitNormal: list (normalized vector of 3 floats)
+       @ivar usePulseFocus: When enabled, moving the mouse over a different object generates a pulse. (only used when the 'Mouse Over Any' sensor option is set)
+       @type usePulseFocus: bool
        """
 #{ Deprecated
        def getHitNormal():
@@ -2480,7 +2482,7 @@ class KX_TouchSensor(SCA_ISensor):
        @ivar useMaterial: Determines if the sensor is looking for a property or material.
                                                KX_True = Find material; KX_False = Find property
        @type useMaterial: boolean
-       @ivar usePulseCollision: The last collided object.
+       @ivar usePulseCollision: When enabled, changes to the set of colliding objects generate a pulse.
        @type usePulseCollision: bool
        @ivar hitObject: The last collided object. (read-only)
        @type hitObject: L{KX_GameObject} or None