implement bone renamer in importer
This commit is contained in:
parent
a7e589df38
commit
dc43cfc830
33 changed files with 2006 additions and 14 deletions
|
|
@ -199,6 +199,21 @@ Vector<StringName> NodePath::get_subnames() const {
|
|||
return Vector<StringName>();
|
||||
}
|
||||
|
||||
StringName NodePath::get_concatenated_names() const {
|
||||
ERR_FAIL_COND_V(!data, StringName());
|
||||
|
||||
if (!data->concatenated_path) {
|
||||
int pc = data->path.size();
|
||||
String concatenated;
|
||||
const StringName *sn = data->path.ptr();
|
||||
for (int i = 0; i < pc; i++) {
|
||||
concatenated += i == 0 ? sn[i].operator String() : "/" + sn[i];
|
||||
}
|
||||
data->concatenated_path = concatenated;
|
||||
}
|
||||
return data->concatenated_path;
|
||||
}
|
||||
|
||||
StringName NodePath::get_concatenated_subnames() const {
|
||||
ERR_FAIL_COND_V(!data, StringName());
|
||||
|
||||
|
|
|
|||
|
|
@ -39,6 +39,7 @@ class NodePath {
|
|||
SafeRefCount refcount;
|
||||
Vector<StringName> path;
|
||||
Vector<StringName> subpath;
|
||||
StringName concatenated_path;
|
||||
StringName concatenated_subpath;
|
||||
bool absolute;
|
||||
bool has_slashes;
|
||||
|
|
@ -59,6 +60,7 @@ public:
|
|||
StringName get_subname(int p_idx) const;
|
||||
Vector<StringName> get_names() const;
|
||||
Vector<StringName> get_subnames() const;
|
||||
StringName get_concatenated_names() const;
|
||||
StringName get_concatenated_subnames() const;
|
||||
|
||||
NodePath rel_path_to(const NodePath &p_np) const;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue