svn merge -r 22628:22753 https://svn.blender.org/svnroot/bf-blender/branches/blender2...
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)
1  2 
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_view3d.py
source/blender/editors/animation/anim_channels_defines.c
source/blender/editors/space_action/action_draw.c
source/blender/editors/space_view3d/drawvolume.c
source/blender/gpu/intern/gpu_extensions.c
source/blender/makesrna/intern/rna_pose.c
source/gameengine/Ketsji/KX_MouseFocusSensor.cpp

index f89bdd05e0624c47f1f575681098868e7e69e479,f064add505b607f116f10df154629b526eb2d6ec..b68f5767b135665882da6330708cc75fdc48f3d8
@@@ -803,86 -878,7 +878,7 @@@ class RenderButtonsPanel(bpy.types.Pane
  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,cfdaabadf79452675ec8734d0233acac845dfbdf..1d6a725a105c6c24d051ae9fca39cd194a2130a9
@@@ -102,7 -105,18 +105,18 @@@ class BONE_PT_bone(BoneButtonsPanel)
                col.itemL(text="Display:")
                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,bc41b04d32c45b1b081d78a1293379321db5d8a1..98d354a2fa022e238f525325c2472a3629bf4a0f
@@@ -397,19 -397,29 +397,29 @@@ class DATA_PT_modifiers(DataButtonsPane
                
                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")
index aa43b14b974eb757265b3225c854cc45c0bba150,8dc016f55b757086ba50191520c98c5f839067c1..82e3319ea5931461bf4af25f35727adaf378f383
@@@ -348,13 -350,18 +350,18 @@@ class IMAGE_PT_view_properties(bpy.type
                        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 8e5bc100af10bb2247ca5ee489ff3d0468518fe8,ae17307080f7049592003e6e9644f256c461ee7f..2062f6e22926ec69bc1060e08065d1e8b02909ec
@@@ -63,10 -89,10 +89,10 @@@ 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()
 -              
 +
                layout.itemO("view3d.view_persportho")
                
                layout.itemS()
                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()
                
@@@ -537,11 -547,114 +547,114 @@@ 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
@@@ -697,8 -849,8 +849,8 @@@ def draw_CURVE(self, context)
        layout = self.layout
        
        settings = context.tool_settings
 -      
 +
-       layout.itemM("VIEW3D_MT_edit_snap")
+       layout.itemM("VIEW3D_MT_snap")
        
        layout.itemS()
        
index acf7467713b83b259f4b8c2adb39f7c329e75f45,b16420a70948cafbdab87ba496e08a9baee1baf6..0ef470a698e0d38153b8f5d2e61496ed68083516
@@@ -1970,27 -1972,7 +1972,7 @@@ void ANIM_channel_draw (bAnimContext *a
                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;
 -}
 +              }
-       }
- }
  
  /* ------------------ */
  
@@@ -2164,17 -2184,77 +2184,77 @@@ void ANIM_channel_draw_widgets (bAnimCo
        // 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)) {
 -                              offset += ICON_WIDTH; 
 -                              draw_setting_widget(ac, ale, acf, block, (int)v2d->cur.xmax-offset, ymid, ACHANNEL_SETTING_PROTECT);
 -                      }
 -                      /* mute... */
 -                      if (acf->has_setting(ac, ale, ACHANNEL_SETTING_MUTE)) {
 -                              offset += ICON_WIDTH;
 -                              draw_setting_widget(ac, ale, acf, block, (int)v2d->cur.xmax-offset, ymid, ACHANNEL_SETTING_MUTE);
 -                      }
+               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; 
 +                      draw_setting_widget(ac, ale, acf, block, (int)v2d->cur.xmax-offset, ymid, ACHANNEL_SETTING_PROTECT);
                }
 -                              }
 +              /* mute... */
 +              if (acf->has_setting(ac, ale, ACHANNEL_SETTING_MUTE)) {
 +                      offset += ICON_WIDTH;
 +                      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 4fb22064c1765ddb7a36752fb4da61c0b8dd5406,4288cc10a26c45992d71eb469f7f662ed2f6b254..1403b6c8ff69654471d2af7dcc32b10b40be0226
  #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 */
  
index 53f193382bdec9c356ae2ae9c260ee613cc0d66d,5e0ffb9ba48b05934336dedf3bae37bb4aebc751..bc5db5e906ff792d327924e6b381ba7741bc2be8
@@@ -237,9 -236,12 +236,12 @@@ void draw_volume(Scene *scene, ARegion 
  
        GPU_texture_bind(tex, 0);
  
 -              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]);
+       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 0b6640b9e2741a2428e697aa89c65d9c40c0bb22,36936a9fcb03edda174e7bbb61ffe23def873428..c61731cef837c863e8cf7869935cd03558ef3ae5
@@@ -357,24 -358,15 +358,15 @@@ GPUTexture *GPU_texture_create_3D(int w
  
        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);
 +      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 6cf4722494f9ab31af0f2796ec9fa03678fe447c,bfebc5ee49f1eda70bad3b43f031eceeefa514fd..b90c3505d7312b050ab770030980920b32665894
@@@ -304,7 -364,8 +364,8 @@@ static void rna_def_pose_channel(Blende
        RNA_def_struct_ui_text(srna, "Pose Channel", "Channel defining pose data for a bone in a Pose.");
        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."); 
        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);
        RNA_def_property_clear_flag(prop, PROP_EDITABLE);
        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);
        RNA_def_property_struct_type(prop, "PoseChannel");
        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", "");
        prop= RNA_def_property(srna, "pose_tail", PROP_FLOAT, PROP_TRANSLATION);
        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);
        RNA_def_property_range(prop, 0.0f,1.0f);
        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);
index 58053e1038d3fbb80e2bdb954981f53fafc096dd,881747edff2362d5ccc990fa7a99acc95817972d..7d3519247444d3a8e5b7cd95545ef19271b2c618
@@@ -107,7 -110,10 +110,10 @@@ bool KX_MouseFocusSensor::Evaluate(
                        m_positive_event = true;
                        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 
        }
  
        m_mouse_over_in_previous_frame = obHasFocus;
 -                                         
+       m_hitObject_Last = (void *)m_hitObject;
 +
        return result;
  }