Forum

Texture Change - Can I get and set a Texture inside a group?

17 December 2019 10:42
Hello folks and blend4web team,

i want to make a texture, wich is used multiple times, so i want to insert it into a group, so i can count it in the DOM/console as one texture!

As far as i know, i can change or replace images via this script:

m_tex.replace_image(m_scs.get_object_by_name("OBJECT"), "TEXTURE", target);

My question is, can i do it also within a group for example like(it doesnt work, just for showing my idea):

m_tex.replace_image(m_scs.get_object_by_name("A_Compair"), "GROUP", "tex_compair_col", target);

Here is the Group:
2019-12-17 08_40_36-Blender_ [F__002_blend4web_pro_projects_eMotion_Online_blender_eMotion_Online.bl.png
And here the content:
2019-12-17 08_40_51-Blender_ [F__002_blend4web_pro_projects_eMotion_Online_blender_eMotion_Online.bl.png

Does anybody have an idea?

Kind regards,
Bani
Bani
17 December 2019 10:43
m_tex.replace_image(m_scs.get_object_by_name("OBJECT"), "TEXTURE", target);

My question is, can i do it also within a group for example like(it doesnt work, just for showing my idea):

m_tex.replace_image(m_scs.get_object_by_name("A_Compair"), "GROUP", "tex_compair_col", target);

Does anybody have an idea?

Kind regards,
Bani
Bani
 
Please register or log in to leave a reply.