Форум

Сообщения, созданные пользователем E21
02 марта 2017 19:59
E21
Hey! Even better!

I'm learning B4W and Blender with you, guys. I know I'm asking a few questions but as soon as I'm ok with my B4W level, I'll share it with you. You're a great team!

Thanks a lot!
02 марта 2017 13:19
E21
All right, thank you Roman!
02 марта 2017 12:16
E21
I'm trying to make a Python script in Blender that, given a number of selected objects, select objects that I want to add shadows to and adds receiving and casting shadows.

Unfortunately, it doesn't work and I don't know see what's wrong. It results in only the last selected object to be added shadow settings. What's strange is that I have a working script, similar, and export FBX for each object: here I only changed B4W related lines.

Does anyone see the error? Some help would be appreciated!


My script:

import bpy
import os

for objectN in bpy.context.selected_objects:
bpy.ops.object.select_all(action='DESELECT')
objectN.select = True
bpy.context.object.b4w_shadow_cast = True
bpy.context.object.b4w_shadow_receive = True
01 марта 2017 19:22
E21
Same thing would useful with Do Not Export…
01 марта 2017 19:16
E21
Hello,

First of all, Congrats for the new release!

I have created a lot of objects and I must add shadow to all of them. I wonder if there's a shortcut to add shadows to many object at once because when you have 10 objects, it's ok; when you have 448, it's tedious.

Any suggestions?

Thank you!
22 февраля 2017 14:09
E21
Thank you, Roman. It works fine. I thought I did that too but obviously I made a mistake.
21 февраля 2017 16:00
E21
Thank you, but somehow it's not making it for me. I'm probably making something wrong.

In the function load_cb(data_id) {} I added the whole function as: (after "// place your code here")

function load_cb(data_id) {
m_app.enable_camera_controls({
disable_default_pivot: false,
disable_letter_controls: false,
disable_zoom: false,
element: "main_canvas_container", // div container id
allow_element_exit: true
});
}

I also added m_app.enable_camera_controls({ allow_element_exit : true }) below the var m_app = require("app"); but at best I can't keep rotating the object once outside the canvas, at worst, it disables all interaction.

I would really appreciate a helpful hand.
21 февраля 2017 09:54
E21
Hello,

In the case when the canvas doesn't occupy the entier page, when you click inside the canvas and drag inside the canvas, you can interact with the 3D objects. However, as soon as the mouse is outside the canvas, the interaction stops. I think this is no very good for UX.

Is it possible to continue the interaction when the mouse is outside of the canvas? How can I do it?

BTW, B4W is really a nice piece of software, made with care. Congrats! You guys rock!
17 февраля 2017 19:45
E21
Great! I can't wait to have some time and learn that!
17 февраля 2017 11:40
E21
Hello B4W Team!

I have a 53MB scene without textures and I'm wondering if there's a way to lazy-load assets.

Loading screens are good but it would better if I could have a short loading screen to load first elements and displays to the user. The shorter the user wait, the better. Then add more details with time. Streaming.

I think you talk about it during last conference but I can't find tutorials/docs about that. Via programing or via Blender nodes. Is it possible to do that? How?