some minor edits
- script stub printed resource warning with py3.3 (not closing a file). - bmesh customdata layer access had bad docstring. - float/double conversion warnings in sequencer code (use doubles since result is double) - remove unused var
This commit is contained in:
@@ -9,4 +9,6 @@ filename = "my_script.py"
|
|||||||
|
|
||||||
filepath = os.path.join(os.path.dirname(bpy.data.filepath), filename)
|
filepath = os.path.join(os.path.dirname(bpy.data.filepath), filename)
|
||||||
global_namespace = {"__file__": filepath, "__name__": "__main__"}
|
global_namespace = {"__file__": filepath, "__name__": "__main__"}
|
||||||
exec(compile(open(filepath).read(), filepath, 'exec'), global_namespace)
|
file_handle = open(filepath, 'rb')
|
||||||
|
exec(compile(file_handle.read(), filepath, 'exec'), global_namespace)
|
||||||
|
file_handle.close()
|
||||||
|
@@ -1853,11 +1853,11 @@ static ImBuf *input_preprocess(SeqRenderData context, Sequence *seq, float cfra,
|
|||||||
t = *seq->strip->transform;
|
t = *seq->strip->transform;
|
||||||
}
|
}
|
||||||
|
|
||||||
xscale = context.scene->r.xsch ? ((float) context.rectx / (float) context.scene->r.xsch) : 1.0;
|
xscale = context.scene->r.xsch ? ((double)context.rectx / (double)context.scene->r.xsch) : 1.0;
|
||||||
yscale = context.scene->r.ysch ? ((float) context.recty / (float) context.scene->r.ysch) : 1.0;
|
yscale = context.scene->r.ysch ? ((double)context.recty / (double)context.scene->r.ysch) : 1.0;
|
||||||
|
|
||||||
xscale /= (float) context.rectx / ibuf->x;
|
xscale /= (double)context.rectx / (double)ibuf->x;
|
||||||
yscale /= (float) context.recty / ibuf->y;
|
yscale /= (double)context.recty / (double)ibuf->y;
|
||||||
|
|
||||||
c.left *= xscale; c.right *= xscale;
|
c.left *= xscale; c.right *= xscale;
|
||||||
c.top *= yscale; c.bottom *= yscale;
|
c.top *= yscale; c.bottom *= yscale;
|
||||||
@@ -2356,7 +2356,7 @@ static ImBuf *seq_render_scene_strip(SeqRenderData context, Sequence *seq, float
|
|||||||
0 /* (context.scene->r.seq_flag & R_SEQ_GL_REND) */ :
|
0 /* (context.scene->r.seq_flag & R_SEQ_GL_REND) */ :
|
||||||
(context.scene->r.seq_flag & R_SEQ_GL_PREV);
|
(context.scene->r.seq_flag & R_SEQ_GL_PREV);
|
||||||
int do_seq;
|
int do_seq;
|
||||||
int have_seq = FALSE;
|
// int have_seq = FALSE; /* UNUSED */
|
||||||
int have_comp = FALSE;
|
int have_comp = FALSE;
|
||||||
Scene *scene;
|
Scene *scene;
|
||||||
int is_thread_main = BLI_thread_is_main();
|
int is_thread_main = BLI_thread_is_main();
|
||||||
@@ -2369,7 +2369,7 @@ static ImBuf *seq_render_scene_strip(SeqRenderData context, Sequence *seq, float
|
|||||||
scene = seq->scene;
|
scene = seq->scene;
|
||||||
frame = scene->r.sfra + nr + seq->anim_startofs;
|
frame = scene->r.sfra + nr + seq->anim_startofs;
|
||||||
|
|
||||||
have_seq = (scene->r.scemode & R_DOSEQ) && scene->ed && scene->ed->seqbase.first;
|
// have_seq = (scene->r.scemode & R_DOSEQ) && scene->ed && scene->ed->seqbase.first; /* UNUSED */
|
||||||
have_comp = (scene->r.scemode & R_DOCOMP) && scene->use_nodes && scene->nodetree;
|
have_comp = (scene->r.scemode & R_DOCOMP) && scene->use_nodes && scene->nodetree;
|
||||||
|
|
||||||
oldcfra = scene->r.cfra;
|
oldcfra = scene->r.cfra;
|
||||||
|
@@ -546,7 +546,7 @@ static PyObject *bpy_bmloop_link_loop_prev_get(BPy_BMLoop *self)
|
|||||||
|
|
||||||
/* note: use for bmvert/edge/face/loop seq's use these, not bmelemseq directly */
|
/* note: use for bmvert/edge/face/loop seq's use these, not bmelemseq directly */
|
||||||
PyDoc_STRVAR(bpy_bmelemseq_layers_doc,
|
PyDoc_STRVAR(bpy_bmelemseq_layers_doc,
|
||||||
"blah blah (read-only).\n\n:type: :class:`BMLayerAccess`"
|
"custom-data layers (read-only).\n\n:type: :class:`BMLayerAccess`"
|
||||||
);
|
);
|
||||||
static PyObject *bpy_bmelemseq_layers_get(BPy_BMElemSeq *self, void *htype)
|
static PyObject *bpy_bmelemseq_layers_get(BPy_BMElemSeq *self, void *htype)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user