Sharing and importing work

Sharing and importing work

The sharing function in RIM-Nat allows users to generate a work state code that enables other users to import a copy of the user’s work into their own workspace, facilitating the sharing and aggregation of work among users.

Generating a Work State Code

To share the content of the scene’s active branch, use the Share option in the main menu.

Share Menu

This option opens a window that generates a unique work state code for the active branch.

Share Window

⚠️
One branch = one code. The code provides access to the latest save of the current work branch. It corresponds to the state of the branch at the time the code is imported, not when it is generated. If a code is shared, and then actions are saved again in the same branch, these will be accessible to users who import the code afterward.
⚠️
Changes made to the branch associated with the code after another user imports it will not be accessible to them, unless they re-import the code.

Using the Work State Code

The generated work state code can be shared with other RIM-Nat users, who can then use it to import the shared version into their own project.

To import the content associated with a work state code, use the Import option in the main menu.

Import Menu

This option opens a window where you can enter the work state code.

Import Window

Example of a Sharing Workflow

Here is an example of a collaborative workflow using the work state sharing function:

  1. User A accesses the project: they arrive at a scene containing the objects from the shared scene.
  2. User A performs actions and saves them (actions A1 and A2 in the diagram below).
  3. User B accesses the project: they arrive at a scene containing the objects from the shared scene.
  4. User B performs actions and saves them (actions B1 and B2).
  5. User A generates a share code and shares it with User B.
  6. User B imports the code. The content from A2 is added to their personal work: A2 + B2.
  7. User A performs more actions and saves them (A3 and A4).
  8. A new user C imports the code: they obtain the content from A4, which is added to their personal work: A4 + C1.
%%{
   init: { 
      'logLevel': 'debug', 
      'theme': 'base', 
      'gitGraph': {
         'showBranches': true, 
         'showCommitLabel': false,
         'mainBranchName': 'Shared-Scene'
      },
      'themeVariables': {
         'gitInv0': '#ff0000'
      }
   }
}%%

gitGraph
  checkout Shared-Scene
  commit id:"." tag:"Project Access"

  branch User-A
  branch User-B
  branch User-C

  checkout User-A
  commit tag:"A1"
  commit tag:"A2"

  checkout User-B
  commit tag:"B1"
  commit tag:"B2"

  checkout User-B
  merge User-A tag: "B2 + A2" type: HIGHLIGHT
  commit tag:"B3"

  checkout User-A
  commit tag:"A3"
  commit tag:"A4"

  checkout User-C
  commit tag:"C1"
  merge User-A tag: "C1 + A4" type: HIGHLIGHT

  checkout User-A
  commit tag:"A5"

Merging Personal Work

The sharing function not only allows for merging the work of different users, but it also allows a single user to merge the content of personal branches.

  1. The user performs actions and saves them in Branch A (actions A1 and A2).
  2. The user saves under a new Branch B.
  3. The user performs actions and saves them (actions B1 and B2).
  4. The user generates a share code from Branch B.
  5. The user returns to Branch A and imports this code: they obtain the cumulative content of Branches A and B.
%%{
   init: { 
      'logLevel': 'debug', 
      'theme': 'base', 
      'gitGraph': {
         'showBranches': true, 
         'showCommitLabel': false,
         'mainBranchName': 'Branch-A'
      },
      'themeVariables': {
         'gitInv0': '#ff0000'
      }
   }
}%%

gitGraph
  commit tag:"A1" 
  commit tag:"A2" 

  branch Branch-B
  commit tag:"B1"
  commit tag:"B2"

  checkout Branch-A
  merge Branch-B tag:"A2 + B2" type: HIGHLIGHT

Merging Work from Multiple Users

The sharing function enables users to combine their individual work.
By combining this function with the shared scene feature, a collaborative workflow can be created where each user works in their own branch, with an administrator who merges all users’ work into a personal branch, validates it, and then updates the scene shared with all users.

In this example, User A is the project administrator.

  1. User A works in their own branch and performs actions which they save (actions A1 and A2).
  2. User B works in their own branch and performs actions which they save (actions B1 and B2).
  3. User C works in their own branch and performs actions which they save (actions C1 and C2).
  4. Users B and C generate share codes and give them to User A.
  5. User A imports these codes and thus obtains the cumulative work A2 + B2 + C2.
  6. User A validates the final scene content and updates the shared scene.
%%{
   init: { 
      'logLevel': 'debug', 
      'theme': 'base', 
      'gitGraph': {
         'showBranches': true, 
         'showCommitLabel': false,
         'mainBranchName': 'Shared-Scene'
      },
      'themeVariables': {
         'gitInv0': '#ff0000'
      }
   }
}%%

gitGraph
  checkout Shared-Scene
  commit id:"." tag:"Project Creation"

  branch User-A
  branch User-B
  branch User-C

  checkout User-A
  commit tag:"A1"
  commit tag:"A2"

  checkout User-B
  commit tag:"B1"
  commit tag:"B2"

  checkout User-C
  commit tag:"C1"
  commit tag:"C2"

  checkout User-A
  merge User-B tag:"Import B" type: HIGHLIGHT
  merge User-C tag:"Import C" type: HIGHLIGHT

  checkout Shared-Scene
  merge User-A tag:"Shared Scene Update" type: HIGHLIGHT
Last updated on by Loïc Roybon