Hi
prehabitat - yes. I'll add more features in the future so they would go underneath the current icons (or cascade icon/menu when it gets crowded)
I have it like this:
If you guys have any suggestions for the toolbar post them in this thread
Moderator: face_off
# This Python file uses the following encoding: utf-8
import rhinoscriptsyntax as rs
import scriptcontext
rs.Command("_RenderLoadMaterialFromFile C:\\glass.rmtl")
def FindMaterialByName(mat_name):
# find a material by name
mat_table = scriptcontext.doc.Materials
mat_index = mat_table.Find(mat_name, True)
if mat_index >= 0:
print("{0} found at index {1}").format(mat_name, mat_index)
else:
print("material named {} not found in table").format(mat_name)
if __name__=="__main__":
FindMaterialByName("glass")
obj = rs.GetObject()
if obj:
index = rs.ObjectMaterialIndex(obj)
if index==-1: index = rs.AddMaterialToObject(obj)
Users browsing this forum: No registered users and 8 guests