网淘巴来吧,欢迎您!

返回首页 微信
微信
手机版
手机版

Visible don’t reset after reset the simulation(重置仿真器,可视并没有重置)

2022-08-08 新闻来源:网淘巴 围观:5970
''

hi,bro.i have a question for visible. I wrote a python program to make blocks invisible.But after reset the simulation, their properties do not become visible, they remain invisible.How to make them visible after reset?

嗨,兄弟。我有一个关于可见的问题。我写了一个python程序使块不可见。但是重置模拟之后,它们的属性不变为可见时,他们仍然看不见。如何使它们在重置后可见?

 

You can call the function ‘OnReset’你可以调用OnReset函数
image

 

 

image

so,How do I make them invisible together那么,我怎么让他们一起隐形呢?

 

 

Hey jiangleng,

You could make a “master” script inside another component. Go to modelling tab and create a new component.

你可以在另一个组件中创建一个“主”脚本。转到建模选项卡并创建一个新组件。
image

Next give the component a property called “Simulation node list”

接下来,为组件提供一个名为“模拟节点列表”的属性

image

Click on the newly created property and start adding those components to the list.

单击新创建的属性并开始将这些组件添加到列表中。

image
image

Now you have those components within a list. Next we can create a Python script to the “new component” and loop through the list.

Then we can use boom’s code to do the same thing.

现在,列表中有了这些组件。接下来,我们可以为“新组件”创建一个Python脚本,并循环遍历该列表。

我们可以用boom的代码来做同样的事

image
This code snippet is inside the “new component”此代码片段位于“新组件”中。

 

image

 

免责申明
部分文章来自各大搜索引擎,如有侵权,请与我联系删除。
打赏

相关文章

遇到问题?请给我们留言

请填写您的电话号码,我们将回复您电话

欢迎
光临