We've added an environment variable that will automatically connect your Asset Browser database upon the launch of Cinema 4D, Team Render, and the Command Line.
The environment variable is:
g_connectdatabase=<path>
You can add the variable in a few places:
- Config.txt file (Mac and Windows)
- Environment Variables (Windows Only)
environment variables cannot officially be used under macOS for security reasons - Target line of a shortcut (Windows Only)
I've included explanations below on how to set this up for each option as well as set up for multiple databases.
1. Environment Variables:
To create or modify environment variables on Windows 10:
-
-
On the Windows taskbar, right-click the Windows icon and select Settings.
-
In the Settings window, search and select "Edit the system environment variables."
-
This will open the System Properties window. Choose the Advanced Tab in the System Properties window and click the Environment Variables button.
-
Click New under System Variables and enter g_connectdatabase to the "Variable name" line item and your database's path under the "Variable value" line item.
- After creating the environment variable, click OK on the "New System Variable" window and click OK on the "Environment Variables" window for the change to take effect.
-
After completion, when you launch Cinema 4D, Team Render Client, or the Command Line, the Asset Browser database you've created will be automatically connected.
2. The Config.txt file:
- Navigate to your Maxon Cinema 4D * > resource folder. (* represents the version number)
Windows: Program Files > Maxon Cinema 4D * > resource
Mac: Applications > Maxon Cinema 4D * > resource - Open the config.txt (not the config.c4dpy.txt) with Notepad (Windows), TextEdit (Mac), or your preferred plain text editor.
- Scroll to the bottom of the text file and enter the following:
g_connectdatabase=<path> - Save the config.txt
Here is an example of what it might look like in the Config.txt file:
g_connectdatabase="C:\Users\Username\Documents\Test Database"
After completion, when you launch Cinema 4D, Team Render Client, or the Command Line, the Asset Browser database you've created will be automatically connected.
3. Target Line of a Shortcut:
- Create a shortcut for which item you wish to connect to the database. I will use the command line as an example.
- Right-click on the appropriate executable, hover over "Send To," and choose "Desktop (create shortcut)
- Right-click on the newly created shortcut and choose "Properties."
Under the shortcut properties window, you will see a "Target" line.
This line represents the location of where the app is.
- On the Target line, move the cursor to the end of the app location, where you will see an end quote.
Hit the spacebar and enter the g_connectdatabase= variable followed by the path.
Here is an example of what it should look like:
- Finally, hit OK to save the changes.
After completion, when you launch from this newly created shortcut, the Asset Browser database you've created will be automatically connected.
Setup for multiple databases:
The following can be implemented on any of the three options above.
For the sake of simplicity, let's say you have two databases on the root of your C drive:
C:\Database1 and C:\Database2
When adding multiple databases, they must be on the same line, start and end with quotes, and be separated by semi-colons.
Using our example, here is what it should look like in the config.txt file and the target line of a shortcut:
g_connectdatabase="C:\Database1;C:\Database2"
In the environment variable settings, it will be:
Variable name:
g_connectdatabase
Variable value:
C:\Database1;C:\Database2
Comments
0 comments
Article is closed for comments.