1 /** 2 $(I Deprecated.) Animation player that uses a node graph for blending animations. Superseded by $(D AnimationTree). 3 4 Copyright: 5 Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. 6 Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) 7 Copyright (c) 2017-2018 Godot-D contributors 8 9 License: $(LINK2 https://opensource.org/licenses/MIT, MIT License) 10 11 12 */ 13 module godot.animationtreeplayer; 14 import std.meta : AliasSeq, staticIndexOf; 15 import std.traits : Unqual; 16 import godot.d.traits; 17 import godot.core; 18 import godot.c; 19 import godot.d.bind; 20 import godot.d.reference; 21 import godot.globalenums; 22 import godot.object; 23 import godot.classdb; 24 import godot.node; 25 import godot.animation; 26 /** 27 $(I Deprecated.) Animation player that uses a node graph for blending animations. Superseded by $(D AnimationTree). 28 29 $(I Deprecated.) A node graph tool for blending multiple animations bound to an $(D AnimationPlayer). Especially useful for animating characters or other skeleton-based rigs. It can combine several animations to form a desired pose. 30 It takes $(D Animation)s from an $(D AnimationPlayer) node and mixes them depending on the graph. 31 See $(D AnimationTree) for a more full-featured replacement of this node. 32 */ 33 @GodotBaseClass struct AnimationTreePlayer 34 { 35 package(godot) enum string _GODOT_internal_name = "AnimationTreePlayer"; 36 public: 37 @nogc nothrow: 38 union { /** */ godot_object _godot_object; /** */ Node _GODOT_base; } 39 alias _GODOT_base this; 40 alias BaseClasses = AliasSeq!(typeof(_GODOT_base), typeof(_GODOT_base).BaseClasses); 41 package(godot) __gshared bool _classBindingInitialized = false; 42 package(godot) static struct GDNativeClassBinding 43 { 44 __gshared: 45 @GodotName("add_node") GodotMethod!(void, long, String) addNode; 46 @GodotName("advance") GodotMethod!(void, double) advance; 47 @GodotName("animation_node_get_animation") GodotMethod!(Animation, String) animationNodeGetAnimation; 48 @GodotName("animation_node_get_master_animation") GodotMethod!(String, String) animationNodeGetMasterAnimation; 49 @GodotName("animation_node_get_position") GodotMethod!(double, String) animationNodeGetPosition; 50 @GodotName("animation_node_set_animation") GodotMethod!(void, String, Animation) animationNodeSetAnimation; 51 @GodotName("animation_node_set_filter_path") GodotMethod!(void, String, NodePath, bool) animationNodeSetFilterPath; 52 @GodotName("animation_node_set_master_animation") GodotMethod!(void, String, String) animationNodeSetMasterAnimation; 53 @GodotName("are_nodes_connected") GodotMethod!(bool, String, String, long) areNodesConnected; 54 @GodotName("blend2_node_get_amount") GodotMethod!(double, String) blend2NodeGetAmount; 55 @GodotName("blend2_node_set_amount") GodotMethod!(void, String, double) blend2NodeSetAmount; 56 @GodotName("blend2_node_set_filter_path") GodotMethod!(void, String, NodePath, bool) blend2NodeSetFilterPath; 57 @GodotName("blend3_node_get_amount") GodotMethod!(double, String) blend3NodeGetAmount; 58 @GodotName("blend3_node_set_amount") GodotMethod!(void, String, double) blend3NodeSetAmount; 59 @GodotName("blend4_node_get_amount") GodotMethod!(Vector2, String) blend4NodeGetAmount; 60 @GodotName("blend4_node_set_amount") GodotMethod!(void, String, Vector2) blend4NodeSetAmount; 61 @GodotName("connect_nodes") GodotMethod!(GodotError, String, String, long) connectNodes; 62 @GodotName("disconnect_nodes") GodotMethod!(void, String, long) disconnectNodes; 63 @GodotName("get_animation_process_mode") GodotMethod!(AnimationTreePlayer.AnimationProcessMode) getAnimationProcessMode; 64 @GodotName("get_base_path") GodotMethod!(NodePath) getBasePath; 65 @GodotName("get_master_player") GodotMethod!(NodePath) getMasterPlayer; 66 @GodotName("get_node_list") GodotMethod!(PoolStringArray) getNodeList; 67 @GodotName("is_active") GodotMethod!(bool) isActive; 68 @GodotName("mix_node_get_amount") GodotMethod!(double, String) mixNodeGetAmount; 69 @GodotName("mix_node_set_amount") GodotMethod!(void, String, double) mixNodeSetAmount; 70 @GodotName("node_exists") GodotMethod!(bool, String) nodeExists; 71 @GodotName("node_get_input_count") GodotMethod!(long, String) nodeGetInputCount; 72 @GodotName("node_get_input_source") GodotMethod!(String, String, long) nodeGetInputSource; 73 @GodotName("node_get_position") GodotMethod!(Vector2, String) nodeGetPosition; 74 @GodotName("node_get_type") GodotMethod!(AnimationTreePlayer.NodeType, String) nodeGetType; 75 @GodotName("node_rename") GodotMethod!(GodotError, String, String) nodeRename; 76 @GodotName("node_set_position") GodotMethod!(void, String, Vector2) nodeSetPosition; 77 @GodotName("oneshot_node_get_autorestart_delay") GodotMethod!(double, String) oneshotNodeGetAutorestartDelay; 78 @GodotName("oneshot_node_get_autorestart_random_delay") GodotMethod!(double, String) oneshotNodeGetAutorestartRandomDelay; 79 @GodotName("oneshot_node_get_fadein_time") GodotMethod!(double, String) oneshotNodeGetFadeinTime; 80 @GodotName("oneshot_node_get_fadeout_time") GodotMethod!(double, String) oneshotNodeGetFadeoutTime; 81 @GodotName("oneshot_node_has_autorestart") GodotMethod!(bool, String) oneshotNodeHasAutorestart; 82 @GodotName("oneshot_node_is_active") GodotMethod!(bool, String) oneshotNodeIsActive; 83 @GodotName("oneshot_node_set_autorestart") GodotMethod!(void, String, bool) oneshotNodeSetAutorestart; 84 @GodotName("oneshot_node_set_autorestart_delay") GodotMethod!(void, String, double) oneshotNodeSetAutorestartDelay; 85 @GodotName("oneshot_node_set_autorestart_random_delay") GodotMethod!(void, String, double) oneshotNodeSetAutorestartRandomDelay; 86 @GodotName("oneshot_node_set_fadein_time") GodotMethod!(void, String, double) oneshotNodeSetFadeinTime; 87 @GodotName("oneshot_node_set_fadeout_time") GodotMethod!(void, String, double) oneshotNodeSetFadeoutTime; 88 @GodotName("oneshot_node_set_filter_path") GodotMethod!(void, String, NodePath, bool) oneshotNodeSetFilterPath; 89 @GodotName("oneshot_node_start") GodotMethod!(void, String) oneshotNodeStart; 90 @GodotName("oneshot_node_stop") GodotMethod!(void, String) oneshotNodeStop; 91 @GodotName("recompute_caches") GodotMethod!(void) recomputeCaches; 92 @GodotName("remove_node") GodotMethod!(void, String) removeNode; 93 @GodotName("reset") GodotMethod!(void) reset; 94 @GodotName("set_active") GodotMethod!(void, bool) setActive; 95 @GodotName("set_animation_process_mode") GodotMethod!(void, long) setAnimationProcessMode; 96 @GodotName("set_base_path") GodotMethod!(void, NodePath) setBasePath; 97 @GodotName("set_master_player") GodotMethod!(void, NodePath) setMasterPlayer; 98 @GodotName("timescale_node_get_scale") GodotMethod!(double, String) timescaleNodeGetScale; 99 @GodotName("timescale_node_set_scale") GodotMethod!(void, String, double) timescaleNodeSetScale; 100 @GodotName("timeseek_node_seek") GodotMethod!(void, String, double) timeseekNodeSeek; 101 @GodotName("transition_node_delete_input") GodotMethod!(void, String, long) transitionNodeDeleteInput; 102 @GodotName("transition_node_get_current") GodotMethod!(long, String) transitionNodeGetCurrent; 103 @GodotName("transition_node_get_input_count") GodotMethod!(long, String) transitionNodeGetInputCount; 104 @GodotName("transition_node_get_xfade_time") GodotMethod!(double, String) transitionNodeGetXfadeTime; 105 @GodotName("transition_node_has_input_auto_advance") GodotMethod!(bool, String, long) transitionNodeHasInputAutoAdvance; 106 @GodotName("transition_node_set_current") GodotMethod!(void, String, long) transitionNodeSetCurrent; 107 @GodotName("transition_node_set_input_auto_advance") GodotMethod!(void, String, long, bool) transitionNodeSetInputAutoAdvance; 108 @GodotName("transition_node_set_input_count") GodotMethod!(void, String, long) transitionNodeSetInputCount; 109 @GodotName("transition_node_set_xfade_time") GodotMethod!(void, String, double) transitionNodeSetXfadeTime; 110 } 111 /// 112 pragma(inline, true) bool opEquals(in AnimationTreePlayer other) const 113 { return _godot_object.ptr is other._godot_object.ptr; } 114 /// 115 pragma(inline, true) typeof(null) opAssign(typeof(null) n) 116 { _godot_object.ptr = n; return null; } 117 /// 118 pragma(inline, true) bool opEquals(typeof(null) n) const 119 { return _godot_object.ptr is n; } 120 /// 121 size_t toHash() const @trusted { return cast(size_t)_godot_object.ptr; } 122 mixin baseCasts; 123 /// Construct a new instance of AnimationTreePlayer. 124 /// Note: use `memnew!AnimationTreePlayer` instead. 125 static AnimationTreePlayer _new() 126 { 127 static godot_class_constructor constructor; 128 if(constructor is null) constructor = _godot_api.godot_get_class_constructor("AnimationTreePlayer"); 129 if(constructor is null) return typeof(this).init; 130 return cast(AnimationTreePlayer)(constructor()); 131 } 132 @disable new(size_t s); 133 /// 134 enum AnimationProcessMode : int 135 { 136 /** 137 Process animation during the physics process. This is especially useful when animating physics bodies. 138 */ 139 animationProcessPhysics = 0, 140 /** 141 Process animation during the idle process. 142 */ 143 animationProcessIdle = 1, 144 } 145 /// 146 enum NodeType : int 147 { 148 /** 149 Output node. 150 */ 151 nodeOutput = 0, 152 /** 153 Animation node. 154 */ 155 nodeAnimation = 1, 156 /** 157 OneShot node. 158 */ 159 nodeOneshot = 2, 160 /** 161 Mix node. 162 */ 163 nodeMix = 3, 164 /** 165 Blend2 node. 166 */ 167 nodeBlend2 = 4, 168 /** 169 Blend3 node. 170 */ 171 nodeBlend3 = 5, 172 /** 173 Blend4 node. 174 */ 175 nodeBlend4 = 6, 176 /** 177 TimeScale node. 178 */ 179 nodeTimescale = 7, 180 /** 181 TimeSeek node. 182 */ 183 nodeTimeseek = 8, 184 /** 185 Transition node. 186 */ 187 nodeTransition = 9, 188 } 189 /// 190 enum Constants : int 191 { 192 nodeOutput = 0, 193 animationProcessPhysics = 0, 194 nodeAnimation = 1, 195 animationProcessIdle = 1, 196 nodeOneshot = 2, 197 nodeMix = 3, 198 nodeBlend2 = 4, 199 nodeBlend3 = 5, 200 nodeBlend4 = 6, 201 nodeTimescale = 7, 202 nodeTimeseek = 8, 203 nodeTransition = 9, 204 } 205 /** 206 Adds a `type` node to the graph with name `id`. 207 */ 208 void addNode(in long type, in String id) 209 { 210 checkClassBinding!(typeof(this))(); 211 ptrcall!(void)(GDNativeClassBinding.addNode, _godot_object, type, id); 212 } 213 /** 214 Shifts position in the animation timeline. `delta` is the time in seconds to shift. Events between the current frame and `delta` are handled. 215 */ 216 void advance(in double delta) 217 { 218 checkClassBinding!(typeof(this))(); 219 ptrcall!(void)(GDNativeClassBinding.advance, _godot_object, delta); 220 } 221 /** 222 Returns the $(D AnimationPlayer)'s $(D Animation) bound to the $(D AnimationTreePlayer)'s animation node with name `id`. 223 */ 224 Ref!Animation animationNodeGetAnimation(in String id) const 225 { 226 checkClassBinding!(typeof(this))(); 227 return ptrcall!(Animation)(GDNativeClassBinding.animationNodeGetAnimation, _godot_object, id); 228 } 229 /** 230 Returns the name of the $(D masterPlayer)'s $(D Animation) bound to this animation node. 231 */ 232 String animationNodeGetMasterAnimation(in String id) const 233 { 234 checkClassBinding!(typeof(this))(); 235 return ptrcall!(String)(GDNativeClassBinding.animationNodeGetMasterAnimation, _godot_object, id); 236 } 237 /** 238 Returns the absolute playback timestamp of the animation node with name `id`. 239 */ 240 double animationNodeGetPosition(in String id) const 241 { 242 checkClassBinding!(typeof(this))(); 243 return ptrcall!(double)(GDNativeClassBinding.animationNodeGetPosition, _godot_object, id); 244 } 245 /** 246 Binds a new $(D Animation) from the $(D masterPlayer) to the $(D AnimationTreePlayer)'s animation node with name `id`. 247 */ 248 void animationNodeSetAnimation(in String id, Animation animation) 249 { 250 checkClassBinding!(typeof(this))(); 251 ptrcall!(void)(GDNativeClassBinding.animationNodeSetAnimation, _godot_object, id, animation); 252 } 253 /** 254 If `enable` is `true`, the animation node with ID `id` turns off the track modifying the property at `path`. The modified node's children continue to animate. 255 */ 256 void animationNodeSetFilterPath(NodePathArg1)(in String id, in NodePathArg1 path, in bool enable) 257 { 258 checkClassBinding!(typeof(this))(); 259 ptrcall!(void)(GDNativeClassBinding.animationNodeSetFilterPath, _godot_object, id, path, enable); 260 } 261 /** 262 Binds the $(D Animation) named `source` from $(D masterPlayer) to the animation node `id`. Recalculates caches. 263 */ 264 void animationNodeSetMasterAnimation(in String id, in String source) 265 { 266 checkClassBinding!(typeof(this))(); 267 ptrcall!(void)(GDNativeClassBinding.animationNodeSetMasterAnimation, _godot_object, id, source); 268 } 269 /** 270 Returns whether node `id` and `dst_id` are connected at the specified slot. 271 */ 272 bool areNodesConnected(in String id, in String dst_id, in long dst_input_idx) const 273 { 274 checkClassBinding!(typeof(this))(); 275 return ptrcall!(bool)(GDNativeClassBinding.areNodesConnected, _godot_object, id, dst_id, dst_input_idx); 276 } 277 /** 278 Returns the blend amount of a Blend2 node given its name. 279 */ 280 double blend2NodeGetAmount(in String id) const 281 { 282 checkClassBinding!(typeof(this))(); 283 return ptrcall!(double)(GDNativeClassBinding.blend2NodeGetAmount, _godot_object, id); 284 } 285 /** 286 Sets the blend amount of a Blend2 node given its name and value. 287 A Blend2 node blends two animations (A and B) with the amount between 0 and 1. 288 At 0, output is input A. Towards 1, the influence of A gets lessened, the influence of B gets raised. At 1, output is input B. 289 */ 290 void blend2NodeSetAmount(in String id, in double blend) 291 { 292 checkClassBinding!(typeof(this))(); 293 ptrcall!(void)(GDNativeClassBinding.blend2NodeSetAmount, _godot_object, id, blend); 294 } 295 /** 296 If `enable` is `true`, the Blend2 node with name `id` turns off the track modifying the property at `path`. The modified node's children continue to animate. 297 */ 298 void blend2NodeSetFilterPath(NodePathArg1)(in String id, in NodePathArg1 path, in bool enable) 299 { 300 checkClassBinding!(typeof(this))(); 301 ptrcall!(void)(GDNativeClassBinding.blend2NodeSetFilterPath, _godot_object, id, path, enable); 302 } 303 /** 304 Returns the blend amount of a Blend3 node given its name. 305 */ 306 double blend3NodeGetAmount(in String id) const 307 { 308 checkClassBinding!(typeof(this))(); 309 return ptrcall!(double)(GDNativeClassBinding.blend3NodeGetAmount, _godot_object, id); 310 } 311 /** 312 Sets the blend amount of a Blend3 node given its name and value. 313 A Blend3 Node blends three animations (A, B-, B+) with the amount between -1 and 1. 314 At -1, output is input B-. From -1 to 0, the influence of B- gets lessened, the influence of A gets raised and the influence of B+ is 0. At 0, output is input A. From 0 to 1, the influence of A gets lessened, the influence of B+ gets raised and the influence of B+ is 0. At 1, output is input B+. 315 */ 316 void blend3NodeSetAmount(in String id, in double blend) 317 { 318 checkClassBinding!(typeof(this))(); 319 ptrcall!(void)(GDNativeClassBinding.blend3NodeSetAmount, _godot_object, id, blend); 320 } 321 /** 322 Returns the blend amount of a Blend4 node given its name. 323 */ 324 Vector2 blend4NodeGetAmount(in String id) const 325 { 326 checkClassBinding!(typeof(this))(); 327 return ptrcall!(Vector2)(GDNativeClassBinding.blend4NodeGetAmount, _godot_object, id); 328 } 329 /** 330 Sets the blend amount of a Blend4 node given its name and value. 331 A Blend4 Node blends two pairs of animations. 332 The two pairs are blended like Blend2 and then added together. 333 */ 334 void blend4NodeSetAmount(in String id, in Vector2 blend) 335 { 336 checkClassBinding!(typeof(this))(); 337 ptrcall!(void)(GDNativeClassBinding.blend4NodeSetAmount, _godot_object, id, blend); 338 } 339 /** 340 Connects node `id` to `dst_id` at the specified input slot. 341 */ 342 GodotError connectNodes(in String id, in String dst_id, in long dst_input_idx) 343 { 344 checkClassBinding!(typeof(this))(); 345 return ptrcall!(GodotError)(GDNativeClassBinding.connectNodes, _godot_object, id, dst_id, dst_input_idx); 346 } 347 /** 348 Disconnects nodes connected to `id` at the specified input slot. 349 */ 350 void disconnectNodes(in String id, in long dst_input_idx) 351 { 352 checkClassBinding!(typeof(this))(); 353 ptrcall!(void)(GDNativeClassBinding.disconnectNodes, _godot_object, id, dst_input_idx); 354 } 355 /** 356 357 */ 358 AnimationTreePlayer.AnimationProcessMode getAnimationProcessMode() const 359 { 360 checkClassBinding!(typeof(this))(); 361 return ptrcall!(AnimationTreePlayer.AnimationProcessMode)(GDNativeClassBinding.getAnimationProcessMode, _godot_object); 362 } 363 /** 364 365 */ 366 NodePath getBasePath() const 367 { 368 checkClassBinding!(typeof(this))(); 369 return ptrcall!(NodePath)(GDNativeClassBinding.getBasePath, _godot_object); 370 } 371 /** 372 373 */ 374 NodePath getMasterPlayer() const 375 { 376 checkClassBinding!(typeof(this))(); 377 return ptrcall!(NodePath)(GDNativeClassBinding.getMasterPlayer, _godot_object); 378 } 379 /** 380 Returns a $(D PoolStringArray) containing the name of all nodes. 381 */ 382 PoolStringArray getNodeList() 383 { 384 checkClassBinding!(typeof(this))(); 385 return ptrcall!(PoolStringArray)(GDNativeClassBinding.getNodeList, _godot_object); 386 } 387 /** 388 389 */ 390 bool isActive() const 391 { 392 checkClassBinding!(typeof(this))(); 393 return ptrcall!(bool)(GDNativeClassBinding.isActive, _godot_object); 394 } 395 /** 396 Returns the mix amount of a Mix node given its name. 397 */ 398 double mixNodeGetAmount(in String id) const 399 { 400 checkClassBinding!(typeof(this))(); 401 return ptrcall!(double)(GDNativeClassBinding.mixNodeGetAmount, _godot_object, id); 402 } 403 /** 404 Sets the mix amount of a Mix node given its name and value. 405 A Mix node adds input b to input a by the amount given by ratio. 406 */ 407 void mixNodeSetAmount(in String id, in double ratio) 408 { 409 checkClassBinding!(typeof(this))(); 410 ptrcall!(void)(GDNativeClassBinding.mixNodeSetAmount, _godot_object, id, ratio); 411 } 412 /** 413 Check if a node exists (by name). 414 */ 415 bool nodeExists(in String node) const 416 { 417 checkClassBinding!(typeof(this))(); 418 return ptrcall!(bool)(GDNativeClassBinding.nodeExists, _godot_object, node); 419 } 420 /** 421 Returns the input count for a given node. Different types of nodes have different amount of inputs. 422 */ 423 long nodeGetInputCount(in String id) const 424 { 425 checkClassBinding!(typeof(this))(); 426 return ptrcall!(long)(GDNativeClassBinding.nodeGetInputCount, _godot_object, id); 427 } 428 /** 429 Returns the input source for a given node input. 430 */ 431 String nodeGetInputSource(in String id, in long idx) const 432 { 433 checkClassBinding!(typeof(this))(); 434 return ptrcall!(String)(GDNativeClassBinding.nodeGetInputSource, _godot_object, id, idx); 435 } 436 /** 437 Returns position of a node in the graph given its name. 438 */ 439 Vector2 nodeGetPosition(in String id) const 440 { 441 checkClassBinding!(typeof(this))(); 442 return ptrcall!(Vector2)(GDNativeClassBinding.nodeGetPosition, _godot_object, id); 443 } 444 /** 445 Gets the node type, will return from $(D nodetype) enum. 446 */ 447 AnimationTreePlayer.NodeType nodeGetType(in String id) const 448 { 449 checkClassBinding!(typeof(this))(); 450 return ptrcall!(AnimationTreePlayer.NodeType)(GDNativeClassBinding.nodeGetType, _godot_object, id); 451 } 452 /** 453 Renames a node in the graph. 454 */ 455 GodotError nodeRename(in String node, in String new_name) 456 { 457 checkClassBinding!(typeof(this))(); 458 return ptrcall!(GodotError)(GDNativeClassBinding.nodeRename, _godot_object, node, new_name); 459 } 460 /** 461 Sets the position of a node in the graph given its name and position. 462 */ 463 void nodeSetPosition(in String id, in Vector2 screen_position) 464 { 465 checkClassBinding!(typeof(this))(); 466 ptrcall!(void)(GDNativeClassBinding.nodeSetPosition, _godot_object, id, screen_position); 467 } 468 /** 469 Returns the autostart delay of a OneShot node given its name. 470 */ 471 double oneshotNodeGetAutorestartDelay(in String id) const 472 { 473 checkClassBinding!(typeof(this))(); 474 return ptrcall!(double)(GDNativeClassBinding.oneshotNodeGetAutorestartDelay, _godot_object, id); 475 } 476 /** 477 Returns the autostart random delay of a OneShot node given its name. 478 */ 479 double oneshotNodeGetAutorestartRandomDelay(in String id) const 480 { 481 checkClassBinding!(typeof(this))(); 482 return ptrcall!(double)(GDNativeClassBinding.oneshotNodeGetAutorestartRandomDelay, _godot_object, id); 483 } 484 /** 485 Returns the fade in time of a OneShot node given its name. 486 */ 487 double oneshotNodeGetFadeinTime(in String id) const 488 { 489 checkClassBinding!(typeof(this))(); 490 return ptrcall!(double)(GDNativeClassBinding.oneshotNodeGetFadeinTime, _godot_object, id); 491 } 492 /** 493 Returns the fade out time of a OneShot node given its name. 494 */ 495 double oneshotNodeGetFadeoutTime(in String id) const 496 { 497 checkClassBinding!(typeof(this))(); 498 return ptrcall!(double)(GDNativeClassBinding.oneshotNodeGetFadeoutTime, _godot_object, id); 499 } 500 /** 501 Returns whether a OneShot node will auto restart given its name. 502 */ 503 bool oneshotNodeHasAutorestart(in String id) const 504 { 505 checkClassBinding!(typeof(this))(); 506 return ptrcall!(bool)(GDNativeClassBinding.oneshotNodeHasAutorestart, _godot_object, id); 507 } 508 /** 509 Returns whether a OneShot node is active given its name. 510 */ 511 bool oneshotNodeIsActive(in String id) const 512 { 513 checkClassBinding!(typeof(this))(); 514 return ptrcall!(bool)(GDNativeClassBinding.oneshotNodeIsActive, _godot_object, id); 515 } 516 /** 517 Sets the autorestart property of a OneShot node given its name and value. 518 */ 519 void oneshotNodeSetAutorestart(in String id, in bool enable) 520 { 521 checkClassBinding!(typeof(this))(); 522 ptrcall!(void)(GDNativeClassBinding.oneshotNodeSetAutorestart, _godot_object, id, enable); 523 } 524 /** 525 Sets the autorestart delay of a OneShot node given its name and value in seconds. 526 */ 527 void oneshotNodeSetAutorestartDelay(in String id, in double delay_sec) 528 { 529 checkClassBinding!(typeof(this))(); 530 ptrcall!(void)(GDNativeClassBinding.oneshotNodeSetAutorestartDelay, _godot_object, id, delay_sec); 531 } 532 /** 533 Sets the autorestart random delay of a OneShot node given its name and value in seconds. 534 */ 535 void oneshotNodeSetAutorestartRandomDelay(in String id, in double rand_sec) 536 { 537 checkClassBinding!(typeof(this))(); 538 ptrcall!(void)(GDNativeClassBinding.oneshotNodeSetAutorestartRandomDelay, _godot_object, id, rand_sec); 539 } 540 /** 541 Sets the fade in time of a OneShot node given its name and value in seconds. 542 */ 543 void oneshotNodeSetFadeinTime(in String id, in double time_sec) 544 { 545 checkClassBinding!(typeof(this))(); 546 ptrcall!(void)(GDNativeClassBinding.oneshotNodeSetFadeinTime, _godot_object, id, time_sec); 547 } 548 /** 549 Sets the fade out time of a OneShot node given its name and value in seconds. 550 */ 551 void oneshotNodeSetFadeoutTime(in String id, in double time_sec) 552 { 553 checkClassBinding!(typeof(this))(); 554 ptrcall!(void)(GDNativeClassBinding.oneshotNodeSetFadeoutTime, _godot_object, id, time_sec); 555 } 556 /** 557 If `enable` is `true`, the OneShot node with ID `id` turns off the track modifying the property at `path`. The modified node's children continue to animate. 558 */ 559 void oneshotNodeSetFilterPath(NodePathArg1)(in String id, in NodePathArg1 path, in bool enable) 560 { 561 checkClassBinding!(typeof(this))(); 562 ptrcall!(void)(GDNativeClassBinding.oneshotNodeSetFilterPath, _godot_object, id, path, enable); 563 } 564 /** 565 Starts a OneShot node given its name. 566 */ 567 void oneshotNodeStart(in String id) 568 { 569 checkClassBinding!(typeof(this))(); 570 ptrcall!(void)(GDNativeClassBinding.oneshotNodeStart, _godot_object, id); 571 } 572 /** 573 Stops the OneShot node with name `id`. 574 */ 575 void oneshotNodeStop(in String id) 576 { 577 checkClassBinding!(typeof(this))(); 578 ptrcall!(void)(GDNativeClassBinding.oneshotNodeStop, _godot_object, id); 579 } 580 /** 581 Manually recalculates the cache of track information generated from animation nodes. Needed when external sources modify the animation nodes' state. 582 */ 583 void recomputeCaches() 584 { 585 checkClassBinding!(typeof(this))(); 586 ptrcall!(void)(GDNativeClassBinding.recomputeCaches, _godot_object); 587 } 588 /** 589 Removes the animation node with name `id`. 590 */ 591 void removeNode(in String id) 592 { 593 checkClassBinding!(typeof(this))(); 594 ptrcall!(void)(GDNativeClassBinding.removeNode, _godot_object, id); 595 } 596 /** 597 Resets this $(D AnimationTreePlayer). 598 */ 599 void reset() 600 { 601 checkClassBinding!(typeof(this))(); 602 ptrcall!(void)(GDNativeClassBinding.reset, _godot_object); 603 } 604 /** 605 606 */ 607 void setActive(in bool enabled) 608 { 609 checkClassBinding!(typeof(this))(); 610 ptrcall!(void)(GDNativeClassBinding.setActive, _godot_object, enabled); 611 } 612 /** 613 614 */ 615 void setAnimationProcessMode(in long mode) 616 { 617 checkClassBinding!(typeof(this))(); 618 ptrcall!(void)(GDNativeClassBinding.setAnimationProcessMode, _godot_object, mode); 619 } 620 /** 621 622 */ 623 void setBasePath(NodePathArg0)(in NodePathArg0 path) 624 { 625 checkClassBinding!(typeof(this))(); 626 ptrcall!(void)(GDNativeClassBinding.setBasePath, _godot_object, path); 627 } 628 /** 629 630 */ 631 void setMasterPlayer(NodePathArg0)(in NodePathArg0 nodepath) 632 { 633 checkClassBinding!(typeof(this))(); 634 ptrcall!(void)(GDNativeClassBinding.setMasterPlayer, _godot_object, nodepath); 635 } 636 /** 637 Returns the time scale value of the TimeScale node with name `id`. 638 */ 639 double timescaleNodeGetScale(in String id) const 640 { 641 checkClassBinding!(typeof(this))(); 642 return ptrcall!(double)(GDNativeClassBinding.timescaleNodeGetScale, _godot_object, id); 643 } 644 /** 645 Sets the time scale of the TimeScale node with name `id` to `scale`. 646 The TimeScale node is used to speed $(D Animation)s up if the scale is above 1 or slow them down if it is below 1. 647 If applied after a blend or mix, affects all input animations to that blend or mix. 648 */ 649 void timescaleNodeSetScale(in String id, in double scale) 650 { 651 checkClassBinding!(typeof(this))(); 652 ptrcall!(void)(GDNativeClassBinding.timescaleNodeSetScale, _godot_object, id, scale); 653 } 654 /** 655 Sets the time seek value of the TimeSeek node with name `id` to `seconds`. 656 This functions as a seek in the $(D Animation) or the blend or mix of $(D Animation)s input in it. 657 */ 658 void timeseekNodeSeek(in String id, in double seconds) 659 { 660 checkClassBinding!(typeof(this))(); 661 ptrcall!(void)(GDNativeClassBinding.timeseekNodeSeek, _godot_object, id, seconds); 662 } 663 /** 664 Deletes the input at `input_idx` for the transition node with name `id`. 665 */ 666 void transitionNodeDeleteInput(in String id, in long input_idx) 667 { 668 checkClassBinding!(typeof(this))(); 669 ptrcall!(void)(GDNativeClassBinding.transitionNodeDeleteInput, _godot_object, id, input_idx); 670 } 671 /** 672 Returns the index of the currently evaluated input for the transition node with name `id`. 673 */ 674 long transitionNodeGetCurrent(in String id) const 675 { 676 checkClassBinding!(typeof(this))(); 677 return ptrcall!(long)(GDNativeClassBinding.transitionNodeGetCurrent, _godot_object, id); 678 } 679 /** 680 Returns the number of inputs for the transition node with name `id`. You can add inputs by right-clicking on the transition node. 681 */ 682 long transitionNodeGetInputCount(in String id) const 683 { 684 checkClassBinding!(typeof(this))(); 685 return ptrcall!(long)(GDNativeClassBinding.transitionNodeGetInputCount, _godot_object, id); 686 } 687 /** 688 Returns the cross fade time for the transition node with name `id`. 689 */ 690 double transitionNodeGetXfadeTime(in String id) const 691 { 692 checkClassBinding!(typeof(this))(); 693 return ptrcall!(double)(GDNativeClassBinding.transitionNodeGetXfadeTime, _godot_object, id); 694 } 695 /** 696 Returns `true` if the input at `input_idx` on the transition node with name `id` is set to automatically advance to the next input upon completion. 697 */ 698 bool transitionNodeHasInputAutoAdvance(in String id, in long input_idx) const 699 { 700 checkClassBinding!(typeof(this))(); 701 return ptrcall!(bool)(GDNativeClassBinding.transitionNodeHasInputAutoAdvance, _godot_object, id, input_idx); 702 } 703 /** 704 The transition node with name `id` sets its current input at `input_idx`. 705 */ 706 void transitionNodeSetCurrent(in String id, in long input_idx) 707 { 708 checkClassBinding!(typeof(this))(); 709 ptrcall!(void)(GDNativeClassBinding.transitionNodeSetCurrent, _godot_object, id, input_idx); 710 } 711 /** 712 The transition node with name `id` advances to its next input automatically when the input at `input_idx` completes. 713 */ 714 void transitionNodeSetInputAutoAdvance(in String id, in long input_idx, in bool enable) 715 { 716 checkClassBinding!(typeof(this))(); 717 ptrcall!(void)(GDNativeClassBinding.transitionNodeSetInputAutoAdvance, _godot_object, id, input_idx, enable); 718 } 719 /** 720 Resizes the number of inputs available for the transition node with name `id`. 721 */ 722 void transitionNodeSetInputCount(in String id, in long count) 723 { 724 checkClassBinding!(typeof(this))(); 725 ptrcall!(void)(GDNativeClassBinding.transitionNodeSetInputCount, _godot_object, id, count); 726 } 727 /** 728 The transition node with name `id` sets its cross fade time to `time_sec`. 729 */ 730 void transitionNodeSetXfadeTime(in String id, in double time_sec) 731 { 732 checkClassBinding!(typeof(this))(); 733 ptrcall!(void)(GDNativeClassBinding.transitionNodeSetXfadeTime, _godot_object, id, time_sec); 734 } 735 /** 736 If `true`, the $(D AnimationTreePlayer) is able to play animations. 737 */ 738 @property bool active() 739 { 740 return isActive(); 741 } 742 /// ditto 743 @property void active(bool v) 744 { 745 setActive(v); 746 } 747 /** 748 The node from which to relatively access other nodes. 749 It accesses the bones, so it should point to the same node the $(D AnimationPlayer) would point its Root Node at. 750 */ 751 @property NodePath basePath() 752 { 753 return getBasePath(); 754 } 755 /// ditto 756 @property void basePath(NodePath v) 757 { 758 setBasePath(v); 759 } 760 /** 761 The path to the $(D AnimationPlayer) from which this $(D AnimationTreePlayer) binds animations to animation nodes. 762 Once set, $(D Animation) nodes can be added to the $(D AnimationTreePlayer). 763 */ 764 @property NodePath masterPlayer() 765 { 766 return getMasterPlayer(); 767 } 768 /// ditto 769 @property void masterPlayer(NodePath v) 770 { 771 setMasterPlayer(v); 772 } 773 /** 774 The thread in which to update animations. 775 */ 776 @property AnimationTreePlayer.AnimationProcessMode playbackProcessMode() 777 { 778 return getAnimationProcessMode(); 779 } 780 /// ditto 781 @property void playbackProcessMode(long v) 782 { 783 setAnimationProcessMode(v); 784 } 785 }