2
0

SkeletonModificationStack3D.xml 4.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <class name="SkeletonModificationStack3D" inherits="Resource" version="4.0">
  3. <brief_description>
  4. A resource that holds a stack of [SkeletonModification3D]s.
  5. </brief_description>
  6. <description>
  7. This resource is used by the Skeleton and holds a stack of [SkeletonModification3D]s. The SkeletonModificationStack3D controls the order of the modifications, which controls how they are applied. Modification order is especially important for full-body IK setups, as you need to execute the modifications in the correct order to get the desired results. For example, you want to execute a modification on the spine [i]before[/i] the arms on a humanoid skeleton.
  8. Additionally, the SkeletonModificationStack3D also controls how strongly the modifications are applied to the [Skeleton3D] node.
  9. </description>
  10. <tutorials>
  11. </tutorials>
  12. <methods>
  13. <method name="add_modification">
  14. <return type="void" />
  15. <argument index="0" name="modification" type="SkeletonModification3D" />
  16. <description>
  17. Adds the passed-in [SkeletonModification3D] to the stack.
  18. </description>
  19. </method>
  20. <method name="delete_modification">
  21. <return type="void" />
  22. <argument index="0" name="mod_idx" type="int" />
  23. <description>
  24. Deletes the [SkeletonModification3D] at the index position [code]mod_idx[/code], if it exists.
  25. </description>
  26. </method>
  27. <method name="enable_all_modifications">
  28. <return type="void" />
  29. <argument index="0" name="enabled" type="bool" />
  30. <description>
  31. Enables all [SkeletonModification3D]s in the stack.
  32. </description>
  33. </method>
  34. <method name="execute">
  35. <return type="void" />
  36. <argument index="0" name="delta" type="float" />
  37. <argument index="1" name="execution_mode" type="int" />
  38. <description>
  39. Executes all of the [SkeletonModification3D]s in the stack that use the same execution mode as the passed-in [code]execution_mode[/code], starting from index [code]0[/code] to [member modification_count].
  40. [b]Note:[/b] The order of the modifications can matter depending on the modifications. For example, modifications on a spine should operate before modifications on the arms in order to get proper results.
  41. </description>
  42. </method>
  43. <method name="get_is_setup" qualifiers="const">
  44. <return type="bool" />
  45. <description>
  46. Returns a boolean that indiciates whether the modification stack is setup and can execute.
  47. </description>
  48. </method>
  49. <method name="get_modification" qualifiers="const">
  50. <return type="SkeletonModification3D" />
  51. <argument index="0" name="mod_idx" type="int" />
  52. <description>
  53. Returns the [SkeletonModification3D] at the passed-in index, [code]mod_idx[/code].
  54. </description>
  55. </method>
  56. <method name="get_skeleton" qualifiers="const">
  57. <return type="Skeleton3D" />
  58. <description>
  59. Returns the [Skeleton3D] node that the SkeletonModificationStack3D is bound to.
  60. </description>
  61. </method>
  62. <method name="set_modification">
  63. <return type="void" />
  64. <argument index="0" name="mod_idx" type="int" />
  65. <argument index="1" name="modification" type="SkeletonModification3D" />
  66. <description>
  67. Sets the modification at [code]mod_idx[/code] to the passed-in modification, [code]modification[/code].
  68. </description>
  69. </method>
  70. <method name="setup">
  71. <return type="void" />
  72. <description>
  73. Sets up the modification stack so it can execute. This function should be called by [Skeleton3D] and shouldn't be called unless you know what you are doing.
  74. </description>
  75. </method>
  76. </methods>
  77. <members>
  78. <member name="enabled" type="bool" setter="set_enabled" getter="get_enabled" default="false">
  79. When true, the modification's in the stack will be called. This is handled automatically through the [Skeleton3D] node.
  80. </member>
  81. <member name="modification_count" type="int" setter="set_modification_count" getter="get_modification_count" default="0">
  82. The amount of modifications in the stack.
  83. </member>
  84. <member name="strength" type="float" setter="set_strength" getter="get_strength" default="1.0">
  85. The interpolation strength of the modifications in stack. A value of [code]0[/code] will make it where the modifications are not applied, a strength of [code]0.5[/code] will be half applied, and a strength of [code]1[/code] will allow the modifications to be fully applied and override the skeleton bone poses.
  86. </member>
  87. </members>
  88. </class>