From 398e054194bcf02fce9bc09485c6d87e034086e6 Mon Sep 17 00:00:00 2001 From: John Croudy Date: Thu, 27 May 2021 14:14:39 -0700 Subject: [PATCH] Corrections. --- rhinocommon/cs/SampleCsCommands/SampleCsAddRdkMaterials.cs | 2 +- rhinopython/SampleAddRenderMaterials.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/rhinocommon/cs/SampleCsCommands/SampleCsAddRdkMaterials.cs b/rhinocommon/cs/SampleCsCommands/SampleCsAddRdkMaterials.cs index 6debe05c..0f4bdd82 100644 --- a/rhinocommon/cs/SampleCsCommands/SampleCsAddRdkMaterials.cs +++ b/rhinocommon/cs/SampleCsCommands/SampleCsAddRdkMaterials.cs @@ -36,7 +36,7 @@ protected override Result RunCommand(RhinoDoc doc, RunMode mode) // 2.) Create a basic Render material from the Rhino material. var render_material = RenderMaterial.CreateBasicMaterial(rhino_material, doc); - // 3.) Add a basic Render material to the document. + // 3.) Add the basic Render material to the document. doc.RenderMaterials.Add(render_material); // At this point, you will see a Render material appear in Rhino's diff --git a/rhinopython/SampleAddRenderMaterials.py b/rhinopython/SampleAddRenderMaterials.py index e43968ee..46da2431 100644 --- a/rhinopython/SampleAddRenderMaterials.py +++ b/rhinopython/SampleAddRenderMaterials.py @@ -47,7 +47,7 @@ def SampleAddRenderMaterials(): sphere = Rhino.Geometry.Sphere(Rhino.Geometry.Plane.WorldXY, 5.0) id = sc.doc.Objects.AddSphere(sphere); obj = sc.doc.Objects.Find(id); - if obj != None: + if obj is not None: obj.RenderMaterial = render_material; obj.CommitChanges();