Page 1 of 1
set an object as model base programmatically
Posted: 08 Mar 2024, 20:16
by maf
Is there an API call to flag an object as "model"? (implying this object is the model base)
I searched for long time but could not find it. There is an argument sim.modelproperty_not_model to _remove_ the model tag, but not to add it!?! (see sim.setModelProperty)
Thanks.
Re: set an object as model base programmatically
Posted: 11 Mar 2024, 09:43
by fferri
Hi,
you can set an object as model by removing the
sim.modelproperty_not_model
bit,
e.g.:
Code: Select all
modelProp = sim.getModelProperty(objectHandle)
modelProp = modelProp & ~sim.modelproperty_not_model
sim.setModelProperty(objectHandle, modelProp)
or you can compose (with bitwise "or", e.g.
sim.modelproperty_value1 | sim.modelproperty_value2
) the model property value from individual
sim.modelproperty_*
bits (it would be
0
if none of the bits is specified, i.e. a model with all features enabled).
Re: set an object as model base programmatically
Posted: 11 Mar 2024, 11:50
by maf
Hi, thanks for your reply.
Sorry, after long hours I must have missed it is just a bit mask... :)