svn merge -r41779:41847 ^/trunk/blender
This commit is contained in:
@@ -63,16 +63,16 @@ class CLIP_OT_track_to_empty(Operator):
|
||||
|
||||
constraint.clip = sc.clip
|
||||
constraint.track = track.name
|
||||
constraint.reference = 'TRACK'
|
||||
constraint.use_3d_position = False
|
||||
|
||||
return {'FINISHED'}
|
||||
|
||||
|
||||
class CLIP_OT_bundles_to_mesh(Operator):
|
||||
"""Create vertex cloud using coordinates of bundles"""
|
||||
class CLIP_OT_tracks_to_mesh(Operator):
|
||||
"""Create vertex cloud using coordinates of tracks"""
|
||||
|
||||
bl_idname = "clip.bundles_to_mesh"
|
||||
bl_label = "Bundles to Mesh"
|
||||
bl_idname = "clip.tracks_to_mesh"
|
||||
bl_label = "Tracks to Mesh"
|
||||
bl_options = {'UNDO', 'REGISTER'}
|
||||
|
||||
@classmethod
|
||||
@@ -91,7 +91,7 @@ class CLIP_OT_bundles_to_mesh(Operator):
|
||||
|
||||
new_verts = []
|
||||
|
||||
mesh = bpy.data.meshes.new(name="Bundles")
|
||||
mesh = bpy.data.meshes.new(name="Tracks")
|
||||
for track in clip.tracking.tracks:
|
||||
if track.has_bundle:
|
||||
new_verts.append(track.bundle)
|
||||
@@ -100,7 +100,7 @@ class CLIP_OT_bundles_to_mesh(Operator):
|
||||
mesh.vertices.add(len(new_verts))
|
||||
mesh.vertices.foreach_set("co", unpack_list(new_verts))
|
||||
|
||||
ob = bpy.data.objects.new(name="Bundles", object_data=mesh)
|
||||
ob = bpy.data.objects.new(name="Tracks", object_data=mesh)
|
||||
|
||||
bpy.context.scene.objects.link(ob)
|
||||
|
||||
@@ -252,7 +252,7 @@ class CLIP_OT_constraint_to_fcurve(Operator):
|
||||
if not con:
|
||||
return
|
||||
|
||||
if con.type == 'FOLLOW_TRACK' and con.reference == 'BUNDLE':
|
||||
if con.type == 'FOLLOW_TRACK' and con.use_3d_position:
|
||||
mat = ob.matrix_world.copy()
|
||||
ob.constraints.remove(con)
|
||||
ob.matrix_world = mat
|
||||
|
||||
@@ -418,6 +418,73 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel):
|
||||
row.operator("object.multires_external_save", text="Save External...")
|
||||
row.label()
|
||||
|
||||
def OCEAN(self, layout, ob, md):
|
||||
if not md.is_build_enabled:
|
||||
layout.label("Built without OceanSim modifier")
|
||||
return
|
||||
|
||||
layout.prop(md, "geometry_mode")
|
||||
|
||||
if md.geometry_mode == 'GENERATE':
|
||||
row = layout.row()
|
||||
row.prop(md, "repeat_x")
|
||||
row.prop(md, "repeat_y")
|
||||
|
||||
layout.separator()
|
||||
|
||||
flow = layout.column_flow()
|
||||
flow.prop(md, "time")
|
||||
flow.prop(md, "resolution")
|
||||
flow.prop(md, "spatial_size")
|
||||
flow.prop(md, "depth")
|
||||
|
||||
layout.label("Waves:")
|
||||
|
||||
split = layout.split()
|
||||
|
||||
col = split.column()
|
||||
col.prop(md, "choppiness")
|
||||
col.prop(md, "wave_scale", text="Scale")
|
||||
col.prop(md, "wave_scale_min")
|
||||
col.prop(md, "wind_velocity")
|
||||
|
||||
col = split.column()
|
||||
col.prop(md, "wave_alignment", text="Alignment")
|
||||
sub = col.column()
|
||||
sub.active = md.wave_alignment > 0
|
||||
sub.prop(md, "wave_direction", text="Direction")
|
||||
sub.prop(md, "damping")
|
||||
|
||||
layout.separator()
|
||||
|
||||
layout.prop(md, "use_normals")
|
||||
|
||||
row = layout.row()
|
||||
row.prop(md, "use_foam")
|
||||
sub = row.row()
|
||||
sub.active = md.use_foam
|
||||
sub.prop(md, "foam_coverage", text="Coverage")
|
||||
|
||||
layout.separator()
|
||||
|
||||
if md.is_cached:
|
||||
layout.operator("object.ocean_bake", text="Free Bake").free = True
|
||||
else:
|
||||
layout.operator("object.ocean_bake")
|
||||
|
||||
split = layout.split()
|
||||
split.enabled = not md.is_cached
|
||||
|
||||
col = split.column(align=True)
|
||||
col.prop(md, "frame_start", text="Start")
|
||||
col.prop(md, "frame_end", text="End")
|
||||
|
||||
col = split.column(align=True)
|
||||
col.label(text="Cache path:")
|
||||
col.prop(md, "filepath", text="")
|
||||
|
||||
#col.prop(md, "bake_foam_fade")
|
||||
|
||||
def PARTICLE_INSTANCE(self, layout, ob, md):
|
||||
layout.prop(md, "object")
|
||||
layout.prop(md, "particle_system_index", text="Particle System")
|
||||
|
||||
@@ -754,15 +754,15 @@ class ConstraintButtonsPanel():
|
||||
col.prop(con, "rotation_range", text="Pivot When")
|
||||
|
||||
def FOLLOW_TRACK(self, context, layout, con):
|
||||
layout.prop(con, "use_active_clip")
|
||||
row = layout.row()
|
||||
row.prop(con, "use_active_clip")
|
||||
row.prop(con, "use_3d_position")
|
||||
|
||||
if not con.use_active_clip:
|
||||
layout.prop(con, "clip")
|
||||
|
||||
layout.prop(con, "track")
|
||||
|
||||
layout.row().prop(con, "reference", expand=True)
|
||||
|
||||
layout.operator("clip.constraint_to_fcurve")
|
||||
|
||||
def CAMERA_SOLVER(self, context, layout, con):
|
||||
|
||||
@@ -99,8 +99,8 @@ class PHYSICS_PT_dynamic_paint(PhysicButtonsPanel, Panel):
|
||||
split = layout.split()
|
||||
|
||||
col = split.column()
|
||||
col.prop(brush, "absolute_alpha")
|
||||
col.prop(brush, "paint_erase")
|
||||
col.prop(brush, "use_absolute_alpha")
|
||||
col.prop(brush, "use_paint_erase")
|
||||
col.prop(brush, "paint_wetness", text="Wetness")
|
||||
|
||||
col = split.column()
|
||||
@@ -168,7 +168,7 @@ class PHYSICS_PT_dp_advanced_canvas(PhysicButtonsPanel, Panel):
|
||||
row.prop(surface, "displace_factor")
|
||||
|
||||
elif surface_type == 'WAVE':
|
||||
layout.prop(surface, "wave_open_borders")
|
||||
layout.prop(surface, "use_wave_open_border")
|
||||
|
||||
split = layout.split()
|
||||
|
||||
@@ -213,33 +213,33 @@ class PHYSICS_PT_dp_canvas_output(PhysicButtonsPanel, Panel):
|
||||
|
||||
# paintmap output
|
||||
row = layout.row()
|
||||
row.prop_search(surface, "output_name", ob.data, "vertex_colors", text="Paintmap layer: ")
|
||||
row.prop_search(surface, "output_name_a", ob.data, "vertex_colors", text="Paintmap layer: ")
|
||||
if surface.output_exists(object=ob, index=0):
|
||||
ic = 'ZOOMOUT'
|
||||
else:
|
||||
ic = 'ZOOMIN'
|
||||
|
||||
row.operator("dpaint.output_toggle", icon=ic, text="").index = 0
|
||||
row.operator("dpaint.output_toggle", icon=ic, text="").output = 'A'
|
||||
|
||||
# wetmap output
|
||||
row = layout.row()
|
||||
row.prop_search(surface, "output_name2", ob.data, "vertex_colors", text="Wetmap layer: ")
|
||||
row.prop_search(surface, "output_name_b", ob.data, "vertex_colors", text="Wetmap layer: ")
|
||||
if surface.output_exists(object=ob, index=1):
|
||||
ic = 'ZOOMOUT'
|
||||
else:
|
||||
ic = 'ZOOMIN'
|
||||
|
||||
row.operator("dpaint.output_toggle", icon=ic, text="").index = 1
|
||||
row.operator("dpaint.output_toggle", icon=ic, text="").output = 'B'
|
||||
|
||||
elif surface_type == 'WEIGHT':
|
||||
row = layout.row()
|
||||
row.prop_search(surface, "output_name", ob, "vertex_groups", text="Vertex Group: ")
|
||||
row.prop_search(surface, "output_name_a", ob, "vertex_groups", text="Vertex Group: ")
|
||||
if surface.output_exists(object=ob, index=0):
|
||||
ic = 'ZOOMOUT'
|
||||
else:
|
||||
ic = 'ZOOMIN'
|
||||
|
||||
row.operator("dpaint.output_toggle", icon=ic, text="").index = 0
|
||||
row.operator("dpaint.output_toggle", icon=ic, text="").output = 'A'
|
||||
|
||||
# image format outputs
|
||||
if surface.surface_format == 'IMAGE':
|
||||
@@ -250,23 +250,23 @@ class PHYSICS_PT_dp_canvas_output(PhysicButtonsPanel, Panel):
|
||||
layout.prop(surface, "image_output_path", text="")
|
||||
row = layout.row()
|
||||
row.prop(surface, "image_fileformat", text="")
|
||||
row.prop(surface, "premultiply", text="Premultiply alpha")
|
||||
row.prop(surface, "use_premultiply", text="Premultiply alpha")
|
||||
|
||||
if surface_type == 'PAINT':
|
||||
split = layout.split(percentage=0.4)
|
||||
split.prop(surface, "do_output1", text="Paintmaps:")
|
||||
split.prop(surface, "use_output_a", text="Paintmaps:")
|
||||
sub = split.row()
|
||||
sub.active = surface.do_output1
|
||||
sub.prop(surface, "output_name", text="")
|
||||
sub.active = surface.use_output_a
|
||||
sub.prop(surface, "output_name_a", text="")
|
||||
|
||||
split = layout.split(percentage=0.4)
|
||||
split.prop(surface, "do_output2", text="Wetmaps:")
|
||||
split.prop(surface, "do_output_b", text="Wetmaps:")
|
||||
sub = split.row()
|
||||
sub.active = surface.do_output2
|
||||
sub.prop(surface, "output_name2", text="")
|
||||
sub.active = surface.do_output_b
|
||||
sub.prop(surface, "output_name_b", text="")
|
||||
else:
|
||||
col = layout.column()
|
||||
col.prop(surface, "output_name", text="Filename: ")
|
||||
col.prop(surface, "output_name_a", text="Filename: ")
|
||||
if surface_type == 'DISPLACE':
|
||||
col.prop(surface, "displace_type", text="Displace Type")
|
||||
col.prop(surface, "depth_clamp")
|
||||
@@ -367,7 +367,7 @@ class PHYSICS_PT_dp_cache(PhysicButtonsPanel, Panel):
|
||||
md.ui_type == 'CANVAS' and
|
||||
md.canvas_settings and
|
||||
md.canvas_settings.canvas_surfaces.active and
|
||||
md.canvas_settings.canvas_surfaces.active.uses_cache)
|
||||
md.canvas_settings.canvas_surfaces.active.is_cache_user)
|
||||
|
||||
def draw(self, context):
|
||||
layout = self.layout
|
||||
@@ -411,21 +411,21 @@ class PHYSICS_PT_dp_brush_source(PhysicButtonsPanel, Panel):
|
||||
split = layout.row().split(percentage=0.4)
|
||||
sub = split.column()
|
||||
if brush.paint_source == 'DISTANCE':
|
||||
sub.prop(brush, "proximity_project")
|
||||
sub.prop(brush, "use_proximity_project")
|
||||
elif brush.paint_source == 'VOLUME_DISTANCE':
|
||||
sub.prop(brush, "proximity_inverse")
|
||||
sub.prop(brush, "negate_volume")
|
||||
sub.prop(brush, "invert_proximity")
|
||||
sub.prop(brush, "use_negative_volume")
|
||||
|
||||
sub = split.column()
|
||||
if brush.paint_source == 'DISTANCE':
|
||||
column = sub.column()
|
||||
column.active = brush.proximity_project
|
||||
column.active = brush.use_proximity_project
|
||||
column.prop(brush, "ray_direction")
|
||||
sub.prop(brush, "proximity_falloff")
|
||||
if brush.proximity_falloff == 'RAMP':
|
||||
col = layout.row().column()
|
||||
col.separator()
|
||||
col.prop(brush, "proximity_ramp_alpha", text="Only Use Alpha")
|
||||
col.prop(brush, "use_proximity_ramp_alpha", text="Only Use Alpha")
|
||||
col.template_color_ramp(brush, "paint_ramp", expand=True)
|
||||
|
||||
|
||||
@@ -447,21 +447,21 @@ class PHYSICS_PT_dp_brush_velocity(PhysicButtonsPanel, Panel):
|
||||
split = layout.split()
|
||||
|
||||
col = split.column()
|
||||
col.prop(brush, "velocity_alpha")
|
||||
col.prop(brush, "velocity_color")
|
||||
col.prop(brush, "use_velocity_alpha")
|
||||
col.prop(brush, "use_velocity_color")
|
||||
|
||||
split.prop(brush, "velocity_depth")
|
||||
split.prop(brush, "use_velocity_depth")
|
||||
|
||||
col = layout.column()
|
||||
col.active = (brush.velocity_alpha or brush.velocity_color or brush.velocity_depth)
|
||||
col.prop(brush, "max_velocity")
|
||||
col.active = (brush.use_velocity_alpha or brush.use_velocity_color or brush.use_velocity_depth)
|
||||
col.prop(brush, "velocity_max")
|
||||
col.template_color_ramp(brush, "velocity_ramp", expand=True)
|
||||
layout.separator()
|
||||
|
||||
row = layout.row()
|
||||
row.prop(brush, "do_smudge")
|
||||
row.prop(brush, "use_smudge")
|
||||
sub = row.row()
|
||||
sub.active = brush.do_smudge
|
||||
sub.active = brush.use_smudge
|
||||
sub.prop(brush, "smudge_strength")
|
||||
|
||||
|
||||
|
||||
@@ -774,6 +774,22 @@ class TEXTURE_PT_pointdensity_turbulence(TextureButtonsPanel, Panel):
|
||||
col.prop(pd, "turbulence_strength")
|
||||
|
||||
|
||||
class TEXTURE_PT_ocean(TextureTypePanel, Panel):
|
||||
bl_label = "Ocean"
|
||||
tex_type = 'OCEAN'
|
||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
|
||||
|
||||
def draw(self, context):
|
||||
layout = self.layout
|
||||
|
||||
tex = context.texture
|
||||
ot = tex.ocean
|
||||
|
||||
col = layout.column()
|
||||
col.prop(ot, "ocean_object")
|
||||
col.prop(ot, "output")
|
||||
|
||||
|
||||
class TEXTURE_PT_mapping(TextureSlotPanel, Panel):
|
||||
bl_label = "Mapping"
|
||||
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
|
||||
|
||||
@@ -161,6 +161,10 @@ class CLIP_PT_tools_solving(Panel):
|
||||
col.prop(settings, "keyframe_a")
|
||||
col.prop(settings, "keyframe_b")
|
||||
|
||||
col = layout.column(align=True)
|
||||
col.label(text="Refine:")
|
||||
col.prop(settings, "refine_intrinsics", text="")
|
||||
|
||||
|
||||
class CLIP_PT_tools_cleanup(Panel):
|
||||
bl_space_type = 'CLIP_EDITOR'
|
||||
@@ -201,7 +205,7 @@ class CLIP_PT_tools_geometry(Panel):
|
||||
def draw(self, context):
|
||||
layout = self.layout
|
||||
|
||||
layout.operator("clip.bundles_to_mesh")
|
||||
layout.operator("clip.tracks_to_mesh")
|
||||
layout.operator("clip.track_to_empty")
|
||||
|
||||
|
||||
@@ -223,7 +227,6 @@ class CLIP_PT_tools_orientation(Panel):
|
||||
settings = sc.clip.tracking.settings
|
||||
|
||||
col = layout.column(align=True)
|
||||
col.label(text="Scene Orientation:")
|
||||
col.operator("clip.set_floor")
|
||||
col.operator("clip.set_origin")
|
||||
|
||||
@@ -367,7 +370,7 @@ class CLIP_PT_tracking_camera(Panel):
|
||||
col.prop(clip.tracking.camera, "pixel_aspect")
|
||||
|
||||
col = layout.column()
|
||||
col.label(text="Principal Point")
|
||||
col.label(text="Optical Center:")
|
||||
row = col.row()
|
||||
row.prop(clip.tracking.camera, "principal", text="")
|
||||
col.operator("clip.set_center_principal", text="Center")
|
||||
@@ -765,7 +768,7 @@ class CLIP_MT_reconstruction(Menu):
|
||||
layout.separator()
|
||||
|
||||
layout.operator("clip.track_to_empty")
|
||||
layout.operator("clip.bundles_to_mesh")
|
||||
layout.operator("clip.tracks_to_mesh")
|
||||
|
||||
|
||||
class CLIP_MT_track_visibility(Menu):
|
||||
|
||||
@@ -765,10 +765,9 @@ class USERPREF_MT_ndof_settings(Menu):
|
||||
layout.label(text="Orbit options")
|
||||
if input_prefs.view_rotate_method == 'TRACKBALL':
|
||||
layout.prop(input_prefs, "ndof_roll_invert_axis")
|
||||
layout.prop(input_prefs, "ndof_tilt_invert_axis")
|
||||
layout.prop(input_prefs, "ndof_rotate_invert_axis")
|
||||
else:
|
||||
layout.prop(input_prefs, "ndof_orbit_invert_axes")
|
||||
layout.prop(input_prefs, "ndof_tilt_invert_axis")
|
||||
layout.prop(input_prefs, "ndof_rotate_invert_axis")
|
||||
layout.prop(input_prefs, "ndof_zoom_invert")
|
||||
|
||||
layout.separator()
|
||||
layout.label(text="Pan options")
|
||||
@@ -776,6 +775,9 @@ class USERPREF_MT_ndof_settings(Menu):
|
||||
layout.prop(input_prefs, "ndof_pany_invert_axis")
|
||||
layout.prop(input_prefs, "ndof_panz_invert_axis")
|
||||
|
||||
layout.label(text="Zoom options")
|
||||
layout.prop(input_prefs, "ndof_zoom_updown")
|
||||
|
||||
layout.separator()
|
||||
layout.label(text="Fly options")
|
||||
layout.prop(input_prefs, "ndof_fly_helicopter", icon='NDOF_FLY')
|
||||
|
||||
@@ -366,6 +366,7 @@ class VIEW3D_MT_view_align(Menu):
|
||||
|
||||
layout.operator("view3d.view_all", text="Center Cursor and View All").center = True
|
||||
layout.operator("view3d.camera_to_view", text="Align Active Camera to View")
|
||||
layout.operator("view3d.camera_to_view_selected", text="Align Active Camera to Selected")
|
||||
layout.operator("view3d.view_selected")
|
||||
layout.operator("view3d.view_center_cursor")
|
||||
|
||||
@@ -2169,16 +2170,6 @@ class VIEW3D_PT_view3d_display(Panel):
|
||||
|
||||
layout.separator()
|
||||
|
||||
layout.prop(view, "show_reconstruction")
|
||||
if view.show_reconstruction:
|
||||
layout.label(text="Bundle type:")
|
||||
layout.prop(view, "bundle_draw_type", text="")
|
||||
layout.prop(view, "bundle_draw_size")
|
||||
layout.prop(view, "show_bundle_name")
|
||||
layout.prop(view, "show_camera_path")
|
||||
|
||||
layout.separator()
|
||||
|
||||
region = view.region_quadview
|
||||
|
||||
layout.operator("screen.region_quadview", text="Toggle Quad View")
|
||||
@@ -2194,6 +2185,37 @@ class VIEW3D_PT_view3d_display(Panel):
|
||||
row.prop(region, "use_box_clip")
|
||||
|
||||
|
||||
class VIEW3D_PT_view3d_motion_tracking(Panel):
|
||||
bl_space_type = 'VIEW_3D'
|
||||
bl_region_type = 'UI'
|
||||
bl_label = "Motion Tracking"
|
||||
bl_options = {'DEFAULT_CLOSED'}
|
||||
|
||||
@classmethod
|
||||
def poll(cls, context):
|
||||
view = context.space_data
|
||||
return (view)
|
||||
|
||||
def draw_header(self, context):
|
||||
layout = self.layout
|
||||
view = context.space_data
|
||||
|
||||
layout.prop(view, "show_reconstruction", text="")
|
||||
|
||||
def draw(self, context):
|
||||
layout = self.layout
|
||||
|
||||
view = context.space_data
|
||||
|
||||
col = layout.column()
|
||||
col.active = view.show_reconstruction
|
||||
col.prop(view, "show_tracks_name", text="Show Names")
|
||||
col.prop(view, "show_camera_path")
|
||||
col.label(text="Tracks:")
|
||||
col.prop(view, "tracks_draw_type", text="")
|
||||
col.prop(view, "tracks_draw_size", text="Size")
|
||||
|
||||
|
||||
class VIEW3D_PT_view3d_meshdisplay(Panel):
|
||||
bl_space_type = 'VIEW_3D'
|
||||
bl_region_type = 'UI'
|
||||
|
||||
Reference in New Issue
Block a user