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 numpy as np | |
| import cv2 | |
| import os | |
| # install all the above packages with pip3 | |
| # run this by setting the directories and calling fro command line | |
| # python3 processImages.py | |
| IMAGEFOLDER = '/Users/anthonyaragues/Downloads/in/' | |
| OUTPUTFOLDER = '/Users/anthonyaragues/Downloads/out/' |
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 | |
| for obj in bpy.context.scene.objects: | |
| if obj.type == 'MESH': | |
| obj.select_set(True) | |
| try: | |
| bpy.context.view_layer.objects.active = obj | |
| bpy.ops.mesh.separate(type='LOOSE') | |
| bpy.ops.object.transform_apply(location=False, rotation=True, scale=True) | |
| except: |
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 | |
| arrObjects = bpy.context.selected_objects | |
| for obj in arrObjects: | |
| obj.select_set(False) | |
| for obj in arrObjects: | |
| obj.select_set(True) |
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 | |
| def changeNodes(objNodeTree): | |
| for objNode in objNodeTree.nodes: | |
| if objNode.type == 'GROUP' and objNode.node_tree: | |
| changeNodes(objNode.node_tree) | |
| # look for the generic mix node from 3.4 to try and make it mixrgb in 3.3 | |
| # [0]Factor, [2]A, [4]B == [0]fac, [1]color1, [2]color2 | |
| elif objNode.type=='' and objNode.inputs[0].name == 'Factor': |
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 | |
| for obj in bpy.context.scene.objects: | |
| obj.select_set(True) | |
| # split the mesh | |
| if obj.type == 'MESH': | |
| bpy.ops.mesh.separate(type='LOOSE') | |
| obj.select_set(False) |
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
| # 1. include this version file | |
| # 2. put a json file online format = { "version": "1.4.0", "message": "upgrade for these new features" } | |
| # 3. point to the url in version.py | |
| # 4. register a prop to show the ui message bpy.types.WindowManager.flex_update = bpy.props.StringProperty(name="Info", default="") | |
| # 5. point to that property name in version.py | |
| # 6. setup the UI to ue that property if populated | |
| #if bpy.context.window_manager.flex_update != "": | |
| # box = layout.box() | |
| # row = box.row(align=True) | |
| # row.alignment = 'EXPAND' |
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
| from bpy.types import ( | |
| GizmoGroup | |
| ) | |
| import bpy | |
| bl_info = { | |
| "name": "POC buttons", | |
| "description": "POC 2D BUTTON script refactored from GP Animator Desk addon", | |
| "author": "Anthony Aragues, P.Świda", | |
| "version": (0, 0, 1), |
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 | |
| objTarget = bpy.context.active_object | |
| for obj in bpy.data.objects: | |
| isSame = True | |
| if obj.type != objTarget.type: | |
| isSame = False | |
| if len(obj.data.vertices) == len(objTarget.data.vertices) and isSame == True: | |
| for i,vert in enumerate(obj.data.vertices): |
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 | |
| objTarget = bpy.context.active_object | |
| for obj in bpy.data.objects: | |
| if obj.data.name[:-4] == objTarget.data.name: | |
| obj.select_set(True) |