import c4d
from RedshiftWrapper.Redshift import Redshift
 
def main():
    rs = RedshiftWrapper()
   
    #Assign Material
    rs.SetMat(doc.GetFirstMaterial())
   
    #Create Constant Node
    ConstNode = rs.CreateShader(c4d.ID_OPERATOR_CONST, x=100, y=500)
   
    #Create Fresnel shader and expose parameter
    FresnelNode = rs.CreateShader("Fresnel", x=200, y=500)
    FresnelNode.ExposeParameter(c4d.REDSHIFT_SHADER_FRESNEL_USER_CURVE, c4d.GV_PORT_INPUT)
   
    #Connect Constant and fresnel
    rs.CreateConnection(ConstNode, 0, FresnelNode, 0)
   
    #Get default material node and output node
    listNode = rs.GetAllNodes()
    MatNode = None
    OutPutNode = None
    for node in listNode:
        if node.GetNodeType() == "Output":
            OutPutNode = node
        elif node.GetNodeType() == "Material":
            MatNode = node
           
    if not MatNode or not OutPutNode:
        return
   
    #Expose a paramter of the material
    MatNode.ExposeParameter(c4d.REDSHIFT_SHADER_MATERIAL_DIFFUSE_WEIGHT, c4d.GV_PORT_INPUT)
   
    #Connect Fresnel shader to the material
    rs.CreateConnection(FresnelNode, 0, MatNode, 0)
   
    #Connect material shader to the output
    rs.CreateConnection(MatNode, 0, OutPutNode, 0)
   
    c4d.EventAdd()
if __name__=='__main__':
    main()
@@ -50,17 +50,16 @@
 edshift%0A
- 
 %0Adef mai
@@ -84,21 +84,11 @@
 hift
-Wrapper()%0A   
+()%0A
 %0A   
@@ -143,19 +143,16 @@
 rial())%0A
-   
 %0A    #Cr
@@ -239,19 +239,16 @@
  y=500)%0A
-   
 %0A    #Cr
@@ -430,35 +430,32 @@
 .GV_PORT_INPUT)%0A
-   
 %0A    #Connect Co
@@ -507,19 +507,16 @@
 nstNode,
- 0,
  Fresnel
@@ -518,29 +518,29 @@
 esnelNode, 0
-)%0A   
+, 0)%0A
 %0A    #Get de
@@ -685,36 +685,32 @@
      if node.Get
-Node
 Type() == %22Outpu
@@ -764,20 +764,16 @@
 node.Get
-Node
 Type() =
@@ -813,27 +813,16 @@
  = node%0A
-           
 %0A    if 
@@ -867,19 +867,16 @@
  return%0A
-   
 %0A    #Ex
@@ -999,19 +999,16 @@
 _INPUT)%0A
-   
 %0A    #Co
@@ -1080,19 +1080,16 @@
 nelNode,
- 0,
  MatNode
@@ -1087,29 +1087,29 @@
 , MatNode, 0
-)%0A   
+, 0)%0A
 %0A    #Connec
@@ -1172,19 +1172,16 @@
 MatNode,
- 0,
  OutPutN
@@ -1186,21 +1186,21 @@
 tNode, 0
-)%0A   
+, 0)%0A
 %0A    c4d

Fix BasicUsage example