-
Notifications
You must be signed in to change notification settings - Fork 333
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add flexes and eye posing to E2 #2810
Conversation
Add prototypes for bone scale and jiggle functions Make entity:bones() return a copy its output
Reduced and dynamicized cost for entity:getFlexes()
Changed position (cost) of setFlexWeight(nn) (30 -> 10)
I think the commented code is my only complaint. Need to decide whether to uncomment or remove it. |
I'll probably cut it out but I still want to have some sort of reference to it in case someone decides they're worth adding. |
Yeah, I think using the |
@@ -67,3 +67,8 @@ E2Helper.Descriptions["setPos(b:v)"] = "Sets the position of a bone." | |||
E2Helper.Descriptions["setAng(b:a)"] = "Set the rotation of a bone." | |||
E2Helper.Descriptions["ragdollSetPos(e:v)"] = "Sets the position of a ragdoll while preserving pose." | |||
E2Helper.Descriptions["ragdollSetAng(e:a)"] = "Set the rotation of a ragdoll while preserving pose." | |||
E2Helper.Descriptions["setEyeTarget"] = "For NPCs, sets the eye target to the world position. For ragdolls, sets the eye target to the local eye position" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have you verified these work in the E2Helper? I know there's some hacky workaround allowing this, but I thought it was only when the function had no parameters.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, they work. I didn't know it was a hack. Admittedly I just find it easier (less typing) so I prefer using it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see how ignoring the signature and only providing the name of a function wouldn't be a hack
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well it's a good hack in my book because it lets me type less.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's it supposed to be? setEyeTarget(e:)
? Is it okay without the args?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apparently so, I haven't checked myself. I thought that only worked for no parameter functions. Either way that behavior shouldn't be relied on, the signature should be setEyeTarget(e:v)
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's just a way for setting the description of multiple functions of the same name. It's not like someone's going to rewrite how E2Descriptions are handled anytime soon.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This has nothing to do with rewriting the e2helper, that behavior just shouldn't be relied on since it may conflict with any other addon adding a function with that name. I guess it'd be somewhat fine here since the name isn't too generic but I wouldn't want to set a precedent of relying on this.
Also you don't even need it for the usecase you gave, most of these functions don't have overloads.
This PR is a part of #2714, namely, this PR intends to implement a similar standard to 'posecore', but on a more personal note, I want to play with flexes and eyes.
Getters were placed in entity and bone extensions. Setters were placed in propcore.
Features:
entity:setEyeTarget
to set eye target.entity:SetEyeTargetLocal
and:SetEyeTargetWorld
included to remove discrepancy in how ragdolls and NPCs treatSetEyeTarget
differentlyentity:setFlexWeight
,:setFlexScale
to manipulate flexes, and various related gettersParity discrepencies:
bone:getJiggle()
,bone:getScale()
,bone:setBoneScale
andbone:setBoneJiggle
were excluded as, apparently, the functions they use are extremely inefficient, and they seem too niche to demand a solutiongetAnimTime()
is not implemented, as I don't see a use for itThis code was cleanroomed and any likeness to proprietary work is coincidental.
One miscellaneous change is making
entity:bones()
return a copy of its output.