How do I change material base color image settings with Python?

Whenever I create a new material from a jpeg-image I drag onto an object in the rhino model, that image is by default set as the bitmap texture for the base color of a newly created material, named after the filename of the jpeg.

By default this bitmap has a mapping set to Mapping Channel 1, but I’d like to formulate a python script to change that quickly to WCS/OCS (box style) with a U and V value of 100.

Is there any guidance published on how to achieve this?

I’m not sure how to trigger a user script via a Drag and Drop event, so would adding an Eto button in a plug-in, or even running a script manually be OK?

The APIs are pretty thoroughly documented, so I’d look there to figure out how to get some kind of reference to the Texture of Btimap object. If you get that reference, depending on how much Hackishness is acceptable, have a look and see if the Mapping U/V and box style attributes (or methods) are on there, but undocumented.

Hi @Jaxx,

Have a look at the attached and let me know if you have any questions.

set_base_color_wcs_box.py (2.3 KB)

– Dale

Thank you Dale, but the script freezes instantly when I try to run it (on Mac). I don’t directly see what causes it and how to debug it. Is there something you know that’s preventing it from running? Rhino gets completely stuck in an endless loading loop and I have to force quit…

EDIT: This is a problem on my end with Rhino 8, the script provided by Dale works succesfully (tested on Rhino 9 WIP)

Hello Jaxx, can you repeat the freeze if you use texture bitmap from a folder that is not synced with iCloud or any other cloud service?

Also, what is your Rhino version?

Version 8 (8.34.26223.11002, 2026-08-11)

The freeze occurs when I launch the script even with no object with a material to it selected…

Thanks for all extra info. I still have not been able to repeat the freeze. Let’s try to find out why.

Could you send me these, please?

  1. The results of the Rhino _SystemInfo command
  2. A simple model you can repeat the freeze with

If you don’t want to upload them publicly here, you can use our upload page.

Do you know which part of the script is being executed when the freeze occurs?
Try opening a new empty model and running RunPythonScript with this file:
Hello.py (26 Bytes)

Thank you. That hello.py script freezes too.

Also scripteditor command gets stuck on the “Python 3.9.10 Installing python runtime”

It is not file specific. It happens in a blank file too…

Rhino 8 SR35 2026-9-8 (Rhino 8, 8.35.26251.13002, Git hash:master @ 3645d710f50175d8ebcf404aded5b042a481c23e)
License type: Commercial, build 2026-09-08
License details: Cloud Zoo

Apple macOS Version 26.5.1 (Build 25F80) (Physical RAM: 24GB)
Mac Model Identifier: Mac17,9
Language: en-BE (MacOS default)
.NET 8.0.14

Metal GPU Family Apple 7
Metal GPU Family Common 3
Metal GPU Family Mac 2
Graphics processors
Apple M5 Pro
Color LCD (1800 x 1169 @ 120.00Hz)
ASUS VC239 (1920 x 1080 @ 60.00Hz)
GPU Vendor: Apple

USB devices
Realtek: USB 10/100 LAN
Generic: Mass Storage Device
Logitech: Wireless Receiver
YICHIP: 2.4G Receiver
USB C: USB C Video Adaptor

Bluetooth devices
None

Third party kernel extensions
None

Third party plugins
/usr/lib/swift/libswiftCore.dylib
/usr/lib/swift/libswiftObjectiveC.dylib
/usr/lib/swift/libswiftCoreFoundation.dylib
/usr/lib/swift/libswiftDarwin.dylib
/usr/lib/swift/libswiftDispatch.dylib
/usr/lib/swift/libswiftIOKit.dylib
/usr/lib/swift/libswiftSystem.dylib
/usr/lib/swift/libswiftXPC.dylib
/usr/lib/swift/libswift_Builtin_float.dylib
/usr/lib/swift/libswift_Concurrency.dylib
/usr/lib/swift/libswift_DarwinFoundation1.dylib
/usr/lib/swift/libswift_StringProcessing.dylib
/usr/lib/swift/libswiftos.dylib
/usr/lib/swift/libswiftDistributed.dylib
/usr/lib/swift/libswiftObservation.dylib
/usr/lib/swift/libswiftSynchronization.dylib
/usr/lib/swift/libswiftAccelerate.dylib
/usr/lib/swift/libswiftCoreAudio.dylib
/usr/lib/swift/libswiftCoreMedia.dylib
/usr/lib/swift/libswiftMetal.dylib
/usr/lib/swift/libswiftOSLog.dylib
/usr/lib/swift/libswiftQuartzCore.dylib
/usr/lib/swift/libswiftUniformTypeIdentifiers.dylib
/usr/lib/swift/libswiftVideoToolbox.dylib
/usr/lib/swift/libswiftsimd.dylib
/usr/lib/swift/libswift_DarwinFoundation2.dylib
/usr/lib/swift/libswift_DarwinFoundation3.dylib
/usr/lib/swift/libswift_RegexParser.dylib
/usr/lib/swift/libswiftCoreMIDI.dylib
/usr/lib/swift/libswiftCoreImage.dylib
/usr/lib/swift/libswiftCompression.dylib
/usr/lib/swift/libswiftCoreLocation.dylib
/usr/lib/swift/libswiftAVFoundation.dylib
/usr/lib/swift/libswiftRegexBuilder.dylib
/usr/lib/swift/libswiftNaturalLanguage.dylib
/usr/lib/swift/libswiftMLCompute.dylib
/usr/lib/swift/libswiftSpatial.dylib
/usr/lib/swift/libswiftCoreGraphics.dylib
/usr/lib/swift/libswiftFoundation.dylib
/usr/lib/swift/libswiftSwiftOnoneSupport.dylib
/usr/lib/swift/libswiftsys_time.dylib
/usr/lib/usd/libusd_ms.dylib
/usr/lib/swift/libswift_errno.dylib
/usr/lib/swift/libswiftIntents.dylib
/usr/lib/swift/libswiftCoreMediaIO.dylib
/usr/lib/swift/libswiftCallKit.dylib
/usr/lib/swift/libswiftPassKit.dylib
/usr/lib/swift/libswiftAppleArchive.dylib
/usr/lib/updaters/libAppleTconUARPUpdater.dylib
/usr/lib/updaters/libT200Updater.dylib
/usr/lib/swift/libswiftDemangle.dylib
/usr/lib/swift/libswiftGLKit.dylib
/usr/lib/swift/libswiftMetalKit.dylib
/usr/lib/swift/libswiftModelIO.dylib
/usr/lib/swift/libswiftSceneKit.dylib
/usr/lib/swift/libswiftExtensionFoundation.dylib
/usr/lib/swift/libswiftGameplayKit.dylib
/usr/lib/swift/libswiftSpriteKit.dylib
/usr/lib/swift/libswiftMapKit.dylib
/Users/jas/Library/Application Support/McNeel/Rhinoceros/8.0/MacPlugIns/DatasmithRhino8.rhp/DatasmithFacadeCSharp.dylib
/Users/jas/Library/Application Support/McNeel/Rhinoceros/8.0/MacPlugIns/DatasmithRhino8.rhp/libtbbmalloc.2.dylib

Rhino plugins that do not ship with Rhino
/Users/jas/Library/Application Support/McNeel/Rhinoceros/8.0/MacPlugIns/DatasmithRhino8.rhp “Datasmith Exporter” 5.7.4.0

Rhino plugins that ship with Rhino
/Applications/Rhino 8.app/Contents/Frameworks/RhMaterialEditor.framework “Renderer Development Kit” 8.35.26251.1002
/Applications/Rhino 8.app/Contents/Frameworks/RhCore.framework/Resources/ManagedPlugIns/Commands.rhp “Commands” 8.35.26251.13002
/Applications/Rhino 8.app/Contents/PlugIns/NamedSnapshots.rhp “Snapshots” 8.35.26251.1002
/Applications/Rhino 8.app/Contents/Frameworks/RhCore.framework/Resources/ManagedPlugIns/RDK_EtoUI.rhp “RDK_EtoUI” 8.35.26251.13002
/Applications/Rhino 8.app/Contents/Frameworks/RhCore.framework/Resources/ManagedPlugIns/MeshCommands.rhp “MeshCommands” 8.35.26251.13002
/Applications/Rhino 8.app/Contents/Frameworks/RhCore.framework/Resources/ManagedPlugIns/RhinoRenderCycles.rhp “Rhino Render” 8.35.26251.13002
/Applications/Rhino 8.app/Contents/Frameworks/RhCore.framework/Resources/ManagedPlugIns/RhinoCycles.rhp “RhinoCycles” 8.35.26251.13002
/Applications/Rhino 8.app/Contents/PlugIns/NamedPositions.rhp “Named Position” 8.35.26251.1002
/Applications/Rhino 8.app/Contents/PlugIns/SectionTools.rhp “SectionTools” 8.35.26251.1002
/Applications/Rhino 8.app/Contents/PlugIns/Displacement.rhp “Displacement” 8.35.26251.1002
/Applications/Rhino 8.app/Contents/PlugIns/PanelingTools.rhp “PanelingTools” 8.35.26251.1002
/Applications/Rhino 8.app/Contents/Frameworks/RhCore.framework/Resources/ManagedPlugIns/RhinoDLR_Python.rhp “IronPython” 8.35.26251.13002
/Applications/Rhino 8.app/Contents/Frameworks/RhCore.framework/Resources/ManagedPlugIns/GrasshopperPlugin.rhp “Grasshopper” 8.35.26251.13002
/Applications/Rhino 8.app/Contents/Frameworks/RhCore.framework/Resources/ManagedPlugIns/RhinoCodePlugin.rhp “RhinoCodePlugin” 8.35.26251.13002

Thanks Jaxx, I’ll find someone who can help you fix that issue!

For some other issues with the latest Rhino 8 release, I decided to install Rhino 9 WIP and can confirm that most of my issues are solved so for now

@Jaxx I tested this locally on 8.35 in my Macbook and can not replicate the lock with or without internet access when setting up python.

Would you mind deleting the ~/.rhinocode/py39-rh8 directory, launch Rhino, and open script editor. See if you can run RhinoCodeLogs after. If not, please zip up the logs under ~/.rhinocode/logs and DM me so I can take a look and maybe see what locks up Rhino.

Thanks for reporting

Thank you. I had tried that already and didn’t work. Tried again, no luck…

This loader freezes immediately

There are no new logs being created when I run RhinoCodeLogs
If I read the timestamps correctly (It is 10:15 am atm, and the latest in this report seems from 08:09:05, which is also strange because my mac was in standby and no rhino window opened :thinking:)

Info 09/18/2026 08:08:17 [RhinoCode] Storage Site Registered: Local Drive (mcneel.eto.file)
Info 09/18/2026 08:08:17 [RhinoCode] Storage Site Registered: Rhino Files (mcneel.rhinoFiles.file)
Info 09/18/2026 08:08:17 [RhinoCode] Storage Site Registered: Web (mcneel.console.http)
Info 09/18/2026 08:08:17 [RhinoCode] Rhino3D Initialized on macOS - NETCoreApp
Info 09/18/2026 08:08:17 [RhinoCode] Platform Registered: Rhinoceros 3D @ 8.35.26251.13002 (mcneel.rhino3d.rhino)
Info 09/18/2026 08:08:17 [RhinoCode] Storage Site Registered: Rhino3D Project (mcneel.rhino3d.project)
Info 09/18/2026 08:08:17 [RhinoCode] Operating System: Unix 26.5.1
Info 09/18/2026 08:08:17 [RhinoCode] RhinoCode server starting on /var/folders/rq/7bxfckn17vn296c6058b1nq80000gn/T/CoreFxPipe_rhinocode_remotepipe_12544
Info 09/18/2026 08:08:17 [RhinoCode] Language Registered: Plain Text 1.0 (rhinocode.builtin.text)
Info 09/18/2026 08:08:17 [RhinoCode] Language Registered: JSON 1.0 (rhinocode.builtin.json)
Info 09/18/2026 08:08:17 [RhinoCode] Language Registered: Yaml 1.0 (rhinocode.builtin.yaml)
Info 09/18/2026 08:08:17 [RhinoCode] Language Registered: Git DotFile 1.0 (rhinocode.builtin.gitDotFile)
Info 09/18/2026 08:08:17 [RhinoCode] Language Loader Registered: mcneel.pythonnet.python@3.*
Info 09/18/2026 08:08:17 [RhinoCode] Language Loader Registered: mcneel.ironpython.python@2.*
Info 09/18/2026 08:08:17 [RhinoCode] Language Loader Registered: mcneel.roslyn.csharp@9.*
Info 09/18/2026 08:08:17 [RhinoCode] Language Loader Registered: mcneel.gh1.grasshopper@1.*
Info 09/18/2026 08:08:17 [RhinoCode] Language Loader Registered: mcneel.markdig.markdown@0.*
Info 09/18/2026 08:09:03 [RhinoCode] Language Registered: Python 3.9.10 (mcneel.pythonnet.python)
Info 09/18/2026 08:09:03 [RhinoCode] Using existing runtime: IronPython 2.7.12/3 (arm64)
Info 09/18/2026 08:09:03 [RhinoCode] Loading IronPython 2.7.12/3 runtime
Info 09/18/2026 08:09:03 [RhinoCode] Parsing configs schema "``https://files.mcneel.com/schemas/rhinocode/editor.schema.v1.json``" in /Users/jas/.rhinocode/editor.json
Info 09/18/2026 08:09:03 [RhinoCode] Added IronPython 2.7.12 (mcneel.ironpython.python) search path: /Users/jas/Library/Application Support/McNeel/Rhinoceros/8.0/scripts
Info 09/18/2026 08:09:03 [RhinoCode] Language Registered: IronPython 2.7.12 (mcneel.ironpython.python)
Info 09/18/2026 08:09:03 [RhinoCode] Language Registered: C# 9.0 (mcneel.roslyn.csharp)
Info 09/18/2026 08:09:03 [RhinoCode] Language Registered: Grasshopper 1.0 (mcneel.gh1.grasshopper)
Info 09/18/2026 08:09:03 [RhinoCode] Language Registered: Markdown 0.30.4 (mcneel.markdig.markdown)
Info 09/18/2026 08:09:04 [RhinoCode] Initializing CPython 3.9.10/43 runtime
Info 09/18/2026 08:09:04 [RhinoCode] Configuring runtime@py39-rh8 for the first time on Arm64
Info 09/18/2026 08:09:04 [RhinoCode] Deploying CPython 3.9.10/43 runtime
Info 09/18/2026 08:09:04 [RhinoCode] Clearing exiting runtime
Info 09/18/2026 08:09:04 [RhinoCode] Successfully uninstalled existing runtime at /Users/jas/.rhinocode/py39-rh8
Info 09/18/2026 08:09:05 [RhinoCode] Marking python binary as executable: /Users/jas/.rhinocode/py39-rh8/python3.9
Info 09/18/2026 08:09:05 [RhinoCode] Running process: /bin/bash -c "/bin/chmod +x /Users/jas/.rhinocode/py39-rh8/python3.9"

Which version of python would you recommend to install that should work with Rhino without problems? I have the latest version of python currently installed; Python 3.14.7