New button script: Select all keyed bones on current frame

General Moho topics.

Moderators: Víctor Paredes, Belgarath, slowtiger

User avatar
synthsin75
Posts: 9981
Joined: Mon Jan 14, 2008 11:20 pm
Location: Oklahoma
Contact:

Post by synthsin75 »

I was thinking the 'snooze' may allow the normal toggling of visible layers in a group when only one is visible and selecting another swaps visibility, not somehow keep it from registering the selection.

Yeah, aside from your suggestion of adding a disable option, the only other thing I can think of is to use 'hide in editing view' instead, but that'd be a pain in the ass. :?
User avatar
heyvern
Posts: 7035
Joined: Fri Sep 02, 2005 4:49 am

Post by heyvern »

I've tried using a "delay" with the system clock but it's very unpredictable. Also I don't think that the swapping visible function would work. If it's a programmatic function in the application "speed" or timing should have no effect. I think I need to experiment some more. Look at the code more thoroughly.

I hate to give up your script! I really really like it!

:)

-vern
User avatar
synthsin75
Posts: 9981
Joined: Mon Jan 14, 2008 11:20 pm
Location: Oklahoma
Contact:

Post by synthsin75 »

Well I still plan on adding more to it, so I may have a solution to the problem by then. I plan on adding tool options for what kind of 'search' the user wants to select by (i.e. curve, shape, and looking into the possibility of bone and image). If these end up working how I'm thinking, then I can maybe 'skip' layer types that don't need searching.

Basically, if we agree that we only tend to need non-visible (by the eyes checkbox) vector layers, then somehow avoiding all vector layers as an option would help. :?

That is if there is anyway to get a layer's type without having to select the layer. Any ideas? Should I cycle through the layers only once on an initial click, and then use that info to exclude/include layers to be searched? (Gulp!)

BTW, sorry for being so OT.

:wink:
User avatar
heyvern
Posts: 7035
Joined: Fri Sep 02, 2005 4:49 am

Post by heyvern »

I think ultimately to have perfect functionality we need access to the visible value of a layer. Without that everything is a kludge. I would be willing to use a modifier key but then how does that work with other tools that have modifier keys already? (if you add your tools functionality to other tools that is).

Even with access to layer visible through the script interface there is still the issue of "dragging". that would have to be solved as well.

I have another option that sort of fixes this issue. I set the select points tool to NOT use your layer selection script. I need this functionality more so with the translate tool. I can just switch to the select points tool if I need more options for selecting points without switching or turning layers on and off. Problem fixed.

-------

p.s. It's my thread be as OT as you like. Within reason of course. I don't want "Luke" on here selling movie scripts and telling me to shut up. ;)

-vern
User avatar
synthsin75
Posts: 9981
Joined: Mon Jan 14, 2008 11:20 pm
Location: Oklahoma
Contact:

Post by synthsin75 »

More scripting access! More scripting access! More scripting access! More scripting access! More scripting access! More scripting access! More scripting access! More scripting access!

I know it may not be that simple to add, but man it would allow for so many more, and perhaps easier, scripting solutions.
User avatar
synthsin75
Posts: 9981
Joined: Mon Jan 14, 2008 11:20 pm
Location: Oklahoma
Contact:

Post by synthsin75 »

Okay, I tried using Fazek's method for searching through layers, but I just couldn't wrap my head around it. But I have ended up developing a way to get through them without selecting them.

This is still going to take a little time, but I'm feeling pretty confident that I can do away with all layer selections but the end results. I think I may be able to even make sure that the non-visible layers are not inadvertently selected (but I may be getting ahead of myself there).

:wink:
User avatar
heyvern
Posts: 7035
Joined: Fri Sep 02, 2005 4:49 am

Post by heyvern »

I was on the same track. Where I got stuck was how to find out if a shape is clicked without making the layer active. I don't know if you actually can check if a shape or edge or whatever, is clicked on without that layer being active.

The other problem with your script is that even IF the layers DON'T turn back on you can still select them when clicking. If you have layers turned off you can't see if you clicked on the shape of another layer but AS doesn't know this. If a layer is hidden it is still "active". Yet one more reason for needing the "hidden" property of a layer as a script reference. If you can check for that value a script could ignore that layer. If a layer is hidden the darn thing shouldn't "exist" to AS at all.

This would make for some very powerful script tools. Like clearing key frames from "visible" layers. Or deleting all "hidden" layers, like photoshop has.

See how that works? Mike adds one "simple" feature and we can create a bunch more on our own. ;)

-vern
User avatar
heyvern
Posts: 7035
Joined: Fri Sep 02, 2005 4:49 am

Post by heyvern »

synthsin75 wrote:I think I may be able to even make sure that the non-visible layers are not inadvertently selected (but I may be getting ahead of myself there).
I wouldn't bother trying. The problem is that many layers can have the same name and reading the file format is the only way to get the "visible" property. The only way you can find that layer is to use the name and search the file format. However many layers could have a name like "layer 1" all over the file.

-vern
User avatar
synthsin75
Posts: 9981
Joined: Mon Jan 14, 2008 11:20 pm
Location: Oklahoma
Contact:

Post by synthsin75 »

Yeah, I forgot that the mesh can only be accessed for the selected layer. :oops: :roll:

Looking at the file format, I just realized that the layers are actually in a very specific order (though not that of the layers window). I'm sure you'd be able to do it faster, but you're probably tired of mucking around in the format.

It seems that all I'd need to do is parse the file format for the 'visible' settings in the order they appear. No layer names needed. Since I know the arrangement of the layers in the format, I should be able to translate that to something I can use for the tool.

So after I get all that sorted out (which I'm sure will work), I can just skip any non-visible layers in my searches for layer selection. I will have to do my searches through a table to exclude those. I still need practice with tables. :oops:

Still a lot of work, but I don't think it's a lost cause yet. :wink:
User avatar
heyvern
Posts: 7035
Joined: Fri Sep 02, 2005 4:49 am

Post by heyvern »

Once again checking the file format for the "order" of layers won't work either. AS will write the layers to the file in the order they are created but changing the order in the AS file won't necessarily change its position in the file format... sometimes it does... sometimes it doesn't. I have spent the effort to work out what is going on.

I had this problem with a script a while ago. i was trying to create a text list in a pop up window of all the layers. What I kept finding was that the layer order would change in the palette but the "ID" order wouldn't. This mainly effected top level layers. This was noticeable when I started to look at the file format itself to see what was going on. Sometimes layers wouldn't change there position in the file format.

This was a while ago. I should check again to see.

-vern
User avatar
synthsin75
Posts: 9981
Joined: Mon Jan 14, 2008 11:20 pm
Location: Oklahoma
Contact:

Post by synthsin75 »

Well I've tried everything I can think of, reorganizing layers hasn't messed up the order in the format yet. I mixed up the layers from their initial creation, added more layers, and mixed them up again. I'm still able to tell where they are in the format.

I can do a search for 'visible' in my text editor, and I always know which layer to expect next in the order. So you might want to take another look at it.

If you're still needing that layer pop-up list, I'm on my way to getting that info from the script interface, or check out the format (I don't know which would be easier yet).

:wink:
Post Reply