This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import bpy | |
import bmesh | |
import math | |
from mathutils import Euler | |
def get_rotation_from_source(ob: bpy.types.Object) -> Euler: | |
"""Get rotation from Cursor or Object, and set-it to the new items""" | |
bm = bmesh.new() | |
bm.from_object(ob, bpy.context.evaluated_depsgraph_get()) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
def rename_with_prefix(path_rename, prefix: str = 'T_QUAJ_HDRI_'): | |
for root, folders, files in os.walk(path_rename): | |
for file in files: | |
print(f'Rename {os.path.join(root, file)}') | |
os.rename(os.path.join(root, file), os.path.join(root, f'{prefix}{file}')) | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
""" | |
This file provides a class to connect to the Livebox router | |
and get his public IP address. | |
The Livebox router is provided by Orange, a French ISP. | |
Usage | |
----- | |
$ python livebox-ip.py |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ErrorTest(Exception): | |
""" A message about one error""" | |
pass | |
class ExceptTest(Exception): | |
""" A message about one error""" | |
pass | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ***** BEGIN GPL LICENSE BLOCK ***** | |
# | |
# | |
# This program is free software; you can redistribute it and/or | |
# modify it under the terms of the GNU General Public License | |
# as published by the Free Software Foundation; either version 2 | |
# of the License, or (at your option) any later version. | |
# | |
# This program is distributed in the hope that it will be useful, | |
# but WITHOUT ANY WARRANTY; without even the implied warranty of |