Skip to content

Commit

Permalink
Corrections.
Browse files Browse the repository at this point in the history
  • Loading branch information
croudyj committed May 27, 2021
1 parent 806c7dd commit 398e054
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion rhinocommon/cs/SampleCsCommands/SampleCsAddRdkMaterials.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion rhinopython/SampleAddRenderMaterials.py
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down

0 comments on commit 398e054

Please sign in to comment.