From e94e2790574bab5b130e700b15f37dc2c5674d2d Mon Sep 17 00:00:00 2001 From: Mario Zechner Date: Wed, 22 Jun 2022 15:42:14 +0200 Subject: [PATCH] [godot] More in-editor docs. --- .../spine_godot/docs/SpineSkeleton.xml | 52 +++++++++++++++++++ .../docs/SpineSkeletonDataResource.xml | 33 ++++++++++++ .../docs/SpineSkeletonFileResource.xml | 2 + spine-godot/spine_godot/docs/SpineSkin.xml | 14 +++++ 4 files changed, 101 insertions(+) diff --git a/spine-godot/spine_godot/docs/SpineSkeleton.xml b/spine-godot/spine_godot/docs/SpineSkeleton.xml index a16c6819c..d44bae661 100644 --- a/spine-godot/spine_godot/docs/SpineSkeleton.xml +++ b/spine-godot/spine_godot/docs/SpineSkeleton.xml @@ -1,8 +1,11 @@ + Stores the current pose for a skeleton. + Stores the current pose for a skeleton. + See [url]http://esotericsoftware.com/spine-runtime-architecture#Instance-objects[/url] in the Spine Runtimes Guide. @@ -11,30 +14,35 @@ + Finds a bone by comparing each bone's name. It is more efficient to cache the results of this method than to call it repeatedly. + Finds an IK constraint by comparing each IK constraint's name. It is more efficient to cache the results of this method than to call it repeatedly. + Finds a path constraint by comparing each path constraint's name. It is more efficient to cache the results of this method than to call it repeatedly. + Finds a slot by comparing each slot's name. It is more efficient to cache the results of this method than to call it repeatedly. + Finds a transform constraint by comparing each transform constraint's name. It is more efficient to cache the results of this method than to call it repeatedly. @@ -42,6 +50,8 @@ + Finds an attachment by looking in the active skin and default skin using the slot index and attachment name. First the skin is checked and if the attachment was not found, the default skin is checked. + See [url]http://esotericsoftware.com/spine-runtime-skins">Runtime skins[/url] in the Spine Runtimes Guide. @@ -49,81 +59,102 @@ + Finds an attachment by looking in the active skin and default skin using the slot index and attachment name. First the skin is checked and if the attachment was not found, the default skin is checked. + See [url]http://esotericsoftware.com/spine-runtime-skins">Runtime skins[/url] in the Spine Runtimes Guide. + The skeleton's bones, sorted parent first. The root bone is always the first bone. Modifying the array has no effect. + Returns the axis aligned bounding box (AABB) of the region and mesh attachments for the current pose. The bounds are relative to the [code]SpineSprite[/code] that stores the skeleton. + The color to tint all the skeleton's attachments. + The skeleton's setup pose data. + The skeleton's slots in the order they should be drawn. The returned array may be modified to change the draw order. Modifying the array has no effect. + The skeleton's IK constraints. Modifying the array has no effect. + The skeleton's path constraints. Modifying the array has no effect. + Returns the root bone, or null if the skeleton has no bones. + Scales the entire skeleton on the X axis. + Bones that do not inherit scale are still affected by this property. + Scales the entire skeleton on the Y axis. + Bones that do not inherit scale are still affected by this property. + The skeleton's current skin. + The skeleton's slots. Modifying the array has no effect. + The skeleton's transform constraints. Modifying the array has no effect. + Sets the skeleton X position, which is added to the root bone worldX position. Relative to the [code]SpineSprite[/code]. + Bones that do not inherit translation are still affected by this property. + Sets the skeleton Y position, which is added to the root bone worldX position. Relative to the [code]SpineSprite[/code]. + Bones that do not inherit translation are still affected by this property. @@ -131,74 +162,95 @@ + A convenience method to set an attachment by finding the slot with [code]find_slot()[/code], finding the attachment with [code]get_attachment()[/code], then setting the slot's attachment. + [code]attachmentName[/code] may be null to clear the slot's attachment. + Sets the bones and constraints to their setup pose values. + Sets the skeleton color. + Sets the skeleton position relative to the [code]SpineSprite[/code]. + Scales the skeleton on the X axis. + Scales the skeleton on the Y axis. + Sets the skin used to look up attachments before looking in the default skin. If the skin is changed, [code]update_cache()[/code] is called. + Attachments from the new skin are attached if the corresponding attachment from the old skin was attached. If there was no old skin, each slot's setup mode attachment is attached from the new skin. + After changing the skin, the visible attachments can be reset to those attached in the setup pose by calling [code]set_slots_to_setup_pose()[/code]. Also, often [code]AnimationState.apply()[/code] is called before the next time the skeleton is rendered to allow any attachment keys in the current animation(s) to hide or show attachments from the new skin. + Sets the skin by name used to look up attachments before looking in the default skin. If the skin is changed, [code]update_cache()[/code] is called. + Attachments from the new skin are attached if the corresponding attachment from the old skin was attached. If there was no old skin, each slot's setup mode attachment is attached from the new skin. + After changing the skin, the visible attachments can be reset to those attached in the setup pose by calling [code]set_slots_to_setup_pose()[/code]. Also, often [code]AnimationState.apply()[/code] is called before the next time the skeleton is rendered to allow any attachment keys in the current animation(s) to hide or show attachments from the new skin. + Sets the slots and draw order to their setup pose values. + Sets the bones, constraints, slots, and draw order to their setup pose values. + Sets the skeleton X position, which is added to the root bone worldX position. + Bones that do not inherit translation are still affected by this property. + Sets the skeleton Y position, which is added to the root bone worldX position. + Bones that do not inherit translation are still affected by this property. + Updates the world transform for each bone and applies all constraints. + See [url]http://esotericsoftware.com/spine-runtime-skeletons#World-transforms[/url] in the Spine Runtimes Guide. diff --git a/spine-godot/spine_godot/docs/SpineSkeletonDataResource.xml b/spine-godot/spine_godot/docs/SpineSkeletonDataResource.xml index 114b1e2b1..c069e1d6a 100644 --- a/spine-godot/spine_godot/docs/SpineSkeletonDataResource.xml +++ b/spine-godot/spine_godot/docs/SpineSkeletonDataResource.xml @@ -1,8 +1,11 @@ + Resource used to spawn new [code]SpineSkeleton[/code] instances. + Resource used to spawn new [code]SpineSkeleton[/code] instances. The skeleton data resource consists of the skeleton data loaded from a .json or .skel [code]SpineSkeletonFileResource[/code], the texture atlas loaded from a .atlas and .png files making up a [code]SpineAtlasResource[/code], as well as animation mixes, governing for how long two specific animations should be cross faded via [code]SpineAnimationState[/code]. + A single skeleton data resource can be shared among multiple [code]SpineSprite[/code] instances to avoid duplication of resources. @@ -11,154 +14,184 @@ + Finds an animation by comparing each animation's name. It is more efficient to cache the results of this method than to call it multiple times. + Finds a bone by comparing each bone's name. It is more efficient to cache the results of this method than to call it multiple times. + Finds an event by comparing each events's name. It is more efficient to cache the results of this method than to call it multiple times. + Finds an IK constraint by comparing each IK constraint's name. It is more efficient to cache the results of this method than to call it multiple times. + Finds a path constraint by comparing each path constraint's name. It is more efficient to cache the results of this method than to call it multiple times. + Finds a skin by comparing each skin's name. It is more efficient to cache the results of this method than to call it multiple times. + Finds a slot by comparing each slot's name. It is more efficient to cache the results of this method than to call it multiple times. + Finds a transform constraint by comparing each transform constraint's name. It is more efficient to cache the results of this method than to call it multiple times. + The skeleton's animations. Modifying the array has no effect. + The path to the audio directory as defined in Spine, or null if nonessential data was not exported. + The skeleton's bones, sorted parent first. The root bone is always the first bone. Modifying the array has no effect. + The skeleton's default skin. By default this skin contains all attachments that were not in a skin in Spine. + See [code]Skeleton.get_attachment()[/code]. + The skeleton's events. Modifying the array has no effect. + The dopesheet FPS in Spine, or zero if nonessential data was not exported. + The skeleton data hash. This value will change if any of the skeleton data has changed. + The height of the skeleton's axis aligned bounding box in the setup pose. + The skeleton's IK constraints. Modifying the array has no effect. + The path to the images directory as defined in Spine, or null if nonessential data was not exported. + The skeleton's path constraints. Modifying the array has no effect. + The skeleton's name, which by default is the name of the skeleton data file when possible, or null when a name hasn't been set. + All skins, including the default skin. Modifying the array has no effect. + The skeleton's slots. Modifying the array has no effect. + The skeleton's transform constraints. Modifying the array has no effect. + The Spine version used to export the skeleton data, or null. + The width of the skeleton's axis aligned bounding box in the setup pose. + The X coordinate of the skeleton's axis aligned bounding box in the setup pose. + The Y coordinate of the skeleton's axis aligned bounding box in the setup pose. + Whether the skeleton data file and atlas have been successfully loaded. + Sets the skeleton's default skin. diff --git a/spine-godot/spine_godot/docs/SpineSkeletonFileResource.xml b/spine-godot/spine_godot/docs/SpineSkeletonFileResource.xml index 74e26e7f1..16d502191 100644 --- a/spine-godot/spine_godot/docs/SpineSkeletonFileResource.xml +++ b/spine-godot/spine_godot/docs/SpineSkeletonFileResource.xml @@ -1,8 +1,10 @@ + Resource wrapping a Spine skeleton .json or .skel file. Used by [code]SpineSkeletonDataResource[/code]. + Resource wrapping a Spine skeleton .json or .skel file. Used by [code]SpineSkeletonDataResource[/code]. diff --git a/spine-godot/spine_godot/docs/SpineSkin.xml b/spine-godot/spine_godot/docs/SpineSkin.xml index abcde9e8f..a50c52fd3 100644 --- a/spine-godot/spine_godot/docs/SpineSkin.xml +++ b/spine-godot/spine_godot/docs/SpineSkin.xml @@ -1,8 +1,11 @@ + Stores attachments by slot index and attachment name. + Stores attachments by slot index and attachment name. + See [url]http://esotericsoftware.com/spine-runtime-skins[/url] in the Spine Runtimes Guide. @@ -11,24 +14,28 @@ + Adds all attachments, bones, and constraints from the specified skin to this skin. + Adds all bones and constraints and copies of all attachments from the specified skin to this skin. Mesh attachments are not copied, instead a new linked mesh is created. The attachment copies can be modified without affecting the originals. + Returns all attachments for a slot index. Modifying the array has no effect. + Finds the skin keys for a given slot. The results are added to the passed array of names. Modifying the array has no effect. @@ -36,26 +43,31 @@ + Returns the attachment for the specified slot index and name, or null. + Returns all attachments in this skin. Modifying the array has no effect. + Returns the bones associated with this skin. Modifying the array has no effect. + Returns the constraints associated with this skin. Modifying the array has no effect. + The name of the skin. @@ -63,6 +75,7 @@ + Removes the attachment in the skin for the specified slot index and name, if any. @@ -71,6 +84,7 @@ + Adds an attachment to the skin for the specified slot index and name.