Jump to content
3DCoat Forums

[REQUEST] Support for XML comment tags in Navigation Preset files.


AgentSam
 Share

Recommended Posts

  • Member

EDITING NAVIGATION PRESET FILES

I often edit the 3D-Coat "Navigation Preset"-files using a programmer's editor, because I find the existing "Setup Navigation" UI-dialog limiting and hard to use. This is the dialog I'm talking about:

33AGETy.png

One of the things I like to do, is to use "XML comments" to indicate different "sections" or "blocks" of controls. (Examples of this can be seen at the bottom of this post.)

3D-COAT XML PARSER ERROR

Here's the problem... the XML parser in 3D-Coat that reads the "Navigation Preset"-files does not understand XML comment tags.

If I try to load a "Navigation Preset" that has comments inside, 3D-Coat will throw up an "XML Error!"-dialog and stop processing the file. The error looks like this:

sNT1jcn.png

So, before I can use "Navigation Presets" containing comments in 3D-Coat, I will have to run them through a regular expression that removes all of the comments, and save the output as an uncommented "Navigation Preset" into the 3D-Coat "NavigationPresets" folder.

However, I would like to avoid stripping the comments. Normally, a well designed XML-parser would simply ignore and skip the comment tags, and continue processing the remaining tags without an error.

FEATURE REQUEST

My hope is that the XML parser in 3D-Coat would be enhanced to handle (skip) XML comment tags.

Andrew, could you please enhance the 3D-Coat XML parser so that it skips any XML comment tags that it encounters inside the "Navigation Presets" and other XML files that 3D-Coat uses.

Before anything more comprehensive can be implemented in terms of a better Custom Navigation UI-interface, this would help me so much in keeping my presets well organized internally.

ADDITIONAL PROGRAMMER'S NOTES

The structure of the "Navigation Preset" files could be further enhanced by adding proper tags for sections, which could be displayed in the 3D-Coat "Navigation Setup" UI as a treeview, allowing control definitions to be categorized by section.

Here's a draft of the proposed enhanced XML-structure, with sections. Note that this is just a draft of concept, which can be even further enhanced:

  <NaviSystem>
    <Events>

      <Section name="PANORAMA CONTROLS">
        <NaviEvent>
          ...
        </NaviEvent>
        <NaviEvent>
          ...
        </NaviEvent>
      </section>

      <Section name="VIEWPORT NAVIGATION, ROTATE">
        <NaviEvent>
          ...
        </NaviEvent>
        <NaviEvent>
          ...
        </NaviEvent>
      </section>

      <Section name="VIEWPORT NAVIGATION, ZOOM">
        <NaviEvent>
          ...
        </NaviEvent>
        <NaviEvent>
          ...
        </NaviEvent>
      </section>

      ...

    </Events>
  </NaviSystem>

EXTRA, SOME EXAMPLES OF MY USE OF COMMENTS IN XML

I added this sub-heading to my post, just to give my request some context; so that you could see why these XML comments are important to me. (And after I have demonstrated this, possibly to others also!)

Here's an example of a "Navigation Preset" inside the editor, with all sections fully collapsed. You will notice that I use the "XML comments" to indicate different blocks of control definitions. This helps me keep everything organized.

ZtIeDEY.png

Here's an example of a "Navigation Preset" inside the editor, with all sections expanded further to reveal the "hotkeys", while still keeping additional "NaviEvent" details hidden. This gives me a simple overview of what controls are defined in any section.

GppK9tq.png

Last, here's an example of a "Navigation Preset" inside the editor, with two fully expanded subsections, when I want to edit additional "NaviEvent" properties.

TSh1XVQ.png

Cheers,

AgentSam

PS. In regard to what Javis posted here: http://3dcoat.com/forum/index.php?showtopic=17192, I'm a bit confused about where to actually post FEATURE REQUESTS, because it looks like this forum section about feature requests has been about to "go away" for two years now, but it hasn't... so I guess this is the place to post in.

However, for what it's worth, I think this board might be the perfect place to post feature request even in the future, because here we can use much richer formatting with embedded images and whatnot, than we could in Mantis.

EDIT: Just fixed a typo.

Edited by AgentSam
  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...