Forum

Programmatic creation and manipulation of anchors

03 December 2016 12:52
Hi,

It seems like I'm always asking for the same thing: that is, the means to *programmatically* create and subsequently manipulate/change/interact with the different types of objects and capabilities that the Blend4Web framework provides.

As an example, Blend4Web's anchor functionality and accompanying JavaScript module (https://www.blend4web.com/api_doc/module-anchors.html), although excellent, seems to be too dependent on "doing it" in Blender. That is, this kind of functionality (e.g., the creation of anchors, setting anchor properties including its position in 3D space, text, style, etcetera) should all be available by means of the API. I know that some of these issues can be mitigated by using the "Custom Element" anchor type. Nonetheless, I have to manually create the empty in Blender and enable the anchor, etc.

I know I am asking for a lot :) But, at this stage it would be nice to know if the Blend4Web team agrees with this sentiment and if there are plans to go in this direction: that is, to enable access to as much as possible functionality directly from the API instead of having to "set things" from within Blender.

By the way… although, I am always asking for more I just want to say thank you for developing the Blend4Web framework and making it available (as open source and with different types of licenses). It's an outstanding piece of software.

Best regards,

Brett
03 December 2016 19:23
Hi,

I've just seen in the source code for custom anchors (https://www.blend4web.com/apps/code_snippets/code_snippets.html?scene=custom_anchors_main) that it is possible to programmatically create or replace *generic* anchors in "run-time". Nonetheless, it seems like it is still necessary to create, name, and enable the empty as well as setting its type to generic in Blender in "design-time". I will look into this and report back with my findings :)

Brett
06 December 2016 14:22
Hopefully we'll find time to work on this in the future. Thanks for the feedback!
The Founder | Twitter | Facebook | Linkedin
11 December 2016 12:06
You're welcome, Yuri :)
 
Please register or log in to leave a reply.