Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(2114)

Issue 5432048: Operator to setup scene for camera tracking (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
12 years, 5 months ago by sergey.vfx
Modified:
10 years, 7 months ago
Reviewers:
ideasman42, bf-codereview
Base URL:
https://svn.blender.org/svnroot/bf-blender/trunk/blender/
Visibility:
Public.

Description

This patch implements button called "Setup Tracking Scene". This button makes the following: - Sets background to 3d viewports - Makes camera be following solved camera (adds Camera Sovle constraint) - Set ups render layers (foreground and background) - Places sample objects into scene - Makes nodes setup Probably it can be cleaned up or simplified/optimized in some places. P.S. There are some small improvements planned, but they aren't large and prefer to start reviewing patch sooner.

Patch Set 1 #

Total comments: 26
Unified diffs Side-by-side diffs Delta from patch set Stats (+459 lines, -31 lines) Patch
release/scripts/startup/bl_operators/clip.py View 5 chunks +458 lines, -31 lines 26 comments Download
release/scripts/startup/bl_ui/space_clip.py View 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 4
sergey.vfx
12 years, 5 months ago (2011-11-22 14:11:08 UTC) #1
ideasman42
suggested edits for patch. 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): dont ...
12 years, 5 months ago (2011-11-22 14:36:08 UTC) #2
sergey.vfx
Fixed issues in local repo (can't reupload patch because it requires patch from issue 5431052) ...
12 years, 5 months ago (2011-11-23 12:45:31 UTC) #3
ideasman42
12 years, 5 months ago (2011-11-23 13:05:39 UTC) #4
a few replies for remaining issues.

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

http://codereview.appspot.com/5432048/diff/1/release/scripts/startup/bl_opera...
release/scripts/startup/bl_operators/clip.py:353: sc = context.space_data
On 2011/11/23 12:45:31, sergey.vfx wrote:
> Not sure understand you correct, but now "sc = .." moved above "if" and "if"
> replaced with "if sc.type blablabla"

Done.

http://codereview.appspot.com/5432048/diff/1/release/scripts/startup/bl_opera...
release/scripts/startup/bl_operators/clip.py:417: def _findRenderLayer(self,
scene, name):
On 2011/11/23 12:45:31, sergey.vfx wrote:
> Indeed. But think i can drop this function then and use
> scene.render.layers.get(name) instead.

Im not fussed if this function is simplified or replaced with
scene.render.layers.get, IMHO either is ok.

http://codereview.appspot.com/5432048/diff/1/release/scripts/startup/bl_opera...
release/scripts/startup/bl_operators/clip.py:497: while len(tree.links):
On 2011/11/23 12:45:31, sergey.vfx wrote:
> Hrm. Think this clear isn't really needed.

ok

http://codereview.appspot.com/5432048/diff/1/release/scripts/startup/bl_opera...
release/scripts/startup/bl_operators/clip.py:673: if ob.type == 'MESH' and
ob.name == 'Ground':
On 2011/11/23 12:45:31, sergey.vfx wrote:
> 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

agree, in that case tagging an object as being ground makes more sense though we
don't really have a precedent here.

obj["is_ground"] = True  # ?, maybe something like this.

http://codereview.appspot.com/5432048/diff/1/release/scripts/startup/bl_opera...
release/scripts/startup/bl_operators/clip.py:679: all_layers = []
On 2011/11/23 12:45:31, sergey.vfx wrote:
> One liners.. If you think it's easier to read, then ok :)

eeh, this is a bit subjective, I like LC's and this seems an appropriate use to
me, but some people complained about my code using LC's too much.

reminds me, would be nice to have boolean op support on boolean arrays so you
could just do (layers_a & layers_b) but thats for later.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b