From noreply at git.blender.org Sat Dec 3 16:38:21 2022 From: noreply at git.blender.org (Vladimir Spivak) Date: Sat, 3 Dec 2022 16:38:21 +0100 (CET) Subject: [Bf-extensions-cvs] [90c87dd7] master: D16656: Add Curve: Extra Objects - Add Curve Spiral Objects not conforming to 3D-Cursor Location In-Reply-To: <167008190170.12845.13004847004925570375@git.blender.org> References: <167008190170.12845.13004847004925570375@git.blender.org> Message-ID: <20221203153822.030A78197@git.blender.org> Commit: 90c87dd771e027e0ffa157a0e294399bfd605d99 Author: Vladimir Spivak Date: Sat Dec 3 17:36:19 2022 +0200 Branches: master https://developer.blender.org/rBA90c87dd771e027e0ffa157a0e294399bfd605d99 D16656: Add Curve: Extra Objects - Add Curve Spiral Objects not conforming to 3D-Cursor Location =================================================================== M add_curve_extra_objects/add_curve_spirals.py =================================================================== diff --git a/add_curve_extra_objects/add_curve_spirals.py b/add_curve_extra_objects/add_curve_spirals.py index 25a217a7..013f7334 100644 --- a/add_curve_extra_objects/add_curve_spirals.py +++ b/add_curve_extra_objects/add_curve_spirals.py @@ -30,7 +30,7 @@ from mathutils import ( from math import ( sin, cos, pi ) -from bpy_extras.object_utils import object_data_add +from bpy_extras import object_utils from bpy.types import ( Operator, Menu, @@ -174,21 +174,6 @@ def make_spiral_torus(props, context): return verts -# ------------------------------------------------------------ -# calculates the matrix for the new object -# depending on user pref - -def align_matrix(context, location): - loc = Matrix.Translation(location) - obj_align = context.preferences.edit.object_align - if (context.space_data.type == 'VIEW_3D' and - obj_align == 'VIEW'): - rot = context.space_data.region_3d.view_matrix.to_3x3().inverted().to_4x4() - else: - rot = Matrix() - align_matrix = loc @ rot - - return align_matrix # ------------------------------------------------------------ # get array of vertcoordinates according to splinetype @@ -214,7 +199,10 @@ def vertsToPoints(Verts, splineType): vertArray.append(0) return vertArray -def draw_curve(props, context, align_matrix): + +# ------------------------------------------------------------ +# create curve object according to the values of the add object editor +def draw_curve(props, context): # output splineType 'POLY' 'NURBS' 'BEZIER' splineType = props.curve_type @@ -237,9 +225,8 @@ def draw_curve(props, context, align_matrix): newSpline = dataCurve.splines.new(type=splineType) # spline # create object with newCurve - Curve = object_data_add(context, dataCurve) # place in active scene - Curve.matrix_world = align_matrix # apply matrix - Curve.rotation_euler = props.rotation_euler + Curve = object_utils.object_data_add(context, dataCurve, operator=props) # place in active scene + Curve.select_set(True) # turn verts into array @@ -287,20 +274,35 @@ def draw_curve(props, context, align_matrix): # move and rotate spline in edit mode if bpy.context.mode == 'EDIT_CURVE': - bpy.ops.transform.translate(value = props.startlocation) - bpy.ops.transform.rotate(value = props.rotation_euler[0], orient_axis = 'X') - bpy.ops.transform.rotate(value = props.rotation_euler[1], orient_axis = 'Y') - bpy.ops.transform.rotate(value = props.rotation_euler[2], orient_axis = 'Z') - -class CURVE_OT_spirals(Operator): + if props.align == 'WORLD': + location = props.location - context.active_object.location + bpy.ops.transform.translate(value = location, orient_type='GLOBAL') + bpy.ops.transform.rotate(value = props.rotation[0], orient_axis = 'X') + bpy.ops.transform.rotate(value = props.rotation[1], orient_axis = 'Y') + bpy.ops.transform.rotate(value = props.rotation[2], orient_axis = 'Z') + elif props.align == "VIEW": + bpy.ops.transform.translate(value = props.location) + bpy.ops.transform.rotate(value = props.rotation[0], orient_axis = 'X') + bpy.ops.transform.rotate(value = props.rotation[1], orient_axis = 'Y') + bpy.ops.transform.rotate(value = props.rotation[2], orient_axis = 'Z') + + elif props.align == "CURSOR": + location = context.active_object.location + props.location = bpy.context.scene.cursor.location - location + props.rotation = bpy.context.scene.cursor.rotation_euler + + bpy.ops.transform.translate(value = props.location) + bpy.ops.transform.rotate(value = props.rotation[0], orient_axis = 'X') + bpy.ops.transform.rotate(value = props.rotation[1], orient_axis = 'Y') + bpy.ops.transform.rotate(value = props.rotation[2], orient_axis = 'Z') + + +class CURVE_OT_spirals(Operator, object_utils.AddObjectHelper): bl_idname = "curve.spirals" bl_label = "Curve Spirals" bl_description = "Create different types of spirals" bl_options = {'REGISTER', 'UNDO', 'PRESET'} - # align_matrix for the invoke - align_matrix : Matrix() - spiral_type : EnumProperty( items=[('ARCH', "Archemedian", "Archemedian"), ("LOG", "Logarithmic", "Logarithmic"), @@ -432,32 +434,11 @@ class CURVE_OT_spirals(Operator): default=True, description="Show in edit mode" ) - startlocation : FloatVectorProperty( - name="", - description="Start location", - default=(0.0, 0.0, 0.0), - subtype='TRANSLATION' - ) - rotation_euler : FloatVectorProperty( - name="", - description="Rotation", - default=(0.0, 0.0, 0.0), - subtype='EULER' - ) def draw(self, context): layout = self.layout col = layout.column_flow(align=True) - col.label(text="Presets:") - - row = col.row(align=True) - row.menu("OBJECT_MT_spiral_curve_presets", - text=bpy.types.OBJECT_MT_spiral_curve_presets.bl_label) - row.operator("curve_extras.spiral_presets", text=" + ") - op = row.operator("curve_extras.spiral_presets", text=" - ") - op.remove_active = True - layout.prop(self, "spiral_type") layout.prop(self, "spiral_direction") @@ -527,12 +508,11 @@ class CURVE_OT_spirals(Operator): col = layout.column() col.row().prop(self, "edit_mode", expand=True) - box = layout.box() - box.label(text="Location:") - box.prop(self, "startlocation") - box = layout.box() - box.label(text="Rotation:") - box.prop(self, "rotation_euler") + col = layout.column() + # AddObjectHelper props + col.prop(self, "align") + col.prop(self, "location") + col.prop(self, "rotation") @classmethod def poll(cls, context): @@ -544,8 +524,7 @@ class CURVE_OT_spirals(Operator): bpy.context.preferences.edit.use_enter_edit_mode = False time_start = time.time() - self.align_matrix = align_matrix(context, self.startlocation) - draw_curve(self, context, self.align_matrix) + draw_curve(self, context) if use_enter_edit_mode: bpy.ops.object.mode_set(mode = 'EDIT') From noreply at git.blender.org Thu Dec 8 14:09:24 2022 From: noreply at git.blender.org (Antonio Vazquez) Date: Thu, 8 Dec 2022 14:09:24 +0100 (CET) Subject: [Bf-extensions-cvs] [a61732a0] master: Storypencil: New Storyboard add-on base on grease pencil In-Reply-To: <167050496405.55690.8525707239143681628@git.blender.org> References: <167050496405.55690.8525707239143681628@git.blender.org> Message-ID: <20221208130924.3655240625@git.blender.org> Commit: a61732a0aa9739b083f6288a8b319e3c6ece9243 Author: Antonio Vazquez Date: Wed Dec 7 19:43:12 2022 +0100 Branches: master https://developer.blender.org/rBAa61732a0aa9739b083f6288a8b319e3c6ece9243 Storypencil: New Storyboard add-on base on grease pencil This add-on was in addons-contrib and now has been moved to official. =================================================================== A storypencil/__init__.py A storypencil/dopesheet_overlay.py A storypencil/render.py A storypencil/scene_tools.py A storypencil/synchro.py A storypencil/ui.py A storypencil/utils.py =================================================================== diff --git a/storypencil/__init__.py b/storypencil/__init__.py new file mode 100644 index 00000000..1abd0261 --- /dev/null +++ b/storypencil/__init__.py @@ -0,0 +1,239 @@ +# SPDX-License-Identifier: GPL-2.0-or-later + +# ---------------------------------------------- +# Define Addon info +# ---------------------------------------------- +bl_info = { + "name": "Storypencil - Storyboard Tools", + "description": "Storyboard tools", + "author": "Antonio Vazquez, Matias Mendiola, Daniel Martinez Lara, Rodrigo Blaas", + "version": (1, 1, 1), + "blender": (3, 3, 0), + "location": "", + "warning": "", + "category": "Sequencer", +} + +# ---------------------------------------------- +# Import modules +# ---------------------------------------------- +if "bpy" in locals(): + import importlib + + importlib.reload(utils) + importlib.reload(synchro) + importlib.reload(dopesheet_overlay) + importlib.reload(scene_tools) + importlib.reload(render) + importlib.reload(ui) +else: + from . import utils + from . import synchro + from . import dopesheet_overlay + from . import scene_tools + from . import render + from . import ui + +import bpy +from bpy.types import ( + Scene, + WindowManager, + WorkSpace, +) +from bpy.props import ( + BoolProperty, + IntProperty, + PointerProperty, + StringProperty, + EnumProperty, +) + +# -------------------------------------------------------------- +# Register all operators, props and panels +# -------------------------------------------------------------- +classes = ( + synchro.STORYPENCIL_PG_Settings, + scene_tools.STORYPENCIL_OT_Setup, + scene_tools.STORYPENCIL_OT_NewScene, + synchro.STORYPENCIL_OT_WindowBringFront, + synchro.STORYPENCIL_OT_WindowCloseOperator, + synchro.STORYPENCIL_OT_SyncToggleSecondary, + synchro.STORYPENCIL_OT_SetSyncMainOperator, + synchro.STORYPENCIL_OT_AddSecondaryWindowOperator, + synchro.STORYPENCIL_OT_Switch, + synchro.STORYPENCIL_OT_TabSwitch, + render.STORYPENCIL_OT_RenderAction, + ui.STORYPENCIL_PT_Settings, + ui.STORYPENCIL_PT_SettingsNew, + ui.STORYPENCIL_PT_RenderPanel, + ui.STORYPENCIL_PT_General, + ui.STORYPENCIL_MT_extra_options, +) + + +def save_mode(self, context): + wm = context.window_manager + wm['storypencil_use_new_window'] = context.scene.storypencil_use_new_window + # Close all secondary windows + if context.scene.storypencil_use_new_window is False: + c = context.copy() + for win in context.window_manager.windows: + # Don't close actual window + if win == context.window: + continue + win_id = str(win.as_pointer()) + if win_id != wm.storypencil_settings.main_window_id and win.parent is None: + c["window"] = win + bpy.ops.wm.window_close(c) + + +addon_keymaps = [] +def register_keymaps(): + addon = bpy.context.window_manager.keyconfigs.addon + km = addon.keymaps.new(name="Sequencer", space_type="SEQUENCE_EDITOR") + kmi = km.keymap_items.new( + idname="storypencil.tabswitch", + type="TAB", + value="PRESS", + shift=False, ctrl=False, alt = False, oskey=False, + ) + + addon_keymaps.append((km, kmi)) + +def unregister_keymaps(): + for km, kmi in addon_keymaps: + km.keymap_items.remove(kmi) + addon_keymaps.clear() + +def register(): + from bpy.utils import register_class + for cls in classes: + register_class(cls) + register_keymaps() + + Scene.storypencil_scene_duration = IntProperty( + name="Scene Duration", + description="Default Duration for new Scene", + default=48, + min=1, + soft_max=250, + ) + + Scene.storypencil_use_new_window = BoolProperty(name="Open in new window", + description="Use secondary main window to edit scenes", + default=False, + update=save_mode) + + Scene.storypencil_main_workspace = PointerProperty(type=WorkSpace, + description="Main Workspace used for editing Storyboard") + Scene.storypencil_main_scene = PointerProperty(type=Scene, + description="Main Scene used for editing Storyboard") + Scene.storypencil_edit_workspace = PointerProperty(type=WorkSpace, + description="Workspace used for changing drawings") + + Scene.storypencil_base_scene = PointerProperty(type=Scene, + description="Template Scene used for creating new scenes") + + Scene.storypencil_render_render_path = StringProperty(name="Output Path", subtype='FILE_PATH', maxlen=256, + description="Directory/name to save files") + + Scene.storypencil_name_prefix = StringProperty(name="Scene Name Prefix", maxlen=20, default="") + + Scene.storypencil_name_suffix = StringProperty(name="Scene Name Suffix", maxlen=20, default="") + + Scene.storypencil_render_onlyselected = BoolProperty(name="Render only Selected Strips", + description="Render only the selected strips", + default=True) + + Scene.storypencil_render_channel = IntProperty(name="Channel", + description="Channel to set the new rendered video", + default=5, min=1, max=128) + + Scene.storypencil_add_render_strip = BoolProperty(name="Import Rendered Strips", + description="Add a Strip with the render", + default=True) + + Scene.storypencil_render_step = IntProperty(name="Image Steps", + description="Minimum frames number to generate images between keyframes (0 to disable)", + default=0, min=0, max=128) + + Scene.storypencil_render_numbering = EnumProperty(name="Image Numbering", + items=( + ('1', "Frame", "Use real frame number"), + ('2', "Consecutive", "Use sequential numbering"), + ), + description="Defines how frame is named") + + Scene.storypencil_add_render_byfolder = BoolProperty(name="Folder by Strip", + description="Create a separated folder for each strip", + default=True) + + WindowManager.storypencil_settings = PointerProperty( + type=synchro.STORYPENCIL_PG_Settings, + name="Storypencil settings", + description="Storypencil tool settings", + ) + + # Append Handlers + bpy.app.handlers.frame_change_post.clear() + bpy.app.handlers.frame_change_post.append(synchro.on_frame_changed) + bpy.app.handlers.load_post.append(synchro.sync_autoconfig) + + bpy.context.window_manager.storypencil_settings.active = False + bpy.context.window_manager.storypencil_settings.main_window_id = "" + bpy.context.window_manager.storypencil_settings.secondary_windows_ids = "" + + # UI integration in dopesheet header + bpy.types.DOPESHEET_HT_header.append(synchro.draw_sync_header) + dopesheet_overlay.register() + + synchro.sync_autoconfig() + + # UI integration in VSE header + bpy.types.SEQUENCER_HT_header.remove(synchro.draw_sync_sequencer_header) + bpy.types.SEQUENCER_HT_header.append(synchro.draw_sync_sequencer_header) + + bpy.types.SEQUENCER_MT_add.append(scene_tools.draw_new_scene) + bpy.types.VIEW3D_MT_draw_gpencil.append(scene_tools.setup_storyboard) + + +def unregister(): + unregister_keymaps() + + from bpy.utils import unregister_class + for cls in reversed(classes): + unregister_class(cls) + + # Remove Handlers + if bpy.app.handlers.frame_change_post: + bpy.app.handlers.frame_change_post.remove(synchro.on_frame_changed) + bpy.app.handlers.load_post.remove(synchro.sync_autoconfig) + + # remove UI integration + bpy.types.DOPESHEET_HT_header.remove(synchro.draw_sync_header) + dopesheet_overlay.unregister() + bpy.types.SEQUENCER_HT_header.remove(synchro.draw_sync_sequencer_header) + + bpy.types.SEQUENCER_MT_add.remove(scene_tools.draw_new_scene) + bpy.types.VIEW3D_MT_draw_gpencil.remove(scene_tools.setup_storyboard) + + del Scene.storypencil_scene_duration + del WindowManager.storypencil_settings + + del Scene.storypencil_base_scene + del Scene.storypencil_main_workspace + del Scene.storypencil_main_scene + del Scene.storypencil_edit_workspace + + del Scene.storypencil_render_render_path + del Scene.storypencil_name_prefix + del Scene.storypencil_name_suffix + del Scene.storypencil_render_onlyselected + del Scene.storypencil_render_channel + del Scene.storypencil_render_step + del Scene.storypencil_add_render_strip + del Scene.storypencil_render_numbering + del Scene.storypencil_add_render_byfolder + +if __name__ == '__main__': + register() diff --git a/storypencil/dopesheet_overlay.py b/storypencil/dopesheet_overlay.py new file mode 100644 index 00000000..2c00d8e9 --- /dev/null +++ b/storypencil/dopesheet_overlay.py @@ -0,0 +1,179 @@ +# SPDX-License-Identifier: GPL-2.0-or-later + +import typing + +import bpy +import gpu +from gpu_extras.batch import batch_for_shader + +from .utils import (redraw_all_areas_by_type) +from .synchro import (is_secondary_window, window_id, get_main_strip) + +Int3 = typing.Tuple[int, int, int] + +Float2 = typing.Tuple[float, float] +Float3 = typing.Tuple[float, float @@ Diff output truncated at 10240 characters. @@ From noreply at git.blender.org Fri Dec 9 10:01:47 2022 From: noreply at git.blender.org (Thomas Dinges) Date: Fri, 9 Dec 2022 10:01:47 +0100 (CET) Subject: [Bf-extensions-cvs] [bdcfdd4] master: Addons: Remove storypencil from contrib, this has been moved to official. In-Reply-To: <167057650770.91594.15356530886926691118@git.blender.org> References: <167057650770.91594.15356530886926691118@git.blender.org> Message-ID: <20221209090147.DC966A592@git.blender.org> Commit: bdcfdd47ec3451822b21d1cff2ea2db751093c9a Author: Thomas Dinges Date: Fri Dec 9 10:00:52 2022 +0100 Branches: master https://developer.blender.org/rBACbdcfdd47ec3451822b21d1cff2ea2db751093c9a Addons: Remove storypencil from contrib, this has been moved to official. =================================================================== D storypencil/__init__.py D storypencil/dopesheet_overlay.py D storypencil/render.py D storypencil/scene_tools.py D storypencil/synchro.py D storypencil/ui.py D storypencil/utils.py =================================================================== diff --git a/storypencil/__init__.py b/storypencil/__init__.py deleted file mode 100644 index 1abd026..0000000 --- a/storypencil/__init__.py +++ /dev/null @@ -1,239 +0,0 @@ -# SPDX-License-Identifier: GPL-2.0-or-later - -# ---------------------------------------------- -# Define Addon info -# ---------------------------------------------- -bl_info = { - "name": "Storypencil - Storyboard Tools", - "description": "Storyboard tools", - "author": "Antonio Vazquez, Matias Mendiola, Daniel Martinez Lara, Rodrigo Blaas", - "version": (1, 1, 1), - "blender": (3, 3, 0), - "location": "", - "warning": "", - "category": "Sequencer", -} - -# ---------------------------------------------- -# Import modules -# ---------------------------------------------- -if "bpy" in locals(): - import importlib - - importlib.reload(utils) - importlib.reload(synchro) - importlib.reload(dopesheet_overlay) - importlib.reload(scene_tools) - importlib.reload(render) - importlib.reload(ui) -else: - from . import utils - from . import synchro - from . import dopesheet_overlay - from . import scene_tools - from . import render - from . import ui - -import bpy -from bpy.types import ( - Scene, - WindowManager, - WorkSpace, -) -from bpy.props import ( - BoolProperty, - IntProperty, - PointerProperty, - StringProperty, - EnumProperty, -) - -# -------------------------------------------------------------- -# Register all operators, props and panels -# -------------------------------------------------------------- -classes = ( - synchro.STORYPENCIL_PG_Settings, - scene_tools.STORYPENCIL_OT_Setup, - scene_tools.STORYPENCIL_OT_NewScene, - synchro.STORYPENCIL_OT_WindowBringFront, - synchro.STORYPENCIL_OT_WindowCloseOperator, - synchro.STORYPENCIL_OT_SyncToggleSecondary, - synchro.STORYPENCIL_OT_SetSyncMainOperator, - synchro.STORYPENCIL_OT_AddSecondaryWindowOperator, - synchro.STORYPENCIL_OT_Switch, - synchro.STORYPENCIL_OT_TabSwitch, - render.STORYPENCIL_OT_RenderAction, - ui.STORYPENCIL_PT_Settings, - ui.STORYPENCIL_PT_SettingsNew, - ui.STORYPENCIL_PT_RenderPanel, - ui.STORYPENCIL_PT_General, - ui.STORYPENCIL_MT_extra_options, -) - - -def save_mode(self, context): - wm = context.window_manager - wm['storypencil_use_new_window'] = context.scene.storypencil_use_new_window - # Close all secondary windows - if context.scene.storypencil_use_new_window is False: - c = context.copy() - for win in context.window_manager.windows: - # Don't close actual window - if win == context.window: - continue - win_id = str(win.as_pointer()) - if win_id != wm.storypencil_settings.main_window_id and win.parent is None: - c["window"] = win - bpy.ops.wm.window_close(c) - - -addon_keymaps = [] -def register_keymaps(): - addon = bpy.context.window_manager.keyconfigs.addon - km = addon.keymaps.new(name="Sequencer", space_type="SEQUENCE_EDITOR") - kmi = km.keymap_items.new( - idname="storypencil.tabswitch", - type="TAB", - value="PRESS", - shift=False, ctrl=False, alt = False, oskey=False, - ) - - addon_keymaps.append((km, kmi)) - -def unregister_keymaps(): - for km, kmi in addon_keymaps: - km.keymap_items.remove(kmi) - addon_keymaps.clear() - -def register(): - from bpy.utils import register_class - for cls in classes: - register_class(cls) - register_keymaps() - - Scene.storypencil_scene_duration = IntProperty( - name="Scene Duration", - description="Default Duration for new Scene", - default=48, - min=1, - soft_max=250, - ) - - Scene.storypencil_use_new_window = BoolProperty(name="Open in new window", - description="Use secondary main window to edit scenes", - default=False, - update=save_mode) - - Scene.storypencil_main_workspace = PointerProperty(type=WorkSpace, - description="Main Workspace used for editing Storyboard") - Scene.storypencil_main_scene = PointerProperty(type=Scene, - description="Main Scene used for editing Storyboard") - Scene.storypencil_edit_workspace = PointerProperty(type=WorkSpace, - description="Workspace used for changing drawings") - - Scene.storypencil_base_scene = PointerProperty(type=Scene, - description="Template Scene used for creating new scenes") - - Scene.storypencil_render_render_path = StringProperty(name="Output Path", subtype='FILE_PATH', maxlen=256, - description="Directory/name to save files") - - Scene.storypencil_name_prefix = StringProperty(name="Scene Name Prefix", maxlen=20, default="") - - Scene.storypencil_name_suffix = StringProperty(name="Scene Name Suffix", maxlen=20, default="") - - Scene.storypencil_render_onlyselected = BoolProperty(name="Render only Selected Strips", - description="Render only the selected strips", - default=True) - - Scene.storypencil_render_channel = IntProperty(name="Channel", - description="Channel to set the new rendered video", - default=5, min=1, max=128) - - Scene.storypencil_add_render_strip = BoolProperty(name="Import Rendered Strips", - description="Add a Strip with the render", - default=True) - - Scene.storypencil_render_step = IntProperty(name="Image Steps", - description="Minimum frames number to generate images between keyframes (0 to disable)", - default=0, min=0, max=128) - - Scene.storypencil_render_numbering = EnumProperty(name="Image Numbering", - items=( - ('1', "Frame", "Use real frame number"), - ('2', "Consecutive", "Use sequential numbering"), - ), - description="Defines how frame is named") - - Scene.storypencil_add_render_byfolder = BoolProperty(name="Folder by Strip", - description="Create a separated folder for each strip", - default=True) - - WindowManager.storypencil_settings = PointerProperty( - type=synchro.STORYPENCIL_PG_Settings, - name="Storypencil settings", - description="Storypencil tool settings", - ) - - # Append Handlers - bpy.app.handlers.frame_change_post.clear() - bpy.app.handlers.frame_change_post.append(synchro.on_frame_changed) - bpy.app.handlers.load_post.append(synchro.sync_autoconfig) - - bpy.context.window_manager.storypencil_settings.active = False - bpy.context.window_manager.storypencil_settings.main_window_id = "" - bpy.context.window_manager.storypencil_settings.secondary_windows_ids = "" - - # UI integration in dopesheet header - bpy.types.DOPESHEET_HT_header.append(synchro.draw_sync_header) - dopesheet_overlay.register() - - synchro.sync_autoconfig() - - # UI integration in VSE header - bpy.types.SEQUENCER_HT_header.remove(synchro.draw_sync_sequencer_header) - bpy.types.SEQUENCER_HT_header.append(synchro.draw_sync_sequencer_header) - - bpy.types.SEQUENCER_MT_add.append(scene_tools.draw_new_scene) - bpy.types.VIEW3D_MT_draw_gpencil.append(scene_tools.setup_storyboard) - - -def unregister(): - unregister_keymaps() - - from bpy.utils import unregister_class - for cls in reversed(classes): - unregister_class(cls) - - # Remove Handlers - if bpy.app.handlers.frame_change_post: - bpy.app.handlers.frame_change_post.remove(synchro.on_frame_changed) - bpy.app.handlers.load_post.remove(synchro.sync_autoconfig) - - # remove UI integration - bpy.types.DOPESHEET_HT_header.remove(synchro.draw_sync_header) - dopesheet_overlay.unregister() - bpy.types.SEQUENCER_HT_header.remove(synchro.draw_sync_sequencer_header) - - bpy.types.SEQUENCER_MT_add.remove(scene_tools.draw_new_scene) - bpy.types.VIEW3D_MT_draw_gpencil.remove(scene_tools.setup_storyboard) - - del Scene.storypencil_scene_duration - del WindowManager.storypencil_settings - - del Scene.storypencil_base_scene - del Scene.storypencil_main_workspace - del Scene.storypencil_main_scene - del Scene.storypencil_edit_workspace - - del Scene.storypencil_render_render_path - del Scene.storypencil_name_prefix - del Scene.storypencil_name_suffix - del Scene.storypencil_render_onlyselected - del Scene.storypencil_render_channel - del Scene.storypencil_render_step - del Scene.storypencil_add_render_strip - del Scene.storypencil_render_numbering - del Scene.storypencil_add_render_byfolder - -if __name__ == '__main__': - register() diff --git a/storypencil/dopesheet_overlay.py b/storypencil/dopesheet_overlay.py deleted file mode 100644 index 2c00d8e..0000000 --- a/storypencil/dopesheet_overlay.py +++ /dev/null @@ -1,179 +0,0 @@ -# SPDX-License-Identifier: GPL-2.0-or-later - -import typing - -import bpy -import gpu -from gpu_extras.batch import batch_for_shader - -from .utils import (redraw_all_areas_by_type) -from .synchro import (is_secondary_window, window_id, get_main_strip) - -Int3 = typing.Tuple[int, int, int] - -Float2 = typing.Tuple[float, float] -Float3 = typing.Tuple[float, f @@ Diff output truncated at 10240 characters. @@ From noreply at git.blender.org Fri Dec 9 14:01:32 2022 From: noreply at git.blender.org (Antonio Vazquez) Date: Fri, 9 Dec 2022 14:01:32 +0100 (CET) Subject: [Bf-extensions-cvs] [3c675e2c] master: Fix T103028: Storypencil clears all frame_change_post handlers In-Reply-To: <167059089266.24643.11686693106913298389@git.blender.org> References: <167059089266.24643.11686693106913298389@git.blender.org> Message-ID: <20221209130132.CE60F10448@git.blender.org> Commit: 3c675e2c16acb59dd08f49718f5adc414b1855b2 Author: Antonio Vazquez Date: Fri Dec 9 14:01:32 2022 +0100 Branches: master https://developer.blender.org/rBA3c675e2c16acb59dd08f49718f5adc414b1855b2 Fix T103028: Storypencil clears all frame_change_post handlers Now only Storypencil data is removed =================================================================== M storypencil/__init__.py =================================================================== diff --git a/storypencil/__init__.py b/storypencil/__init__.py index 1abd0261..338167f5 100644 --- a/storypencil/__init__.py +++ b/storypencil/__init__.py @@ -175,7 +175,8 @@ def register(): ) # Append Handlers - bpy.app.handlers.frame_change_post.clear() + if bpy.app.handlers.frame_change_post: + bpy.app.handlers.frame_change_post.remove(synchro.on_frame_changed) bpy.app.handlers.frame_change_post.append(synchro.on_frame_changed) bpy.app.handlers.load_post.append(synchro.sync_autoconfig) From noreply at git.blender.org Fri Dec 9 21:06:22 2022 From: noreply at git.blender.org (Brecht Van Lommel) Date: Fri, 9 Dec 2022 21:06:22 +0100 (CET) Subject: [Bf-extensions-cvs] [1168a4fd] master: Fix T103028: more wrong handler logic in storypencil In-Reply-To: <167061638252.23014.13312521820831224610@git.blender.org> References: <167061638252.23014.13312521820831224610@git.blender.org> Message-ID: <20221209200622.AD58419F47@git.blender.org> Commit: 1168a4fd9bcdd8cabece3dd22f7ffbf13cab6753 Author: Brecht Van Lommel Date: Fri Dec 9 21:01:38 2022 +0100 Branches: master https://developer.blender.org/rBA1168a4fd9bcdd8cabece3dd22f7ffbf13cab6753 Fix T103028: more wrong handler logic in storypencil Append in register, remove in unregister. =================================================================== M storypencil/__init__.py =================================================================== diff --git a/storypencil/__init__.py b/storypencil/__init__.py index 338167f5..d1e6bd09 100644 --- a/storypencil/__init__.py +++ b/storypencil/__init__.py @@ -175,8 +175,6 @@ def register(): ) # Append Handlers - if bpy.app.handlers.frame_change_post: - bpy.app.handlers.frame_change_post.remove(synchro.on_frame_changed) bpy.app.handlers.frame_change_post.append(synchro.on_frame_changed) bpy.app.handlers.load_post.append(synchro.sync_autoconfig) @@ -206,8 +204,7 @@ def unregister(): unregister_class(cls) # Remove Handlers - if bpy.app.handlers.frame_change_post: - bpy.app.handlers.frame_change_post.remove(synchro.on_frame_changed) + bpy.app.handlers.frame_change_post.remove(synchro.on_frame_changed) bpy.app.handlers.load_post.remove(synchro.sync_autoconfig) # remove UI integration From noreply at git.blender.org Sat Dec 10 00:32:32 2022 From: noreply at git.blender.org (Julien Duroure) Date: Sat, 10 Dec 2022 00:32:32 +0100 (CET) Subject: [Bf-extensions-cvs] [3fbcd35f] master: glTF: Fix factors export after Mix Node change in Blender In-Reply-To: <167062875196.25393.1762221671218446749@git.blender.org> References: <167062875196.25393.1762221671218446749@git.blender.org> Message-ID: <20221209233232.296971B07F@git.blender.org> Commit: 3fbcd35feb2a2c06ce1200bee648a9f39583d37e Author: Julien Duroure Date: Sat Dec 10 00:32:10 2022 +0100 Branches: master https://developer.blender.org/rBA3fbcd35feb2a2c06ce1200bee648a9f39583d37e glTF: Fix factors export after Mix Node change in Blender =================================================================== M io_scene_gltf2/__init__.py M io_scene_gltf2/blender/exp/gltf2_blender_gather_texture_info.py M io_scene_gltf2/blender/exp/gltf2_blender_get.py M io_scene_gltf2/blender/imp/gltf2_blender_KHR_materials_pbrSpecularGlossiness.py M io_scene_gltf2/blender/imp/gltf2_blender_KHR_materials_sheen.py M io_scene_gltf2/blender/imp/gltf2_blender_KHR_materials_specular.py M io_scene_gltf2/blender/imp/gltf2_blender_pbrMetallicRoughness.py =================================================================== diff --git a/io_scene_gltf2/__init__.py b/io_scene_gltf2/__init__.py index 8b5b6d34..2da12265 100755 --- a/io_scene_gltf2/__init__.py +++ b/io_scene_gltf2/__init__.py @@ -4,8 +4,8 @@ bl_info = { 'name': 'glTF 2.0 format', 'author': 'Julien Duroure, Scurest, Norbert Nopper, Urs Hanselmann, Moritz Becher, Benjamin Schmithüsen, Jim Eckerlein, and many external contributors', - "version": (3, 5, 5), - 'blender': (3, 3, 0), + "version": (3, 5, 6), + 'blender': (3, 4, 0), 'location': 'File > Import-Export', 'description': 'Import-Export as glTF 2.0', 'warning': '', diff --git a/io_scene_gltf2/blender/exp/gltf2_blender_gather_texture_info.py b/io_scene_gltf2/blender/exp/gltf2_blender_gather_texture_info.py index 01d261be..8c7cf80b 100755 --- a/io_scene_gltf2/blender/exp/gltf2_blender_gather_texture_info.py +++ b/io_scene_gltf2/blender/exp/gltf2_blender_gather_texture_info.py @@ -123,14 +123,14 @@ def __gather_occlusion_strength(primary_socket, export_settings): # Look for a MixRGB node that mixes with pure white in front of # primary_socket. The mix factor gives the occlusion strength. node = gltf2_blender_get.previous_node(primary_socket) - if node and node.type == 'MIX_RGB' and node.blend_type == 'MIX': - fac = gltf2_blender_get.get_const_from_socket(node.inputs['Fac'], kind='VALUE') - col1 = gltf2_blender_get.get_const_from_socket(node.inputs['Color1'], kind='RGB') - col2 = gltf2_blender_get.get_const_from_socket(node.inputs['Color2'], kind='RGB') + if node and node.type == 'MIX' and node.blend_type == 'MIX': + fac = gltf2_blender_get.get_const_from_socket(node.inputs['Factor'], kind='VALUE') + col1 = gltf2_blender_get.get_const_from_socket(node.inputs[6], kind='RGB') + col2 = gltf2_blender_get.get_const_from_socket(node.inputs[7], kind='RGB') if fac is not None: - if col1 == [1, 1, 1] and col2 is None: + if col1 == [1.0, 1.0, 1.0] and col2 is None: return fac - if col1 is None and col2 == [1, 1, 1]: + if col1 is None and col2 == [1.0, 1.0, 1.0]: return 1.0 - fac # reversed for reversed inputs return None diff --git a/io_scene_gltf2/blender/exp/gltf2_blender_get.py b/io_scene_gltf2/blender/exp/gltf2_blender_get.py index dacfbf4a..1a5bb681 100755 --- a/io_scene_gltf2/blender/exp/gltf2_blender_get.py +++ b/io_scene_gltf2/blender/exp/gltf2_blender_get.py @@ -244,14 +244,14 @@ def get_factor_from_socket(socket, kind): if node is not None: x1, x2 = None, None if kind == 'RGB': - if node.type == 'MIX_RGB' and node.blend_type == 'MULTIPLY': + if node.type in 'MIX' and node.data_type == "RGBA" and node.blend_type == 'MULTIPLY': # TODO: handle factor in inputs[0]? - x1 = get_const_from_socket(node.inputs[1], kind) - x2 = get_const_from_socket(node.inputs[2], kind) + x1 = get_const_from_socket(node.inputs[6], kind) + x2 = get_const_from_socket(node.inputs[7], kind) if kind == 'VALUE': if node.type == 'MATH' and node.operation == 'MULTIPLY': x1 = get_const_from_socket(node.inputs[0], kind) - x2 = get_const_from_socket(node.inputs[1], kind) + x2 = get_const_from_socket(node.inputs[1], kind) if x1 is not None and x2 is None: return x1 if x2 is not None and x1 is None: return x2 diff --git a/io_scene_gltf2/blender/imp/gltf2_blender_KHR_materials_pbrSpecularGlossiness.py b/io_scene_gltf2/blender/imp/gltf2_blender_KHR_materials_pbrSpecularGlossiness.py index 19a394b9..0af88f04 100755 --- a/io_scene_gltf2/blender/imp/gltf2_blender_KHR_materials_pbrSpecularGlossiness.py +++ b/io_scene_gltf2/blender/imp/gltf2_blender_KHR_materials_pbrSpecularGlossiness.py @@ -117,16 +117,17 @@ def specular_glossiness(mh, location, specular_socket, roughness_socket): # Mix in spec/gloss factor if spec_factor != [1, 1, 1] or gloss_factor != 1: if spec_factor != [1, 1, 1]: - node = mh.node_tree.nodes.new('ShaderNodeMixRGB') + node = mh.node_tree.nodes.new('ShaderNodeMix') + node.data_type = 'RGBA' node.label = 'Specular Factor' node.location = x - 140, y node.blend_type = 'MULTIPLY' # Outputs mh.node_tree.links.new(specular_socket, node.outputs[0]) # Inputs - node.inputs['Fac'].default_value = 1.0 - specular_socket = node.inputs['Color1'] - node.inputs['Color2'].default_value = spec_factor + [1] + node.inputs['Factor'].default_value = 1.0 + specular_socket = node.inputs[6] + node.inputs[7].default_value = spec_factor + [1] if gloss_factor != 1: node = mh.node_tree.nodes.new('ShaderNodeMath') diff --git a/io_scene_gltf2/blender/imp/gltf2_blender_KHR_materials_sheen.py b/io_scene_gltf2/blender/imp/gltf2_blender_KHR_materials_sheen.py index aa5cef75..91c202eb 100644 --- a/io_scene_gltf2/blender/imp/gltf2_blender_KHR_materials_sheen.py +++ b/io_scene_gltf2/blender/imp/gltf2_blender_KHR_materials_sheen.py @@ -40,16 +40,17 @@ def sheen( mh, # Mix sheenColor factor sheenColorFactor = sheenColorFactor + [1.0] if sheenColorFactor != [1.0, 1.0, 1.0, 1.0]: - node = mh.node_tree.nodes.new('ShaderNodeMixRGB') + node = mh.node_tree.nodes.new('ShaderNodeMix') node.label = 'sheenColor Factor' + node.data_type = 'RGBA' node.location = x_sheenColor - 140, y_sheenColor node.blend_type = 'MULTIPLY' # Outputs mh.node_tree.links.new(sheenColor_socket, node.outputs[0]) # Inputs - node.inputs['Fac'].default_value = 1.0 - sheenColor_socket = node.inputs['Color1'] - node.inputs['Color2'].default_value = sheenColorFactor + node.inputs['Factor'].default_value = 1.0 + sheenColor_socket = node.inputs[6] + node.inputs[7].default_value = sheenColorFactor x_sheenColor -= 200 texture( diff --git a/io_scene_gltf2/blender/imp/gltf2_blender_KHR_materials_specular.py b/io_scene_gltf2/blender/imp/gltf2_blender_KHR_materials_specular.py index 3441b5ad..35afcc3e 100644 --- a/io_scene_gltf2/blender/imp/gltf2_blender_KHR_materials_specular.py +++ b/io_scene_gltf2/blender/imp/gltf2_blender_KHR_materials_specular.py @@ -335,16 +335,17 @@ def original_specular( mh, specular_color_factor = list(specular_color_factor) + [1.0] if specular_color_factor != [1.0, 1.0, 1.0, 1.0]: # Mix specularColorFactor - node = mh.node_tree.nodes.new('ShaderNodeMixRGB') + node = mh.node_tree.nodes.new('ShaderNodeMix') node.label = 'SpecularColor Factor' + node.data_type = 'RGBA' node.location = x_specularcolor - 140, y_specularcolor node.blend_type = 'MULTIPLY' # Outputs mh.node_tree.links.new(original_specularcolor_socket, node.outputs[0]) # Inputs - node.inputs['Fac'].default_value = 1.0 - original_specularcolor_socket = node.inputs['Color1'] - node.inputs['Color2'].default_value = specular_color_factor + node.inputs['Factor'].default_value = 1.0 + original_specularcolor_socket = node.inputs[6] + node.inputs[7].default_value = specular_color_factor x_specularcolor -= 200 texture( diff --git a/io_scene_gltf2/blender/imp/gltf2_blender_pbrMetallicRoughness.py b/io_scene_gltf2/blender/imp/gltf2_blender_pbrMetallicRoughness.py index 18cb68ab..519fe221 100755 --- a/io_scene_gltf2/blender/imp/gltf2_blender_pbrMetallicRoughness.py +++ b/io_scene_gltf2/blender/imp/gltf2_blender_pbrMetallicRoughness.py @@ -316,16 +316,17 @@ def emission(mh: MaterialHelper, location, color_socket, strength_socket): # Otherwise, use a multiply node for it else: if emissive_factor != [1, 1, 1]: - node = mh.node_tree.nodes.new('ShaderNodeMixRGB') + node = mh.node_tree.nodes.new('ShaderNodeMix') node.label = 'Emissive Factor' + node.data_type = 'RGBA' node.location = x - 140, y node.blend_type = 'MULTIPLY' # Outputs mh.node_tree.links.new(color_socket, node.outputs[0]) # Inputs - node.inputs['Fac'].default_value = 1.0 - color_socket = node.inputs['Color1'] - node.inputs['Color2'].default_value = emissive_factor + [1] + node.inputs['Factor'].default_value = 1.0 + color_socket = node.inputs[6] + node.inputs[7].default_value = emissive_factor + [1] x -= 200 @@ -381,16 +382,17 @@ def base_color( needs_alpha_factor = base_color_factor[3] != 1.0 and alpha_socket is not None if needs_color_factor or needs_alpha_factor: if needs_color_factor: - node = mh.node_tree.nodes.new('ShaderNodeMixRGB') + node = mh.node_tree.nodes.new('ShaderNodeMix') node.label = 'Color Factor' + node.data_type = "RGBA" node.location = x - 140, y node.blend_type = 'MULTIPLY' # Outputs mh.node_tree.links.new(color_socket, node.outputs[0]) # Inputs - node.inputs['Fac'].default_value = 1.0 - color_socket = node.inputs['Color1'] - node.inputs['Color2'].default_value = base_color_factor[:3] + [1] + node.inputs['Factor'].default_value = 1.0 + color_socket = node.inputs[6] + node.inputs[7].default_value = base_color_factor[:3] + [1] if needs_alpha_factor: node = mh.node_tree.nodes.new('ShaderNodeMath') @@ -413,7 +415,7 @@ def base_color( # Mix texture and vertex color together if base_color_texture is not None a @@ Diff output truncated at 10240 characters. @@ From noreply at git.blender.org Mon Dec 12 11:38:15 2022 From: noreply at git.blender.org (Julien Duroure) Date: Mon, 12 Dec 2022 11:38:15 +0100 (CET) Subject: [Bf-extensions-cvs] [fea0e8e3] master: glTF exporter: Fix export VertexColor for loose edges & vertices In-Reply-To: <167084149553.25269.14841217533983563977@git.blender.org> References: <167084149553.25269.14841217533983563977@git.blender.org> Message-ID: <20221212103815.B2DE95D38@git.blender.org> Commit: fea0e8e32e2fdb6e400ebd766628311453f5bed7 Author: Julien Duroure Date: Mon Dec 12 11:38:05 2022 +0100 Branches: master https://developer.blender.org/rBAfea0e8e32e2fdb6e400ebd766628311453f5bed7 glTF exporter: Fix export VertexColor for loose edges & vertices =================================================================== M io_scene_gltf2/__init__.py M io_scene_gltf2/blender/exp/gltf2_blender_gather_primitives_extract.py =================================================================== diff --git a/io_scene_gltf2/__init__.py b/io_scene_gltf2/__init__.py index 2da12265..32bda219 100755 --- a/io_scene_gltf2/__init__.py +++ b/io_scene_gltf2/__init__.py @@ -4,7 +4,7 @@ bl_info = { 'name': 'glTF 2.0 format', 'author': 'Julien Duroure, Scurest, Norbert Nopper, Urs Hanselmann, Moritz Becher, Benjamin Schmithüsen, Jim Eckerlein, and many external contributors', - "version": (3, 5, 6), + "version": (3, 5, 7), 'blender': (3, 4, 0), 'location': 'File > Import-Export', 'description': 'Import-Export as glTF 2.0', diff --git a/io_scene_gltf2/blender/exp/gltf2_blender_gather_primitives_extract.py b/io_scene_gltf2/blender/exp/gltf2_blender_gather_primitives_extract.py index c7d2a966..27290e65 100644 --- a/io_scene_gltf2/blender/exp/gltf2_blender_gather_primitives_extract.py +++ b/io_scene_gltf2/blender/exp/gltf2_blender_gather_primitives_extract.py @@ -558,16 +558,28 @@ class PrimitiveCreator: self.blender_mesh.color_attributes[blender_color_idx].data.foreach_get('color', colors) if attr['blender_domain'] == "POINT": colors = colors.reshape(-1, 4) - colors = colors[self.dots['vertex_index']] + data_dots = colors[self.dots['vertex_index']] + if self.export_settings['gltf_loose_edges']: + data_dots_edges = colors[self.dots_edges['vertex_index']] + if self.export_settings['gltf_loose_points']: + data_dots_points = colors[self.dots_points['vertex_index']] + elif attr['blender_domain'] == "CORNER": colors = colors.reshape(-1, 4) - # colors are already linear, no need to switch color space - self.dots[attr['gltf_attribute_name'] + '0'] = colors[:, 0] - self.dots[attr['gltf_attribute_name'] + '1'] = colors[:, 1] - self.dots[attr['gltf_attribute_name'] + '2'] = colors[:, 2] - self.dots[attr['gltf_attribute_name'] + '3'] = colors[:, 3] + data_dots = colors[self.dots['vertex_index']] + if self.export_settings['gltf_loose_edges'] and attr['blender_domain'] == "POINT": + data_dots_edges = colors[self.dots_edges['vertex_index']] + if self.export_settings['gltf_loose_points'] and attr['blender_domain'] == "POINT": + data_dots_points = colors[self.dots_points['vertex_index']] + del colors + for i in range(4): + self.dots[attr['gltf_attribute_name'] + str(i)] = data_dots[:, i] + if self.export_settings['gltf_loose_edges'] and attr['blender_domain'] == "POINT": + self.dots_edges[attr['gltf_attribute_name'] + str(i)] = data_dots_edges[:, i] + if self.export_settings['gltf_loose_points'] and attr['blender_domain'] == "POINT": + self.dots_points[attr['gltf_attribute_name'] + str(i)] = data_dots_points[:, i] def __get_layer_attribute(self, attr): if attr['blender_domain'] in ['CORNER']: From noreply at git.blender.org Mon Dec 12 11:43:23 2022 From: noreply at git.blender.org (Julien Duroure) Date: Mon, 12 Dec 2022 11:43:23 +0100 (CET) Subject: [Bf-extensions-cvs] [71828a83] master: glTF exporter: restore comment deleted by error In-Reply-To: <167084180310.29389.1368046954514614070@git.blender.org> References: <167084180310.29389.1368046954514614070@git.blender.org> Message-ID: <20221212104323.4278C5D5F@git.blender.org> Commit: 71828a83e7d43da4d1a59b8a9dbe83a716bbef3b Author: Julien Duroure Date: Mon Dec 12 11:43:18 2022 +0100 Branches: master https://developer.blender.org/rBA71828a83e7d43da4d1a59b8a9dbe83a716bbef3b glTF exporter: restore comment deleted by error =================================================================== M io_scene_gltf2/blender/exp/gltf2_blender_gather_primitives_extract.py =================================================================== diff --git a/io_scene_gltf2/blender/exp/gltf2_blender_gather_primitives_extract.py b/io_scene_gltf2/blender/exp/gltf2_blender_gather_primitives_extract.py index 27290e65..0b091a6a 100644 --- a/io_scene_gltf2/blender/exp/gltf2_blender_gather_primitives_extract.py +++ b/io_scene_gltf2/blender/exp/gltf2_blender_gather_primitives_extract.py @@ -573,7 +573,7 @@ class PrimitiveCreator: data_dots_points = colors[self.dots_points['vertex_index']] del colors - + # colors are already linear, no need to switch color space for i in range(4): self.dots[attr['gltf_attribute_name'] + str(i)] = data_dots[:, i] if self.export_settings['gltf_loose_edges'] and attr['blender_domain'] == "POINT": From noreply at git.blender.org Mon Dec 12 13:17:40 2022 From: noreply at git.blender.org (Julien Duroure) Date: Mon, 12 Dec 2022 13:17:40 +0100 (CET) Subject: [Bf-extensions-cvs] [b17b70d1] master: glTF importer: Fix import ShaderNodeMix with VertexColor In-Reply-To: <167084746018.16250.2143301909907081382@git.blender.org> References: <167084746018.16250.2143301909907081382@git.blender.org> Message-ID: <20221212121740.62262714F@git.blender.org> Commit: b17b70d1b42954668850108fa8e273cd27f6d3de Author: Julien Duroure Date: Mon Dec 12 13:17:37 2022 +0100 Branches: master https://developer.blender.org/rBAb17b70d1b42954668850108fa8e273cd27f6d3de glTF importer: Fix import ShaderNodeMix with VertexColor =================================================================== M io_scene_gltf2/__init__.py M io_scene_gltf2/blender/imp/gltf2_blender_pbrMetallicRoughness.py =================================================================== diff --git a/io_scene_gltf2/__init__.py b/io_scene_gltf2/__init__.py index 32bda219..c37c6d8f 100755 --- a/io_scene_gltf2/__init__.py +++ b/io_scene_gltf2/__init__.py @@ -4,7 +4,7 @@ bl_info = { 'name': 'glTF 2.0 format', 'author': 'Julien Duroure, Scurest, Norbert Nopper, Urs Hanselmann, Moritz Becher, Benjamin Schmithüsen, Jim Eckerlein, and many external contributors', - "version": (3, 5, 7), + "version": (3, 5, 8), 'blender': (3, 4, 0), 'location': 'File > Import-Export', 'description': 'Import-Export as glTF 2.0', diff --git a/io_scene_gltf2/blender/imp/gltf2_blender_pbrMetallicRoughness.py b/io_scene_gltf2/blender/imp/gltf2_blender_pbrMetallicRoughness.py index 519fe221..679dd8b0 100755 --- a/io_scene_gltf2/blender/imp/gltf2_blender_pbrMetallicRoughness.py +++ b/io_scene_gltf2/blender/imp/gltf2_blender_pbrMetallicRoughness.py @@ -388,7 +388,7 @@ def base_color( node.location = x - 140, y node.blend_type = 'MULTIPLY' # Outputs - mh.node_tree.links.new(color_socket, node.outputs[0]) + mh.node_tree.links.new(color_socket, node.outputs[2]) # Inputs node.inputs['Factor'].default_value = 1.0 color_socket = node.inputs[6] @@ -417,14 +417,15 @@ def base_color( if base_color_texture is not None and mh.vertex_color: node = mh.node_tree.nodes.new('ShaderNodeMix') node.label = 'Mix Vertex Color' + node.data_type = 'RGBA' node.location = x - 140, y node.blend_type = 'MULTIPLY' # Outputs - mh.node_tree.links.new(color_socket, node.outputs[0]) + mh.node_tree.links.new(color_socket, node.outputs[2]) # Inputs - node.inputs['Fac'].default_value = 1.0 - texture_color_socket = node.inputs['Color1'] - vcolor_color_socket = node.inputs['Color2'] + node.inputs['Factor'].default_value = 1.0 + texture_color_socket = node.inputs[6] + vcolor_color_socket = node.inputs[7] if alpha_socket is not None: node = mh.node_tree.nodes.new('ShaderNodeMath') From noreply at git.blender.org Mon Dec 12 13:34:38 2022 From: noreply at git.blender.org (Peter Kim) Date: Mon, 12 Dec 2022 13:34:38 +0100 (CET) Subject: [Bf-extensions-cvs] [e13ee5d9] xr-dev: Merge branch 'master' into xr-dev In-Reply-To: <167084847779.31803.17253378452249161188@git.blender.org> References: <167084847779.31803.17253378452249161188@git.blender.org> Message-ID: <20221212123438.1684F7A32@git.blender.org> Commit: e13ee5d933feb46e28e023d21b65c246efa70031 Author: Peter Kim Date: Mon Dec 12 21:33:44 2022 +0900 Branches: xr-dev https://developer.blender.org/rBAe13ee5d933feb46e28e023d21b65c246efa70031 Merge branch 'master' into xr-dev =================================================================== =================================================================== From noreply at git.blender.org Mon Dec 12 13:34:37 2022 From: noreply at git.blender.org (Peter Kim) Date: Mon, 12 Dec 2022 13:34:37 +0100 (CET) Subject: [Bf-extensions-cvs] [3724a06c] xr-dev: VR: Add mouse event simulation In-Reply-To: <167084847779.31803.17253378452249161188@git.blender.org> References: <167084847779.31803.17253378452249161188@git.blender.org> Message-ID: <20221212123438.02A347A2E@git.blender.org> Commit: 3724a06c6a42599c212db82736c92d88a2cb29e2 Author: Peter Kim Date: Mon Dec 12 21:26:19 2022 +0900 Branches: xr-dev https://developer.blender.org/rBA3724a06c6a42599c212db82736c92d88a2cb29e2 VR: Add mouse event simulation Updated add-on portion of https://developer.blender.org/D13153. Users can configure the mouse event simulation via a VR action's "Simulate Mouse" properties, where a simulated type and value can be set for VR button press, hold (modal operators only), and release, depending on the operator execution mode. In addition, the "projection eye" (left or right) used to project 3D controller positions to 2D mouse positions during mouse simulation can be set via the View settings. =================================================================== M viewport_vr_preview/action_map_io.py M viewport_vr_preview/configs/default.py M viewport_vr_preview/defaults.py M viewport_vr_preview/gui.py =================================================================== diff --git a/viewport_vr_preview/action_map_io.py b/viewport_vr_preview/action_map_io.py index 1aa7f4d4..47e192ca 100644 --- a/viewport_vr_preview/action_map_io.py +++ b/viewport_vr_preview/action_map_io.py @@ -52,6 +52,17 @@ def ami_args_as_data(ami): s.append(f"\"op\": '{ami.op}'") s.append(f"\"op_mode\": '{ami.op_mode}'") s.append(f"\"bimanual\": '{ami.bimanual}'") + s.append(f"\"simulate_mouse\": '{ami.simulate_mouse}'") + if ami.simulate_mouse: + if ami.op_mode == 'PRESS' or ami.op_mode == 'MODAL': + s.append(f"\"simulate_press_type\": '{ami.simulate.press_type}'") + s.append(f"\"simulate_press_value\": '{ami.simulate.press_value}'") + if ami.op_mode == 'MODAL': + s.append(f"\"simulate_hold_type\": '{ami.simulate.hold_type}'") + s.append(f"\"simulate_hold_value\": '{ami.simulate.hold_value}'") + if ami.op_mode == 'RELEASE' or ami.op_mode == 'MODAL': + s.append(f"\"simulate_release_type\": '{ami.simulate.release_type}'") + s.append(f"\"simulate_release_value\": '{ami.simulate.release_value}'") s.append(f"\"haptic_name\": '{ami.haptic_name}'") s.append(f"\"haptic_match_user_paths\": '{ami.haptic_match_user_paths}'") s.append(f"\"haptic_duration\": '{ami.haptic_duration}'") @@ -76,6 +87,17 @@ def ami_data_from_args(ami, args): ami.op = args["op"] ami.op_mode = args["op_mode"] ami.bimanual = True if (args["bimanual"] == 'True') else False + ami.simulate_mouse = True if (args["simulate_mouse"] == 'True') else False + if ami.simulate_mouse: + if ami.op_mode == 'PRESS' or ami.op_mode == 'MODAL': + ami.simulate.press_type = args["simulate_press_type"] + ami.simulate.press_value = args["simulate_press_value"] + if ami.op_mode == 'MODAL': + ami.simulate.hold_type = args["simulate_hold_type"] + ami.simulate.hold_value = args["simulate_hold_value"] + if ami.op_mode == 'RELEASE' or ami.op_mode == 'MODAL': + ami.simulate.release_type = args["simulate_release_type"] + ami.simulate.release_value = args["simulate_release_value"] ami.haptic_name = args["haptic_name"] ami.haptic_match_user_paths = True if (args["haptic_match_user_paths"] == 'True') else False ami.haptic_duration = float(args["haptic_duration"]) diff --git a/viewport_vr_preview/configs/default.py b/viewport_vr_preview/configs/default.py index fbd40c1d..49dc34d2 100644 --- a/viewport_vr_preview/configs/default.py +++ b/viewport_vr_preview/configs/default.py @@ -1,6 +1,6 @@ # SPDX-License-Identifier: GPL-2.0-or-later -actionconfig_version = (3, 2, 8) +actionconfig_version = (3, 5, 2) actionconfig_data = \ [("blender_default", {"items": @@ -32,7 +32,7 @@ actionconfig_data = \ ], }, ), - ("teleport", {"type": 'FLOAT', "user_paths": ['/user/hand/left'], "op": 'wm.xr_navigation_teleport', "op_mode": 'MODAL', "bimanual": 'False', "haptic_name": '', "haptic_match_user_paths": 'False', "haptic_duration": '0.0', "haptic_frequency": '0.0', "haptic_amplitude": '0.0', "haptic_mode": 'PRESS'}, + ("teleport", {"type": 'FLOAT', "user_paths": ['/user/hand/left'], "op": 'wm.xr_navigation_teleport', "op_mode": 'MODAL', "bimanual": 'False', "simulate_mouse": 'False', "haptic_name": '', "haptic_match_user_paths": 'False', "haptic_duration": '0.0', "haptic_frequency": '0.0', "haptic_amplitude": '0.0', "haptic_mode": 'PRESS'}, {"op_properties": [("interpolation", 0.9), ("color", (0.0, 1.0, 1.0, 1.0)), @@ -51,7 +51,7 @@ actionconfig_data = \ ], }, ), - ("nav_grab", {"type": 'FLOAT', "user_paths": ['/user/hand/left', '/user/hand/right'], "op": 'wm.xr_navigation_grab', "op_mode": 'MODAL', "bimanual": 'True', "haptic_name": '', "haptic_match_user_paths": 'False', "haptic_duration": '0.0', "haptic_frequency": '0.0', "haptic_amplitude": '0.0', "haptic_mode": 'PRESS'}, + ("nav_grab", {"type": 'FLOAT', "user_paths": ['/user/hand/left', '/user/hand/right'], "op": 'wm.xr_navigation_grab', "op_mode": 'MODAL', "bimanual": 'True', "simulate_mouse": 'False', "haptic_name": '', "haptic_match_user_paths": 'False', "haptic_duration": '0.0', "haptic_frequency": '0.0', "haptic_amplitude": '0.0', "haptic_mode": 'PRESS'}, {"op_properties": [("lock_rotation", True), ], @@ -69,7 +69,7 @@ actionconfig_data = \ ], }, ), - ("fly_forward", {"type": 'FLOAT', "user_paths": ['/user/hand/left'], "op": 'wm.xr_navigation_fly', "op_mode": 'MODAL', "bimanual": 'False', "haptic_name": '', "haptic_match_user_paths": 'False', "haptic_duration": '0.0', "haptic_frequency": '0.0', "haptic_amplitude": '0.0', "haptic_mode": 'PRESS'}, + ("fly_forward", {"type": 'FLOAT', "user_paths": ['/user/hand/left'], "op": 'wm.xr_navigation_fly', "op_mode": 'MODAL', "bimanual": 'False', "simulate_mouse": 'False', "haptic_name": '', "haptic_match_user_paths": 'False', "haptic_duration": '0.0', "haptic_frequency": '0.0', "haptic_amplitude": '0.0', "haptic_mode": 'PRESS'}, {"op_properties": [("mode", 'VIEWER_FORWARD'), ("lock_location_z", True), @@ -87,7 +87,7 @@ actionconfig_data = \ ], }, ), - ("fly_back", {"type": 'FLOAT', "user_paths": ['/user/hand/left'], "op": 'wm.xr_navigation_fly', "op_mode": 'MODAL', "bimanual": 'False', "haptic_name": '', "haptic_match_user_paths": 'False', "haptic_duration": '0.0', "haptic_frequency": '0.0', "haptic_amplitude": '0.0', "haptic_mode": 'PRESS'}, + ("fly_back", {"type": 'FLOAT', "user_paths": ['/user/hand/left'], "op": 'wm.xr_navigation_fly', "op_mode": 'MODAL', "bimanual": 'False', "simulate_mouse": 'False', "haptic_name": '', "haptic_match_user_paths": 'False', "haptic_duration": '0.0', "haptic_frequency": '0.0', "haptic_amplitude": '0.0', "haptic_mode": 'PRESS'}, {"op_properties": [("mode", 'VIEWER_BACK'), ("lock_location_z", True), @@ -105,7 +105,7 @@ actionconfig_data = \ ], }, ), - ("fly_left", {"type": 'FLOAT', "user_paths": ['/user/hand/left'], "op": 'wm.xr_navigation_fly', "op_mode": 'MODAL', "bimanual": 'False', "haptic_name": '', "haptic_match_user_paths": 'False', "haptic_duration": '0.0', "haptic_frequency": '0.0', "haptic_amplitude": '0.0', "haptic_mode": 'PRESS'}, + ("fly_left", {"type": 'FLOAT', "user_paths": ['/user/hand/left'], "op": 'wm.xr_navigation_fly', "op_mode": 'MODAL', "bimanual": 'False', "simulate_mouse": 'False', "haptic_name": '', "haptic_match_user_paths": 'False', "haptic_duration": '0.0', "haptic_frequency": '0.0', "haptic_amplitude": '0.0', "haptic_mode": 'PRESS'}, {"op_properties": [("mode", 'VIEWER_LEFT'), ("lock_location_z", True), @@ -123,7 +123,7 @@ actionconfig_data = \ ], }, ), - ("fly_right", {"type": 'FLOAT', "user_paths": ['/user/hand/left'], "op": 'wm.xr_navigation_fly', "op_mode": 'MODAL', "bimanual": 'False', "haptic_name": '', "haptic_match_user_paths": 'False', "haptic_duration": '0.0', "haptic_frequency": '0.0', "haptic_amplitude": '0.0', "haptic_mode": 'PRESS'}, + ("fly_right", {"type": 'FLOAT', "user_paths": ['/user/hand/left'], "op": 'wm.xr_navigation_fly', "op_mode": 'MODAL', "bimanual": 'False', "simulate_mouse": 'False', "haptic_name": '', "haptic_match_user_paths": 'False', "haptic_duration": '0.0', "haptic_frequency": '0.0', "haptic_amplitude": '0.0', "haptic_mode": 'PRESS'}, {"op_properties": [("mode", 'VIEWER_RIGHT'), ("lock_location_z", True), @@ -141,7 +141,7 @@ actionconfig_data = \ ], }, ), - ("fly_up", {"type": 'FLOAT', "user_paths": ['/user/hand/right'], "op": 'wm.xr_navigation_fly', "op_mode": 'MODAL', "bimanual": 'False', "haptic_name": '', "haptic_match_user_paths": 'False', "haptic_duration": '0.0', "haptic_frequency": '0.0', "haptic_amplitude": '0.0', "haptic_mode": 'PRESS'}, + ("fly_up", {"type": 'FLOAT', "user_paths": ['/user/hand/right'], "op": 'wm.xr_navigation_fly', "op_mode": 'MODAL', "bimanual": 'False', "simulate_mouse": 'False', "haptic_name": '', "haptic_match_user_paths": 'False', "haptic_duration": '0.0', "haptic_frequency": '0.0', "haptic_amplitude": '0.0', "haptic_mode": 'PRESS'}, {"op_properties": [("mode", 'UP'), ("speed_min", 0.014), @@ -160,7 +160,7 @@ actionconfig_data = \ ], }, ), - ("fly_down", {"type": 'FLOAT', "user_paths": ['/user/hand/right'], "op": 'wm.xr_navigation_fly', "op_mode": 'MODAL', "bimanual": 'False', "haptic_name": '', "haptic_match_user_paths": 'False', "haptic_duration": '0.0', "haptic_frequency": '0.0', "haptic_amplitude": '0.0', "haptic_mode": 'PRESS'}, + ("fly_down", {"type": 'FLOAT', "user_paths": ['/user/hand/right'], "op": 'wm.xr_navigation_fly', "op_mode": 'MODAL', "bimanual": 'False', "simulate_mouse": 'False', "haptic_name": '', "haptic_match_user_paths": 'False', "haptic_duration": '0.0', "haptic_frequency": '0.0', "haptic_amplitude": '0.0', "haptic_mode": 'PRESS'}, {"op_properties": [("mode", 'DOWN'), ("speed_min", 0.014), @@ -179,7 +179,7 @@ actionconfig_data = \ ], }, ), - ("fly_turnleft", {"type": 'FLOAT', "user_paths": ['/user/hand/right'], "op": 'wm.xr_navigation_fly', "op_mode": 'MODAL', "bimanual": 'False', "haptic_name": '', "haptic_match_user_paths": 'False', "haptic_duration": '0.0', "haptic_frequency": '0.0', "haptic_amplitude": '0.0', "haptic_mode": 'PRESS'}, + ("fly_turnleft", {"type": 'FLOAT', "user_paths": ['/user/hand/right'], "op": 'wm.xr_navigation_fly', "op_mode": 'MODAL', "bimanual": 'False', "simulate_mouse": 'False', "haptic_name": '', "haptic_match_user_paths": 'False', "haptic_duration": '0.0', "haptic_frequency": '0.0', "haptic_amplitude": '0.0', "haptic_mode": 'PRESS'}, {"op_properties": [("mode", 'TURNLEFT'), ("speed_min", 0.01), @@ -198,7 +198,7 @@ actionconfig_data = \ ], }, ), - ("fly_turnright", {"type": 'FLOAT', "user_paths": ['/user/hand/right'], "op": @@ Diff output truncated at 10240 characters. @@ From noreply at git.blender.org Wed Dec 14 16:24:15 2022 From: noreply at git.blender.org (Mikhail Rachinskiy) Date: Wed, 14 Dec 2022 16:24:15 +0100 (CET) Subject: [Bf-extensions-cvs] [60299fcc] master: PLY: Fix T103203 export with UVs In-Reply-To: <167103145506.74276.16965716292016323441@git.blender.org> References: <167103145506.74276.16965716292016323441@git.blender.org> Message-ID: <20221214152415.38CF237B3E@git.blender.org> Commit: 60299fcc23b86cee0b79901f0ae78f0695ea3275 Author: Mikhail Rachinskiy Date: Wed Dec 14 18:16:38 2022 +0300 Branches: master https://developer.blender.org/rBA60299fcc23b86cee0b79901f0ae78f0695ea3275 PLY: Fix T103203 export with UVs Issue was with incomplete id when exporting with UVs. =================================================================== M io_mesh_ply/export_ply.py =================================================================== diff --git a/io_mesh_ply/export_ply.py b/io_mesh_ply/export_ply.py index b3be770c..086bbae9 100644 --- a/io_mesh_ply/export_ply.py +++ b/io_mesh_ply/export_ply.py @@ -78,7 +78,7 @@ def save_mesh(filepath, bm, use_ascii, use_normals, use_uv, use_color): if use_uv: uv = loop[uv_lay].uv[:] - map_id = uv + map_id = v, uv # Identify vertex by pointer unless exporting UVs, # in which case id by UV coordinate (will split edges by seams). From noreply at git.blender.org Wed Dec 14 22:08:15 2022 From: noreply at git.blender.org (Thomas Dinges) Date: Wed, 14 Dec 2022 22:08:15 +0100 (CET) Subject: [Bf-extensions-cvs] [886ea86] blender-v3.4-release: Addons: Remove storypencil from contrib, this has been moved to official. In-Reply-To: <167105209572.71362.86800402162618405@git.blender.org> References: <167105209572.71362.86800402162618405@git.blender.org> Message-ID: <20221214210815.DD4A743264@git.blender.org> Commit: 886ea86bd9a0fd2761260a46356b728d51f2298a Author: Thomas Dinges Date: Fri Dec 9 10:00:52 2022 +0100 Branches: blender-v3.4-release https://developer.blender.org/rBAC886ea86bd9a0fd2761260a46356b728d51f2298a Addons: Remove storypencil from contrib, this has been moved to official. =================================================================== D storypencil/__init__.py D storypencil/dopesheet_overlay.py D storypencil/render.py D storypencil/scene_tools.py D storypencil/synchro.py D storypencil/ui.py D storypencil/utils.py =================================================================== diff --git a/storypencil/__init__.py b/storypencil/__init__.py deleted file mode 100644 index e468201..0000000 --- a/storypencil/__init__.py +++ /dev/null @@ -1,217 +0,0 @@ -# SPDX-License-Identifier: GPL-2.0-or-later - -# ---------------------------------------------- -# Define Addon info -# ---------------------------------------------- -bl_info = { - "name": "Storypencil - Storyboard Tools", - "description": "Storyboard tools", - "author": "Antonio Vazquez, Matias Mendiola, Daniel Martinez Lara, Rodrigo Blaas", - "version": (1, 1, 0), - "blender": (3, 3, 0), - "location": "", - "warning": "", - "category": "Sequencer", -} - -# ---------------------------------------------- -# Import modules -# ---------------------------------------------- -if "bpy" in locals(): - import importlib - - importlib.reload(utils) - importlib.reload(synchro) - importlib.reload(dopesheet_overlay) - importlib.reload(scene_tools) - importlib.reload(render) - importlib.reload(ui) -else: - from . import utils - from . import synchro - from . import dopesheet_overlay - from . import scene_tools - from . import render - from . import ui - -import bpy -from bpy.types import ( - Scene, - WindowManager, - WorkSpace, -) -from bpy.props import ( - BoolProperty, - IntProperty, - PointerProperty, - StringProperty, - EnumProperty, -) - -# -------------------------------------------------------------- -# Register all operators, props and panels -# -------------------------------------------------------------- -classes = ( - synchro.STORYPENCIL_PG_Settings, - scene_tools.STORYPENCIL_OT_Setup, - scene_tools.STORYPENCIL_OT_NewScene, - synchro.STORYPENCIL_OT_WindowBringFront, - synchro.STORYPENCIL_OT_WindowCloseOperator, - synchro.STORYPENCIL_OT_SyncToggleSlave, - synchro.STORYPENCIL_OT_SetSyncMainOperator, - synchro.STORYPENCIL_OT_AddSlaveWindowOperator, - synchro.STORYPENCIL_OT_Switch, - render.STORYPENCIL_OT_RenderAction, - ui.STORYPENCIL_PT_Settings, - ui.STORYPENCIL_PT_SettingsNew, - ui.STORYPENCIL_PT_RenderPanel, - ui.STORYPENCIL_PT_General, - ui.STORYPENCIL_MT_extra_options, -) - - -def save_mode(self, context): - wm = context.window_manager - wm['storypencil_use_new_window'] = context.scene.storypencil_use_new_window - # Close all secondary windows - if context.scene.storypencil_use_new_window is False: - c = context.copy() - for win in context.window_manager.windows: - # Don't close actual window - if win == context.window: - continue - win_id = str(win.as_pointer()) - if win_id != wm.storypencil_settings.main_window_id and win.parent is None: - c["window"] = win - bpy.ops.wm.window_close(c) - - -def register(): - from bpy.utils import register_class - for cls in classes: - register_class(cls) - - Scene.storypencil_scene_duration = IntProperty( - name="Scene Duration", - description="Default Duration for new Scene", - default=48, - min=1, - soft_max=250, - ) - - Scene.storypencil_use_new_window = BoolProperty(name="Open in new window", - description="Use secondary main window to edit scenes", - default=False, - update=save_mode) - - Scene.storypencil_main_workspace = PointerProperty(type=WorkSpace, - description="Main Workspace used for editing Storyboard") - Scene.storypencil_main_scene = PointerProperty(type=Scene, - description="Main Scene used for editing Storyboard") - Scene.storypencil_edit_workspace = PointerProperty(type=WorkSpace, - description="Workspace used for changing drawings") - - Scene.storypencil_base_scene = PointerProperty(type=Scene, - description="Template Scene used for creating new scenes") - - Scene.storypencil_render_render_path = StringProperty(name="Output Path", subtype='FILE_PATH', maxlen=256, - description="Directory/name to save files") - - Scene.storypencil_name_prefix = StringProperty(name="Scene Name Prefix", maxlen=20, default="") - - Scene.storypencil_name_suffix = StringProperty(name="Scene Name Suffix", maxlen=20, default="") - - Scene.storypencil_render_onlyselected = BoolProperty(name="Render only Selected Strips", - description="Render only the selected strips", - default=True) - - Scene.storypencil_render_channel = IntProperty(name="Channel", - description="Channel to set the new rendered video", - default=5, min=1, max=128) - - Scene.storypencil_add_render_strip = BoolProperty(name="Import Rendered Strips", - description="Add a Strip with the render", - default=True) - - Scene.storypencil_render_step = IntProperty(name="Image Steps", - description="Minimum frames number to generate images between keyframes (0 to disable)", - default=0, min=0, max=128) - - Scene.storypencil_render_numbering = EnumProperty(name="Image Numbering", - items=( - ('1', "Frame", "Use real frame number"), - ('2', "Consecutive", "Use sequential numbering"), - ), - description="Defines how frame is named") - - Scene.storypencil_add_render_byfolder = BoolProperty(name="Folder by Strip", - description="Create a separated folder for each strip", - default=True) - - WindowManager.storypencil_settings = PointerProperty( - type=synchro.STORYPENCIL_PG_Settings, - name="Storypencil settings", - description="Storypencil tool settings", - ) - - # Append Handlers - bpy.app.handlers.frame_change_post.clear() - bpy.app.handlers.frame_change_post.append(synchro.on_frame_changed) - bpy.app.handlers.load_post.append(synchro.sync_autoconfig) - - bpy.context.window_manager.storypencil_settings.active = False - bpy.context.window_manager.storypencil_settings.main_window_id = "" - bpy.context.window_manager.storypencil_settings.slave_windows_ids = "" - - # UI integration in dopesheet header - bpy.types.DOPESHEET_HT_header.append(synchro.draw_sync_header) - dopesheet_overlay.register() - - synchro.sync_autoconfig() - - # UI integration in VSE header - bpy.types.SEQUENCER_HT_header.remove(synchro.draw_sync_sequencer_header) - bpy.types.SEQUENCER_HT_header.append(synchro.draw_sync_sequencer_header) - - bpy.types.SEQUENCER_MT_add.append(scene_tools.draw_new_scene) - bpy.types.VIEW3D_MT_draw_gpencil.append(scene_tools.setup_storyboard) - - -def unregister(): - from bpy.utils import unregister_class - for cls in reversed(classes): - unregister_class(cls) - - # Remove Handlers - if bpy.app.handlers.frame_change_post: - bpy.app.handlers.frame_change_post.remove(synchro.on_frame_changed) - bpy.app.handlers.load_post.remove(synchro.sync_autoconfig) - - # remove UI integration - bpy.types.DOPESHEET_HT_header.remove(synchro.draw_sync_header) - dopesheet_overlay.unregister() - bpy.types.SEQUENCER_HT_header.remove(synchro.draw_sync_sequencer_header) - - bpy.types.SEQUENCER_MT_add.remove(scene_tools.draw_new_scene) - bpy.types.VIEW3D_MT_draw_gpencil.remove(scene_tools.setup_storyboard) - - del Scene.storypencil_scene_duration - del WindowManager.storypencil_settings - - del Scene.storypencil_base_scene - del Scene.storypencil_main_workspace - del Scene.storypencil_main_scene - del Scene.storypencil_edit_workspace - - del Scene.storypencil_render_render_path - del Scene.storypencil_name_prefix - del Scene.storypencil_name_suffix - del Scene.storypencil_render_onlyselected - del Scene.storypencil_render_channel - del Scene.storypencil_render_step - del Scene.storypencil_add_render_strip - del Scene.storypencil_render_numbering - del Scene.storypencil_add_render_byfolder - -if __name__ == '__main__': - register() diff --git a/storypencil/dopesheet_overlay.py b/storypencil/dopesheet_overlay.py deleted file mode 100644 index 754b8e5..0000000 --- a/storypencil/dopesheet_overlay.py +++ /dev/null @@ -1,179 +0,0 @@ -# SPDX-License-Identifier: GPL-2.0-or-later - -import typing - -import bpy -import gpu -from gpu_extras.batch import batch_for_shader - -from .utils import (redraw_all_areas_by_type) -from .synchro import (is_slave_window, window_id, get_main_strip) - -Int3 = typing.Tuple[int, int, int] - -Float2 = typing.Tuple[float, float] -Float3 = typing.Tuple[float, float, float] -Float4 = typing.Tuple[float, float, float, float] - - -class LineDrawer: - def __init__(self): - self._format = gpu.types.GPUVertFormat() - self._pos_id = self._format.attr_add( - id="pos", comp_type="F32", len=2, fetch_mode="FLOAT" - ) - self._color_id = self._format.attr_add( - id="color", comp_type="F32", len=4, fetch_mode="FLOAT" - ) - - self.shader = gpu.shader.from_builtin('2D_UNIFORM_COLOR') - - def draw( - self, - coords: typing.List[Float2], - indices: typing.List[Int3], - color: Float4, - ): - @@ Diff output truncated at 10240 characters. @@ From noreply at git.blender.org Wed Dec 14 22:08:47 2022 From: noreply at git.blender.org (Antonio Vazquez) Date: Wed, 14 Dec 2022 22:08:47 +0100 (CET) Subject: [Bf-extensions-cvs] [4920c2cb] blender-v3.4-release: Fix T103028: Storypencil clears all frame_change_post handlers In-Reply-To: <167105212723.72084.16289817478894589573@git.blender.org> References: <167105212723.72084.16289817478894589573@git.blender.org> Message-ID: <20221214210847.755FE43289@git.blender.org> Commit: 4920c2cbb8a88c71a6a96b10ecf7378a339d9a96 Author: Antonio Vazquez Date: Fri Dec 9 14:01:32 2022 +0100 Branches: blender-v3.4-release https://developer.blender.org/rBA4920c2cbb8a88c71a6a96b10ecf7378a339d9a96 Fix T103028: Storypencil clears all frame_change_post handlers Now only Storypencil data is removed =================================================================== M storypencil/__init__.py =================================================================== diff --git a/storypencil/__init__.py b/storypencil/__init__.py index 1abd0261..338167f5 100644 --- a/storypencil/__init__.py +++ b/storypencil/__init__.py @@ -175,7 +175,8 @@ def register(): ) # Append Handlers - bpy.app.handlers.frame_change_post.clear() + if bpy.app.handlers.frame_change_post: + bpy.app.handlers.frame_change_post.remove(synchro.on_frame_changed) bpy.app.handlers.frame_change_post.append(synchro.on_frame_changed) bpy.app.handlers.load_post.append(synchro.sync_autoconfig) From noreply at git.blender.org Wed Dec 14 22:08:47 2022 From: noreply at git.blender.org (Brecht Van Lommel) Date: Wed, 14 Dec 2022 22:08:47 +0100 (CET) Subject: [Bf-extensions-cvs] [708dff3e] blender-v3.4-release: Fix T103028: more wrong handler logic in storypencil In-Reply-To: <167105212723.72084.16289817478894589573@git.blender.org> References: <167105212723.72084.16289817478894589573@git.blender.org> Message-ID: <20221214210847.88CAB4328B@git.blender.org> Commit: 708dff3ea0daeaa51effe53812453a47706f262a Author: Brecht Van Lommel Date: Fri Dec 9 21:01:38 2022 +0100 Branches: blender-v3.4-release https://developer.blender.org/rBA708dff3ea0daeaa51effe53812453a47706f262a Fix T103028: more wrong handler logic in storypencil Append in register, remove in unregister. =================================================================== M storypencil/__init__.py =================================================================== diff --git a/storypencil/__init__.py b/storypencil/__init__.py index 338167f5..d1e6bd09 100644 --- a/storypencil/__init__.py +++ b/storypencil/__init__.py @@ -175,8 +175,6 @@ def register(): ) # Append Handlers - if bpy.app.handlers.frame_change_post: - bpy.app.handlers.frame_change_post.remove(synchro.on_frame_changed) bpy.app.handlers.frame_change_post.append(synchro.on_frame_changed) bpy.app.handlers.load_post.append(synchro.sync_autoconfig) @@ -206,8 +204,7 @@ def unregister(): unregister_class(cls) # Remove Handlers - if bpy.app.handlers.frame_change_post: - bpy.app.handlers.frame_change_post.remove(synchro.on_frame_changed) + bpy.app.handlers.frame_change_post.remove(synchro.on_frame_changed) bpy.app.handlers.load_post.remove(synchro.sync_autoconfig) # remove UI integration From noreply at git.blender.org Wed Dec 14 22:08:47 2022 From: noreply at git.blender.org (Julien Duroure) Date: Wed, 14 Dec 2022 22:08:47 +0100 (CET) Subject: [Bf-extensions-cvs] [a368094a] blender-v3.4-release: glTF importer: Fix import ShaderNodeMix with VertexColor In-Reply-To: <167105212723.72084.16289817478894589573@git.blender.org> References: <167105212723.72084.16289817478894589573@git.blender.org> Message-ID: <20221214210847.C15B643291@git.blender.org> Commit: a368094a4cf6ab7fcd011280a24a254fad56a91d Author: Julien Duroure Date: Mon Dec 12 13:17:37 2022 +0100 Branches: blender-v3.4-release https://developer.blender.org/rBAa368094a4cf6ab7fcd011280a24a254fad56a91d glTF importer: Fix import ShaderNodeMix with VertexColor =================================================================== M io_scene_gltf2/__init__.py M io_scene_gltf2/blender/imp/gltf2_blender_pbrMetallicRoughness.py =================================================================== diff --git a/io_scene_gltf2/__init__.py b/io_scene_gltf2/__init__.py index 32bda219..c37c6d8f 100755 --- a/io_scene_gltf2/__init__.py +++ b/io_scene_gltf2/__init__.py @@ -4,7 +4,7 @@ bl_info = { 'name': 'glTF 2.0 format', 'author': 'Julien Duroure, Scurest, Norbert Nopper, Urs Hanselmann, Moritz Becher, Benjamin Schmithüsen, Jim Eckerlein, and many external contributors', - "version": (3, 5, 7), + "version": (3, 5, 8), 'blender': (3, 4, 0), 'location': 'File > Import-Export', 'description': 'Import-Export as glTF 2.0', diff --git a/io_scene_gltf2/blender/imp/gltf2_blender_pbrMetallicRoughness.py b/io_scene_gltf2/blender/imp/gltf2_blender_pbrMetallicRoughness.py index 519fe221..679dd8b0 100755 --- a/io_scene_gltf2/blender/imp/gltf2_blender_pbrMetallicRoughness.py +++ b/io_scene_gltf2/blender/imp/gltf2_blender_pbrMetallicRoughness.py @@ -388,7 +388,7 @@ def base_color( node.location = x - 140, y node.blend_type = 'MULTIPLY' # Outputs - mh.node_tree.links.new(color_socket, node.outputs[0]) + mh.node_tree.links.new(color_socket, node.outputs[2]) # Inputs node.inputs['Factor'].default_value = 1.0 color_socket = node.inputs[6] @@ -417,14 +417,15 @@ def base_color( if base_color_texture is not None and mh.vertex_color: node = mh.node_tree.nodes.new('ShaderNodeMix') node.label = 'Mix Vertex Color' + node.data_type = 'RGBA' node.location = x - 140, y node.blend_type = 'MULTIPLY' # Outputs - mh.node_tree.links.new(color_socket, node.outputs[0]) + mh.node_tree.links.new(color_socket, node.outputs[2]) # Inputs - node.inputs['Fac'].default_value = 1.0 - texture_color_socket = node.inputs['Color1'] - vcolor_color_socket = node.inputs['Color2'] + node.inputs['Factor'].default_value = 1.0 + texture_color_socket = node.inputs[6] + vcolor_color_socket = node.inputs[7] if alpha_socket is not None: node = mh.node_tree.nodes.new('ShaderNodeMath') From noreply at git.blender.org Wed Dec 14 22:08:47 2022 From: noreply at git.blender.org (Julien Duroure) Date: Wed, 14 Dec 2022 22:08:47 +0100 (CET) Subject: [Bf-extensions-cvs] [15e9136a] blender-v3.4-release: glTF exporter: Fix export VertexColor for loose edges & vertices In-Reply-To: <167105212723.72084.16289817478894589573@git.blender.org> References: <167105212723.72084.16289817478894589573@git.blender.org> Message-ID: <20221214210847.AEE264328F@git.blender.org> Commit: 15e9136a5a529799b357bddaedce514dedcfd3b9 Author: Julien Duroure Date: Mon Dec 12 11:38:05 2022 +0100 Branches: blender-v3.4-release https://developer.blender.org/rBA15e9136a5a529799b357bddaedce514dedcfd3b9 glTF exporter: Fix export VertexColor for loose edges & vertices =================================================================== M io_scene_gltf2/__init__.py M io_scene_gltf2/blender/exp/gltf2_blender_gather_primitives_extract.py =================================================================== diff --git a/io_scene_gltf2/__init__.py b/io_scene_gltf2/__init__.py index 2da12265..32bda219 100755 --- a/io_scene_gltf2/__init__.py +++ b/io_scene_gltf2/__init__.py @@ -4,7 +4,7 @@ bl_info = { 'name': 'glTF 2.0 format', 'author': 'Julien Duroure, Scurest, Norbert Nopper, Urs Hanselmann, Moritz Becher, Benjamin Schmithüsen, Jim Eckerlein, and many external contributors', - "version": (3, 5, 6), + "version": (3, 5, 7), 'blender': (3, 4, 0), 'location': 'File > Import-Export', 'description': 'Import-Export as glTF 2.0', diff --git a/io_scene_gltf2/blender/exp/gltf2_blender_gather_primitives_extract.py b/io_scene_gltf2/blender/exp/gltf2_blender_gather_primitives_extract.py index c7d2a966..27290e65 100644 --- a/io_scene_gltf2/blender/exp/gltf2_blender_gather_primitives_extract.py +++ b/io_scene_gltf2/blender/exp/gltf2_blender_gather_primitives_extract.py @@ -558,16 +558,28 @@ class PrimitiveCreator: self.blender_mesh.color_attributes[blender_color_idx].data.foreach_get('color', colors) if attr['blender_domain'] == "POINT": colors = colors.reshape(-1, 4) - colors = colors[self.dots['vertex_index']] + data_dots = colors[self.dots['vertex_index']] + if self.export_settings['gltf_loose_edges']: + data_dots_edges = colors[self.dots_edges['vertex_index']] + if self.export_settings['gltf_loose_points']: + data_dots_points = colors[self.dots_points['vertex_index']] + elif attr['blender_domain'] == "CORNER": colors = colors.reshape(-1, 4) - # colors are already linear, no need to switch color space - self.dots[attr['gltf_attribute_name'] + '0'] = colors[:, 0] - self.dots[attr['gltf_attribute_name'] + '1'] = colors[:, 1] - self.dots[attr['gltf_attribute_name'] + '2'] = colors[:, 2] - self.dots[attr['gltf_attribute_name'] + '3'] = colors[:, 3] + data_dots = colors[self.dots['vertex_index']] + if self.export_settings['gltf_loose_edges'] and attr['blender_domain'] == "POINT": + data_dots_edges = colors[self.dots_edges['vertex_index']] + if self.export_settings['gltf_loose_points'] and attr['blender_domain'] == "POINT": + data_dots_points = colors[self.dots_points['vertex_index']] + del colors + for i in range(4): + self.dots[attr['gltf_attribute_name'] + str(i)] = data_dots[:, i] + if self.export_settings['gltf_loose_edges'] and attr['blender_domain'] == "POINT": + self.dots_edges[attr['gltf_attribute_name'] + str(i)] = data_dots_edges[:, i] + if self.export_settings['gltf_loose_points'] and attr['blender_domain'] == "POINT": + self.dots_points[attr['gltf_attribute_name'] + str(i)] = data_dots_points[:, i] def __get_layer_attribute(self, attr): if attr['blender_domain'] in ['CORNER']: From noreply at git.blender.org Wed Dec 14 22:08:47 2022 From: noreply at git.blender.org (Julien Duroure) Date: Wed, 14 Dec 2022 22:08:47 +0100 (CET) Subject: [Bf-extensions-cvs] [4ea28bf9] blender-v3.4-release: glTF: Fix factors export after Mix Node change in Blender In-Reply-To: <167105212723.72084.16289817478894589573@git.blender.org> References: <167105212723.72084.16289817478894589573@git.blender.org> Message-ID: <20221214210847.9C4774328D@git.blender.org> Commit: 4ea28bf9452946a059dd5c1a7f8ed1ac49304b40 Author: Julien Duroure Date: Sat Dec 10 00:32:10 2022 +0100 Branches: blender-v3.4-release https://developer.blender.org/rBA4ea28bf9452946a059dd5c1a7f8ed1ac49304b40 glTF: Fix factors export after Mix Node change in Blender =================================================================== M io_scene_gltf2/__init__.py M io_scene_gltf2/blender/exp/gltf2_blender_gather_texture_info.py M io_scene_gltf2/blender/exp/gltf2_blender_get.py M io_scene_gltf2/blender/imp/gltf2_blender_KHR_materials_pbrSpecularGlossiness.py M io_scene_gltf2/blender/imp/gltf2_blender_KHR_materials_sheen.py M io_scene_gltf2/blender/imp/gltf2_blender_KHR_materials_specular.py M io_scene_gltf2/blender/imp/gltf2_blender_pbrMetallicRoughness.py =================================================================== diff --git a/io_scene_gltf2/__init__.py b/io_scene_gltf2/__init__.py index 0b9664e8..2da12265 100755 --- a/io_scene_gltf2/__init__.py +++ b/io_scene_gltf2/__init__.py @@ -4,8 +4,8 @@ bl_info = { 'name': 'glTF 2.0 format', 'author': 'Julien Duroure, Scurest, Norbert Nopper, Urs Hanselmann, Moritz Becher, Benjamin Schmithüsen, Jim Eckerlein, and many external contributors', - "version": (3, 4, 49), - 'blender': (3, 3, 0), + "version": (3, 5, 6), + 'blender': (3, 4, 0), 'location': 'File > Import-Export', 'description': 'Import-Export as glTF 2.0', 'warning': '', diff --git a/io_scene_gltf2/blender/exp/gltf2_blender_gather_texture_info.py b/io_scene_gltf2/blender/exp/gltf2_blender_gather_texture_info.py index 01d261be..8c7cf80b 100755 --- a/io_scene_gltf2/blender/exp/gltf2_blender_gather_texture_info.py +++ b/io_scene_gltf2/blender/exp/gltf2_blender_gather_texture_info.py @@ -123,14 +123,14 @@ def __gather_occlusion_strength(primary_socket, export_settings): # Look for a MixRGB node that mixes with pure white in front of # primary_socket. The mix factor gives the occlusion strength. node = gltf2_blender_get.previous_node(primary_socket) - if node and node.type == 'MIX_RGB' and node.blend_type == 'MIX': - fac = gltf2_blender_get.get_const_from_socket(node.inputs['Fac'], kind='VALUE') - col1 = gltf2_blender_get.get_const_from_socket(node.inputs['Color1'], kind='RGB') - col2 = gltf2_blender_get.get_const_from_socket(node.inputs['Color2'], kind='RGB') + if node and node.type == 'MIX' and node.blend_type == 'MIX': + fac = gltf2_blender_get.get_const_from_socket(node.inputs['Factor'], kind='VALUE') + col1 = gltf2_blender_get.get_const_from_socket(node.inputs[6], kind='RGB') + col2 = gltf2_blender_get.get_const_from_socket(node.inputs[7], kind='RGB') if fac is not None: - if col1 == [1, 1, 1] and col2 is None: + if col1 == [1.0, 1.0, 1.0] and col2 is None: return fac - if col1 is None and col2 == [1, 1, 1]: + if col1 is None and col2 == [1.0, 1.0, 1.0]: return 1.0 - fac # reversed for reversed inputs return None diff --git a/io_scene_gltf2/blender/exp/gltf2_blender_get.py b/io_scene_gltf2/blender/exp/gltf2_blender_get.py index dacfbf4a..1a5bb681 100755 --- a/io_scene_gltf2/blender/exp/gltf2_blender_get.py +++ b/io_scene_gltf2/blender/exp/gltf2_blender_get.py @@ -244,14 +244,14 @@ def get_factor_from_socket(socket, kind): if node is not None: x1, x2 = None, None if kind == 'RGB': - if node.type == 'MIX_RGB' and node.blend_type == 'MULTIPLY': + if node.type in 'MIX' and node.data_type == "RGBA" and node.blend_type == 'MULTIPLY': # TODO: handle factor in inputs[0]? - x1 = get_const_from_socket(node.inputs[1], kind) - x2 = get_const_from_socket(node.inputs[2], kind) + x1 = get_const_from_socket(node.inputs[6], kind) + x2 = get_const_from_socket(node.inputs[7], kind) if kind == 'VALUE': if node.type == 'MATH' and node.operation == 'MULTIPLY': x1 = get_const_from_socket(node.inputs[0], kind) - x2 = get_const_from_socket(node.inputs[1], kind) + x2 = get_const_from_socket(node.inputs[1], kind) if x1 is not None and x2 is None: return x1 if x2 is not None and x1 is None: return x2 diff --git a/io_scene_gltf2/blender/imp/gltf2_blender_KHR_materials_pbrSpecularGlossiness.py b/io_scene_gltf2/blender/imp/gltf2_blender_KHR_materials_pbrSpecularGlossiness.py index 19a394b9..0af88f04 100755 --- a/io_scene_gltf2/blender/imp/gltf2_blender_KHR_materials_pbrSpecularGlossiness.py +++ b/io_scene_gltf2/blender/imp/gltf2_blender_KHR_materials_pbrSpecularGlossiness.py @@ -117,16 +117,17 @@ def specular_glossiness(mh, location, specular_socket, roughness_socket): # Mix in spec/gloss factor if spec_factor != [1, 1, 1] or gloss_factor != 1: if spec_factor != [1, 1, 1]: - node = mh.node_tree.nodes.new('ShaderNodeMixRGB') + node = mh.node_tree.nodes.new('ShaderNodeMix') + node.data_type = 'RGBA' node.label = 'Specular Factor' node.location = x - 140, y node.blend_type = 'MULTIPLY' # Outputs mh.node_tree.links.new(specular_socket, node.outputs[0]) # Inputs - node.inputs['Fac'].default_value = 1.0 - specular_socket = node.inputs['Color1'] - node.inputs['Color2'].default_value = spec_factor + [1] + node.inputs['Factor'].default_value = 1.0 + specular_socket = node.inputs[6] + node.inputs[7].default_value = spec_factor + [1] if gloss_factor != 1: node = mh.node_tree.nodes.new('ShaderNodeMath') diff --git a/io_scene_gltf2/blender/imp/gltf2_blender_KHR_materials_sheen.py b/io_scene_gltf2/blender/imp/gltf2_blender_KHR_materials_sheen.py index aa5cef75..91c202eb 100644 --- a/io_scene_gltf2/blender/imp/gltf2_blender_KHR_materials_sheen.py +++ b/io_scene_gltf2/blender/imp/gltf2_blender_KHR_materials_sheen.py @@ -40,16 +40,17 @@ def sheen( mh, # Mix sheenColor factor sheenColorFactor = sheenColorFactor + [1.0] if sheenColorFactor != [1.0, 1.0, 1.0, 1.0]: - node = mh.node_tree.nodes.new('ShaderNodeMixRGB') + node = mh.node_tree.nodes.new('ShaderNodeMix') node.label = 'sheenColor Factor' + node.data_type = 'RGBA' node.location = x_sheenColor - 140, y_sheenColor node.blend_type = 'MULTIPLY' # Outputs mh.node_tree.links.new(sheenColor_socket, node.outputs[0]) # Inputs - node.inputs['Fac'].default_value = 1.0 - sheenColor_socket = node.inputs['Color1'] - node.inputs['Color2'].default_value = sheenColorFactor + node.inputs['Factor'].default_value = 1.0 + sheenColor_socket = node.inputs[6] + node.inputs[7].default_value = sheenColorFactor x_sheenColor -= 200 texture( diff --git a/io_scene_gltf2/blender/imp/gltf2_blender_KHR_materials_specular.py b/io_scene_gltf2/blender/imp/gltf2_blender_KHR_materials_specular.py index 3441b5ad..35afcc3e 100644 --- a/io_scene_gltf2/blender/imp/gltf2_blender_KHR_materials_specular.py +++ b/io_scene_gltf2/blender/imp/gltf2_blender_KHR_materials_specular.py @@ -335,16 +335,17 @@ def original_specular( mh, specular_color_factor = list(specular_color_factor) + [1.0] if specular_color_factor != [1.0, 1.0, 1.0, 1.0]: # Mix specularColorFactor - node = mh.node_tree.nodes.new('ShaderNodeMixRGB') + node = mh.node_tree.nodes.new('ShaderNodeMix') node.label = 'SpecularColor Factor' + node.data_type = 'RGBA' node.location = x_specularcolor - 140, y_specularcolor node.blend_type = 'MULTIPLY' # Outputs mh.node_tree.links.new(original_specularcolor_socket, node.outputs[0]) # Inputs - node.inputs['Fac'].default_value = 1.0 - original_specularcolor_socket = node.inputs['Color1'] - node.inputs['Color2'].default_value = specular_color_factor + node.inputs['Factor'].default_value = 1.0 + original_specularcolor_socket = node.inputs[6] + node.inputs[7].default_value = specular_color_factor x_specularcolor -= 200 texture( diff --git a/io_scene_gltf2/blender/imp/gltf2_blender_pbrMetallicRoughness.py b/io_scene_gltf2/blender/imp/gltf2_blender_pbrMetallicRoughness.py index 18cb68ab..519fe221 100755 --- a/io_scene_gltf2/blender/imp/gltf2_blender_pbrMetallicRoughness.py +++ b/io_scene_gltf2/blender/imp/gltf2_blender_pbrMetallicRoughness.py @@ -316,16 +316,17 @@ def emission(mh: MaterialHelper, location, color_socket, strength_socket): # Otherwise, use a multiply node for it else: if emissive_factor != [1, 1, 1]: - node = mh.node_tree.nodes.new('ShaderNodeMixRGB') + node = mh.node_tree.nodes.new('ShaderNodeMix') node.label = 'Emissive Factor' + node.data_type = 'RGBA' node.location = x - 140, y node.blend_type = 'MULTIPLY' # Outputs mh.node_tree.links.new(color_socket, node.outputs[0]) # Inputs - node.inputs['Fac'].default_value = 1.0 - color_socket = node.inputs['Color1'] - node.inputs['Color2'].default_value = emissive_factor + [1] + node.inputs['Factor'].default_value = 1.0 + color_socket = node.inputs[6] + node.inputs[7].default_value = emissive_factor + [1] x -= 200 @@ -381,16 +382,17 @@ def base_color( needs_alpha_factor = base_color_factor[3] != 1.0 and alpha_socket is not None if needs_color_factor or needs_alpha_factor: if needs_color_factor: - node = mh.node_tree.nodes.new('ShaderNodeMixRGB') + node = mh.node_tree.nodes.new('ShaderNodeMix') node.label = 'Color Factor' + node.data_type = "RGBA" node.location = x - 140, y node.blend_type = 'MULTIPLY' # Outputs mh.node_tree.links.new(color_socket, node.outputs[0]) # Inputs - node.inputs['Fac'].default_value = 1.0 - color_socket = node.inputs['Color1'] - node.inputs['Color2'].default_value = base_color_factor[:3] + [1] + node.inputs['Factor'].default_value = 1.0 + color_socket = node.inputs[6] + node.inputs[7].default_value = base_color_factor[:3] + [1] if needs_alpha_factor: node = mh.node_tree.nodes.new('ShaderNodeMath') @@ -413,7 +415,7 @@ def base_color( # Mix texture and vertex color together if base_color_texture is not None @@ Diff output truncated at 10240 characters. @@ From noreply at git.blender.org Wed Dec 14 22:08:47 2022 From: noreply at git.blender.org (Antonio Vazquez) Date: Wed, 14 Dec 2022 22:08:47 +0100 (CET) Subject: [Bf-extensions-cvs] [8d079c0e] blender-v3.4-release: Storypencil: New Storyboard add-on base on grease pencil In-Reply-To: <167105212723.72084.16289817478894589573@git.blender.org> References: <167105212723.72084.16289817478894589573@git.blender.org> Message-ID: <20221214210847.61FF543287@git.blender.org> Commit: 8d079c0ef6c09e2441154481cb1c3f8fdf4dea2f Author: Antonio Vazquez Date: Wed Dec 7 19:43:12 2022 +0100 Branches: blender-v3.4-release https://developer.blender.org/rBA8d079c0ef6c09e2441154481cb1c3f8fdf4dea2f Storypencil: New Storyboard add-on base on grease pencil This add-on was in addons-contrib and now has been moved to official. =================================================================== A storypencil/__init__.py A storypencil/dopesheet_overlay.py A storypencil/render.py A storypencil/scene_tools.py A storypencil/synchro.py A storypencil/ui.py A storypencil/utils.py =================================================================== diff --git a/storypencil/__init__.py b/storypencil/__init__.py new file mode 100644 index 00000000..1abd0261 --- /dev/null +++ b/storypencil/__init__.py @@ -0,0 +1,239 @@ +# SPDX-License-Identifier: GPL-2.0-or-later + +# ---------------------------------------------- +# Define Addon info +# ---------------------------------------------- +bl_info = { + "name": "Storypencil - Storyboard Tools", + "description": "Storyboard tools", + "author": "Antonio Vazquez, Matias Mendiola, Daniel Martinez Lara, Rodrigo Blaas", + "version": (1, 1, 1), + "blender": (3, 3, 0), + "location": "", + "warning": "", + "category": "Sequencer", +} + +# ---------------------------------------------- +# Import modules +# ---------------------------------------------- +if "bpy" in locals(): + import importlib + + importlib.reload(utils) + importlib.reload(synchro) + importlib.reload(dopesheet_overlay) + importlib.reload(scene_tools) + importlib.reload(render) + importlib.reload(ui) +else: + from . import utils + from . import synchro + from . import dopesheet_overlay + from . import scene_tools + from . import render + from . import ui + +import bpy +from bpy.types import ( + Scene, + WindowManager, + WorkSpace, +) +from bpy.props import ( + BoolProperty, + IntProperty, + PointerProperty, + StringProperty, + EnumProperty, +) + +# -------------------------------------------------------------- +# Register all operators, props and panels +# -------------------------------------------------------------- +classes = ( + synchro.STORYPENCIL_PG_Settings, + scene_tools.STORYPENCIL_OT_Setup, + scene_tools.STORYPENCIL_OT_NewScene, + synchro.STORYPENCIL_OT_WindowBringFront, + synchro.STORYPENCIL_OT_WindowCloseOperator, + synchro.STORYPENCIL_OT_SyncToggleSecondary, + synchro.STORYPENCIL_OT_SetSyncMainOperator, + synchro.STORYPENCIL_OT_AddSecondaryWindowOperator, + synchro.STORYPENCIL_OT_Switch, + synchro.STORYPENCIL_OT_TabSwitch, + render.STORYPENCIL_OT_RenderAction, + ui.STORYPENCIL_PT_Settings, + ui.STORYPENCIL_PT_SettingsNew, + ui.STORYPENCIL_PT_RenderPanel, + ui.STORYPENCIL_PT_General, + ui.STORYPENCIL_MT_extra_options, +) + + +def save_mode(self, context): + wm = context.window_manager + wm['storypencil_use_new_window'] = context.scene.storypencil_use_new_window + # Close all secondary windows + if context.scene.storypencil_use_new_window is False: + c = context.copy() + for win in context.window_manager.windows: + # Don't close actual window + if win == context.window: + continue + win_id = str(win.as_pointer()) + if win_id != wm.storypencil_settings.main_window_id and win.parent is None: + c["window"] = win + bpy.ops.wm.window_close(c) + + +addon_keymaps = [] +def register_keymaps(): + addon = bpy.context.window_manager.keyconfigs.addon + km = addon.keymaps.new(name="Sequencer", space_type="SEQUENCE_EDITOR") + kmi = km.keymap_items.new( + idname="storypencil.tabswitch", + type="TAB", + value="PRESS", + shift=False, ctrl=False, alt = False, oskey=False, + ) + + addon_keymaps.append((km, kmi)) + +def unregister_keymaps(): + for km, kmi in addon_keymaps: + km.keymap_items.remove(kmi) + addon_keymaps.clear() + +def register(): + from bpy.utils import register_class + for cls in classes: + register_class(cls) + register_keymaps() + + Scene.storypencil_scene_duration = IntProperty( + name="Scene Duration", + description="Default Duration for new Scene", + default=48, + min=1, + soft_max=250, + ) + + Scene.storypencil_use_new_window = BoolProperty(name="Open in new window", + description="Use secondary main window to edit scenes", + default=False, + update=save_mode) + + Scene.storypencil_main_workspace = PointerProperty(type=WorkSpace, + description="Main Workspace used for editing Storyboard") + Scene.storypencil_main_scene = PointerProperty(type=Scene, + description="Main Scene used for editing Storyboard") + Scene.storypencil_edit_workspace = PointerProperty(type=WorkSpace, + description="Workspace used for changing drawings") + + Scene.storypencil_base_scene = PointerProperty(type=Scene, + description="Template Scene used for creating new scenes") + + Scene.storypencil_render_render_path = StringProperty(name="Output Path", subtype='FILE_PATH', maxlen=256, + description="Directory/name to save files") + + Scene.storypencil_name_prefix = StringProperty(name="Scene Name Prefix", maxlen=20, default="") + + Scene.storypencil_name_suffix = StringProperty(name="Scene Name Suffix", maxlen=20, default="") + + Scene.storypencil_render_onlyselected = BoolProperty(name="Render only Selected Strips", + description="Render only the selected strips", + default=True) + + Scene.storypencil_render_channel = IntProperty(name="Channel", + description="Channel to set the new rendered video", + default=5, min=1, max=128) + + Scene.storypencil_add_render_strip = BoolProperty(name="Import Rendered Strips", + description="Add a Strip with the render", + default=True) + + Scene.storypencil_render_step = IntProperty(name="Image Steps", + description="Minimum frames number to generate images between keyframes (0 to disable)", + default=0, min=0, max=128) + + Scene.storypencil_render_numbering = EnumProperty(name="Image Numbering", + items=( + ('1', "Frame", "Use real frame number"), + ('2', "Consecutive", "Use sequential numbering"), + ), + description="Defines how frame is named") + + Scene.storypencil_add_render_byfolder = BoolProperty(name="Folder by Strip", + description="Create a separated folder for each strip", + default=True) + + WindowManager.storypencil_settings = PointerProperty( + type=synchro.STORYPENCIL_PG_Settings, + name="Storypencil settings", + description="Storypencil tool settings", + ) + + # Append Handlers + bpy.app.handlers.frame_change_post.clear() + bpy.app.handlers.frame_change_post.append(synchro.on_frame_changed) + bpy.app.handlers.load_post.append(synchro.sync_autoconfig) + + bpy.context.window_manager.storypencil_settings.active = False + bpy.context.window_manager.storypencil_settings.main_window_id = "" + bpy.context.window_manager.storypencil_settings.secondary_windows_ids = "" + + # UI integration in dopesheet header + bpy.types.DOPESHEET_HT_header.append(synchro.draw_sync_header) + dopesheet_overlay.register() + + synchro.sync_autoconfig() + + # UI integration in VSE header + bpy.types.SEQUENCER_HT_header.remove(synchro.draw_sync_sequencer_header) + bpy.types.SEQUENCER_HT_header.append(synchro.draw_sync_sequencer_header) + + bpy.types.SEQUENCER_MT_add.append(scene_tools.draw_new_scene) + bpy.types.VIEW3D_MT_draw_gpencil.append(scene_tools.setup_storyboard) + + +def unregister(): + unregister_keymaps() + + from bpy.utils import unregister_class + for cls in reversed(classes): + unregister_class(cls) + + # Remove Handlers + if bpy.app.handlers.frame_change_post: + bpy.app.handlers.frame_change_post.remove(synchro.on_frame_changed) + bpy.app.handlers.load_post.remove(synchro.sync_autoconfig) + + # remove UI integration + bpy.types.DOPESHEET_HT_header.remove(synchro.draw_sync_header) + dopesheet_overlay.unregister() + bpy.types.SEQUENCER_HT_header.remove(synchro.draw_sync_sequencer_header) + + bpy.types.SEQUENCER_MT_add.remove(scene_tools.draw_new_scene) + bpy.types.VIEW3D_MT_draw_gpencil.remove(scene_tools.setup_storyboard) + + del Scene.storypencil_scene_duration + del WindowManager.storypencil_settings + + del Scene.storypencil_base_scene + del Scene.storypencil_main_workspace + del Scene.storypencil_main_scene + del Scene.storypencil_edit_workspace + + del Scene.storypencil_render_render_path + del Scene.storypencil_name_prefix + del Scene.storypencil_name_suffix + del Scene.storypencil_render_onlyselected + del Scene.storypencil_render_channel + del Scene.storypencil_render_step + del Scene.storypencil_add_render_strip + del Scene.storypencil_render_numbering + del Scene.storypencil_add_render_byfolder + +if __name__ == '__main__': + register() diff --git a/storypencil/dopesheet_overlay.py b/storypencil/dopesheet_overlay.py new file mode 100644 index 00000000..2c00d8e9 --- /dev/null +++ b/storypencil/dopesheet_overlay.py @@ -0,0 +1,179 @@ +# SPDX-License-Identifier: GPL-2.0-or-later + +import typing + +import bpy +import gpu +from gpu_extras.batch import batch_for_shader + +from .utils import (redraw_all_areas_by_type) +from .synchro import (is_secondary_window, window_id, get_main_strip) + +Int3 = typing.Tuple[int, int, int] + +Float2 = typing.Tuple[float, float] +Float3 = typing.Tuple[float, float @@ Diff output truncated at 10240 characters. @@ From noreply at git.blender.org Thu Dec 15 07:30:11 2022 From: noreply at git.blender.org (Julien Duroure) Date: Thu, 15 Dec 2022 07:30:11 +0100 (CET) Subject: [Bf-extensions-cvs] [49e56c18] blender-v3.4-release: glTF: fix versioning for 3.4.x after bad cherry-pick merge In-Reply-To: <167108581193.15356.8352652956974745675@git.blender.org> References: <167108581193.15356.8352652956974745675@git.blender.org> Message-ID: <20221215063012.1EA8750A58@git.blender.org> Commit: 49e56c184470750b04bddcb43635462d720cf403 Author: Julien Duroure Date: Thu Dec 15 07:30:04 2022 +0100 Branches: blender-v3.4-release https://developer.blender.org/rBA49e56c184470750b04bddcb43635462d720cf403 glTF: fix versioning for 3.4.x after bad cherry-pick merge =================================================================== M io_scene_gltf2/__init__.py =================================================================== diff --git a/io_scene_gltf2/__init__.py b/io_scene_gltf2/__init__.py index c37c6d8f..cbff96f1 100755 --- a/io_scene_gltf2/__init__.py +++ b/io_scene_gltf2/__init__.py @@ -4,7 +4,7 @@ bl_info = { 'name': 'glTF 2.0 format', 'author': 'Julien Duroure, Scurest, Norbert Nopper, Urs Hanselmann, Moritz Becher, Benjamin Schmithüsen, Jim Eckerlein, and many external contributors', - "version": (3, 5, 8), + "version": (3, 4, 50), 'blender': (3, 4, 0), 'location': 'File > Import-Export', 'description': 'Import-Export as glTF 2.0', From noreply at git.blender.org Thu Dec 15 07:35:40 2022 From: noreply at git.blender.org (Julien Duroure) Date: Thu, 15 Dec 2022 07:35:40 +0100 (CET) Subject: [Bf-extensions-cvs] [d4c8ec5c] master: Bump version after bad cherry-pick versioning in 3.4.x In-Reply-To: <167108614029.20151.6367131488559238447@git.blender.org> References: <167108614029.20151.6367131488559238447@git.blender.org> Message-ID: <20221215063540.7C3B550ACD@git.blender.org> Commit: d4c8ec5cdff2337c34838b2ff83108697e1d4abe Author: Julien Duroure Date: Thu Dec 15 07:35:30 2022 +0100 Branches: master https://developer.blender.org/rBAd4c8ec5cdff2337c34838b2ff83108697e1d4abe Bump version after bad cherry-pick versioning in 3.4.x =================================================================== M io_scene_gltf2/__init__.py =================================================================== diff --git a/io_scene_gltf2/__init__.py b/io_scene_gltf2/__init__.py index c37c6d8f..a643f31c 100755 --- a/io_scene_gltf2/__init__.py +++ b/io_scene_gltf2/__init__.py @@ -4,7 +4,7 @@ bl_info = { 'name': 'glTF 2.0 format', 'author': 'Julien Duroure, Scurest, Norbert Nopper, Urs Hanselmann, Moritz Becher, Benjamin Schmithüsen, Jim Eckerlein, and many external contributors', - "version": (3, 5, 8), + "version": (3, 5, 9), 'blender': (3, 4, 0), 'location': 'File > Import-Export', 'description': 'Import-Export as glTF 2.0', From noreply at git.blender.org Fri Dec 16 15:42:16 2022 From: noreply at git.blender.org (Mikhail Rachinskiy) Date: Fri, 16 Dec 2022 15:42:16 +0100 (CET) Subject: [Bf-extensions-cvs] [7408fc72] blender-v3.4-release: PLY: Fix T103203 export with UVs In-Reply-To: <167120173650.90727.15835966789405348195@git.blender.org> References: <167120173650.90727.15835966789405348195@git.blender.org> Message-ID: <20221216144216.A4C1C1B703@git.blender.org> Commit: 7408fc7283fd98a88db1383f45f5d15680472a7f Author: Mikhail Rachinskiy Date: Wed Dec 14 18:16:38 2022 +0300 Branches: blender-v3.4-release https://developer.blender.org/rBA7408fc7283fd98a88db1383f45f5d15680472a7f PLY: Fix T103203 export with UVs Issue was with incomplete id when exporting with UVs. =================================================================== M io_mesh_ply/export_ply.py =================================================================== diff --git a/io_mesh_ply/export_ply.py b/io_mesh_ply/export_ply.py index b3be770c..086bbae9 100644 --- a/io_mesh_ply/export_ply.py +++ b/io_mesh_ply/export_ply.py @@ -78,7 +78,7 @@ def save_mesh(filepath, bm, use_ascii, use_normals, use_uv, use_color): if use_uv: uv = loop[uv_lay].uv[:] - map_id = uv + map_id = v, uv # Identify vertex by pointer unless exporting UVs, # in which case id by UV coordinate (will split edges by seams). From noreply at git.blender.org Mon Dec 19 14:16:37 2022 From: noreply at git.blender.org (Jeroen Bakker) Date: Mon, 19 Dec 2022 14:16:37 +0100 (CET) Subject: [Bf-extensions-cvs] [5ba2c751] master: Add missing import gpu in Scene inspector. In-Reply-To: <167145579756.79153.1380529316469296505@git.blender.org> References: <167145579756.79153.1380529316469296505@git.blender.org> Message-ID: <20221219131637.BB4A36B54@git.blender.org> Commit: 5ba2c7517e8577e3cfe1dcb2e29a4627842e2aea Author: Jeroen Bakker Date: Mon Dec 19 14:16:09 2022 +0100 Branches: master https://developer.blender.org/rBA5ba2c7517e8577e3cfe1dcb2e29a4627842e2aea Add missing import gpu in Scene inspector. =================================================================== M viewport_vr_preview/operators.py =================================================================== diff --git a/viewport_vr_preview/operators.py b/viewport_vr_preview/operators.py index 7981511e..c7c27c8f 100644 --- a/viewport_vr_preview/operators.py +++ b/viewport_vr_preview/operators.py @@ -7,6 +7,7 @@ else: from . import properties import bpy +import gpu from bpy.types import ( Gizmo, GizmoGroup, From noreply at git.blender.org Tue Dec 20 16:03:07 2022 From: noreply at git.blender.org (Germano Cavalcante) Date: Tue, 20 Dec 2022 16:03:07 +0100 (CET) Subject: [Bf-extensions-cvs] [97277eca] master: Fix T103356: 'NoneType' object has no attribute 'is_valid' In-Reply-To: <167154858713.67820.10739953700531531464@git.blender.org> References: <167154858713.67820.10739953700531531464@git.blender.org> Message-ID: <20221220150307.69E7325FCE@git.blender.org> Commit: 97277ecacb379a02240fde40a1ceadb303cd3b84 Author: Germano Cavalcante Date: Tue Dec 20 12:02:05 2022 -0300 Branches: master https://developer.blender.org/rBA97277ecacb379a02240fde40a1ceadb303cd3b84 Fix T103356: 'NoneType' object has no attribute 'is_valid' `self.geom` can be `None` even with `self.bm` =================================================================== M mesh_snap_utilities_line/__init__.py M mesh_snap_utilities_line/widgets.py =================================================================== diff --git a/mesh_snap_utilities_line/__init__.py b/mesh_snap_utilities_line/__init__.py index 7a4653fc..ae5cb5ba 100644 --- a/mesh_snap_utilities_line/__init__.py +++ b/mesh_snap_utilities_line/__init__.py @@ -6,7 +6,7 @@ bl_info = { "name": "Snap_Utilities_Line", "author": "Germano Cavalcante", - "version": (6, 7, 0), + "version": (6, 7, 1), "blender": (3, 2, 0), "location": "View3D > TOOLS > Line Tool", "description": "Extends Blender Snap controls", diff --git a/mesh_snap_utilities_line/widgets.py b/mesh_snap_utilities_line/widgets.py index 12e9d189..6f3c1565 100644 --- a/mesh_snap_utilities_line/widgets.py +++ b/mesh_snap_utilities_line/widgets.py @@ -27,7 +27,7 @@ class SnapWidgetCommon(SnapUtilities, bpy.types.Gizmo): cls.snap_to_update = depsgraph.id_type_updated('MESH') or depsgraph.id_type_updated('OBJECT') def draw_point_and_elem(self): - if self.bm: + if self.bm and self.geom: if self.bm.is_valid and self.geom.is_valid: self.draw_cache.draw_elem(self.snap_obj, self.bm, self.geom) else: From noreply at git.blender.org Tue Dec 20 16:03:07 2022 From: noreply at git.blender.org (Germano Cavalcante) Date: Tue, 20 Dec 2022 16:03:07 +0100 (CET) Subject: [Bf-extensions-cvs] [ca2d64cc] master: Cleanup: run autopep8 on mesh_snap_utilities_line In-Reply-To: <167154858713.67820.10739953700531531464@git.blender.org> References: <167154858713.67820.10739953700531531464@git.blender.org> Message-ID: <20221220150307.5817225FCC@git.blender.org> Commit: ca2d64cc301db04f0fc80dea539a7400bcab0678 Author: Germano Cavalcante Date: Tue Dec 20 11:58:03 2022 -0300 Branches: master https://developer.blender.org/rBAca2d64cc301db04f0fc80dea539a7400bcab0678 Cleanup: run autopep8 on mesh_snap_utilities_line =================================================================== M mesh_snap_utilities_line/__init__.py M mesh_snap_utilities_line/common_classes.py M mesh_snap_utilities_line/common_utilities.py M mesh_snap_utilities_line/drawing_utilities.py M mesh_snap_utilities_line/preferences.py M mesh_snap_utilities_line/snap_context_l/__init__.py M mesh_snap_utilities_line/snap_context_l/utils_projection.py M mesh_snap_utilities_line/widgets.py =================================================================== diff --git a/mesh_snap_utilities_line/__init__.py b/mesh_snap_utilities_line/__init__.py index 1456ef0f..7a4653fc 100644 --- a/mesh_snap_utilities_line/__init__.py +++ b/mesh_snap_utilities_line/__init__.py @@ -50,8 +50,8 @@ def tool_line(): layout.prop(addon_prefs, "create_face") if context.mode == 'EDIT_MESH': layout.prop(addon_prefs, "outer_verts") - #props = tool.operator_properties("mesh.snap_utilities_line") - #layout.prop(props, "radius") + # props = tool.operator_properties("mesh.snap_utilities_line") + # layout.prop(props, "radius") icons_dir = os.path.join(os.path.dirname(__file__), "icons") @@ -118,7 +118,7 @@ def register_keymaps(): keyconfig_init_from_data( kc_addonconf, keys.generate_snap_utilities_keymaps()) - #snap_modalkeymap = kc_addonconf.keymaps.find(keys.km_snap_utilities_modal_keymap) + # snap_modalkeymap = kc_addonconf.keymaps.find(keys.km_snap_utilities_modal_keymap) # snap_modalkeymap.assign("MESH_OT_snap_utilities_line") diff --git a/mesh_snap_utilities_line/common_classes.py b/mesh_snap_utilities_line/common_classes.py index 990f1e46..0c540566 100644 --- a/mesh_snap_utilities_line/common_classes.py +++ b/mesh_snap_utilities_line/common_classes.py @@ -193,7 +193,7 @@ class CharMap: self.unit_system, 'LENGTH', self.length_entered) except: # ValueError: self.length_entered_value = 0.0 # invalid - #self.report({'INFO'}, "Operation not supported yet") + # self.report({'INFO'}, "Operation not supported yet") else: self.length_entered_value = 0.0 diff --git a/mesh_snap_utilities_line/common_utilities.py b/mesh_snap_utilities_line/common_utilities.py index 7336eadb..c6682572 100644 --- a/mesh_snap_utilities_line/common_utilities.py +++ b/mesh_snap_utilities_line/common_utilities.py @@ -71,10 +71,8 @@ def location_3d_to_region_2d(region, rv3d, coord): def out_Location(rv3d, orig, vector): view_matrix = rv3d.view_matrix - v1 = (int(view_matrix[0][0]*1.5), int(view_matrix[0] - [1]*1.5), int(view_matrix[0][2]*1.5)) - v2 = (int(view_matrix[1][0]*1.5), int(view_matrix[1] - [1]*1.5), int(view_matrix[1][2]*1.5)) + v1 = (int(view_matrix[0][0] * 1.5), int(view_matrix[0][1] * 1.5), int(view_matrix[0][2] * 1.5)) + v2 = (int(view_matrix[1][0] * 1.5), int(view_matrix[1][1] * 1.5), int(view_matrix[1][2] * 1.5)) hit = intersect_ray_tri((1, 0, 0), (0, 1, 0), (0, 0, 0), (vector), (orig), False) @@ -221,7 +219,7 @@ def snap_utilities( pvert_co = main_snap_obj.mat @ previous_vert.co perp_point = intersect_point_line(pvert_co, v0, v1) _snap_cache.edge.vperp = perp_point[0] - #factor = point_perpendicular[1] + # factor = point_perpendicular[1] _snap_cache.edge.v2dperp = location_3d_to_region_2d( sctx.region, sctx.rv3d, perp_point[0]) _snap_cache.edge.is_increment = False diff --git a/mesh_snap_utilities_line/drawing_utilities.py b/mesh_snap_utilities_line/drawing_utilities.py index ee37dac2..e7eaa4ff 100644 --- a/mesh_snap_utilities_line/drawing_utilities.py +++ b/mesh_snap_utilities_line/drawing_utilities.py @@ -243,7 +243,7 @@ class SnapDrawn(): def draw_elem(self, snap_obj, bm, elem): # TODO: Cache coords (because antialiasing) import gpu - from bmesh.types import( + from bmesh.types import ( BMVert, BMEdge, BMFace, diff --git a/mesh_snap_utilities_line/preferences.py b/mesh_snap_utilities_line/preferences.py index 3552ca95..3b04b9da 100644 --- a/mesh_snap_utilities_line/preferences.py +++ b/mesh_snap_utilities_line/preferences.py @@ -21,9 +21,10 @@ class SnapUtilitiesPreferences(bpy.types.AddonPreferences): # when defining this in a submodule of a python package. bl_idname = __package__ - intersect: BoolProperty(name="Intersect", - description="intersects created line with the existing edges, even if the lines do not intersect", - default=True) + intersect: BoolProperty( + name="Intersect", + description="intersects created line with the existing edges, even if the lines do not intersect", + default=True) create_face: BoolProperty(name="Create faces", description="Create faces defined by enclosed edges", @@ -164,8 +165,8 @@ class SnapUtilitiesPreferences(bpy.types.AddonPreferences): flow.prop(self, "perpendicular_color") def draw_snap_utilities_help(self, layout): - #layout.operator("wm.url_open", text="Gumroad Page", icon='HELP',).url = "https://gum.co/IaqQf" - #layout.operator("wm.url_open", text="Blender Market Page", icon='HELP',).url = "https://blendermarket.com/products/snap-utilities" + # layout.operator("wm.url_open", text="Gumroad Page", icon='HELP',).url = "https://gum.co/IaqQf" + # layout.operator("wm.url_open", text="Blender Market Page", icon='HELP',).url = "https://blendermarket.com/products/snap-utilities" layout.operator("wm.url_open", text="Wiki", icon='HELP', ).url = "https://github.com/Mano-Wii/Addon-Snap-Utilities-Line/wiki" layout.operator("wm.url_open", text="Forum", icon='HELP', @@ -178,7 +179,7 @@ class SnapUtilitiesPreferences(bpy.types.AddonPreferences): ) wm = context.window_manager - #kc = wm.keyconfigs.addon + # kc = wm.keyconfigs.addon kc = wm.keyconfigs.user layout.label(text="Global:") diff --git a/mesh_snap_utilities_line/snap_context_l/__init__.py b/mesh_snap_utilities_line/snap_context_l/__init__.py index ad8df061..08850f4f 100644 --- a/mesh_snap_utilities_line/snap_context_l/__init__.py +++ b/mesh_snap_utilities_line/snap_context_l/__init__.py @@ -9,12 +9,13 @@ VERT = 1 EDGE = 2 FACE = 4 + class _Internal: global_snap_context = None @classmethod def snap_context_free(cls): - if cls.global_snap_context != None: + if cls.global_snap_context is not None: cls.global_snap_context.free() del cls @@ -23,20 +24,21 @@ class _Internal: gpu_Indices_restore_state, gpu_Indices_use_clip_planes, gpu_Indices_mesh_cache_clear, - ) + ) from .utils_projection import ( region_2d_to_orig_and_view_vector, intersect_boundbox_threshold, intersect_ray_segment_fac, project_co_v3, - ) + ) from mathutils.geometry import intersect_line_plane class _SnapObjectData(): __slots__ = ('data', 'mat') + def __init__(self, data, omat): self.data = data self.mat = omat @@ -44,6 +46,7 @@ class _SnapObjectData(): class _SnapOffscreen(): bound = None + def __init__(self, width, height): self._fbo = None @@ -66,7 +69,7 @@ class _SnapOffscreen(): return self._fbo.bind() def clear(self): - #self._fbo.clear(color=(0.0, 0.0, 0.0, 0.0), depth=1.0) + # self._fbo.clear(color=(0.0, 0.0, 0.0, 0.0), depth=1.0) self._tex_color.clear(format='UINT', value=(0,)) self._tex_depth.clear(format='FLOAT', value=(1.0,)) @@ -95,7 +98,7 @@ class SnapContext(): :type space: :class:`bpy.types.SpaceView3D` """ - __slots__ = (\ + __slots__ = ( '_dist_px', '_dist_px_sq', '_offscreen', @@ -119,7 +122,7 @@ class SnapContext(): self.freed = False self.snap_objects = [] self.drawn_count = 0 - self._offset_cur = 1 # Starts with index 1 + self._offset_cur = 1 # Starts with index 1 self.proj_mat = None self.mval = Vector((0.0, 0.0)) @@ -148,7 +151,6 @@ class SnapContext(): self.winsize = Vector((self._offscreen.width, self._offscreen.height)) - ## PRIVATE ## def _get_snap_obj_by_index(self, index): @@ -167,8 +169,13 @@ class SnapContext(): r_value = 0 loc_curr = [int(mval[1]), int(mval[0])] - rect = ((max(0, loc_curr[0] - self.threshold), min(self._snap_buffer.dimensions[0], loc_curr[0] + self.threshold)), - (max(0, loc_curr[1] - self.threshold), min(self._snap_buffer.dimensions[1], loc_curr[1] + self.threshold))) + rect = (( + max(0, loc_curr[0] - self.threshold), + min(self._snap_buffer.dimensions[0], loc_curr[0] + self.threshold) + ), ( + max(0, loc_curr[1] - self.threshold), + min(self._snap_buffer.dimensions[1], loc_curr[1] + self.threshold) + )) if loc_curr[0] < rect[0][0] or loc_curr[0] >= rect[0][1] or loc_curr[1] < rect[1][0] or loc_curr[1] >= rect[1][1]: return r_snap_obj, r_value @@ -203,13 +210,13 @@ class SnapContext(): # Next spiral step. if (spiral_direction == 0): - loc_curr[1] += 1 # right + loc_curr[1] += 1 # right elif (spiral_direction == 1): - loc_curr[0] -= 1 # down + loc_curr[0] -= 1 # down elif (spiral_direction == 2): - loc_curr[1] -= 1 # left + loc_curr[1] -= 1 # left else: - loc_curr[0] += 1 # up + loc_curr[0] += 1 # up if (loc_curr[not a] < rect[not a][0] or loc_curr[not a] >= rect[not a][1]): return r_snap_obj, r_value @@ -226,10 +233,11 @@ class SnapContext(): if index < num_tris: tri_verts = gpu_data.get_tri_verts(index) tri_co = [snap_obj.mat @ Vector(v) for v in gpu_data.get_tri_co(index)] - #loc = _Internal.intersect_ray_tri(*tri_co, self.last_ray[0], - #self.last_ray[1], False) + @@ Diff output truncated at 10240 characters. @@ From noreply at git.blender.org Thu Dec 22 07:14:24 2022 From: noreply at git.blender.org (Julien Duroure) Date: Thu, 22 Dec 2022 07:14:24 +0100 (CET) Subject: [Bf-extensions-cvs] [665a82e1] master: glTF exporter: add an export identifier In-Reply-To: <167168966398.75036.7488806432868399059@git.blender.org> References: <167168966398.75036.7488806432868399059@git.blender.org> Message-ID: <20221222061424.255D440C6C@git.blender.org> Commit: 665a82e17100e4560ea0ef55a51f8721c670c936 Author: Julien Duroure Date: Thu Dec 22 07:13:41 2022 +0100 Branches: master https://developer.blender.org/rBA665a82e17100e4560ea0ef55a51f8721c670c936 glTF exporter: add an export identifier Can be useful in case of other addons that call glTF exporter by code, and using some Extension. To avoid having an impact on regular glTF exporter, dev can now call the glTF exporter with 'gltf_exporter_id', and using it in export_settings to check if we are coming from an addon or, if empty, from a regular export =================================================================== M io_scene_gltf2/__init__.py =================================================================== diff --git a/io_scene_gltf2/__init__.py b/io_scene_gltf2/__init__.py index a643f31c..234926a2 100755 --- a/io_scene_gltf2/__init__.py +++ b/io_scene_gltf2/__init__.py @@ -4,7 +4,7 @@ bl_info = { 'name': 'glTF 2.0 format', 'author': 'Julien Duroure, Scurest, Norbert Nopper, Urs Hanselmann, Moritz Becher, Benjamin Schmithüsen, Jim Eckerlein, and many external contributors', - "version": (3, 5, 9), + "version": (3, 5, 10), 'blender': (3, 4, 0), 'location': 'File > Import-Export', 'description': 'Import-Export as glTF 2.0', @@ -121,6 +121,16 @@ class ExportGLTF2_Base(ConvertGLTF2_Base): bl_options = {'PRESET'} + # Don't use export_ prefix here, I don't want it to be saved with other export settings + gltf_export_id: StringProperty( + name='Identifier', + description=( + 'Identifier of caller (in case of addon calling this exporter. ' + 'Can be useful in case of Extension added by other addons' + ), + default='' + ) + export_format: EnumProperty( name='Format', items=(('GLB', 'glTF Binary (.glb)', @@ -568,7 +578,7 @@ class ExportGLTF2_Base(ConvertGLTF2_Base): export_settings = {} export_settings['timestamp'] = datetime.datetime.now() - + export_settings['gltf_export_id'] = self.gltf_export_id export_settings['gltf_filepath'] = self.filepath export_settings['gltf_filedirectory'] = os.path.dirname(export_settings['gltf_filepath']) + '/' export_settings['gltf_texturedirectory'] = os.path.join( From noreply at git.blender.org Thu Dec 22 07:55:13 2022 From: noreply at git.blender.org (Julien Duroure) Date: Thu, 22 Dec 2022 07:55:13 +0100 (CET) Subject: [Bf-extensions-cvs] [d18a07f5] master: glTF exporter: Fix VertexColor export for Corner domain In-Reply-To: <167169211384.4396.1656834034161527119@git.blender.org> References: <167169211384.4396.1656834034161527119@git.blender.org> Message-ID: <20221222065514.04EA440D95@git.blender.org> Commit: d18a07f51404ff155de0c21ac1ea32e839e74d88 Author: Julien Duroure Date: Thu Dec 22 07:55:09 2022 +0100 Branches: master https://developer.blender.org/rBAd18a07f51404ff155de0c21ac1ea32e839e74d88 glTF exporter: Fix VertexColor export for Corner domain =================================================================== M io_scene_gltf2/__init__.py M io_scene_gltf2/blender/exp/gltf2_blender_gather_primitives_extract.py =================================================================== diff --git a/io_scene_gltf2/__init__.py b/io_scene_gltf2/__init__.py index 234926a2..84340c94 100755 --- a/io_scene_gltf2/__init__.py +++ b/io_scene_gltf2/__init__.py @@ -4,7 +4,7 @@ bl_info = { 'name': 'glTF 2.0 format', 'author': 'Julien Duroure, Scurest, Norbert Nopper, Urs Hanselmann, Moritz Becher, Benjamin Schmithüsen, Jim Eckerlein, and many external contributors', - "version": (3, 5, 10), + "version": (3, 5, 11), 'blender': (3, 4, 0), 'location': 'File > Import-Export', 'description': 'Import-Export as glTF 2.0', diff --git a/io_scene_gltf2/blender/exp/gltf2_blender_gather_primitives_extract.py b/io_scene_gltf2/blender/exp/gltf2_blender_gather_primitives_extract.py index 0b091a6a..ea7e39e1 100644 --- a/io_scene_gltf2/blender/exp/gltf2_blender_gather_primitives_extract.py +++ b/io_scene_gltf2/blender/exp/gltf2_blender_gather_primitives_extract.py @@ -566,11 +566,7 @@ class PrimitiveCreator: elif attr['blender_domain'] == "CORNER": colors = colors.reshape(-1, 4) - data_dots = colors[self.dots['vertex_index']] - if self.export_settings['gltf_loose_edges'] and attr['blender_domain'] == "POINT": - data_dots_edges = colors[self.dots_edges['vertex_index']] - if self.export_settings['gltf_loose_points'] and attr['blender_domain'] == "POINT": - data_dots_points = colors[self.dots_points['vertex_index']] + data_dots = colors del colors # colors are already linear, no need to switch color space From noreply at git.blender.org Fri Dec 23 11:27:33 2022 From: noreply at git.blender.org (Dalai Felinto) Date: Fri, 23 Dec 2022 11:27:33 +0100 (CET) Subject: [Bf-extensions-cvs] [2326ada3] master: Pose Library: changes to the panels in the Action Editor In-Reply-To: <167179125313.84299.1249186817293064060@git.blender.org> References: <167179125313.84299.1249186817293064060@git.blender.org> Message-ID: <20221223102733.5FAC618C33@git.blender.org> Commit: 2326ada37b921864d22afa198a8c624cfa91a1c4 Author: Dalai Felinto Date: Fri Dec 23 11:25:58 2022 +0100 Branches: master https://developer.blender.org/rBA2326ada37b921864d22afa198a8c624cfa91a1c4 Pose Library: changes to the panels in the Action Editor Move the Pose Library panel to the same tab as the Action panels. This way there are no tabs shown by default. =================================================================== M pose_library/gui.py =================================================================== diff --git a/pose_library/gui.py b/pose_library/gui.py index b0025546..ffcb6994 100644 --- a/pose_library/gui.py +++ b/pose_library/gui.py @@ -120,7 +120,7 @@ class DOPESHEET_PT_asset_panel(PoseLibraryPanel, Panel): bl_space_type = "DOPESHEET_EDITOR" bl_region_type = "UI" bl_label = "Create Pose Asset" - bl_category = "Pose Library" + bl_category = "Action" def draw(self, context: Context) -> None: layout = self.layout From noreply at git.blender.org Fri Dec 23 11:27:33 2022 From: noreply at git.blender.org (Dalai Felinto) Date: Fri, 23 Dec 2022 11:27:33 +0100 (CET) Subject: [Bf-extensions-cvs] [c164c5d8] master: Pose Library: Usability pass/redesign In-Reply-To: <167179125313.84299.1249186817293064060@git.blender.org> References: <167179125313.84299.1249186817293064060@git.blender.org> Message-ID: <20221223102733.4E45218C2F@git.blender.org> Commit: c164c5d8665588c9bd9db1929cddef592c93d773 Author: Dalai Felinto Date: Fri Dec 16 17:07:17 2022 +0100 Branches: master https://developer.blender.org/rBAc164c5d8665588c9bd9db1929cddef592c93d773 Pose Library: Usability pass/redesign This implements a redesign on how pose library is exposed to the artists, unifying the experience within other assets. We now try to constraint the different usages to specific editors, and optimize the experience in each editor to those minimum requirements. In simple terms this means to encourage the creation of assets in the Action Editor or the Asset Browser, using assets in the Viewport. Having the main functionality available at the click of a button, and the advanced options available via (context) menus. For the complete design see: T103265 ------------------------------------------------ This implements: * Viewport: - Remove Create Pose Asset. - Remove Copy Pose As Asset. - Remove Flip Pose checkbox. * Asset Browser: - Add "Paste as New Asset" and "Create Pose Asset" to a new Asset menu. - Remove Pose Library panels. * Context Menu: - Add Apply Pose Flipped. - Add separators. * General: - Rename Paste/Copy As to Paste/Copy as Follow ups: * Asset Browser: New catalog menu (D16820) * Asset Shelf (T102879) * Show shortcuts in the Pose Assets context menu (T103267) * "Update" operators (Paste as Update and Update Pose Asset) * Action Editor: Catalog pop-up for new created poses * Action Editor: Bring the Pose Library panel to the Animation tab The update operators are welcome, but outside of the scope of the usability change. If/when they are implemented, they will fit within the Edit menu. The Action Editor changes should be tackled shortly. Differential Revision: https://developer.blender.org/D16795 =================================================================== M pose_library/gui.py M pose_library/operators.py =================================================================== diff --git a/pose_library/gui.py b/pose_library/gui.py index 1b2dd4fe..b0025546 100644 --- a/pose_library/gui.py +++ b/pose_library/gui.py @@ -8,6 +8,7 @@ import bpy from bpy.types import ( AssetHandle, Context, + Menu, Panel, UIList, WindowManager, @@ -39,17 +40,9 @@ class VIEW3D_PT_pose_library(PoseLibraryPanel, Panel): def draw(self, context: Context) -> None: layout = self.layout - row = layout.row(align=True) - row.operator("poselib.create_pose_asset").activate_new_action = False - if bpy.types.POSELIB_OT_restore_previous_action.poll(context): - row.operator("poselib.restore_previous_action", text="", icon='LOOP_BACK') - row.operator("poselib.copy_as_asset", icon="COPYDOWN", text="") - - wm = context.window_manager - layout.prop(wm, "poselib_flipped") - if hasattr(layout, "template_asset_view"): workspace = context.workspace + wm = context.window_manager activate_op_props, drag_op_props = layout.template_asset_view( "pose_assets", workspace, @@ -94,7 +87,8 @@ def pose_library_list_item_context_menu(self: UIList, context: Context) -> None: layout.separator() - layout.operator("poselib.apply_pose_asset", text="Apply Pose") + layout.operator("poselib.apply_pose_asset", text="Apply Pose").flipped = False + layout.operator("poselib.apply_pose_asset", text="Apply Pose Flipped").flipped = True old_op_ctx = layout.operator_context layout.operator_context = 'INVOKE_DEFAULT' @@ -102,6 +96,7 @@ def pose_library_list_item_context_menu(self: UIList, context: Context) -> None: props.flipped = wm.poselib_flipped layout.operator_context = old_op_ctx + layout.separator() props = layout.operator("poselib.pose_asset_select_bones", text="Select Pose Bones") props.flipped = wm.poselib_flipped props.select = True @@ -109,70 +104,18 @@ def pose_library_list_item_context_menu(self: UIList, context: Context) -> None: props.flipped = wm.poselib_flipped props.select = False + if not is_pose_asset_view(): + layout.separator() + layout.operator("asset.assign_action") + layout.separator() if is_pose_asset_view(): layout.operator("asset.open_containing_blend_file") -class ASSETBROWSER_PT_pose_library_usage(PoseLibraryPanel, asset_utils.AssetBrowserPanel, Panel): - bl_region_type = "TOOLS" - bl_label = "Pose Library" - asset_categories = {'ANIMATIONS'} - - @classmethod - def poll(cls, context: Context) -> bool: - return ( - cls.pose_library_panel_poll(context) - and cls.asset_browser_panel_poll(context) - ) - - def draw(self, context: Context) -> None: - layout = self.layout - wm = context.window_manager - - col = layout.column(align=True) - col.prop(wm, "poselib_flipped") - props = col.operator("poselib.apply_pose_asset", text="Apply") - props.flipped = wm.poselib_flipped - props = col.operator("poselib.blend_pose_asset", text="Interactive Blend") - props.flipped = wm.poselib_flipped - - row = col.row(align=True) - props = row.operator("poselib.pose_asset_select_bones", text="Select", icon="BONE_DATA") - props.flipped = wm.poselib_flipped - props.select = True - props = row.operator("poselib.pose_asset_select_bones", text="Deselect") - props.flipped = wm.poselib_flipped props.select = False -class ASSETBROWSER_PT_pose_library_editing(PoseLibraryPanel, asset_utils.AssetBrowserPanel, Panel): - bl_region_type = "TOOL_PROPS" - bl_label = "Pose Library" - asset_categories = {'ANIMATIONS'} - - @classmethod - def poll(cls, context: Context) -> bool: - return ( - cls.pose_library_panel_poll(context) - and cls.asset_browser_panel_poll(context) - ) - - def draw(self, context: Context) -> None: - layout = self.layout - - col = layout.column(align=True) - col.enabled = bpy.types.ASSET_OT_assign_action.poll(context) - col.label(text="Activate & Edit") - col.operator("asset.assign_action") - - # Creation - col = layout.column(align=True) - col.enabled = bpy.types.POSELIB_OT_paste_asset.poll(context) - col.label(text="Create Pose Asset") - col.operator("poselib.paste_asset", icon="PASTEDOWN") - - class DOPESHEET_PT_asset_panel(PoseLibraryPanel, Panel): bl_space_type = "DOPESHEET_EDITOR" bl_region_type = "UI" @@ -191,6 +134,27 @@ class DOPESHEET_PT_asset_panel(PoseLibraryPanel, Panel): layout.operator("poselib.convert_old_poselib") +def pose_library_list_item_asset_menu(self: UIList, context: Context) -> None: + layout = self.layout + layout.menu("ASSETBROWSER_MT_asset") + + +class ASSETBROWSER_MT_asset(Menu): + bl_label = "Asset" + + @classmethod + def poll(cls, context): + from bpy_extras.asset_utils import SpaceAssetInfo + return SpaceAssetInfo.is_asset_browser_poll(context) + + def draw(self, context: Context) -> None: + layout = self.layout + + layout.operator("poselib.paste_asset", icon='PASTEDOWN') + layout.separator() + layout.operator("poselib.create_pose_asset").activate_new_action = False + + ### Messagebus subscription to monitor asset library changes. _msgbus_owner = object() @@ -228,10 +192,9 @@ def _on_blendfile_load_post(none, other_none) -> None: classes = ( - ASSETBROWSER_PT_pose_library_editing, - ASSETBROWSER_PT_pose_library_usage, DOPESHEET_PT_asset_panel, VIEW3D_PT_pose_library, + ASSETBROWSER_MT_asset, ) _register, _unregister = bpy.utils.register_classes_factory(classes) @@ -251,6 +214,7 @@ def register() -> None: bpy.types.UI_MT_list_item_context_menu.prepend(pose_library_list_item_context_menu) bpy.types.ASSETBROWSER_MT_context_menu.prepend(pose_library_list_item_context_menu) + bpy.types.ASSETBROWSER_MT_editor_menus.append(pose_library_list_item_asset_menu) register_message_bus() bpy.app.handlers.load_pre.append(_on_blendfile_load_pre) diff --git a/pose_library/operators.py b/pose_library/operators.py index 7303c5a6..7723b5fd 100644 --- a/pose_library/operators.py +++ b/pose_library/operators.py @@ -203,7 +203,7 @@ class ASSET_OT_assign_action(Operator): class POSELIB_OT_copy_as_asset(PoseAssetCreator, Operator): bl_idname = "poselib.copy_as_asset" - bl_label = "Copy Pose As Asset" + bl_label = "Copy Pose as Asset" bl_description = "Create a new pose asset on the clipboard, to be pasted into an Asset Browser" bl_options = {"REGISTER"} @@ -255,7 +255,7 @@ class POSELIB_OT_copy_as_asset(PoseAssetCreator, Operator): class POSELIB_OT_paste_asset(Operator): bl_idname = "poselib.paste_asset" - bl_label = "Paste As New Asset" + bl_label = "Paste as New Asset" bl_description = "Paste the Asset that was previously copied using Copy As Asset" bl_options = {"REGISTER", "UNDO"} From noreply at git.blender.org Fri Dec 23 15:51:35 2022 From: noreply at git.blender.org (Sibo Van Gool) Date: Fri, 23 Dec 2022 15:51:35 +0100 (CET) Subject: [Bf-extensions-cvs] [5fa52066] master: Fix T103359: Images as Planes: texture extension not applying In-Reply-To: <167180709503.4820.4106363887387005129@git.blender.org> References: <167180709503.4820.4106363887387005129@git.blender.org> Message-ID: <20221223145135.3843A26357@git.blender.org> Commit: 5fa52066d1a08b8dd55b866e91783cafbe816732 Author: Sibo Van Gool Date: Fri Dec 23 11:48:47 2022 -0300 Branches: master https://developer.blender.org/rBA5fa52066d1a08b8dd55b866e91783cafbe816732 Fix T103359: Images as Planes: texture extension not applying Don't default the imported image's texture extension to CLIP. Reviewed By: mano-wii Maniphest Tasks: T103359 Differential Revision: https://developer.blender.org/D16836 =================================================================== M io_import_images_as_planes.py =================================================================== diff --git a/io_import_images_as_planes.py b/io_import_images_as_planes.py index 37812331..8a5590eb 100644 --- a/io_import_images_as_planes.py +++ b/io_import_images_as_planes.py @@ -1008,8 +1008,6 @@ class IMPORT_IMAGE_OT_to_plane(Operator, AddObjectHelper): if img_spec.image.source == 'SEQUENCE': image_user.use_auto_refresh = True - texture.extension = 'CLIP' # Default of "Repeat" can cause artifacts - def apply_material_options(self, material, slot): shader = self.shader From noreply at git.blender.org Sat Dec 24 00:54:42 2022 From: noreply at git.blender.org (Aaron Carlisle) Date: Sat, 24 Dec 2022 00:54:42 +0100 (CET) Subject: [Bf-extensions-cvs] [e3a224f4] master: POV-Ray: Better match area light UI with Blender In-Reply-To: <167183968265.53866.12187212494883050153@git.blender.org> References: <167183968265.53866.12187212494883050153@git.blender.org> Message-ID: <20221223235442.D31B02CD73@git.blender.org> Commit: e3a224f473f2dae7ba5439d58efb85549d486f89 Author: Aaron Carlisle Date: Fri Dec 23 18:51:23 2022 -0500 Branches: master https://developer.blender.org/rBAe3a224f473f2dae7ba5439d58efb85549d486f89 POV-Ray: Better match area light UI with Blender This removes the use of `DATA_PT_area` which was only used by this add-on. =================================================================== M render_povray/scenography_gui.py =================================================================== diff --git a/render_povray/scenography_gui.py b/render_povray/scenography_gui.py index ed4e1d8c..d8a02984 100755 --- a/render_povray/scenography_gui.py +++ b/render_povray/scenography_gui.py @@ -483,6 +483,18 @@ class LIGHT_PT_POV_light(PovLightButtonsPanel, Panel): if light.type == "AREA": col.prop(light, "distance") + col.separator() + + col.prop(light, "shape") + + sub = col.column(align=True) + + if light.shape in {'SQUARE', 'DISK'}: + sub.prop(light, "size") + elif light.shape in {'RECTANGLE', 'ELLIPSE'}: + sub.prop(light, "size", text="Size X") + sub.prop(light, "size_y", text="Y") + # restore later as interface to POV light groups ? # col = split.column() # col.prop(light, "use_own_layer", text="This Layer Only") @@ -612,22 +624,6 @@ class LIGHT_PT_POV_shadow(PovLightButtonsPanel, Panel): sub.prop(light.pov, "shadow_ray_samples_y", text="Samples Y") -class LIGHT_PT_POV_area(PovLightButtonsPanel, Panel): - """Area light UI panel""" - - bl_label = properties_data_light.DATA_PT_area.bl_label - bl_parent_id = "LIGHT_PT_POV_light" - bl_context = "data" - - @classmethod - def poll(cls, context): - lamp = context.light - engine = context.scene.render.engine - return (lamp and lamp.type == "AREA") and (engine in cls.COMPAT_ENGINES) - - draw = properties_data_light.DATA_PT_area.draw - - class LIGHT_PT_POV_spot(PovLightButtonsPanel, Panel): bl_label = properties_data_light.DATA_PT_spot.bl_label bl_parent_id = "LIGHT_PT_POV_light" @@ -720,7 +716,6 @@ classes = ( LIGHT_PT_POV_light, LIGHT_PT_POV_shadow, LIGHT_PT_POV_spot, - LIGHT_PT_POV_area, LIGHT_MT_POV_presets, LIGHT_OT_POV_add_preset, OBJECT_PT_POV_rainbow, From noreply at git.blender.org Mon Dec 26 08:09:18 2022 From: noreply at git.blender.org (Pratik Borhade) Date: Mon, 26 Dec 2022 08:09:18 +0100 (CET) Subject: [Bf-extensions-cvs] [f131c922] master: Fix T103455: Modifier tools add-on don't support GPencil modifiers In-Reply-To: <167203855874.22860.17128372456412673342@git.blender.org> References: <167203855874.22860.17128372456412673342@git.blender.org> Message-ID: <20221226070918.E8AD053BFE@git.blender.org> Commit: f131c922f9f35081376a32d19ed963603b8e2be6 Author: Pratik Borhade Date: Mon Dec 26 12:32:00 2022 +0530 Branches: master https://developer.blender.org/rBAf131c922f9f35081376a32d19ed963603b8e2be6 Fix T103455: Modifier tools add-on don't support GPencil modifiers Modifier stack for GPencil object is handled separately than the geometry objects (mesh/Curve). This patch provides support for GPencil modifier. `modifier_type` function is added to assign correct modifier list according to the object type. Reviewed by: antoniov Differential Revision: https://developer.blender.org/D16865 =================================================================== M space_view3d_modifier_tools.py =================================================================== diff --git a/space_view3d_modifier_tools.py b/space_view3d_modifier_tools.py index 71aa7cf3..ef312072 100644 --- a/space_view3d_modifier_tools.py +++ b/space_view3d_modifier_tools.py @@ -37,7 +37,9 @@ class ApplyAllModifiers(Operator): contx = bpy.context.copy() contx['object'] = obj - for mod in obj.modifiers[:]: + modifiers = modifier_type(obj) + + for mod in modifiers[:]: contx['modifier'] = mod is_mod = True try: @@ -45,6 +47,10 @@ class ApplyAllModifiers(Operator): contx, modifier=contx['modifier'].name ) + + bpy.ops.object.gpencil_modifier_apply( + modifier=contx['modifier'].name + ) except: obj_name = getattr(obj, "name", "NO NAME") collect_names.append(obj_name) @@ -90,10 +96,11 @@ class DeleteAllModifiers(Operator): for obj in context.selected_objects: is_select = True - modifiers = obj.modifiers[:] - for modi in modifiers: + modifiers = modifier_type(obj) + + for modi in modifiers[:]: is_mod = True - obj.modifiers.remove(modi) + modifiers.remove(modi) if is_select: if is_mod: @@ -127,12 +134,16 @@ class ToggleApplyModifiersView(Operator): skipped = set() # collect names count_modifiers = 0 # check for message_a (all skipped) + modifiers = modifier_type(context.active_object) + # check if the active object has only one non exposed modifier as the logic will fail - if len(context.active_object.modifiers) == 1 and \ - context.active_object.modifiers[0].type in skip_type: + if len(modifiers) == 1 and \ + modifiers[0].type in skip_type: for obj in context.selected_objects: - for mod in obj.modifiers: + mod_sel = modifier_type(obj) + + for mod in mod_sel: if mod.type in skip_type: skipped.add(mod.name) continue @@ -141,7 +152,7 @@ class ToggleApplyModifiersView(Operator): is_apply = False break else: - for mod in context.active_object.modifiers: + for mod in modifiers: if mod.type in skip_type: skipped.add(mod.name) continue @@ -150,9 +161,9 @@ class ToggleApplyModifiersView(Operator): is_apply = False break - count_modifiers = len(context.active_object.modifiers) + count_modifiers = len(modifiers) # active object - no selection - for mod in context.active_object.modifiers: + for mod in modifiers: if mod.type in skip_type: count_modifiers -= 1 skipped.add(mod.name) @@ -161,9 +172,12 @@ class ToggleApplyModifiersView(Operator): mod.show_viewport = is_apply for obj in context.selected_objects: - count_modifiers += len(obj.modifiers) - for mod in obj.modifiers: + modifiers = modifier_type(obj) + + count_modifiers += len(modifiers) + + for mod in modifiers: if mod.type in skip_type: skipped.add(mod.name) count_modifiers -= 1 @@ -194,9 +208,11 @@ class ToggleAllShowExpanded(Operator): def execute(self, context): obj = context.active_object - if (len(obj.modifiers)): + modifiers = modifier_type(obj) + + if (len(modifiers)): vs = 0 - for mod in obj.modifiers: + for mod in modifiers: if (mod.show_expanded): vs += 1 else: @@ -204,7 +220,7 @@ class ToggleAllShowExpanded(Operator): is_close = False if (0 < vs): is_close = True - for mod in obj.modifiers: + for mod in modifiers: mod.show_expanded = not is_close else: self.report({'WARNING'}, "Not a single modifier to Expand/Collapse") @@ -218,7 +234,7 @@ class ToggleAllShowExpanded(Operator): # Menus # def menu(self, context): if (context.active_object): - if (len(context.active_object.modifiers)): + if (len(context.active_object.modifiers) or len(context.active_object.grease_pencil_modifiers)): col = self.layout.column(align=True) row = col.row(align=True) @@ -238,13 +254,18 @@ def menu(self, context): def menu_func(self, context): if (context.active_object): - if (len(context.active_object.modifiers)): + if (len(context.active_object.modifiers) or len(context.active_object.grease_pencil_modifiers)): layout = self.layout layout.separator() layout.operator(ApplyAllModifiers.bl_idname, icon='IMPORT', text="Apply All Modifiers") +def modifier_type(object): + if object.type == 'GPENCIL': + return object.grease_pencil_modifiers + return object.modifiers + # Register classes = [ ApplyAllModifiers, @@ -261,6 +282,8 @@ def register(): # Add "Specials" menu to the "Modifiers" menu bpy.types.DATA_PT_modifiers.prepend(menu) + bpy.types.DATA_PT_gpencil_modifiers.prepend(menu) + # Add apply operator to the Apply 3D View Menu bpy.types.VIEW3D_MT_object_apply.append(menu_func) @@ -269,6 +292,8 @@ def unregister(): # Remove "Specials" menu from the "Modifiers" menu. bpy.types.DATA_PT_modifiers.remove(menu) + bpy.types.DATA_PT_gpencil_modifiers.remove(menu) + # Remove apply operator to the Apply 3D View Menu bpy.types.VIEW3D_MT_object_apply.remove(menu_func) From noreply at git.blender.org Mon Dec 26 14:23:32 2022 From: noreply at git.blender.org (Alexander Gavrilov) Date: Mon, 26 Dec 2022 14:23:32 +0100 (CET) Subject: [Bf-extensions-cvs] [042c799b] master: Rigify: relax the type annotation on ControlBoneParentLayer owner. In-Reply-To: <167206101210.25222.12452239096272756875@git.blender.org> References: <167206101210.25222.12452239096272756875@git.blender.org> Message-ID: <20221226132332.49B0858D4A@git.blender.org> Commit: 042c799b7aef9634a33d24e78d4922706aca9a2b Author: Alexander Gavrilov Date: Mon Dec 26 15:21:09 2022 +0200 Branches: master https://developer.blender.org/rBA042c799b7aef9634a33d24e78d4922706aca9a2b Rigify: relax the type annotation on ControlBoneParentLayer owner. Upon review, it was more restrictive than necessary. =================================================================== M rigify/rigs/skin/skin_parents.py =================================================================== diff --git a/rigify/rigs/skin/skin_parents.py b/rigify/rigs/skin/skin_parents.py index 660e79da..bbcaf3b6 100644 --- a/rigify/rigs/skin/skin_parents.py +++ b/rigify/rigs/skin/skin_parents.py @@ -228,7 +228,7 @@ class ControlBoneParentMix(ControlBoneParentImplBase): class ControlBoneParentLayer(ControlBoneParentImplBase): """Base class for parent generators that build on top of another mechanism.""" - def __init__(self, rig: 'BaseSkinRig', node: 'ControlBoneNode', parent: ControlBoneParentBase): + def __init__(self, rig: 'BaseSkinRig', node: 'BaseSkinNode', parent: ControlBoneParentBase): super().__init__(rig, node) self.parent = parent @@ -284,12 +284,12 @@ class ControlBoneParentOffset(ControlBoneParentLayer): mch_bones: list[str] @classmethod - def wrap(cls, owner: 'BaseSkinRig', parent: ControlBoneParentBase, node: 'ControlBoneNode', + def wrap(cls, owner: 'BaseSkinRig', parent: ControlBoneParentBase, node: 'BaseSkinNode', *constructor_args): # noinspection PyArgumentList return cls(owner, node, parent, *constructor_args) - def __init__(self, rig: 'BaseSkinRig', node: 'ControlBoneNode', parent: ControlBoneParentBase): + def __init__(self, rig: 'BaseSkinRig', node: 'BaseSkinNode', parent: ControlBoneParentBase): super().__init__(rig, node, parent) self.copy_local = {} self.add_local = {} From noreply at git.blender.org Fri Dec 30 16:13:32 2022 From: noreply at git.blender.org (Antonio Vazquez) Date: Fri, 30 Dec 2022 16:13:32 +0100 (CET) Subject: [Bf-extensions-cvs] [f1c82b13] master: Storypencil: Fix switch error when there are no scene strips In-Reply-To: <167241321212.67077.4987851485015324628@git.blender.org> References: <167241321212.67077.4987851485015324628@git.blender.org> Message-ID: <20221230151332.8A3785AC5E@git.blender.org> Commit: f1c82b13ee6277e8685f3dc972544fe1447c5046 Author: Antonio Vazquez Date: Fri Dec 30 16:11:35 2022 +0100 Branches: master https://developer.blender.org/rBAf1c82b13ee6277e8685f3dc972544fe1447c5046 Storypencil: Fix switch error when there are no scene strips If there was a non scene strip, the switch was not working. =================================================================== M storypencil/synchro.py =================================================================== diff --git a/storypencil/synchro.py b/storypencil/synchro.py index 94ebe02b..6614b334 100644 --- a/storypencil/synchro.py +++ b/storypencil/synchro.py @@ -339,7 +339,8 @@ def get_sequences_at_frame( :param frame: the frame to consider """ return [s for s in sequences if frame >= s.frame_start + s.frame_offset_start and - frame < s.frame_start + s.frame_offset_start + s.frame_final_duration] + frame < s.frame_start + s.frame_offset_start + s.frame_final_duration and + s.type == 'SCENE'] def get_sequence_at_frame( From noreply at git.blender.org Sat Dec 31 16:51:29 2022 From: noreply at git.blender.org (Antonio Vazquez) Date: Sat, 31 Dec 2022 16:51:29 +0100 (CET) Subject: [Bf-extensions-cvs] [3ee20006] master: Storypencil: Fix problems with paths In-Reply-To: <167250188910.71110.12279082803652503447@git.blender.org> References: <167250188910.71110.12279082803652503447@git.blender.org> Message-ID: <20221231155129.420056B1F@git.blender.org> Commit: 3ee200068c228a83fcd9b96746693d3c516574ec Author: Antonio Vazquez Date: Sat Dec 31 16:51:04 2022 +0100 Branches: master https://developer.blender.org/rBA3ee200068c228a83fcd9b96746693d3c516574ec Storypencil: Fix problems with paths If path was not absolute the script could fail =================================================================== M storypencil/render.py =================================================================== diff --git a/storypencil/render.py b/storypencil/render.py index 6f4a136f..357209df 100644 --- a/storypencil/render.py +++ b/storypencil/render.py @@ -98,7 +98,7 @@ class STORYPENCIL_OT_RenderAction(Operator): prv_format = image_settings.file_format prv_use_file_extension = scene.render.use_file_extension prv_ffmpeg_format = scene.render.ffmpeg.format - rootpath = scene.storypencil_render_render_path + rootpath = bpy.path.abspath(scene.storypencil_render_render_path) only_selected = scene.storypencil_render_onlyselected channel = scene.storypencil_render_channel