论坛

由用户创建的信息 PeterK
18 June 2017 07:29
Yes, now thats clear to me. I am trying to build an automated and repeatable first step with the help of a script. I was faced with this behavior in a workshop, not knowing this side effect. Now it is obvious, but why should it not be possible to delete parts of a complex scene automatically?

Peter
17 June 2017 19:52
When I create a new project, a blend file is created with the
Blend4web-Cube. Also available in the material slot are tree
Materials:

- logo
- Material
- shadow_plane

With a script all objects and materials should be deleted, but this
script is not working as expected.

Attached is a minimal script.

You can reproduce the strange behavior as follows:

1. create a new project
2. switch to the scripting-layout and/or text editor
3. load and run the script

It looks like the result is an empty scene, but you will get errors if
you start the preview. I have found two workarounds, but I am not
satisfied with both solutions:

1. The only way to circumvent all errors and crashes is to select all
Objects manually and delete all selected objects. Afterward the script
is working as expected.

2. Create a new blend file and overwrite the generated one in the
project folder.


It looks like it is not possible to remove the node materials in the blend file with a script.

Does anyone know a better solution to get rid of all materials (shadow_plan, logo) and
objects from the standard blend file and start with an empty scene with the help of an script?

Peter
01 November 2016 16:24
Thanks for the answer, by the way, your team is doing a great job! Until the feature is implemented I have to learn many other things about blender and blend4web, so I can wait …
01 November 2016 15:04
Hi,

I try to drop down a cube with the physics properties. With random numbers, a rotation should happen before the cube is falling down. I first tried the node editor, but no luck so far.
What is the missing part or is it only possible with JavaScript?