-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
121 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
from .extract import extract | ||
from .groups import PHOTOGRAMMETRY_PG_input_blender | ||
from .groups import PHOTOGRAMMETRY_PG_input_blender, PHOTOGRAMMETRY_PG_output_blender | ||
from .load import load | ||
from ..utils import PhotogrammetryModule | ||
|
||
importer = PhotogrammetryModule('Blender Motion Tracking', 'Use tracking data from current scene', PHOTOGRAMMETRY_PG_input_blender, extract) | ||
exporter = PhotogrammetryModule('Blender', 'Import data into current scene', None, load) | ||
exporter = PhotogrammetryModule('Blender', 'Import data into current scene', PHOTOGRAMMETRY_PG_output_blender, load) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,30 @@ | ||
import os | ||
import bpy | ||
from bpy.props import StringProperty, IntProperty | ||
from bpy.types import PropertyGroup | ||
from bpy.props import StringProperty, IntProperty, BoolProperty, FloatProperty, EnumProperty | ||
from bpy.types import PropertyGroup, Panel | ||
|
||
|
||
class PHOTOGRAMMETRY_PG_input_blender(PropertyGroup): | ||
clip = StringProperty(name='Movie Clip') | ||
frame_step = IntProperty(name='Frame Step', description='Number of frames to skip when exporting', default=1) | ||
dirpath = StringProperty(name='Image Directory', subtype='DIR_PATH', default=os.path.join('//renderoutput', 'photogrammetry')) | ||
clip: StringProperty(name='Movie Clip') | ||
frame_step: IntProperty(name='Frame Step', description='Number of frames to skip when exporting', default=1, min=1) | ||
dirpath: StringProperty(name='Image Directory', subtype='DIR_PATH', default=os.path.join('//renderoutput', 'photogrammetry')) | ||
|
||
def draw(self, layout): | ||
layout.prop(self, 'dirpath') | ||
layout.prop_search(self, 'clip', bpy.data, 'movieclips') | ||
layout.prop(self, 'frame_step') | ||
|
||
class PHOTOGRAMMETRY_PG_output_blender(PropertyGroup): | ||
update_render_size: BoolProperty(name='Update render size', description="Update the active scene's render size to the first image size", default=True) | ||
relative_paths: BoolProperty(name='Use relative paths for images', description='When adding background images for cameras, link images using relative paths', default=True) | ||
camera_alpha: FloatProperty(name='Camera Background Alpha', default=0.5, min=0, max=1) | ||
camera_display_depth: EnumProperty(items=[ | ||
('BACK', 'Back', 'Display image behind the 3D objects'), | ||
('FRONT', 'Front', 'Display image in front of the 3D objects'), | ||
], name='Camera Background Display', default='BACK') | ||
|
||
def draw(self, layout): | ||
layout.prop(self, 'update_render_size') | ||
layout.prop(self, 'relative_paths') | ||
layout.prop(self, 'camera_alpha') | ||
layout.prop(self, 'camera_display_depth', expand=True) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters