Skip to content

Commit

Permalink
Fixed node screenshot capture script
Browse files Browse the repository at this point in the history
RodZill4 committed Jan 23, 2022
1 parent 55e61b0 commit 12f9978
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion material_maker/panels/library/library.gd
Original file line number Diff line number Diff line change
@@ -189,7 +189,7 @@ func generate_screenshots(graph_edit, item : TreeItem = null) -> int:
yield(timer, "timeout")
var image = get_viewport().get_texture().get_data()
image.flip_y()
image = image.get_rect(Rect2(new_nodes[0].rect_global_position-Vector2(1, 2), new_nodes[0].rect_size+Vector2(4, 4)))
image = image.get_rect(Rect2(new_nodes[0].rect_global_position, new_nodes[0].rect_size+Vector2(0, 2)))
print(get_icon_name(get_item_path(item)))
image.save_png("res://material_maker/doc/images/node_"+get_icon_name(get_item_path(item))+".png")
for n in new_nodes:

0 comments on commit 12f9978

Please sign in to comment.