Add materials with one click - toolbar

Forums: Add materials with one click - toolbar
Rhino 3D (Export script developed by SamPage; Integrated Plugin developed by Paul Kinnane)

Moderator: face_off

Add materials with one click - toolbar

Postby formatio » Sun Mar 20, 2016 3:51 pm

formatio Sun Mar 20, 2016 3:51 pm
Hi

As I promised here is the toolbar (see attached file) - version 1.02.

Octane-Render-Toolbar-v1.02.zip
(249.69 KiB) Downloaded 330 times


Toolbar for octane 3.x.x plugin:

OctaneRenderv3.x_Toolbar-v1.01.zip
(257.59 KiB) Downloaded 230 times


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
thumb.JPG (12.08 KiB) Viewed 5762 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
Last edited by formatio on Sun Feb 19, 2017 11:23 am, edited 7 times in total.
User avatar
formatio
Licensed Customer
Licensed Customer
 
Posts: 131
Joined: Sun May 18, 2014 11:00 am
Location: EU

Re: Add materials with one click - toolbar

Postby face_off » Tue Mar 22, 2016 3:56 am

face_off Tue Mar 22, 2016 3:56 am
Fantastic - thanks for sharing Mac.

Paul
Win7/Win10/Mavericks/Mint 17 - GTX550Ti/GT640M
Octane Plugin Support : Poser, ArchiCAD, Revit, Inventor, AutoCAD, Rhino, Modo, Nuke
Pls read before submitting a support question
User avatar
face_off
Octane Plugin Developer
Octane Plugin Developer
 
Posts: 15480
Joined: Fri May 25, 2012 10:52 am
Location: Adelaide, Australia

Re: Add materials with one click - toolbar

Postby formatio » Tue Mar 22, 2016 1:11 pm

formatio Tue Mar 22, 2016 1:11 pm
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
User avatar
formatio
Licensed Customer
Licensed Customer
 
Posts: 131
Joined: Sun May 18, 2014 11:00 am
Location: EU

Re: Add materials with one click - toolbar

Postby prehabitat » Tue Mar 22, 2016 8:34 pm

prehabitat Tue Mar 22, 2016 8:34 pm
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 :)
Win10/3770/16gb/K600(display)/GTX780(Octane)/GTX590/372.70
Octane 3.x: GH Lands VARQ Rhino5 -Rhino.io- C4D R16 / Revit17
prehabitat
Licensed Customer
Licensed Customer
 
Posts: 495
Joined: Fri Aug 16, 2013 10:30 am
Location: Victoria, Australia

Re: Add materials with one click - toolbar

Postby formatio » Tue Mar 22, 2016 10:30 pm

formatio Tue Mar 22, 2016 10:30 pm
Hi

Unfortunately Rhino doesn't recognize system variables such a %appdata% - that would be perfect.


Regards,
Mac
User avatar
formatio
Licensed Customer
Licensed Customer
 
Posts: 131
Joined: Sun May 18, 2014 11:00 am
Location: EU

Re: Add materials with one click - toolbar

Postby formatio » Wed Mar 23, 2016 12:07 pm

formatio Wed Mar 23, 2016 12:07 pm
New version 1.02 - added button to remove unused material + small bug fix - See first post in this thread.
User avatar
formatio
Licensed Customer
Licensed Customer
 
Posts: 131
Joined: Sun May 18, 2014 11:00 am
Location: EU

Re: Add materials with one click - toolbar

Postby face_off » Wed Mar 23, 2016 12:15 pm

face_off Wed Mar 23, 2016 12:15 pm
Great work Mac.
Win7/Win10/Mavericks/Mint 17 - GTX550Ti/GT640M
Octane Plugin Support : Poser, ArchiCAD, Revit, Inventor, AutoCAD, Rhino, Modo, Nuke
Pls read before submitting a support question
User avatar
face_off
Octane Plugin Developer
Octane Plugin Developer
 
Posts: 15480
Joined: Fri May 25, 2012 10:52 am
Location: Adelaide, Australia

Re: Add materials with one click - toolbar

Postby prehabitat » Wed Mar 23, 2016 12:25 pm

prehabitat Wed Mar 23, 2016 12:25 pm
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..)
Screenshot (6).png
Win10/3770/16gb/K600(display)/GTX780(Octane)/GTX590/372.70
Octane 3.x: GH Lands VARQ Rhino5 -Rhino.io- C4D R16 / Revit17
prehabitat
Licensed Customer
Licensed Customer
 
Posts: 495
Joined: Fri Aug 16, 2013 10:30 am
Location: Victoria, Australia

Re: Add materials with one click - toolbar

Postby neiwei845458454 » Thu Mar 24, 2016 3:28 am

neiwei845458454 Thu Mar 24, 2016 3:28 am
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
neiwei845458454
Licensed Customer
Licensed Customer
 
Posts: 86
Joined: Fri Jan 23, 2015 3:32 am

Re: Add materials with one click - toolbar

Postby neiwei845458454 » Thu Mar 24, 2016 3:44 am

neiwei845458454 Thu Mar 24, 2016 3:44 am
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"
neiwei845458454
Licensed Customer
Licensed Customer
 
Posts: 86
Joined: Fri Jan 23, 2015 3:32 am
Next

Return to Rhinoceros 3D


Who is online

Users browsing this forum: No registered users and 13 guests

Wed Apr 24, 2024 8:13 pm [ UTC ]