Menu

#14 tovrmlx3d strips out \'s from image paths

closed
None
2013-06-05
2013-06-04
No

tovrmlx3d strips out backslashes "\" in image paths in the resulting x3d. Maya can output vrmls with some ugly image paths ("C:/Users/Me/Documents/data/Temp/........\maya\projects\default\images\untitled-files\Default.tif") that show up in the x3d path as "C:/Users/Me/Documents/data/Temp/........mayaprojectsdefaultimagesuntitled-filesDefault.tif"

Discussion

  • Michalis Kamburelis

    In which encoding does it happen --- classic or XML (x3dv or x3d extension)? At least in classic encoding, backslashes should always be specified by writing double backslashes, as they are special "escape" characters. I think it's the same for XML encoding, although I'll have to check.

    Also, the paths are supposed to be URLs, so they should always start with file:// (and then can be followed by an absolute local path, with backslashes or slashes, depending on OS) or they should be relative (in which case they should use slashes, as this is URL).

    I can probably workaround it easily in my code (to not strip backslashes followed by unknown characters), but please submit also a bugreport to Maya, as this is Maya's bug :)

     
  • Michalis Kamburelis

    • status: open --> accepted
    • assigned_to: Michalis Kamburelis
     
  • Michalis Kamburelis

    • status: accepted --> closed
     
  • Michalis Kamburelis

    Done. The backslashes are now preserved. You can try the latest version of view3dscene/tovrmlx3d from SVN or snapshots http://michalis.ii.uni.wroc.pl/castle-engine-snapshots/ to test it immediately.

    Also, I found my own thread on x3d-public where we confirmed that backslash is special also in MFString inside X3D XML encoding: http://www.web3d.org/pipermail/x3d-public_web3d.org/2011-July/001697.html . So this is still a Maya bug, these backslashes should be escaped. Pleae submit this as bug to Maya, and feel free to refer them here.

    New view3dscene and tovrmlx3d will preserve backslashes, but print a clear warning like this:

    tovrmlx3d: X3D warning: Invalid sequence in a string: "\b". Backslash must be followed by another backslash or double quote, for SFString and MFString (in X3D classic (VRML) encoding) and for MFString (in X3D XML encoding).

    Thanks for reporting this!

     

Log in to post a comment.

MongoDB Logo MongoDB