I want to transofrm.translate a selected object from a custom node based on the "Custom Node" template python codes.So i make a button just like the translate when you press T in the draw function.Heres is the snippet

 # Additional buttons displayed on the node.
def draw_buttons(self, context, layout):
    layout.label("Node settings")
    layout.prop(self, "myFloatProperty")
    #col.operator("transform.edge_slide", text="Slide Edge")

.This is what i get enter image description here

but when i press the button, only the node moves.the selected object doenst move.

How can i make it so that when i press it,it works exactly like when i press it on the T panel?


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.