Forum

User posts mephius
03 February 2016 12:52
Currently, I decided to temporarily use internal API (approach is not changes-aware, I know):

var m_obj_utils_i = b4w.require("__obj_util");
var m_anchors_i = b4w.require("__anchors");
var m_cons_i = b4w.require("__constraints");

var info = m_obj_utils_i.create_object("info", "EMPTY", "");
    info.anchor = {
        type: "ANNOTATION",
        detect_visibility: false,
        element_id: null,
        max_width: 250
    };
info.render = m_obj_utils_i.create_render("EMPTY");
m_anchors_i.append(info);
03 February 2016 09:34
As far as I see, there's no API to neither copy or create an anchor programmatically.
Creating a pool of EMPTY objects and re-using 'em would probably work, but I just wonder if there's at least theoretical possibility to create and dispose anchors via javascript?
26 October 2015 18:15
Hi!

My scene is supposed to be using a variety of different vehicles for further instancing.
From scripting perspective the only way to achieve this behavior is to copy a vehicle part by part and reassemble it. Is it correct? Is there a better way to do this?

Is there a way to copy objects hierarchy keeping everything as it was in original object hierarchy (constraints for example)?

Thanks!