Create Icons for Plugins?
-
If you mean by Ruby code then yes....
If you look at the code of a simple plugin that uses an icon you can then apply that to one that doesn't.
if not file_loaded?(File.basename(__FILE__)) new_menu = UI.menu("Draw").add_submenu("Pen Tool +") new_toolbar = UI;;Toolbar.new("Pen Tool +") plugins = Sketchup.find_support_file("Plugins") imgdir = File.join(plugins, "rob_hsltool") cmd = UI;;Command.new("Soft Draw") {Sketchup.active_model.select_tool(SLineTool.new()) } cmd.small_icon = File.join(imgdir, "sline16x16.png") cmd.large_icon = File.join(imgdir, "sline24x24.png") cmd.tooltip = "Soft Draw" cmd.menu_text = "Soft Draw"
This is from my/TIG's Pen Tool+. It adds a menu item to the Draw menu then assigns it to a toolbar where it's icons reside in the 'rob_hsltool' folder. Further down it references the small and large icons and some tool tip text when you hover over the icon. There are other things it referencing like classes.
I've a very custom set of toolbars that I built from various tools with custom icons. The problem arises when someone updates a plugin and then your digging around trying to see what changed etc.
I'm sure one of the gurus will correct my very rudimentary understanding of it but that's my 2 cents.
-
Hay you icon creating maniacs - post them icons back to the developer and it will probably go into the next release. Often icons aren't made because it simply takes time to do them.
hmmm... community project?
-
@thomthom said:
Hay you icon creating maniacs - post them icons back to the developer and it will probably go into the next release. Often icons aren't made because it simply takes time to do them.
hmmm... community project?
Not just a matter of time, but of artistic capability....!
Fredo
-
ask, and you shall receive!
-
Question 2
How to make a Toolbar within different RB file?
-
you give the toolbars the same name - then the icons will be in one toolbar
-
@cadfather said:
you give the toolbars the same name - then the icons will be in one toolbar
Sure?
I thought you got two different toolbars. Thought the only way was to share the Toolbar object... -
At least, if the toolbar has been displayed it won't accept new buttons....
-
well, that's what i do to group icons - if you share the same menu name, you will get two menus but in the case of toolbars it works. (this tip was from master fredo long time ago)..
-
A lots of Billiant Plugins
But
Perhaps, should need a Standard for write PluginsSuch as
module Somebody
class Something
def Somejobit make plugins less conflict
and easier for someguy Creating Icons
Advertisement