add region keyword for better code navigation in utils
This commit is contained in:
parent
2b198d03c9
commit
9289b2ed6d
24
utils.py
24
utils.py
@ -144,7 +144,7 @@ def object_derived_get(ob, scene):
|
||||
|
||||
|
||||
# -----------------
|
||||
### Bmesh
|
||||
# region Bmesh
|
||||
# -----------------
|
||||
|
||||
def link_vert(v,ordered_vert) :
|
||||
@ -219,7 +219,7 @@ def gp_stroke_to_bmesh(strokes):
|
||||
|
||||
|
||||
# -----------------
|
||||
### GP Drawing
|
||||
# region GP Drawing
|
||||
# -----------------
|
||||
|
||||
def layer_active_index(gpl):
|
||||
@ -393,7 +393,7 @@ def remapping(value, leftMin, leftMax, rightMin, rightMax):
|
||||
return rightMin + (valueScaled * rightSpan)
|
||||
|
||||
# -----------------
|
||||
### GP funcs
|
||||
# region GP funcs
|
||||
# -----------------
|
||||
|
||||
def get_gp_draw_plane(obj=None, orient=None):
|
||||
@ -753,7 +753,7 @@ def copy_frame_at(source_frame, layer, frame_number):
|
||||
# print(f"frame copy execution time: {frame_copy_end - frame_copy_start} seconds") # time_dbg
|
||||
|
||||
# -----------------
|
||||
### Vector utils 3d
|
||||
# region Vector utils 3d
|
||||
# -----------------
|
||||
|
||||
def matrix_transform(coords, matrix):
|
||||
@ -814,7 +814,7 @@ def extrapolate_points_by_length(a,b, length):
|
||||
return b + (ab.normalized() * length)
|
||||
|
||||
# -----------------
|
||||
### Vector utils 2d
|
||||
# region Vector utils 2d
|
||||
# -----------------
|
||||
|
||||
|
||||
@ -867,7 +867,7 @@ def midpoint_2d(p1, p2):
|
||||
|
||||
|
||||
# -----------------
|
||||
### Collection management
|
||||
# region Collection management
|
||||
# -----------------
|
||||
|
||||
def set_collection(ob, collection, unlink=True) :
|
||||
@ -903,7 +903,7 @@ def set_collection(ob, collection, unlink=True) :
|
||||
|
||||
|
||||
# -----------------
|
||||
### Path utils
|
||||
# region Path utils
|
||||
# -----------------
|
||||
|
||||
def get_addon_prefs():
|
||||
@ -1048,7 +1048,7 @@ def show_message_box(_message = "", _title = "Message Box", _icon = 'INFO'):
|
||||
bpy.context.window_manager.popup_menu(draw, title = _title, icon = _icon)
|
||||
|
||||
# -----------------
|
||||
### UI utils
|
||||
# region UI utils
|
||||
# -----------------
|
||||
|
||||
def refresh_areas():
|
||||
@ -1164,7 +1164,7 @@ def draw_kmi(km, kmi, layout):
|
||||
# layout.context_pointer_set("keymap", km)
|
||||
|
||||
# -----------------
|
||||
### linking utility
|
||||
# region linking utility
|
||||
# -----------------
|
||||
|
||||
def link_objects_in_blend(filepath, obj_name_list, link=True):
|
||||
@ -1192,7 +1192,7 @@ def check_objects_in_blend(filepath, avoid_camera=True):
|
||||
|
||||
|
||||
# -----------------
|
||||
### props handling
|
||||
# region props handling
|
||||
# -----------------
|
||||
|
||||
def iterate_selector(zone, attr, state, info_attr = None, active_access='active'):
|
||||
@ -1256,7 +1256,7 @@ def iterate_active_layer(gpd, state):
|
||||
# return info, bottom
|
||||
|
||||
# -----------------
|
||||
### Curve handle
|
||||
# region Curve handle
|
||||
# -----------------
|
||||
|
||||
def create_curve(location=(0,0,0), direction=(1,0,0), name='curve_path', enter_edit=True, context=None):
|
||||
@ -1404,7 +1404,7 @@ def create_follow_path_constraint(ob, curve, follow_curve=False, use_fixed_locat
|
||||
|
||||
|
||||
# -----------------
|
||||
### Object
|
||||
# region Object
|
||||
# -----------------
|
||||
|
||||
def go_edit_mode(ob, context=None):
|
||||
|
Loading…
x
Reference in New Issue
Block a user