Page 1 of 2
Add materials with one click - toolbar
Posted: Sun Mar 20, 2016 3:51 pm
by formatio
Hi
As I promised here is the toolbar (see attached file) - version 1.02.
Toolbar for octane 3.x.x plugin:
Changelog for v 2.x
1.02
-added button to remove unused materials
-diff /spec material change from left to right mouse button
Changelog for v 3.x
1.01
-Added _ to all commands so it works in every language

- thumb.JPG (12.08 KiB) Viewed 6369 times
How to install (included also in the archive):
Install for octane v3 is exactly the same procedure
1. Unpack Octane-Render-Toolbar.rui to temporrary location.
2. Move Rhino-Octane-Mats folder to your C:\ drive.
3. Open Rhino and go to Tools > Toolbar layout...
4. Window opens - go to File > Open... and point to Octane-Render-Toolbar.rui
5. In the same window select Octane-Render-Toolbar in the box called "Files"
6. You should see "Octane Toolbar" in the box below.
7. Uncheck it and check it if you cant see it in the main Rhino window.
8. Drag the toolbar by the blue stripe (not the tab title) and stick it next to the sidebar (best location imho)
If you want to change materials location on disk you have to change path in the toolbar itself via SHIFT+right clik on every button.
Any issues post here.
Reagards,
Mac
Re: Add materials with one click - toolbar
Posted: Tue Mar 22, 2016 3:56 am
by face_off
Fantastic - thanks for sharing Mac.
Paul
Re: Add materials with one click - toolbar
Posted: Tue Mar 22, 2016 1:11 pm
by formatio
Hey,
I just realized that paths for the materials were configured for my windows user so for you to not edit anything in the toolbar I uploaded updated version 1.01
I updated the archive in the the first post
Regards,
Mac
Re: Add materials with one click - toolbar
Posted: Tue Mar 22, 2016 8:34 pm
by prehabitat
formatio wrote:Hey,
I just realized that paths for the materials were configured for my windows user so for you to not edit anything in the toolbar I uploaded updated version 1.01
I updated the archive in the the first post
Regards,
Mac
Thanks Mac,
I did a find/replace of macio->Andrew and solved it at my end... Did you substitute %appdata% or something? I wasn't sure if you could use explicit path (in quotes to allow the spaces in folder names) appended after global path/location (%appdata%).... I only have a fleeting knowledge of this stuff, likely got it all wrong but interested
P.s. Had planned to post here today letting you know about the path issue but you beat me to it

Re: Add materials with one click - toolbar
Posted: Tue Mar 22, 2016 10:30 pm
by formatio
Hi
Unfortunately Rhino doesn't recognize system variables such a %appdata% - that would be perfect.
Regards,
Mac
Re: Add materials with one click - toolbar
Posted: Wed Mar 23, 2016 12:07 pm
by formatio
New version 1.02 - added button to remove unused material + small bug fix - See first post in this thread.
Re: Add materials with one click - toolbar
Posted: Wed Mar 23, 2016 12:15 pm
by face_off
Great work Mac.
Re: Add materials with one click - toolbar
Posted: Wed Mar 23, 2016 12:25 pm
by prehabitat
formatio wrote:Unfortunately Rhino doesn't recognize system variables such a %appdata% - that would be perfect.
Perhaps a .bat installer which transfers the mats (via the system variable) and also changes the username part of the path in the toolbar file too? (Not sure if this is possible... I though Batch files could pass text edit commands directly via inbuilt text editor to rewrite files?)
Certainly not complaining; I really like it!!! I'll post my setup, I don't use the sidebar in the conventional way; but I did place it roughly as you suggested (right?)
EDIT: setup below; the properties, mats, octane, layers are on the second screen (cropped the rest off..)
Re: Add materials with one click - toolbar
Posted: Thu Mar 24, 2016 3:28 am
by neiwei845458454
Dim strObject, intIndex
strObject = Rhino.GetObject
If Not IsNull(strObject) Then
intIndex = Rhino.ObjectMaterialIndex(strObject)
If (intIndex = -1) Then
intIndex = Rhino.AddMaterialToObject(strObject)
End If
End If
-----------------------------------------------------------
ObjectMaterialIndex Example:
Dim strObject, intSource, intIndex
strObject = Rhino.GetObject("Select object")
If Not IsNull(strObject) Then
intSource = Rhino.ObjectMaterialSource(strObject)
If (intSource = 0) Then
Rhino.Print "The material source is by layer"
Else
Rhino.Print "The material source is by object"
intIndex = Rhino.ObjectMaterialIndex(strObject)
If (intIndex = -1) Then
Rhino.Print "The material is default."
Else
Rhino.Print "The material is custom."
End If
End If
End If
Re: Add materials with one click - toolbar
Posted: Thu Mar 24, 2016 3:44 am
by neiwei845458454
Hi paul,
Can you do this like vray for rhino by apply material to objects?
Code: Select all
-_visloadvismat "C:\ProgramData\ASGVIS\V-Ray Express\Rhino\Materials\Metal\chrome.vrmat"
-_visapplymaterial "/chrome"