Hi,
Is there a way of scripting the command “ApplyPlanerMapping”? Python script if possible for Rhino 6. Alternatively, a way of doing this with RhinoScript Command Function.
Thanks,
Eric
Hi,
Is there a way of scripting the command “ApplyPlanerMapping”? Python script if possible for Rhino 6. Alternatively, a way of doing this with RhinoScript Command Function.
Thanks,
Eric
from Rhino.Commands import *
from Rhino.DocObjects import *
from Rhino.Input import *
from Rhino.Geometry import *
from Rhino.Render import *
def RunCommand():
rc, obj_ref = RhinoGet.GetOneObject("Select object", False, ObjectType.AnyObject)
if rc <> Result.Success: return rc
rhino_object = obj_ref.Object()
tm = TextureMapping.CreatePlaneMapping(Plane.WorldXY, Interval(0,10),Interval(0,10),Interval(0,10))
rhino_object.SetTextureMapping(1, tm)
return Result.Success
if __name__=="__main__":
RunCommand()
SetTextureMapping.py (547 Bytes)