File tree Expand file tree Collapse file tree
data/source-python/entities
packages/source-python/entities Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11[virtual_function]
22
3+ # _ZN11CBaseEntity8SetModelEPKc
4+ [[set_model]]
5+ offset_linux = 27
6+ offset_windows = 26
7+ arguments = STRING
8+
39 # _ZN11CBaseEntity9SetParentEPS_i
410 [[set_parent]]
511 offset_linux = 38
Original file line number Diff line number Diff line change @@ -3,6 +3,12 @@ srv_check = False
33
44[virtual_function]
55
6+ # _ZN11CBaseEntity8SetModelEPKc
7+ [[set_model]]
8+ offset_linux = 28
9+ offset_windows = 27
10+ arguments = STRING
11+
612 # _ZN11CBaseEntity9SetParentEPS_i
713 [[set_parent]]
814 offset_linux = 40
Original file line number Diff line number Diff line change 11[virtual_function]
22
3+ # _ZN11CBaseEntity8SetModelEPKc
4+ [[set_model]]
5+ offset_linux = 25
6+ offset_windows = 24
7+ arguments = STRING
8+
39 # _ZN11CBaseEntity9SetParentEPS_i
410 [[set_parent]]
511 offset_linux = 35
Original file line number Diff line number Diff line change 11[virtual_function]
22
3+ # _ZN11CBaseEntity8SetModelEPKc
4+ [[set_model]]
5+ offset_linux = 28
6+ offset_windows = 27
7+ arguments = STRING
8+
39 # _ZN11CBaseEntity9SetParentEPS_i
410 [[set_parent]]
511 offset_linux = 38
Original file line number Diff line number Diff line change 11[virtual_function]
22
3+ # _ZN11CBaseEntity8SetModelEPKc
4+ [[set_model]]
5+ offset_linux = 25
6+ offset_windows = 24
7+ arguments = STRING
8+
39 # _ZN11CBaseEntity9SetParentEPS_i
410 [[set_parent]]
511 offset_linux = 35
Original file line number Diff line number Diff line change @@ -425,17 +425,21 @@ def get_model(self):
425425
426426 return Model (model_name )
427427
428+ @wrap_entity_mem_func
428429 def set_model (self , model ):
429430 """Set the entity's model to the given model.
430431
431- :param Model model:
432- The model to set.
432+ :param str/ Model model:
433+ The model path or model to set.
433434 """
434- self .model_index = model .index
435- self .model_name = model .path
435+ if isinstance (model , Model ):
436+ model = model .path
437+
438+ return [model ]
436439
437440 model = property (
438- get_model , set_model ,
441+ get_model ,
442+ lambda self , model : self .set_model (model ),
439443 doc = """Property to get/set the entity's model.
440444
441445 .. seealso:: :meth:`get_model` and :meth:`set_model`""" )
You can’t perform that action at this time.
0 commit comments