Skip to content

Commit

Permalink
Update for RD 1.25
Browse files Browse the repository at this point in the history
  • Loading branch information
eliemichel committed Feb 2, 2023
1 parent 9618bbc commit 8cf3df1
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 8 deletions.
2 changes: 1 addition & 1 deletion blender/MapsModelsImporter/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
bl_info = {
"name": "Maps Models Importer",
"author": "Elie Michel",
"version": (0, 5, 0),
"version": (0, 6, 0),
"blender": (3, 1, 0),
"location": "File > Import > Google Maps Capture",
"description": "Import meshes from a Google Maps or Google Earth capture",
Expand Down
Binary file modified blender/MapsModelsImporter/bin/win64/renderdoc.dll
Binary file not shown.
Binary file modified blender/MapsModelsImporter/bin/win64/renderdoc.pyd
Binary file not shown.
18 changes: 11 additions & 7 deletions blender/MapsModelsImporter/rdutils.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ def __enter__(self):
self.cap = rd.OpenCaptureFile()
status = self.cap.OpenFile(self.filename, '', None)

if status != rd.ReplayStatus.Succeeded:
print("Couldn't open file: " + str(status))
if not status.OK():
print("Couldn't open file: " + status.Message())
self.err = True
return None

Expand All @@ -42,18 +42,22 @@ def __enter__(self):
self.err = True
return None

status,self.controller = self.cap.OpenCapture(rd.ReplayOptions(), None)
status, self.controller = self.cap.OpenCapture(rd.ReplayOptions(), None)

if status != rd.ReplayStatus.Succeeded:
print("Couldn't initialise replay: " + str(status))
if status == 15:
if not status.OK():
print("Couldn't initialise replay: " + status.Message())
if status.code == 15:
print("This is likely due to an unsupported version of RenderDoc.")
self.cap.Shutdown()
self.err = True
return None

# Once the replay is created, the CaptureFile can be shut down, there
# is no dependency on it by the ReplayController.
self.cap.Shutdown()

return self.controller

def __exit__(self, type, value, traceback):
if not self.err:
self.controller.Shutdown()
self.cap.Shutdown()

0 comments on commit 8cf3df1

Please sign in to comment.