void AnimationNodeBlendTreeEditor::_node_changed(ObjectID p_node) {

	AnimationNode *an = Object::cast_to<AnimationNode>(ObjectDB::get_instance(p_node));
	if (an && an->get_parent() == blend_tree) {
		_update_graph();
	}
}
void VisualShaderEditor::_node_changed(int p_id) {
	if (updating)
		return;

	if (is_visible_in_tree()) {
		_update_graph();
	}
}
Exemplo n.º 3
0
// TimeSlice Interface
void
dmz::QtPluginGraph::update_time_slice (const Float64 TimeDelta) {

    if (_graphDirty) {
        _update_graph ();
        _graphDirty = False;
    }
}
void VisualShaderEditor::_notification(int p_what) {

	if (p_what == NOTIFICATION_ENTER_TREE || p_what == NOTIFICATION_THEME_CHANGED) {

		error_panel->add_style_override("panel", get_stylebox("bg", "Tree"));
		error_label->add_color_override("font_color", get_color("error_color", "Editor"));

		if (p_what == NOTIFICATION_THEME_CHANGED && is_visible_in_tree())
			_update_graph();
	}

	if (p_what == NOTIFICATION_PROCESS) {
	}
}
void VisualShaderEditor::edit(VisualShader *p_visual_shader) {

	if (p_visual_shader) {
		visual_shader = Ref<VisualShader>(p_visual_shader);
	} else {
		visual_shader.unref();
	}

	if (visual_shader.is_null()) {
		hide();
	} else {
		_update_graph();
	}
}
void AnimationNodeBlendTreeEditor::edit(AnimationNodeBlendTree *p_blend_tree) {

	if (blend_tree.is_valid()) {
		blend_tree->disconnect("removed_from_graph", this, "_removed_from_graph");
	}

	if (p_blend_tree) {
		blend_tree = Ref<AnimationNodeBlendTree>(p_blend_tree);
	} else {
		blend_tree.unref();
	}

	if (blend_tree.is_null()) {
		hide();
	} else {
		blend_tree->connect("removed_from_graph", this, "_removed_from_graph");

		_update_graph();
	}
}
void AnimationNodeStateMachineEditor::edit(AnimationNodeStateMachine *p_state_machine) {

	if (state_machine.is_valid()) {
		state_machine->disconnect("removed_from_graph", this, "_removed_from_graph");
	}

	if (p_state_machine) {
		state_machine = Ref<AnimationNodeStateMachine>(p_state_machine);
	} else {
		state_machine.unref();
	}

	if (state_machine.is_null()) {
		hide();
	} else {
		state_machine->connect("removed_from_graph", this, "_removed_from_graph");

		selected_transition_from = StringName();
		selected_transition_to = StringName();
		selected_node = StringName();
		_update_mode();
		_update_graph();
	}
}
void VisualShaderEditor::_mode_selected(int p_id) {
	_update_graph();
}