mirror of
https://github.com/godotengine/godot.git
synced 2024-10-22 21:21:53 +00:00
Compare commits
4 Commits
661fb27f58
...
fe1c916ee8
Author | SHA1 | Date | |
---|---|---|---|
|
fe1c916ee8 | ||
|
533c616cb8 | ||
|
ef07891cbc | ||
|
d5d509bbd6 |
|
@ -1161,12 +1161,12 @@ void AnimationNodeStateMachineEditor::_state_machine_draw() {
|
|||
for (int i = 0; i < transition_lines.size(); i++) {
|
||||
TransitionLine tl = transition_lines[i];
|
||||
if (!tl.hidden) {
|
||||
float opacity = 0.25; // Default to reduced opacity
|
||||
float opacity = 0.2; // Default to reduced opacity
|
||||
|
||||
if (selected_transition_from != StringName() && selected_transition_to != StringName()) {
|
||||
// A transition is selected
|
||||
if ((tl.from_node == selected_transition_from && tl.to_node == selected_transition_to) || (tl.from_node == selected_transition_to && tl.to_node == selected_transition_from)) {
|
||||
opacity = 1.0; // Full opacity for the selected transition
|
||||
opacity = 1.0; // Full opacity for the selected transition pair
|
||||
}
|
||||
} else if (!connected_nodes.is_empty()) {
|
||||
// A node is selected
|
||||
|
@ -1205,11 +1205,11 @@ void AnimationNodeStateMachineEditor::_state_machine_draw() {
|
|||
if (selected_transition_from != StringName() && selected_transition_to != StringName()) {
|
||||
// A transition is selected
|
||||
if (name != selected_transition_from && name != selected_transition_to) {
|
||||
opacity = 0.25;
|
||||
opacity = 0.2;
|
||||
}
|
||||
} else if (!connected_nodes.is_empty() && !connected_nodes.has(name)) {
|
||||
// A node is selected, keep existing behavior
|
||||
opacity = 0.25;
|
||||
// A node is selected
|
||||
opacity = 0.2;
|
||||
}
|
||||
|
||||
Ref<StyleBox> original_style = is_selected ? theme_cache.node_frame_selected : theme_cache.node_frame;
|
||||
|
|
|
@ -7260,6 +7260,10 @@ void RenderingDevice::_bind_methods() {
|
|||
BIND_ENUM_CONSTANT(DEBUG_PASS);
|
||||
}
|
||||
|
||||
void RenderingDevice::make_current() {
|
||||
render_thread_id = Thread::get_caller_id();
|
||||
}
|
||||
|
||||
RenderingDevice::~RenderingDevice() {
|
||||
finalize();
|
||||
|
||||
|
|
|
@ -1496,6 +1496,8 @@ public:
|
|||
|
||||
static RenderingDevice *get_singleton();
|
||||
|
||||
void make_current();
|
||||
|
||||
RenderingDevice();
|
||||
~RenderingDevice();
|
||||
|
||||
|
|
|
@ -370,6 +370,8 @@ Size2i RenderingServerDefault::get_maximum_viewport_size() const {
|
|||
void RenderingServerDefault::_assign_mt_ids(WorkerThreadPool::TaskID p_pump_task_id) {
|
||||
server_thread = Thread::get_caller_id();
|
||||
server_task_id = p_pump_task_id;
|
||||
// This is needed because the main RD is created on the main thread.
|
||||
RenderingDevice::get_singleton()->make_current();
|
||||
}
|
||||
|
||||
void RenderingServerDefault::_thread_exit() {
|
||||
|
|
Loading…
Reference in New Issue
Block a user