sketchucation logo sketchucation
    • Login
    🤑 SketchPlus 1.3 | 44 Tools for $15 until June 20th Buy Now

    Unlimited hierarchies for components and scenes (2)

    Scheduled Pinned Locked Moved Developers' Forum
    1 Posts 1 Posters 265 Views 1 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • chrisglasierC Offline
      chrisglasier
      last edited by

      Part 1

      DEVICES

      Devices can be made by anyone just like ruby plug-ins for Sketchup. There are few rules:

      Add name as an option to an existing menu prompt - e.g. Nset > Edit - or create new menu prompt and option - e.g. Animation > Create

      Code in Javascript and save the file using prompt + option - e.g. nsetEdit.js, animationCreate.js.

      Incorporate the functions described below.

      Use the config global variable but delete any members introduced for the device.

      The required functions are:

      dev05.gif

      This is called by the device initiator in the machine code to display the main list in the device prompt slider.

      dev07.gif

      This is called from a common function on selection of a prompt.

      dev08.gif

      This is called from a core function on selection of an option.

      dev15.gif

      This is called from the machine to clean up config file.

      See FILES for an explanation of the file structure.

      DEVICES FOR TEST

      ns86.gif

      Machine devices enable manipulation of names that belong to its owner, at this stage adding and deleting either private or sharable named links.

      ns84.gif

      Nset devices are similar but for use within in a sharable nameset. Additional options include specifying a Type.

      View devices now only include the ability to toggle visibility on and off.

      Currently all new names are via user input but later a set of functions will use the Type and other key/value pairs to store unique input and offer pertinent lists from which to select.

      FILES
      dev12.gif

      nameset.rb is called from its launcher in the plug_in folder. It needs to be activated from Preferences > Extensions > Nameset. For this test it handles only the webdialog and callbacks for retrieving and saving text and swapping sharable nsets.

      zExample_x.json are text files in JavaScript Object Notation holding nset data for projects. Only zExample_2 has been extended beyond the automaticaaly added NSET and VIEW nodes.

      nset.json holds both the machine owners private links and the current sharable nset (in this case, zExample_2)

      mset.json holds the machine owner's menu of selected device groups and devices.

      config.json holds the nametrail (which determines the names' animation) and a few other essential variables.

      viewEdit, nsetCreate and machineSetup are device files.

      ruby.js handles the callbacks and scripts that retrieve and save data including swapping sharable nsets.

      machine.js controls the display and devices.

      json2.json was downloaded from http://www.JSON.org

      core.js contains many common functions that are used by machine and devices

      nameset.css and nameset.html are pretty standard except for this div that enables devices to be swapped

      dev13.gif

      by this:

      dev14.gif

      PLANNED

      Mac compatibilty
      Importing layer, component and scene names
      Importing scene properties
      Copying and other nset and view editing tools
      Resizing and column options
      Model/machine interaction
      Nset record output
      Unique word store
      Shortcuts
      Machine configuration and preferences
      Standalone application

      If you find this interesting please download and try out the plugin and post any comments in this topic. Please note the idea is to test building hierarchies in the interface - interaction with models has been removed in order to progress step by step.

      Thanks

      Thanks


      Extract into plugins; check nameset extension

      With TBA interfaces we can analyse what is to be achieved so that IT can help with automation to achieve it.

      1 Reply Last reply Reply Quote 0
      • 1 / 1
      • First post
        Last post
      Buy SketchPlus
      Buy SUbD
      Buy WrapR
      Buy eBook
      Buy Modelur
      Buy Vertex Tools
      Buy SketchCuisine
      Buy FormFonts

      Advertisement