- improvements from Mathias Panzenböck (panzi) patch [#19695], which avoid conversion to/from strings with context property assignment. though didnt apply entire patch.
- [#19698] Add Menu Item: View3d -> Object -> Move to layer from Howard Brooks (hbroo) - had cursor grab commented by mistake for X11
This commit is contained in:
parent
ddb1f64fff
commit
f4d6bbd656
@ -1412,7 +1412,7 @@ setWindowCursorGrab(
|
|||||||
setWindowCursorVisibility(false);
|
setWindowCursorVisibility(false);
|
||||||
|
|
||||||
}
|
}
|
||||||
//XGrabPointer(m_display, m_window, True, ButtonPressMask| ButtonReleaseMask|PointerMotionMask, GrabModeAsync, GrabModeAsync, None, None, CurrentTime);
|
XGrabPointer(m_display, m_window, True, ButtonPressMask| ButtonReleaseMask|PointerMotionMask, GrabModeAsync, GrabModeAsync, None, None, CurrentTime);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (m_cursorGrab==GHOST_kGrabHide) {
|
if (m_cursorGrab==GHOST_kGrabHide) {
|
||||||
@ -1430,7 +1430,7 @@ setWindowCursorGrab(
|
|||||||
/* Almost works without but important otherwise the mouse GHOST location can be incorrect on exit */
|
/* Almost works without but important otherwise the mouse GHOST location can be incorrect on exit */
|
||||||
setCursorGrabAccum(0, 0);
|
setCursorGrabAccum(0, 0);
|
||||||
m_cursorGrabBounds.m_l= m_cursorGrabBounds.m_r= -1; /* disable */
|
m_cursorGrabBounds.m_l= m_cursorGrabBounds.m_r= -1; /* disable */
|
||||||
//XUngrabPointer(m_display, CurrentTime);
|
XUngrabPointer(m_display, CurrentTime);
|
||||||
}
|
}
|
||||||
|
|
||||||
XFlush(m_display);
|
XFlush(m_display);
|
||||||
|
@ -155,50 +155,44 @@ class MESH_OT_delete_edgeloop(bpy.types.Operator):
|
|||||||
|
|
||||||
rna_path_prop = bpy.props.StringProperty(attr="path", name="Context Attributes", description="rna context string", maxlen= 1024, default= "")
|
rna_path_prop = bpy.props.StringProperty(attr="path", name="Context Attributes", description="rna context string", maxlen= 1024, default= "")
|
||||||
|
|
||||||
|
def execute_context_assign(self, context):
|
||||||
|
exec("context.%s=self.value" % self.path)
|
||||||
|
return ('FINISHED',)
|
||||||
|
|
||||||
class WM_OT_context_set_boolean(bpy.types.Operator):
|
class WM_OT_context_set_boolean(bpy.types.Operator):
|
||||||
'''Set a context value.'''
|
'''Set a context value.'''
|
||||||
__idname__ = "wm.context_set_boolean"
|
__idname__ = "wm.context_set_boolean"
|
||||||
__label__ = "Context Set"
|
__label__ = "Context Set"
|
||||||
__props__ = [rna_path_prop, bpy.props.BoolProperty(attr="value", name="Value", description="Assignment value", default= True)]
|
__props__ = [rna_path_prop, bpy.props.BoolProperty(attr="value", name="Value", description="Assignment value", default= True)]
|
||||||
def execute(self, context):
|
execute = execute_context_assign
|
||||||
exec("context.%s=%s" % (self.path, self.value)) # security nuts will complain.
|
|
||||||
return ('FINISHED',)
|
|
||||||
|
|
||||||
class WM_OT_context_set_int(bpy.types.Operator): # same as enum
|
class WM_OT_context_set_int(bpy.types.Operator): # same as enum
|
||||||
'''Set a context value.'''
|
'''Set a context value.'''
|
||||||
__idname__ = "wm.context_set_int"
|
__idname__ = "wm.context_set_int"
|
||||||
__label__ = "Context Set"
|
__label__ = "Context Set"
|
||||||
__props__ = [rna_path_prop, bpy.props.IntProperty(attr="value", name="Value", description="Assignment value", default= 0)]
|
__props__ = [rna_path_prop, bpy.props.IntProperty(attr="value", name="Value", description="Assignment value", default= 0)]
|
||||||
def execute(self, context):
|
execute = execute_context_assign
|
||||||
exec("context.%s=%d" % (self.path, self.value)) # security nuts will complain.
|
|
||||||
return ('FINISHED',)
|
|
||||||
|
|
||||||
class WM_OT_context_set_float(bpy.types.Operator): # same as enum
|
class WM_OT_context_set_float(bpy.types.Operator): # same as enum
|
||||||
'''Set a context value.'''
|
'''Set a context value.'''
|
||||||
__idname__ = "wm.context_set_int"
|
__idname__ = "wm.context_set_int"
|
||||||
__label__ = "Context Set"
|
__label__ = "Context Set"
|
||||||
__props__ = [rna_path_prop, bpy.props.FloatProperty(attr="value", name="Value", description="Assignment value", default= 0.0)]
|
__props__ = [rna_path_prop, bpy.props.FloatProperty(attr="value", name="Value", description="Assignment value", default= 0.0)]
|
||||||
def execute(self, context):
|
execute = execute_context_assign
|
||||||
exec("context.%s=%f" % (self.path, self.value)) # security nuts will complain.
|
|
||||||
return ('FINISHED',)
|
|
||||||
|
|
||||||
class WM_OT_context_set_string(bpy.types.Operator): # same as enum
|
class WM_OT_context_set_string(bpy.types.Operator): # same as enum
|
||||||
'''Set a context value.'''
|
'''Set a context value.'''
|
||||||
__idname__ = "wm.context_set_string"
|
__idname__ = "wm.context_set_string"
|
||||||
__label__ = "Context Set"
|
__label__ = "Context Set"
|
||||||
__props__ = [rna_path_prop, bpy.props.StringProperty(attr="value", name="Value", description="Assignment value", maxlen= 1024, default= "")]
|
__props__ = [rna_path_prop, bpy.props.StringProperty(attr="value", name="Value", description="Assignment value", maxlen= 1024, default= "")]
|
||||||
def execute(self, context):
|
execute = execute_context_assign
|
||||||
exec("context.%s='%s'" % (self.path, self.value)) # security nuts will complain.
|
|
||||||
return ('FINISHED',)
|
|
||||||
|
|
||||||
class WM_OT_context_set_enum(bpy.types.Operator):
|
class WM_OT_context_set_enum(bpy.types.Operator):
|
||||||
'''Set a context value.'''
|
'''Set a context value.'''
|
||||||
__idname__ = "wm.context_set_enum"
|
__idname__ = "wm.context_set_enum"
|
||||||
__label__ = "Context Set"
|
__label__ = "Context Set"
|
||||||
__props__ = [rna_path_prop, bpy.props.StringProperty(attr="value", name="Value", description="Assignment value (as a string)", maxlen= 1024, default= "")]
|
__props__ = [rna_path_prop, bpy.props.StringProperty(attr="value", name="Value", description="Assignment value (as a string)", maxlen= 1024, default= "")]
|
||||||
def execute(self, context):
|
execute = execute_context_assign
|
||||||
exec("context.%s='%s'" % (self.path, self.value)) # security nuts will complain.
|
|
||||||
return ('FINISHED',)
|
|
||||||
|
|
||||||
class WM_OT_context_toggle(bpy.types.Operator):
|
class WM_OT_context_toggle(bpy.types.Operator):
|
||||||
'''Toggle a context value.'''
|
'''Toggle a context value.'''
|
||||||
|
@ -427,6 +427,7 @@ class VIEW3D_MT_object(bpy.types.Menu):
|
|||||||
|
|
||||||
layout.itemS()
|
layout.itemS()
|
||||||
|
|
||||||
|
layout.itemO("object.move_to_layer", text="Move to Layer...")
|
||||||
layout.itemM("VIEW3D_MT_object_showhide")
|
layout.itemM("VIEW3D_MT_object_showhide")
|
||||||
|
|
||||||
layout.item_menu_enumO("object.convert", "target")
|
layout.item_menu_enumO("object.convert", "target")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user