Skip to content

Maya: Incorrect string parsing on nodes containing "xfo" #70

@ndegruyter

Description

@ndegruyter

I'm encountering an issue with the removeXfoSuffix function within CommonImport. When processing nodes containing the string "xfo", it will strip the first occurrence of the string, as opposed to the suffix occurrence.

expected behaviour:
example_asset:lt_xformfrozen_node1xfo > example_asset:lt_xformfrozen_node1
example_asset:lt_xformfrozen_node2xfo > example_asset:lt_xformfrozen_node2
example_asset:lt_xformfrozen_node3xfo > example_asset:lt_xformfrozen_node3

What I'm getting:
example_asset:lt_xformfrozen_node1xfo > example_asset:lt_
example_asset:lt_xformfrozen_node2xfo > example_asset:lt_
example_asset:lt_xformfrozen_node3xfo > example_asset:lt_

which is resulting in the following error on import (as well as a full halt of the import operation):
# Warning: Alembic: Warning: duplicate node name. Cannot add "standardbiped1:lt_" to map. #

My c++ is fairly rusty, but can anyone suggest a fix for this method so it replaces the final occurrence of "xfo" in a node name, as opposed to the first occurrence it encounters? It's fairly easy to move forward simply avoiding node names that contain the string "xfo", but it would be great to avoid placing gotcha usage restrictions on users like this.

  • Using current master build
  • In Maya 2016

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions