Skip to content

Commit

Permalink
Fixed namespace cleanup bug
Browse files Browse the repository at this point in the history
* Paths were being over cleaned up when a namespace appeared. ie long names were being converted into short names, when a namespace appeared.
  • Loading branch information
SimonBenAnderson committed Dec 19, 2023
1 parent 4432601 commit 5e234fa
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions release/scripts/mgear/shifter/game_tools_fbx/fbx_batch.py
Original file line number Diff line number Diff line change
Expand Up @@ -540,8 +540,15 @@ def _count_namespaces(name):
return name.count(':')

def _trim_namespace_from_name(name):
if name.find(":") >= 0:
return name.split(":")[-1]

split_long_name = name.split("|")
for i in range(len(split_long_name)):
meta_name = split_long_name[i]
if meta_name == "":
continue
if meta_name.find(":") >= 0:
split_long_name[i] = meta_name.split(":")[-1]
name = "|".join(split_long_name)
return name

def _remove_namespace(mobj):
Expand Down Expand Up @@ -668,6 +675,8 @@ def _get_all_mesh_dag_objects():
Gets all mesh dag objects in scene.
Only returns DAG object and not the shape node.
returns list of full path names
"""
mesh_objects = []

Expand Down

0 comments on commit 5e234fa

Please sign in to comment.