-
Notifications
You must be signed in to change notification settings - Fork 61
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
Fire 34747: Refactor for Base/Delta-Rotations, bug fixes #51
base: master
Are you sure you want to change the base?
Fire 34747: Refactor for Base/Delta-Rotations, bug fixes #51
Conversation
remove recapture code smell, refactor double click
Refactor undo/redo to generic, tiny rework to UI sliders for delta usage
Recapture now undo/redo, load from zero rot now per joint, fix joint reflection, fix delta mode
broken after refactor; tidy up
indra/newview/fsfloaterposer.cpp
Outdated
@@ -160,6 +159,14 @@ bool FSFloaterPoser::postBuild() | |||
if (gSavedSettings.getBOOL(POSER_ADVANCEDWINDOWSTATE_SAVE_KEY)) | |||
mToggleAdvancedPanelBtn->setValue(true); | |||
|
|||
mStopPosingOnCloseCbx = getChild<LLCheckBoxCtrl>("stop_posing_on_close_checkbox"); |
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.
Not needed - By specifying the control_name
attribute in the XML file it handles setting the checkbox and storing the value.
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.
You actually removed the wrong part. mToggleAdvancedPanelBtn
still needs manual handling, but not mStopPosingOnCloseCbx
Also both mStopPosingOnCloseCbx
and mResetBaseRotOnEditCbx
can be removed entirely.
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.
facepalm sorry
mResetBaseRotOnEditCbx had one reference in getWhetherToResetBaseRotationOnEdit() right at the bottom... but I can just go get the setting.. so all removed, cheers.
indra/newview/fsfloaterposer.cpp
Outdated
@@ -231,6 +236,12 @@ void FSFloaterPoser::onClose(bool app_quitting) | |||
if (mToggleAdvancedPanelBtn) | |||
gSavedSettings.setBOOL(POSER_ADVANCEDWINDOWSTATE_SAVE_KEY, mToggleAdvancedPanelBtn->getValue().asBoolean()); | |||
|
|||
if (mStopPosingOnCloseCbx) |
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.
Not needed - same as mentioned above.
indra/newview/fsjointpose.cpp
Outdated
mRotation = FSJointRotation(mRotation.baseRotation, rot); | ||
} | ||
|
||
void FSJointPose::setScaleDelta(LLVector3 scale) |
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.
scale
should be passed as const LLVector3&
indra/newview/fsjointpose.h
Outdated
deltaRotation.set(delta); | ||
} | ||
|
||
FSJointRotation() {} |
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.
Can be omitted or changed into FSJointRotation() = default;
indra/newview/fsjointpose.h
Outdated
deltaRotation.mQ[VZ] *= -1; | ||
} | ||
|
||
void set(FSJointRotation jRot) |
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.
void set(const FSJoingRotation& jRot)
@@ -139,6 +139,7 @@ set(viewer_SOURCE_FILES | |||
fsfloatervramusage.cpp | |||
fsfloaterwearablefavorites.cpp | |||
fsfloaterwhitelisthelper.cpp | |||
fsjointpose.cpp |
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.
Forgot to add the header file
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 forgot a bunch of them... all added, thanks
Bulk of the work has been refactoring/renaming.
I broke out the class that stores the rot/pos/scale for an lljoint into new files.
Fixed the named case (about undo/redo of scales being wonky).
Refactored the redo/undo pieces into generic methods.
Got rid of some code smells behind the UI regarding recapture of joint state. All that neatened up well with separate treatment for the base and delta rotation. I gave position and scale the same do-over just for completeness. I've thought more on the UX this time.
There's a new feature to reset the base rotation when you start editing a joint... I think it makes a nice middle-ground between making your own pose and capturing/re-working someone else's.
I have a mostly working BVH exporter, but it's not in this PR. BVH can't do elbows it seems: there's some restrictions on rotation it's content with or something? Maybe I'm doing something wrong...
Beq, you mentioned wanting to take anim saving... Maybe that's the way to go?
If there's any code-tidying tools you use, please let me know. I can never tell when I orphan something.