Cinema 4D R20 – Using a centralized plugin repository

Introduction

Maxon has released Release 20 of Cinema 4D and it comes with a bunch of new features (amongst them plugin breaking API changes, which is a bit of a bummer, but it needed to be done…). One of the lesser talked about features is the ability to set up multiple Plugin Search Paths. Previously you had you AppData plugin path and the system-wide plugin path in the Cinema 4D Rxx/plugins folder. The latter does not exist any more by default. Instead you are told to use your AppData plugin folder instead. This works fine if you are the only person working on your Workstation. It’s a pain if you are not.

New PluginPath feature in R20

Luckily you can still create your own Cinema 4D R20/plugins if you are so inclined. However, the big thing here (at least for me) is: the Search Paths also support UNC paths! Which means you can set up a shared network folder and have all your Cinema 4D R20 installations point to this folder and magically manage all your plugins through a single folder.

Licensing plugins

Using a shared folder works great for plugins that do not require a license to begin with or those that use the licensing system provided by Cinema itself (via its serial number). These licenses are stored in your workstation’s registry and are thus independent from the plugin folder location.

A problem occurs when you are dealing with plugins that require license files. Unfortunately those you will still have to install in your local plugin folder (e.g. the AppData one). But since you can combine multiple plugin folder paths, this is not a big issue.

Multi-User Environments

Cinema store the plugin paths in a file called plugins.json, located in the AppData folders. This means it stores the setting per-User. Which also means it’s tricky to centrally manage the setting for all users in a domain. You can of course pre-create a plugins.json file and just copy it over the existing (or non-existing-yet) one per user-login. But this will remove any custom setting that user may have made. Instead I decided to write a small Python script, since this is plain JSON and easy to parse. If you’re interested, I’ve put the script on Github.

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

43

44

45

46

47

48

49

50

51

52

53

54

55

56

57

58

59

60

61

62

63

64

65

66

67

68

69

70

71

72

73

74

75

76

77

78

79

80

81

82

83

84

85

86

87

88

89

90

91

92

93

94

95

96

97

98

99

100

101

102

103

104

105

106

107

108

109

110

111

112

113

114

115

116

117

118

119

120

121

122

import json

import codecs

import os

_DEBUG=False

# _DEBUG = True

# C4D can use UNC paths, but the next time they are changed within the app, they are stored as path + authoritypath

# instead, so for each UNC path there are two possible ways they may be stored as

_PLUGINPATHUNC="//SERVER/FOLDER/R20/plugins"

_PLUGINPATH="FOLDER/R20/plugins"

_PLUGINAUTHORITYPATH="SERVER"

# A JSON block that contains a path definition

_NEWPATH={

"_0":{

"referenceIndex":0,

"referenceDataType":"net.maxon.interface.url-C",

"_scheme":"file",

"_path":_PLUGINPATH,

"_authority":{

"referenceDataType":"net.maxon.interface.url-C",

"_scheme":"authority",

"_path":_PLUGINAUTHORITYPATH,

"_authority":{},

"_data":{}

},

"_data":{}

},

"_1":True

}

# The contents of a brand new definition file with out path already in it (by default the plugins.json file does