hanging_layer? Clues? Seemed easy but...

Moho allows users to write new tools and plugins. Discuss scripting ideas and problems here.

Moderators: Víctor Paredes, Belgarath, slowtiger

Post Reply
User avatar
Rai López
Posts: 2244
Joined: Sun Aug 08, 2004 1:41 pm
Location: Spain
Contact:

hanging_layer? Clues? Seemed easy but...

Post by Rai López »

Hmmm... HI! I need (for complicated/gravity reasons) to have a layer that never NEVER rotate for any bone influence or parent group rotation, I have thought in something like "hanging_bone.lua" embedded script provided by LM but acting over the entire scripted layer and not over a bone, could that be possible? Seemed easy and I tried happily to modify it and change the "bone.fAngle" instruction to "layer.fRotationZ" but :( (as I was afraid) it doesn't work... Any clue/es? THANKS! :)
User avatar
Rai López
Posts: 2244
Joined: Sun Aug 08, 2004 1:41 pm
Location: Spain
Contact:

Post by Rai López »

Well, THANKS to Ramón López (...) I've found an intrincated and temporally solution for this (based in several layers hierarchies), but well... I'm still thinking that the Embedded solution it'd be a good thing, so if anybody could easily help me I'd still be grateful :) , if not... doesn't matter :roll: *CIAO!*
User avatar
Hiddicop
Posts: 250
Joined: Sun Nov 07, 2004 4:18 pm
Location: Sweden

Post by Hiddicop »

This should be a feature. Just like "Immune to camera movements" there should be a "Immune to group movements".
User avatar
rylleman
Posts: 750
Joined: Tue Feb 15, 2005 5:22 pm
Location: sweden
Contact:

Post by rylleman »

Hiddicop wrote:This should be a feature. Just like "Immune to camera movements" there should be a "Immune to group movements".
With the addition that you can select which channels that should be immune this would be great!
User avatar
7feet
Posts: 840
Joined: Wed Aug 04, 2004 5:45 am
Location: L.I., New Yawk.
Contact:

Post by 7feet »

I was doing some work on this last night. First, conceptually, it's more than an "immune to group movements" kinda problem. It would seem you want to keep the layer translations, scaling, whatever. Maybe even the X and Y rotation. An "immune to layer movements" setting might be handy for some things, but that would sem to mean the layer just don't move. Immunity to particular transformations specifically, like "immune to translation" or rotation or scaling would do the job, but a blanket setting is the same as putting the layer outside the group.

Besides that, I'm trying to figure something out. The ins-and-outs of the matrix transformations makes my head hurt, but I'm tryin'! I'll let you know if I have any luck. I'm basically trying to take the parent layers transformation (well just the rotation, which is the thing I'm having trouble isolating) and subtract that from the target layers ) frame rotation. Should do the trick if I can figure it out, but it would probably create keyframes every frame. The layer rotations only have an animated value, and not a separate value for the 0 frame, so I don't think it could be made to work on the fly like the bone copy bit. But I'm working on it.
User avatar
rylleman
Posts: 750
Joined: Tue Feb 15, 2005 5:22 pm
Location: sweden
Contact:

Post by rylleman »

7feet wrote:An "immune to layer movements" setting might be handy for some things, but that would sem to mean the layer just don't move. Immunity to particular transformations specifically, like "immune to translation" or rotation or scaling would do the job, but a blanket setting is the same as putting the layer outside the group.
Not quite, there are times when you need to have objects inside of groups but dont want them to move with the rest of the group at all, some masking for instance.
User avatar
Rai López
Posts: 2244
Joined: Sun Aug 08, 2004 1:41 pm
Location: Spain
Contact:

Post by Rai López »

WOW! All that would be or will be (I hope :) ) much more that I have imaginated! :D That could be very useful for resolve lots of peculiar (or not so peculiar) situations, mix techniques and increase possibilities! THANKS (one more time) 7feet! :D
User avatar
7feet
Posts: 840
Joined: Wed Aug 04, 2004 5:45 am
Location: L.I., New Yawk.
Contact:

Post by 7feet »

ryellman - After I posted that, Im started to think about masking. wasn't quite sure wher it would be applicable, but it's a fluid medium.

Part of the question with using (and writing) emebedded scripts is that, at this point, you can only use one per layer. If you have the wherewithal, you can do the cut 'n' paste and stack 'em up in one bit, but that's a little too much like work. Perhaps necessary sometimes.
Post Reply