Merge branch 'master' into soc-2019-openxr

This commit is contained in:
Julian Eisel 2020-03-05 13:02:11 +01:00
commit c444673d3c
283 changed files with 5228 additions and 5409 deletions

View File

@ -1,6 +1,7 @@
{
"project_id" : "Blender Addons",
"conduit_uri" : "https://developer.blender.org/",
"phabricator.uri" : "https://developer.blender.org/",
"git.default-relative-commit" : "origin/master",
"arc.land.update.default" : "rebase"
}

View File

@ -23,8 +23,8 @@ bl_info = {
"blender": (2, 80, 0),
"location": "View3D > Add > Camera > Dolly or Crane Rig",
"description": "Adds a Camera Rig with UI",
"wiki_url": "https://docs.blender.org/manual/en/dev/addons/"
"camera/camera_rigs.html",
"doc_url": "https://docs.blender.org/manual/en/dev/addons/"
"camera/camera_rigs.html",
"tracker_url": "https://github.com/waylow/add_camera_rigs/issues",
"category": "Camera",
}

View File

@ -28,10 +28,10 @@ bl_info = {
"location": "View3D > Add > Curve > Extra Objects",
"description": "Add extra curve object types",
"warning": "",
"wiki_url": "https://docs.blender.org/manual/en/dev/addons/"
"add_curve/extra_objects.html",
"category": "Add Curve"
}
"doc_url": "https://docs.blender.org/manual/en/dev/addons/"
"add_curve/extra_objects.html",
"category": "Add Curve",
}
if "bpy" in locals():
import importlib

View File

@ -25,8 +25,8 @@ bl_info = {
"location": "View3D > Add > Curve",
"description": "Adds many different types of Curves",
"warning": "",
"wiki_url": "https://wiki.blender.org/index.php/Extensions:2.6/Py/"
"Scripts/Curve/Curves_Galore",
"doc_url": "https://wiki.blender.org/index.php/Extensions:2.6/Py/"
"Scripts/Curve/Curves_Galore",
"category": "Add Curve",
}
"""

View File

@ -9,8 +9,9 @@ bl_info = {
"location": "View3D > Add > Mesh > New Braid",
"description": "Adds a new Braid",
"warning": "",
"wiki_url": "",
"category": "Add Mesh"}
"doc_url": "",
"category": "Add Mesh",
}
"""
import bpy

View File

@ -30,8 +30,9 @@ bl_info = {
"blender": (2, 80, 0),
"location": "View3D > Add > Curve",
"warning": "",
"wiki_url": "https://github.com/BorisTheBrave/celtic-knot/wiki",
"category": "Add Curve"}
"doc_url": "https://github.com/BorisTheBrave/celtic-knot/wiki",
"category": "Add Curve",
}
import bpy
import bmesh

View File

@ -10,9 +10,10 @@ bl_info = {
"location": "View3D > Add > Curve > Curly Curve",
"description": "Adds a new Curly Curve",
"warning": "",
"wiki_url": "https://wiki.blender.org/index.php/Extensions:2.6/"
"Py/Scripts/Curve/Curly_Curves",
"category": "Add Curve"}
"doc_url": "https://wiki.blender.org/index.php/Extensions:2.6/"
"Py/Scripts/Curve/Curly_Curves",
"category": "Add Curve",
}
import bpy
from bpy.types import Operator

View File

@ -24,9 +24,10 @@ bl_info = {
"location": "View3D > Add > Curve",
"description": "Adds Simple Curve",
"warning": "",
"wiki_url": "https://wiki.blender.org/index.php/Extensions:2.6/"
"Py/Scripts/Curve/Simple_curves",
"category": "Add Curve"}
"doc_url": "https://wiki.blender.org/index.php/Extensions:2.6/"
"Py/Scripts/Curve/Simple_curves",
"category": "Add Curve",
}
# ------------------------------------------------------------

View File

@ -9,8 +9,8 @@ bl_info = {
"blender": (2, 80, 0),
"location": "View3D > Add > Curve",
"warning": "",
"wiki_url": "https://wiki.blender.org/index.php/Extensions:2.4/Py/"
"Scripts/Object/Spirals",
"doc_url": "https://wiki.blender.org/index.php/Extensions:2.4/Py/"
"Scripts/Object/Spirals",
"tracker_url": "http://alexvaqp.googlepages.com?"
"func=detail&aid=<number>",
"category": "Add Curve",

View File

@ -26,9 +26,9 @@ bl_info = {
"description": "SpiroFit, BounceSpline and Catenary adds "
"splines to selected mesh or objects",
"warning": "",
"wiki_url": "",
"doc_url": "",
"category": "Object",
}
}
import bpy
from bpy.types import (

View File

@ -25,9 +25,10 @@ bl_info = {
"location": "View3D > Add > Curve",
"description": "Adds many types of (torus) knots",
"warning": "",
"wiki_url": "https://wiki.blender.org/index.php/Extensions:2.6/Py/"
"Scripts/Curve/Torus_Knot",
"category": "Add Curve"}
"doc_url": "https://wiki.blender.org/index.php/Extensions:2.6/Py/"
"Scripts/Curve/Torus_Knot",
"category": "Add Curve",
}
"""
import bpy

View File

@ -8,7 +8,7 @@ bl_info = {
"blender": (2, 80, 0),
"location": "View3D > Add > Surface",
"warning": "",
"wiki_url": "",
"doc_url": "",
"category": "Add Mesh"
}

View File

@ -25,9 +25,10 @@ bl_info = {
"location": "View3D > Object > Bevel/Taper",
"description": "Adds bevel and/or taper curve to active curve",
"warning": "",
"wiki_url": "https://wiki.blender.org/index.php/Extensions:2.6/"
"Py/Scripts/Curve/Bevel_-Taper_Curve",
"category": "Curve"}
"doc_url": "https://wiki.blender.org/index.php/Extensions:2.6/"
"Py/Scripts/Curve/Bevel_-Taper_Curve",
"category": "Curve",
}
import bpy

View File

@ -27,8 +27,8 @@ bl_info = {
"description": "Adds generated ivy to a mesh object starting "
"at the 3D cursor",
"warning": "",
"wiki_url": "https://docs.blender.org/manual/en/dev/addons/"
"add_curve/ivy_gen.html",
"doc_url": "https://docs.blender.org/manual/en/dev/addons/"
"add_curve/ivy_gen.html",
"category": "Add Curve",
}

View File

@ -26,9 +26,10 @@ bl_info = {
"description": ("Adds a parametric tree. The method is presented by "
"Jason Weber & Joseph Penn in their paper 'Creation and Rendering of "
"Realistic Trees'"),
"wiki_url": "https://docs.blender.org/manual/en/dev/addons/"
"add_curve/sapling.html",
"category": "Add Curve"}
"doc_url": "https://docs.blender.org/manual/en/dev/addons/"
"add_curve/sapling.html",
"category": "Add Curve",
}
if "bpy" in locals():
import importlib

View File

@ -23,8 +23,8 @@ bl_info = {
"blender": (2, 80, 0),
"location": "View3D > Add > Mesh",
"description": "Add a bolt or nut",
"wiki_url": "https://docs.blender.org/manual/en/dev/addons/"
"add_mesh/boltfactory.html",
"doc_url": "https://docs.blender.org/manual/en/dev/addons/"
"add_mesh/boltfactory.html",
"category": "Add Mesh",
}
@ -45,7 +45,7 @@ import bpy
def register():
Boltfactory.register()
Boltfactory.register()

View File

@ -27,8 +27,8 @@ bl_info = {
"location": "View3D > Add > Mesh",
"description": "Add Discombobulator",
"warning": "",
"wiki_url": "https://docs.blender.org/manual/en/dev/addons/"
"add_mesh/discombobulator.html",
"doc_url": "https://docs.blender.org/manual/en/dev/addons/"
"add_mesh/discombobulator.html",
"category": "Add Mesh",
}

View File

@ -31,8 +31,8 @@ bl_info = {
"location": "View3D > Add > Mesh",
"description": "Add extra mesh object types",
"warning": "",
"wiki_url": "https://docs.blender.org/manual/en/dev/addons/"
"add_mesh/mesh_extra_objects.html",
"doc_url": "https://docs.blender.org/manual/en/dev/addons/"
"add_mesh/mesh_extra_objects.html",
"category": "Add Mesh",
}

View File

@ -39,10 +39,11 @@ bl_info = {
"blender": (2, 80, 0),
"location": "View3D > Add > Rock Generator",
"description": "Adds a mesh rock to the Add Mesh menu",
"wiki_url": "http://wiki.blender.org/index.php/Extensions:2.6/Py/"
"doc_url": "http://wiki.blender.org/index.php/Extensions:2.6/Py/"
"Scripts/Add_Mesh/Rock_Generator",
"tracker_url": "https://developer.blender.org/maniphest/task/edit/form/2/",
"category": "Add Mesh"}
"category": "Add Mesh",
}
if "bpy" in locals():
import importlib

View File

@ -8,9 +8,10 @@ bl_info = {
"blender": (2, 68, 0),
"location": "View3D > Add > Mesh",
"warning": "First Version",
"wiki_url": "https://wiki.blender.org/index.php/Extensions:2.6/Py/"
"Scripts/Triangles",
"category": "Add Mesh"}
"doc_url": "https://wiki.blender.org/index.php/Extensions:2.6/Py/"
"Scripts/Triangles",
"category": "Add Mesh",
}
"""
This script provides a triangle mesh primitive

View File

@ -27,9 +27,10 @@ bl_info = {
"location": "View3D > Add > Mesh",
"description": "Create geodesic dome type objects.",
"warning": "",
"wiki_url": "https://docs.blender.org/manual/en/dev/addons/"
"add_mesh/geodesic_domes.html",
"category": "Add Mesh"}
"doc_url": "https://docs.blender.org/manual/en/dev/addons/"
"add_mesh/geodesic_domes.html",
"category": "Add Mesh",
}
if "bpy" in locals():
import importlib

View File

@ -91,7 +91,7 @@ bl_info = {
"location": "Everywhere!",
"description": "A collection of tools and settings to improve productivity",
"warning": "",
"wiki_url": "https://pablovazquez.art/amaranth",
"doc_url": "https://pablovazquez.art/amaranth",
"tracker_url": "https://developer.blender.org/maniphest/task/edit/form/2/",
"category": "Interface",
}

View File

@ -25,8 +25,8 @@ bl_info = {
"blender": (2, 80, 0),
"location": "Object Data > Shape Keys Specials or Search",
"description": "Creates a corrective shape key for the current pose",
"wiki_url": "https://docs.blender.org/manual/en/dev/addons/"
"animation/corrective_shape_keys.html",
"doc_url": "https://docs.blender.org/manual/en/dev/addons/"
"animation/corrective_shape_keys.html",
"category": "Animation",
}

View File

@ -24,8 +24,8 @@ bl_info = {
"location": "3D View > Toolbox > Animation tab > AnimAll",
"description": "Allows animation of mesh, lattice, curve and surface data",
"warning": "",
"wiki_url": "https://docs.blender.org/manual/en/dev/addons/"
"animation/animall.html",
"doc_url": "https://docs.blender.org/manual/en/dev/addons/"
"animation/animall.html",
"category": "Animation",
}

View File

@ -27,8 +27,8 @@ bl_info = {
"location": "View3D > Sidebar > Create Tab",
"description": "Another Noise Tool: Landscape and Displace",
"warning": "",
"wiki_url": "https://docs.blender.org/manual/en/dev/addons/"
"add_mesh/ant_landscape.html",
"doc_url": "https://docs.blender.org/manual/en/dev/addons/"
"add_mesh/ant_landscape.html",
"category": "Add Mesh",
}

View File

@ -32,8 +32,8 @@ bl_info = {
"version": (1, 2, 2),
"blender": (2, 80, 0),
"description": "Generate rooms, doors, windows, and other architecture objects",
"wiki_url": "https://docs.blender.org/manual/en/dev/addons/"
"add_mesh/archimesh.html",
"doc_url": "https://docs.blender.org/manual/en/dev/addons/"
"add_mesh/archimesh.html",
"category": "Add Mesh"
}

View File

@ -333,10 +333,8 @@ def create_diffuse_material(matname, replace, r, g, b, rv=0.8, gv=0.8, bv=0.8, m
nodes = mat.node_tree.nodes
# support for multilanguage
node = nodes[get_node_index(nodes, 'BSDF_DIFFUSE')]
node = nodes.new('ShaderNodeBsdfDiffuse')
node.name = 'Diffuse BSDF'
node.label = 'Diffuse BSDF'
node.inputs[0].default_value = [r, g, b, 1]
node.location = 200, 320
@ -417,10 +415,8 @@ def create_translucent_material(matname, replace, r, g, b, rv=0.8, gv=0.8, bv=0.
nodes = mat.node_tree.nodes
# support for multilanguage
node = nodes[get_node_index(nodes, 'BSDF_DIFFUSE')]
node = nodes.new('ShaderNodeBsdfDiffuse')
node.name = 'Diffuse BSDF'
node.label = 'Diffuse BSDF'
node.inputs[0].default_value = [r, g, b, 1]
node.location = 200, 320
@ -500,7 +496,8 @@ def create_glass_material(matname, replace, rv=0.333, gv=0.342, bv=0.9):
node.inputs[0].default_value = 0.1
node.location = 690, 290
node = nodes[get_node_index(nodes, 'OUTPUT_MATERIAL')]
node = nodes.new('ShaderNodeOutputMaterial')
node.name = 'OUTPUT_MATERIAL'
node.location = 920, 290
# Connect nodes
@ -786,10 +783,8 @@ def create_fabric_material(matname, replace, r, g, b, rv=0.8, gv=0.636, bv=0.315
nodes = mat.node_tree.nodes
# support for multilanguage
node = nodes[get_node_index(nodes, 'BSDF_DIFFUSE')]
node = nodes.new('ShaderNodeBsdfDiffuse')
node.name = 'Diffuse BSDF'
node.label = 'Diffuse BSDF'
node.inputs[0].default_value = [r, g, b, 1]
node.location = 810, 270

View File

@ -35,7 +35,7 @@ bl_info = {
'blender': (2, 80, 0),
'location': 'View3D > Sidebar > Create > Archipack',
'warning': '',
'wiki_url': 'https://github.com/s-leger/archipack/wiki',
'doc_url': 'https://github.com/s-leger/archipack/wiki',
'tracker_url': 'https://github.com/s-leger/archipack/issues',
'link': 'https://github.com/s-leger/archipack',
'support': 'COMMUNITY',

View File

@ -85,7 +85,7 @@ in vec2 pos;
void main()
{
gl_Position = ModelViewProjectionMatrix * vec4(pos, 0.0, 1.0);
gl_Position = ModelViewProjectionMatrix * vec4(pos, 0.0, 1.0);
}
'''
@ -97,7 +97,7 @@ out vec4 fragColor;
void main()
{
fragColor = color;
fragColor = color;
}
'''

View File

@ -119,4 +119,4 @@ class Keymaps:
k.alt, k.ctrl, k.shift, k.type, k.value, sub, k.name)
file = open(filename, "w")
file.write(str)
file.close()
file.close()

View File

@ -28,8 +28,8 @@ bl_info = {
'location': 'Add-on preferences',
'description':
'Stores your Blender ID credentials for usage with other add-ons',
"wiki_url": "https://docs.blender.org/manual/en/dev/addons/"
"system/blender_id.html",
"doc_url": "https://docs.blender.org/manual/en/dev/addons/"
"system/blender_id.html",
'category': 'System',
'support': 'OFFICIAL',
}

View File

@ -24,8 +24,8 @@ bl_info = {
"location": "View3D > Properties > BlenderKit",
"description": "Online BlenderKit library (materials, models, brushes and more)",
"warning": "",
"wiki_url": "https://youtu.be/1hVgcQhIAo8"
"Scripts/Add_Mesh/BlenderKit",
"doc_url": "https://youtu.be/1hVgcQhIAo8"
"Scripts/Add_Mesh/BlenderKit",
"category": "3D View",
}
@ -1527,6 +1527,11 @@ class BlenderKitAddonPreferences(AddonPreferences):
min=0,
max=20000)
first_run: BoolProperty(
name="First run",
description="Detects if addon was already registered/run.",
default=True
)
# allow_proximity : BoolProperty(
# name="allow proximity data reports",
# description="This sends anonymized proximity data \n \

View File

@ -239,4 +239,3 @@ def unregister():
bpy.utils.unregister_class(KillBgProcess)
if bpy.app.timers.is_registered(bg_update):
bpy.app.timers.unregister(bg_update)

View File

@ -20,4 +20,4 @@
TEXT = (.9, .9, .9, .6)
GREEN = (.9, 1, .9, .6)
RED = (1, .5, .5, .8)
RED = (1, .5, .5, .8)

View File

@ -104,4 +104,4 @@ class SimpleOAuthAuthenticator(object):
return self._get_tokens(authorization_code=authorization_code)
def get_refreshed_token(self, refresh_token):
return self._get_tokens(refresh_token=refresh_token, grant_type="refresh_token")
return self._get_tokens(refresh_token=refresh_token, grant_type="refresh_token")

View File

@ -130,35 +130,38 @@ def fetch_server_data():
first_time = True
last_clipboard = ''
def check_clipboard():
# clipboard monitoring to search assets from web
global last_clipboard
if bpy.context.window_manager.clipboard != last_clipboard:
last_clipboard = bpy.context.window_manager.clipboard
instr = 'asset_base_id:'
# first check if contains asset id, then asset type
if last_clipboard[:len(instr)] == instr:
atstr = 'asset_type:'
ati = last_clipboard.find(atstr)
# this only checks if the asset_type keyword is there but let's the keywords update function do the parsing.
if ati > -1:
search_props = utils.get_search_props()
search_props.search_keywords = last_clipboard
# don't run search after this - assigning to keywords runs the search_update function.
@bpy.app.handlers.persistent
def timer_update():
# this makes a first search after opening blender. showing latest assets.
global first_time
preferences = bpy.context.preferences.addons['blenderkit'].preferences
if first_time:
if first_time:# first time
first_time = False
if preferences.show_on_start:
if preferences.show_on_start or preferences.first_run:
search()
preferences.first_run = False
if preferences.tips_on_start:
ui.get_largest_3dview()
ui.update_ui_size(ui.active_area, ui.active_region)
ui.add_report(text='BlenderKit Tip: ' + random.choice(rtips), timeout=12, color=colors.GREEN)
# clipboard monitoring to search assets from web
global last_clipboard
if bpy.context.window_manager.clipboard != last_clipboard:
last_clipboard = bpy.context.window_manager.clipboard
instr = 'asset_base_id:'
# first check if contains asset id, then asset type
if last_clipboard[:len(instr)] == instr:
atstr = 'asset_type:'
ati = last_clipboard.find(atstr)
#this only checks if the asset_type keyword is there but let's the keywords update function do the parsing.
if ati > -1:
search_props = utils.get_search_props()
search_props.search_keywords = last_clipboard
# don't run search after this - assigning to keywords runs the search_update function.
check_clipboard()
global search_threads
# don't do anything while dragging - this could switch asset during drag, and make results list length different,

View File

@ -103,5 +103,3 @@ def register():
def unregister():
bpy.app.handlers.load_post.remove(scene_load)

View File

@ -1288,10 +1288,7 @@ class AssetBarOperator(bpy.types.Operator):
update_ui_size(self.area, self.region)
if context.region != self.region:
print(time.time(), 'pass through because of region')
print(context.region.type, self.region.type)
return {'PASS_THROUGH'}
# this was here to check if sculpt stroke is running, but obviously that didn't help,
# since the RELEASE event is cought by operator and thus there is no way to detect a stroke has ended...
@ -1313,6 +1310,11 @@ class AssetBarOperator(bpy.types.Operator):
ui_props.draw_tooltip = False
return {'CANCELLED'}
if context.region != self.region:
# print(time.time(), 'pass through because of region')
# print(context.region.type, self.region.type)
return {'PASS_THROUGH'}
if ui_props.down_up == 'UPLOAD':
ui_props.mouse_x = 0
@ -1504,8 +1506,8 @@ class AssetBarOperator(bpy.types.Operator):
asset_search_index = ui_props.active_index
asset_data = sr[asset_search_index]
if not asset_data['can_download']:
message = 'Asset locked. Find out how to unlock Everything and ...'
link_text = 'support all BlenderKit artists.'
message = "Let's support asset creators and Blender development."
link_text = 'Unlock the asset.'
url = paths.get_bkit_url() + '/get-blenderkit/' + asset_data['id'] + '/?from_addon'
bpy.ops.wm.blenderkit_url_dialog('INVOKE_REGION_WIN', url=url, message=message,
link_text=link_text)

View File

@ -470,13 +470,20 @@ class VIEW3D_PT_blenderkit_profile(Panel):
# plan information
# pcoll = icons.icon_collections["main"]
# my_icon = pcoll['free']
# row = layout.row()
# row.label(text='My plan:')
# row.label(text='Free plan', icon_value=my_icon.icon_id)
# layout.operator("wm.url_open", text="Change plan",
# icon='URL').url = paths.get_bkit_url() + paths.BLENDERKIT_PLANS
if me.get('currentPlanName') is not None:
pn = me['currentPlanName']
pcoll = icons.icon_collections["main"]
if pn == 'Free':
my_icon = pcoll['free']
else:
my_icon = pcoll['full']
row = layout.row()
row.label(text='My plan:')
row.label(text='%s plan' % pn, icon_value=my_icon.icon_id)
if pn =='Free':
layout.operator("wm.url_open", text="Change plan",
icon='URL').url = paths.get_bkit_url() + paths.BLENDERKIT_PLANS
# storage statistics
# if me.get('sumAssetFilesSize') is not None: # TODO remove this when production server has these too.

View File

@ -558,4 +558,4 @@ def guard_from_crash():
return False;
if bpy.context.preferences.addons['blenderkit'].preferences is None:
return False;
return True
return True

View File

@ -24,8 +24,8 @@ bl_info = {
"location": "Properties > Object Data (Armature) > Selection Sets",
"description": "List of Bone sets for easy selection while animating",
"warning": "",
"wiki_url": "https://docs.blender.org/manual/en/dev/addons/"
"animation/bone_selection_sets.html",
"doc_url": "https://docs.blender.org/manual/en/dev/addons/"
"animation/bone_selection_sets.html",
"category": "Animation",
}

View File

@ -25,9 +25,10 @@ bl_info = {
"location": "View3D > Sidebar > Create Tab",
"description": "Tools for converting/animating objects/particles into curves",
"warning": "",
"wiki_url": "https://docs.blender.org/manual/en/dev/addons/"
"add_curve/btracer.html",
"category": "Add Curve"}
"doc_url": "https://docs.blender.org/manual/en/dev/addons/"
"add_curve/btracer.html",
"category": "Add Curve",
}
import bpy

View File

@ -565,5 +565,3 @@ class TracerProperties(PropertyGroup):
description="",
default='tool_help'
)

View File

@ -23,9 +23,10 @@ bl_info = {
"blender": (2, 80, 0),
"location": "View3D > Sidebar > View Tab > Turnaround Camera",
"description": "Add a camera rotation around selected object",
"wiki_url": "https://docs.blender.org/manual/en/dev/addons/"
"animation/turnaround_camera.html",
"category": "Animation"}
"doc_url": "https://docs.blender.org/manual/en/dev/addons/"
"animation/turnaround_camera.html",
"category": "Animation",
}
import bpy

View File

@ -24,12 +24,12 @@ bl_info = {
"name": "Assign Shape Keys",
"author": "Shrinivas Kulkarni",
"version": (1, 0, 1),
"blender": (2, 80, 0),
"location": "View 3D > Sidebar > Edit Tab",
"description": "Assigns one or more Bezier curves as shape keys to another Bezier curve",
"doc_url": "https://docs.blender.org/manual/en/dev/addons/"
"add_curve/assign_shape_keys.html",
"category": "Add Curve",
"wiki_url": "https://docs.blender.org/manual/en/dev/addons/"
"add_curve/assign_shape_keys.html",
"blender": (2, 80, 0),
}
alignList = [('minX', 'Min X', 'Align vertices with Min X'),

View File

@ -24,8 +24,8 @@ bl_info = {
"location": "3D View, Dopesheet & Graph Editors",
"description": "Simplify Curves: 3dview, Dopesheet, Graph. Distance Merge: 3d view curve edit",
"warning": "",
"wiki_url": "https://docs.blender.org/manual/en/dev/addons/"
"add_curve/simplify_curves.html",
"doc_url": "https://docs.blender.org/manual/en/dev/addons/"
"add_curve/simplify_curves.html",
"category": "Add Curve",
}

View File

@ -29,10 +29,11 @@ bl_info = {
"blender": (2, 80, 0),
"location": "View3D > Tool Shelf > Edit Tab",
"warning": "WIP",
"wiki_url": "",
"wiki_url": "https://docs.blender.org/manual/en/dev/addons/"
"add_curve/curve_tools.html",
"category": "Add Curve"}
"doc_url": "",
"doc_url": "https://docs.blender.org/manual/en/dev/addons/"
"add_curve/curve_tools.html",
"category": "Add Curve",
}
import os, bpy, importlib, math

View File

@ -22,7 +22,7 @@ bl_info = {
'version': (1, 0, 0),
'blender': (2, 80, 0),
'category': 'Curve',
'wiki_url': 'https://github.com/Lichtso/curve_cad',
'doc_url': 'https://github.com/Lichtso/curve_cad',
'tracker_url': 'https://github.com/lichtso/curve_cad/issues'
}

View File

@ -24,9 +24,10 @@ bl_info = {
'location': 'Curve Tools addon. (N) Panel',
'description': 'Various types of fillet (chamfering)',
'warning': '', # used for warning icon and text in addons panel
'wiki_url': '',
'doc_url': '',
'tracker_url': '',
'category': 'Curve'}
'category': 'Curve',
}
import bpy

View File

@ -23,10 +23,10 @@ END GPL LICENCE BLOCK
bl_info = {
"name": "Curve Outline",
"description": "creates an Outline",
"category": "Object",
"author": "Yann Bertrand (jimflim), Vladimir Spivak (cwolf3d)",
"version": (0, 5),
"blender": (2, 69, 0),
"category": "Object",
}
import bpy

View File

@ -24,9 +24,10 @@ bl_info = {
'location': 'Curve Tools addon. (N) Panel',
'description': 'PathFinder - quick search, selection, removal of splines',
'warning': '', # used for warning icon and text in addons panel
'wiki_url': '',
'doc_url': '',
'tracker_url': '',
'category': 'Curve'}
'category': 'Curve',
}
import time
import threading

View File

@ -30,9 +30,10 @@ bl_info = {
"blender": (2, 80, 0),
"description": "Various dependency graph debugging tools",
"warning": "",
"wiki_url": "",
"doc_url": "",
"tracker_url": "",
"category": "Development"}
"category": "Development",
}
def _get_depsgraph(context):

View File

@ -25,9 +25,10 @@ bl_info = {
"location": "Text Editor > Sidebar > Edit Operator",
"description": "Opens source file of chosen operator or call locations, if source not available",
"warning": "",
"wiki_url": "https://docs.blender.org/manual/en/dev/addons/"
"development/edit_operator.html",
"category": "Development"}
"doc_url": "https://docs.blender.org/manual/en/dev/addons/"
"development/edit_operator.html",
"category": "Development",
}
import bpy
import sys

View File

@ -26,9 +26,9 @@ bl_info = {
"version": (1, 4, 0),
"blender": (2, 80, 0),
"location": "Text Editor > Dev Tab > Icon Viewer",
"wiki_url": "https://docs.blender.org/manual/en/dev/addons/"
"development/icon_viewer.html",
"category": "Development"
"doc_url": "https://docs.blender.org/manual/en/dev/addons/"
"development/icon_viewer.html",
"category": "Development",
}
import bpy

View File

@ -25,9 +25,9 @@ bl_info = {
"blender": (2, 80, 0),
"location": "Text Editor > Sidebar > Dev Tab",
"description": "Find free shortcuts, inform about used and print a key list",
"wiki_url": "https://docs.blender.org/manual/en/dev/addons/"
"development/is_key_free.html",
"category": "Development"
"doc_url": "https://docs.blender.org/manual/en/dev/addons/"
"development/is_key_free.html",
"category": "Development",
}
import bpy

View File

@ -26,8 +26,8 @@ bl_info = {
"location": "File > Import-Export",
"description": "Import-Export BVH from armature objects",
"warning": "",
"wiki_url": "https://docs.blender.org/manual/en/dev/addons/"
"import_export/io_anim_bvh.html",
"doc_url": "https://docs.blender.org/manual/en/dev/addons/"
"import_export/anim_bvh.html",
"support": 'OFFICIAL',
"category": "Import-Export",
}

View File

@ -26,8 +26,8 @@ bl_info = {
"location": "File > Export > Cameras & Markers (.py)",
"description": "Export Cameras & Markers (.py)",
"warning": "",
"wiki_url": "https://docs.blender.org/manual/en/dev/addons/"
"import_export/anim_camera.html",
"doc_url": "https://docs.blender.org/manual/en/dev/addons/"
"import_export/anim_camera.html",
"support": 'OFFICIAL',
"category": "Import-Export",
}

View File

@ -26,8 +26,8 @@ bl_info = {
"location": "File > Import/Export > Nuke (.chan)",
"description": "Import/Export object's animation with nuke",
"warning": "",
"wiki_url": "https://docs.blender.org/manual/en/dev/addons/"
"import_export/anim_nuke_chan.html",
"doc_url": "https://docs.blender.org/manual/en/dev/addons/"
"import_export/anim_nuke_chan.html",
"category": "Import-Export",
}

View File

@ -24,8 +24,8 @@ bl_info = {
"location": "Scene > 3D-Coat Applink",
"description": "Transfer data between 3D-Coat/Blender",
"warning": "",
"wiki_url": "https://docs.blender.org/manual/en/dev/addons/"
"import_export/coat3D.html",
"doc_url": "https://docs.blender.org/manual/en/dev/addons/"
"import_export/coat3D.html",
"category": "Import-Export",
}

View File

@ -25,8 +25,8 @@ bl_info = {
"location": "File > Import > Scalable Vector Graphics (.svg)",
"description": "Import SVG as curves",
"warning": "",
"wiki_url": "https://docs.blender.org/manual/en/dev/addons/"
"import_export/io_curve_svg.html",
"doc_url": "https://docs.blender.org/manual/en/dev/addons/"
"import_export/curve_svg.html",
"support": 'OFFICIAL',
"category": "Import-Export",
}

View File

@ -24,8 +24,8 @@ bl_info = {
"location": "File > Export > AutoCAD DXF",
"description": "The script exports Blender geometry to DXF format r12 version.",
"warning": "Under construction! Visit Wiki for details.",
"wiki_url": "https://docs.blender.org/manual/en/dev/addons/"
"import_export/scene_dxf.html",
"doc_url": "https://docs.blender.org/manual/en/dev/addons/"
"import_export/scene_dxf.html",
"category": "Import-Export",
}

File diff suppressed because it is too large Load Diff

View File

@ -1,36 +1,36 @@
class DxfDrawing(object):
"""
Represents intermediate model of DXF drawing. It is useful in iterating
through exported object and for easy change the DXF handling library.
"""
def __init__(self):
self._entities = {}
self._layers = {}
self._views = []
self._vports = []
self._blocks = []
"""
Represents intermediate model of DXF drawing. It is useful in iterating
through exported object and for easy change the DXF handling library.
"""
def __init__(self):
self._entities = {}
self._layers = {}
self._views = []
self._vports = []
self._blocks = []
def isEmpty(self):
return len(self._entities) == 0
def isEmpty(self):
return len(self._entities) == 0
def addEntity(self, type, **kwargs):
if type not in self._entities:
self._entities[type] = []
self._entities[type].append(kwargs)
def addEntity(self, type, **kwargs):
if type not in self._entities:
self._entities[type] = []
self._entities[type].append(kwargs)
def addLayer(self, name, color):
self._layers[name] = color
def addLayer(self, name, color):
self._layers[name] = color
def containsLayer(self, name):
return name in self._layers
def containsLayer(self, name):
return name in self._layers
def addBlock(self, block):
self._blocks.append(block)
def addBlock(self, block):
self._blocks.append(block)
def containsBlock(self, blockname):
return blockname in self._blocks
def containsBlock(self, blockname):
return blockname in self._blocks
def convert(self, **kwargs):
""" Converts this drawing into DXF representation object """
raise NotImplementedError()
def convert(self, **kwargs):
""" Converts this drawing into DXF representation object """
raise NotImplementedError()

View File

@ -1 +1 @@
migius commit test 2b
migius commit test 2b

View File

@ -17,9 +17,9 @@ bl_info = {
"location": "File > Export > Paper Model",
"warning": "",
"description": "Export printable net of the active mesh",
"doc_url": "https://docs.blender.org/manual/en/dev/addons/"
"import_export/paper_model.html",
"category": "Import-Export",
"wiki_url": "https://docs.blender.org/manual/en/dev/addons/"
"import_export/paper_model.html",
}
# Task: split into four files (SVG and PDF separately)

View File

@ -24,9 +24,10 @@ bl_info = {
"location": "File > Export > Pointcache (.pc2)",
"description": "Export mesh Pointcache data (.pc2)",
"warning": "",
"wiki_url": "https://docs.blender.org/manual/en/dev/addons/"
"import_export/pc2.html",
"category": "Import-Export"}
"doc_url": "https://docs.blender.org/manual/en/dev/addons/"
"import_export/pc2.html",
"category": "Import-Export",
}
"""
Related links:

View File

@ -38,8 +38,8 @@ bl_info = {
"blender": (2, 80, 0),
"location": "File > Import > AutoCAD DXF",
"description": "Import files in the Autocad DXF format (.dxf)",
"wiki_url": "https://docs.blender.org/manual/en/dev/addons/"
"import_export/scene_dxf.html",
"doc_url": "https://docs.blender.org/manual/en/dev/addons/"
"import_export/scene_dxf.html",
"category": "Import-Export",
}

View File

@ -27,8 +27,8 @@ bl_info = {
"description": "Imports images and creates planes with the appropriate aspect ratio. "
"The images are mapped to the planes.",
"warning": "",
"wiki_url": "https://docs.blender.org/manual/en/dev/addons/"
"import_export/images_as_planes.html",
"doc_url": "https://docs.blender.org/manual/en/dev/addons/"
"import_export/images_as_planes.html",
"support": 'OFFICIAL',
"category": "Import-Export",
}

View File

@ -26,9 +26,10 @@ bl_info = {
"location": "File > Import",
"description": "Import Palettes",
"warning": "",
"wiki_url": "https://docs.blender.org/manual/en/dev/addons/"
"import_export/io_palettes.html",
"category": "Import-Export"}
"doc_url": "https://docs.blender.org/manual/en/dev/addons/"
"import_export/palettes.html",
"category": "Import-Export",
}
import sys
import os

View File

@ -63,8 +63,8 @@ bl_info = {
"blender": (2, 80, 0),
"location": "File -> Import -> PDB (.pdb) and File -> Import -> XYZ (.xyz)",
"warning": "",
"wiki_url": "https://docs.blender.org/manual/en/dev/addons/"
"import_export/mesh_atomic.html",
"doc_url": "https://docs.blender.org/manual/en/dev/addons/"
"import_export/mesh_atomic.html",
"category": "Import-Export",
}

View File

@ -418,4 +418,3 @@ class SticksAllSmallerButton(Operator):
None,
1.0/scn.sticks_all)
return {'FINISHED'}

View File

@ -25,8 +25,8 @@ bl_info = {
"blender": (2, 82, 0),
"location": "File > Import-Export",
"description": "Import-Export PLY mesh data with UVs and vertex colors",
"wiki_url": "https://docs.blender.org/manual/en/dev/addons/"
"import_export/io_mesh_ply.html",
"doc_url": "https://docs.blender.org/manual/en/dev/addons/"
"import_export/mesh_ply.html",
"support": 'OFFICIAL',
"category": "Import-Export",
}

View File

@ -25,8 +25,8 @@ bl_info = {
"blender": (2, 81, 6),
"location": "File > Import-Export",
"description": "Import-Export STL files",
"wiki_url": "https://docs.blender.org/manual/en/dev/addons/"
"import_export/io_mesh_stl.html",
"doc_url": "https://docs.blender.org/manual/en/dev/addons/"
"import_export/mesh_stl.html",
"support": 'OFFICIAL',
"category": "Import-Export",
}

View File

@ -26,8 +26,8 @@ bl_info = {
"location": "Image-Window > UVs > Export UV Layout",
"description": "Export the UV layout as a 2D graphic",
"warning": "",
"wiki_url": "https://docs.blender.org/manual/en/dev/addons/"
"import_export/io_mesh_uv_layout.html",
"doc_url": "https://docs.blender.org/manual/en/dev/addons/"
"import_export/mesh_uv_layout.html",
"support": 'OFFICIAL',
"category": "Import-Export",
}

View File

@ -89,4 +89,4 @@ def draw_polygon_path(uvs, width, height):
def footer():
yield "showpage\n"
yield "%%EOF\n"
yield "%%EOF\n"

View File

@ -61,4 +61,4 @@ def get_color_string(color):
def footer():
yield '\n'
yield '</svg>\n'
yield '</svg>\n'

View File

@ -26,8 +26,8 @@ bl_info = {
"location": "File > Import-Export",
"description": "FBX IO meshes, UV's, vertex colors, materials, textures, cameras, lamps and actions",
"warning": "",
"wiki_url": "https://docs.blender.org/manual/en/dev/addons/"
"import_export/io_scene_fbx.html",
"doc_url": "https://docs.blender.org/manual/en/dev/addons/"
"import_export/scene_fbx.html",
"support": 'OFFICIAL',
"category": "Import-Export",
}

View File

@ -15,12 +15,12 @@
bl_info = {
'name': 'glTF 2.0 format',
'author': 'Julien Duroure, Norbert Nopper, Urs Hanselmann, Moritz Becher, Benjamin Schmithüsen, Jim Eckerlein, and many external contributors',
"version": (1, 2, 20),
'blender': (2, 81, 6),
"version": (1, 2, 35),
'blender': (2, 82, 7),
'location': 'File > Import-Export',
'description': 'Import-Export as glTF 2.0',
'warning': '',
'wiki_url': "https://docs.blender.org/manual/en/dev/addons/import_export/scene_gltf2.html",
'doc_url': "https://docs.blender.org/manual/en/dev/addons/import_export/scene_gltf2.html",
'tracker_url': "https://github.com/KhronosGroup/glTF-Blender-IO/issues/",
'support': 'OFFICIAL',
'category': 'Import-Export',
@ -215,12 +215,19 @@ class ExportGLTF2_Base:
default=False
)
# keep it for compatibility (for now)
export_selected: BoolProperty(
name='Selected Objects',
description='Export selected objects only',
default=False
)
use_selected: BoolProperty(
name='Selected Objects',
description='Export selected objects only',
default=False
)
export_extras: BoolProperty(
name='Custom Properties',
description='Export custom properties as glTF extras',
@ -345,7 +352,13 @@ class ExportGLTF2_Base:
if settings:
try:
for (k, v) in settings.items():
setattr(self, k, v)
if k == "export_selected": # Back compatibility for export_selected --> use_selected
setattr(self, "use_selected", v)
del settings[k]
settings["use_selected"] = v
print("export_selected is now renamed use_selected, and will be deleted in a few release")
else:
setattr(self, k, v)
self.will_save_settings = True
except (AttributeError, TypeError):
@ -417,7 +430,15 @@ class ExportGLTF2_Base:
export_settings['gltf_materials'] = self.export_materials
export_settings['gltf_colors'] = self.export_colors
export_settings['gltf_cameras'] = self.export_cameras
export_settings['gltf_selected'] = self.export_selected
# compatibility after renaming export_selected to use_selected
if self.export_selected is True:
self.report({"WARNING"}, "export_selected is now renamed use_selected, and will be deleted in a few release")
export_settings['gltf_selected'] = self.export_selected
else:
export_settings['gltf_selected'] = self.use_selected
# export_settings['gltf_selected'] = self.use_selected This can be uncomment when removing compatibility of export_selected
export_settings['gltf_layers'] = True # self.export_layers
export_settings['gltf_extras'] = self.export_extras
export_settings['gltf_yup'] = self.export_yup
@ -480,13 +501,8 @@ class ExportGLTF2_Base:
return gltf2_blender_export.save(context, export_settings)
def draw(self, context):
pass
pass # Is needed to get panels available
class GLTF_PT_export_main(bpy.types.Panel):
@ -540,7 +556,7 @@ class GLTF_PT_export_include(bpy.types.Panel):
sfile = context.space_data
operator = sfile.active_operator
layout.prop(operator, 'export_selected')
layout.prop(operator, 'use_selected')
layout.prop(operator, 'export_extras')
layout.prop(operator, 'export_cameras')
layout.prop(operator, 'export_lights')
@ -947,4 +963,3 @@ def unregister():
# remove from the export / import menu
bpy.types.TOPBAR_MT_file_export.remove(menu_func_export)
bpy.types.TOPBAR_MT_file_import.remove(menu_func_import)

View File

@ -60,4 +60,3 @@ def get_target(property):
"scale": "scale",
"value": "weights"
}.get(property)

View File

@ -36,4 +36,3 @@ def get_rotation_modes(target_property: str) -> str:
return True, ["AXIS_ANGLE"]
else:
return False, []

View File

@ -91,4 +91,3 @@ def set_extras(blender_element, extras, exclude=[]):
blender_element[custom_property] = value
except TypeError as e:
print('Error setting property %s to value of type %s' % (custom_property, type(value)))

View File

@ -35,4 +35,3 @@ def is_json_convertible(data):
return True
except:
return False

View File

@ -15,4 +15,3 @@
def get_gltf_node_name():
return "glTF Settings"

View File

@ -170,4 +170,3 @@ def transform_value(value: Vector, _: Matrix = Matrix.Identity(4)) -> Vector:
def round_if_near(value: float, target: float) -> float:
"""If value is very close to target, round to target."""
return value if abs(value - target) > 2.0e-6 else target

View File

@ -147,4 +147,3 @@ def __notify_end(context, elapsed):
print_console('INFO', 'Finished glTF 2.0 export in {} s'.format(elapsed))
context.window_manager.progress_end()
print_newline()

View File

@ -57,4 +57,3 @@ USE_NO_COLOR = 'gltf_use_no_color'
METALLIC_ROUGHNESS_IMAGE = "metallic_roughness_image"
GROUP_INDEX = 'group_index'

View File

@ -64,7 +64,7 @@ class ShapeKey:
# Functions
#
def convert_swizzle_normal_and_tangent(loc, armature, blender_object, export_settings):
def convert_swizzle_normal(loc, armature, blender_object, export_settings):
"""Convert a normal data from Blender coordinate system to glTF coordinate system."""
if not armature:
# Classic case. Mesh is not skined, no need to apply armature transfoms on vertices / normals / tangents
@ -74,8 +74,10 @@ def convert_swizzle_normal_and_tangent(loc, armature, blender_object, export_set
return Vector((loc[0], loc[1], loc[2]))
else:
# Mesh is skined, we have to apply armature transforms on data
apply_matrix = armature.matrix_world.inverted() @ blender_object.matrix_world
new_loc = apply_matrix.to_quaternion() @ loc
apply_matrix = (armature.matrix_world.inverted() @ blender_object.matrix_world).to_3x3().inverted()
apply_matrix.transpose()
new_loc = ((armature.matrix_world.to_3x3() @ apply_matrix).to_4x4() @ Matrix.Translation(Vector((loc[0], loc[1], loc[2])))).to_translation()
if export_settings[gltf2_blender_export_keys.YUP]:
return Vector((new_loc[0], new_loc[2], -new_loc[1]))
else:
@ -640,14 +642,14 @@ def extract_primitives(glTF, blender_mesh, blender_object, blender_vertex_groups
v = convert_swizzle_location(vertex.co, armature, blender_object, export_settings)
if blender_polygon.use_smooth or blender_mesh.use_auto_smooth:
if blender_mesh.has_custom_normals:
n = convert_swizzle_normal_and_tangent(blender_mesh.loops[loop_index].normal, armature, blender_object, export_settings)
n = convert_swizzle_normal(blender_mesh.loops[loop_index].normal, armature, blender_object, export_settings)
else:
n = convert_swizzle_normal_and_tangent(vertex.normal, armature, blender_object, export_settings)
n = convert_swizzle_normal(vertex.normal, armature, blender_object, export_settings)
if use_tangents:
t = convert_swizzle_tangent(blender_mesh.loops[loop_index].tangent, armature, blender_object, export_settings)
b = convert_swizzle_location(blender_mesh.loops[loop_index].bitangent, armature, blender_object, export_settings)
else:
n = convert_swizzle_normal_and_tangent(face_normal, armature, blender_object, export_settings)
n = convert_swizzle_normal(face_normal, armature, blender_object, export_settings)
if use_tangents:
t = convert_swizzle_tangent(face_tangent, armature, blender_object, export_settings)
b = convert_swizzle_location(face_bitangent, armature, blender_object, export_settings)
@ -671,20 +673,12 @@ def extract_primitives(glTF, blender_mesh, blender_object, blender_vertex_groups
for color_index in range(0, color_max):
color_name = COLOR_PREFIX + str(color_index)
color = vertex_colors[color_name].data[loop_index].color
if len(color) == 3:
colors.append([
color_srgb_to_scene_linear(color[0]),
color_srgb_to_scene_linear(color[1]),
color_srgb_to_scene_linear(color[2]),
1.0
])
else:
colors.append([
color_srgb_to_scene_linear(color[0]),
color_srgb_to_scene_linear(color[1]),
color_srgb_to_scene_linear(color[2]),
color[3]
])
colors.append([
color_srgb_to_scene_linear(color[0]),
color_srgb_to_scene_linear(color[1]),
color_srgb_to_scene_linear(color[2]),
color[3]
])
#
@ -774,7 +768,7 @@ def extract_primitives(glTF, blender_mesh, blender_object, blender_vertex_groups
temp_normals[blender_polygon.index * 3 + 0], temp_normals[blender_polygon.index * 3 + 1],
temp_normals[blender_polygon.index * 3 + 2])
n_morph = convert_swizzle_normal_and_tangent(Vector(n_morph), armature, blender_object, export_settings)
n_morph = convert_swizzle_normal(Vector(n_morph), armature, blender_object, export_settings)
# Store delta.
n_morph -= n
@ -977,4 +971,3 @@ def extract_primitives(glTF, blender_mesh, blender_object, blender_vertex_groups
print_console('INFO', 'Primitives created: ' + str(len(result_primitives)))
return result_primitives

View File

@ -84,6 +84,11 @@ def __gather_animations(blender_scene, export_settings):
to_delete_idx = []
for merged_anim_track in merged_tracks.keys():
if len(merged_tracks[merged_anim_track]) < 2:
# There is only 1 animation in the track
# If name of the track is not a default name, use this name for action
animations[0].name = merged_anim_track
continue
base_animation_idx = None
@ -137,4 +142,3 @@ def __gather_extras(blender_object, export_settings):
if export_settings[gltf2_blender_export_keys.EXTRAS]:
return generate_extras(blender_object)
return None

View File

@ -45,4 +45,3 @@ def gather_accessor(buffer_view: gltf2_io_binary_data.BinaryData,
sparse=None,
type=type
)

View File

@ -119,4 +119,3 @@ def __gather_path(channels: typing.Tuple[bpy.types.FCurve],
raise RuntimeError("Cannot export an animation with {} target".format(target))
return path

View File

@ -21,6 +21,7 @@ from io_scene_gltf2.io.com import gltf2_io_debug
from io_scene_gltf2.blender.exp.gltf2_blender_gather_cache import cached
from io_scene_gltf2.blender.exp import gltf2_blender_gather_animation_samplers
from io_scene_gltf2.blender.exp import gltf2_blender_gather_animation_channel_target
from io_scene_gltf2.blender.exp import gltf2_blender_gather_animation_sampler_keyframes
from io_scene_gltf2.blender.exp import gltf2_blender_get
from io_scene_gltf2.blender.exp import gltf2_blender_gather_skins
from io_scene_gltf2.blender.exp import gltf2_blender_gather_drivers
@ -124,6 +125,8 @@ def gather_animation_channels(blender_action: bpy.types.Action,
# resetting driver caches
gltf2_blender_gather_drivers.get_sk_driver_values.reset_cache()
gltf2_blender_gather_drivers.get_sk_drivers.reset_cache()
# resetting bone caches
gltf2_blender_gather_animation_sampler_keyframes.get_bone_matrix.reset_cache()
return channels
@ -370,4 +373,3 @@ def __gather_armature_object_channel_groups(blender_action: bpy.types.Action, bl
groups += list(p.values())
return map(tuple, groups)

View File

@ -160,7 +160,7 @@ def get_bone_matrix(blender_object_if_armature: typing.Optional[bpy.types.Object
bpy.context.scene.frame_set(frame)
for pbone in blender_object_if_armature.pose.bones:
if bake_bone is None:
matrix = pbone.matrix_basis
matrix = pbone.matrix_basis.copy()
else:
matrix = pbone.matrix
matrix = blender_object_if_armature.convert_space(pose_bone=pbone, matrix=matrix, from_space='POSE', to_space='LOCAL')
@ -388,4 +388,3 @@ def needs_baking(blender_object_if_armature: typing.Optional[bpy.types.Object],
return True
return False

View File

@ -410,4 +410,3 @@ def __gather_output(channels: typing.Tuple[bpy.types.FCurve],
sparse=None,
type=data_type
)

View File

@ -214,9 +214,10 @@ def __get_blender_actions(blender_object: bpy.types.Object,
for track in blender_object.animation_data.nla_tracks:
# Multi-strip tracks do not export correctly yet (they need to be baked),
# so skip them for now and only write single-strip tracks.
if track.strips is None or len(track.strips) != 1:
non_muted_strips = [strip for strip in track.strips if strip.action is not None and strip.mute is False]
if track.strips is None or len(non_muted_strips) != 1:
continue
for strip in [strip for strip in track.strips if strip.action is not None]:
for strip in non_muted_strips:
blender_actions.append(strip.action)
blender_tracks[strip.action.name] = track.name # Always set after possible active action -> None will be overwrite
@ -233,9 +234,10 @@ def __get_blender_actions(blender_object: bpy.types.Object,
for track in blender_object.data.shape_keys.animation_data.nla_tracks:
# Multi-strip tracks do not export correctly yet (they need to be baked),
# so skip them for now and only write single-strip tracks.
if track.strips is None or len(track.strips) != 1:
non_muted_strips = [strip for strip in track.strips if strip.action is not None and strip.mute is False]
if track.strips is None or len(non_muted_strips) != 1:
continue
for strip in track.strips:
for strip in non_muted_strips:
blender_actions.append(strip.action)
blender_tracks[strip.action.name] = track.name # Always set after possible active action -> None will be overwrite
@ -245,4 +247,3 @@ def __get_blender_actions(blender_object: bpy.types.Object,
blender_actions.sort(key = lambda a: a.name.lower())
return [(blender_action, blender_tracks[blender_action.name]) for blender_action in blender_actions]

View File

@ -69,6 +69,13 @@ def cached(func):
def bonecache(func):
def reset_cache_bonecache():
func.__current_action_name = None
func.__current_armature_name = None
func.__bonecache = {}
func.reset_cache = reset_cache_bonecache
@functools.wraps(func)
def wrapper_bonecache(*args, **kwargs):
if args[2] is None:
@ -78,9 +85,7 @@ def bonecache(func):
pose_bone_if_armature = args[0].pose.bones[args[2]]
if not hasattr(func, "__current_action_name"):
func.__current_action_name = None
func.__current_armature_name = None
func.__bonecache = {}
func.reset_cache()
if args[6] != func.__current_action_name or args[0] != func.__current_armature_name:
result = func(*args)
func.__bonecache = result
@ -106,7 +111,6 @@ def skdriverdiscovercache(func):
@functools.wraps(func)
def wrapper_skdriverdiscover(*args, **kwargs):
if not hasattr(func, "__current_armature_name") or func.__current_armature_name is None:
func.__current_armature_name = None
func.reset_cache()
if args[0] != func.__current_armature_name:
@ -139,4 +143,3 @@ def skdrivervalues(func):
else:
return func.__skdrivervalues[args[0].name][args[1]]
return wrapper_skdrivervalues

View File

@ -119,4 +119,3 @@ def __gather_type(blender_camera, export_settings):
elif blender_camera.type == 'ORTHO':
return "orthographic"
return None

View File

@ -27,6 +27,9 @@ def get_sk_drivers(blender_armature):
for child in blender_armature.children:
if not child.data:
continue
# child.data can be an armature - which has no shapekeys
if not hasattr(child.data, 'shape_keys'):
continue
if not child.data.shape_keys:
continue
if not child.data.shape_keys.animation_data:
@ -71,4 +74,3 @@ def get_sk_driver_values(blender_object, frame, fcurves):
sk_values.append(blender_object.data.shape_keys.path_resolve(get_target_object_path(f.data_path)).value)
return tuple(sk_values)

View File

@ -240,4 +240,3 @@ def __get_texname_from_slot(sockets_or_slots, export_settings):
elif isinstance(sockets_or_slots[0], bpy.types.MaterialTextureSlot):
return sockets_or_slots[0].texture.image.name

View File

@ -81,4 +81,3 @@ def gather_joint(blender_bone, export_settings):
translation=translation,
weights=None
)

View File

@ -42,4 +42,3 @@ def __gather_inner_cone_angle(blender_lamp, _) -> Optional[float]:
def __gather_outer_cone_angle(blender_lamp, _) -> Optional[float]:
return blender_lamp.spot_size * 0.5

Some files were not shown because too many files have changed in this diff Show More