Interesting - so there is a good use for it. Personally I hate it when imported or referenced models don't have unique names, but I guess it depends on your pipeline and type of work :)
Thanks for the script - it will come in handy! MB > Den 14. juni 2018 klokken 12:12 skrev Enrique Caballero > <[email protected]>: > > > Namespaces are annoying. > > When building assets, what I do to deal with them is I bind a hotkey to > collapse all namespaces, as sometimes when you are building an asset, you > are drag and dropping several other assets into the scene and > frankensteining them together. You then end up with a huge nested tree of > namespaces that just takes forever to delete one at a time in the namespace > editor. I will share my script for collapsing namespaces at the end of > this email. > > As annoying as they are, you can disable viewing namespaces in most > editors, and I recommend that you use them for your referenced assets, > otherwise you will end up with name clashing on the scene Root. > > For example, the root object of all of our rigs is named "ROOT_NUL" > > If we didnt use namespaces, each one of those would get a number appended > to them once imported. Not the end of the world, but I don't want my > referenced assets to go around changing their naming randomly. > > yes we could use more unique names for our ROOT_NULS, like putting the > asset name in there, but I rather just let the namespace handle that, and > keep all of our assets and rigs standardised. > > > > > script for collapsing namespaces follows: > > > """ > > Collapses all namespaces (including nested) to root. > > """ > > > # Recursively collect all namespaces. > > def get_all_namespaces(iter_nsp=[":"]): > > for nsp in iter_nsp: > > yield nsp > > all_nested_nsp = cmds.namespaceInfo(nsp, listOnlyNamespaces=True) or [] > > for nested_nsp in get_all_namespaces(iter_nsp=all_nested_nsp): > > yield nested_nsp > > default_namespaces = [":", "UI", "shared"] > > > scene_namespaces = list(get_all_namespaces()) > > > for nsp in reversed(scene_namespaces): > > > if nsp in default_namespaces: > > continue > > print "Removing namespace {}".format(nsp) > > cmds.namespace(removeNamespace=nsp, mergeNamespaceWithRoot=True) > > > > > > > > > > > On Thu, Jun 14, 2018 at 4:47 PM, Stefan Kubicek <[email protected]> > wrote: > > > Everybody hates Namespaces, but you don't necessarily need to use them. > > First of all: Maya is more permissive with regards to duplicate names since > > it only demands an objects “Full Name” (i.e. the name of the object > > prepended by all it's parent's names) to be unique in a scene. In > > Softimage, an objects name needs to be unique within it's Model, > > irrespective of it's location in the hierarchy under that model, which is > > of course a more deterministic way of identifying objects with regards to > > file referencing, the animation mixer, etc, but that's not the point here. > > > > In Maya, just like in 3dsMax or Softimage (or any other 3d package I > > think), you get automatic numbering of objects in case of a name clash > > (i.e. when the full name of the new object is similar). That usually occurs > > when creating or duplicating an object or node, importing or referencing a > > file, or rearranging objects in a hierarchy. The closest thing to the > > Softimage Model paradigm in Maya you can get is to use groups. For example, > > instead of maintaining your character rig and meshes under a model in Soft, > > you do the same under a group in Maya. There is even an option to > > automatically group objects on import, which is what I usually do, and/or > > to rename (i.e. number) clashing names on import, which is less tidy but > > also helpful sometimes. That's it. > > > > Stefan > > > > PS: I still hope to find out the address of that moron at Alias one fine > > day who decided that namespaces are a clever way to handle scene complexity. > > > > On 14.06.2018 09:56, Morten Bartholdy wrote: > > > > I am sure I am not the only one finding Mayas namespaces extremely > > annoying. > > > > If I do a search on Maya namespaces, numerous hits explain how namespaces > > are annoying and how to handle them and/or get rid of them via built-in > > tools, scripts, or other methods – one of these even come from an Autodesk > > Technical Specialist: > > https://u7507473.ct.sendgrid.net/wf/click?upn=5SmYwFIJXHmC5X9wAP0G6ui9ndn-2BrPckKmQuMExySxAF7AEEWRZo1kjS9DxWL-2B7-2B_a6oQc7tnfcb0GKvoO27fPkrQ0ATQyF1SDBXJOg7-2FbuSFQA3BANXOcg1Ajy-2F9rZ0Mlq3UqL281AuNcW-2Bdp2wFN-2FdZrRRLj3Pc77Dxh3HxNdpsXYcUBChAulwxHCmn22zVFxpUGwJXMTnSO5uOqwUVmbwsv35goYhbv9uFH72tt-2Fwu2aHpDJ7MUzMSh-2F6OTVoAnCf9yETf-2B3xuPg6iFMOD4RBr1N7vX-2FvssM9ylNQgzCs-3D > > blogs/the-maya-blog/maya_2012_namespace_and_prefix_tips_and_tricks/ > > <https://u7507473.ct.sendgrid.net/wf/click?upn=5SmYwFIJXHmC5X9wAP0G6mg4oLGBuQENbeDkYXezg3m6vjHxJcC6rUMd8QE2MtqzS3nHFJpHH1mihN2vNWVF73yH4QzPTUaj-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xEnVJ1b_a6oQc7tnfcb0GKvoO27fPkrQ0ATQyF1SDBXJOg7-2FbuSFQA3BANXOcg1Ajy-2F9rZ0Mlq3UqL281AuNcW-2Bdp2wFNy75XbYQ7O3HODC0sxAK-2BZTU-2B0zs0hkvtwP28N4Vh8mcRO4nTMr6SVPfB8FRxyjMV8I-2BS7KYanQfLCcZtIr9WCyuUDJBS0TKG-2Fm7YqMZxjYqJ7F21vlpMdAAcWM1AjvSwlr1w1OX4xmT2ldAxE6sgBI-3D>> > > so even Autodesk knows how annoying this is… these guys are inane. > > > > I get why there has to be a nameclash handling mechanism but find the > > straightforward method of incremental numbering in XSI as hassle free as > > possible, so I was wondering if anyone knows if there are any benefits at > > all with the Maya namespace method or if it has to do with Maya data > > handling why they haven't used the more straightforward incremental > > numbering which seems to be working in Maya anyway!? > > > > Thanks Morten ------ Softimage Mailing List. To unsubscribe, send a mail > > to [email protected] with “unsubscribe” in the > > subject, and reply to confirm. > > > > ------ Softimage Mailing List. To unsubscribe, send a mail to > > [email protected] with “unsubscribe” in the > > subject, and reply to confirm. > > ------ Softimage Mailing List. To unsubscribe, send a mail to [email protected] with "unsubscribe" in the subject, and reply to confirm.

