2008-12-29 04:14:27 +00:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								/**
  
						 
					
						
							
								
									
										
										
										
											2009-06-23 00:09:26 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								 *  $ Id $ 
							 
						 
					
						
							
								
									
										
										
										
											2008-12-29 04:14:27 +00:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								 * 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								 *  * * * * *  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 . 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								 * 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								 *  Contributor ( s ) :  none  yet . 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								 * 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								 *  * * * * *  END  GPL  LICENSE  BLOCK  * * * * * 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								 */ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								# include  "MEM_guardedalloc.h" 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2009-03-06 15:50:15 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								# include  "DNA_scene_types.h" 
  
						 
					
						
							
								
									
										
										
										
											2008-12-29 04:14:27 +00:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								# include  "DNA_space_types.h" 
  
						 
					
						
							
								
									
										
										
										
											2009-01-03 22:15:59 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								# include  "DNA_windowmanager_types.h" 
  
						 
					
						
							
								
									
										
										
										
											2008-12-29 04:14:27 +00:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								# include  "RNA_access.h" 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								# include  "RNA_define.h" 
  
						 
					
						
							
								
									
										
										
										
											2009-03-07 10:28:08 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								# include  "RNA_enum_types.h" 
  
						 
					
						
							
								
									
										
										
										
											2008-12-29 04:14:27 +00:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								# include  "BLI_arithb.h" 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								# include  "BKE_utildefines.h" 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								# include  "BKE_context.h" 
  
						 
					
						
							
								
									
										
										
										
											2009-07-19 17:42:01 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								# include  "BKE_global.h" 
  
						 
					
						
							
								
									
										
										
										
											2008-12-29 04:14:27 +00:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								# include  "WM_api.h" 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								# include  "WM_types.h" 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2009-01-18 21:36:38 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								# include  "UI_interface.h" 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2008-12-29 04:14:27 +00:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								# include  "ED_screen.h" 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								# include  "transform.h" 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2009-03-06 15:50:15 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								typedef  struct  TransformModeItem  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								{  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									char  * idname ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									int 		mode ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								}  TransformModeItem ;  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								static  float  VecOne [ 3 ]  =  { 1 ,  1 ,  1 } ;  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2009-07-18 14:55:03 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								char  OP_TRANSLATION [ ]  =  " TFM_OT_translate " ;  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								char  OP_ROTATION [ ]  =  " TFM_OT_rotate " ;  
						 
					
						
							
								
									
										
										
										
											2009-03-06 15:50:15 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								char  OP_TOSPHERE [ ]  =  " TFM_OT_tosphere " ;  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								char  OP_RESIZE [ ]  =  " TFM_OT_resize " ;  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								char  OP_SHEAR [ ]  =  " TFM_OT_shear " ;  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								char  OP_WARP [ ]  =  " TFM_OT_warp " ;  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								char  OP_SHRINK_FATTEN [ ]  =  " TFM_OT_shrink_fatten " ;  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								char  OP_TILT [ ]  =  " TFM_OT_tilt " ;  
						 
					
						
							
								
									
										
										
										
											2009-07-09 02:45:48 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								char  OP_TRACKBALL [ ]  =  " TFM_OT_trackball " ;  
						 
					
						
							
								
									
										
										
										
											2009-09-16 17:43:09 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								char  OP_MIRROR [ ]  =  " TFM_OT_mirror " ;  
						 
					
						
							
								
									
										
										
										
											2009-10-22 23:22:05 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								char  OP_EDGE_SLIDE [ ]  =  " TFM_OT_edge_slide " ;  
						 
					
						
							
								
									
										
										
										
											2009-03-06 15:50:15 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								TransformModeItem  transform_modes [ ]  =  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								{  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									{ OP_TRANSLATION ,  TFM_TRANSLATION } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									{ OP_ROTATION ,  TFM_ROTATION } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									{ OP_TOSPHERE ,  TFM_TOSPHERE } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									{ OP_RESIZE ,  TFM_RESIZE } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									{ OP_SHEAR ,  TFM_SHEAR } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									{ OP_WARP ,  TFM_WARP } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									{ OP_SHRINK_FATTEN ,  TFM_SHRINKFATTEN } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									{ OP_TILT ,  TFM_TILT } , 
							 
						 
					
						
							
								
									
										
										
										
											2009-07-09 02:45:48 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									{ OP_TRACKBALL ,  TFM_TRACKBALL } , 
							 
						 
					
						
							
								
									
										
										
										
											2009-09-16 17:43:09 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									{ OP_MIRROR ,  TFM_MIRROR } , 
							 
						 
					
						
							
								
									
										
										
										
											2009-10-22 23:22:05 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									{ OP_EDGE_SLIDE ,  TFM_EDGE_SLIDE } , 
							 
						 
					
						
							
								
									
										
										
										
											2009-03-06 15:50:15 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									{ NULL ,  0 } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								} ;  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2009-01-18 21:36:38 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								static  int  select_orientation_exec ( bContext  * C ,  wmOperator  * op )  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								{  
						 
					
						
							
								
									
										
										
										
											2009-02-04 11:52:16 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									int  orientation  =  RNA_enum_get ( op - > ptr ,  " orientation " ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									BIF_selectTransformOrientationValue ( C ,  orientation ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-10-22 23:22:05 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									WM_event_add_notifier ( C ,  NC_SPACE | ND_SPACE_VIEW3D ,  CTX_wm_view3d ( C ) ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-02-04 11:52:16 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									return  OPERATOR_FINISHED ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-01-18 21:36:38 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								static  int  select_orientation_invoke ( bContext  * C ,  wmOperator  * op ,  wmEvent  * event )  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								{  
						 
					
						
							
								
									
										
										
										
											2009-05-23 03:24:15 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									uiPopupMenu  * pup ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									uiLayout  * layout ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-07-09 02:45:48 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2009-05-23 03:24:15 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									pup =  uiPupMenuBegin ( C ,  " Orientation " ,  0 ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									layout =  uiPupMenuLayout ( pup ) ; 
							 
						 
					
						
							
								
									
										
										
											
												RNA
* Enums can now be dynamically created in the _itemf callback,
  using RNA_enum_item(s)_add, RNA_enum_item_end. All places asking
  for enum items now need to potentially free the items.
* This callback now also gets context, this was added specifically
  for operators. This doesn't fit design well at all, needed to do
  some ugly hacks, but can't find a good solution at the moment.
* All enums must have a default list of items too, even with an
  _itemf callback, for docs and fallback in case there is no context.
* Used by MESH_OT_merge, MESH_OT_select_similar, TFM_OT_select_orientation.
* Also changes some operator properties that were enums to booleas
  (unselected, deselect), to make them consistent with other ops.
											 
										 
										
											2009-07-10 19:56:13 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									uiItemsEnumO ( layout ,  " TFM_OT_select_orientation " ,  " orientation " ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-05-23 03:24:15 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									uiPupMenuEnd ( C ,  pup ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-07-09 02:45:48 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2009-02-04 11:52:16 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									return  OPERATOR_CANCELLED ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-01-18 21:36:38 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								}  
						 
					
						
							
								
									
										
										
										
											2009-07-09 02:45:48 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2009-01-18 21:36:38 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								void  TFM_OT_select_orientation ( struct  wmOperatorType  * ot )  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								{  
						 
					
						
							
								
									
										
										
											
												RNA
* Enums can now be dynamically created in the _itemf callback,
  using RNA_enum_item(s)_add, RNA_enum_item_end. All places asking
  for enum items now need to potentially free the items.
* This callback now also gets context, this was added specifically
  for operators. This doesn't fit design well at all, needed to do
  some ugly hacks, but can't find a good solution at the moment.
* All enums must have a default list of items too, even with an
  _itemf callback, for docs and fallback in case there is no context.
* Used by MESH_OT_merge, MESH_OT_select_similar, TFM_OT_select_orientation.
* Also changes some operator properties that were enums to booleas
  (unselected, deselect), to make them consistent with other ops.
											 
										 
										
											2009-07-10 19:56:13 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									PropertyRNA  * prop ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-02-04 11:52:16 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2009-01-18 21:36:38 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									/* identifiers */ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									ot - > name    =  " Select Orientation " ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-10-22 23:22:05 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									ot - > description =  " Select transformation orientation. " ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-01-18 21:36:38 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									ot - > idname  =  " TFM_OT_select_orientation " ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-10-22 23:22:05 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									ot - > flag    =  OPTYPE_UNDO ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-01-18 21:36:38 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									/* api callbacks */ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									ot - > invoke  =  select_orientation_invoke ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									ot - > exec    =  select_orientation_exec ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									ot - > poll    =  ED_operator_areaactive ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2009-10-22 23:22:05 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									prop =  RNA_def_property ( ot - > srna ,  " orientation " ,  PROP_ENUM ,  PROP_NONE ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									RNA_def_property_ui_text ( prop ,  " Orientation " ,  " Transformation orientation. " ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									RNA_def_enum_funcs ( prop ,  rna_TransformOrientation_itemf ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								static  int  delete_orientation_exec ( bContext  * C ,  wmOperator  * op )  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								{  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									View3D  * v3d  =  CTX_wm_view3d ( C ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									int  selected_index  =  ( v3d - > twmode  -  V3D_MANIP_CUSTOM ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									BIF_removeTransformOrientationIndex ( C ,  selected_index ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									WM_event_add_notifier ( C ,  NC_SPACE | ND_SPACE_VIEW3D ,  CTX_wm_view3d ( C ) ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									return  OPERATOR_FINISHED ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								static  int  delete_orientation_invoke ( bContext  * C ,  wmOperator  * op ,  wmEvent  * event )  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								{  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									return  delete_orientation_exec ( C ,  op ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								static  int  delete_orientation_poll ( bContext  * C )  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								{  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									int  selected_index  =  - 1 ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									View3D  * v3d  =  CTX_wm_view3d ( C ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									if  ( ED_operator_areaactive ( C )  = =  0 ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										return  0 ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									if ( v3d )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										selected_index  =  ( v3d - > twmode  -  V3D_MANIP_CUSTOM ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									return  selected_index  > =  0 ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								void  TFM_OT_delete_orientation ( struct  wmOperatorType  * ot )  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								{  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									/* identifiers */ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									ot - > name    =  " Delete Orientation " ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									ot - > description =  " Delete transformation orientation. " ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									ot - > idname  =  " TFM_OT_delete_orientation " ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									ot - > flag    =  OPTYPE_UNDO ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									/* api callbacks */ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									ot - > invoke  =  delete_orientation_invoke ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									ot - > exec    =  delete_orientation_exec ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									ot - > poll    =  delete_orientation_poll ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								static  int  create_orientation_exec ( bContext  * C ,  wmOperator  * op )  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								{  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									char  name [ 36 ] ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									int  use  =  RNA_boolean_get ( op - > ptr ,  " use " ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									int  overwrite  =  RNA_boolean_get ( op - > ptr ,  " overwrite " ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									RNA_string_get ( op - > ptr ,  " name " ,  name ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									BIF_createTransformOrientation ( C ,  op - > reports ,  name ,  use ,  overwrite ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									WM_event_add_notifier ( C ,  NC_SPACE | ND_SPACE_VIEW3D ,  CTX_wm_view3d ( C ) ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									return  OPERATOR_FINISHED ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								static  int  create_orientation_invoke ( bContext  * C ,  wmOperator  * op ,  wmEvent  * event )  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								{  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									return  create_orientation_exec ( C ,  op ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								void  TFM_OT_create_orientation ( struct  wmOperatorType  * ot )  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								{  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									/* identifiers */ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									ot - > name    =  " Create Orientation " ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									ot - > description =  " Create transformation orientation from selection. " ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									ot - > idname  =  " TFM_OT_create_orientation " ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									ot - > flag    =  OPTYPE_REGISTER | OPTYPE_UNDO ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									/* api callbacks */ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									ot - > invoke  =  create_orientation_invoke ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									ot - > exec    =  create_orientation_exec ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									ot - > poll    =  ED_operator_areaactive ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									ot - > flag    =  OPTYPE_REGISTER | OPTYPE_UNDO ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									RNA_def_string ( ot - > srna ,  " name " ,  " " ,  35 ,  " Name " ,  " Text to insert at the cursor position. " ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									RNA_def_boolean ( ot - > srna ,  " use " ,  0 ,  " Use after creation " ,  " Select orientation after its creation " ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									RNA_def_boolean ( ot - > srna ,  " overwrite " ,  0 ,  " Overwrite previous " ,  " Overwrite previously created orientation with same name " ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-01-18 21:36:38 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2008-12-29 04:14:27 +00:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								static  void  transformops_exit ( bContext  * C ,  wmOperator  * op )  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								{  
						 
					
						
							
								
									
										
										
										
											2009-01-03 22:15:59 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									saveTransform ( C ,  op - > customdata ,  op ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2008-12-29 04:14:27 +00:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
									MEM_freeN ( op - > customdata ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									op - > customdata  =  NULL ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-07-19 17:42:01 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									G . moving  =  0 ; 
							 
						 
					
						
							
								
									
										
										
										
											2008-12-29 04:14:27 +00:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2009-03-28 20:46:38 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								static  int  transformops_data ( bContext  * C ,  wmOperator  * op ,  wmEvent  * event )  
						 
					
						
							
								
									
										
										
										
											2008-12-29 04:14:27 +00:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								{  
						 
					
						
							
								
									
										
										
										
											2009-03-28 20:46:38 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									int  retval  =  1 ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-01-03 22:15:59 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									if  ( op - > customdata  = =  NULL ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									{ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										TransInfo  * t  =  MEM_callocN ( sizeof ( TransInfo ) ,  " TransInfo data " ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-03-06 15:50:15 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										TransformModeItem  * tmode ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										int  mode  =  - 1 ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										for  ( tmode  =  transform_modes ;  tmode - > idname ;  tmode + + ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										{ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											if  ( op - > type - > idname  = =  tmode - > idname ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											{ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												mode  =  tmode - > mode ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										if  ( mode  = =  - 1 ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										{ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											mode  =  RNA_int_get ( op - > ptr ,  " mode " ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2009-03-28 20:46:38 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										retval  =  initTransform ( C ,  t ,  op ,  event ,  mode ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-07-19 17:42:01 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										G . moving  =  1 ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-07-09 02:45:48 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2009-01-03 22:15:59 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										/* store data */ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										op - > customdata  =  t ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									} 
							 
						 
					
						
							
								
									
										
										
										
											2009-07-09 02:45:48 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2009-03-28 20:46:38 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									return  retval ;  /* return 0 on error */ 
							 
						 
					
						
							
								
									
										
										
										
											2008-12-29 04:14:27 +00:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								static  int  transform_modal ( bContext  * C ,  wmOperator  * op ,  wmEvent  * event )  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								{  
						 
					
						
							
								
									
										
										
										
											2009-01-03 22:15:59 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									int  exit_code ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-07-09 02:45:48 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2008-12-29 04:14:27 +00:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
									TransInfo  * t  =  op - > customdata ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-07-09 02:45:48 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2008-12-29 04:14:27 +00:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
									transformEvent ( t ,  event ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-07-09 02:45:48 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2009-01-07 16:52:18 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									transformApply ( C ,  t ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-07-09 02:45:48 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2009-01-03 22:15:59 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									exit_code  =  transformEnd ( C ,  t ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-07-09 02:45:48 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2009-01-03 22:15:59 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									if  ( exit_code  ! =  OPERATOR_RUNNING_MODAL ) 
							 
						 
					
						
							
								
									
										
										
										
											2008-12-29 04:14:27 +00:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
									{ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										transformops_exit ( C ,  op ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									} 
							 
						 
					
						
							
								
									
										
										
										
											2009-01-03 22:15:59 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									return  exit_code ; 
							 
						 
					
						
							
								
									
										
										
										
											2008-12-29 04:14:27 +00:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2009-01-03 22:15:59 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								static  int  transform_cancel ( bContext  * C ,  wmOperator  * op )  
						 
					
						
							
								
									
										
										
										
											2008-12-29 04:14:27 +00:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								{  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									TransInfo  * t  =  op - > customdata ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-07-09 02:45:48 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2009-01-03 22:15:59 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									t - > state  =  TRANS_CANCEL ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									transformEnd ( C ,  t ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									transformops_exit ( C ,  op ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-07-09 02:45:48 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2009-01-18 21:36:38 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									return  OPERATOR_CANCELLED ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-01-03 22:15:59 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								static  int  transform_exec ( bContext  * C ,  wmOperator  * op )  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								{  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									TransInfo  * t ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2009-03-28 20:46:38 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									if  ( ! transformops_data ( C ,  op ,  NULL ) ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									{ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										return  OPERATOR_CANCELLED ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									} 
							 
						 
					
						
							
								
									
										
										
										
											2009-01-03 22:15:59 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									t  =  op - > customdata ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									t - > options  | =  CTX_AUTOCONFIRM ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2009-01-07 16:52:18 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									transformApply ( C ,  t ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-07-09 02:45:48 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2008-12-31 17:11:42 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									transformEnd ( C ,  t ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2008-12-29 04:14:27 +00:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									transformops_exit ( C ,  op ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-07-09 02:45:48 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2008-12-29 04:14:27 +00:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
									return  OPERATOR_FINISHED ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								static  int  transform_invoke ( bContext  * C ,  wmOperator  * op ,  wmEvent  * event )  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								{  
						 
					
						
							
								
									
										
										
										
											2009-03-28 20:46:38 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									if  ( ! transformops_data ( C ,  op ,  event ) ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									{ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										return  OPERATOR_CANCELLED ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									} 
							 
						 
					
						
							
								
									
										
										
										
											2008-12-29 04:14:27 +00:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2009-03-06 15:50:15 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									if ( RNA_property_is_set ( op - > ptr ,  " value " ) )  { 
							 
						 
					
						
							
								
									
										
										
										
											2008-12-29 04:14:27 +00:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
										return  transform_exec ( C ,  op ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									else  { 
							 
						 
					
						
							
								
									
										
										
										
											2009-03-06 15:50:15 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										TransInfo  * t  =  op - > customdata ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2008-12-29 04:14:27 +00:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
										/* add temp handler */ 
							 
						 
					
						
							
								
									
										
										
										
											2009-10-22 23:22:05 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										WM_event_add_modal_handler ( C ,  op ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2008-12-29 04:14:27 +00:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2009-03-06 15:50:15 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										t - > flag  | =  T_MODAL ;  // XXX meh maybe somewhere else
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2008-12-29 04:14:27 +00:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
										return  OPERATOR_RUNNING_MODAL ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2009-03-06 15:50:15 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								void  Properties_Proportional ( struct  wmOperatorType  * ot )  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								{  
						 
					
						
							
								
									
										
										
										
											2009-10-22 23:22:05 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									RNA_def_enum ( ot - > srna ,  " proportional " ,  proportional_editing_items ,  0 ,  " Proportional Editing " ,  " " ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									RNA_def_enum ( ot - > srna ,  " proportional_editing_falloff " ,  proportional_falloff_items ,  0 ,  " Proportional Editing Falloff " ,  " Falloff type for proportional editing mode. " ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-03-06 15:50:15 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									RNA_def_float ( ot - > srna ,  " proportional_size " ,  1 ,  0 ,  FLT_MAX ,  " Proportional Size " ,  " " ,  0 ,  100 ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-03-29 19:52:53 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								}  
						 
					
						
							
								
									
										
										
										
											2009-03-06 15:50:15 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2009-03-29 19:52:53 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								void  Properties_Snapping ( struct  wmOperatorType  * ot ,  short  align )  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								{  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									RNA_def_boolean ( ot - > srna ,  " snap " ,  0 ,  " Snap to Point " ,  " " ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-10-22 23:22:05 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									RNA_def_enum ( ot - > srna ,  " snap_mode " ,  snap_mode_items ,  0 ,  " Mode " ,  " " ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-03-29 19:52:53 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									RNA_def_float_vector ( ot - > srna ,  " snap_point " ,  3 ,  NULL ,  - FLT_MAX ,  FLT_MAX ,  " Point " ,  " " ,  - FLT_MAX ,  FLT_MAX ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-07-09 02:45:48 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2009-03-29 19:52:53 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									if  ( align ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									{ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										RNA_def_boolean ( ot - > srna ,  " snap_align " ,  0 ,  " Align with Point Normal " ,  " " ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										RNA_def_float_vector ( ot - > srna ,  " snap_normal " ,  3 ,  NULL ,  - FLT_MAX ,  FLT_MAX ,  " Normal " ,  " " ,  - FLT_MAX ,  FLT_MAX ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									} 
							 
						 
					
						
							
								
									
										
										
										
											2009-03-06 15:50:15 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								void  Properties_Constraints ( struct  wmOperatorType  * ot )  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								{  
						 
					
						
							
								
									
										
										
										
											2009-07-16 06:27:37 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									PropertyRNA  * prop ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2009-03-06 15:50:15 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									RNA_def_boolean_vector ( ot - > srna ,  " constraint_axis " ,  3 ,  NULL ,  " Constraint Axis " ,  " " ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-10-22 23:22:05 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									prop =  RNA_def_property ( ot - > srna ,  " constraint_orientation " ,  PROP_ENUM ,  PROP_NONE ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									RNA_def_property_ui_text ( prop ,  " Orientation " ,  " Transformation orientation. " ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									RNA_def_enum_funcs ( prop ,  rna_TransformOrientation_itemf ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-03-06 15:50:15 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2009-07-18 14:55:03 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								void  TFM_OT_translate ( struct  wmOperatorType  * ot )  
						 
					
						
							
								
									
										
										
										
											2009-03-06 15:50:15 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								{  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									/* identifiers */ 
							 
						 
					
						
							
								
									
										
										
										
											2009-07-18 14:55:03 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									ot - > name    =  " Translate " ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-08-24 09:17:09 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									ot - > description =  " Translate selected items. " ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-03-06 15:50:15 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									ot - > idname  =  OP_TRANSLATION ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-07-11 14:51:13 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									ot - > flag  =  OPTYPE_REGISTER | OPTYPE_UNDO | OPTYPE_BLOCKING ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-03-06 15:50:15 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									/* api callbacks */ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									ot - > invoke  =  transform_invoke ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									ot - > exec    =  transform_exec ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									ot - > modal   =  transform_modal ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									ot - > cancel   =  transform_cancel ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									ot - > poll    =  ED_operator_areaactive ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									RNA_def_float_vector ( ot - > srna ,  " value " ,  3 ,  NULL ,  - FLT_MAX ,  FLT_MAX ,  " Vector " ,  " " ,  - FLT_MAX ,  FLT_MAX ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									Properties_Proportional ( ot ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2009-05-23 03:24:15 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									RNA_def_boolean ( ot - > srna ,  " mirror " ,  0 ,  " Mirror Editing " ,  " " ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-03-06 15:50:15 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									Properties_Constraints ( ot ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-07-09 02:45:48 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2009-03-29 19:52:53 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									Properties_Snapping ( ot ,  1 ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-03-06 15:50:15 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								void  TFM_OT_resize ( struct  wmOperatorType  * ot )  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								{  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									/* identifiers */ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									ot - > name    =  " Resize " ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-08-24 09:17:09 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									ot - > description =  " Resize selected items. " ;  
							 
						 
					
						
							
								
									
										
										
										
											2009-03-06 15:50:15 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									ot - > idname  =  OP_RESIZE ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-07-11 14:51:13 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									ot - > flag  =  OPTYPE_REGISTER | OPTYPE_UNDO | OPTYPE_BLOCKING ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-03-06 15:50:15 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									/* api callbacks */ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									ot - > invoke  =  transform_invoke ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									ot - > exec    =  transform_exec ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									ot - > modal   =  transform_modal ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									ot - > cancel   =  transform_cancel ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									ot - > poll    =  ED_operator_areaactive ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									RNA_def_float_vector ( ot - > srna ,  " value " ,  3 ,  VecOne ,  - FLT_MAX ,  FLT_MAX ,  " Vector " ,  " " ,  - FLT_MAX ,  FLT_MAX ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									Properties_Proportional ( ot ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2009-05-23 03:24:15 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									RNA_def_boolean ( ot - > srna ,  " mirror " ,  0 ,  " Mirror Editing " ,  " " ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-03-06 15:50:15 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									Properties_Constraints ( ot ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-07-09 02:45:48 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2009-03-29 19:52:53 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									Properties_Snapping ( ot ,  0 ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-03-06 15:50:15 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2009-07-09 02:45:48 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								void  TFM_OT_trackball ( struct  wmOperatorType  * ot )  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								{  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									/* identifiers */ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									ot - > name    =  " Trackball " ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-08-24 09:17:09 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									ot - > description =  " Trackball style rotation of selected items. " ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-07-09 02:45:48 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									ot - > idname  =  OP_TRACKBALL ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-07-11 14:51:13 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									ot - > flag  =  OPTYPE_REGISTER | OPTYPE_UNDO | OPTYPE_BLOCKING ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-07-09 02:45:48 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									/* api callbacks */ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									ot - > invoke  =  transform_invoke ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									ot - > exec    =  transform_exec ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									ot - > modal   =  transform_modal ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									ot - > cancel   =  transform_cancel ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									ot - > poll    =  ED_operator_areaactive ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									RNA_def_float_vector ( ot - > srna ,  " value " ,  2 ,  VecOne ,  - FLT_MAX ,  FLT_MAX ,  " angle " ,  " " ,  - FLT_MAX ,  FLT_MAX ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									Properties_Proportional ( ot ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									RNA_def_boolean ( ot - > srna ,  " mirror " ,  0 ,  " Mirror Editing " ,  " " ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2009-07-18 14:55:03 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								void  TFM_OT_rotate ( struct  wmOperatorType  * ot )  
						 
					
						
							
								
									
										
										
										
											2009-03-06 15:50:15 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								{  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									/* identifiers */ 
							 
						 
					
						
							
								
									
										
										
										
											2009-07-18 14:55:03 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									ot - > name    =  " Rotate " ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-08-24 09:17:09 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									ot - > description =  " Rotate selected items. " ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-03-06 15:50:15 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									ot - > idname  =  OP_ROTATION ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-07-11 14:51:13 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									ot - > flag  =  OPTYPE_REGISTER | OPTYPE_UNDO | OPTYPE_BLOCKING ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-03-06 15:50:15 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									/* api callbacks */ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									ot - > invoke  =  transform_invoke ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									ot - > exec    =  transform_exec ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									ot - > modal   =  transform_modal ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									ot - > cancel   =  transform_cancel ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									ot - > poll    =  ED_operator_areaactive ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2009-03-10 18:10:24 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									RNA_def_float_rotation ( ot - > srna ,  " value " ,  1 ,  NULL ,  - FLT_MAX ,  FLT_MAX ,  " Angle " ,  " " ,  - M_PI * 2 ,  M_PI * 2 ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-03-06 15:50:15 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									Properties_Proportional ( ot ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2009-05-23 03:24:15 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									RNA_def_boolean ( ot - > srna ,  " mirror " ,  0 ,  " Mirror Editing " ,  " " ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-03-06 15:50:15 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									Properties_Constraints ( ot ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-07-09 02:45:48 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2009-03-29 19:52:53 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									Properties_Snapping ( ot ,  0 ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-03-06 15:50:15 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								void  TFM_OT_tilt ( struct  wmOperatorType  * ot )  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								{  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									/* identifiers */ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									ot - > name    =  " Tilt " ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-08-24 09:17:09 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    /*optionals - 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        " Tilt selected vertices. " 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        " Specify an extra axis rotation for selected vertices of 3d curve. "  */ 
							 
						 
					
						
							
								
									
										
										
										
											2009-08-24 14:26:58 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									ot - > description =  " Tilt selected control vertices of 3d curve. " ;  
							 
						 
					
						
							
								
									
										
										
										
											2009-03-06 15:50:15 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									ot - > idname  =  OP_TILT ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-07-11 14:51:13 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									ot - > flag  =  OPTYPE_REGISTER | OPTYPE_UNDO | OPTYPE_BLOCKING ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-03-06 15:50:15 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									/* api callbacks */ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									ot - > invoke  =  transform_invoke ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									ot - > exec    =  transform_exec ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									ot - > modal   =  transform_modal ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									ot - > cancel   =  transform_cancel ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									ot - > poll    =  ED_operator_editcurve ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2009-03-10 18:10:24 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									RNA_def_float_rotation ( ot - > srna ,  " value " ,  1 ,  NULL ,  - FLT_MAX ,  FLT_MAX ,  " Angle " ,  " " ,  - M_PI * 2 ,  M_PI * 2 ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-03-06 15:50:15 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									Properties_Proportional ( ot ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2009-05-23 03:24:15 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									RNA_def_boolean ( ot - > srna ,  " mirror " ,  0 ,  " Mirror Editing " ,  " " ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-03-06 15:50:15 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									Properties_Constraints ( ot ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								void  TFM_OT_warp ( struct  wmOperatorType  * ot )  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								{  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									/* identifiers */ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									ot - > name    =  " Warp " ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-08-24 14:26:58 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									ot - > description =  " Warp selected items around the cursor. " ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-03-06 15:50:15 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									ot - > idname  =  OP_WARP ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-07-11 14:51:13 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									ot - > flag  =  OPTYPE_REGISTER | OPTYPE_UNDO | OPTYPE_BLOCKING ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-03-06 15:50:15 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									/* api callbacks */ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									ot - > invoke  =  transform_invoke ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									ot - > exec    =  transform_exec ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									ot - > modal   =  transform_modal ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									ot - > cancel   =  transform_cancel ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									ot - > poll    =  ED_operator_areaactive ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2009-03-10 18:10:24 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									RNA_def_float_rotation ( ot - > srna ,  " value " ,  1 ,  NULL ,  - FLT_MAX ,  FLT_MAX ,  " Angle " ,  " " ,  0 ,  1 ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-03-06 15:50:15 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									Properties_Proportional ( ot ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2009-05-23 03:24:15 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									RNA_def_boolean ( ot - > srna ,  " mirror " ,  0 ,  " Mirror Editing " ,  " " ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-03-06 15:50:15 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									// XXX Shear axis?
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								//	Properties_Constraints(ot);
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								void  TFM_OT_shear ( struct  wmOperatorType  * ot )  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								{  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									/* identifiers */ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									ot - > name    =  " Shear " ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-08-24 14:26:58 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									ot - > description =  " Shear selected items along the horizontal screen axis. " ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-03-06 15:50:15 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									ot - > idname  =  OP_SHEAR ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-07-11 14:51:13 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									ot - > flag  =  OPTYPE_REGISTER | OPTYPE_UNDO | OPTYPE_BLOCKING ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-03-06 15:50:15 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									/* api callbacks */ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									ot - > invoke  =  transform_invoke ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									ot - > exec    =  transform_exec ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									ot - > modal   =  transform_modal ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									ot - > cancel   =  transform_cancel ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									ot - > poll    =  ED_operator_areaactive ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2009-03-10 18:10:24 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									RNA_def_float ( ot - > srna ,  " value " ,  0 ,  - FLT_MAX ,  FLT_MAX ,  " Offset " ,  " " ,  - FLT_MAX ,  FLT_MAX ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-03-06 15:50:15 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									Properties_Proportional ( ot ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2009-05-23 03:24:15 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									RNA_def_boolean ( ot - > srna ,  " mirror " ,  0 ,  " Mirror Editing " ,  " " ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-03-06 15:50:15 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									// XXX Shear axis?
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								//	Properties_Constraints(ot);
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								void  TFM_OT_shrink_fatten ( struct  wmOperatorType  * ot )  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								{  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									/* identifiers */ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									ot - > name    =  " Shrink/Fatten " ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-08-24 14:26:58 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									ot - > description =  " Shrink/fatten selected vertices along normals. " ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-03-06 15:50:15 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									ot - > idname  =  OP_SHRINK_FATTEN ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-07-11 14:51:13 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									ot - > flag  =  OPTYPE_REGISTER | OPTYPE_UNDO | OPTYPE_BLOCKING ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-03-06 15:50:15 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									/* api callbacks */ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									ot - > invoke  =  transform_invoke ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									ot - > exec    =  transform_exec ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									ot - > modal   =  transform_modal ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									ot - > cancel   =  transform_cancel ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									ot - > poll    =  ED_operator_editmesh ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2009-03-10 18:10:24 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									RNA_def_float ( ot - > srna ,  " value " ,  0 ,  - FLT_MAX ,  FLT_MAX ,  " Offset " ,  " " ,  - FLT_MAX ,  FLT_MAX ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-03-06 15:50:15 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									Properties_Proportional ( ot ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2009-05-23 03:24:15 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									RNA_def_boolean ( ot - > srna ,  " mirror " ,  0 ,  " Mirror Editing " ,  " " ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-03-06 15:50:15 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								void  TFM_OT_tosphere ( struct  wmOperatorType  * ot )  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								{  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									/* identifiers */ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									ot - > name    =  " To Sphere " ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-08-24 14:26:58 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    //added "around mesh center" to differentiate between "MESH_OT_vertices_to_sphere()" 
 
							 
						 
					
						
							
								
									
										
										
										
											2009-08-24 09:17:09 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									ot - > description =  " Move selected vertices outward in a spherical shape around mesh center. " ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-03-06 15:50:15 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									ot - > idname  =  OP_TOSPHERE ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-07-11 14:51:13 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									ot - > flag  =  OPTYPE_REGISTER | OPTYPE_UNDO | OPTYPE_BLOCKING ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-03-06 15:50:15 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									/* api callbacks */ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									ot - > invoke  =  transform_invoke ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									ot - > exec    =  transform_exec ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									ot - > modal   =  transform_modal ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									ot - > cancel   =  transform_cancel ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									ot - > poll    =  ED_operator_areaactive ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2009-10-22 23:22:05 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									RNA_def_float_factor ( ot - > srna ,  " value " ,  0 ,  0 ,  1 ,  " Factor " ,  " " ,  0 ,  1 ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-03-06 15:50:15 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									Properties_Proportional ( ot ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2009-05-23 03:24:15 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									RNA_def_boolean ( ot - > srna ,  " mirror " ,  0 ,  " Mirror Editing " ,  " " ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-03-06 15:50:15 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2009-09-16 17:43:09 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								void  TFM_OT_mirror ( struct  wmOperatorType  * ot )  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								{  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									/* identifiers */ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									ot - > name    =  " Mirror " ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									ot - > description =  " Mirror selected vertices around one or more axes. " ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									ot - > idname  =  OP_MIRROR ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									ot - > flag  =  OPTYPE_REGISTER | OPTYPE_UNDO | OPTYPE_BLOCKING ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									/* api callbacks */ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									ot - > invoke  =  transform_invoke ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									ot - > exec    =  transform_exec ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									ot - > modal   =  transform_modal ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									ot - > cancel   =  transform_cancel ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									ot - > poll    =  ED_operator_areaactive ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									Properties_Proportional ( ot ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									Properties_Constraints ( ot ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2009-10-22 23:22:05 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								void  TFM_OT_edge_slide ( struct  wmOperatorType  * ot )  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								{  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									/* identifiers */ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									ot - > name    =  " Edge Slide " ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									ot - > description =  " Slide an edge loop along a mesh. " ;  
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									ot - > idname  =  OP_EDGE_SLIDE ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									ot - > flag  =  OPTYPE_REGISTER | OPTYPE_UNDO | OPTYPE_BLOCKING ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									/* api callbacks */ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									ot - > invoke  =  transform_invoke ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									ot - > exec    =  transform_exec ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									ot - > modal   =  transform_modal ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									ot - > cancel   =  transform_cancel ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									ot - > poll    =  ED_operator_editmesh ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									RNA_def_float_factor ( ot - > srna ,  " value " ,  0 ,  - 1.0f ,  1.0f ,  " Factor " ,  " " ,  - 1.0f ,  1.0f ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									RNA_def_boolean ( ot - > srna ,  " mirror " ,  0 ,  " Mirror Editing " ,  " " ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2008-12-29 04:14:27 +00:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								void  TFM_OT_transform ( struct  wmOperatorType  * ot )  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								{  
						 
					
						
							
								
									
										
										
										
											2009-01-18 21:36:38 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									static  EnumPropertyItem  transform_mode_types [ ]  =  { 
							 
						 
					
						
							
								
									
										
										
										
											2009-06-16 00:52:21 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											{ TFM_INIT ,  " INIT " ,  0 ,  " Init " ,  " " } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											{ TFM_DUMMY ,  " DUMMY " ,  0 ,  " Dummy " ,  " " } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											{ TFM_TRANSLATION ,  " TRANSLATION " ,  0 ,  " Translation " ,  " " } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											{ TFM_ROTATION ,  " ROTATION " ,  0 ,  " Rotation " ,  " " } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											{ TFM_RESIZE ,  " RESIZE " ,  0 ,  " Resize " ,  " " } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											{ TFM_TOSPHERE ,  " TOSPHERE " ,  0 ,  " Tosphere " ,  " " } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											{ TFM_SHEAR ,  " SHEAR " ,  0 ,  " Shear " ,  " " } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											{ TFM_WARP ,  " WARP " ,  0 ,  " Warp " ,  " " } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											{ TFM_SHRINKFATTEN ,  " SHRINKFATTEN " ,  0 ,  " Shrinkfatten " ,  " " } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											{ TFM_TILT ,  " TILT " ,  0 ,  " Tilt " ,  " " } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											{ TFM_TRACKBALL ,  " TRACKBALL " ,  0 ,  " Trackball " ,  " " } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											{ TFM_PUSHPULL ,  " PUSHPULL " ,  0 ,  " Pushpull " ,  " " } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											{ TFM_CREASE ,  " CREASE " ,  0 ,  " Crease " ,  " " } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											{ TFM_MIRROR ,  " MIRROR " ,  0 ,  " Mirror " ,  " " } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											{ TFM_BONESIZE ,  " BONESIZE " ,  0 ,  " Bonesize " ,  " " } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											{ TFM_BONE_ENVELOPE ,  " BONE_ENVELOPE " ,  0 ,  " Bone_Envelope " ,  " " } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											{ TFM_CURVE_SHRINKFATTEN ,  " CURVE_SHRINKFATTEN " ,  0 ,  " Curve_Shrinkfatten " ,  " " } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											{ TFM_BONE_ROLL ,  " BONE_ROLL " ,  0 ,  " Bone_Roll " ,  " " } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											{ TFM_TIME_TRANSLATE ,  " TIME_TRANSLATE " ,  0 ,  " Time_Translate " ,  " " } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											{ TFM_TIME_SLIDE ,  " TIME_SLIDE " ,  0 ,  " Time_Slide " ,  " " } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											{ TFM_TIME_SCALE ,  " TIME_SCALE " ,  0 ,  " Time_Scale " ,  " " } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											{ TFM_TIME_EXTEND ,  " TIME_EXTEND " ,  0 ,  " Time_Extend " ,  " " } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											{ TFM_BAKE_TIME ,  " BAKE_TIME " ,  0 ,  " Bake_Time " ,  " " } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											{ TFM_BEVEL ,  " BEVEL " ,  0 ,  " Bevel " ,  " " } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											{ TFM_BWEIGHT ,  " BWEIGHT " ,  0 ,  " Bweight " ,  " " } , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											{ TFM_ALIGN ,  " ALIGN " ,  0 ,  " Align " ,  " " } , 
							 
						 
					
						
							
								
									
										
										
										
											2009-10-22 23:22:05 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											{ TFM_EDGE_SLIDE ,  " EDGESLIDE " ,  0 ,  " Edge Slide " ,  " " } , 
							 
						 
					
						
							
								
									
										
										
										
											2009-06-16 00:52:21 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											{ 0 ,  NULL ,  0 ,  NULL ,  NULL } 
							 
						 
					
						
							
								
									
										
										
										
											2009-01-18 21:36:38 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									} ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-03-06 15:50:15 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2008-12-29 04:14:27 +00:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
									/* identifiers */ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									ot - > name    =  " Transform " ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-08-24 09:17:09 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									ot - > description =  " Transform selected items by mode type. " ; 
							 
						 
					
						
							
								
									
										
										
										
											2008-12-29 04:14:27 +00:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
									ot - > idname  =  " TFM_OT_transform " ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-07-11 14:51:13 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									ot - > flag =  OPTYPE_REGISTER | OPTYPE_UNDO | OPTYPE_BLOCKING ; 
							 
						 
					
						
							
								
									
										
										
										
											2008-12-29 04:14:27 +00:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									/* api callbacks */ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									ot - > invoke  =  transform_invoke ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									ot - > exec    =  transform_exec ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									ot - > modal   =  transform_modal ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-01-03 22:15:59 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									ot - > cancel   =  transform_cancel ; 
							 
						 
					
						
							
								
									
										
										
										
											2008-12-29 04:14:27 +00:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
									ot - > poll    =  ED_operator_areaactive ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2009-01-18 21:36:38 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									RNA_def_enum ( ot - > srna ,  " mode " ,  transform_mode_types ,  0 ,  " Mode " ,  " " ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-01-10 19:45:48 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2009-03-06 15:50:15 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									RNA_def_float_vector ( ot - > srna ,  " value " ,  4 ,  NULL ,  - FLT_MAX ,  FLT_MAX ,  " Values " ,  " " ,  - FLT_MAX ,  FLT_MAX ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-01-10 19:45:48 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2009-03-19 19:03:38 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									Properties_Proportional ( ot ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-05-23 03:24:15 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									RNA_def_boolean ( ot - > srna ,  " mirror " ,  0 ,  " Mirror Editing " ,  " " ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-07-16 06:27:37 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									Properties_Constraints ( ot ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2008-12-29 04:14:27 +00:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								void  transform_operatortypes ( void )  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								{  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									WM_operatortype_append ( TFM_OT_transform ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-07-18 14:55:03 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									WM_operatortype_append ( TFM_OT_translate ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									WM_operatortype_append ( TFM_OT_rotate ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-03-06 15:50:15 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									WM_operatortype_append ( TFM_OT_tosphere ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									WM_operatortype_append ( TFM_OT_resize ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									WM_operatortype_append ( TFM_OT_shear ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									WM_operatortype_append ( TFM_OT_warp ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									WM_operatortype_append ( TFM_OT_shrink_fatten ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									WM_operatortype_append ( TFM_OT_tilt ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-07-09 02:45:48 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									WM_operatortype_append ( TFM_OT_trackball ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-09-16 17:43:09 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									WM_operatortype_append ( TFM_OT_mirror ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-10-22 23:22:05 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									WM_operatortype_append ( TFM_OT_edge_slide ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-03-06 15:50:15 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2009-01-18 21:36:38 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									WM_operatortype_append ( TFM_OT_select_orientation ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-10-22 23:22:05 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									WM_operatortype_append ( TFM_OT_create_orientation ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									WM_operatortype_append ( TFM_OT_delete_orientation ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2008-12-29 04:14:27 +00:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								}  
						 
					
						
							
								
									
										
										
										
											2009-07-09 02:45:48 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2009-10-22 23:22:05 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								void  transform_keymap_for_space ( struct  wmKeyConfig  * keyconf ,  struct  wmKeyMap  * keymap ,  int  spaceid )  
						 
					
						
							
								
									
										
										
										
											2008-12-29 04:14:27 +00:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								{  
						 
					
						
							
								
									
										
										
										
											2009-10-22 23:22:05 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									wmKeyMapItem  * km ; 
							 
						 
					
						
							
								
									
										
											 
										
											
												2.5
Modal keymaps.
I've tried to make it as simple as possible, yet still using sufficient facilities to enable self-documenting UIs, saving/reading in files, and proper Python support.
The simplicity is: the 'modal keymap' just checks an event, uses event matching similarly to other keymap matching, and if there's a match it changes the event type, and sets the event value to what the modal keymap has defined. The event values are being defined using EnumPropertyItem structs, so the UI will be able to show all options in self-documenting way.
This system also allows to still handle hardcoded own events.
Tech doc:
1) define keymap
- Create map with unique name, WM_modalkeymap_add()
- Give map property definitions (EnumPropertyItem *)
  This only for UI, so user can get information on available options
2) items
- WM_modalkeymap_add_item(): give it an enum value for events
3) activate
- In keymap definition code, assign the modal keymap to operatortype
  WM_modalkeymap_assign()
4) event manager
- The event handler will check for modal keymap, if so:
  - If the modal map has a match:
    - Sets event->type to EVT_MODAL_MAP
    - Sets event->val to the enum value
5) modal handler
- If event type is EVT_MODAL_MAP:
  - Check event->val, handle it
- Other events can just be handled still
Two examples added in the code:
editors/transform/transform.c: transform_modal_keymap()
editors/screen/screen_ops.c: keymap_modal_set()
Also: to support 'key release' the define KM_RELEASE now is officially
used in event manager, this is not '0', so don't check key events with
the old convention if(event->val) but use if(event->val==KM_PRESS)
											 
										 
										
											2009-07-21 11:03:07 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									/* transform.c, only adds modal map once, checks if it's there */ 
							 
						 
					
						
							
								
									
										
										
										
											2009-10-22 23:22:05 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									transform_modal_keymap ( keyconf ) ; 
							 
						 
					
						
							
								
									
										
											 
										
											
												2.5
Modal keymaps.
I've tried to make it as simple as possible, yet still using sufficient facilities to enable self-documenting UIs, saving/reading in files, and proper Python support.
The simplicity is: the 'modal keymap' just checks an event, uses event matching similarly to other keymap matching, and if there's a match it changes the event type, and sets the event value to what the modal keymap has defined. The event values are being defined using EnumPropertyItem structs, so the UI will be able to show all options in self-documenting way.
This system also allows to still handle hardcoded own events.
Tech doc:
1) define keymap
- Create map with unique name, WM_modalkeymap_add()
- Give map property definitions (EnumPropertyItem *)
  This only for UI, so user can get information on available options
2) items
- WM_modalkeymap_add_item(): give it an enum value for events
3) activate
- In keymap definition code, assign the modal keymap to operatortype
  WM_modalkeymap_assign()
4) event manager
- The event handler will check for modal keymap, if so:
  - If the modal map has a match:
    - Sets event->type to EVT_MODAL_MAP
    - Sets event->val to the enum value
5) modal handler
- If event type is EVT_MODAL_MAP:
  - Check event->val, handle it
- Other events can just be handled still
Two examples added in the code:
editors/transform/transform.c: transform_modal_keymap()
editors/screen/screen_ops.c: keymap_modal_set()
Also: to support 'key release' the define KM_RELEASE now is officially
used in event manager, this is not '0', so don't check key events with
the old convention if(event->val) but use if(event->val==KM_PRESS)
											 
										 
										
											2009-07-21 11:03:07 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									
							 
						 
					
						
							
								
									
										
										
										
											2008-12-29 04:14:27 +00:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
									switch ( spaceid ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									{ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										case  SPACE_VIEW3D : 
							 
						 
					
						
							
								
									
										
										
										
											2009-07-18 14:55:03 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											km  =  WM_keymap_add_item ( keymap ,  " TFM_OT_translate " ,  GKEY ,  KM_PRESS ,  0 ,  0 ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-07-09 02:45:48 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2009-07-18 14:55:03 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											km =  WM_keymap_add_item ( keymap ,  " TFM_OT_translate " ,  EVT_TWEAK_S ,  KM_ANY ,  0 ,  0 ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-07-09 02:45:48 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2009-07-18 14:55:03 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											km  =  WM_keymap_add_item ( keymap ,  " TFM_OT_rotate " ,  RKEY ,  KM_PRESS ,  0 ,  0 ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2008-12-29 04:14:27 +00:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2009-03-06 15:50:15 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											km  =  WM_keymap_add_item ( keymap ,  " TFM_OT_resize " ,  SKEY ,  KM_PRESS ,  0 ,  0 ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2008-12-29 04:14:27 +00:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2009-03-06 15:50:15 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											km  =  WM_keymap_add_item ( keymap ,  " TFM_OT_warp " ,  WKEY ,  KM_PRESS ,  KM_SHIFT ,  0 ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2008-12-29 04:14:27 +00:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2009-09-16 17:43:09 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											km  =  WM_keymap_add_item ( keymap ,  " TFM_OT_tosphere " ,  SKEY ,  KM_PRESS ,  KM_ALT | KM_SHIFT ,  0 ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-07-09 02:45:48 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2009-03-06 15:50:15 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											km  =  WM_keymap_add_item ( keymap ,  " TFM_OT_shear " ,  SKEY ,  KM_PRESS ,  KM_ALT | KM_CTRL | KM_SHIFT ,  0 ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-07-09 02:45:48 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2009-03-06 15:50:15 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											km  =  WM_keymap_add_item ( keymap ,  " TFM_OT_shrink_fatten " ,  SKEY ,  KM_PRESS ,  KM_ALT ,  0 ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											km  =  WM_keymap_add_item ( keymap ,  " TFM_OT_tilt " ,  TKEY ,  KM_PRESS ,  0 ,  0 ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2009-01-18 21:36:38 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											km  =  WM_keymap_add_item ( keymap ,  " TFM_OT_select_orientation " ,  SPACEKEY ,  KM_PRESS ,  KM_ALT ,  0 ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2009-10-22 23:22:05 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											km  =  WM_keymap_add_item ( keymap ,  " TFM_OT_create_orientation " ,  SPACEKEY ,  KM_PRESS ,  KM_CTRL | KM_ALT ,  0 ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											RNA_boolean_set ( km - > ptr ,  " use " ,  1 ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											km  =  WM_keymap_add_item ( keymap ,  " TFM_OT_mirror " ,  MKEY ,  KM_PRESS ,  KM_CTRL ,  0 ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2008-12-29 04:14:27 +00:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
											break ; 
							 
						 
					
						
							
								
									
										
										
										
											2008-12-29 06:06:59 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										case  SPACE_ACTION : 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											km =  WM_keymap_add_item ( keymap ,  " TFM_OT_transform " ,  GKEY ,  KM_PRESS ,  0 ,  0 ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											RNA_int_set ( km - > ptr ,  " mode " ,  TFM_TIME_TRANSLATE ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-07-09 02:45:48 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2009-01-28 15:39:39 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											km =  WM_keymap_add_item ( keymap ,  " TFM_OT_transform " ,  EVT_TWEAK_S ,  KM_ANY ,  0 ,  0 ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											RNA_int_set ( km - > ptr ,  " mode " ,  TFM_TIME_TRANSLATE ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-07-09 02:45:48 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2008-12-29 06:06:59 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											km =  WM_keymap_add_item ( keymap ,  " TFM_OT_transform " ,  EKEY ,  KM_PRESS ,  0 ,  0 ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											RNA_int_set ( km - > ptr ,  " mode " ,  TFM_TIME_EXTEND ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-07-09 02:45:48 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2008-12-29 06:06:59 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											km =  WM_keymap_add_item ( keymap ,  " TFM_OT_transform " ,  SKEY ,  KM_PRESS ,  0 ,  0 ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											RNA_int_set ( km - > ptr ,  " mode " ,  TFM_TIME_SCALE ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-07-09 02:45:48 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2008-12-29 06:06:59 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											km =  WM_keymap_add_item ( keymap ,  " TFM_OT_transform " ,  TKEY ,  KM_PRESS ,  0 ,  0 ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											RNA_int_set ( km - > ptr ,  " mode " ,  TFM_TIME_SLIDE ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-01-04 01:08:01 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											break ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-01-28 00:50:56 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										case  SPACE_IPO : 
							 
						 
					
						
							
								
									
										
										
										
											2009-07-18 14:55:03 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											km =  WM_keymap_add_item ( keymap ,  " TFM_OT_translate " ,  GKEY ,  KM_PRESS ,  0 ,  0 ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-07-09 02:45:48 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2009-07-18 14:55:03 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											km =  WM_keymap_add_item ( keymap ,  " TFM_OT_translate " ,  EVT_TWEAK_S ,  KM_ANY ,  0 ,  0 ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-07-09 02:45:48 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2009-01-28 02:56:58 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
												// XXX the 'mode' identifier here is not quite right
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											km =  WM_keymap_add_item ( keymap ,  " TFM_OT_transform " ,  EKEY ,  KM_PRESS ,  0 ,  0 ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											RNA_int_set ( km - > ptr ,  " mode " ,  TFM_TIME_EXTEND ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-07-09 02:45:48 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2009-07-18 14:55:03 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											km  =  WM_keymap_add_item ( keymap ,  " TFM_OT_rotate " ,  RKEY ,  KM_PRESS ,  0 ,  0 ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-07-09 02:45:48 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2009-03-06 15:50:15 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											km  =  WM_keymap_add_item ( keymap ,  " TFM_OT_resize " ,  SKEY ,  KM_PRESS ,  0 ,  0 ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-01-28 00:50:56 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											break ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-06-09 11:26:45 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										case  SPACE_NLA : 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											km =  WM_keymap_add_item ( keymap ,  " TFM_OT_transform " ,  GKEY ,  KM_PRESS ,  0 ,  0 ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-07-07 05:41:59 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											RNA_int_set ( km - > ptr ,  " mode " ,  TFM_TRANSLATION ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-06-09 11:26:45 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											km =  WM_keymap_add_item ( keymap ,  " TFM_OT_transform " ,  EVT_TWEAK_S ,  KM_ANY ,  0 ,  0 ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-07-07 05:41:59 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											RNA_int_set ( km - > ptr ,  " mode " ,  TFM_TRANSLATION ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-06-09 11:26:45 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											km =  WM_keymap_add_item ( keymap ,  " TFM_OT_transform " ,  EKEY ,  KM_PRESS ,  0 ,  0 ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											RNA_int_set ( km - > ptr ,  " mode " ,  TFM_TIME_EXTEND ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											km =  WM_keymap_add_item ( keymap ,  " TFM_OT_transform " ,  SKEY ,  KM_PRESS ,  0 ,  0 ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											RNA_int_set ( km - > ptr ,  " mode " ,  TFM_TIME_SCALE ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											break ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-01-02 23:58:03 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										case  SPACE_NODE : 
							 
						 
					
						
							
								
									
										
										
										
											2009-07-18 14:55:03 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											km =  WM_keymap_add_item ( keymap ,  " TFM_OT_translate " ,  GKEY ,  KM_PRESS ,  0 ,  0 ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-07-09 02:45:48 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2009-07-18 14:55:03 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											km =  WM_keymap_add_item ( keymap ,  " TFM_OT_translate " ,  EVT_TWEAK_A ,  KM_ANY ,  0 ,  0 ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											km =  WM_keymap_add_item ( keymap ,  " TFM_OT_translate " ,  EVT_TWEAK_S ,  KM_ANY ,  0 ,  0 ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-07-09 02:45:48 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2009-07-18 14:55:03 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											km  =  WM_keymap_add_item ( keymap ,  " TFM_OT_rotate " ,  RKEY ,  KM_PRESS ,  0 ,  0 ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-07-09 02:45:48 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2009-03-06 15:50:15 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											km  =  WM_keymap_add_item ( keymap ,  " TFM_OT_resize " ,  SKEY ,  KM_PRESS ,  0 ,  0 ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-01-04 01:08:01 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											break ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-01-21 07:01:20 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										case  SPACE_SEQ : 
							 
						 
					
						
							
								
									
										
										
										
											2009-07-18 14:55:03 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											km =  WM_keymap_add_item ( keymap ,  " TFM_OT_translate " ,  GKEY ,  KM_PRESS ,  0 ,  0 ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-07-09 02:45:48 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2009-07-18 14:55:03 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											km =  WM_keymap_add_item ( keymap ,  " TFM_OT_translate " ,  EVT_TWEAK_S ,  KM_ANY ,  0 ,  0 ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-07-09 02:45:48 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2009-01-24 05:38:25 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											km =  WM_keymap_add_item ( keymap ,  " TFM_OT_transform " ,  EKEY ,  KM_PRESS ,  0 ,  0 ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											RNA_int_set ( km - > ptr ,  " mode " ,  TFM_TIME_EXTEND ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-01-21 07:01:20 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											break ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-01-28 21:43:43 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										case  SPACE_IMAGE : 
							 
						 
					
						
							
								
									
										
										
										
											2009-07-18 14:55:03 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											km  =  WM_keymap_add_item ( keymap ,  " TFM_OT_translate " ,  GKEY ,  KM_PRESS ,  0 ,  0 ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-07-09 02:45:48 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2009-07-18 14:55:03 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											km =  WM_keymap_add_item ( keymap ,  " TFM_OT_translate " ,  EVT_TWEAK_S ,  KM_ANY ,  0 ,  0 ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-07-09 02:45:48 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2009-07-18 14:55:03 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											km  =  WM_keymap_add_item ( keymap ,  " TFM_OT_rotate " ,  RKEY ,  KM_PRESS ,  0 ,  0 ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-01-28 21:43:43 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2009-03-06 15:50:15 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											km  =  WM_keymap_add_item ( keymap ,  " TFM_OT_resize " ,  SKEY ,  KM_PRESS ,  0 ,  0 ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-01-28 21:43:43 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2009-10-22 23:22:05 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											km  =  WM_keymap_add_item ( keymap ,  " TFM_OT_mirror " ,  MKEY ,  KM_PRESS ,  KM_CTRL ,  0 ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2009-01-28 21:43:43 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											break ; 
							 
						 
					
						
							
								
									
										
										
										
											2008-12-29 04:14:27 +00:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
										default : 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											break ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								}  
						 
					
						
							
								
									
										
										
										
											2009-02-09 20:58:31 +00:00