Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | 2439905184 |
I am creating a 3d pose bone plugin .
how to chang skelenton bone pose by using plugin
and see it in editor
Do I really need to create a main scene plugin to change the other scene’s node’s property
here is my work
tool
extends EditorPlugin
var slide=preload(“res://addons/bone/Panel.tscn”).instance()
func _enter_tree():
add_control_to_dock(DOCK_SLOT_LEFT_UL,slide)
pass
func _exit_tree():
remove_control_from_docks(slide)
pass
this is in a tscn ,panel.gd (root node )
func _on_HSlider_value_changed(value):
emit_signal(“Xin_hao_rotate”)
pass
this is in my game scene skelenton.gd
func _on_Panel_Xin_hao_rotate():
spatial.rotation_degrees.x+=1
print(“xingao”)
set_bone_pose(0,spatial.get_transform())
I use print here try to print things .but It doesn’t print
I tried to use AutoLoad function and global Variable to do this
But the editor says invalid call .
so can any one give a help?
I tried use a similar plugin in assetlib,but it doesn’t work .
So I want to create my own plugin .
godot 3.2 stable
Just saying, but someone is working on a built-in way to edit bone poses in this pull request. It might be merged in Godot 4.0.
Calinou | 2020-03-05 08:34
Could you format the question by indenting the code a few spaces? Sorry, but its hard to read. Thank you.
CharlesMerriam | 2022-05-22 04:24