Skip to content

Commit

Permalink
Merge branch '211-2-1-pre-release-3-rendering-issues' into 'main'
Browse files Browse the repository at this point in the history
Resolve "2.1 pre release 3 - Rendering issues"

Closes #211

See merge request blender/public-projects/shotmanager-addon!119
  • Loading branch information
jatubi committed Oct 20, 2022
2 parents 2829271 + 6a71a4e commit 1199885
Show file tree
Hide file tree
Showing 24 changed files with 370 additions and 173 deletions.
19 changes: 19 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
-----
## 2.1.31 (2022-10-17)
- Bug fix when duplicating cameras that had animation data but no action
- Init Retimer presets at Props creation to avoid warning msg

-----
## 2.1.30 (2022-10-15)
- Bug fix on Mac for rendering video files - final

-----
## 2.1.29 (2022-10-14)
- Bug fix on Mac for rendering video files - again
- Forced render step to 1

-----
## 2.1.28 (2022-10-14)
- Bug fix on Mac for rendering video files
- Made the playblast temp directories different from the rendering directories

-----
## 2.1.27 (2022-10-12)
**Beta Release**
Expand Down
36 changes: 36 additions & 0 deletions doc/ux/switch_to_draw_mode_functions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@


# switchToDrawMode( gpencil ): function in utils_greasepencil

Change the current object to be the specified one.
If the previous object was in a sub-object mode it is set back to object mode.

Set the specified object to Draw mode

Change the drawing tool

Change the drawing stroke placement and axis

*** Do not change anything on the layer context. To add ???

Called by uas_shot_manager.toggle_grease_pencil_draw_mode


# uas_shot_manager.toggle_grease_pencil_draw_mode

Calling switchToDrawMode

Calls place3DCursor


# uas_shot_manager.greasepencil_select_and_draw

**Called in the UI when pressing the GP icon button**
Calling switchToDrawMode

Called by
- uas_shot_manager.stb_frame_drawing
- drawStoryboardRow
- setCurrentShotByIndex
called by uas_shot_manager.set_current_shot
called by _update_selected_shot_index when the selected item is changed in the templateList
4 changes: 2 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
# -- Project information -----------------------------------------------------

project = "Ubisoft Shot Manager"
copyright = "2022, Ubisoft"
author = "Julien Blervaque - Ubisoft"
copyright = "2022, Ubisoft, under CC BY 4.0 License"
author = "Julien Blervaque"


# -- General configuration ---------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion shotmanager/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@
"author": "Ubisoft - Julien Blervaque (aka Werwack), Romain Carriquiry Borchiari",
"description": "Easily manage shots and cameras in the 3D View and see the resulting edit in real-time",
"blender": (3, 1, 0),
"version": (2, 1, 27),
"version": (2, 1, 31),
"location": "View3D > Shot Mng",
"doc_url": "https://ubisoft-shotmanager.readthedocs.io",
"tracker_url": "https://github.com/ubisoft/shotmanager/issues",
Expand Down
10 changes: 6 additions & 4 deletions shotmanager/config/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def initGlobalVariables():
devDebug = False

global devDebug_displayDebugPanel
devDebug_displayDebugPanel = True
devDebug_displayDebugPanel = False

global devDebug_lastRedrawTime
devDebug_lastRedrawTime = -1
Expand Down Expand Up @@ -151,8 +151,8 @@ def getLoggingTags():
# debug tags
tags["DEPRECATED"] = False

tags["REG"] = True
tags["UNREG"] = True
tags["REG"] = False
tags["UNREG"] = False

tags["INIT_AND_DATA"] = False

Expand All @@ -162,13 +162,15 @@ def getLoggingTags():
tags["LAYOUT"] = False
tags["RETIMER"] = False

tags["GREASE_PENCIL"] = False

tags["EDIT_IO"] = True

tags["TIMELINE_EVENT"] = False
tags["SHOTSTACK_EVENT"] = False
tags["EVENT"] = False

# info tags
tags["RENDERTIME"] = False
tags["RENDERTIME"] = True

return tags
4 changes: 4 additions & 0 deletions shotmanager/config/dev_notes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -236,3 +236,7 @@ mettre nom de canvas dont touch
overlay desactive des qu'on sort du full scerenfull screnn (ctrl alt space)


Bug context
# wkip toto 2022_10_14
class UAS_ShotManager_OT_DrawOnGreasePencil(Operator):
bl_idname = "uas_shot_manager.draw_on_grease_pencil"
1 change: 0 additions & 1 deletion shotmanager/debug/debug_parse_xml.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,6 @@ def _getFirstChildWithName(parentNode, name):
seqMedia = _getFirstChildWithName(seq, "media")
if seqMedia is not None:
seqMediaVideo = _getFirstChildWithName(seqMedia, "video")
print(f"seqMediaVideo: {seqMediaVideo}")

newNodeFormat = dom1.createElement("format")
newNodeCharact = dom1.createElement("samplecharacteristics")
Expand Down
18 changes: 11 additions & 7 deletions shotmanager/features/greasepencil/greasepencil_frame_template.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,15 +72,17 @@ def initialize(self, mode="SCENE"):
"""
# self.parent = parent

_logger.debug_ext(f"Initializing storyboard template preset list for {mode}", col="GREEN")
_logger.debug_ext(f"Initializing storyboard template preset list for {mode}", col="GREEN", tag="GREASE_PENCIL")
self.updatePresets(mode=mode)

def updatePresets(self, mode="SCENE"):
"""
Args:
mode: can be SCENE or ADDON_PREFS"
"""
_logger.debug_ext(f"updatePresets() for storyboard template preset list for {mode}", col="GREEN")
_logger.debug_ext(
f"updatePresets() for storyboard template preset list for {mode}", col="GREEN", tag="GREASE_PENCIL"
)
# Can be SCENE or ADDON_PREFS"
prefs = config.getShotManagerPrefs()
if "SCENE" == mode:
Expand All @@ -89,7 +91,7 @@ def updatePresets(self, mode="SCENE"):
props = prefs

if "ADDON_PREFS" == mode:
_logger.debug_ext(" In ADDON PREFS Add Presets", col="GREEN")
_logger.debug_ext(" In ADDON PREFS Add Presets", col="GREEN", tag="GREASE_PENCIL")
# initialize the add-on preferences set of presets
# wkipwkipwkip
# Canvas
Expand Down Expand Up @@ -144,7 +146,7 @@ def updatePresets(self, mode="SCENE"):
else:
# SCENE
# initialize the template presets of the scene from the add-on preferences
_logger.debug_ext(" In SCENE Add Presets", col="GREEN")
_logger.debug_ext(" In SCENE Add Presets", col="GREEN", tag="GREASE_PENCIL")
# bpy.ops.uas_shot_manager.greasepencil_template_panel(mode=mode)

prefsTemplate = prefs.stb_frameTemplate
Expand Down Expand Up @@ -264,7 +266,7 @@ def resetPresetToDefault(self, preset):
# parentProps = self.getParentProps()

if prefs.stb_frameTemplate == self:
_logger.debug_ext(f"Resetting preset {preset.id} in the Preferences", col="PURPLE")
_logger.debug_ext(f"Resetting preset {preset.id} in the Preferences", col="PURPLE", tag="GREASE_PENCIL")

if "ROUGH" == preset.id:
preset.used = True
Expand Down Expand Up @@ -317,7 +319,9 @@ def resetPresetToDefault(self, preset):
preset.materialName = "_Canvas_Mat"

else:
_logger.debug_ext(f"Resetting preset {preset.id} in the scene {bpy.context.scene}", col="PURPLE")
_logger.debug_ext(
f"Resetting preset {preset.id} in the scene {bpy.context.scene}", col="PURPLE", tag="GREASE_PENCIL"
)

defaulPresetFromPrefs = prefs.stb_frameTemplate.getPresetByID(preset.id)
if defaulPresetFromPrefs is None:
Expand Down Expand Up @@ -389,7 +393,7 @@ def getEditedGPLayerName(self, gpName, refLayerName):
def storeEditedGPSettings(self, gpName, refLayerName):
"""Update, or add if not found, the settings of the specifed edited grease pencil object
Return the corresponding settings instance"""
_logger.debug_ext(f"storeEditedGPSettings: {gpName}{refLayerName}")
_logger.debug_ext(f"storeEditedGPSettings: {gpName}{refLayerName}", tag="GREASE_PENCIL")

if gpName is None or "" == gpName:
return None
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def _get_layerName(self):

def _set_layerName(self, value):
self["layerName"] = value
_logger.debug_ext(f"\n _set_layerName: {value} - {self['layerName']}", col="RED")
_logger.debug_ext(f"\n _set_layerName: {value} - {self['layerName']}", col="RED", tag="GREASE_PENCIL")

layerName: StringProperty(name="Layer Name", get=_get_layerName, set=_set_layerName, default="")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,7 @@ def execute(self, context):
return {"FINISHED"}


# wkip toto 2022_10_14
class UAS_ShotManager_OT_DrawOnGreasePencil(Operator):
bl_idname = "uas_shot_manager.draw_on_grease_pencil"
bl_label = "Draw on Grease Pencil"
Expand Down
6 changes: 3 additions & 3 deletions shotmanager/operators/general.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,8 +216,8 @@ def invoke(self, context, event):
return {"FINISHED"}


class UAS_ShotManager_OT_ConvertMarkersFromCameraBindingToShots(Operator):
bl_idname = "uas_shot_manager.convert_markers_from_camera_binding_to_shots"
class UAS_ShotManager_OT_ConvertMarkersFromCamBindingToShots(Operator):
bl_idname = "uas_shot_manager.convert_markers_from_cam_binding_to_shots"
bl_label = "Convert Camera Binding to Shots"
bl_description = (
"Convert the camera binding used by markers to shots and remove their binding.\nMarkers are not deleted"
Expand Down Expand Up @@ -491,7 +491,7 @@ def execute(self, context):
UAS_ShotManager_OT_SetFpsAsProjectFps,
UAS_ShotManager_OT_SetRenderResAsProjectRes,
UAS_ShotManager_OT_ClearMarkersFromCameraBinding,
UAS_ShotManager_OT_ConvertMarkersFromCameraBindingToShots,
UAS_ShotManager_OT_ConvertMarkersFromCamBindingToShots,
UAS_ShotManager_OT_SetProjectSequenceName,
UAS_ShotManager_OT_GoToVideoShotManager,
UAS_ShotManager_OT_FileInfo,
Expand Down
3 changes: 3 additions & 0 deletions shotmanager/operators/shots.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,9 @@ def execute(self, context):
prefs = config.getShotManagerPrefs()
shot = props.getShotByIndex(self.index)

if shot:
_logger.debug_ext(f"Set Current Shot Op: {shot.name}")

if not shot:
_logger.error_ext(f"Set Current Shot Operator exec: shot is None. index: {self.index}")
# _logger.debug_ext("Set Current Shot Operator exec: ", col="RED")
Expand Down
11 changes: 6 additions & 5 deletions shotmanager/otio/exports.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ def addEditCharacteristicsToXML(xml_filename, montageCharacteristics):
seqMedia = utils_xml.getFirstChildWithName(seq, "media")
if seqMedia is not None:
seqMediaVideo = utils_xml.getFirstChildWithName(seqMedia, "video")
print(f"seqMediaVideo: {seqMediaVideo}")

# sequence characteristics
newNodeFormat = dom1.createElement("format")
Expand Down Expand Up @@ -185,7 +184,7 @@ def fillEditFile(scene, props, take, sceneFps, output_media_mode, rootPath):
# shotFileName = Path(shotFileFullPath).name
shotFileName = shot.getName_PathCompliant(withPrefix=True)

_logger.info(f" Adding shot: {shotFileFullPath}")
_logger.debug_ext(f" Adding shot to Edit file: {shotFileFullPath}", tag="EDIT_IO")
if not Path(shotFileFullPath).exists():
_logger.warning_ext(" File not found ! ")

Expand Down Expand Up @@ -241,13 +240,15 @@ def exportTakeEditToOtio(
output_media_mode: can be "IMAGE_SEQ", "VIDEO", "IMAGE_SEQ_AND_VIDEO". Specify the file format of the rendered
media.
"""
print(" ** -- ** exportTakeEditToOtio from exports.py, fileListOnly: ", fileListOnly)
props = scene.UAS_shot_manager_props
sceneFps = fps if fps != -1 else utils.getSceneEffectiveFps(scene)
# import opentimelineio as opentimelineio

print("\n--- --- --- --- --- --- --- --- --- ---")
print(f"\nExporting Edit file: {output_filepath}\n")
infoStr = "\n--- --- --- --- --- --- --- --- --- ---"
infoStr += "\n Exporting edit file"
infoStr += "\n--- --- --- --- --- --- --- --- --- ---"
infoStr += f"\n\n File: {output_filepath}\n"
_logger.info_ext(infoStr, col="GREEN")

if fileListOnly:
return output_filepath
Expand Down

0 comments on commit 1199885

Please sign in to comment.