Skip to content

Commit

Permalink
srcpy: update binding generation for deprecation and changes in pygcc…
Browse files Browse the repository at this point in the history
…xml and pyplusplus libraries.
  • Loading branch information
Sandern committed Sep 23, 2017
1 parent eb90f2a commit ca7d5e0
Show file tree
Hide file tree
Showing 24 changed files with 1,306 additions and 1,284 deletions.
16 changes: 8 additions & 8 deletions mp/src/game/client/python/modules/_input.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,26 +22,26 @@ def Parse(self, mb):

mb.class_('kbutton_t').include()
if self.settings.branch == 'swarm':
mb.class_('kbutton_t').mem_funs('GetPerUser').exclude()
mb.class_('kbutton_t').member_functions('GetPerUser').exclude()

# Include input class
cls = mb.class_('CInput')
cls.include()
cls.mem_funs().virtuality = 'not virtual'
cls.member_functions().virtuality = 'not virtual'
if self.settings.branch == 'swarm':
#mb.mem_funs('FindKey').exclude() # FIXME
mb.mem_funs('FindKey').call_policies = call_policies.return_value_policy( call_policies.reference_existing_object )
#mb.member_functions('FindKey').exclude() # FIXME
mb.member_functions('FindKey').call_policies = call_policies.return_value_policy( call_policies.reference_existing_object )
else:
mb.mem_funs('FindKey').call_policies = call_policies.return_value_policy( call_policies.manage_new_object )
mb.mem_funs('GetUserCmd').call_policies = call_policies.return_value_policy( call_policies.reference_existing_object ) # Can't exclude due being abstract
mb.member_functions('FindKey').call_policies = call_policies.return_value_policy( call_policies.manage_new_object )
mb.member_functions('GetUserCmd').call_policies = call_policies.return_value_policy( call_policies.reference_existing_object ) # Can't exclude due being abstract

mb.mem_funs( 'CAM_OrthographicSize' ).add_transformation( FT.output('w'), FT.output('h') )
mb.member_functions( 'CAM_OrthographicSize' ).add_transformation( FT.output('w'), FT.output('h') )

mb.add_declaration_code( "CInput *wrap_Input()\r\n{\r\n\treturn (CInput *)::input;\r\n}\r\n" )
mb.add_registration_code( 'bp::def( "input", wrap_Input, bp::return_value_policy<bp::reference_existing_object>() );' )

# ButtonCode.
mb.enums('ButtonCode_t').include()
mb.enumerations('ButtonCode_t').include()

# Remove any protected function
mb.calldefs( matchers.access_type_matcher_t( 'protected' ) ).exclude()
174 changes: 87 additions & 87 deletions mp/src/game/client/python/modules/_vgui.py

Large diffs are not rendered by default.

536 changes: 268 additions & 268 deletions mp/src/game/client/python/modules/_vguicontrols.py

Large diffs are not rendered by default.

86 changes: 43 additions & 43 deletions mp/src/game/shared/python/modules/_animation.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,59 +28,59 @@ def Parse(self, mb):
cls.include()
cls.calldefs('CStudioHdr').exclude()
#cls.no_init = True
cls.mem_funs('pszName').rename('name')
cls.member_functions('pszName').rename('name')

cls.mem_fun('pSeqdesc').call_policies = call_policies.return_value_policy(call_policies.reference_existing_object)
cls.mem_fun('pSeqdesc').rename('Seqdesc')
cls.member_function('pSeqdesc').call_policies = call_policies.return_value_policy(call_policies.reference_existing_object)
cls.member_function('pSeqdesc').rename('Seqdesc')

# Excludes
cls.mem_fun('Init').exclude()
cls.member_function('Init').exclude()
if self.settings.branch == 'swarm':
cls.mem_fun('FindMapping').exclude()
cls.mem_fun('GetSequences').exclude()
cls.mem_fun('BoneFlexDriver').exclude()
cls.mem_fun('GetBoneTableSortedByName').exclude()
cls.mem_fun('GetRenderHdr').exclude()
cls.mem_fun('GetVirtualModel').exclude()
cls.mem_fun('pAnimStudioHdr').exclude()
cls.mem_fun('pAnimdesc').exclude()
cls.mem_fun('pBodypart').exclude()
cls.mem_fun('pBone').exclude()
cls.mem_fun('pBonecontroller').exclude()
cls.mem_fun('pFlexRule').exclude()
cls.mem_fun('pFlexcontroller').exclude()
cls.mem_fun('pFlexcontrollerUI').exclude()
cls.mem_fun('pFlexdesc').exclude()
cls.mem_fun('pHitbox').exclude()
cls.mem_fun('pHitboxSet').exclude()
cls.mem_fun('pIKChain').exclude()
cls.mem_fun('pLinearBones').exclude()
cls.mem_fun('pSeqStudioHdr').exclude()
#cls.mem_fun('pSeqdesc').exclude()
cls.mem_fun('pszNodeName').exclude()
cls.mem_fun('pszSurfaceProp').exclude()
cls.mem_fun('SetSequenceActivity').exclude() # Declared, but no def
cls.mem_fun('IsSequenceLooping').exclude() # Declared, but no def
cls.mem_fun('GetSequenceCycleRate').exclude() # Declared, but no def
cls.mem_fun('GetSequenceActivity').exclude() # Declared, but no def
cls.member_function('FindMapping').exclude()
cls.member_function('GetSequences').exclude()
cls.member_function('BoneFlexDriver').exclude()
cls.member_function('GetBoneTableSortedByName').exclude()
cls.member_function('GetRenderHdr').exclude()
cls.member_function('GetVirtualModel').exclude()
cls.member_function('pAnimStudioHdr').exclude()
cls.member_function('pAnimdesc').exclude()
cls.member_function('pBodypart').exclude()
cls.member_function('pBone').exclude()
cls.member_function('pBonecontroller').exclude()
cls.member_function('pFlexRule').exclude()
cls.member_function('pFlexcontroller').exclude()
cls.member_function('pFlexcontrollerUI').exclude()
cls.member_function('pFlexdesc').exclude()
cls.member_function('pHitbox').exclude()
cls.member_function('pHitboxSet').exclude()
cls.member_function('pIKChain').exclude()
cls.member_function('pLinearBones').exclude()
cls.member_function('pSeqStudioHdr').exclude()
#cls.member_function('pSeqdesc').exclude()
cls.member_function('pszNodeName').exclude()
cls.member_function('pszSurfaceProp').exclude()
cls.member_function('SetSequenceActivity').exclude() # Declared, but no def
cls.member_function('IsSequenceLooping').exclude() # Declared, but no def
cls.member_function('GetSequenceCycleRate').exclude() # Declared, but no def
cls.member_function('GetSequenceActivity').exclude() # Declared, but no def

# mstudioseqdesc_t
cls = mb.class_('mstudioseqdesc_t')
cls.include()
cls.no_init = True

# Excludes
cls.mem_fun('GetBaseMap').exclude()
cls.var('m_DataMap').exclude()
cls.mem_fun('pActivityModifier').exclude()
cls.mem_fun('pAutolayer').exclude()
cls.mem_fun('pBoneweight').exclude()
cls.mem_fun('pEvent').exclude()
cls.mem_fun('pIKLock').exclude()
cls.mem_fun('pPoseKey').exclude()
cls.mem_fun('pStudiohdr').exclude()
cls.mem_fun('pszActivityName').exclude()
cls.mem_fun('pszLabel').exclude()
cls.member_function('GetBaseMap').exclude()
cls.variable('m_DataMap').exclude()
cls.member_function('pActivityModifier').exclude()
cls.member_function('pAutolayer').exclude()
cls.member_function('pBoneweight').exclude()
cls.member_function('pEvent').exclude()
cls.member_function('pIKLock').exclude()
cls.member_function('pPoseKey').exclude()
cls.member_function('pStudiohdr').exclude()
cls.member_function('pszActivityName').exclude()
cls.member_function('pszLabel').exclude()

mb.free_function('Py_GetSeqdescActivityName').include()
mb.free_function('Py_GetSeqdescActivityName').rename('GetSeqdescActivityName')
Expand Down Expand Up @@ -119,4 +119,4 @@ def Parse(self, mb):
mb.free_function('VerifySequenceIndex').include()

# Enums
mb.enum('Animevent').include()
mb.enumeration('Animevent').include()
Loading

0 comments on commit ca7d5e0

Please sign in to comment.