[Bf-codereview] Operator to setup scene for camera tracking (issue 5432048)

sergey.vfx at gmail.com sergey.vfx at gmail.com
Wed Nov 23 13:45:31 CET 2011


Fixed issues in local repo (can't reupload patch because it requires
patch from issue 5431052)


http://codereview.appspot.com/5432048/diff/1/release/scripts/startup/bl_operators/clip.py
File release/scripts/startup/bl_operators/clip.py (right):

http://codereview.appspot.com/5432048/diff/1/release/scripts/startup/bl_operators/clip.py#newcode30
release/scripts/startup/bl_operators/clip.py:30: def
_set_background(space_v3d, clip, user):
Ok, removed

http://codereview.appspot.com/5432048/diff/1/release/scripts/startup/bl_operators/clip.py#newcode353
release/scripts/startup/bl_operators/clip.py:353: sc =
context.space_data
Not sure understand you correct, but now "sc = .." moved above "if" and
"if" replaced with "if sc.type blablabla"

http://codereview.appspot.com/5432048/diff/1/release/scripts/startup/bl_operators/clip.py#newcode403
release/scripts/startup/bl_operators/clip.py:403: # Remove all
constraints to be sure motion is fine
.clear(0 was added in separated patch. Updated this code to use .clear

http://codereview.appspot.com/5432048/diff/1/release/scripts/startup/bl_operators/clip.py#newcode417
release/scripts/startup/bl_operators/clip.py:417: def
_findRenderLayer(self, scene, name):
Indeed. But think i can drop this function then and use
scene.render.layers.get(name) instead.

http://codereview.appspot.com/5432048/diff/1/release/scripts/startup/bl_operators/clip.py#newcode470
release/scripts/startup/bl_operators/clip.py:470: if node.type in
['MOVIECLIP', 'MOVIEDISTORTION']:
Ok

http://codereview.appspot.com/5432048/diff/1/release/scripts/startup/bl_operators/clip.py#newcode479
release/scripts/startup/bl_operators/clip.py:479: b.location[0] += 40
Done

http://codereview.appspot.com/5432048/diff/1/release/scripts/startup/bl_operators/clip.py#newcode497
release/scripts/startup/bl_operators/clip.py:497: while len(tree.links):
Hrm. Think this clear isn't really needed.

http://codereview.appspot.com/5432048/diff/1/release/scripts/startup/bl_operators/clip.py#newcode673
release/scripts/startup/bl_operators/clip.py:673: if ob.type == 'MESH'
and ob.name == 'Ground':
Don't think it'll work. "Ground" is creating by this script and this
check was added to prevent adding it several times. Artist can easily
already have it's own planes before running this script and in this case
ground plane wouldn't be created.
Probably custom properties can be used to distinguish automatically
created objects by script from objects, created by user

http://codereview.appspot.com/5432048/diff/1/release/scripts/startup/bl_operators/clip.py#newcode679
release/scripts/startup/bl_operators/clip.py:679: all_layers = []
One liners.. If you think it's easier to read, then ok :)

http://codereview.appspot.com/5432048/diff/1/release/scripts/startup/bl_operators/clip.py#newcode701
release/scripts/startup/bl_operators/clip.py:701: faces = [[0, 1, 2, 3],
In this case it's not intended to be changed.

http://codereview.appspot.com/5432048/


More information about the Bf-codereview mailing list