Fix for Setup Tracking Scene operator

- Ported to new node add operator
- Alpha mode shall be set to Transparent
This commit is contained in:
Sergey Sharybin 2013-04-11 13:25:05 +00:00
parent 6569ab813f
commit c6606986cc

@ -576,25 +576,25 @@ class CLIP_OT_setup_tracking_scene(Operator):
need_stabilization = False
# create nodes
rlayer_fg = self._findOrCreateNode(tree, 'R_LAYERS')
rlayer_bg = tree.nodes.new(type='R_LAYERS')
composite = self._findOrCreateNode(tree, 'COMPOSITE')
rlayer_fg = self._findOrCreateNode(tree, 'CompositorNodeRLayers')
rlayer_bg = tree.nodes.new(type='CompositorNodeRLayers')
composite = self._findOrCreateNode(tree, 'CompositorNodeComposite')
movieclip = tree.nodes.new(type='MOVIECLIP')
distortion = tree.nodes.new(type='MOVIEDISTORTION')
movieclip = tree.nodes.new(type='CompositorNodeMovieClip')
distortion = tree.nodes.new(type='CompositorNodeMovieDistortion')
if need_stabilization:
stabilize = tree.nodes.new(type='STABILIZE2D')
stabilize = tree.nodes.new(type='CompositorNodeStabilize2D')
scale = tree.nodes.new(type='SCALE')
invert = tree.nodes.new(type='INVERT')
add_ao = tree.nodes.new(type='MIX_RGB')
add_shadow = tree.nodes.new(type='MIX_RGB')
mul_shadow = tree.nodes.new(type='MIX_RGB')
mul_image = tree.nodes.new(type='MIX_RGB')
vector_blur = tree.nodes.new(type='VECBLUR')
alphaover = tree.nodes.new(type='ALPHAOVER')
viewer = tree.nodes.new(type='VIEWER')
scale = tree.nodes.new(type='CompositorNodeScale')
invert = tree.nodes.new(type='CompositorNodeInvert')
add_ao = tree.nodes.new(type='CompositorNodeMixRGB')
add_shadow = tree.nodes.new(type='CompositorNodeMixRGB')
mul_shadow = tree.nodes.new(type='CompositorNodeMixRGB')
mul_image = tree.nodes.new(type='CompositorNodeMixRGB')
vector_blur = tree.nodes.new(type='CompositorNodeVecBlur')
alphaover = tree.nodes.new(type='CompositorNodeAlphaOver')
viewer = tree.nodes.new(type='CompositorNodeViewer')
# setup nodes
movieclip.clip = clip
@ -712,6 +712,8 @@ class CLIP_OT_setup_tracking_scene(Operator):
# ensure no nodes were creates on position of existing node
self._offsetNodes(tree)
scene.render.alpha_mode = 'TRANSPARENT'
@staticmethod
def _createMesh(scene, name, vertices, faces):
from bpy_extras.io_utils import unpack_list