yo, this kept me busy since i discovered that i can change bottons (which link to lua scripts). what i basicylly would like to know is as follows:
- can i change the dimensions of the the toolbox?, i.e. make it one row slim or two columns high etc.
with many useful tools from ppl like 7feet i feel that the toolbox could be shrunk a little. especially on my ibook i'd like to reduce palette space to a minimum.
- 7feet, the wonderful unicersal point tool can't be used right "from the beginning", i.e. i first have to add geometry. why is that? i'd love to get rid of all tools it replaces and stick just with it. is this some lua code i could change?
best regards,
marin
custom toolbox / universal point tool
Moderators: Víctor Paredes, Belgarath, slowtiger
I would've thrown in more, but the problem was that I had used up all the available permutations of the <CTRL>, <ALT>, and <SHIFT> key combinations. You can also possibly set something up which would give you more alternatives depending on other keys pressed, but it could start getting complicated to code. As it stands the "mouse conscious" basic functions that the tools use currently only recognize the aformentioned cntrl/alt/shift keys as modifiers for the script.
Any key pressed is recognized by another basic tool script function, which is called when you press any other key. A good example of this is the way that the Select Shape tool uses the arrow keys (along with the modifier keys) to shuffle the shape order or fish through overlapping shapes.
Potentially, you could use the keyEvent variable in the OnKeyDown function to pass flags to the OnMouseDown/Moved/Up functions telling them what kind of thing you want to do, to add capabilities. However, it's going to get pretty cumbersome fast. For one, there aren't too many keys that aren't already assigned as shortcuts to the various tools. Basically, only the punctuation keys aren't used by anything else. So you would have to hold down, say, the "[" key, the whole time, while also futzing with the ctrl/alt/shift mods associated with it.
Or maybe not. I suppose you could set the flags so they are persistant until you want to change tools. Say "[" is scaling, so you stay with scaling (after momentarily hitting that key) until you choose another function. But that's not so different from the way Moho works normally, but you could use it to cut down the screen real estate used by the toolbar.
But to go back to the start, my philosophy with these things has been that once you use up all the potential modifier combos, the tool is probably complicated enough. And even to get that far, I've had to strip out some of the original tools functionality. Generally constraining things - which I rarely use and so don't really miss. Okay, scratch that, I do like the scaling functions that constrain for continuous volume of the shape/layer, which is why I keep the original functions in the toolbar, just in case.
AFAIK, you can't mess with the width of the tool window, but somebody'll likely prove me wrong...[/code]
Any key pressed is recognized by another basic tool script function, which is called when you press any other key. A good example of this is the way that the Select Shape tool uses the arrow keys (along with the modifier keys) to shuffle the shape order or fish through overlapping shapes.
Potentially, you could use the keyEvent variable in the OnKeyDown function to pass flags to the OnMouseDown/Moved/Up functions telling them what kind of thing you want to do, to add capabilities. However, it's going to get pretty cumbersome fast. For one, there aren't too many keys that aren't already assigned as shortcuts to the various tools. Basically, only the punctuation keys aren't used by anything else. So you would have to hold down, say, the "[" key, the whole time, while also futzing with the ctrl/alt/shift mods associated with it.
Or maybe not. I suppose you could set the flags so they are persistant until you want to change tools. Say "[" is scaling, so you stay with scaling (after momentarily hitting that key) until you choose another function. But that's not so different from the way Moho works normally, but you could use it to cut down the screen real estate used by the toolbar.
But to go back to the start, my philosophy with these things has been that once you use up all the potential modifier combos, the tool is probably complicated enough. And even to get that far, I've had to strip out some of the original tools functionality. Generally constraining things - which I rarely use and so don't really miss. Okay, scratch that, I do like the scaling functions that constrain for continuous volume of the shape/layer, which is why I keep the original functions in the toolbar, just in case.
AFAIK, you can't mess with the width of the tool window, but somebody'll likely prove me wrong...[/code]
Well, you could also put in a modifier drop-down menu, so users can determine the mode of the tool and still have 4 key combinations (key, shift-key, ctrl-key and alt-key) for direct interfacing (even 4 more if you'd register these: shift-ctrl-key, shift-alt-key, ctrl-alt-key and shift-ctrl-alt-key). However, the disadvantage of such "operation modes" is that users can get confused what mode is active, so it slows them down. More control doesn't necessarily mean a better tool, at least from the human perspective. Often K.I.S.S.* applies, because humans only have a limited attention span (8 or 10 things they can concentrate on at the same time).
*Note: K.I.S.S. means Keep It Simple Stupid
Anyway, I have similar screen size related limitations on my ancient Toshiba satellite (12 inch and only 800x600, instead of the 1024x768 of the iBook) running Windows 98 SE, which I rarely use. Perhaps it's possible to interface with an external app which interfaces with the Lua scripting engine to give you user defined Moho controls. I don't know if this is possible, but if it is, it would certainly solve the problem of the inflexible toolbar setup.
I also have a workaround. Pick the tool you want (e.g. the Freehand tool) and close all windows through the Window menu and maximize the main window. Or, alternatively, close only those windows you don't use at the moment and maximize the main window.
*Note: K.I.S.S. means Keep It Simple Stupid
Anyway, I have similar screen size related limitations on my ancient Toshiba satellite (12 inch and only 800x600, instead of the 1024x768 of the iBook) running Windows 98 SE, which I rarely use. Perhaps it's possible to interface with an external app which interfaces with the Lua scripting engine to give you user defined Moho controls. I don't know if this is possible, but if it is, it would certainly solve the problem of the inflexible toolbar setup.
I also have a workaround. Pick the tool you want (e.g. the Freehand tool) and close all windows through the Window menu and maximize the main window. Or, alternatively, close only those windows you don't use at the moment and maximize the main window.
ok guys, seems that i didn't formulate one of my questions the right way:
i managed to define a shortcut for universal point tool (got rid of sclae points and assgned "S" to U.P.T.)
now when i fire up moho, the button for U.P.T. is greyed out, and my freshly remapped shortcut "S" doesn't do anything. I have to add geometry first, then suddenly the U.P.T. button can be activated and everything works the way i want. All I wanna know is why i can't use it right from the beginning, without having to use another tool for adding geometry first, or how this can be fixed.
best regards, marin
i managed to define a shortcut for universal point tool (got rid of sclae points and assgned "S" to U.P.T.)
now when i fire up moho, the button for U.P.T. is greyed out, and my freshly remapped shortcut "S" doesn't do anything. I have to add geometry first, then suddenly the U.P.T. button can be activated and everything works the way i want. All I wanna know is why i can't use it right from the beginning, without having to use another tool for adding geometry first, or how this can be fixed.
best regards, marin
Solmax - Well, 'cause it only works when there are points present in the layer! It does the same check that the other point manipulation tools use:
meaning if there is not a greater than zero number of points in the current layer, the tool will stay inactive. It's for manipulation. It can't create points, so it stays dead until you add some points somehow. If you would like a version that will allow you to do something else, I could easily walk you through the mod. Say if you want to replace one of the functions in the tool, and drop in an Add Point function. That wouldn't be too hard, pretty much like the cut-n-paste hack I did in the first place.
Or, Rasheed, I could perhaps go in the direction you suggest, and I just had a thought. As far as a changable "use mode" kinda option. Basic option is Manipulate. That stands as it is, if there are no points it doesn't do anything, but won't immediately die and grey out the button. Hit <F12> and it's Draw mode, which still has Selection and Translate, but throws in Add Point and Curvature. Maybe Delete Edge, if it'll fit. Hit <F11> and you go back to Manipulate mode (the particular keys are arbitrary - you can use what you like but the function keys, at least most of them, are free).
In Draw mode, you have the standard cursor. In Manipulate mode you have a little transparent circle (a la the Magnet tool, but a different color to avoid confusion) around the cursor so you can't get confused. Besides the fact the the GUI display could change somewhat, that should keep you oriented properly.
I agree with the K.I.S.S standard, a whole lot. I violate it constantly in my special FX work, as I'm usually trying to do things I have no right to on the budget I'm given, but even there keeping the number of "OMFG it BROKE!" factors down is useful (lot's of downtime on a shoot thats obviously your fault never wins any points with the crew). But if the concept is maximum workflow combined with minimum use of screen space for smaller displays, I think that might work. If there was a port of Moho for handhelds I'd be much more motivated, but it's still not something I'm averse to.
Okay, I have to dive into the bugeting for my unit for a film I'm gonna do some stuff for, so don't expect anything immediately, but I'll be happy to drop in and give some direction if somebody is motivated.
Code: Select all
function SF_UniversalPointTool:IsEnabled(moho)
if (moho:CountPoints() > 0) then
return true
end
return false
end
Or, Rasheed, I could perhaps go in the direction you suggest, and I just had a thought. As far as a changable "use mode" kinda option. Basic option is Manipulate. That stands as it is, if there are no points it doesn't do anything, but won't immediately die and grey out the button. Hit <F12> and it's Draw mode, which still has Selection and Translate, but throws in Add Point and Curvature. Maybe Delete Edge, if it'll fit. Hit <F11> and you go back to Manipulate mode (the particular keys are arbitrary - you can use what you like but the function keys, at least most of them, are free).
In Draw mode, you have the standard cursor. In Manipulate mode you have a little transparent circle (a la the Magnet tool, but a different color to avoid confusion) around the cursor so you can't get confused. Besides the fact the the GUI display could change somewhat, that should keep you oriented properly.
I agree with the K.I.S.S standard, a whole lot. I violate it constantly in my special FX work, as I'm usually trying to do things I have no right to on the budget I'm given, but even there keeping the number of "OMFG it BROKE!" factors down is useful (lot's of downtime on a shoot thats obviously your fault never wins any points with the crew). But if the concept is maximum workflow combined with minimum use of screen space for smaller displays, I think that might work. If there was a port of Moho for handhelds I'd be much more motivated, but it's still not something I'm averse to.
Okay, I have to dive into the bugeting for my unit for a film I'm gonna do some stuff for, so don't expect anything immediately, but I'll be happy to drop in and give some direction if somebody is motivated.
?? using SHIFT and LMB it creates new points. so it perfectly replaces the "Add Points tool".. thanks for the code hint, sucessfully replaced ">" with ">=", now it works the way i like it7feet wrote:Solmax - Well, 'cause it only works when there are points present in the layer! It does the same check that the other point manipulation tools use:
meaning if there is not a greater than zero number of points in the current layer, the tool will stay inactive. It's for manipulation. It can't create points, so it stays dead until you add some points somehow.Code: Select all
function SF_UniversalPointTool:IsEnabled(moho) if (moho:CountPoints() > 0) then return true end return false end

best regards, marin
Well, whaddayaknow! That was just about the first thing I wrote (when Moho 5 was still in beta) and I forget some things. But in that case, you could really just scratch that whole function. It's basically an idiot check and apparently not needed in this case. I should throw that mod into the main file. Thanks for pointing that out, and damn glad yer happy. More functionality is a good thing.