Advanced Select Clarity
Adds different shapes for different bone types in advanced selection mode (square - physical, circle - nonphysical, triangle - procedural, rotated triangle - parented)
Also bone that is being hovered over in advanced select mode will now pulse its scale so it will be easier to tell what we are about to select. (vlazed)
* Add visual indicator of advanced selected bones
+ Add bone scaling indicator when the user hovers over a bone using advanced bone select. Bones also scale when selecting from a set of bones, or when looking through the bone options
* Rename SelectedBones -> BoneScaleGroup; revert scale amplitude
* Synchronize bone scale with UI
- Change `CurrentBoneScales` into a `ClientBoneState` singleton which stores scales and the selected entity. We call methods on this singleton to ensure that the visual bone scaling indicator works as intended, while also ensuring that the UI stays in sync with that state
* Use `util.IsPointInCone` instead of `pos.visible` to restrict edge cases
* Further restrict the view cone angle
* Cache util.IsPointInCone in prevbones[i]; if it exists, we calculate fraction and color
- Also use cached result so we do not have to get bone positions
* Initially set `BoneColors = {}`, so we don't need to do `prevbones = {}` on `calc`
* View entity support for AdvBoneSelectRender
- Changed AdvBoneSelectRender to use the eyepos and eyevector of its viewentity
- Feed eyepos, eyeang, and fov arguments from DrawHud instead of calling for these again
* Opt to use the forward vector of the view entity, instead of cursor vector
* Fix gizmos not catching up to cursor position
+ By default, the rgm_axis is created with MOVETYPE_NONE on the client, which causes the gizmo to delay its movement to the cursor. This fixes it by setting its movetype to MOVETYPE_VPHYSICS, replicating the behavior seen from tool ghost entities.
* Fixed inability to click on gizmos in some environments
* Change behavior for func_brush functionality
+ Added InitPostEntity hook to insert ragdollmover to all func_brush entities with a m_tblToolsAllowed field, which fixes unselectable gizmos in func_brush entities for singleplayer and multiplayer
- Removed rgm_ghost and ghost padding implementations, which has been superseded by the above hook
* Generalize to entities with brush planes instead of strictly func_brush
* Improved appending of ragdollmover to m_tblToolsAllowed
- Changed previous method to target all brush entities with a gmod_allowtools key instead of func_brush alone. This allows Ragdoll Mover to still be used if the brush entity has this key for some reason.
* Move table insert logic into the shared RGMAllowTool hook
- Moved table.insert of ragdollmover tool mode into rgmAllowTool hook
- Changed realm of EntityKeyValue to shared instead of server
- Changed on screen check location from before copying the RGM_CIRCLE table to before performing bone distance calculations or setting draw color. This requires a check for prevbones to set distance colors, but this prevents any calculations from doing done at all. This achieves a 3% increase in performance (averaged over 600 frames)
- Bone positions are only rendered when it is visible on the screen. This results in about 23% increase in performance on average from looking away at a model with 139 bones
+ Added comments about mindist and maxdist
+ Gradient function to easily generate linearly-interpolated color gradients with NUM_GRADIENT_POINTS parameter
- The color to use is automatically evaluated using the number of gradient points and the distance, allowing one to generalize beyond two gradient points
- Darker colors