Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2011-11-22 15:51:42 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-11-22 15:51:42 +0400
commitf9e00b5c99ba8dfc5bf19a59ab73d8be8f125bf3 (patch)
treecea447f44b698dcf9a69fc45db887dce638aa89e /source
parent33e74e9f938bc4e8a733b82c33b9a1113dfb5904 (diff)
parentfd742566a62151c1f2ed1f009782fc8a881fbf5a (diff)
svn merge ^/trunk/blender -r42009:42053
Diffstat (limited to 'source')
-rw-r--r--source/blender/blenkernel/BKE_image.h21
-rw-r--r--source/blender/blenkernel/BKE_node.h48
-rw-r--r--source/blender/blenkernel/BKE_writeavi.h2
-rw-r--r--source/blender/blenkernel/intern/bmfont.c2
-rw-r--r--source/blender/blenkernel/intern/dynamicpaint.c8
-rw-r--r--source/blender/blenkernel/intern/image.c252
-rw-r--r--source/blender/blenkernel/intern/movieclip.c4
-rw-r--r--source/blender/blenkernel/intern/node.c432
-rw-r--r--source/blender/blenkernel/intern/ocean.c22
-rw-r--r--source/blender/blenkernel/intern/scene.c8
-rw-r--r--source/blender/blenkernel/intern/sequencer.c6
-rw-r--r--source/blender/blenkernel/intern/subsurf_ccg.c71
-rw-r--r--source/blender/blenkernel/intern/tracking.c32
-rw-r--r--source/blender/blenkernel/intern/writeavi.c16
-rw-r--r--source/blender/blenkernel/intern/writeffmpeg.c8
-rw-r--r--source/blender/blenlib/BLI_string_utf8.h1
-rw-r--r--source/blender/blenlib/intern/path_util.c20
-rw-r--r--source/blender/blenlib/intern/string_utf8.c44
-rw-r--r--source/blender/blenloader/intern/readfile.c67
-rw-r--r--source/blender/editors/include/UI_interface.h5
-rw-r--r--source/blender/editors/interface/interface_layout.c2
-rw-r--r--source/blender/editors/interface/interface_regions.c2
-rw-r--r--source/blender/editors/interface/interface_utils.c4
-rw-r--r--source/blender/editors/mesh/loopcut.c26
-rw-r--r--source/blender/editors/object/object_bake.c2
-rw-r--r--source/blender/editors/object/object_edit.c24
-rw-r--r--source/blender/editors/render/render_internal.c4
-rw-r--r--source/blender/editors/render/render_opengl.c24
-rw-r--r--source/blender/editors/render/render_shading.c6
-rw-r--r--source/blender/editors/screen/screendump.c14
-rw-r--r--source/blender/editors/sculpt_paint/paint_image.c2
-rw-r--r--source/blender/editors/sound/sound_ops.c2
-rw-r--r--source/blender/editors/space_clip/clip_buttons.c18
-rw-r--r--source/blender/editors/space_file/file_panels.c2
-rw-r--r--source/blender/editors/space_image/image_buttons.c78
-rw-r--r--source/blender/editors/space_image/image_ops.c210
-rw-r--r--source/blender/editors/space_node/drawnode.c22
-rw-r--r--source/blender/editors/space_node/node_draw.c49
-rw-r--r--source/blender/editors/space_node/node_edit.c3
-rw-r--r--source/blender/editors/space_view3d/drawobject.c30
-rw-r--r--source/blender/gpu/CMakeLists.txt2
-rw-r--r--source/blender/gpu/GPU_material.h2
-rw-r--r--source/blender/gpu/SConscript2
-rw-r--r--source/blender/gpu/intern/gpu_codegen.c27
-rw-r--r--source/blender/gpu/intern/gpu_shader_material.glsl20
-rw-r--r--source/blender/gpu/intern/gpu_shader_material.glsl.c458
-rw-r--r--source/blender/imbuf/IMB_imbuf_types.h2
-rw-r--r--source/blender/imbuf/intern/IMB_anim.h2
-rw-r--r--source/blender/imbuf/intern/IMB_filter.h4
-rw-r--r--source/blender/imbuf/intern/allocimbuf.c8
-rw-r--r--source/blender/imbuf/intern/anim_movie.c129
-rw-r--r--source/blender/imbuf/intern/filter.c20
-rw-r--r--source/blender/imbuf/intern/imbuf_cocoa.m2
-rw-r--r--source/blender/imbuf/intern/iris.c6
-rw-r--r--source/blender/imbuf/intern/jp2.c10
-rw-r--r--source/blender/imbuf/intern/jpeg.c4
-rw-r--r--source/blender/imbuf/intern/openexr/openexr_api.cpp8
-rw-r--r--source/blender/imbuf/intern/png.c2
-rw-r--r--source/blender/imbuf/intern/scaling.c10
-rw-r--r--source/blender/imbuf/intern/targa.c20
-rw-r--r--source/blender/imbuf/intern/thumbs.c2
-rw-r--r--source/blender/imbuf/intern/tiff.c4
-rw-r--r--source/blender/makesdna/DNA_node_types.h3
-rw-r--r--source/blender/makesdna/DNA_scene_types.h169
-rw-r--r--source/blender/makesrna/RNA_access.h1
-rw-r--r--source/blender/makesrna/RNA_enum_types.h1
-rw-r--r--source/blender/makesrna/intern/rna_armature.c6
-rw-r--r--source/blender/makesrna/intern/rna_brush.c12
-rw-r--r--source/blender/makesrna/intern/rna_define.c3
-rw-r--r--source/blender/makesrna/intern/rna_fcurve.c22
-rw-r--r--source/blender/makesrna/intern/rna_fluidsim.c32
-rw-r--r--source/blender/makesrna/intern/rna_image.c10
-rw-r--r--source/blender/makesrna/intern/rna_image_api.c8
-rw-r--r--source/blender/makesrna/intern/rna_nodetree.c51
-rw-r--r--source/blender/makesrna/intern/rna_property.c2
-rw-r--r--source/blender/makesrna/intern/rna_scene.c540
-rw-r--r--source/blender/makesrna/intern/rna_scene_api.c4
-rw-r--r--source/blender/makesrna/intern/rna_space.c6
-rw-r--r--source/blender/makesrna/intern/rna_texture_api.c2
-rw-r--r--source/blender/makesrna/intern/rna_ui_api.c8
-rw-r--r--source/blender/makesrna/intern/rna_userdef.c2
-rw-r--r--source/blender/modifiers/intern/MOD_fluidsim_util.c2
-rw-r--r--source/blender/modifiers/intern/MOD_ocean.c7
-rw-r--r--source/blender/nodes/NOD_composite.h158
-rw-r--r--source/blender/nodes/NOD_shader.h114
-rw-r--r--source/blender/nodes/NOD_texture.h72
-rw-r--r--source/blender/nodes/composite/node_composite_tree.c15
-rw-r--r--source/blender/nodes/composite/node_composite_util.c55
-rw-r--r--source/blender/nodes/composite/node_composite_util.h2
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_alphaOver.c9
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_bilateralblur.c7
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_blur.c9
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_brightness.c7
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_channelMatte.c6
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_chromaMatte.c9
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_colorMatte.c9
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_colorSpill.c6
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_colorbalance.c8
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_common.c27
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_composite.c9
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_crop.c7
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_curves.c21
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_defocus.c9
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_diffMatte.c9
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_dilate.c8
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_directionalblur.c7
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_displace.c8
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_distanceMatte.c9
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_filter.c9
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_flip.c9
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_gamma.c6
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_glare.c7
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_hueSatVal.c9
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_huecorrect.c8
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_idMask.c9
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_image.c15
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_invert.c7
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_lensdist.c7
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_levels.c8
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_lummaMatte.c8
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_mapUV.c9
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_mapValue.c10
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_math.c10
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_mixrgb.c7
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_movieclip.c6
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_moviedistortion.c6
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_normal.c8
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_normalize.c6
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_outputFile.c22
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_premulkey.c8
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_rgb.c9
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_rotate.c7
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_scale.c13
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_sepcombHSVA.c15
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_sepcombRGBA.c14
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_sepcombYCCA.c15
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_sepcombYUVA.c14
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_setalpha.c7
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_splitViewer.c13
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_stabilize2d.c6
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_texture.c9
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_tonemap.c7
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_transform.c8
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_translate.c8
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_valToRgb.c12
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_value.c8
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_vecBlur.c8
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_viewer.c8
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_zcombine.c7
-rw-r--r--source/blender/nodes/intern/node_common.c6
-rw-r--r--source/blender/nodes/intern/node_exec.c16
-rw-r--r--source/blender/nodes/intern/node_util.c61
-rw-r--r--source/blender/nodes/intern/node_util.h11
-rw-r--r--source/blender/nodes/shader/node_shader_tree.c6
-rw-r--r--source/blender/nodes/shader/node_shader_util.c63
-rw-r--r--source/blender/nodes/shader/node_shader_util.h3
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_add_shader.c9
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_attribute.c7
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_background.c9
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_bsdf_anisotropic.c9
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_bsdf_diffuse.c9
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_bsdf_glass.c9
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_bsdf_glossy.c9
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_bsdf_translucent.c9
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_bsdf_transparent.c9
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_bsdf_velvet.c9
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_camera.c8
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_common.c18
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_curves.c13
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_dynamic.c14
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_emission.c9
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_fresnel.c9
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_geom.c7
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_geometry.c9
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_holdout.c9
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_hueSatVal.c9
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_invert.c8
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_layer_weight.c9
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_light_path.c9
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_mapping.c6
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_material.c14
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_math.c8
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_mixRgb.c7
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_mix_shader.c9
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_normal.c6
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_output.c12
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_output_lamp.c11
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_output_material.c11
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_output_world.c11
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_rgb.c7
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_sepcombRGB.c13
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_squeeze.c8
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_tex_coord.c9
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_tex_environment.c9
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_tex_gradient.c9
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_tex_image.c9
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_tex_magic.c9
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_tex_musgrave.c9
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_tex_noise.c9
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_tex_sky.c9
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_tex_voronoi.c9
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_tex_wave.c7
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_texture.c8
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_valToRgb.c14
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_value.c8
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_vectMath.c8
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_volume_isotropic.c9
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_volume_transparent.c9
-rw-r--r--source/blender/nodes/texture/node_texture_tree.c6
-rw-r--r--source/blender/nodes/texture/node_texture_util.c92
-rw-r--r--source/blender/nodes/texture/node_texture_util.h2
-rw-r--r--source/blender/nodes/texture/nodes/node_texture_at.c6
-rw-r--r--source/blender/nodes/texture/nodes/node_texture_bricks.c6
-rw-r--r--source/blender/nodes/texture/nodes/node_texture_checker.c6
-rw-r--r--source/blender/nodes/texture/nodes/node_texture_common.c18
-rw-r--r--source/blender/nodes/texture/nodes/node_texture_compose.c6
-rw-r--r--source/blender/nodes/texture/nodes/node_texture_coord.c6
-rw-r--r--source/blender/nodes/texture/nodes/node_texture_curves.c13
-rw-r--r--source/blender/nodes/texture/nodes/node_texture_decompose.c6
-rw-r--r--source/blender/nodes/texture/nodes/node_texture_distance.c6
-rw-r--r--source/blender/nodes/texture/nodes/node_texture_hueSatVal.c6
-rw-r--r--source/blender/nodes/texture/nodes/node_texture_image.c6
-rw-r--r--source/blender/nodes/texture/nodes/node_texture_invert.c7
-rw-r--r--source/blender/nodes/texture/nodes/node_texture_math.c7
-rw-r--r--source/blender/nodes/texture/nodes/node_texture_mixRgb.c6
-rw-r--r--source/blender/nodes/texture/nodes/node_texture_output.c9
-rw-r--r--source/blender/nodes/texture/nodes/node_texture_proc.c6
-rw-r--r--source/blender/nodes/texture/nodes/node_texture_rotate.c6
-rw-r--r--source/blender/nodes/texture/nodes/node_texture_scale.c6
-rw-r--r--source/blender/nodes/texture/nodes/node_texture_texture.c6
-rw-r--r--source/blender/nodes/texture/nodes/node_texture_translate.c6
-rw-r--r--source/blender/nodes/texture/nodes/node_texture_valToNor.c6
-rw-r--r--source/blender/nodes/texture/nodes/node_texture_valToRgb.c13
-rw-r--r--source/blender/nodes/texture/nodes/node_texture_viewer.c9
-rw-r--r--source/blender/quicktime/apple/qtkit_export.m2
-rw-r--r--source/blender/quicktime/apple/quicktime_export.c2
-rw-r--r--source/blender/render/extern/include/RE_pipeline.h2
-rw-r--r--source/blender/render/intern/source/pipeline.c53
-rw-r--r--source/blender/render/intern/source/rendercore.c8
-rw-r--r--source/blender/windowmanager/intern/wm_keymap.c2
-rw-r--r--source/blenderplayer/bad_level_call_stubs/stubs.c3
-rw-r--r--source/creator/creator.c51
-rw-r--r--source/gameengine/BlenderRoutines/KX_BlenderGL.cpp2
-rw-r--r--source/gameengine/GamePlayer/common/bmfont.cpp2
244 files changed, 2993 insertions, 2268 deletions
diff --git a/source/blender/blenkernel/BKE_image.h b/source/blender/blenkernel/BKE_image.h
index a3e0b5b6d5a..7233f9570f9 100644
--- a/source/blender/blenkernel/BKE_image.h
+++ b/source/blender/blenkernel/BKE_image.h
@@ -43,6 +43,7 @@ struct Tex;
struct anim;
struct Scene;
struct Object;
+struct ImageFormatData;
/* call from library */
void free_image(struct Image *me);
@@ -50,13 +51,19 @@ void free_image(struct Image *me);
void BKE_stamp_info(struct Scene *scene, struct Object *camera, struct ImBuf *ibuf);
void BKE_stamp_buf(struct Scene *scene, struct Object *camera, unsigned char *rect, float *rectf, int width, int height, int channels);
int BKE_alphatest_ibuf(struct ImBuf *ibuf);
-int BKE_write_ibuf_stamp(struct Scene *scene, struct Object *camera, struct ImBuf *ibuf, const char *name, int imtype, int subimtype, int quality);
-int BKE_write_ibuf(struct ImBuf *ibuf, const char *name, int imtype, int subimtype, int quality);
-void BKE_makepicstring(char *string, const char *base, const char *relbase, int frame, int imtype, const short use_ext, const short use_frames);
-int BKE_add_image_extension(char *string, int imtype);
-int BKE_ftype_to_imtype(int ftype);
-int BKE_imtype_to_ftype(int imtype);
-int BKE_imtype_is_movie(int imtype);
+int BKE_write_ibuf_stamp(struct Scene *scene, struct Object *camera, struct ImBuf *ibuf, const char *name, struct ImageFormatData *imf);
+int BKE_write_ibuf(struct ImBuf *ibuf, const char *name, struct ImageFormatData *imf);
+void BKE_makepicstring(char *string, const char *base, const char *relbase, int frame, char imtype, const short use_ext, const short use_frames);
+int BKE_add_image_extension(char *string, const char imtype);
+char BKE_ftype_to_imtype(const int ftype);
+int BKE_imtype_to_ftype(char imtype);
+
+int BKE_imtype_is_movie(const char imtype);
+int BKE_imtype_supports_alpha(const char imtype);
+int BKE_imtype_supports_zbuf(const char imtype);
+int BKE_imtype_supports_compress(const char imtype);
+int BKE_imtype_supports_quality(const char imtype);
+char BKE_imtype_valid_depths(const char imtype);
struct anim *openanim(const char *name, int flags, int streamindex);
diff --git a/source/blender/blenkernel/BKE_node.h b/source/blender/blenkernel/BKE_node.h
index 580f78d3063..82e42ae27e2 100644
--- a/source/blender/blenkernel/BKE_node.h
+++ b/source/blender/blenkernel/BKE_node.h
@@ -190,10 +190,24 @@ typedef struct bNodeType {
* when a final generic version of execution code is defined, this will be changed anyway
*/
void (*newexecfunc)(void *data, int thread, struct bNode *, void *nodedata, struct bNodeStack **, struct bNodeStack **);
+ /* This is the muting callback.
+ * XXX Mimics the newexecfunc signature... Not sure all of this will be useful, we will see.
+ */
+ void (*mutefunc)(void *data, int thread, struct bNode *, void *nodedata, struct bNodeStack **, struct bNodeStack **);
+ /* And the muting util.
+ * Returns links as a ListBase, as pairs of bNodeStack* if in/out bNodeStacks were provided,
+ * else as pairs of bNodeSocket* if node tree was provided.
+ */
+ ListBase (*mutelinksfunc)(struct bNodeTree *, struct bNode *, struct bNodeStack **, struct bNodeStack **,
+ struct GPUNodeStack *, struct GPUNodeStack *);
/* gpu */
int (*gpufunc)(struct GPUMaterial *mat, struct bNode *node, struct GPUNodeStack *in, struct GPUNodeStack *out);
/* extended gpu function */
int (*gpuextfunc)(struct GPUMaterial *mat, struct bNode *node, void *nodedata, struct GPUNodeStack *in, struct GPUNodeStack *out);
+ /* This is the muting gpu callback.
+ * XXX Mimics the gpuextfunc signature... Not sure all of this will be useful, we will see.
+ */
+ int (*gpumutefunc)(struct GPUMaterial *, struct bNode *, void *, struct GPUNodeStack *, struct GPUNodeStack *);
} bNodeType;
/* node->exec, now in use for composites (#define for break is same as ready yes) */
@@ -270,6 +284,13 @@ typedef struct bNodeTreeType
void (*update_node)(struct bNodeTree *ntree, struct bNode *node);
int (*validate_link)(struct bNodeTree *ntree, struct bNodeLink *link);
+
+ /* Default muting pointers. */
+ void (*mutefunc)(void *data, int thread, struct bNode *, void *nodedata, struct bNodeStack **, struct bNodeStack **);
+ ListBase (*mutelinksfunc)(struct bNodeTree *, struct bNode *, struct bNodeStack **, struct bNodeStack **,
+ struct GPUNodeStack *, struct GPUNodeStack *);
+ /* gpu */
+ int (*gpumutefunc)(struct GPUMaterial *, struct bNode *, void *, struct GPUNodeStack *, struct GPUNodeStack *);
} bNodeTreeType;
/* ************** GENERIC API, TREES *************** */
@@ -325,7 +346,7 @@ struct bNode *nodeAddNode(struct bNodeTree *ntree, struct bNodeTemplate *ntemp);
void nodeUnlinkNode(struct bNodeTree *ntree, struct bNode *node);
void nodeUniqueName(struct bNodeTree *ntree, struct bNode *node);
-void nodeRegisterType(struct ListBase *typelist, struct bNodeType *ntype) ;
+void nodeRegisterType(struct bNodeTreeType *ttype, struct bNodeType *ntype) ;
void nodeMakeDynamicType(struct bNode *node);
int nodeDynamicUnlinkText(struct ID *txtid);
@@ -368,7 +389,8 @@ struct bNodeTree *nodeGroupEditSet(struct bNode *node, int edit);
void nodeGroupEditClear(struct bNode *node);
/* Init a new node type struct with default values and callbacks */
-void node_type_base(struct bNodeType *ntype, int type, const char *name, short nclass, short flag);
+void node_type_base(struct bNodeTreeType *ttype, struct bNodeType *ntype, int type,
+ const char *name, short nclass, short flag);
void node_type_socket_templates(struct bNodeType *ntype, struct bNodeSocketTemplate *inputs, struct bNodeSocketTemplate *outputs);
void node_type_size(struct bNodeType *ntype, int width, int minwidth, int maxwidth);
void node_type_init(struct bNodeType *ntype, void (*initfunc)(struct bNodeTree *ntree, struct bNode *node, struct bNodeTemplate *ntemp));
@@ -390,13 +412,25 @@ void node_type_group_edit(struct bNodeType *ntype,
struct bNodeTree *(*group_edit_set)(struct bNode *node, int edit),
void (*group_edit_clear)(struct bNode *node));
-void node_type_exec(struct bNodeType *ntype, void (*execfunc)(void *data, struct bNode *, struct bNodeStack **, struct bNodeStack **));
+void node_type_exec(struct bNodeType *ntype, void (*execfunc)(void *data, struct bNode *, struct bNodeStack **,
+ struct bNodeStack **));
void node_type_exec_new(struct bNodeType *ntype,
void *(*initexecfunc)(struct bNode *node),
void (*freeexecfunc)(struct bNode *node, void *nodedata),
- void (*newexecfunc)(void *data, int thread, struct bNode *, void *nodedata, struct bNodeStack **, struct bNodeStack **));
-void node_type_gpu(struct bNodeType *ntype, int (*gpufunc)(struct GPUMaterial *mat, struct bNode *node, struct GPUNodeStack *in, struct GPUNodeStack *out));
-void node_type_gpu_ext(struct bNodeType *ntype, int (*gpuextfunc)(struct GPUMaterial *mat, struct bNode *node, void *nodedata, struct GPUNodeStack *in, struct GPUNodeStack *out));
+ void (*newexecfunc)(void *data, int thread, struct bNode *, void *nodedata,
+ struct bNodeStack **, struct bNodeStack **));
+void node_type_mute(struct bNodeType *ntype,
+ void (*mutefunc)(void *data, int thread, struct bNode *, void *nodedata,
+ struct bNodeStack **, struct bNodeStack **),
+ ListBase (*mutelinksfunc)(struct bNodeTree *, struct bNode *, struct bNodeStack **,
+ struct bNodeStack **, struct GPUNodeStack*, struct GPUNodeStack*));
+void node_type_gpu(struct bNodeType *ntype, int (*gpufunc)(struct GPUMaterial *mat, struct bNode *node,
+ struct GPUNodeStack *in, struct GPUNodeStack *out));
+void node_type_gpu_ext(struct bNodeType *ntype, int (*gpuextfunc)(struct GPUMaterial *mat, struct bNode *node,
+ void *nodedata, struct GPUNodeStack *in,
+ struct GPUNodeStack *out));
+void node_type_gpu_mute(struct bNodeType *ntype, int (*gpumutefunc)(struct GPUMaterial *, struct bNode *, void *,
+ struct GPUNodeStack *, struct GPUNodeStack *));
void node_type_compatibility(struct bNodeType *ntype, short compatibility);
/* ************** COMMON NODES *************** */
@@ -421,7 +455,7 @@ struct bNode *node_group_make_from_selected(struct bNodeTree *ntree);
int node_group_ungroup(struct bNodeTree *ntree, struct bNode *gnode);
/* in node_common.c */
-void register_node_type_frame(ListBase *lb);
+void register_node_type_frame(struct bNodeTreeType *ttype);
/* ************** SHADER NODES *************** */
diff --git a/source/blender/blenkernel/BKE_writeavi.h b/source/blender/blenkernel/BKE_writeavi.h
index f2502cf25f7..01a16be18ca 100644
--- a/source/blender/blenkernel/BKE_writeavi.h
+++ b/source/blender/blenkernel/BKE_writeavi.h
@@ -50,7 +50,7 @@ typedef struct bMovieHandle {
void (*get_movie_path)(char *string, struct RenderData *rd); /* optional */
} bMovieHandle;
-bMovieHandle *BKE_get_movie_handle(int imtype);
+bMovieHandle *BKE_get_movie_handle(const char imtype);
void BKE_makeanimstring(char *string, struct RenderData *rd);
#ifdef __cplusplus
diff --git a/source/blender/blenkernel/intern/bmfont.c b/source/blender/blenkernel/intern/bmfont.c
index f1e6de9a0c4..0211dcdf42c 100644
--- a/source/blender/blenkernel/intern/bmfont.c
+++ b/source/blender/blenkernel/intern/bmfont.c
@@ -159,7 +159,7 @@ void readBitmapFontVersion0(ImBuf * ibuf, unsigned char * rect, int step)
ibuf->userdata = bmfont;
ibuf->userflags |= IB_BITMAPFONT;
- if (ibuf->depth < 32) {
+ if (ibuf->planes < 32) {
// we're going to fake alpha here:
calcAlpha(ibuf);
}
diff --git a/source/blender/blenkernel/intern/dynamicpaint.c b/source/blender/blenkernel/intern/dynamicpaint.c
index aa2790fca2e..714800e0e7b 100644
--- a/source/blender/blenkernel/intern/dynamicpaint.c
+++ b/source/blender/blenkernel/intern/dynamicpaint.c
@@ -976,7 +976,7 @@ struct DynamicPaintSurface *dynamicPaint_createNewSurface(DynamicPaintCanvasSett
surface->wave_timescale = 1.0f;
surface->wave_spring = 0.20f;
- modifier_path_init(surface->image_output_path, sizeof(surface->image_output_path), "dynamicpaint");
+ modifier_path_init(surface->image_output_path, sizeof(surface->image_output_path), "cache_dynamicpaint");
dynamicPaintSurface_setUniqueName(surface, "Surface");
@@ -2527,13 +2527,13 @@ void dynamicPaint_outputSurfaceImage(DynamicPaintSurface *surface, char* filenam
PaintSurfaceData *sData = surface->data;
ImgSeqFormatData *f_data = (ImgSeqFormatData*)sData->format_data;
/* OpenEXR or PNG */
- int format = (surface->image_fileformat & MOD_DPAINT_IMGFORMAT_OPENEXR) ? R_OPENEXR : R_PNG;
+ int format = (surface->image_fileformat & MOD_DPAINT_IMGFORMAT_OPENEXR) ? R_IMF_IMTYPE_OPENEXR : R_IMF_IMTYPE_PNG;
char output_file[FILE_MAX];
if (!sData || !sData->type_data) {setError(surface->canvas, "Image save failed: Invalid surface.");return;}
/* if selected format is openexr, but current build doesnt support one */
#ifndef WITH_OPENEXR
- if (format == R_OPENEXR) format = R_PNG;
+ if (format == R_IMF_IMTYPE_OPENEXR) format = R_IMF_IMTYPE_PNG;
#endif
BLI_strncpy(output_file, filename, sizeof(output_file));
BKE_add_image_extension(output_file, format);
@@ -2622,7 +2622,7 @@ void dynamicPaint_outputSurfaceImage(DynamicPaintSurface *surface, char* filenam
/* Set output format, png in case exr isnt supported */
ibuf->ftype= PNG|95;
#ifdef WITH_OPENEXR
- if (format == R_OPENEXR) { /* OpenEXR 32-bit float */
+ if (format == R_IMF_IMTYPE_OPENEXR) { /* OpenEXR 32-bit float */
ibuf->ftype = OPENEXR | OPENEXR_COMPRESS;
}
#endif
diff --git a/source/blender/blenkernel/intern/image.c b/source/blender/blenkernel/intern/image.c
index a61ae705020..ef764f2394d 100644
--- a/source/blender/blenkernel/intern/image.c
+++ b/source/blender/blenkernel/intern/image.c
@@ -556,13 +556,13 @@ Image *BKE_add_image_size(unsigned int width, unsigned int height, const char *n
if (ima) {
ImBuf *ibuf;
- BLI_strncpy(ima->name, name, FILE_MAX);
+ /* BLI_strncpy(ima->name, name, FILE_MAX); */ /* dont do this, this writes in ain invalid filepath! */
ima->gen_x= width;
ima->gen_y= height;
ima->gen_type= uvtestgrid;
ima->gen_flag |= (floatbuf ? IMA_GEN_FLOAT : 0);
- ibuf= add_ibuf_size(width, height, name, depth, floatbuf, uvtestgrid, color);
+ ibuf= add_ibuf_size(width, height, ima->name, depth, floatbuf, uvtestgrid, color);
image_assign_ibuf(ima, ibuf, IMA_NO_INDEX, 0);
ima->ok= IMA_OK_LOADED;
@@ -601,7 +601,7 @@ void BKE_image_memorypack(Image *ima)
}
ibuf->ftype= PNG;
- ibuf->depth= 32;
+ ibuf->planes= R_IMF_PLANES_RGBA;
IMB_saveiff(ibuf, ibuf->name, IB_rect | IB_mem);
if(ibuf->encodedbuffer==NULL) {
@@ -800,175 +800,246 @@ void BKE_image_all_free_anim_ibufs(int cfra)
/* *********** READ AND WRITE ************** */
-int BKE_imtype_to_ftype(int imtype)
+int BKE_imtype_to_ftype(const char imtype)
{
- if(imtype==R_TARGA)
+ if(imtype==R_IMF_IMTYPE_TARGA)
return TGA;
- else if(imtype==R_RAWTGA)
+ else if(imtype==R_IMF_IMTYPE_RAWTGA)
return RAWTGA;
- else if(imtype== R_IRIS)
+ else if(imtype== R_IMF_IMTYPE_IRIS)
return IMAGIC;
#ifdef WITH_HDR
- else if (imtype==R_RADHDR)
+ else if (imtype==R_IMF_IMTYPE_RADHDR)
return RADHDR;
#endif
- else if (imtype==R_PNG)
+ else if (imtype==R_IMF_IMTYPE_PNG)
return PNG;
#ifdef WITH_DDS
- else if (imtype==R_DDS)
+ else if (imtype==R_IMF_IMTYPE_DDS)
return DDS;
#endif
- else if (imtype==R_BMP)
+ else if (imtype==R_IMF_IMTYPE_BMP)
return BMP;
#ifdef WITH_TIFF
- else if (imtype==R_TIFF)
+ else if (imtype==R_IMF_IMTYPE_TIFF)
return TIF;
#endif
- else if (imtype==R_OPENEXR || imtype==R_MULTILAYER)
+ else if (imtype==R_IMF_IMTYPE_OPENEXR || imtype==R_IMF_IMTYPE_MULTILAYER)
return OPENEXR;
#ifdef WITH_CINEON
- else if (imtype==R_CINEON)
+ else if (imtype==R_IMF_IMTYPE_CINEON)
return CINEON;
- else if (imtype==R_DPX)
+ else if (imtype==R_IMF_IMTYPE_DPX)
return DPX;
#endif
#ifdef WITH_OPENJPEG
- else if(imtype==R_JP2)
+ else if(imtype==R_IMF_IMTYPE_JP2)
return JP2;
#endif
else
return JPG|90;
}
-int BKE_ftype_to_imtype(int ftype)
+char BKE_ftype_to_imtype(const int ftype)
{
if(ftype==0)
- return TGA;
+ return R_IMF_IMTYPE_TARGA;
else if(ftype == IMAGIC)
- return R_IRIS;
+ return R_IMF_IMTYPE_IRIS;
#ifdef WITH_HDR
else if (ftype & RADHDR)
- return R_RADHDR;
+ return R_IMF_IMTYPE_RADHDR;
#endif
else if (ftype & PNG)
- return R_PNG;
+ return R_IMF_IMTYPE_PNG;
#ifdef WITH_DDS
else if (ftype & DDS)
- return R_DDS;
+ return R_IMF_IMTYPE_DDS;
#endif
else if (ftype & BMP)
- return R_BMP;
+ return R_IMF_IMTYPE_BMP;
#ifdef WITH_TIFF
else if (ftype & TIF)
- return R_TIFF;
+ return R_IMF_IMTYPE_TIFF;
#endif
else if (ftype & OPENEXR)
- return R_OPENEXR;
+ return R_IMF_IMTYPE_OPENEXR;
#ifdef WITH_CINEON
else if (ftype & CINEON)
- return R_CINEON;
+ return R_IMF_IMTYPE_CINEON;
else if (ftype & DPX)
- return R_DPX;
+ return R_IMF_IMTYPE_DPX;
#endif
else if (ftype & TGA)
- return R_TARGA;
+ return R_IMF_IMTYPE_TARGA;
else if(ftype & RAWTGA)
- return R_RAWTGA;
+ return R_IMF_IMTYPE_RAWTGA;
#ifdef WITH_OPENJPEG
else if(ftype & JP2)
- return R_JP2;
+ return R_IMF_IMTYPE_JP2;
#endif
else
- return R_JPEG90;
+ return R_IMF_IMTYPE_JPEG90;
}
-int BKE_imtype_is_movie(int imtype)
+int BKE_imtype_is_movie(const char imtype)
+{
+ switch(imtype) {
+ case R_IMF_IMTYPE_AVIRAW:
+ case R_IMF_IMTYPE_AVIJPEG:
+ case R_IMF_IMTYPE_AVICODEC:
+ case R_IMF_IMTYPE_QUICKTIME:
+ case R_IMF_IMTYPE_FFMPEG:
+ case R_IMF_IMTYPE_H264:
+ case R_IMF_IMTYPE_THEORA:
+ case R_IMF_IMTYPE_XVID:
+ case R_IMF_IMTYPE_FRAMESERVER:
+ return 1;
+ }
+ return 0;
+}
+
+int BKE_imtype_supports_alpha(const char imtype)
{
switch(imtype) {
- case R_AVIRAW:
- case R_AVIJPEG:
- case R_AVICODEC:
- case R_QUICKTIME:
- case R_FFMPEG:
- case R_H264:
- case R_THEORA:
- case R_XVID:
- case R_FRAMESERVER:
+ case R_IMF_IMTYPE_TARGA:
+ case R_IMF_IMTYPE_IRIS:
+ case R_IMF_IMTYPE_PNG:
+ /* case R_IMF_IMTYPE_BMP: */ /* read but not write */
+ case R_IMF_IMTYPE_RADHDR:
+ case R_IMF_IMTYPE_TIFF:
+ case R_IMF_IMTYPE_OPENEXR:
+ case R_IMF_IMTYPE_MULTILAYER:
+ case R_IMF_IMTYPE_DDS:
+ case R_IMF_IMTYPE_JP2:
return 1;
}
return 0;
}
-int BKE_add_image_extension(char *string, int imtype)
+int BKE_imtype_supports_zbuf(const char imtype)
+{
+ switch(imtype) {
+ case R_IMF_IMTYPE_IRIZ:
+ case R_IMF_IMTYPE_OPENEXR: /* but not R_IMF_IMTYPE_MULTILAYER */
+ return 1;
+ }
+ return 0;
+}
+
+int BKE_imtype_supports_compress(const char imtype)
+{
+ switch(imtype) {
+ case R_IMF_IMTYPE_PNG:
+ return 1;
+ }
+ return 0;
+}
+
+int BKE_imtype_supports_quality(const char imtype)
+{
+ switch(imtype) {
+ case R_IMF_IMTYPE_JPEG90:
+ case R_IMF_IMTYPE_JP2:
+ case R_IMF_IMTYPE_AVIJPEG:
+ return 1;
+ }
+ return 0;
+}
+
+char BKE_imtype_valid_depths(const char imtype)
+{
+ switch (imtype) {
+ case R_IMF_IMTYPE_RADHDR:
+ return R_IMF_CHAN_DEPTH_32;
+ case R_IMF_IMTYPE_TIFF:
+ return R_IMF_CHAN_DEPTH_8 | R_IMF_CHAN_DEPTH_16;
+ case R_IMF_IMTYPE_OPENEXR:
+ return R_IMF_CHAN_DEPTH_16 | R_IMF_CHAN_DEPTH_32;
+ case R_IMF_IMTYPE_MULTILAYER:
+ return R_IMF_CHAN_DEPTH_32;
+ /* eeh, cineone does some strange 10bits per channel */
+ case R_IMF_IMTYPE_DPX:
+ case R_IMF_IMTYPE_CINEON:
+ return R_IMF_CHAN_DEPTH_12;
+ case R_IMF_IMTYPE_JP2:
+ return R_IMF_CHAN_DEPTH_8 | R_IMF_CHAN_DEPTH_12 | R_IMF_CHAN_DEPTH_16;
+ /* most formats are 8bit only */
+ default:
+ return R_IMF_CHAN_DEPTH_8;
+ }
+}
+
+int BKE_add_image_extension(char *string, const char imtype)
{
const char *extension= NULL;
- if(imtype== R_IRIS) {
+ if(imtype== R_IMF_IMTYPE_IRIS) {
if(!BLI_testextensie(string, ".rgb"))
extension= ".rgb";
}
- else if(imtype==R_IRIZ) {
+ else if(imtype==R_IMF_IMTYPE_IRIZ) {
if(!BLI_testextensie(string, ".rgb"))
extension= ".rgb";
}
#ifdef WITH_HDR
- else if(imtype==R_RADHDR) {
+ else if(imtype==R_IMF_IMTYPE_RADHDR) {
if(!BLI_testextensie(string, ".hdr"))
extension= ".hdr";
}
#endif
- else if (ELEM5(imtype, R_PNG, R_FFMPEG, R_H264, R_THEORA, R_XVID)) {
+ else if (ELEM5(imtype, R_IMF_IMTYPE_PNG, R_IMF_IMTYPE_FFMPEG, R_IMF_IMTYPE_H264, R_IMF_IMTYPE_THEORA, R_IMF_IMTYPE_XVID)) {
if(!BLI_testextensie(string, ".png"))
extension= ".png";
}
#ifdef WITH_DDS
- else if(imtype==R_DDS) {
+ else if(imtype==R_IMF_IMTYPE_DDS) {
if(!BLI_testextensie(string, ".dds"))
extension= ".dds";
}
#endif
- else if(imtype==R_RAWTGA) {
+ else if(imtype==R_IMF_IMTYPE_RAWTGA) {
if(!BLI_testextensie(string, ".tga"))
extension= ".tga";
}
- else if(imtype==R_BMP) {
+ else if(imtype==R_IMF_IMTYPE_BMP) {
if(!BLI_testextensie(string, ".bmp"))
extension= ".bmp";
}
#ifdef WITH_TIFF
- else if(imtype==R_TIFF) {
+ else if(imtype==R_IMF_IMTYPE_TIFF) {
if(!BLI_testextensie(string, ".tif") &&
!BLI_testextensie(string, ".tiff")) extension= ".tif";
}
#endif
#ifdef WITH_OPENEXR
- else if( ELEM(imtype, R_OPENEXR, R_MULTILAYER)) {
+ else if( ELEM(imtype, R_IMF_IMTYPE_OPENEXR, R_IMF_IMTYPE_MULTILAYER)) {
if(!BLI_testextensie(string, ".exr"))
extension= ".exr";
}
#endif
#ifdef WITH_CINEON
- else if(imtype==R_CINEON){
+ else if(imtype==R_IMF_IMTYPE_CINEON){
if (!BLI_testextensie(string, ".cin"))
extension= ".cin";
}
- else if(imtype==R_DPX){
+ else if(imtype==R_IMF_IMTYPE_DPX){
if (!BLI_testextensie(string, ".dpx"))
extension= ".dpx";
}
#endif
- else if(imtype==R_TARGA) {
+ else if(imtype==R_IMF_IMTYPE_TARGA) {
if(!BLI_testextensie(string, ".tga"))
extension= ".tga";
}
#ifdef WITH_OPENJPEG
- else if(imtype==R_JP2) {
+ else if(imtype==R_IMF_IMTYPE_JP2) {
if(!BLI_testextensie(string, ".jp2"))
extension= ".jp2";
}
#endif
- else { // R_AVICODEC, R_AVIRAW, R_AVIJPEG, R_JPEG90, R_QUICKTIME etc
+ else { // R_IMF_IMTYPE_AVICODEC, R_IMF_IMTYPE_AVIRAW, R_IMF_IMTYPE_AVIJPEG, R_IMF_IMTYPE_JPEG90, R_IMF_IMTYPE_QUICKTIME etc
if(!( BLI_testextensie(string, ".jpg") || BLI_testextensie(string, ".jpeg")))
extension= ".jpg";
}
@@ -1371,98 +1442,101 @@ int BKE_alphatest_ibuf(ImBuf *ibuf)
return FALSE;
}
-int BKE_write_ibuf(ImBuf *ibuf, const char *name, int imtype, int subimtype, int quality)
+int BKE_write_ibuf(ImBuf *ibuf, const char *name, ImageFormatData *imf)
{
+ char imtype= imf->imtype;
+ char compress= imf->compress;
+ char quality= imf->quality;
+
int ok;
- (void)subimtype; /* quies unused warnings */
if(imtype == -1) {
/* use whatever existing image type is set by 'ibuf' */
}
- else if(imtype== R_IRIS) {
+ else if(imtype== R_IMF_IMTYPE_IRIS) {
ibuf->ftype= IMAGIC;
}
#ifdef WITH_HDR
- else if (imtype==R_RADHDR) {
+ else if (imtype==R_IMF_IMTYPE_RADHDR) {
ibuf->ftype= RADHDR;
}
#endif
- else if (ELEM5(imtype, R_PNG, R_FFMPEG, R_H264, R_THEORA, R_XVID)) {
+ else if (ELEM5(imtype, R_IMF_IMTYPE_PNG, R_IMF_IMTYPE_FFMPEG, R_IMF_IMTYPE_H264, R_IMF_IMTYPE_THEORA, R_IMF_IMTYPE_XVID)) {
ibuf->ftype= PNG;
- if(imtype==R_PNG)
- ibuf->ftype |= quality; /* quality is actually compression 0-100 --> 0-9 */
+ if(imtype==R_IMF_IMTYPE_PNG)
+ ibuf->ftype |= compress;
}
#ifdef WITH_DDS
- else if (imtype==R_DDS) {
+ else if (imtype==R_IMF_IMTYPE_DDS) {
ibuf->ftype= DDS;
}
#endif
- else if (imtype==R_BMP) {
+ else if (imtype==R_IMF_IMTYPE_BMP) {
ibuf->ftype= BMP;
}
#ifdef WITH_TIFF
- else if (imtype==R_TIFF) {
+ else if (imtype==R_IMF_IMTYPE_TIFF) {
ibuf->ftype= TIF;
- if(subimtype & R_TIFF_16BIT)
+ if(imf->depth == R_IMF_CHAN_DEPTH_16)
ibuf->ftype |= TIF_16BIT;
}
#endif
#ifdef WITH_OPENEXR
- else if (imtype==R_OPENEXR || imtype==R_MULTILAYER) {
+ else if (imtype==R_IMF_IMTYPE_OPENEXR || imtype==R_IMF_IMTYPE_MULTILAYER) {
ibuf->ftype= OPENEXR;
- if(subimtype & R_OPENEXR_HALF)
+ if(imf->depth == R_IMF_CHAN_DEPTH_16)
ibuf->ftype |= OPENEXR_HALF;
ibuf->ftype |= (quality & OPENEXR_COMPRESS);
- if(!(subimtype & R_OPENEXR_ZBUF))
+ if(!(imf->flag & R_IMF_FLAG_ZBUF))
ibuf->zbuf_float = NULL; /* signal for exr saving */
}
#endif
#ifdef WITH_CINEON
- else if (imtype==R_CINEON) {
+ else if (imtype==R_IMF_IMTYPE_CINEON) {
ibuf->ftype = CINEON;
}
- else if (imtype==R_DPX) {
+ else if (imtype==R_IMF_IMTYPE_DPX) {
ibuf->ftype = DPX;
}
#endif
- else if (imtype==R_TARGA) {
+ else if (imtype==R_IMF_IMTYPE_TARGA) {
ibuf->ftype= TGA;
}
- else if(imtype==R_RAWTGA) {
+ else if(imtype==R_IMF_IMTYPE_RAWTGA) {
ibuf->ftype= RAWTGA;
}
#ifdef WITH_OPENJPEG
- else if(imtype==R_JP2) {
+ else if(imtype==R_IMF_IMTYPE_JP2) {
if(quality < 10) quality= 90;
ibuf->ftype= JP2|quality;
- if (subimtype & R_JPEG2K_16BIT) {
+ if (imf->depth == R_IMF_CHAN_DEPTH_16) {
ibuf->ftype |= JP2_16BIT;
- } else if (subimtype & R_JPEG2K_12BIT) {
+ } else if (imf->depth == R_IMF_CHAN_DEPTH_12) {
ibuf->ftype |= JP2_12BIT;
}
- if (subimtype & R_JPEG2K_YCC) {
+ if (imf->jp2_flag & R_IMF_JP2_FLAG_YCC) {
ibuf->ftype |= JP2_YCC;
}
-
- if (subimtype & R_JPEG2K_CINE_PRESET) {
+
+ if (imf->jp2_flag & R_IMF_JP2_FLAG_CINE_PRESET) {
ibuf->ftype |= JP2_CINE;
- if (subimtype & R_JPEG2K_CINE_48FPS)
+ if (imf->jp2_flag & R_IMF_JP2_FLAG_CINE_48)
ibuf->ftype |= JP2_CINE_48FPS;
}
}
#endif
else {
- /* R_JPEG90, etc. default we save jpegs */
+ /* R_IMF_IMTYPE_JPEG90, etc. default we save jpegs */
if(quality < 10) quality= 90;
ibuf->ftype= JPG|quality;
- if(ibuf->depth==32) ibuf->depth= 24; /* unsupported feature only confuses other s/w */
+ if(ibuf->planes==32) ibuf->planes= 24; /* unsupported feature only confuses other s/w */
}
BLI_make_existing_file(name);
@@ -1475,16 +1549,16 @@ int BKE_write_ibuf(ImBuf *ibuf, const char *name, int imtype, int subimtype, int
return(ok);
}
-int BKE_write_ibuf_stamp(Scene *scene, struct Object *camera, ImBuf *ibuf, const char *name, int imtype, int subimtype, int quality)
+int BKE_write_ibuf_stamp(Scene *scene, struct Object *camera, ImBuf *ibuf, const char *name, struct ImageFormatData *imf)
{
if(scene && scene->r.stamp & R_STAMP_ALL)
BKE_stamp_info(scene, camera, ibuf);
- return BKE_write_ibuf(ibuf, name, imtype, subimtype, quality);
+ return BKE_write_ibuf(ibuf, name, imf);
}
-void BKE_makepicstring(char *string, const char *base, const char *relbase, int frame, int imtype, const short use_ext, const short use_frames)
+void BKE_makepicstring(char *string, const char *base, const char *relbase, int frame, const char imtype, const short use_ext, const short use_frames)
{
if (string==NULL) return;
BLI_strncpy(string, base, FILE_MAX - 10); /* weak assumption */
@@ -2414,13 +2488,13 @@ int BKE_image_has_alpha(struct Image *image)
{
ImBuf *ibuf;
void *lock;
- int depth;
+ int planes;
ibuf= BKE_image_acquire_ibuf(image, NULL, &lock);
- depth = (ibuf?ibuf->depth:0);
+ planes = (ibuf?ibuf->planes:0);
BKE_image_release_ibuf(image, lock);
- if (depth == 32)
+ if (planes == 32)
return 1;
else
return 0;
diff --git a/source/blender/blenkernel/intern/movieclip.c b/source/blender/blenkernel/intern/movieclip.c
index 540d757f0c9..12a2fe28bc8 100644
--- a/source/blender/blenkernel/intern/movieclip.c
+++ b/source/blender/blenkernel/intern/movieclip.c
@@ -913,8 +913,8 @@ static void movieclip_build_proxy_ibuf(MovieClip *clip, ImBuf *ibuf, int cfra, i
scaleibuf->ftype= JPG | quality;
/* unsupported feature only confuses other s/w */
- if(scaleibuf->depth==32)
- scaleibuf->depth= 24;
+ if(scaleibuf->planes==32)
+ scaleibuf->planes= 24;
BLI_lock_thread(LOCK_MOVIECLIP);
diff --git a/source/blender/blenkernel/intern/node.c b/source/blender/blenkernel/intern/node.c
index c4edddf587c..7be6ef9968d 100644
--- a/source/blender/blenkernel/intern/node.c
+++ b/source/blender/blenkernel/intern/node.c
@@ -1643,15 +1643,22 @@ struct bNodeTemplate nodeMakeTemplate(struct bNode *node)
}
}
-void node_type_base(bNodeType *ntype, int type, const char *name, short nclass, short flag)
+void node_type_base(bNodeTreeType *ttype, bNodeType *ntype, int type, const char *name, short nclass, short flag)
{
memset(ntype, 0, sizeof(bNodeType));
-
+
ntype->type = type;
BLI_strncpy(ntype->name, name, sizeof(ntype->name));
ntype->nclass = nclass;
ntype->flag = flag;
-
+
+ /* Default muting stuff. */
+ if(ttype) {
+ ntype->mutefunc = ttype->mutefunc;
+ ntype->mutelinksfunc = ttype->mutelinksfunc;
+ ntype->gpumutefunc = ttype->gpumutefunc;
+ }
+
/* default size values */
ntype->width = 140;
ntype->minwidth = 100;
@@ -1746,6 +1753,16 @@ void node_type_exec_new(struct bNodeType *ntype,
ntype->newexecfunc = newexecfunc;
}
+void node_type_mute(struct bNodeType *ntype,
+ void (*mutefunc)(void *data, int thread, struct bNode *, void *nodedata,
+ struct bNodeStack **, struct bNodeStack **),
+ ListBase (*mutelinksfunc)(struct bNodeTree *, struct bNode *, struct bNodeStack **, struct bNodeStack **,
+ struct GPUNodeStack *, struct GPUNodeStack *))
+{
+ ntype->mutefunc = mutefunc;
+ ntype->mutelinksfunc = mutelinksfunc;
+}
+
void node_type_gpu(struct bNodeType *ntype, int (*gpufunc)(struct GPUMaterial *mat, struct bNode *node, struct GPUNodeStack *in, struct GPUNodeStack *out))
{
ntype->gpufunc = gpufunc;
@@ -1756,6 +1773,12 @@ void node_type_gpu_ext(struct bNodeType *ntype, int (*gpuextfunc)(struct GPUMate
ntype->gpuextfunc = gpuextfunc;
}
+void node_type_gpu_mute(struct bNodeType *ntype, int (*gpumutefunc)(struct GPUMaterial *, struct bNode *, void *,
+ struct GPUNodeStack *, struct GPUNodeStack *))
+{
+ ntype->gpumutefunc = gpumutefunc;
+}
+
void node_type_compatibility(struct bNodeType *ntype, short compatibility)
{
ntype->compatibility = compatibility;
@@ -1772,211 +1795,212 @@ static bNodeType *is_nodetype_registered(ListBase *typelist, int type)
return NULL;
}
-void nodeRegisterType(ListBase *typelist, bNodeType *ntype)
+void nodeRegisterType(bNodeTreeType *ttype, bNodeType *ntype)
{
+ ListBase *typelist = &(ttype->node_types);
bNodeType *found= is_nodetype_registered(typelist, ntype->type);
if(found==NULL)
BLI_addtail(typelist, ntype);
}
-static void registerCompositNodes(ListBase *ntypelist)
-{
- register_node_type_frame(ntypelist);
-
- register_node_type_cmp_group(ntypelist);
-// register_node_type_cmp_forloop(ntypelist);
-// register_node_type_cmp_whileloop(ntypelist);
-
- register_node_type_cmp_rlayers(ntypelist);
- register_node_type_cmp_image(ntypelist);
- register_node_type_cmp_texture(ntypelist);
- register_node_type_cmp_value(ntypelist);
- register_node_type_cmp_rgb(ntypelist);
- register_node_type_cmp_curve_time(ntypelist);
- register_node_type_cmp_movieclip(ntypelist);
-
- register_node_type_cmp_composite(ntypelist);
- register_node_type_cmp_viewer(ntypelist);
- register_node_type_cmp_splitviewer(ntypelist);
- register_node_type_cmp_output_file(ntypelist);
- register_node_type_cmp_view_levels(ntypelist);
-
- register_node_type_cmp_curve_rgb(ntypelist);
- register_node_type_cmp_mix_rgb(ntypelist);
- register_node_type_cmp_hue_sat(ntypelist);
- register_node_type_cmp_brightcontrast(ntypelist);
- register_node_type_cmp_gamma(ntypelist);
- register_node_type_cmp_invert(ntypelist);
- register_node_type_cmp_alphaover(ntypelist);
- register_node_type_cmp_zcombine(ntypelist);
- register_node_type_cmp_colorbalance(ntypelist);
- register_node_type_cmp_huecorrect(ntypelist);
-
- register_node_type_cmp_normal(ntypelist);
- register_node_type_cmp_curve_vec(ntypelist);
- register_node_type_cmp_map_value(ntypelist);
- register_node_type_cmp_normalize(ntypelist);
-
- register_node_type_cmp_filter(ntypelist);
- register_node_type_cmp_blur(ntypelist);
- register_node_type_cmp_dblur(ntypelist);
- register_node_type_cmp_bilateralblur(ntypelist);
- register_node_type_cmp_vecblur(ntypelist);
- register_node_type_cmp_dilateerode(ntypelist);
- register_node_type_cmp_defocus(ntypelist);
-
- register_node_type_cmp_valtorgb(ntypelist);
- register_node_type_cmp_rgbtobw(ntypelist);
- register_node_type_cmp_setalpha(ntypelist);
- register_node_type_cmp_idmask(ntypelist);
- register_node_type_cmp_math(ntypelist);
- register_node_type_cmp_seprgba(ntypelist);
- register_node_type_cmp_combrgba(ntypelist);
- register_node_type_cmp_sephsva(ntypelist);
- register_node_type_cmp_combhsva(ntypelist);
- register_node_type_cmp_sepyuva(ntypelist);
- register_node_type_cmp_combyuva(ntypelist);
- register_node_type_cmp_sepycca(ntypelist);
- register_node_type_cmp_combycca(ntypelist);
- register_node_type_cmp_premulkey(ntypelist);
-
- register_node_type_cmp_diff_matte(ntypelist);
- register_node_type_cmp_distance_matte(ntypelist);
- register_node_type_cmp_chroma_matte(ntypelist);
- register_node_type_cmp_color_matte(ntypelist);
- register_node_type_cmp_channel_matte(ntypelist);
- register_node_type_cmp_color_spill(ntypelist);
- register_node_type_cmp_luma_matte(ntypelist);
-
- register_node_type_cmp_translate(ntypelist);
- register_node_type_cmp_rotate(ntypelist);
- register_node_type_cmp_scale(ntypelist);
- register_node_type_cmp_flip(ntypelist);
- register_node_type_cmp_crop(ntypelist);
- register_node_type_cmp_displace(ntypelist);
- register_node_type_cmp_mapuv(ntypelist);
- register_node_type_cmp_glare(ntypelist);
- register_node_type_cmp_tonemap(ntypelist);
- register_node_type_cmp_lensdist(ntypelist);
- register_node_type_cmp_transform(ntypelist);
- register_node_type_cmp_stabilize2d(ntypelist);
- register_node_type_cmp_moviedistortion(ntypelist);
-}
-
-static void registerShaderNodes(ListBase *ntypelist)
-{
- register_node_type_frame(ntypelist);
-
- register_node_type_sh_group(ntypelist);
- //register_node_type_sh_forloop(ntypelist);
- //register_node_type_sh_whileloop(ntypelist);
-
- register_node_type_sh_output(ntypelist);
- register_node_type_sh_material(ntypelist);
- register_node_type_sh_camera(ntypelist);
- register_node_type_sh_value(ntypelist);
- register_node_type_sh_rgb(ntypelist);
- register_node_type_sh_mix_rgb(ntypelist);
- register_node_type_sh_valtorgb(ntypelist);
- register_node_type_sh_rgbtobw(ntypelist);
- register_node_type_sh_texture(ntypelist);
- register_node_type_sh_normal(ntypelist);
- register_node_type_sh_geom(ntypelist);
- register_node_type_sh_mapping(ntypelist);
- register_node_type_sh_curve_vec(ntypelist);
- register_node_type_sh_curve_rgb(ntypelist);
- register_node_type_sh_math(ntypelist);
- register_node_type_sh_vect_math(ntypelist);
- register_node_type_sh_squeeze(ntypelist);
- //register_node_type_sh_dynamic(ntypelist);
- register_node_type_sh_material_ext(ntypelist);
- register_node_type_sh_invert(ntypelist);
- register_node_type_sh_seprgb(ntypelist);
- register_node_type_sh_combrgb(ntypelist);
- register_node_type_sh_hue_sat(ntypelist);
-
- register_node_type_sh_attribute(ntypelist);
- register_node_type_sh_geometry(ntypelist);
- register_node_type_sh_light_path(ntypelist);
- register_node_type_sh_fresnel(ntypelist);
- register_node_type_sh_layer_weight(ntypelist);
- register_node_type_sh_tex_coord(ntypelist);
-
- register_node_type_sh_background(ntypelist);
- register_node_type_sh_bsdf_diffuse(ntypelist);
- register_node_type_sh_bsdf_glossy(ntypelist);
- register_node_type_sh_bsdf_glass(ntypelist);
- register_node_type_sh_bsdf_translucent(ntypelist);
- register_node_type_sh_bsdf_transparent(ntypelist);
- register_node_type_sh_bsdf_velvet(ntypelist);
- register_node_type_sh_emission(ntypelist);
- register_node_type_sh_holdout(ntypelist);
- //register_node_type_sh_volume_transparent(ntypelist);
- //register_node_type_sh_volume_isotropic(ntypelist);
- register_node_type_sh_mix_shader(ntypelist);
- register_node_type_sh_add_shader(ntypelist);
-
- register_node_type_sh_output_lamp(ntypelist);
- register_node_type_sh_output_material(ntypelist);
- register_node_type_sh_output_world(ntypelist);
-
- register_node_type_sh_tex_image(ntypelist);
- register_node_type_sh_tex_environment(ntypelist);
- register_node_type_sh_tex_sky(ntypelist);
- register_node_type_sh_tex_noise(ntypelist);
- register_node_type_sh_tex_wave(ntypelist);
- register_node_type_sh_tex_voronoi(ntypelist);
- register_node_type_sh_tex_musgrave(ntypelist);
- register_node_type_sh_tex_gradient(ntypelist);
- register_node_type_sh_tex_magic(ntypelist);
-}
-
-static void registerTextureNodes(ListBase *ntypelist)
-{
- register_node_type_frame(ntypelist);
-
- register_node_type_tex_group(ntypelist);
-// register_node_type_tex_forloop(ntypelist);
-// register_node_type_tex_whileloop(ntypelist);
-
- register_node_type_tex_math(ntypelist);
- register_node_type_tex_mix_rgb(ntypelist);
- register_node_type_tex_valtorgb(ntypelist);
- register_node_type_tex_rgbtobw(ntypelist);
- register_node_type_tex_valtonor(ntypelist);
- register_node_type_tex_curve_rgb(ntypelist);
- register_node_type_tex_curve_time(ntypelist);
- register_node_type_tex_invert(ntypelist);
- register_node_type_tex_hue_sat(ntypelist);
- register_node_type_tex_coord(ntypelist);
- register_node_type_tex_distance(ntypelist);
- register_node_type_tex_compose(ntypelist);
- register_node_type_tex_decompose(ntypelist);
-
- register_node_type_tex_output(ntypelist);
- register_node_type_tex_viewer(ntypelist);
-
- register_node_type_tex_checker(ntypelist);
- register_node_type_tex_texture(ntypelist);
- register_node_type_tex_bricks(ntypelist);
- register_node_type_tex_image(ntypelist);
-
- register_node_type_tex_rotate(ntypelist);
- register_node_type_tex_translate(ntypelist);
- register_node_type_tex_scale(ntypelist);
- register_node_type_tex_at(ntypelist);
-
- register_node_type_tex_proc_voronoi(ntypelist);
- register_node_type_tex_proc_blend(ntypelist);
- register_node_type_tex_proc_magic(ntypelist);
- register_node_type_tex_proc_marble(ntypelist);
- register_node_type_tex_proc_clouds(ntypelist);
- register_node_type_tex_proc_wood(ntypelist);
- register_node_type_tex_proc_musgrave(ntypelist);
- register_node_type_tex_proc_noise(ntypelist);
- register_node_type_tex_proc_stucci(ntypelist);
- register_node_type_tex_proc_distnoise(ntypelist);
+static void registerCompositNodes(bNodeTreeType *ttype)
+{
+ register_node_type_frame(ttype);
+
+ register_node_type_cmp_group(ttype);
+// register_node_type_cmp_forloop(ttype);
+// register_node_type_cmp_whileloop(ttype);
+
+ register_node_type_cmp_rlayers(ttype);
+ register_node_type_cmp_image(ttype);
+ register_node_type_cmp_texture(ttype);
+ register_node_type_cmp_value(ttype);
+ register_node_type_cmp_rgb(ttype);
+ register_node_type_cmp_curve_time(ttype);
+ register_node_type_cmp_movieclip(ttype);
+
+ register_node_type_cmp_composite(ttype);
+ register_node_type_cmp_viewer(ttype);
+ register_node_type_cmp_splitviewer(ttype);
+ register_node_type_cmp_output_file(ttype);
+ register_node_type_cmp_view_levels(ttype);
+
+ register_node_type_cmp_curve_rgb(ttype);
+ register_node_type_cmp_mix_rgb(ttype);
+ register_node_type_cmp_hue_sat(ttype);
+ register_node_type_cmp_brightcontrast(ttype);
+ register_node_type_cmp_gamma(ttype);
+ register_node_type_cmp_invert(ttype);
+ register_node_type_cmp_alphaover(ttype);
+ register_node_type_cmp_zcombine(ttype);
+ register_node_type_cmp_colorbalance(ttype);
+ register_node_type_cmp_huecorrect(ttype);
+
+ register_node_type_cmp_normal(ttype);
+ register_node_type_cmp_curve_vec(ttype);
+ register_node_type_cmp_map_value(ttype);
+ register_node_type_cmp_normalize(ttype);
+
+ register_node_type_cmp_filter(ttype);
+ register_node_type_cmp_blur(ttype);
+ register_node_type_cmp_dblur(ttype);
+ register_node_type_cmp_bilateralblur(ttype);
+ register_node_type_cmp_vecblur(ttype);
+ register_node_type_cmp_dilateerode(ttype);
+ register_node_type_cmp_defocus(ttype);
+
+ register_node_type_cmp_valtorgb(ttype);
+ register_node_type_cmp_rgbtobw(ttype);
+ register_node_type_cmp_setalpha(ttype);
+ register_node_type_cmp_idmask(ttype);
+ register_node_type_cmp_math(ttype);
+ register_node_type_cmp_seprgba(ttype);
+ register_node_type_cmp_combrgba(ttype);
+ register_node_type_cmp_sephsva(ttype);
+ register_node_type_cmp_combhsva(ttype);
+ register_node_type_cmp_sepyuva(ttype);
+ register_node_type_cmp_combyuva(ttype);
+ register_node_type_cmp_sepycca(ttype);
+ register_node_type_cmp_combycca(ttype);
+ register_node_type_cmp_premulkey(ttype);
+
+ register_node_type_cmp_diff_matte(ttype);
+ register_node_type_cmp_distance_matte(ttype);
+ register_node_type_cmp_chroma_matte(ttype);
+ register_node_type_cmp_color_matte(ttype);
+ register_node_type_cmp_channel_matte(ttype);
+ register_node_type_cmp_color_spill(ttype);
+ register_node_type_cmp_luma_matte(ttype);
+
+ register_node_type_cmp_translate(ttype);
+ register_node_type_cmp_rotate(ttype);
+ register_node_type_cmp_scale(ttype);
+ register_node_type_cmp_flip(ttype);
+ register_node_type_cmp_crop(ttype);
+ register_node_type_cmp_displace(ttype);
+ register_node_type_cmp_mapuv(ttype);
+ register_node_type_cmp_glare(ttype);
+ register_node_type_cmp_tonemap(ttype);
+ register_node_type_cmp_lensdist(ttype);
+ register_node_type_cmp_transform(ttype);
+ register_node_type_cmp_stabilize2d(ttype);
+ register_node_type_cmp_moviedistortion(ttype);
+}
+
+static void registerShaderNodes(bNodeTreeType *ttype)
+{
+ register_node_type_frame(ttype);
+
+ register_node_type_sh_group(ttype);
+ //register_node_type_sh_forloop(ttype);
+ //register_node_type_sh_whileloop(ttype);
+
+ register_node_type_sh_output(ttype);
+ register_node_type_sh_material(ttype);
+ register_node_type_sh_camera(ttype);
+ register_node_type_sh_value(ttype);
+ register_node_type_sh_rgb(ttype);
+ register_node_type_sh_mix_rgb(ttype);
+ register_node_type_sh_valtorgb(ttype);
+ register_node_type_sh_rgbtobw(ttype);
+ register_node_type_sh_texture(ttype);
+ register_node_type_sh_normal(ttype);
+ register_node_type_sh_geom(ttype);
+ register_node_type_sh_mapping(ttype);
+ register_node_type_sh_curve_vec(ttype);
+ register_node_type_sh_curve_rgb(ttype);
+ register_node_type_sh_math(ttype);
+ register_node_type_sh_vect_math(ttype);
+ register_node_type_sh_squeeze(ttype);
+ //register_node_type_sh_dynamic(ttype);
+ register_node_type_sh_material_ext(ttype);
+ register_node_type_sh_invert(ttype);
+ register_node_type_sh_seprgb(ttype);
+ register_node_type_sh_combrgb(ttype);
+ register_node_type_sh_hue_sat(ttype);
+
+ register_node_type_sh_attribute(ttype);
+ register_node_type_sh_geometry(ttype);
+ register_node_type_sh_light_path(ttype);
+ register_node_type_sh_fresnel(ttype);
+ register_node_type_sh_layer_weight(ttype);
+ register_node_type_sh_tex_coord(ttype);
+
+ register_node_type_sh_background(ttype);
+ register_node_type_sh_bsdf_diffuse(ttype);
+ register_node_type_sh_bsdf_glossy(ttype);
+ register_node_type_sh_bsdf_glass(ttype);
+ register_node_type_sh_bsdf_translucent(ttype);
+ register_node_type_sh_bsdf_transparent(ttype);
+ register_node_type_sh_bsdf_velvet(ttype);
+ register_node_type_sh_emission(ttype);
+ register_node_type_sh_holdout(ttype);
+ //register_node_type_sh_volume_transparent(ttype);
+ //register_node_type_sh_volume_isotropic(ttype);
+ register_node_type_sh_mix_shader(ttype);
+ register_node_type_sh_add_shader(ttype);
+
+ register_node_type_sh_output_lamp(ttype);
+ register_node_type_sh_output_material(ttype);
+ register_node_type_sh_output_world(ttype);
+
+ register_node_type_sh_tex_image(ttype);
+ register_node_type_sh_tex_environment(ttype);
+ register_node_type_sh_tex_sky(ttype);
+ register_node_type_sh_tex_noise(ttype);
+ register_node_type_sh_tex_wave(ttype);
+ register_node_type_sh_tex_voronoi(ttype);
+ register_node_type_sh_tex_musgrave(ttype);
+ register_node_type_sh_tex_gradient(ttype);
+ register_node_type_sh_tex_magic(ttype);
+}
+
+static void registerTextureNodes(bNodeTreeType *ttype)
+{
+ register_node_type_frame(ttype);
+
+ register_node_type_tex_group(ttype);
+// register_node_type_tex_forloop(ttype);
+// register_node_type_tex_whileloop(ttype);
+
+ register_node_type_tex_math(ttype);
+ register_node_type_tex_mix_rgb(ttype);
+ register_node_type_tex_valtorgb(ttype);
+ register_node_type_tex_rgbtobw(ttype);
+ register_node_type_tex_valtonor(ttype);
+ register_node_type_tex_curve_rgb(ttype);
+ register_node_type_tex_curve_time(ttype);
+ register_node_type_tex_invert(ttype);
+ register_node_type_tex_hue_sat(ttype);
+ register_node_type_tex_coord(ttype);
+ register_node_type_tex_distance(ttype);
+ register_node_type_tex_compose(ttype);
+ register_node_type_tex_decompose(ttype);
+
+ register_node_type_tex_output(ttype);
+ register_node_type_tex_viewer(ttype);
+
+ register_node_type_tex_checker(ttype);
+ register_node_type_tex_texture(ttype);
+ register_node_type_tex_bricks(ttype);
+ register_node_type_tex_image(ttype);
+
+ register_node_type_tex_rotate(ttype);
+ register_node_type_tex_translate(ttype);
+ register_node_type_tex_scale(ttype);
+ register_node_type_tex_at(ttype);
+
+ register_node_type_tex_proc_voronoi(ttype);
+ register_node_type_tex_proc_blend(ttype);
+ register_node_type_tex_proc_magic(ttype);
+ register_node_type_tex_proc_marble(ttype);
+ register_node_type_tex_proc_clouds(ttype);
+ register_node_type_tex_proc_wood(ttype);
+ register_node_type_tex_proc_musgrave(ttype);
+ register_node_type_tex_proc_noise(ttype);
+ register_node_type_tex_proc_stucci(ttype);
+ register_node_type_tex_proc_distnoise(ttype);
}
static void free_dynamic_typeinfo(bNodeType *ntype)
@@ -2010,9 +2034,9 @@ static void free_typeinfos(ListBase *list)
void init_nodesystem(void)
{
- registerCompositNodes(&ntreeGetType(NTREE_COMPOSIT)->node_types);
- registerShaderNodes(&ntreeGetType(NTREE_SHADER)->node_types);
- registerTextureNodes(&ntreeGetType(NTREE_TEXTURE)->node_types);
+ registerCompositNodes(ntreeGetType(NTREE_COMPOSIT));
+ registerShaderNodes(ntreeGetType(NTREE_SHADER));
+ registerTextureNodes(ntreeGetType(NTREE_TEXTURE));
}
void free_nodesystem(void)
diff --git a/source/blender/blenkernel/intern/ocean.c b/source/blender/blenkernel/intern/ocean.c
index 67cedb7afab..b8f96fa732d 100644
--- a/source/blender/blenkernel/intern/ocean.c
+++ b/source/blender/blenkernel/intern/ocean.c
@@ -1018,7 +1018,7 @@ static void cache_filename(char *string, const char *path, const char *relbase,
BLI_join_dirfile(cachepath, sizeof(cachepath), path, fname);
- BKE_makepicstring(string, cachepath, relbase, frame, R_OPENEXR, 1, TRUE);
+ BKE_makepicstring(string, cachepath, relbase, frame, R_IMF_IMTYPE_OPENEXR, 1, TRUE);
}
void BKE_free_ocean_cache(struct OceanCache *och)
@@ -1185,6 +1185,8 @@ void BKE_bake_ocean(struct Ocean *o, struct OceanCache *och, void (*update_cb)(v
* before use - campbell */
OceanResult ocr;
+ ImageFormatData imf= {0};
+
int f, i=0, x, y, cancel=0;
float progress;
@@ -1201,6 +1203,13 @@ void BKE_bake_ocean(struct Ocean *o, struct OceanCache *och, void (*update_cb)(v
BLI_srand(0);
+ /* setup image format */
+ imf.imtype= R_IMF_IMTYPE_OPENEXR;
+ imf.depth= R_IMF_CHAN_DEPTH_16;
+ imf.exr_codec= R_IMF_EXR_CODEC_ZIP; /* ZIP */
+
+
+
for (f=och->start, i=0; f<=och->end; f++, i++) {
/* create a new imbuf to store image for this frame */
@@ -1292,18 +1301,18 @@ void BKE_bake_ocean(struct Ocean *o, struct OceanCache *och, void (*update_cb)(v
/* write the images */
cache_filename(string, och->bakepath, och->relbase, f, CACHE_TYPE_DISPLACE);
- if(0 == BKE_write_ibuf(ibuf_disp, string, R_OPENEXR, R_OPENEXR_HALF, 2)) // 2 == ZIP exr codec
+ if(0 == BKE_write_ibuf(ibuf_disp, string, &imf)) // 2 == ZIP exr codec
printf("Cannot save Displacement File Output to %s\n", string);
if (o->_do_jacobian) {
cache_filename(string, och->bakepath, och->relbase, f, CACHE_TYPE_FOAM);
- if(0 == BKE_write_ibuf(ibuf_foam, string, R_OPENEXR, R_OPENEXR_HALF, 2)) // 2 == ZIP exr codec
+ if(0 == BKE_write_ibuf(ibuf_foam, string, &imf)) // 2 == ZIP exr codec
printf("Cannot save Foam File Output to %s\n", string);
}
if (o->_do_normals) {
cache_filename(string, och->bakepath, och->relbase, f, CACHE_TYPE_NORMAL);
- if(0 == BKE_write_ibuf(ibuf_normal, string, R_OPENEXR, R_OPENEXR_HALF, 2)) // 2 == ZIP exr codec
+ if(0 == BKE_write_ibuf(ibuf_normal, string, &imf)) // 2 == ZIP exr codec
printf("Cannot save Normal File Output to %s\n", string);
}
@@ -1404,8 +1413,9 @@ void BKE_ocean_cache_eval_ij(struct OceanCache *UNUSED(och), struct OceanResult
{
}
-struct OceanCache *BKE_init_ocean_cache(const char *UNUSED(bakepath), const char *UNUSED(relbase), int UNUSED(start), int UNUSED(end), float UNUSED(wave_scale),
- float UNUSED(chop_amount), float UNUSED(foam_coverage), float UNUSED(foam_fade), int UNUSED(resolution))
+struct OceanCache *BKE_init_ocean_cache(const char *UNUSED(bakepath), const char *UNUSED(relbase),
+ int UNUSED(start), int UNUSED(end), float UNUSED(wave_scale),
+ float UNUSED(chop_amount), float UNUSED(foam_coverage), float UNUSED(foam_fade), int UNUSED(resolution))
{
OceanCache *och = MEM_callocN(sizeof(OceanCache), "ocean cache data");
diff --git a/source/blender/blenkernel/intern/scene.c b/source/blender/blenkernel/intern/scene.c
index 483e95f2abb..b7aa02b2f7b 100644
--- a/source/blender/blenkernel/intern/scene.c
+++ b/source/blender/blenkernel/intern/scene.c
@@ -347,9 +347,11 @@ Scene *add_scene(const char *name)
sce->r.mblur_samples= 1;
sce->r.filtertype= R_FILTER_MITCH;
sce->r.size= 50;
- sce->r.planes= 24;
- sce->r.imtype= R_PNG;
- sce->r.quality= 90;
+
+ sce->r.im_format.planes= R_IMF_PLANES_RGB;
+ sce->r.im_format.imtype= R_IMF_IMTYPE_PNG;
+ sce->r.im_format.quality= 90;
+
sce->r.displaymode= R_OUTPUT_AREA;
sce->r.framapto= 100;
sce->r.images= 100;
diff --git a/source/blender/blenkernel/intern/sequencer.c b/source/blender/blenkernel/intern/sequencer.c
index 5d35867d9c3..880bdbfaa96 100644
--- a/source/blender/blenkernel/intern/sequencer.c
+++ b/source/blender/blenkernel/intern/sequencer.c
@@ -1327,8 +1327,8 @@ static void seq_proxy_build_frame(SeqRenderData context,
ibuf->ftype= JPG | quality;
/* unsupported feature only confuses other s/w */
- if(ibuf->depth==32)
- ibuf->depth= 24;
+ if(ibuf->planes==32)
+ ibuf->planes= 24;
BLI_make_existing_file(name);
@@ -1729,7 +1729,7 @@ static ImBuf * input_preprocess(
}
if(seq->flag & SEQ_MAKE_PREMUL) {
- if(ibuf->depth == 32 && ibuf->zbuf == NULL) {
+ if(ibuf->planes == 32 && ibuf->zbuf == NULL) {
IMB_premultiply_alpha(ibuf);
}
}
diff --git a/source/blender/blenkernel/intern/subsurf_ccg.c b/source/blender/blenkernel/intern/subsurf_ccg.c
index 5f23b547e98..a23037c5366 100644
--- a/source/blender/blenkernel/intern/subsurf_ccg.c
+++ b/source/blender/blenkernel/intern/subsurf_ccg.c
@@ -1412,8 +1412,6 @@ static void ccgdm_pbvh_update(CCGDerivedMesh *ccgdm)
static void ccgDM_drawEdges(DerivedMesh *dm, int drawLooseEdges, int UNUSED(drawAllEdges)) {
CCGDerivedMesh *ccgdm = (CCGDerivedMesh*) dm;
CCGSubSurf *ss = ccgdm->ss;
- CCGEdgeIterator *ei = ccgSubSurf_getEdgeIterator(ss);
- CCGFaceIterator *fi = ccgSubSurf_getFaceIterator(ss);
int i, j, edgeSize = ccgSubSurf_getEdgeSize(ss);
int totedge = ccgSubSurf_getNumEdges(ss);
int gridSize = ccgSubSurf_getGridSize(ss);
@@ -1451,8 +1449,10 @@ static void ccgDM_drawEdges(DerivedMesh *dm, int drawLooseEdges, int UNUSED(draw
}
if (ccgdm->drawInteriorEdges) {
- for (; !ccgFaceIterator_isStopped(fi); ccgFaceIterator_next(fi)) {
- CCGFace *f = ccgFaceIterator_getCurrent(fi);
+ int totface = ccgSubSurf_getNumFaces(ss);
+
+ for(j = 0; j < totface; j++) {
+ CCGFace *f = ccgdm->faceMap[j].face;
int S, x, y, numVerts = ccgSubSurf_getFaceNumVerts(f);
for (S=0; S<numVerts; S++) {
@@ -1477,18 +1477,15 @@ static void ccgDM_drawEdges(DerivedMesh *dm, int drawLooseEdges, int UNUSED(draw
}
}
}
-
- ccgFaceIterator_free(fi);
- ccgEdgeIterator_free(ei);
}
static void ccgDM_drawLooseEdges(DerivedMesh *dm) {
CCGDerivedMesh *cgdm = (CCGDerivedMesh*) dm;
CCGSubSurf *ss = cgdm->ss;
- CCGEdgeIterator *ei = ccgSubSurf_getEdgeIterator(ss);
- int i, edgeSize = ccgSubSurf_getEdgeSize(ss);
+ int totedge = ccgSubSurf_getNumEdges(ss);
+ int i, j, edgeSize = ccgSubSurf_getEdgeSize(ss);
- for (; !ccgEdgeIterator_isStopped(ei); ccgEdgeIterator_next(ei)) {
- CCGEdge *e = ccgEdgeIterator_getCurrent(ei);
+ for (j=0; j< totedge; j++) {
+ CCGEdge *e = ccgdm->edgeMap[j].edge;
DMGridData *edgeData = ccgSubSurf_getEdgeDataArray(ss, e);
if (!ccgSubSurf_getEdgeNumFaces(e)) {
@@ -1500,8 +1497,6 @@ static void ccgDM_drawLooseEdges(DerivedMesh *dm) {
glEnd();
}
}
-
- ccgEdgeIterator_free(ei);
}
static void ccgDM_glNormalFast(float *a, float *b, float *c, float *d)
@@ -1522,10 +1517,11 @@ static void ccgDM_glNormalFast(float *a, float *b, float *c, float *d)
static void ccgDM_drawFacesSolid(DerivedMesh *dm, float (*partial_redraw_planes)[4], int fast, int (*setMaterial)(int, void *attribs)) {
CCGDerivedMesh *ccgdm = (CCGDerivedMesh*) dm;
CCGSubSurf *ss = ccgdm->ss;
- CCGFaceIterator *fi;
int gridSize = ccgSubSurf_getGridSize(ss);
char *faceFlags = ccgdm->faceFlags;
int step = (fast)? gridSize-1: 1;
+ int i, totface = ccgSubSurf_getNumFaces(ss);
+ int drawcurrent = 0, matnr = -1, shademodel = -1;
ccgdm_pbvh_update(ccgdm);
@@ -1543,30 +1539,37 @@ static void ccgDM_drawFacesSolid(DerivedMesh *dm, float (*partial_redraw_planes)
return;
}
- fi = ccgSubSurf_getFaceIterator(ss);
- for (; !ccgFaceIterator_isStopped(fi); ccgFaceIterator_next(fi)) {
- CCGFace *f = ccgFaceIterator_getCurrent(fi);
+ for(i = 0; i < totface; i++) {
+ CCGFace *f = ccgdm->faceMap[i].face;
int S, x, y, numVerts = ccgSubSurf_getFaceNumVerts(f);
int index = GET_INT_FROM_POINTER(ccgSubSurf_getFaceFaceHandle(ss, f));
- int drawSmooth, mat_nr;
+ int new_matnr, new_shademodel;
if(faceFlags) {
- drawSmooth = (faceFlags[index*2] & ME_SMOOTH);
- mat_nr= faceFlags[index*2 + 1];
+ new_shademodel = (faceFlags[index*2] & ME_SMOOTH)? GL_SMOOTH: GL_FLAT;
+ new_matnr= faceFlags[index*2 + 1];
}
else {
- drawSmooth = 1;
- mat_nr= 0;
+ new_shademodel = GL_SMOOTH;
+ new_matnr= 0;
}
- if (!setMaterial(mat_nr+1, NULL))
+ if(shademodel != new_shademodel || matnr != new_matnr) {
+ matnr= new_matnr;
+ shademodel= new_shademodel;
+
+ drawcurrent= setMaterial(matnr+1, NULL);
+
+ glShadeModel(shademodel);
+ }
+
+ if(!drawcurrent)
continue;
- glShadeModel(drawSmooth? GL_SMOOTH: GL_FLAT);
for (S=0; S<numVerts; S++) {
DMGridData *faceGridData = ccgSubSurf_getFaceGridDataArray(ss, f, S);
- if (drawSmooth) {
+ if (shademodel == GL_SMOOTH) {
for (y=0; y<gridSize-1; y+=step) {
glBegin(GL_QUAD_STRIP);
for (x=0; x<gridSize; x+=step) {
@@ -1601,15 +1604,12 @@ static void ccgDM_drawFacesSolid(DerivedMesh *dm, float (*partial_redraw_planes)
}
}
}
-
- ccgFaceIterator_free(fi);
}
/* Only used by non-editmesh types */
static void cgdm_drawMappedFacesGLSL(DerivedMesh *dm, int (*setMaterial)(int, void *attribs), int (*setDrawOptions)(void *userData, int index), void *userData) {
CCGDerivedMesh *cgdm = (CCGDerivedMesh*) dm;
CCGSubSurf *ss = cgdm->ss;
- CCGFaceIterator *fi = ccgSubSurf_getFaceIterator(ss);
GPUVertexAttribs gattribs;
DMVertexAttribs attribs= {{{NULL}}};
/* MTFace *tf = dm->getTessFaceDataArray(dm, CD_MTFACE); */ /* UNUSED */
@@ -1742,8 +1742,6 @@ static void cgdm_drawMappedFacesGLSL(DerivedMesh *dm, int (*setMaterial)(int, vo
}
#undef PASSATTRIB
-
- ccgFaceIterator_free(fi);
}
static void cgdm_drawFacesGLSL(DerivedMesh *dm, int (*setMaterial)(int, void *attribs)) {
@@ -1754,7 +1752,6 @@ static void cgdm_drawFacesGLSL(DerivedMesh *dm, int (*setMaterial)(int, void *at
static void cgdm_drawMappedFacesMat(DerivedMesh *dm, void (*setMaterial)(void *userData, int, void *attribs), int (*setFace)(void *userData, int index), void *userData) {
CCGDerivedMesh *ccgdm = (CCGDerivedMesh*) dm;
CCGSubSurf *ss = ccgdm->ss;
- CCGFaceIterator *fi = ccgSubSurf_getFaceIterator(ss);
GPUVertexAttribs gattribs;
DMVertexAttribs attribs= {{{NULL}}};
int gridSize = ccgSubSurf_getGridSize(ss);
@@ -1894,18 +1891,15 @@ static void cgdm_drawMappedFacesMat(DerivedMesh *dm, void (*setMaterial)(void *u
}
#undef PASSATTRIB
-
- ccgFaceIterator_free(fi);
}
static void cgdm_drawFacesColored(DerivedMesh *dm, int UNUSED(useTwoSided), unsigned char *col1, unsigned char *col2) {
CCGDerivedMesh *cgdm = (CCGDerivedMesh*) dm;
CCGSubSurf *ss = cgdm->ss;
- CCGFaceIterator *fi = ccgSubSurf_getFaceIterator(ss);
int gridSize = ccgSubSurf_getGridSize(ss);
unsigned char *cp1, *cp2;
- int useTwoSide=1;
+ int useTwoSide=1, i, totface;
ccgdm_pbvh_update(cgdm);
@@ -1924,8 +1918,9 @@ static void cgdm_drawFacesColored(DerivedMesh *dm, int UNUSED(useTwoSided), unsi
}
glBegin(GL_QUADS);
- for (; !ccgFaceIterator_isStopped(fi); ccgFaceIterator_next(fi)) {
- CCGFace *f = ccgFaceIterator_getCurrent(fi);
+ totface = ccgSubSurf_getNumFaces(ss);
+ for(i = 0; i < totface; i++) {
+ CCGFace *f = ccgdm->faceMap[i].face;
int S, x, y, numVerts = ccgSubSurf_getFaceNumVerts(f);
for (S=0; S<numVerts; S++) {
@@ -1964,8 +1959,6 @@ static void cgdm_drawFacesColored(DerivedMesh *dm, int UNUSED(useTwoSided), unsi
}
}
glEnd();
-
- ccgFaceIterator_free(fi);
}
static void cgdm_drawFacesTex_common(DerivedMesh *dm,
diff --git a/source/blender/blenkernel/intern/tracking.c b/source/blender/blenkernel/intern/tracking.c
index 49e6d598ea2..474b00e626b 100644
--- a/source/blender/blenkernel/intern/tracking.c
+++ b/source/blender/blenkernel/intern/tracking.c
@@ -231,9 +231,12 @@ MovieTrackingTrack *BKE_tracking_add_track(MovieTracking *tracking, float x, flo
void BKE_tracking_insert_marker(MovieTrackingTrack *track, MovieTrackingMarker *marker)
{
- MovieTrackingMarker *old_marker= BKE_tracking_get_marker(track, marker->framenr);
+ MovieTrackingMarker *old_marker= NULL;
- if(old_marker && old_marker->framenr==marker->framenr) {
+ if(track->markersnr)
+ old_marker= BKE_tracking_exact_marker(track, marker->framenr);
+
+ if(old_marker) {
*old_marker= *marker;
} else {
int a= track->markersnr;
@@ -324,7 +327,7 @@ MovieTrackingMarker *BKE_tracking_ensure_marker(MovieTrackingTrack *track, int f
{
MovieTrackingMarker *marker= BKE_tracking_get_marker(track, framenr);
- if(marker && marker->framenr!=framenr) {
+ if(marker->framenr!=framenr) {
MovieTrackingMarker marker_new;
marker_new= *marker;
@@ -341,7 +344,7 @@ MovieTrackingMarker *BKE_tracking_exact_marker(MovieTrackingTrack *track, int fr
{
MovieTrackingMarker *marker= BKE_tracking_get_marker(track, framenr);
- if(marker && marker->framenr!=framenr)
+ if(marker->framenr!=framenr)
return NULL;
return marker;
@@ -440,7 +443,6 @@ void BKE_tracking_clear_path(MovieTrackingTrack *track, int ref_frame, int actio
int BKE_tracking_test_join_tracks(MovieTrackingTrack *dst_track, MovieTrackingTrack *src_track)
{
int a= 0, b= 0;
- /* int tot= dst_track->markersnr+src_track->markersnr; */ /* UNUSED */
int count= 0;
while(a<src_track->markersnr || b<dst_track->markersnr) {
@@ -858,13 +860,11 @@ static unsigned char *get_search_bytebuf(ImBuf *ibuf, MovieTrackingTrack *track,
static ImBuf *get_frame_ibuf(MovieTrackingContext *context, int framenr)
{
ImBuf *ibuf;
- int framenr_old= context->user.framenr;
-
- context->user.framenr= framenr;
+ MovieClipUser user= context->user;
- ibuf= BKE_movieclip_get_ibuf_flag(context->clip, &context->user, 0);
+ user.framenr= framenr;
- context->user.framenr= framenr_old;
+ ibuf= BKE_movieclip_get_ibuf_flag(context->clip, &user, 0);
return ibuf;
}
@@ -1050,9 +1050,9 @@ int BKE_tracking_next(MovieTrackingContext *context)
for(a= 0; a<context->num_tracks; a++) {
TrackContext *track_context= &context->track_context[a];
MovieTrackingTrack *track= track_context->track;
- MovieTrackingMarker *marker= BKE_tracking_get_marker(track, curfra);
+ MovieTrackingMarker *marker= BKE_tracking_exact_marker(track, curfra);
- if(marker && (marker->flag&MARKER_DISABLED)==0 && marker->framenr==curfra) {
+ if(marker && (marker->flag&MARKER_DISABLED)==0) {
#ifdef WITH_LIBMV
int width, height, origin[2], tracked= 0, need_readjust= 0;
float pos[2], margin[2];
@@ -1921,10 +1921,8 @@ static float stabilization_auto_scale_factor(MovieTracking *tracking, int width,
while(track) {
if(track->flag&TRACK_USE_2D_STAB ||
((stab->flag&TRACKING_STABILIZE_ROTATION) && track==stab->rot_track)) {
- if(track->markersnr) {
- sfra= MIN2(sfra, track->markers[0].framenr);
- efra= MAX2(efra, track->markers[track->markersnr-1].framenr);
- }
+ sfra= MIN2(sfra, track->markers[0].framenr);
+ efra= MAX2(efra, track->markers[track->markersnr-1].framenr);
}
track= track->next;
@@ -2024,7 +2022,7 @@ static ImBuf* stabilize_alloc_ibuf(ImBuf *cacheibuf, ImBuf *srcibuf, int fill)
}
}
else {
- cacheibuf= IMB_allocImBuf(srcibuf->x, srcibuf->y, srcibuf->depth, flags);
+ cacheibuf= IMB_allocImBuf(srcibuf->x, srcibuf->y, srcibuf->planes, flags);
cacheibuf->profile= srcibuf->profile;
}
diff --git a/source/blender/blenkernel/intern/writeavi.c b/source/blender/blenkernel/intern/writeavi.c
index 03091a08c58..8cd30912840 100644
--- a/source/blender/blenkernel/intern/writeavi.c
+++ b/source/blender/blenkernel/intern/writeavi.c
@@ -67,7 +67,7 @@ static void filepath_avi(char *string, RenderData *rd);
#include "BKE_writeframeserver.h"
-bMovieHandle *BKE_get_movie_handle(int imtype)
+bMovieHandle *BKE_get_movie_handle(const char imtype)
{
static bMovieHandle mh;
@@ -80,14 +80,14 @@ bMovieHandle *BKE_get_movie_handle(int imtype)
/* do the platform specific handles */
#if defined(_WIN32) && !defined(FREE_WINDOWS)
- if (imtype == R_AVICODEC) {
+ if (imtype == R_IMF_IMTYPE_AVICODEC) {
//XXX mh.start_movie= start_avi_codec;
//XXX mh.append_movie= append_avi_codec;
//XXX mh.end_movie= end_avi_codec;
}
#endif
#ifdef WITH_QUICKTIME
- if (imtype == R_QUICKTIME) {
+ if (imtype == R_IMF_IMTYPE_QUICKTIME) {
mh.start_movie= start_qt;
mh.append_movie= append_qt;
mh.end_movie= end_qt;
@@ -95,7 +95,7 @@ bMovieHandle *BKE_get_movie_handle(int imtype)
}
#endif
#ifdef WITH_FFMPEG
- if (ELEM4(imtype, R_FFMPEG, R_H264, R_XVID, R_THEORA)) {
+ if (ELEM4(imtype, R_IMF_IMTYPE_FFMPEG, R_IMF_IMTYPE_H264, R_IMF_IMTYPE_XVID, R_IMF_IMTYPE_THEORA)) {
mh.start_movie = start_ffmpeg;
mh.append_movie = append_ffmpeg;
mh.end_movie = end_ffmpeg;
@@ -103,7 +103,7 @@ bMovieHandle *BKE_get_movie_handle(int imtype)
}
#endif
#ifdef WITH_FRAMESERVER
- if (imtype == R_FRAMESERVER) {
+ if (imtype == R_IMF_IMTYPE_FRAMESERVER) {
mh.start_movie = start_frameserver;
mh.append_movie = append_frameserver;
mh.end_movie = end_frameserver;
@@ -154,7 +154,7 @@ static int start_avi(Scene *scene, RenderData *rd, int rectx, int recty, ReportL
x = rectx;
y = recty;
- quality= rd->quality;
+ quality= rd->im_format.quality;
framerate= (double) rd->frs_sec / (double) rd->frs_sec_base;
avi = MEM_mallocN (sizeof(AviMovie), "avimovie");
@@ -162,7 +162,7 @@ static int start_avi(Scene *scene, RenderData *rd, int rectx, int recty, ReportL
/* RPW 11-21-2002
if (rd->imtype != AVI_FORMAT_MJPEG) format = AVI_FORMAT_AVI_RGB;
*/
- if (rd->imtype != R_AVIJPEG ) format = AVI_FORMAT_AVI_RGB;
+ if (rd->im_format.imtype != R_IMF_IMTYPE_AVIJPEG ) format = AVI_FORMAT_AVI_RGB;
else format = AVI_FORMAT_MJPEG;
if (AVI_open_compress (name, avi, 1, format) != AVI_ERROR_NONE) {
@@ -233,7 +233,7 @@ static void end_avi(void)
/* similar to BKE_makepicstring() */
void BKE_makeanimstring(char *string, RenderData *rd)
{
- bMovieHandle *mh= BKE_get_movie_handle(rd->imtype);
+ bMovieHandle *mh= BKE_get_movie_handle(rd->im_format.imtype);
if(mh->get_movie_path)
mh->get_movie_path(string, rd);
else
diff --git a/source/blender/blenkernel/intern/writeffmpeg.c b/source/blender/blenkernel/intern/writeffmpeg.c
index 3af724b4e30..aa7d71b1577 100644
--- a/source/blender/blenkernel/intern/writeffmpeg.c
+++ b/source/blender/blenkernel/intern/writeffmpeg.c
@@ -1337,7 +1337,7 @@ void ffmpeg_verify_image_type(RenderData *rd)
{
int audio= 0;
- if(rd->imtype == R_FFMPEG) {
+ if(rd->imtype == R_IMF_IMTYPE_FFMPEG) {
if(rd->ffcodecdata.type <= 0 ||
rd->ffcodecdata.codec <= 0 ||
rd->ffcodecdata.audio_codec <= 0 ||
@@ -1353,19 +1353,19 @@ void ffmpeg_verify_image_type(RenderData *rd)
audio= 1;
}
- else if(rd->imtype == R_H264) {
+ else if(rd->imtype == R_IMF_IMTYPE_H264) {
if(rd->ffcodecdata.codec != CODEC_ID_H264) {
ffmpeg_set_preset(rd, FFMPEG_PRESET_H264);
audio= 1;
}
}
- else if(rd->imtype == R_XVID) {
+ else if(rd->imtype == R_IMF_IMTYPE_XVID) {
if(rd->ffcodecdata.codec != CODEC_ID_MPEG4) {
ffmpeg_set_preset(rd, FFMPEG_PRESET_XVID);
audio= 1;
}
}
- else if(rd->imtype == R_THEORA) {
+ else if(rd->imtype == R_IMF_IMTYPE_THEORA) {
if(rd->ffcodecdata.codec != CODEC_ID_THEORA) {
ffmpeg_set_preset(rd, FFMPEG_PRESET_THEORA);
audio= 1;
diff --git a/source/blender/blenlib/BLI_string_utf8.h b/source/blender/blenlib/BLI_string_utf8.h
index 69b5612b118..6eba7d5eb49 100644
--- a/source/blender/blenlib/BLI_string_utf8.h
+++ b/source/blender/blenlib/BLI_string_utf8.h
@@ -32,6 +32,7 @@ extern "C" {
#endif
char *BLI_strncpy_utf8(char *dst, const char *src, size_t maxncpy);
+char *BLI_strncat_utf8(char *dst, const char *src, size_t maxncpy);
int BLI_utf8_invalid_byte(const char *str, int length);
int BLI_utf8_invalid_strip(char *str, int length);
diff --git a/source/blender/blenlib/intern/path_util.c b/source/blender/blenlib/intern/path_util.c
index 1101a7a246a..217e7687092 100644
--- a/source/blender/blenlib/intern/path_util.c
+++ b/source/blender/blenlib/intern/path_util.c
@@ -45,6 +45,7 @@
#include "BLI_fileops.h"
#include "BLI_path_util.h"
#include "BLI_string.h"
+#include "BLI_string_utf8.h"
#include "BLI_utildefines.h"
#include "BKE_utildefines.h"
@@ -221,16 +222,25 @@ int BLI_uniquename_cb(int (*unique_check)(void *, const char *), void *arg, cons
}
if(unique_check(arg, name)) {
+ char numstr[16];
char tempname[UNIQUE_NAME_MAX];
char left[UNIQUE_NAME_MAX];
int number;
int len= BLI_split_name_num(left, &number, name, delim);
do {
- int newlen= BLI_snprintf(tempname, name_len, "%s%c%03d", left, delim, ++number);
- if(newlen >= name_len) {
- len -= ((newlen + 1) - name_len);
- if(len < 0) len= number= 0;
- left[len]= '\0';
+ int numlen= BLI_snprintf(numstr, sizeof(numstr), "%c%03d", delim, ++number);
+
+ /* highly unlikely the string only has enough room for the number
+ * but support anyway */
+ if ((len == 0) || (numlen >= name_len)) {
+ /* number is know not to be utf-8 */
+ BLI_strncpy(tempname, numstr, name_len);
+ }
+ else {
+ char *tempname_buf;
+ tempname[0]= '\0';
+ tempname_buf =BLI_strncat_utf8(tempname, left, name_len - numlen);
+ memcpy(tempname_buf, numstr, numlen + 1);
}
} while(unique_check(arg, tempname));
diff --git a/source/blender/blenlib/intern/string_utf8.c b/source/blender/blenlib/intern/string_utf8.c
index f8cdc3ec873..89136f270e2 100644
--- a/source/blender/blenlib/intern/string_utf8.c
+++ b/source/blender/blenlib/intern/string_utf8.c
@@ -163,28 +163,46 @@ static const size_t utf8_skip_data[256] = {
3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,5,5,5,5,6,6,1,1
};
+#define BLI_STR_UTF8_CPY(dst, src, maxncpy) \
+ { \
+ size_t utf8_size; \
+ while(*src != '\0' && (utf8_size= utf8_skip_data[*src]) < maxncpy) { \
+ maxncpy -= utf8_size; \
+ switch(utf8_size) { \
+ case 6: *dst ++ = *src ++; \
+ case 5: *dst ++ = *src ++; \
+ case 4: *dst ++ = *src ++; \
+ case 3: *dst ++ = *src ++; \
+ case 2: *dst ++ = *src ++; \
+ case 1: *dst ++ = *src ++; \
+ } \
+ } \
+ *dst= '\0'; \
+ }
+
char *BLI_strncpy_utf8(char *dst, const char *src, size_t maxncpy)
{
char *dst_r= dst;
- size_t utf8_size;
/* note: currently we dont attempt to deal with invalid utf8 chars */
+ BLI_STR_UTF8_CPY(dst, src, maxncpy)
- while(*src != '\0' && (utf8_size= utf8_skip_data[*src]) < maxncpy) {
- maxncpy -= utf8_size;
- switch(utf8_size) {
- case 6: *dst ++ = *src ++;
- case 5: *dst ++ = *src ++;
- case 4: *dst ++ = *src ++;
- case 3: *dst ++ = *src ++;
- case 2: *dst ++ = *src ++;
- case 1: *dst ++ = *src ++;
- }
- }
- *dst= '\0';
return dst_r;
}
+char *BLI_strncat_utf8(char *dst, const char *src, size_t maxncpy)
+{
+ while (*dst && maxncpy > 0) {
+ dst++;
+ maxncpy--;
+ }
+
+ BLI_STR_UTF8_CPY(dst, src, maxncpy)
+
+ return dst;
+}
+
+#undef BLI_STR_UTF8_CPY
/* --------------------------------------------------------------------------*/
/* wchar_t / utf8 functions */
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index b58a27f556a..f49a6bec41f 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -7430,6 +7430,67 @@ static void do_versions_nodetree_convert_angle(bNodeTree *ntree)
}
}
+void do_versions_image_settings_2_60(Scene *sce)
+{
+ /* note: rd->subimtype is moved into indervidual settings now and no longer
+ * exists */
+ RenderData *rd= &sce->r;
+ ImageFormatData *imf= &sce->r.im_format;
+
+ imf->imtype= rd->imtype;
+ imf->planes= rd->planes;
+ imf->compress= rd->quality;
+ imf->quality= rd->quality;
+
+ /* default, was stored in multiple places, may override later */
+ imf->depth= R_IMF_CHAN_DEPTH_8;
+
+ /* openexr */
+ imf->exr_codec = rd->quality & 7; /* strange but true! 0-4 are valid values, OPENEXR_COMPRESS */
+
+ switch (imf->imtype) {
+ case R_IMF_IMTYPE_OPENEXR:
+ imf->depth= (rd->subimtype & R_OPENEXR_HALF) ? R_IMF_CHAN_DEPTH_16 : R_IMF_CHAN_DEPTH_32;
+ if (rd->subimtype & R_PREVIEW_JPG) {
+ imf->flag |= R_IMF_FLAG_PREVIEW_JPG;
+ }
+ if (rd->subimtype & R_OPENEXR_ZBUF) {
+ imf->flag |= R_IMF_FLAG_ZBUF;
+ }
+ break;
+ case R_IMF_IMTYPE_TIFF:
+ if (rd->subimtype & R_TIFF_16BIT) {
+ imf->depth= R_IMF_CHAN_DEPTH_16;
+ }
+ break;
+ case R_IMF_IMTYPE_JP2:
+ if (rd->subimtype & R_JPEG2K_16BIT) {
+ imf->depth= R_IMF_CHAN_DEPTH_16;
+ }
+ else if (rd->subimtype & R_JPEG2K_12BIT) {
+ imf->depth= R_IMF_CHAN_DEPTH_12;
+ }
+
+ if (rd->subimtype & R_JPEG2K_YCC) {
+ imf->jp2_flag |= R_IMF_JP2_FLAG_YCC;
+ }
+ if (rd->subimtype & R_JPEG2K_CINE_PRESET) {
+ imf->jp2_flag |= R_IMF_JP2_FLAG_CINE_PRESET;
+ }
+ if (rd->subimtype & R_JPEG2K_CINE_48FPS) {
+ imf->jp2_flag |= R_IMF_JP2_FLAG_CINE_48;
+ }
+ break;
+ case R_IMF_IMTYPE_CINEON:
+ case R_IMF_IMTYPE_DPX:
+ if (rd->subimtype & R_CINEON_LOG) {
+ imf->cineon_flag |= R_IMF_CINEON_FLAG_LOG;
+ }
+ break;
+ }
+
+}
+
static void do_versions(FileData *fd, Library *lib, Main *main)
{
/* WATCH IT!!!: pointers from libdata have not been converted */
@@ -12626,6 +12687,12 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
/* put compatibility code here until next subversion bump */
{
+ Scene *sce;
+ for(sce = main->scene.first; sce; sce = sce->id.next) {
+ if (sce->r.im_format.depth == 0) {
+ do_versions_image_settings_2_60(sce);
+ }
+ }
}
/* WATCH IT!!!: pointers from libdata have not been converted yet here! */
diff --git a/source/blender/editors/include/UI_interface.h b/source/blender/editors/include/UI_interface.h
index a0b477413e4..458fe175fbb 100644
--- a/source/blender/editors/include/UI_interface.h
+++ b/source/blender/editors/include/UI_interface.h
@@ -515,7 +515,7 @@ uiBut *uiDefHotKeyevtButS(uiBlock *block, int retval, const char *str, int x1, i
uiBut *uiDefSearchBut(uiBlock *block, void *arg, int retval, int icon, int maxlen, int x1, int y1, short x2, short y2, float a1, float a2, const char *tip);
uiBut *uiDefAutoButR(uiBlock *block, struct PointerRNA *ptr, struct PropertyRNA *prop, int index, const char *name, int icon, int x1, int y1, int x2, int y2);
-int uiDefAutoButsRNA(uiLayout *layout, struct PointerRNA *ptr, int (*check_prop)(struct PropertyRNA *), const char label_align);
+int uiDefAutoButsRNA(uiLayout *layout, struct PointerRNA *ptr, int (*check_prop)(struct PointerRNA *, struct PropertyRNA *), const char label_align);
/* Links
*
@@ -688,7 +688,7 @@ uiBlock *uiLayoutGetBlock(uiLayout *layout);
void uiLayoutSetFunc(uiLayout *layout, uiMenuHandleFunc handlefunc, void *argv);
void uiLayoutSetContextPointer(uiLayout *layout, const char *name, struct PointerRNA *ptr);
const char *uiLayoutIntrospect(uiLayout *layout); // XXX - testing
-void uiLayoutOperatorButs(const struct bContext *C, struct uiLayout *layout, struct wmOperator *op, int (*check_prop)(struct PropertyRNA *), const char label_align, const short flag);
+void uiLayoutOperatorButs(const struct bContext *C, struct uiLayout *layout, struct wmOperator *op, int (*check_prop)(struct PointerRNA *, struct PropertyRNA *), const char label_align, const short flag);
struct MenuType *uiButGetMenuType(uiBut *but);
void uiLayoutSetOperatorContext(uiLayout *layout, int opcontext);
@@ -748,6 +748,7 @@ void uiTemplateColorWheel(uiLayout *layout, struct PointerRNA *ptr, const char *
void uiTemplateLayers(uiLayout *layout, struct PointerRNA *ptr, const char *propname,
PointerRNA *used_ptr, const char *used_propname, int active_layer);
void uiTemplateImage(uiLayout *layout, struct bContext *C, struct PointerRNA *ptr, const char *propname, struct PointerRNA *userptr, int compact);
+void uiTemplateImageSettings(uiLayout *layout, struct PointerRNA *imfptr);
void uiTemplateImageLayers(uiLayout *layout, struct bContext *C, struct Image *ima, struct ImageUser *iuser);
void uiTemplateRunningJobs(uiLayout *layout, struct bContext *C);
void uiTemplateOperatorSearch(uiLayout *layout);
diff --git a/source/blender/editors/interface/interface_layout.c b/source/blender/editors/interface/interface_layout.c
index c553c1e35ad..84f0c61cd0c 100644
--- a/source/blender/editors/interface/interface_layout.c
+++ b/source/blender/editors/interface/interface_layout.c
@@ -2743,7 +2743,7 @@ const char *uiLayoutIntrospect(uiLayout *layout)
}
/* this function does not initialize the layout, functions can be called on the layout before and after */
-void uiLayoutOperatorButs(const bContext *C, uiLayout *layout, wmOperator *op,int (*check_prop)(struct PropertyRNA *), const char label_align, const short flag)
+void uiLayoutOperatorButs(const bContext *C, uiLayout *layout, wmOperator *op,int (*check_prop)(struct PointerRNA *, struct PropertyRNA *), const char label_align, const short flag)
{
if(!op->properties) {
IDPropertyTemplate val = {0};
diff --git a/source/blender/editors/interface/interface_regions.c b/source/blender/editors/interface/interface_regions.c
index 47dde3f03f0..d117a7f4e6e 100644
--- a/source/blender/editors/interface/interface_regions.c
+++ b/source/blender/editors/interface/interface_regions.c
@@ -385,7 +385,7 @@ ARegion *ui_tooltip_create(bContext *C, ARegion *butregion, uiBut *but)
for(i=0; i<totitem; i++) {
if(item[i].identifier[0] && item[i].value == value) {
- if(item[i].description[0]) {
+ if(item[i].description && item[i].description[0]) {
BLI_snprintf(data->lines[data->totline], sizeof(data->lines[0]), "%s: %s", item[i].name, item[i].description);
data->color[data->totline]= 0xDDDDDD;
data->totline++;
diff --git a/source/blender/editors/interface/interface_utils.c b/source/blender/editors/interface/interface_utils.c
index 23d5e77b78d..8335668a624 100644
--- a/source/blender/editors/interface/interface_utils.c
+++ b/source/blender/editors/interface/interface_utils.c
@@ -130,7 +130,7 @@ uiBut *uiDefAutoButR(uiBlock *block, PointerRNA *ptr, PropertyRNA *prop, int ind
return but;
}
-int uiDefAutoButsRNA(uiLayout *layout, PointerRNA *ptr, int (*check_prop)(PropertyRNA *), const char label_align)
+int uiDefAutoButsRNA(uiLayout *layout, PointerRNA *ptr, int (*check_prop)(PointerRNA *, PropertyRNA *), const char label_align)
{
uiLayout *split, *col;
int flag;
@@ -141,7 +141,7 @@ int uiDefAutoButsRNA(uiLayout *layout, PointerRNA *ptr, int (*check_prop)(Proper
RNA_STRUCT_BEGIN(ptr, prop) {
flag= RNA_property_flag(prop);
- if(flag & PROP_HIDDEN || (check_prop && check_prop(prop)==FALSE))
+ if(flag & PROP_HIDDEN || (check_prop && check_prop(ptr, prop)==FALSE))
continue;
if(label_align != '\0') {
diff --git a/source/blender/editors/mesh/loopcut.c b/source/blender/editors/mesh/loopcut.c
index 5e144341b59..a6f71d9ec9f 100644
--- a/source/blender/editors/mesh/loopcut.c
+++ b/source/blender/editors/mesh/loopcut.c
@@ -72,6 +72,7 @@
#include "ED_space_api.h"
#include "ED_view3d.h"
#include "ED_mesh.h"
+#include "ED_numinput.h"
#include "RNA_access.h"
#include "RNA_define.h"
@@ -98,6 +99,7 @@ typedef struct tringselOpData {
Object *ob;
BMEditMesh *em;
BMEdge *eed;
+ NumInput num;
int extend;
int do_cut;
@@ -368,6 +370,11 @@ static int ringsel_init (bContext *C, wmOperator *op, int do_cut)
lcd->em= ((Mesh *)lcd->ob->data)->edit_btmesh;
lcd->extend = do_cut ? 0 : RNA_boolean_get(op->ptr, "extend");
lcd->do_cut = do_cut;
+
+ initNumInput(&lcd->num);
+ lcd->num.idx_max = 0;
+ lcd->num.flag |= NUM_NO_NEGATIVE | NUM_NO_FRACTION;
+
em_setup_viewcontext(C, &lcd->vc);
ED_region_tag_redraw(lcd->ar);
@@ -455,6 +462,7 @@ static int loopcut_modal (bContext *C, wmOperator *op, wmEvent *event)
ED_region_tag_redraw(lcd->ar);
break;
+ case PADPLUSKEY:
case PAGEUPKEY:
case WHEELUPMOUSE: /* change number of cuts */
if (event->val == KM_RELEASE)
@@ -466,6 +474,7 @@ static int loopcut_modal (bContext *C, wmOperator *op, wmEvent *event)
ED_region_tag_redraw(lcd->ar);
break;
+ case PADMINUS:
case PAGEDOWNKEY:
case WHEELDOWNMOUSE: /* change number of cuts */
if (event->val == KM_RELEASE)
@@ -495,6 +504,23 @@ static int loopcut_modal (bContext *C, wmOperator *op, wmEvent *event)
}
}
+ /* using the keyboard to input the number of cuts */
+ if (event->val==KM_PRESS) {
+ float value;
+
+ if (handleNumInput(&lcd->num, event))
+ {
+ applyNumInput(&lcd->num, &value);
+
+ cuts= CLAMPIS(value, 1, 32);
+
+ RNA_int_set(op->ptr,"number_cuts",cuts);
+ ringsel_find_edge(lcd, cuts);
+
+ ED_region_tag_redraw(lcd->ar);
+ }
+ }
+
/* keep going until the user confirms */
return OPERATOR_RUNNING_MODAL;
}
diff --git a/source/blender/editors/object/object_bake.c b/source/blender/editors/object/object_bake.c
index 68a58ae9223..0d3d732b598 100644
--- a/source/blender/editors/object/object_bake.c
+++ b/source/blender/editors/object/object_bake.c
@@ -1085,7 +1085,7 @@ static void clear_images(MTFace *mtface, int totface)
if((ima->id.flag&LIB_DOIT)==0) {
ImBuf *ibuf= BKE_image_get_ibuf(ima, NULL);
- IMB_rectfill(ibuf, (ibuf->depth == 32) ? vec_alpha : vec_solid);
+ IMB_rectfill(ibuf, (ibuf->planes == R_IMF_PLANES_RGBA) ? vec_alpha : vec_solid);
ima->id.flag|= LIB_DOIT;
}
}
diff --git a/source/blender/editors/object/object_edit.c b/source/blender/editors/object/object_edit.c
index 47f39066c76..6392672da26 100644
--- a/source/blender/editors/object/object_edit.c
+++ b/source/blender/editors/object/object_edit.c
@@ -2057,10 +2057,8 @@ static int game_property_copy_exec(bContext *C, wmOperator *op)
if(prop) {
CTX_DATA_BEGIN(C, Object*, ob_iter, selected_editable_objects) {
- if (ob != ob_iter) {
- if (ob->data != ob_iter->data)
- set_ob_property(ob_iter, prop);
- }
+ if (ob != ob_iter)
+ set_ob_property(ob_iter, prop);
} CTX_DATA_END;
}
}
@@ -2068,17 +2066,13 @@ static int game_property_copy_exec(bContext *C, wmOperator *op)
else {
CTX_DATA_BEGIN(C, Object*, ob_iter, selected_editable_objects) {
if (ob != ob_iter) {
- if (ob->data != ob_iter->data){
- if (type == COPY_PROPERTIES_REPLACE)
- copy_properties( &ob_iter->prop, &ob->prop );
-
- /* merge - the default when calling with no argument */
- else {
- for(prop = ob->prop.first; prop; prop= prop->next ) {
- set_ob_property(ob_iter, prop);
- }
- }
- }
+ if (type == COPY_PROPERTIES_REPLACE)
+ copy_properties(&ob_iter->prop, &ob->prop);
+
+ /* merge - the default when calling with no argument */
+ else
+ for(prop = ob->prop.first; prop; prop= prop->next)
+ set_ob_property(ob_iter, prop);
}
}
CTX_DATA_END;
diff --git a/source/blender/editors/render/render_internal.c b/source/blender/editors/render/render_internal.c
index 6931b0b86db..dbd1e27024e 100644
--- a/source/blender/editors/render/render_internal.c
+++ b/source/blender/editors/render/render_internal.c
@@ -235,7 +235,7 @@ static int screen_render_exec(bContext *C, wmOperator *op)
/* custom scene and single layer re-render */
screen_render_scene_layer_set(op, mainp, &scene, &srl);
- if(!is_animation && is_write_still && BKE_imtype_is_movie(scene->r.imtype)) {
+ if(!is_animation && is_write_still && BKE_imtype_is_movie(scene->r.im_format.imtype)) {
BKE_report(op->reports, RPT_ERROR, "Can't write a single file with an animation format selected");
return OPERATOR_CANCELLED;
}
@@ -516,7 +516,7 @@ static int screen_render_invoke(bContext *C, wmOperator *op, wmEvent *event)
return OPERATOR_CANCELLED;
}
- if(!is_animation && is_write_still && BKE_imtype_is_movie(scene->r.imtype)) {
+ if(!is_animation && is_write_still && BKE_imtype_is_movie(scene->r.im_format.imtype)) {
BKE_report(op->reports, RPT_ERROR, "Can't write a single file with an animation format selected");
return OPERATOR_CANCELLED;
}
diff --git a/source/blender/editors/render/render_opengl.c b/source/blender/editors/render/render_opengl.c
index 188a61181ce..a68286b8e88 100644
--- a/source/blender/editors/render/render_opengl.c
+++ b/source/blender/editors/render/render_opengl.c
@@ -220,12 +220,12 @@ static void screen_opengl_render_apply(OGLRender *oglrender)
char name[FILE_MAX];
int ok;
- if(scene->r.planes == 8) {
+ if(scene->r.im_format.planes == R_IMF_CHAN_DEPTH_8) {
IMB_color_to_bw(ibuf);
}
- BKE_makepicstring(name, scene->r.pic, oglrender->bmain->name, scene->r.cfra, scene->r.imtype, scene->r.scemode & R_EXTENSION, FALSE);
- ok= BKE_write_ibuf(ibuf, name, scene->r.imtype, scene->r.subimtype, scene->r.quality); /* no need to stamp here */
+ BKE_makepicstring(name, scene->r.pic, oglrender->bmain->name, scene->r.cfra, scene->r.im_format.imtype, scene->r.scemode & R_EXTENSION, FALSE);
+ ok= BKE_write_ibuf(ibuf, name, &scene->r.im_format); /* no need to stamp here */
if(ok) printf("OpenGL Render written to '%s'\n", name);
else printf("OpenGL Render failed to write '%s'\n", name);
}
@@ -263,7 +263,7 @@ static int screen_opengl_render_init(bContext *C, wmOperator *op)
return 0;
}
- if(!is_animation && is_write_still && BKE_imtype_is_movie(scene->r.imtype)) {
+ if(!is_animation && is_write_still && BKE_imtype_is_movie(scene->r.im_format.imtype)) {
BKE_report(op->reports, RPT_ERROR, "Can't write a single file with an animation format selected");
return 0;
}
@@ -332,7 +332,7 @@ static void screen_opengl_render_end(bContext *C, OGLRender *oglrender)
Scene *scene= oglrender->scene;
if(oglrender->mh) {
- if(BKE_imtype_is_movie(scene->r.imtype))
+ if(BKE_imtype_is_movie(scene->r.im_format.imtype))
oglrender->mh->end_movie();
}
@@ -371,8 +371,8 @@ static int screen_opengl_render_anim_initialize(bContext *C, wmOperator *op)
scene= oglrender->scene;
oglrender->reports= op->reports;
- oglrender->mh= BKE_get_movie_handle(scene->r.imtype);
- if(BKE_imtype_is_movie(scene->r.imtype)) {
+ oglrender->mh= BKE_get_movie_handle(scene->r.im_format.imtype);
+ if(BKE_imtype_is_movie(scene->r.im_format.imtype)) {
if(!oglrender->mh->start_movie(scene, &scene->r, oglrender->sizex, oglrender->sizey, oglrender->reports)) {
screen_opengl_render_end(C, oglrender);
return 0;
@@ -440,7 +440,7 @@ static int screen_opengl_render_anim_step(bContext *C, wmOperator *op)
if(ibuf) {
/* color -> greyscale */
/* editing directly would alter the render view */
- if(scene->r.planes == 8) {
+ if(scene->r.im_format.planes == R_IMF_PLANES_BW) {
ImBuf *ibuf_bw= IMB_dupImBuf(ibuf);
IMB_color_to_bw(ibuf_bw);
// IMB_freeImBuf(ibuf); /* owned by the image */
@@ -449,14 +449,14 @@ static int screen_opengl_render_anim_step(bContext *C, wmOperator *op)
else {
/* this is lightweight & doesnt re-alloc the buffers, only do this
* to save the correct bit depth since the image is always RGBA */
- ImBuf *ibuf_cpy= IMB_allocImBuf(ibuf->x, ibuf->y, scene->r.planes, 0);
+ ImBuf *ibuf_cpy= IMB_allocImBuf(ibuf->x, ibuf->y, scene->r.im_format.planes, 0);
ibuf_cpy->rect= ibuf->rect;
ibuf_cpy->rect_float= ibuf->rect_float;
ibuf_cpy->zbuf_float= ibuf->zbuf_float;
ibuf= ibuf_cpy;
}
- if(BKE_imtype_is_movie(scene->r.imtype)) {
+ if(BKE_imtype_is_movie(scene->r.im_format.imtype)) {
ok= oglrender->mh->append_movie(&scene->r, CFRA, (int*)ibuf->rect, oglrender->sizex, oglrender->sizey, oglrender->reports);
if(ok) {
printf("Append frame %d", scene->r.cfra);
@@ -464,8 +464,8 @@ static int screen_opengl_render_anim_step(bContext *C, wmOperator *op)
}
}
else {
- BKE_makepicstring(name, scene->r.pic, oglrender->bmain->name, scene->r.cfra, scene->r.imtype, scene->r.scemode & R_EXTENSION, TRUE);
- ok= BKE_write_ibuf_stamp(scene, camera, ibuf, name, scene->r.imtype, scene->r.subimtype, scene->r.quality);
+ BKE_makepicstring(name, scene->r.pic, oglrender->bmain->name, scene->r.cfra, scene->r.im_format.imtype, scene->r.scemode & R_EXTENSION, TRUE);
+ ok= BKE_write_ibuf_stamp(scene, camera, ibuf, name, &scene->r.im_format);
if(ok==0) {
printf("Write error: cannot save %s\n", name);
diff --git a/source/blender/editors/render/render_shading.c b/source/blender/editors/render/render_shading.c
index aca2d14b6bb..ba73bbdf31e 100644
--- a/source/blender/editors/render/render_shading.c
+++ b/source/blender/editors/render/render_shading.c
@@ -658,7 +658,7 @@ void TEXTURE_OT_slot_move(wmOperatorType *ot)
/********************** environment map operators *********************/
-static int save_envmap(wmOperator *op, Scene *scene, EnvMap *env, char *path, int imtype)
+static int save_envmap(wmOperator *op, Scene *scene, EnvMap *env, char *path, const char imtype)
{
float layout[12];
if ( RNA_struct_find_property(op->ptr, "layout") )
@@ -680,7 +680,7 @@ static int envmap_save_exec(bContext *C, wmOperator *op)
Tex *tex= CTX_data_pointer_get_type(C, "texture", &RNA_Texture).data;
Scene *scene = CTX_data_scene(C);
//int imtype = RNA_enum_get(op->ptr, "file_type");
- int imtype = scene->r.imtype;
+ char imtype = scene->r.im_format.imtype;
char path[FILE_MAX];
RNA_string_get(op->ptr, "filepath", path);
@@ -707,7 +707,7 @@ static int envmap_save_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event
if(RNA_property_is_set(op->ptr, "filepath"))
return envmap_save_exec(C, op);
- //RNA_enum_set(op->ptr, "file_type", scene->r.imtype);
+ //RNA_enum_set(op->ptr, "file_type", scene->r.im_format.imtype);
RNA_string_set(op->ptr, "filepath", G.main->name);
WM_event_add_fileselect(C, op);
diff --git a/source/blender/editors/screen/screendump.c b/source/blender/editors/screen/screendump.c
index 8a90aadbee2..48970dffce0 100644
--- a/source/blender/editors/screen/screendump.c
+++ b/source/blender/editors/screen/screendump.c
@@ -161,12 +161,12 @@ static int screenshot_exec(bContext *C, wmOperator *op)
/* BKE_add_image_extension() checks for if extension was already set */
if(scene->r.scemode & R_EXTENSION)
if(strlen(path)<FILE_MAXDIR+FILE_MAXFILE-5)
- BKE_add_image_extension(path, scene->r.imtype);
+ BKE_add_image_extension(path, scene->r.im_format.imtype);
ibuf= IMB_allocImBuf(scd->dumpsx, scd->dumpsy, 24, 0);
ibuf->rect= scd->dumprect;
- BKE_write_ibuf(ibuf, path, scene->r.imtype, scene->r.subimtype, scene->r.quality);
+ BKE_write_ibuf(ibuf, path, &scene->r.im_format);
IMB_freeImBuf(ibuf);
}
@@ -261,14 +261,14 @@ static void screenshot_startjob(void *sjv, short *stop, short *do_update, float
{
ScreenshotJob *sj= sjv;
RenderData rd= sj->scene->r;
- bMovieHandle *mh= BKE_get_movie_handle(sj->scene->r.imtype);
+ bMovieHandle *mh= BKE_get_movie_handle(sj->scene->r.im_format.imtype);
int cfra= 1;
/* we need this as local variables for renderdata */
rd.frs_sec= U.scrcastfps;
rd.frs_sec_base= 1.0f;
- if(BKE_imtype_is_movie(rd.imtype)) {
+ if(BKE_imtype_is_movie(rd.im_format.imtype)) {
if(!mh->start_movie(sj->scene, &rd, sj->dumpsx, sj->dumpsy, &sj->reports)) {
printf("screencast job stopped\n");
return;
@@ -294,14 +294,14 @@ static void screenshot_startjob(void *sjv, short *stop, short *do_update, float
break;
}
else {
- ImBuf *ibuf= IMB_allocImBuf(sj->dumpsx, sj->dumpsy, rd.planes, 0);
+ ImBuf *ibuf= IMB_allocImBuf(sj->dumpsx, sj->dumpsy, rd.im_format.planes, 0);
char name[FILE_MAXDIR+FILE_MAXFILE];
int ok;
- BKE_makepicstring(name, rd.pic, sj->bmain->name, cfra, rd.imtype, rd.scemode & R_EXTENSION, TRUE);
+ BKE_makepicstring(name, rd.pic, sj->bmain->name, cfra, rd.im_format.imtype, rd.scemode & R_EXTENSION, TRUE);
ibuf->rect= sj->dumprect;
- ok= BKE_write_ibuf(ibuf, name, rd.imtype, rd.subimtype, rd.quality);
+ ok= BKE_write_ibuf(ibuf, name, &rd.im_format);
if(ok==0) {
printf("Write error: cannot save %s\n", name);
diff --git a/source/blender/editors/sculpt_paint/paint_image.c b/source/blender/editors/sculpt_paint/paint_image.c
index 7ae5f433ff3..7625633ea6c 100644
--- a/source/blender/editors/sculpt_paint/paint_image.c
+++ b/source/blender/editors/sculpt_paint/paint_image.c
@@ -4337,7 +4337,7 @@ static ImBuf *imapaint_lift_clone(ImBuf *ibuf, ImBuf *ibufb, int *pos)
/* note: allocImbuf returns zero'd memory, so regions outside image will
have zero alpha, and hence not be blended onto the image */
int w=ibufb->x, h=ibufb->y, destx=0, desty=0, srcx=pos[0], srcy=pos[1];
- ImBuf *clonebuf= IMB_allocImBuf(w, h, ibufb->depth, ibufb->flags);
+ ImBuf *clonebuf= IMB_allocImBuf(w, h, ibufb->planes, ibufb->flags);
IMB_rectclip(clonebuf, ibuf, &destx, &desty, &srcx, &srcy, &w, &h);
IMB_rectblend(clonebuf, ibuf, destx, desty, srcx, srcy, w, h,
diff --git a/source/blender/editors/sound/sound_ops.c b/source/blender/editors/sound/sound_ops.c
index 623cfc48827..dd7ea81d520 100644
--- a/source/blender/editors/sound/sound_ops.c
+++ b/source/blender/editors/sound/sound_ops.c
@@ -265,7 +265,7 @@ static int sound_mixdown_invoke(bContext *C, wmOperator *op, wmEvent *event)
return WM_operator_filesel(C, op, event);
}
-static int sound_mixdown_draw_check_prop(PropertyRNA *prop)
+static int sound_mixdown_draw_check_prop(PointerRNA *UNUSED(ptr), PropertyRNA *prop)
{
const char *prop_id= RNA_property_identifier(prop);
return !( strcmp(prop_id, "filepath") == 0 ||
diff --git a/source/blender/editors/space_clip/clip_buttons.c b/source/blender/editors/space_clip/clip_buttons.c
index 43eb45b17a7..ddfd403806c 100644
--- a/source/blender/editors/space_clip/clip_buttons.c
+++ b/source/blender/editors/space_clip/clip_buttons.c
@@ -90,12 +90,14 @@ void uiTemplateMovieClip(uiLayout *layout, bContext *C, PointerRNA *ptr, const c
prop= RNA_struct_find_property(ptr, propname);
if(!prop) {
- printf("uiTemplateMovieClip: property not found: %s.%s\n", RNA_struct_identifier(ptr->type), propname);
+ printf("%s: property not found: %s.%s\n",
+ __func__, RNA_struct_identifier(ptr->type), propname);
return;
}
if(RNA_property_type(prop) != PROP_POINTER) {
- printf("uiTemplateMovieClip: expected pointer property for %s.%s\n", RNA_struct_identifier(ptr->type), propname);
+ printf("%s: expected pointer property for %s.%s\n",
+ __func__, RNA_struct_identifier(ptr->type), propname);
return;
}
@@ -136,12 +138,14 @@ void uiTemplateTrack(uiLayout *layout, PointerRNA *ptr, const char *propname)
prop= RNA_struct_find_property(ptr, propname);
if(!prop) {
- printf("uiTemplateTrack: property not found: %s.%s\n", RNA_struct_identifier(ptr->type), propname);
+ printf("%s: property not found: %s.%s\n",
+ __func__, RNA_struct_identifier(ptr->type), propname);
return;
}
if(RNA_property_type(prop) != PROP_POINTER) {
- printf("uiTemplateTrack: expected pointer property for %s.%s\n", RNA_struct_identifier(ptr->type), propname);
+ printf("%s: expected pointer property for %s.%s\n",
+ __func__, RNA_struct_identifier(ptr->type), propname);
return;
}
@@ -327,12 +331,14 @@ void uiTemplateMarker(uiLayout *layout, PointerRNA *ptr, const char *propname, P
prop= RNA_struct_find_property(ptr, propname);
if(!prop) {
- printf("uiTemplateMarker: property not found: %s.%s\n", RNA_struct_identifier(ptr->type), propname);
+ printf("%s: property not found: %s.%s\n",
+ __func__, RNA_struct_identifier(ptr->type), propname);
return;
}
if(RNA_property_type(prop) != PROP_POINTER) {
- printf("uiTemplateMarker: expected pointer property for %s.%s\n", RNA_struct_identifier(ptr->type), propname);
+ printf("%s: expected pointer property for %s.%s\n",
+ __func__, RNA_struct_identifier(ptr->type), propname);
return;
}
diff --git a/source/blender/editors/space_file/file_panels.c b/source/blender/editors/space_file/file_panels.c
index 7bcaf722827..26083cbe625 100644
--- a/source/blender/editors/space_file/file_panels.c
+++ b/source/blender/editors/space_file/file_panels.c
@@ -177,7 +177,7 @@ static void file_panel_operator_header(const bContext *C, Panel *pa)
BLI_strncpy(pa->drawname, op->type->name, sizeof(pa->drawname));
}
-static int file_panel_check_prop(PropertyRNA *prop)
+static int file_panel_check_prop(PointerRNA *UNUSED(ptr), PropertyRNA *prop)
{
const char *prop_id= RNA_property_identifier(prop);
return !( strcmp(prop_id, "filepath") == 0 ||
diff --git a/source/blender/editors/space_image/image_buttons.c b/source/blender/editors/space_image/image_buttons.c
index 5445f2e8c44..11a9c0d8d40 100644
--- a/source/blender/editors/space_image/image_buttons.c
+++ b/source/blender/editors/space_image/image_buttons.c
@@ -122,13 +122,13 @@ static void image_info(Scene *scene, ImageUser *iuser, Image *ima, ImBuf *ibuf,
if(ibuf->channels!=4) {
ofs+= sprintf(str+ofs, "%d float channel(s)", ibuf->channels);
}
- else if(ibuf->depth==32)
+ else if(ibuf->planes == R_IMF_PLANES_RGBA)
ofs+= sprintf(str+ofs, " RGBA float");
else
ofs+= sprintf(str+ofs, " RGB float");
}
else {
- if(ibuf->depth==32)
+ if(ibuf->planes == R_IMF_PLANES_RGBA)
ofs+= sprintf(str+ofs, " RGBA byte");
else
ofs+= sprintf(str+ofs, " RGB byte");
@@ -649,12 +649,14 @@ void uiTemplateImage(uiLayout *layout, bContext *C, PointerRNA *ptr, const char
prop= RNA_struct_find_property(ptr, propname);
if(!prop) {
- printf("uiTemplateImage: property not found: %s.%s\n", RNA_struct_identifier(ptr->type), propname);
+ printf("%s: property not found: %s.%s\n",
+ __func__, RNA_struct_identifier(ptr->type), propname);
return;
}
if(RNA_property_type(prop) != PROP_POINTER) {
- printf("uiTemplateImage: expected pointer property for %s.%s\n", RNA_struct_identifier(ptr->type), propname);
+ printf("%s: expected pointer property for %s.%s\n",
+ __func__, RNA_struct_identifier(ptr->type), propname);
return;
}
@@ -815,6 +817,74 @@ void uiTemplateImage(uiLayout *layout, bContext *C, PointerRNA *ptr, const char
MEM_freeN(cb);
}
+void uiTemplateImageSettings(uiLayout *layout, PointerRNA *imfptr)
+{
+ ImageFormatData *imf= imfptr->data;
+ ID *id= imfptr->id.data;
+ const int depth_ok= BKE_imtype_valid_depths(imf->imtype);
+ /* some settings depend on this being a scene thats rendered */
+ const short is_render_out= (id && GS(id->name) == ID_SCE);
+
+ uiLayout *col, *row;
+
+ col= uiLayoutColumn(layout, 0);
+
+ uiItemR(col, imfptr, "file_format", 0, "", ICON_NONE);
+
+ row= uiLayoutRow(col, 0);
+ uiItemR(row, imfptr, "color_mode", UI_ITEM_R_EXPAND, "Color", ICON_NONE);
+
+ /* only display depth setting if multiple depths can be used */
+ if((ELEM6(depth_ok,
+ R_IMF_CHAN_DEPTH_1,
+ R_IMF_CHAN_DEPTH_8,
+ R_IMF_CHAN_DEPTH_12,
+ R_IMF_CHAN_DEPTH_16,
+ R_IMF_CHAN_DEPTH_24,
+ R_IMF_CHAN_DEPTH_32)) == 0)
+ {
+ row= uiLayoutRow(col, 0);
+ uiItemR(row, imfptr, "color_depth", UI_ITEM_R_EXPAND, NULL, ICON_NONE);
+ }
+
+ if (BKE_imtype_supports_quality(imf->imtype)) {
+ uiItemR(col, imfptr, "quality", 0, NULL, ICON_NONE);
+ }
+
+ if (BKE_imtype_supports_compress(imf->imtype)) {
+ uiItemR(col, imfptr, "compression", 0, NULL, ICON_NONE);
+ }
+
+ if (ELEM(imf->imtype, R_IMF_IMTYPE_OPENEXR, R_IMF_IMTYPE_MULTILAYER)) {
+ uiItemR(col, imfptr, "exr_codec", 0, NULL, ICON_NONE);
+ }
+
+ if (BKE_imtype_supports_zbuf(imf->imtype)) {
+ uiItemR(col, imfptr, "use_zbuffer", 0, NULL, ICON_NONE);
+ }
+
+ if (is_render_out && (imf->imtype == R_IMF_IMTYPE_OPENEXR)) {
+ uiItemR(col, imfptr, "use_preview", 0, NULL, ICON_NONE);
+ }
+
+ if (imf->imtype == R_IMF_IMTYPE_JP2) {
+ uiItemR(col, imfptr, "use_jpeg2k_ycc", 0, NULL, ICON_NONE);
+ uiItemR(col, imfptr, "use_jpeg2k_cinema_preset", 0, NULL, ICON_NONE);
+ uiItemR(col, imfptr, "use_jpeg2k_cinema_48", 0, NULL, ICON_NONE);
+ }
+
+ if (imf->imtype == R_IMF_IMTYPE_CINEON) {
+#if 1
+ uiItemL(col, "FIXME: hard coded Non-Linear, Gamma:1.0", ICON_NONE);
+#else
+ uiItemR(col, imfptr, "use_cineon_log", 0, NULL, ICON_NONE);
+ uiItemR(col, imfptr, "cineon_black", 0, NULL, ICON_NONE);
+ uiItemR(col, imfptr, "cineon_white", 0, NULL, ICON_NONE);
+ uiItemR(col, imfptr, "cineon_gamma", 0, NULL, ICON_NONE);
+#endif
+ }
+}
+
void uiTemplateImageLayers(uiLayout *layout, bContext *C, Image *ima, ImageUser *iuser)
{
Scene *scene= CTX_data_scene(C);
diff --git a/source/blender/editors/space_image/image_ops.c b/source/blender/editors/space_image/image_ops.c
index 77c92b2d9c3..bff2d82e041 100644
--- a/source/blender/editors/space_image/image_ops.c
+++ b/source/blender/editors/space_image/image_ops.c
@@ -707,40 +707,6 @@ void IMAGE_OT_view_zoom_ratio(wmOperatorType *ot)
}
/**************** load/replace/save callbacks ******************/
-
-/* XXX make dynamic */
-static const EnumPropertyItem image_file_type_items[] = {
- {R_TARGA, "TARGA", 0, "Targa", ""},
- {R_RAWTGA, "TARGA RAW", 0, "Targa Raw", ""},
- {R_PNG, "PNG", 0, "PNG", ""},
-#ifdef WITH_DDS
- {R_DDS, "DDS", 0, "DirectDraw Surface", ""},
-#endif
- {R_BMP, "BMP", 0, "BMP", ""},
- {R_JPEG90, "JPEG", 0, "Jpeg", ""},
-#ifdef WITH_OPENJPEG
- {R_JP2, "JPEG_2000", 0, "Jpeg 2000", ""},
-#endif
- {R_IRIS, "IRIS", 0, "Iris", ""},
-#ifdef WITH_TIFF
- {R_TIFF, "TIFF", 0, "Tiff", ""},
-#endif
-#ifdef WITH_DDS
- {R_RADHDR, "RADIANCE_HDR", 0, "Radiance HDR", ""},
-#endif
-#ifdef WITH_CINEON
- {R_CINEON, "CINEON", 0, "Cineon", ""},
- {R_DPX, "DPX", 0, "DPX", ""},
-#endif
-#ifdef WITH_OPENEXR
- {R_OPENEXR, "OPENEXR", 0, "OpenEXR", ""},
- /* saving sequences of multilayer won't work, they copy buffers */
- /*if(ima->source==IMA_SRC_SEQUENCE && ima->type==IMA_TYPE_MULTILAYER);
- else*/
- {R_MULTILAYER, "MULTILAYER", 0, "MultiLayer", ""},
-#endif
- {0, NULL, 0, NULL, NULL}};
-
static void image_filesel(bContext *C, wmOperator *op, const char *path)
{
RNA_string_set(op->ptr, "filepath", path);
@@ -943,19 +909,42 @@ void IMAGE_OT_replace(wmOperatorType *ot)
typedef struct {
/* matching scene->r settings */
- short planes, imtype, subimtype, quality;
+ //short planes, imtype, subimtype, quality;
+ ImageFormatData im_format;
char filepath[FILE_MAX]; /* keep absolute */
} SaveImageOptions;
static void save_image_options_defaults(SaveImageOptions *simopts)
{
- simopts->planes= R_PLANES24;
- simopts->imtype= R_PNG;
- simopts->subimtype= 0;
- simopts->quality= 90;
+ memset(&simopts->im_format, 0, sizeof(simopts->im_format));
+ simopts->im_format.planes= R_IMF_PLANES_RGB;
+ simopts->im_format.imtype= R_IMF_IMTYPE_PNG;
+ simopts->im_format.quality= 90;
+ simopts->im_format.compress= 90;
simopts->filepath[0]= '\0';
}
+static char imtype_best_depth(ImBuf *ibuf, const char imtype)
+{
+ const char depth_ok= BKE_imtype_valid_depths(imtype);
+
+ if (ibuf->rect_float) {
+ if (depth_ok & R_IMF_CHAN_DEPTH_32) return R_IMF_CHAN_DEPTH_32;
+ if (depth_ok & R_IMF_CHAN_DEPTH_24) return R_IMF_CHAN_DEPTH_24;
+ if (depth_ok & R_IMF_CHAN_DEPTH_16) return R_IMF_CHAN_DEPTH_16;
+ if (depth_ok & R_IMF_CHAN_DEPTH_12) return R_IMF_CHAN_DEPTH_12;
+ return R_IMF_CHAN_DEPTH_8;
+ }
+ else {
+ if (depth_ok & R_IMF_CHAN_DEPTH_8) return R_IMF_CHAN_DEPTH_8;
+ if (depth_ok & R_IMF_CHAN_DEPTH_12) return R_IMF_CHAN_DEPTH_12;
+ if (depth_ok & R_IMF_CHAN_DEPTH_16) return R_IMF_CHAN_DEPTH_16;
+ if (depth_ok & R_IMF_CHAN_DEPTH_24) return R_IMF_CHAN_DEPTH_24;
+ if (depth_ok & R_IMF_CHAN_DEPTH_32) return R_IMF_CHAN_DEPTH_32;
+ return R_IMF_CHAN_DEPTH_8; /* fallback, should not get here */
+ }
+}
+
static int save_image_options_init(SaveImageOptions *simopts, SpaceImage *sima, Scene *scene, const short guess_path)
{
void *lock;
@@ -963,34 +952,41 @@ static int save_image_options_init(SaveImageOptions *simopts, SpaceImage *sima,
if(ibuf) {
Image *ima= sima->image;
+ short is_depth_set= FALSE;
- simopts->planes= ibuf->depth;
+ simopts->im_format.planes= ibuf->planes;
if(ELEM(ima->type, IMA_TYPE_R_RESULT, IMA_TYPE_COMPOSITE)) {
- simopts->imtype= scene->r.imtype;
- simopts->planes= scene->r.planes;
+ /* imtype */
+ simopts->im_format= scene->r.im_format;
+ is_depth_set= TRUE;
}
else if (ima->source == IMA_SRC_GENERATED) {
- simopts->imtype= R_PNG;
+ simopts->im_format.imtype= R_IMF_IMTYPE_PNG;
}
else {
- simopts->imtype= BKE_ftype_to_imtype(ibuf->ftype);
+ simopts->im_format.imtype= BKE_ftype_to_imtype(ibuf->ftype);
}
- simopts->subimtype= scene->r.subimtype; /* XXX - this is lame, we need to make these available too! */
- simopts->quality= ibuf->ftype & 0xff;
+ //simopts->subimtype= scene->r.subimtype; /* XXX - this is lame, we need to make these available too! */
+ simopts->im_format.quality= ibuf->ftype & 0xff;
BLI_strncpy(simopts->filepath, ibuf->name, sizeof(simopts->filepath));
/* sanitize all settings */
/* unlikely but just incase */
- if (ELEM3(simopts->planes, R_PLANESBW, R_PLANES24, R_PLANES32) == 0) {
- simopts->planes= R_PLANES32;
+ if (ELEM3(simopts->im_format.planes, R_IMF_PLANES_BW, R_IMF_PLANES_RGB, R_IMF_PLANES_RGBA) == 0) {
+ simopts->im_format.planes= R_IMF_PLANES_RGBA;
+ }
+
+ /* depth, account for float buffer and format support */
+ if (is_depth_set == FALSE) {
+ simopts->im_format.depth= imtype_best_depth(ibuf, simopts->im_format.imtype);
}
/* some formats dont use quality so fallback to scenes quality */
- if (simopts->quality == 0) {
- simopts->quality= scene->r.quality;
+ if (simopts->im_format.quality == 0) {
+ simopts->im_format.quality= scene->r.im_format.quality;
}
/* check for empty path */
@@ -1009,18 +1005,11 @@ static int save_image_options_init(SaveImageOptions *simopts, SpaceImage *sima,
return (ibuf != NULL);
}
-static void save_image_options_from_op(SaveImageOptions *simopts, wmOperator *op, Scene *evil_scene)
+static void save_image_options_from_op(SaveImageOptions *simopts, wmOperator *op)
{
- if (RNA_property_is_set(op->ptr, "color_mode")) simopts->planes= RNA_enum_get(op->ptr, "color_mode");
- if (RNA_property_is_set(op->ptr, "file_format")) simopts->imtype= RNA_enum_get(op->ptr, "file_format");
-
-#if 0
- if (RNA_property_is_set(op->ptr, "subimtype")) simopts->subimtype= RNA_enum_get(op->ptr, "subimtype"); // XXX
-#else
- simopts->subimtype= evil_scene->r.subimtype;
-#endif
-
- if (RNA_property_is_set(op->ptr, "file_quality")) simopts->quality= RNA_int_get(op->ptr, "file_quality");
+ if (op->customdata) {
+ simopts->im_format= *(ImageFormatData *)op->customdata;
+ }
if (RNA_property_is_set(op->ptr, "filepath")) {
RNA_string_get(op->ptr, "filepath", simopts->filepath);
@@ -1030,10 +1019,9 @@ static void save_image_options_from_op(SaveImageOptions *simopts, wmOperator *op
static void save_image_options_to_op(SaveImageOptions *simopts, wmOperator *op)
{
- RNA_enum_set(op->ptr, "color_mode", simopts->planes);
- RNA_enum_set(op->ptr, "file_format", simopts->imtype);
- // RNA_enum_set(op->ptr, "subimtype", simopts->subimtype);
- RNA_int_set(op->ptr, "file_quality", simopts->quality);
+ if (op->customdata) {
+ *(ImageFormatData *)op->customdata= simopts->im_format;
+ }
RNA_string_set(op->ptr, "filepath", simopts->filepath);
}
@@ -1059,26 +1047,26 @@ static void save_image_doit(bContext *C, SpaceImage *sima, wmOperator *op, SaveI
if(ima->type == IMA_TYPE_R_RESULT) {
/* enforce user setting for RGB or RGBA, but skip BW */
- if(simopts->planes==R_PLANES32) {
- ibuf->depth= 32;
+ if(simopts->im_format.planes==R_IMF_PLANES_RGBA) {
+ ibuf->planes= R_IMF_PLANES_RGBA;
}
- else if(simopts->planes==R_PLANES24) {
- ibuf->depth= 24;
+ else if(simopts->im_format.planes==R_IMF_PLANES_RGB) {
+ ibuf->planes= R_IMF_PLANES_RGB;
}
}
else {
/* TODO, better solution, if a 24bit image is painted onto it may contain alpha */
if(ibuf->userflags & IB_BITMAPDIRTY) { /* it has been painted onto */
/* checks each pixel, not ideal */
- ibuf->depth= BKE_alphatest_ibuf(ibuf) ? 32 : 24;
+ ibuf->planes= BKE_alphatest_ibuf(ibuf) ? 32 : 24;
}
}
- if(simopts->imtype==R_MULTILAYER) {
+ if(simopts->im_format.imtype==R_IMF_IMTYPE_MULTILAYER) {
Scene *scene= CTX_data_scene(C);
RenderResult *rr= BKE_image_acquire_renderresult(scene, ima);
if(rr) {
- RE_WriteRenderResult(op->reports, rr, simopts->filepath, simopts->quality);
+ RE_WriteRenderResult(op->reports, rr, simopts->filepath, simopts->im_format.quality);
ok= TRUE;
}
else {
@@ -1086,8 +1074,10 @@ static void save_image_doit(bContext *C, SpaceImage *sima, wmOperator *op, SaveI
}
BKE_image_release_renderresult(scene, ima);
}
- else if (BKE_write_ibuf(ibuf, simopts->filepath, simopts->imtype, simopts->subimtype, simopts->quality)) {
- ok= TRUE;
+ else {
+ if (BKE_write_ibuf(ibuf, simopts->filepath, &simopts->im_format)) {
+ ok= TRUE;
+ }
}
if (ok) {
@@ -1139,27 +1129,40 @@ static void save_image_doit(bContext *C, SpaceImage *sima, wmOperator *op, SaveI
ED_space_image_release_buffer(sima, lock);
}
+static void image_save_as_free(wmOperator *op)
+{
+ if (op->customdata) {
+ MEM_freeN(op->customdata);
+ op->customdata= NULL;
+ }
+}
+
static int image_save_as_exec(bContext *C, wmOperator *op)
{
SpaceImage *sima= CTX_wm_space_image(C);
SaveImageOptions simopts;
+ save_image_options_defaults(&simopts);
+
/* just incase to initialize values,
* these should be set on invoke or by the caller. */
- save_image_options_defaults(&simopts);
- save_image_options_from_op(&simopts, op, CTX_data_scene(C));
+ save_image_options_init(&simopts, sima, CTX_data_scene(C), 0);
+
+ save_image_options_from_op(&simopts, op);
save_image_doit(C, sima, op, &simopts, TRUE);
+ image_save_as_free(op);
return OPERATOR_FINISHED;
}
static int image_save_as_check(bContext *UNUSED(C), wmOperator *op)
{
+ ImageFormatData *imf= op->customdata;
char filepath[FILE_MAX];
RNA_string_get(op->ptr, "filepath", filepath);
- if(BKE_add_image_extension(filepath, RNA_enum_get(op->ptr, "file_format"))) {
+ if(BKE_add_image_extension(filepath, imf->imtype)) {
RNA_string_set(op->ptr, "filepath", filepath);
return TRUE;
}
@@ -1185,15 +1188,51 @@ static int image_save_as_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(eve
RNA_boolean_set(op->ptr, "copy", TRUE);
}
- // XXX note: we can give default menu enums to operator for this
+ op->customdata= MEM_mallocN(sizeof(simopts.im_format), __func__);
+ memcpy(op->customdata, &simopts.im_format, sizeof(simopts.im_format));
+
image_filesel(C, op, simopts.filepath);
return OPERATOR_RUNNING_MODAL;
}
+static int image_save_as_cancel(bContext *UNUSED(C), wmOperator *op)
+{
+ image_save_as_free(op);
+
+ return OPERATOR_CANCELLED;
+}
+
+static int image_save_as_draw_check_prop(PointerRNA *ptr, PropertyRNA *prop)
+{
+ const char *prop_id= RNA_property_identifier(prop);
+
+ return !(strcmp(prop_id, "filepath") == 0 ||
+ strcmp(prop_id, "directory") == 0 ||
+ strcmp(prop_id, "filename") == 0 ||
+ /* when saving a copy, relative path has no effect */
+ ((strcmp(prop_id, "relative_path") == 0) && RNA_boolean_get(ptr, "copy"))
+ );
+}
+
+static void image_save_as_draw(bContext *UNUSED(C), wmOperator *op)
+{
+ uiLayout *layout= op->layout;
+ ImageFormatData *imf= op->customdata;
+ PointerRNA ptr;
+
+ /* image template */
+ RNA_pointer_create(NULL, &RNA_ImageFormatSettings, imf, &ptr);
+ uiTemplateImageSettings(layout, &ptr);
+
+ /* main draw call */
+ RNA_pointer_create(NULL, op->type->srna, op->properties, &ptr);
+ uiDefAutoButsRNA(layout, &ptr, image_save_as_draw_check_prop, '\0');
+}
+
void IMAGE_OT_save_as(wmOperatorType *ot)
{
- PropertyRNA *prop;
+// PropertyRNA *prop;
/* identifiers */
ot->name= "Save As Image";
@@ -1203,22 +1242,17 @@ void IMAGE_OT_save_as(wmOperatorType *ot)
ot->exec= image_save_as_exec;
ot->check= image_save_as_check;
ot->invoke= image_save_as_invoke;
+ ot->cancel= image_save_as_cancel;
+ ot->ui= image_save_as_draw;
ot->poll= space_image_buffer_exists_poll;
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
-
- /* format options */
- RNA_def_enum(ot->srna, "file_format", image_file_type_items, R_PNG, "File Type", "File type to save image as");
- RNA_def_enum(ot->srna, "color_mode", image_color_mode_items, R_PLANES24, "Channels", "Image channels to save");
- prop= RNA_def_int(ot->srna, "file_quality", 90, 0, 100, "Quality", "", 0, 100);
- RNA_def_property_subtype(prop, PROP_PERCENTAGE);
+ RNA_def_boolean(ot->srna, "copy", 0, "Copy", "Create a new image file without modifying the current image in blender");
WM_operator_properties_filesel(ot, FOLDERFILE|IMAGEFILE|MOVIEFILE, FILE_SPECIAL, FILE_SAVE, WM_FILESEL_FILEPATH|WM_FILESEL_RELPATH);
-
- RNA_def_boolean(ot->srna, "copy", 0, "Copy", "Create a new image file without modifying the current image in blender");
}
/******************** save image operator ********************/
@@ -1231,7 +1265,7 @@ static int image_save_exec(bContext *C, wmOperator *op)
if (save_image_options_init(&simopts, sima, scene, FALSE) == 0)
return OPERATOR_CANCELLED;
- save_image_options_from_op(&simopts, op, scene);
+ save_image_options_from_op(&simopts, op);
if (BLI_exists(simopts.filepath) && BLI_file_is_writable(simopts.filepath)) {
save_image_doit(C, sima, op, &simopts, FALSE);
diff --git a/source/blender/editors/space_node/drawnode.c b/source/blender/editors/space_node/drawnode.c
index 92592a7c071..47cfa5c763d 100644
--- a/source/blender/editors/space_node/drawnode.c
+++ b/source/blender/editors/space_node/drawnode.c
@@ -1633,24 +1633,18 @@ static void node_composit_buts_id_mask(uiLayout *layout, bContext *UNUSED(C), Po
static void node_composit_buts_file_output(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
{
+ bNode *node= ptr->data;
+ NodeImageFile *nif= node->storage;
+ PointerRNA imfptr;
+
uiLayout *col, *row;
col= uiLayoutColumn(layout, 0);
uiItemR(col, ptr, "filepath", 0, "", ICON_NONE);
- uiItemR(col, ptr, "image_type", 0, "", ICON_NONE);
-
- row= uiLayoutRow(layout, 0);
- if (RNA_enum_get(ptr, "image_type")== R_OPENEXR) {
- uiItemR(row, ptr, "use_exr_half", 0, NULL, ICON_NONE);
- uiItemR(row, ptr, "exr_codec", 0, "", ICON_NONE);
- }
- else if (RNA_enum_get(ptr, "image_type")== R_JPEG90) {
- uiItemR(row, ptr, "quality", UI_ITEM_R_SLIDER, "Quality", ICON_NONE);
- }
- else if (RNA_enum_get(ptr, "image_type")== R_PNG) {
- uiItemR(row, ptr, "quality", UI_ITEM_R_SLIDER, "Compression", ICON_NONE);
- }
-
+
+ RNA_pointer_create(NULL, &RNA_ImageFormatSettings, &nif->im_format, &imfptr);
+ uiTemplateImageSettings(layout, &imfptr);
+
row= uiLayoutRow(layout, 1);
uiItemR(row, ptr, "frame_start", 0, "Start", ICON_NONE);
uiItemR(row, ptr, "frame_end", 0, "End", ICON_NONE);
diff --git a/source/blender/editors/space_node/node_draw.c b/source/blender/editors/space_node/node_draw.c
index 36cba15e5f2..c4a7f2cb473 100644
--- a/source/blender/editors/space_node/node_draw.c
+++ b/source/blender/editors/space_node/node_draw.c
@@ -73,6 +73,8 @@
#include "NOD_composite.h"
#include "NOD_shader.h"
+#include "intern/node_util.h"
+
#include "node_intern.h"
/* width of socket columns in group display */
@@ -418,38 +420,41 @@ static int node_get_colorid(bNode *node)
return TH_NODE;
}
-/* note: in cmp_util.c is similar code, for node_compo_pass_on() */
+/* note: in cmp_util.c is similar code, for node_compo_pass_on()
+ * the same goes for shader and texture nodes. */
/* note: in node_edit.c is similar code, for untangle node */
static void node_draw_mute_line(View2D *v2d, SpaceNode *snode, bNode *node)
{
- static int types[]= { SOCK_FLOAT, SOCK_VECTOR, SOCK_RGBA };
+ ListBase links;
+ LinkInOutsMuteNode *lnk;
bNodeLink link= {NULL};
int i;
-
- /* connect the first input of each type with first output of the same type */
-
+
+ if(node->typeinfo->mutelinksfunc == NULL)
+ return;
+
+ /* Get default muting links (as bNodeSocket pointers). */
+ links = node->typeinfo->mutelinksfunc(snode->edittree, node, NULL, NULL, NULL, NULL);
+
glEnable(GL_BLEND);
- glEnable( GL_LINE_SMOOTH );
-
+ glEnable(GL_LINE_SMOOTH);
+
link.fromnode = link.tonode = node;
- for (i=0; i < 3; ++i) {
- /* find input socket */
- for (link.fromsock=node->inputs.first; link.fromsock; link.fromsock=link.fromsock->next)
- if (link.fromsock->type==types[i] && nodeCountSocketLinks(snode->edittree, link.fromsock))
- break;
- if (link.fromsock) {
- for (link.tosock=node->outputs.first; link.tosock; link.tosock=link.tosock->next)
- if (link.tosock->type==types[i] && nodeCountSocketLinks(snode->edittree, link.tosock))
- break;
-
- if (link.tosock) {
- node_draw_link_bezier(v2d, snode, &link, TH_REDALERT, 0, TH_WIRE, 0, TH_WIRE);
- }
+ for(lnk = links.first; lnk; lnk = lnk->next) {
+ for(i = 0; i < lnk->num_outs; i++) {
+ link.fromsock = (bNodeSocket*)(lnk->in);
+ link.tosock = (bNodeSocket*)(lnk->outs)+i;
+ node_draw_link_bezier(v2d, snode, &link, TH_REDALERT, 0, TH_WIRE, 0, TH_WIRE);
}
+ /* If num_outs > 1, lnk->outs was an allocated table of pointers... */
+ if(i > 1)
+ MEM_freeN(lnk->outs);
}
-
+
glDisable(GL_BLEND);
- glDisable( GL_LINE_SMOOTH );
+ glDisable(GL_LINE_SMOOTH);
+
+ BLI_freelistN(&links);
}
/* this might have some more generic use */
diff --git a/source/blender/editors/space_node/node_edit.c b/source/blender/editors/space_node/node_edit.c
index 23855ff24e1..cd4e99900e7 100644
--- a/source/blender/editors/space_node/node_edit.c
+++ b/source/blender/editors/space_node/node_edit.c
@@ -3283,7 +3283,8 @@ static int node_mute_exec(bContext *C, wmOperator *UNUSED(op))
ED_preview_kill_jobs(C);
for(node= snode->edittree->nodes.first; node; node= node->next) {
- if(node->flag & SELECT) {
+ /* Only allow muting of nodes having a mute func! */
+ if((node->flag & SELECT) && node->typeinfo->mutefunc) {
/* Be able to mute in-/output nodes as well. - DingTo
if(node->inputs.first && node->outputs.first) { */
node->flag ^= NODE_MUTED;
diff --git a/source/blender/editors/space_view3d/drawobject.c b/source/blender/editors/space_view3d/drawobject.c
index 959e267f50e..807822928b6 100644
--- a/source/blender/editors/space_view3d/drawobject.c
+++ b/source/blender/editors/space_view3d/drawobject.c
@@ -2819,34 +2819,28 @@ static void draw_em_fancy(Scene *scene, View3D *v3d, RegionView3D *rv3d, Object
if(dt>OB_WIRE) {
if(CHECK_OB_DRAWTEXTURE(v3d, dt)) {
if(draw_glsl_material(scene, ob, v3d, dt)) {
- /* if em has no faces the drawMappedFaces callback will fail */
- if(em->bm->totface) {
- glFrontFace((ob->transflag&OB_NEG_SCALE)?GL_CW:GL_CCW);
+ glFrontFace((ob->transflag&OB_NEG_SCALE)?GL_CW:GL_CCW);
- finalDM->drawMappedFacesGLSL(finalDM, GPU_enable_material,
- draw_em_fancy__setGLSLFaceOpts, em);
- GPU_disable_material();
+ finalDM->drawMappedFacesGLSL(finalDM, GPU_enable_material,
+ draw_em_fancy__setGLSLFaceOpts, em);
+ GPU_disable_material();
- glFrontFace(GL_CCW);
- }
+ glFrontFace(GL_CCW);
}
else {
draw_mesh_textured(scene, v3d, rv3d, ob, finalDM, 0);
}
}
else {
- /* if em has no faces the drawMappedFaces callback will fail */
- if(em->bm->totface) {
- /* 3 floats for position, 3 for normal and times two because the faces may actually be quads instead of triangles */
- glLightModeli(GL_LIGHT_MODEL_TWO_SIDE, me->flag & ME_TWOSIDED);
+ /* 3 floats for position, 3 for normal and times two because the faces may actually be quads instead of triangles */
+ glLightModeli(GL_LIGHT_MODEL_TWO_SIDE, me->flag & ME_TWOSIDED);
- glEnable(GL_LIGHTING);
- glFrontFace((ob->transflag&OB_NEG_SCALE)?GL_CW:GL_CCW);
- finalDM->drawMappedFaces(finalDM, draw_em_fancy__setFaceOpts, me->edit_btmesh, 0, GPU_enable_material, NULL);
+ glEnable(GL_LIGHTING);
+ glFrontFace((ob->transflag&OB_NEG_SCALE)?GL_CW:GL_CCW);
+ finalDM->drawMappedFaces(finalDM, draw_em_fancy__setFaceOpts, me->edit_btmesh, 0, GPU_enable_material, NULL);
- glFrontFace(GL_CCW);
- glDisable(GL_LIGHTING);
- }
+ glFrontFace(GL_CCW);
+ glDisable(GL_LIGHTING);
}
// Setup for drawing wire over, disable zbuffer
diff --git a/source/blender/gpu/CMakeLists.txt b/source/blender/gpu/CMakeLists.txt
index 557b22e3a2e..4488442815d 100644
--- a/source/blender/gpu/CMakeLists.txt
+++ b/source/blender/gpu/CMakeLists.txt
@@ -31,6 +31,8 @@ set(INC
../imbuf
../makesdna
../makesrna
+ ../nodes # For node muting stuff...
+ ../nodes/intern # For node muting stuff...
../../../intern/guardedalloc
../../../intern/smoke/extern
)
diff --git a/source/blender/gpu/GPU_material.h b/source/blender/gpu/GPU_material.h
index 00c47a2501f..e838d801dc1 100644
--- a/source/blender/gpu/GPU_material.h
+++ b/source/blender/gpu/GPU_material.h
@@ -49,6 +49,7 @@ struct Lamp;
struct Image;
struct bNode;
struct LinkNode;
+struct LinkInOutsMuteNode;
struct Scene;
struct GPUVertexAttribs;
struct GPUNode;
@@ -117,6 +118,7 @@ GPUNodeLink *GPU_builtin(GPUBuiltin builtin);
int GPU_link(GPUMaterial *mat, const char *name, ...);
int GPU_stack_link(GPUMaterial *mat, const char *name, GPUNodeStack *in, GPUNodeStack *out, ...);
+int GPU_stack_link_mute(GPUMaterial *mat, const char *name, struct LinkInOutsMuteNode *mlnk);
void GPU_material_output_link(GPUMaterial *material, GPUNodeLink *link);
void GPU_material_enable_alpha(GPUMaterial *material);
diff --git a/source/blender/gpu/SConscript b/source/blender/gpu/SConscript
index adb52d577a1..ee4491c1c77 100644
--- a/source/blender/gpu/SConscript
+++ b/source/blender/gpu/SConscript
@@ -5,7 +5,7 @@ sources = env.Glob('intern/*.c')
defs = [ 'GLEW_STATIC' ]
-incs = '../blenlib ../blenkernel ../makesdna ../makesrna ../include ../blenloader'
+incs = '../blenlib ../blenkernel ../makesdna ../makesrna ../include ../blenloader ../nodes ../nodes/intern'
incs += ' #/extern/glew/include #intern/guardedalloc #intern/smoke/extern ../imbuf .'
if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross', 'win64-vc'):
diff --git a/source/blender/gpu/intern/gpu_codegen.c b/source/blender/gpu/intern/gpu_codegen.c
index 35ef48250cc..4a923e66356 100644
--- a/source/blender/gpu/intern/gpu_codegen.c
+++ b/source/blender/gpu/intern/gpu_codegen.c
@@ -54,6 +54,8 @@
#include "gpu_codegen.h"
+#include "node_util.h" /* For muting node stuff... */
+
#include <string.h>
#include <stdarg.h>
@@ -1212,6 +1214,31 @@ int GPU_stack_link(GPUMaterial *mat, const char *name, GPUNodeStack *in, GPUNode
return 1;
}
+int GPU_stack_link_mute(GPUMaterial *mat, const char *name, LinkInOutsMuteNode *mlnk)
+{
+ GPUNode *node;
+ GPUFunction *function;
+ int i;
+
+ function = GPU_lookup_function(name);
+ if(!function) {
+ fprintf(stderr, "GPU failed to find function %s\n", name);
+ return 0;
+ }
+
+ for(i = 0; i < mlnk->num_outs; i++) {
+ node = GPU_node_begin(name);
+ gpu_node_input_socket(node, (GPUNodeStack*)mlnk->in);
+ GPU_node_output(node, ((GPUNodeStack*)mlnk->outs+i)->type, ((GPUNodeStack*)mlnk->outs+i)->name,
+ &((GPUNodeStack*)mlnk->outs+i)->link);
+ GPU_node_end(node);
+
+ gpu_material_add_node(mat, node);
+ }
+
+ return 1;
+}
+
int GPU_link_changed(GPUNodeLink *link)
{
GPUNode *node;
diff --git a/source/blender/gpu/intern/gpu_shader_material.glsl b/source/blender/gpu/intern/gpu_shader_material.glsl
index 5aaf99bdd24..5d2da31ac5f 100644
--- a/source/blender/gpu/intern/gpu_shader_material.glsl
+++ b/source/blender/gpu/intern/gpu_shader_material.glsl
@@ -368,6 +368,26 @@ void set_rgba_zero(out vec4 outval)
outval = vec4(0.0);
}
+void copy_raw(vec4 val, out vec4 outval)
+{
+ outval = val;
+}
+
+void copy_raw(vec3 val, out vec3 outval)
+{
+ outval = val;
+}
+
+void copy_raw(vec2 val, out vec2 outval)
+{
+ outval = val;
+}
+
+void copy_raw(float val, out float outval)
+{
+ outval = val;
+}
+
void mix_blend(float fac, vec4 col1, vec4 col2, out vec4 outcol)
{
fac = clamp(fac, 0.0, 1.0);
diff --git a/source/blender/gpu/intern/gpu_shader_material.glsl.c b/source/blender/gpu/intern/gpu_shader_material.glsl.c
index 493c32d5a45..0b7bd5d48bf 100644
--- a/source/blender/gpu/intern/gpu_shader_material.glsl.c
+++ b/source/blender/gpu/intern/gpu_shader_material.glsl.c
@@ -1,233 +1,241 @@
/* DataToC output of file <gpu_shader_material_glsl> */
-int datatoc_gpu_shader_material_glsl_size= 46619;
+int datatoc_gpu_shader_material_glsl_size= 46865;
char datatoc_gpu_shader_material_glsl[]= {
- 10,102,108,111, 97,116, 32,101,120,112, 95, 98,108,101,110,100,101,114, 40,102,108,111, 97,116, 32,102, 41,
- 10,123, 10, 9,114,101,116,117,114,110, 32,112,111,119, 40, 50, 46, 55, 49, 56, 50, 56, 49, 56, 50, 56, 52, 54, 44, 32,102, 41,
- 59, 10,125, 10, 10,118,111,105,100, 32,114,103, 98, 95,116,111, 95,104,115,118, 40,118,101, 99, 52, 32,114,103, 98, 44, 32,111,
-117,116, 32,118,101, 99, 52, 32,111,117,116, 99,111,108, 41, 10,123, 10, 9,102,108,111, 97,116, 32, 99,109, 97,120, 44, 32, 99,
-109,105,110, 44, 32,104, 44, 32,115, 44, 32,118, 44, 32, 99,100,101,108,116, 97, 59, 10, 9,118,101, 99, 51, 32, 99, 59, 10, 10,
- 9, 99,109, 97,120, 32, 61, 32,109, 97,120, 40,114,103, 98, 91, 48, 93, 44, 32,109, 97,120, 40,114,103, 98, 91, 49, 93, 44, 32,
-114,103, 98, 91, 50, 93, 41, 41, 59, 10, 9, 99,109,105,110, 32, 61, 32,109,105,110, 40,114,103, 98, 91, 48, 93, 44, 32,109,105,
-110, 40,114,103, 98, 91, 49, 93, 44, 32,114,103, 98, 91, 50, 93, 41, 41, 59, 10, 9, 99,100,101,108,116, 97, 32, 61, 32, 99,109,
- 97,120, 45, 99,109,105,110, 59, 10, 10, 9,118, 32, 61, 32, 99,109, 97,120, 59, 10, 9,105,102, 32, 40, 99,109, 97,120, 33, 61,
- 48, 46, 48, 41, 10, 9, 9,115, 32, 61, 32, 99,100,101,108,116, 97, 47, 99,109, 97,120, 59, 10, 9,101,108,115,101, 32,123, 10,
- 9, 9,115, 32, 61, 32, 48, 46, 48, 59, 10, 9, 9,104, 32, 61, 32, 48, 46, 48, 59, 10, 9,125, 10, 10, 9,105,102, 32, 40,115,
- 32, 61, 61, 32, 48, 46, 48, 41, 32,123, 10, 9, 9,104, 32, 61, 32, 48, 46, 48, 59, 10, 9,125, 10, 9,101,108,115,101, 32,123,
- 10, 9, 9, 99, 32, 61, 32, 40,118,101, 99, 51, 40, 99,109, 97,120, 44, 32, 99,109, 97,120, 44, 32, 99,109, 97,120, 41, 32, 45,
- 32,114,103, 98, 46,120,121,122, 41, 47, 99,100,101,108,116, 97, 59, 10, 10, 9, 9,105,102, 32, 40,114,103, 98, 46,120, 61, 61,
- 99,109, 97,120, 41, 32,104, 32, 61, 32, 99, 91, 50, 93, 32, 45, 32, 99, 91, 49, 93, 59, 10, 9, 9,101,108,115,101, 32,105,102,
- 32, 40,114,103, 98, 46,121, 61, 61, 99,109, 97,120, 41, 32,104, 32, 61, 32, 50, 46, 48, 32, 43, 32, 99, 91, 48, 93, 32, 45, 32,
- 32, 99, 91, 50, 93, 59, 10, 9, 9,101,108,115,101, 32,104, 32, 61, 32, 52, 46, 48, 32, 43, 32, 99, 91, 49, 93, 32, 45, 32, 99,
- 91, 48, 93, 59, 10, 10, 9, 9,104, 32, 47, 61, 32, 54, 46, 48, 59, 10, 10, 9, 9,105,102, 32, 40,104, 60, 48, 46, 48, 41, 10,
- 9, 9, 9,104, 32, 43, 61, 32, 49, 46, 48, 59, 10, 9,125, 10, 10, 9,111,117,116, 99,111,108, 32, 61, 32,118,101, 99, 52, 40,
-104, 44, 32,115, 44, 32,118, 44, 32,114,103, 98, 46,119, 41, 59, 10,125, 10, 10,118,111,105,100, 32,104,115,118, 95,116,111, 95,
-114,103, 98, 40,118,101, 99, 52, 32,104,115,118, 44, 32,111,117,116, 32,118,101, 99, 52, 32,111,117,116, 99,111,108, 41, 10,123,
- 10, 9,102,108,111, 97,116, 32,105, 44, 32,102, 44, 32,112, 44, 32,113, 44, 32,116, 44, 32,104, 44, 32,115, 44, 32,118, 59, 10,
- 9,118,101, 99, 51, 32,114,103, 98, 59, 10, 10, 9,104, 32, 61, 32,104,115,118, 91, 48, 93, 59, 10, 9,115, 32, 61, 32,104,115,
-118, 91, 49, 93, 59, 10, 9,118, 32, 61, 32,104,115,118, 91, 50, 93, 59, 10, 10, 9,105,102, 40,115, 61, 61, 48, 46, 48, 41, 32,
-123, 10, 9, 9,114,103, 98, 32, 61, 32,118,101, 99, 51, 40,118, 44, 32,118, 44, 32,118, 41, 59, 10, 9,125, 10, 9,101,108,115,
-101, 32,123, 10, 9, 9,105,102, 40,104, 61, 61, 49, 46, 48, 41, 10, 9, 9, 9,104, 32, 61, 32, 48, 46, 48, 59, 10, 9, 9, 10,
- 9, 9,104, 32, 42, 61, 32, 54, 46, 48, 59, 10, 9, 9,105, 32, 61, 32,102,108,111,111,114, 40,104, 41, 59, 10, 9, 9,102, 32,
- 61, 32,104, 32, 45, 32,105, 59, 10, 9, 9,114,103, 98, 32, 61, 32,118,101, 99, 51, 40,102, 44, 32,102, 44, 32,102, 41, 59, 10,
- 9, 9,112, 32, 61, 32,118, 42, 40, 49, 46, 48, 45,115, 41, 59, 10, 9, 9,113, 32, 61, 32,118, 42, 40, 49, 46, 48, 45, 40,115,
- 42,102, 41, 41, 59, 10, 9, 9,116, 32, 61, 32,118, 42, 40, 49, 46, 48, 45, 40,115, 42, 40, 49, 46, 48, 45,102, 41, 41, 41, 59,
- 10, 9, 9, 10, 9, 9,105,102, 32, 40,105, 32, 61, 61, 32, 48, 46, 48, 41, 32,114,103, 98, 32, 61, 32,118,101, 99, 51, 40,118,
- 44, 32,116, 44, 32,112, 41, 59, 10, 9, 9,101,108,115,101, 32,105,102, 32, 40,105, 32, 61, 61, 32, 49, 46, 48, 41, 32,114,103,
- 98, 32, 61, 32,118,101, 99, 51, 40,113, 44, 32,118, 44, 32,112, 41, 59, 10, 9, 9,101,108,115,101, 32,105,102, 32, 40,105, 32,
- 61, 61, 32, 50, 46, 48, 41, 32,114,103, 98, 32, 61, 32,118,101, 99, 51, 40,112, 44, 32,118, 44, 32,116, 41, 59, 10, 9, 9,101,
-108,115,101, 32,105,102, 32, 40,105, 32, 61, 61, 32, 51, 46, 48, 41, 32,114,103, 98, 32, 61, 32,118,101, 99, 51, 40,112, 44, 32,
-113, 44, 32,118, 41, 59, 10, 9, 9,101,108,115,101, 32,105,102, 32, 40,105, 32, 61, 61, 32, 52, 46, 48, 41, 32,114,103, 98, 32,
- 61, 32,118,101, 99, 51, 40,116, 44, 32,112, 44, 32,118, 41, 59, 10, 9, 9,101,108,115,101, 32,114,103, 98, 32, 61, 32,118,101,
- 99, 51, 40,118, 44, 32,112, 44, 32,113, 41, 59, 10, 9,125, 10, 10, 9,111,117,116, 99,111,108, 32, 61, 32,118,101, 99, 52, 40,
-114,103, 98, 44, 32,104,115,118, 46,119, 41, 59, 10,125, 10, 10,102,108,111, 97,116, 32,115,114,103, 98, 95,116,111, 95,108,105,
-110,101, 97,114,114,103, 98, 40,102,108,111, 97,116, 32, 99, 41, 10,123, 10, 9,105,102, 40, 99, 32, 60, 32, 48, 46, 48, 52, 48,
- 52, 53, 41, 10, 9, 9,114,101,116,117,114,110, 32, 40, 99, 32, 60, 32, 48, 46, 48, 41, 63, 32, 48, 46, 48, 58, 32, 99, 32, 42,
- 32, 40, 49, 46, 48, 47, 49, 50, 46, 57, 50, 41, 59, 10, 9,101,108,115,101, 10, 9, 9,114,101,116,117,114,110, 32,112,111,119,
- 40, 40, 99, 32, 43, 32, 48, 46, 48, 53, 53, 41, 42, 40, 49, 46, 48, 47, 49, 46, 48, 53, 53, 41, 44, 32, 50, 46, 52, 41, 59, 10,
-125, 10, 10,102,108,111, 97,116, 32,108,105,110,101, 97,114,114,103, 98, 95,116,111, 95,115,114,103, 98, 40,102,108,111, 97,116,
- 32, 99, 41, 10,123, 10, 9,105,102, 40, 99, 32, 60, 32, 48, 46, 48, 48, 51, 49, 51, 48, 56, 41, 10, 9, 9,114,101,116,117,114,
-110, 32, 40, 99, 32, 60, 32, 48, 46, 48, 41, 63, 32, 48, 46, 48, 58, 32, 99, 32, 42, 32, 49, 50, 46, 57, 50, 59, 10, 9,101,108,
-115,101, 10, 9, 9,114,101,116,117,114,110, 32, 49, 46, 48, 53, 53, 32, 42, 32,112,111,119, 40, 99, 44, 32, 49, 46, 48, 47, 50,
- 46, 52, 41, 32, 45, 32, 48, 46, 48, 53, 53, 59, 10,125, 10, 10,118,111,105,100, 32,115,114,103, 98, 95,116,111, 95,108,105,110,
-101, 97,114,114,103, 98, 40,118,101, 99, 52, 32, 99,111,108, 95,102,114,111,109, 44, 32,111,117,116, 32,118,101, 99, 52, 32, 99,
-111,108, 95,116,111, 41, 10,123, 10, 9, 99,111,108, 95,116,111, 46,114, 32, 61, 32,115,114,103, 98, 95,116,111, 95,108,105,110,
-101, 97,114,114,103, 98, 40, 99,111,108, 95,102,114,111,109, 46,114, 41, 59, 10, 9, 99,111,108, 95,116,111, 46,103, 32, 61, 32,
-115,114,103, 98, 95,116,111, 95,108,105,110,101, 97,114,114,103, 98, 40, 99,111,108, 95,102,114,111,109, 46,103, 41, 59, 10, 9,
- 99,111,108, 95,116,111, 46, 98, 32, 61, 32,115,114,103, 98, 95,116,111, 95,108,105,110,101, 97,114,114,103, 98, 40, 99,111,108,
- 95,102,114,111,109, 46, 98, 41, 59, 10, 9, 99,111,108, 95,116,111, 46, 97, 32, 61, 32, 99,111,108, 95,102,114,111,109, 46, 97,
- 59, 10,125, 10, 10,118,111,105,100, 32,108,105,110,101, 97,114,114,103, 98, 95,116,111, 95,115,114,103, 98, 40,118,101, 99, 52,
- 32, 99,111,108, 95,102,114,111,109, 44, 32,111,117,116, 32,118,101, 99, 52, 32, 99,111,108, 95,116,111, 41, 10,123, 10, 9, 99,
-111,108, 95,116,111, 46,114, 32, 61, 32,108,105,110,101, 97,114,114,103, 98, 95,116,111, 95,115,114,103, 98, 40, 99,111,108, 95,
-102,114,111,109, 46,114, 41, 59, 10, 9, 99,111,108, 95,116,111, 46,103, 32, 61, 32,108,105,110,101, 97,114,114,103, 98, 95,116,
-111, 95,115,114,103, 98, 40, 99,111,108, 95,102,114,111,109, 46,103, 41, 59, 10, 9, 99,111,108, 95,116,111, 46, 98, 32, 61, 32,
-108,105,110,101, 97,114,114,103, 98, 95,116,111, 95,115,114,103, 98, 40, 99,111,108, 95,102,114,111,109, 46, 98, 41, 59, 10, 9,
- 99,111,108, 95,116,111, 46, 97, 32, 61, 32, 99,111,108, 95,102,114,111,109, 46, 97, 59, 10,125, 10, 10, 35,100,101,102,105,110,
-101, 32, 77, 95, 80, 73, 32, 51, 46, 49, 52, 49, 53, 57, 50, 54, 53, 51, 53, 56, 57, 55, 57, 51, 50, 51, 56, 52, 54, 10, 35,100,
-101,102,105,110,101, 32, 77, 95, 49, 95, 80, 73, 32, 48, 46, 51, 49, 56, 51, 48, 57, 56, 56, 54, 49, 56, 51, 55, 57, 48, 54, 57,
- 10, 10, 47, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 32, 83, 72, 65, 68, 69, 82, 32, 78, 79, 68, 69, 83, 32, 42, 42, 42, 42,
- 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 47, 10, 10,118,111,105,100, 32,118, 99,111,108, 95, 97,116,116,114,105, 98,117,116,
-101, 40,118,101, 99, 52, 32, 97,116,116,118, 99,111,108, 44, 32,111,117,116, 32,118,101, 99, 52, 32,118, 99,111,108, 41, 10,123,
- 10, 9,118, 99,111,108, 32, 61, 32,118,101, 99, 52, 40, 97,116,116,118, 99,111,108, 46,120, 47, 50, 53, 53, 46, 48, 44, 32, 97,
-116,116,118, 99,111,108, 46,121, 47, 50, 53, 53, 46, 48, 44, 32, 97,116,116,118, 99,111,108, 46,122, 47, 50, 53, 53, 46, 48, 44,
- 32, 49, 46, 48, 41, 59, 10,125, 10, 10,118,111,105,100, 32,117,118, 95, 97,116,116,114,105, 98,117,116,101, 40,118,101, 99, 50,
- 32, 97,116,116,117,118, 44, 32,111,117,116, 32,118,101, 99, 51, 32,117,118, 41, 10,123, 10, 9,117,118, 32, 61, 32,118,101, 99,
- 51, 40, 97,116,116,117,118, 42, 50, 46, 48, 32, 45, 32,118,101, 99, 50, 40, 49, 46, 48, 44, 32, 49, 46, 48, 41, 44, 32, 48, 46,
- 48, 41, 59, 10,125, 10, 10,118,111,105,100, 32,103,101,111,109, 40,118,101, 99, 51, 32, 99,111, 44, 32,118,101, 99, 51, 32,110,
-111,114, 44, 32,109, 97,116, 52, 32,118,105,101,119,105,110,118,109, 97,116, 44, 32,118,101, 99, 51, 32, 97,116,116,111,114, 99,
-111, 44, 32,118,101, 99, 50, 32, 97,116,116,117,118, 44, 32,118,101, 99, 52, 32, 97,116,116,118, 99,111,108, 44, 32,111,117,116,
- 32,118,101, 99, 51, 32,103,108,111, 98, 97,108, 44, 32,111,117,116, 32,118,101, 99, 51, 32,108,111, 99, 97,108, 44, 32,111,117,
-116, 32,118,101, 99, 51, 32,118,105,101,119, 44, 32,111,117,116, 32,118,101, 99, 51, 32,111,114, 99,111, 44, 32,111,117,116, 32,
-118,101, 99, 51, 32,117,118, 44, 32,111,117,116, 32,118,101, 99, 51, 32,110,111,114,109, 97,108, 44, 32,111,117,116, 32,118,101,
- 99, 52, 32,118, 99,111,108, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,118, 99,111,108, 95, 97,108,112,104, 97, 44, 32,111,
-117,116, 32,102,108,111, 97,116, 32,102,114,111,110,116, 98, 97, 99,107, 41, 10,123, 10, 9,108,111, 99, 97,108, 32, 61, 32, 99,
-111, 59, 10, 9,118,105,101,119, 32, 61, 32,110,111,114,109, 97,108,105,122,101, 40,108,111, 99, 97,108, 41, 59, 10, 9,103,108,
-111, 98, 97,108, 32, 61, 32, 40,118,105,101,119,105,110,118,109, 97,116, 42,118,101, 99, 52, 40,108,111, 99, 97,108, 44, 32, 49,
- 46, 48, 41, 41, 46,120,121,122, 59, 10, 9,111,114, 99,111, 32, 61, 32, 97,116,116,111,114, 99,111, 59, 10, 9,117,118, 95, 97,
-116,116,114,105, 98,117,116,101, 40, 97,116,116,117,118, 44, 32,117,118, 41, 59, 10, 9,110,111,114,109, 97,108, 32, 61, 32, 45,
-110,111,114,109, 97,108,105,122,101, 40,110,111,114, 41, 59, 9, 47, 42, 32, 98,108,101,110,100,101,114, 32,114,101,110,100,101,
-114, 32,110,111,114,109, 97,108, 32,105,115, 32,110,101,103, 97,116,101,100, 32, 42, 47, 10, 9,118, 99,111,108, 95, 97,116,116,
-114,105, 98,117,116,101, 40, 97,116,116,118, 99,111,108, 44, 32,118, 99,111,108, 41, 59, 10, 9,118, 99,111,108, 95, 97,108,112,
-104, 97, 32, 61, 32, 97,116,116,118, 99,111,108, 46, 97, 59, 10, 9,102,114,111,110,116, 98, 97, 99,107, 32, 61, 32, 49, 46, 48,
- 59, 10,125, 10, 10,118,111,105,100, 32,109, 97,112,112,105,110,103, 40,118,101, 99, 51, 32,118,101, 99, 44, 32,109, 97,116, 52,
- 32,109, 97,116, 44, 32,118,101, 99, 51, 32,109,105,110,118,101, 99, 44, 32,118,101, 99, 51, 32,109, 97,120,118,101, 99, 44, 32,
-102,108,111, 97,116, 32,100,111,109,105,110, 44, 32,102,108,111, 97,116, 32,100,111,109, 97,120, 44, 32,111,117,116, 32,118,101,
- 99, 51, 32,111,117,116,118,101, 99, 41, 10,123, 10, 9,111,117,116,118,101, 99, 32, 61, 32, 40,109, 97,116, 32, 42, 32,118,101,
- 99, 52, 40,118,101, 99, 44, 32, 49, 46, 48, 41, 41, 46,120,121,122, 59, 10, 9,105,102, 40,100,111,109,105,110, 32, 61, 61, 32,
- 49, 46, 48, 41, 10, 9, 9,111,117,116,118,101, 99, 32, 61, 32,109, 97,120, 40,111,117,116,118,101, 99, 44, 32,109,105,110,118,
-101, 99, 41, 59, 10, 9,105,102, 40,100,111,109, 97,120, 32, 61, 61, 32, 49, 46, 48, 41, 10, 9, 9,111,117,116,118,101, 99, 32,
- 61, 32,109,105,110, 40,111,117,116,118,101, 99, 44, 32,109, 97,120,118,101, 99, 41, 59, 10,125, 10, 10,118,111,105,100, 32, 99,
- 97,109,101,114, 97, 40,118,101, 99, 51, 32, 99,111, 44, 32,111,117,116, 32,118,101, 99, 51, 32,111,117,116,118,105,101,119, 44,
- 32,111,117,116, 32,102,108,111, 97,116, 32,111,117,116,100,101,112,116,104, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,111,
-117,116,100,105,115,116, 41, 10,123, 10, 9,111,117,116,100,101,112,116,104, 32, 61, 32, 97, 98,115, 40, 99,111, 46,122, 41, 59,
- 10, 9,111,117,116,100,105,115,116, 32, 61, 32,108,101,110,103,116,104, 40, 99,111, 41, 59, 10, 9,111,117,116,118,105,101,119,
- 32, 61, 32,110,111,114,109, 97,108,105,122,101, 40, 99,111, 41, 59, 10,125, 10, 10,118,111,105,100, 32,109, 97,116,104, 95, 97,
-100,100, 40,102,108,111, 97,116, 32,118, 97,108, 49, 44, 32,102,108,111, 97,116, 32,118, 97,108, 50, 44, 32,111,117,116, 32,102,
-108,111, 97,116, 32,111,117,116,118, 97,108, 41, 10,123, 10, 9,111,117,116,118, 97,108, 32, 61, 32,118, 97,108, 49, 32, 43, 32,
-118, 97,108, 50, 59, 10,125, 10, 10,118,111,105,100, 32,109, 97,116,104, 95,115,117, 98,116,114, 97, 99,116, 40,102,108,111, 97,
+ 10,102,108,111, 97,116, 32,101,120,112, 95, 98,108,101,110,100,101,
+114, 40,102,108,111, 97,116, 32,102, 41, 10,123, 10, 9,114,101,116,117,114,110, 32,112,111,119, 40, 50, 46, 55, 49, 56, 50, 56,
+ 49, 56, 50, 56, 52, 54, 44, 32,102, 41, 59, 10,125, 10, 10,118,111,105,100, 32,114,103, 98, 95,116,111, 95,104,115,118, 40,118,
+101, 99, 52, 32,114,103, 98, 44, 32,111,117,116, 32,118,101, 99, 52, 32,111,117,116, 99,111,108, 41, 10,123, 10, 9,102,108,111,
+ 97,116, 32, 99,109, 97,120, 44, 32, 99,109,105,110, 44, 32,104, 44, 32,115, 44, 32,118, 44, 32, 99,100,101,108,116, 97, 59, 10,
+ 9,118,101, 99, 51, 32, 99, 59, 10, 10, 9, 99,109, 97,120, 32, 61, 32,109, 97,120, 40,114,103, 98, 91, 48, 93, 44, 32,109, 97,
+120, 40,114,103, 98, 91, 49, 93, 44, 32,114,103, 98, 91, 50, 93, 41, 41, 59, 10, 9, 99,109,105,110, 32, 61, 32,109,105,110, 40,
+114,103, 98, 91, 48, 93, 44, 32,109,105,110, 40,114,103, 98, 91, 49, 93, 44, 32,114,103, 98, 91, 50, 93, 41, 41, 59, 10, 9, 99,
+100,101,108,116, 97, 32, 61, 32, 99,109, 97,120, 45, 99,109,105,110, 59, 10, 10, 9,118, 32, 61, 32, 99,109, 97,120, 59, 10, 9,
+105,102, 32, 40, 99,109, 97,120, 33, 61, 48, 46, 48, 41, 10, 9, 9,115, 32, 61, 32, 99,100,101,108,116, 97, 47, 99,109, 97,120,
+ 59, 10, 9,101,108,115,101, 32,123, 10, 9, 9,115, 32, 61, 32, 48, 46, 48, 59, 10, 9, 9,104, 32, 61, 32, 48, 46, 48, 59, 10,
+ 9,125, 10, 10, 9,105,102, 32, 40,115, 32, 61, 61, 32, 48, 46, 48, 41, 32,123, 10, 9, 9,104, 32, 61, 32, 48, 46, 48, 59, 10,
+ 9,125, 10, 9,101,108,115,101, 32,123, 10, 9, 9, 99, 32, 61, 32, 40,118,101, 99, 51, 40, 99,109, 97,120, 44, 32, 99,109, 97,
+120, 44, 32, 99,109, 97,120, 41, 32, 45, 32,114,103, 98, 46,120,121,122, 41, 47, 99,100,101,108,116, 97, 59, 10, 10, 9, 9,105,
+102, 32, 40,114,103, 98, 46,120, 61, 61, 99,109, 97,120, 41, 32,104, 32, 61, 32, 99, 91, 50, 93, 32, 45, 32, 99, 91, 49, 93, 59,
+ 10, 9, 9,101,108,115,101, 32,105,102, 32, 40,114,103, 98, 46,121, 61, 61, 99,109, 97,120, 41, 32,104, 32, 61, 32, 50, 46, 48,
+ 32, 43, 32, 99, 91, 48, 93, 32, 45, 32, 32, 99, 91, 50, 93, 59, 10, 9, 9,101,108,115,101, 32,104, 32, 61, 32, 52, 46, 48, 32,
+ 43, 32, 99, 91, 49, 93, 32, 45, 32, 99, 91, 48, 93, 59, 10, 10, 9, 9,104, 32, 47, 61, 32, 54, 46, 48, 59, 10, 10, 9, 9,105,
+102, 32, 40,104, 60, 48, 46, 48, 41, 10, 9, 9, 9,104, 32, 43, 61, 32, 49, 46, 48, 59, 10, 9,125, 10, 10, 9,111,117,116, 99,
+111,108, 32, 61, 32,118,101, 99, 52, 40,104, 44, 32,115, 44, 32,118, 44, 32,114,103, 98, 46,119, 41, 59, 10,125, 10, 10,118,111,
+105,100, 32,104,115,118, 95,116,111, 95,114,103, 98, 40,118,101, 99, 52, 32,104,115,118, 44, 32,111,117,116, 32,118,101, 99, 52,
+ 32,111,117,116, 99,111,108, 41, 10,123, 10, 9,102,108,111, 97,116, 32,105, 44, 32,102, 44, 32,112, 44, 32,113, 44, 32,116, 44,
+ 32,104, 44, 32,115, 44, 32,118, 59, 10, 9,118,101, 99, 51, 32,114,103, 98, 59, 10, 10, 9,104, 32, 61, 32,104,115,118, 91, 48,
+ 93, 59, 10, 9,115, 32, 61, 32,104,115,118, 91, 49, 93, 59, 10, 9,118, 32, 61, 32,104,115,118, 91, 50, 93, 59, 10, 10, 9,105,
+102, 40,115, 61, 61, 48, 46, 48, 41, 32,123, 10, 9, 9,114,103, 98, 32, 61, 32,118,101, 99, 51, 40,118, 44, 32,118, 44, 32,118,
+ 41, 59, 10, 9,125, 10, 9,101,108,115,101, 32,123, 10, 9, 9,105,102, 40,104, 61, 61, 49, 46, 48, 41, 10, 9, 9, 9,104, 32,
+ 61, 32, 48, 46, 48, 59, 10, 9, 9, 10, 9, 9,104, 32, 42, 61, 32, 54, 46, 48, 59, 10, 9, 9,105, 32, 61, 32,102,108,111,111,
+114, 40,104, 41, 59, 10, 9, 9,102, 32, 61, 32,104, 32, 45, 32,105, 59, 10, 9, 9,114,103, 98, 32, 61, 32,118,101, 99, 51, 40,
+102, 44, 32,102, 44, 32,102, 41, 59, 10, 9, 9,112, 32, 61, 32,118, 42, 40, 49, 46, 48, 45,115, 41, 59, 10, 9, 9,113, 32, 61,
+ 32,118, 42, 40, 49, 46, 48, 45, 40,115, 42,102, 41, 41, 59, 10, 9, 9,116, 32, 61, 32,118, 42, 40, 49, 46, 48, 45, 40,115, 42,
+ 40, 49, 46, 48, 45,102, 41, 41, 41, 59, 10, 9, 9, 10, 9, 9,105,102, 32, 40,105, 32, 61, 61, 32, 48, 46, 48, 41, 32,114,103,
+ 98, 32, 61, 32,118,101, 99, 51, 40,118, 44, 32,116, 44, 32,112, 41, 59, 10, 9, 9,101,108,115,101, 32,105,102, 32, 40,105, 32,
+ 61, 61, 32, 49, 46, 48, 41, 32,114,103, 98, 32, 61, 32,118,101, 99, 51, 40,113, 44, 32,118, 44, 32,112, 41, 59, 10, 9, 9,101,
+108,115,101, 32,105,102, 32, 40,105, 32, 61, 61, 32, 50, 46, 48, 41, 32,114,103, 98, 32, 61, 32,118,101, 99, 51, 40,112, 44, 32,
+118, 44, 32,116, 41, 59, 10, 9, 9,101,108,115,101, 32,105,102, 32, 40,105, 32, 61, 61, 32, 51, 46, 48, 41, 32,114,103, 98, 32,
+ 61, 32,118,101, 99, 51, 40,112, 44, 32,113, 44, 32,118, 41, 59, 10, 9, 9,101,108,115,101, 32,105,102, 32, 40,105, 32, 61, 61,
+ 32, 52, 46, 48, 41, 32,114,103, 98, 32, 61, 32,118,101, 99, 51, 40,116, 44, 32,112, 44, 32,118, 41, 59, 10, 9, 9,101,108,115,
+101, 32,114,103, 98, 32, 61, 32,118,101, 99, 51, 40,118, 44, 32,112, 44, 32,113, 41, 59, 10, 9,125, 10, 10, 9,111,117,116, 99,
+111,108, 32, 61, 32,118,101, 99, 52, 40,114,103, 98, 44, 32,104,115,118, 46,119, 41, 59, 10,125, 10, 10,102,108,111, 97,116, 32,
+115,114,103, 98, 95,116,111, 95,108,105,110,101, 97,114,114,103, 98, 40,102,108,111, 97,116, 32, 99, 41, 10,123, 10, 9,105,102,
+ 40, 99, 32, 60, 32, 48, 46, 48, 52, 48, 52, 53, 41, 10, 9, 9,114,101,116,117,114,110, 32, 40, 99, 32, 60, 32, 48, 46, 48, 41,
+ 63, 32, 48, 46, 48, 58, 32, 99, 32, 42, 32, 40, 49, 46, 48, 47, 49, 50, 46, 57, 50, 41, 59, 10, 9,101,108,115,101, 10, 9, 9,
+114,101,116,117,114,110, 32,112,111,119, 40, 40, 99, 32, 43, 32, 48, 46, 48, 53, 53, 41, 42, 40, 49, 46, 48, 47, 49, 46, 48, 53,
+ 53, 41, 44, 32, 50, 46, 52, 41, 59, 10,125, 10, 10,102,108,111, 97,116, 32,108,105,110,101, 97,114,114,103, 98, 95,116,111, 95,
+115,114,103, 98, 40,102,108,111, 97,116, 32, 99, 41, 10,123, 10, 9,105,102, 40, 99, 32, 60, 32, 48, 46, 48, 48, 51, 49, 51, 48,
+ 56, 41, 10, 9, 9,114,101,116,117,114,110, 32, 40, 99, 32, 60, 32, 48, 46, 48, 41, 63, 32, 48, 46, 48, 58, 32, 99, 32, 42, 32,
+ 49, 50, 46, 57, 50, 59, 10, 9,101,108,115,101, 10, 9, 9,114,101,116,117,114,110, 32, 49, 46, 48, 53, 53, 32, 42, 32,112,111,
+119, 40, 99, 44, 32, 49, 46, 48, 47, 50, 46, 52, 41, 32, 45, 32, 48, 46, 48, 53, 53, 59, 10,125, 10, 10,118,111,105,100, 32,115,
+114,103, 98, 95,116,111, 95,108,105,110,101, 97,114,114,103, 98, 40,118,101, 99, 52, 32, 99,111,108, 95,102,114,111,109, 44, 32,
+111,117,116, 32,118,101, 99, 52, 32, 99,111,108, 95,116,111, 41, 10,123, 10, 9, 99,111,108, 95,116,111, 46,114, 32, 61, 32,115,
+114,103, 98, 95,116,111, 95,108,105,110,101, 97,114,114,103, 98, 40, 99,111,108, 95,102,114,111,109, 46,114, 41, 59, 10, 9, 99,
+111,108, 95,116,111, 46,103, 32, 61, 32,115,114,103, 98, 95,116,111, 95,108,105,110,101, 97,114,114,103, 98, 40, 99,111,108, 95,
+102,114,111,109, 46,103, 41, 59, 10, 9, 99,111,108, 95,116,111, 46, 98, 32, 61, 32,115,114,103, 98, 95,116,111, 95,108,105,110,
+101, 97,114,114,103, 98, 40, 99,111,108, 95,102,114,111,109, 46, 98, 41, 59, 10, 9, 99,111,108, 95,116,111, 46, 97, 32, 61, 32,
+ 99,111,108, 95,102,114,111,109, 46, 97, 59, 10,125, 10, 10,118,111,105,100, 32,108,105,110,101, 97,114,114,103, 98, 95,116,111,
+ 95,115,114,103, 98, 40,118,101, 99, 52, 32, 99,111,108, 95,102,114,111,109, 44, 32,111,117,116, 32,118,101, 99, 52, 32, 99,111,
+108, 95,116,111, 41, 10,123, 10, 9, 99,111,108, 95,116,111, 46,114, 32, 61, 32,108,105,110,101, 97,114,114,103, 98, 95,116,111,
+ 95,115,114,103, 98, 40, 99,111,108, 95,102,114,111,109, 46,114, 41, 59, 10, 9, 99,111,108, 95,116,111, 46,103, 32, 61, 32,108,
+105,110,101, 97,114,114,103, 98, 95,116,111, 95,115,114,103, 98, 40, 99,111,108, 95,102,114,111,109, 46,103, 41, 59, 10, 9, 99,
+111,108, 95,116,111, 46, 98, 32, 61, 32,108,105,110,101, 97,114,114,103, 98, 95,116,111, 95,115,114,103, 98, 40, 99,111,108, 95,
+102,114,111,109, 46, 98, 41, 59, 10, 9, 99,111,108, 95,116,111, 46, 97, 32, 61, 32, 99,111,108, 95,102,114,111,109, 46, 97, 59,
+ 10,125, 10, 10, 35,100,101,102,105,110,101, 32, 77, 95, 80, 73, 32, 51, 46, 49, 52, 49, 53, 57, 50, 54, 53, 51, 53, 56, 57, 55,
+ 57, 51, 50, 51, 56, 52, 54, 10, 35,100,101,102,105,110,101, 32, 77, 95, 49, 95, 80, 73, 32, 48, 46, 51, 49, 56, 51, 48, 57, 56,
+ 56, 54, 49, 56, 51, 55, 57, 48, 54, 57, 10, 10, 47, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 32, 83, 72, 65, 68, 69, 82, 32,
+ 78, 79, 68, 69, 83, 32, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 47, 10, 10,118,111,105,100, 32,118, 99,111,
+108, 95, 97,116,116,114,105, 98,117,116,101, 40,118,101, 99, 52, 32, 97,116,116,118, 99,111,108, 44, 32,111,117,116, 32,118,101,
+ 99, 52, 32,118, 99,111,108, 41, 10,123, 10, 9,118, 99,111,108, 32, 61, 32,118,101, 99, 52, 40, 97,116,116,118, 99,111,108, 46,
+120, 47, 50, 53, 53, 46, 48, 44, 32, 97,116,116,118, 99,111,108, 46,121, 47, 50, 53, 53, 46, 48, 44, 32, 97,116,116,118, 99,111,
+108, 46,122, 47, 50, 53, 53, 46, 48, 44, 32, 49, 46, 48, 41, 59, 10,125, 10, 10,118,111,105,100, 32,117,118, 95, 97,116,116,114,
+105, 98,117,116,101, 40,118,101, 99, 50, 32, 97,116,116,117,118, 44, 32,111,117,116, 32,118,101, 99, 51, 32,117,118, 41, 10,123,
+ 10, 9,117,118, 32, 61, 32,118,101, 99, 51, 40, 97,116,116,117,118, 42, 50, 46, 48, 32, 45, 32,118,101, 99, 50, 40, 49, 46, 48,
+ 44, 32, 49, 46, 48, 41, 44, 32, 48, 46, 48, 41, 59, 10,125, 10, 10,118,111,105,100, 32,103,101,111,109, 40,118,101, 99, 51, 32,
+ 99,111, 44, 32,118,101, 99, 51, 32,110,111,114, 44, 32,109, 97,116, 52, 32,118,105,101,119,105,110,118,109, 97,116, 44, 32,118,
+101, 99, 51, 32, 97,116,116,111,114, 99,111, 44, 32,118,101, 99, 50, 32, 97,116,116,117,118, 44, 32,118,101, 99, 52, 32, 97,116,
+116,118, 99,111,108, 44, 32,111,117,116, 32,118,101, 99, 51, 32,103,108,111, 98, 97,108, 44, 32,111,117,116, 32,118,101, 99, 51,
+ 32,108,111, 99, 97,108, 44, 32,111,117,116, 32,118,101, 99, 51, 32,118,105,101,119, 44, 32,111,117,116, 32,118,101, 99, 51, 32,
+111,114, 99,111, 44, 32,111,117,116, 32,118,101, 99, 51, 32,117,118, 44, 32,111,117,116, 32,118,101, 99, 51, 32,110,111,114,109,
+ 97,108, 44, 32,111,117,116, 32,118,101, 99, 52, 32,118, 99,111,108, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,118, 99,111,
+108, 95, 97,108,112,104, 97, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,102,114,111,110,116, 98, 97, 99,107, 41, 10,123, 10,
+ 9,108,111, 99, 97,108, 32, 61, 32, 99,111, 59, 10, 9,118,105,101,119, 32, 61, 32,110,111,114,109, 97,108,105,122,101, 40,108,
+111, 99, 97,108, 41, 59, 10, 9,103,108,111, 98, 97,108, 32, 61, 32, 40,118,105,101,119,105,110,118,109, 97,116, 42,118,101, 99,
+ 52, 40,108,111, 99, 97,108, 44, 32, 49, 46, 48, 41, 41, 46,120,121,122, 59, 10, 9,111,114, 99,111, 32, 61, 32, 97,116,116,111,
+114, 99,111, 59, 10, 9,117,118, 95, 97,116,116,114,105, 98,117,116,101, 40, 97,116,116,117,118, 44, 32,117,118, 41, 59, 10, 9,
+110,111,114,109, 97,108, 32, 61, 32, 45,110,111,114,109, 97,108,105,122,101, 40,110,111,114, 41, 59, 9, 47, 42, 32, 98,108,101,
+110,100,101,114, 32,114,101,110,100,101,114, 32,110,111,114,109, 97,108, 32,105,115, 32,110,101,103, 97,116,101,100, 32, 42, 47,
+ 10, 9,118, 99,111,108, 95, 97,116,116,114,105, 98,117,116,101, 40, 97,116,116,118, 99,111,108, 44, 32,118, 99,111,108, 41, 59,
+ 10, 9,118, 99,111,108, 95, 97,108,112,104, 97, 32, 61, 32, 97,116,116,118, 99,111,108, 46, 97, 59, 10, 9,102,114,111,110,116,
+ 98, 97, 99,107, 32, 61, 32, 49, 46, 48, 59, 10,125, 10, 10,118,111,105,100, 32,109, 97,112,112,105,110,103, 40,118,101, 99, 51,
+ 32,118,101, 99, 44, 32,109, 97,116, 52, 32,109, 97,116, 44, 32,118,101, 99, 51, 32,109,105,110,118,101, 99, 44, 32,118,101, 99,
+ 51, 32,109, 97,120,118,101, 99, 44, 32,102,108,111, 97,116, 32,100,111,109,105,110, 44, 32,102,108,111, 97,116, 32,100,111,109,
+ 97,120, 44, 32,111,117,116, 32,118,101, 99, 51, 32,111,117,116,118,101, 99, 41, 10,123, 10, 9,111,117,116,118,101, 99, 32, 61,
+ 32, 40,109, 97,116, 32, 42, 32,118,101, 99, 52, 40,118,101, 99, 44, 32, 49, 46, 48, 41, 41, 46,120,121,122, 59, 10, 9,105,102,
+ 40,100,111,109,105,110, 32, 61, 61, 32, 49, 46, 48, 41, 10, 9, 9,111,117,116,118,101, 99, 32, 61, 32,109, 97,120, 40,111,117,
+116,118,101, 99, 44, 32,109,105,110,118,101, 99, 41, 59, 10, 9,105,102, 40,100,111,109, 97,120, 32, 61, 61, 32, 49, 46, 48, 41,
+ 10, 9, 9,111,117,116,118,101, 99, 32, 61, 32,109,105,110, 40,111,117,116,118,101, 99, 44, 32,109, 97,120,118,101, 99, 41, 59,
+ 10,125, 10, 10,118,111,105,100, 32, 99, 97,109,101,114, 97, 40,118,101, 99, 51, 32, 99,111, 44, 32,111,117,116, 32,118,101, 99,
+ 51, 32,111,117,116,118,105,101,119, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,111,117,116,100,101,112,116,104, 44, 32,111,
+117,116, 32,102,108,111, 97,116, 32,111,117,116,100,105,115,116, 41, 10,123, 10, 9,111,117,116,100,101,112,116,104, 32, 61, 32,
+ 97, 98,115, 40, 99,111, 46,122, 41, 59, 10, 9,111,117,116,100,105,115,116, 32, 61, 32,108,101,110,103,116,104, 40, 99,111, 41,
+ 59, 10, 9,111,117,116,118,105,101,119, 32, 61, 32,110,111,114,109, 97,108,105,122,101, 40, 99,111, 41, 59, 10,125, 10, 10,118,
+111,105,100, 32,109, 97,116,104, 95, 97,100,100, 40,102,108,111, 97,116, 32,118, 97,108, 49, 44, 32,102,108,111, 97,116, 32,118,
+ 97,108, 50, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,111,117,116,118, 97,108, 41, 10,123, 10, 9,111,117,116,118, 97,108,
+ 32, 61, 32,118, 97,108, 49, 32, 43, 32,118, 97,108, 50, 59, 10,125, 10, 10,118,111,105,100, 32,109, 97,116,104, 95,115,117, 98,
+116,114, 97, 99,116, 40,102,108,111, 97,116, 32,118, 97,108, 49, 44, 32,102,108,111, 97,116, 32,118, 97,108, 50, 44, 32,111,117,
+116, 32,102,108,111, 97,116, 32,111,117,116,118, 97,108, 41, 10,123, 10, 9,111,117,116,118, 97,108, 32, 61, 32,118, 97,108, 49,
+ 32, 45, 32,118, 97,108, 50, 59, 10,125, 10, 10,118,111,105,100, 32,109, 97,116,104, 95,109,117,108,116,105,112,108,121, 40,102,
+108,111, 97,116, 32,118, 97,108, 49, 44, 32,102,108,111, 97,116, 32,118, 97,108, 50, 44, 32,111,117,116, 32,102,108,111, 97,116,
+ 32,111,117,116,118, 97,108, 41, 10,123, 10, 9,111,117,116,118, 97,108, 32, 61, 32,118, 97,108, 49, 32, 42, 32,118, 97,108, 50,
+ 59, 10,125, 10, 10,118,111,105,100, 32,109, 97,116,104, 95,100,105,118,105,100,101, 40,102,108,111, 97,116, 32,118, 97,108, 49,
+ 44, 32,102,108,111, 97,116, 32,118, 97,108, 50, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,111,117,116,118, 97,108, 41, 10,
+123, 10, 9,105,102, 32, 40,118, 97,108, 50, 32, 61, 61, 32, 48, 46, 48, 41, 10, 9, 9,111,117,116,118, 97,108, 32, 61, 32, 48,
+ 46, 48, 59, 10, 9,101,108,115,101, 10, 9, 9,111,117,116,118, 97,108, 32, 61, 32,118, 97,108, 49, 32, 47, 32,118, 97,108, 50,
+ 59, 10,125, 10, 10,118,111,105,100, 32,109, 97,116,104, 95,115,105,110,101, 40,102,108,111, 97,116, 32,118, 97,108, 44, 32,111,
+117,116, 32,102,108,111, 97,116, 32,111,117,116,118, 97,108, 41, 10,123, 10, 9,111,117,116,118, 97,108, 32, 61, 32,115,105,110,
+ 40,118, 97,108, 41, 59, 10,125, 10, 10,118,111,105,100, 32,109, 97,116,104, 95, 99,111,115,105,110,101, 40,102,108,111, 97,116,
+ 32,118, 97,108, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,111,117,116,118, 97,108, 41, 10,123, 10, 9,111,117,116,118, 97,
+108, 32, 61, 32, 99,111,115, 40,118, 97,108, 41, 59, 10,125, 10, 10,118,111,105,100, 32,109, 97,116,104, 95,116, 97,110,103,101,
+110,116, 40,102,108,111, 97,116, 32,118, 97,108, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,111,117,116,118, 97,108, 41, 10,
+123, 10, 9,111,117,116,118, 97,108, 32, 61, 32,116, 97,110, 40,118, 97,108, 41, 59, 10,125, 10, 10,118,111,105,100, 32,109, 97,
+116,104, 95, 97,115,105,110, 40,102,108,111, 97,116, 32,118, 97,108, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,111,117,116,
+118, 97,108, 41, 10,123, 10, 9,105,102, 32, 40,118, 97,108, 32, 60, 61, 32, 49, 46, 48, 32, 38, 38, 32,118, 97,108, 32, 62, 61,
+ 32, 45, 49, 46, 48, 41, 10, 9, 9,111,117,116,118, 97,108, 32, 61, 32, 97,115,105,110, 40,118, 97,108, 41, 59, 10, 9,101,108,
+115,101, 10, 9, 9,111,117,116,118, 97,108, 32, 61, 32, 48, 46, 48, 59, 10,125, 10, 10,118,111,105,100, 32,109, 97,116,104, 95,
+ 97, 99,111,115, 40,102,108,111, 97,116, 32,118, 97,108, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,111,117,116,118, 97,108,
+ 41, 10,123, 10, 9,105,102, 32, 40,118, 97,108, 32, 60, 61, 32, 49, 46, 48, 32, 38, 38, 32,118, 97,108, 32, 62, 61, 32, 45, 49,
+ 46, 48, 41, 10, 9, 9,111,117,116,118, 97,108, 32, 61, 32, 97, 99,111,115, 40,118, 97,108, 41, 59, 10, 9,101,108,115,101, 10,
+ 9, 9,111,117,116,118, 97,108, 32, 61, 32, 48, 46, 48, 59, 10,125, 10, 10,118,111,105,100, 32,109, 97,116,104, 95, 97,116, 97,
+110, 40,102,108,111, 97,116, 32,118, 97,108, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,111,117,116,118, 97,108, 41, 10,123,
+ 10, 9,111,117,116,118, 97,108, 32, 61, 32, 97,116, 97,110, 40,118, 97,108, 41, 59, 10,125, 10, 10,118,111,105,100, 32,109, 97,
+116,104, 95,112,111,119, 40,102,108,111, 97,116, 32,118, 97,108, 49, 44, 32,102,108,111, 97,116, 32,118, 97,108, 50, 44, 32,111,
+117,116, 32,102,108,111, 97,116, 32,111,117,116,118, 97,108, 41, 10,123, 10, 9,105,102, 32, 40,118, 97,108, 49, 32, 62, 61, 32,
+ 48, 46, 48, 41, 10, 9, 9,111,117,116,118, 97,108, 32, 61, 32,112,111,119, 40,118, 97,108, 49, 44, 32,118, 97,108, 50, 41, 59,
+ 10, 9,101,108,115,101, 10, 9, 9,111,117,116,118, 97,108, 32, 61, 32, 48, 46, 48, 59, 10,125, 10, 10,118,111,105,100, 32,109,
+ 97,116,104, 95,108,111,103, 40,102,108,111, 97,116, 32,118, 97,108, 49, 44, 32,102,108,111, 97,116, 32,118, 97,108, 50, 44, 32,
+111,117,116, 32,102,108,111, 97,116, 32,111,117,116,118, 97,108, 41, 10,123, 10, 9,105,102, 40,118, 97,108, 49, 32, 62, 32, 48,
+ 46, 48, 32, 32, 38, 38, 32,118, 97,108, 50, 32, 62, 32, 48, 46, 48, 41, 10, 9, 9,111,117,116,118, 97,108, 61, 32,108,111,103,
+ 50, 40,118, 97,108, 49, 41, 32, 47, 32,108,111,103, 50, 40,118, 97,108, 50, 41, 59, 10, 9,101,108,115,101, 10, 9, 9,111,117,
+116,118, 97,108, 61, 32, 48, 46, 48, 59, 10,125, 10, 10,118,111,105,100, 32,109, 97,116,104, 95,109, 97,120, 40,102,108,111, 97,
116, 32,118, 97,108, 49, 44, 32,102,108,111, 97,116, 32,118, 97,108, 50, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,111,117,
-116,118, 97,108, 41, 10,123, 10, 9,111,117,116,118, 97,108, 32, 61, 32,118, 97,108, 49, 32, 45, 32,118, 97,108, 50, 59, 10,125,
- 10, 10,118,111,105,100, 32,109, 97,116,104, 95,109,117,108,116,105,112,108,121, 40,102,108,111, 97,116, 32,118, 97,108, 49, 44,
- 32,102,108,111, 97,116, 32,118, 97,108, 50, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,111,117,116,118, 97,108, 41, 10,123,
- 10, 9,111,117,116,118, 97,108, 32, 61, 32,118, 97,108, 49, 32, 42, 32,118, 97,108, 50, 59, 10,125, 10, 10,118,111,105,100, 32,
-109, 97,116,104, 95,100,105,118,105,100,101, 40,102,108,111, 97,116, 32,118, 97,108, 49, 44, 32,102,108,111, 97,116, 32,118, 97,
-108, 50, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,111,117,116,118, 97,108, 41, 10,123, 10, 9,105,102, 32, 40,118, 97,108,
- 50, 32, 61, 61, 32, 48, 46, 48, 41, 10, 9, 9,111,117,116,118, 97,108, 32, 61, 32, 48, 46, 48, 59, 10, 9,101,108,115,101, 10,
- 9, 9,111,117,116,118, 97,108, 32, 61, 32,118, 97,108, 49, 32, 47, 32,118, 97,108, 50, 59, 10,125, 10, 10,118,111,105,100, 32,
-109, 97,116,104, 95,115,105,110,101, 40,102,108,111, 97,116, 32,118, 97,108, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,111,
-117,116,118, 97,108, 41, 10,123, 10, 9,111,117,116,118, 97,108, 32, 61, 32,115,105,110, 40,118, 97,108, 41, 59, 10,125, 10, 10,
-118,111,105,100, 32,109, 97,116,104, 95, 99,111,115,105,110,101, 40,102,108,111, 97,116, 32,118, 97,108, 44, 32,111,117,116, 32,
-102,108,111, 97,116, 32,111,117,116,118, 97,108, 41, 10,123, 10, 9,111,117,116,118, 97,108, 32, 61, 32, 99,111,115, 40,118, 97,
-108, 41, 59, 10,125, 10, 10,118,111,105,100, 32,109, 97,116,104, 95,116, 97,110,103,101,110,116, 40,102,108,111, 97,116, 32,118,
- 97,108, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,111,117,116,118, 97,108, 41, 10,123, 10, 9,111,117,116,118, 97,108, 32,
- 61, 32,116, 97,110, 40,118, 97,108, 41, 59, 10,125, 10, 10,118,111,105,100, 32,109, 97,116,104, 95, 97,115,105,110, 40,102,108,
-111, 97,116, 32,118, 97,108, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,111,117,116,118, 97,108, 41, 10,123, 10, 9,105,102,
- 32, 40,118, 97,108, 32, 60, 61, 32, 49, 46, 48, 32, 38, 38, 32,118, 97,108, 32, 62, 61, 32, 45, 49, 46, 48, 41, 10, 9, 9,111,
-117,116,118, 97,108, 32, 61, 32, 97,115,105,110, 40,118, 97,108, 41, 59, 10, 9,101,108,115,101, 10, 9, 9,111,117,116,118, 97,
-108, 32, 61, 32, 48, 46, 48, 59, 10,125, 10, 10,118,111,105,100, 32,109, 97,116,104, 95, 97, 99,111,115, 40,102,108,111, 97,116,
- 32,118, 97,108, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,111,117,116,118, 97,108, 41, 10,123, 10, 9,105,102, 32, 40,118,
- 97,108, 32, 60, 61, 32, 49, 46, 48, 32, 38, 38, 32,118, 97,108, 32, 62, 61, 32, 45, 49, 46, 48, 41, 10, 9, 9,111,117,116,118,
- 97,108, 32, 61, 32, 97, 99,111,115, 40,118, 97,108, 41, 59, 10, 9,101,108,115,101, 10, 9, 9,111,117,116,118, 97,108, 32, 61,
- 32, 48, 46, 48, 59, 10,125, 10, 10,118,111,105,100, 32,109, 97,116,104, 95, 97,116, 97,110, 40,102,108,111, 97,116, 32,118, 97,
-108, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,111,117,116,118, 97,108, 41, 10,123, 10, 9,111,117,116,118, 97,108, 32, 61,
- 32, 97,116, 97,110, 40,118, 97,108, 41, 59, 10,125, 10, 10,118,111,105,100, 32,109, 97,116,104, 95,112,111,119, 40,102,108,111,
- 97,116, 32,118, 97,108, 49, 44, 32,102,108,111, 97,116, 32,118, 97,108, 50, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,111,
-117,116,118, 97,108, 41, 10,123, 10, 9,105,102, 32, 40,118, 97,108, 49, 32, 62, 61, 32, 48, 46, 48, 41, 10, 9, 9,111,117,116,
-118, 97,108, 32, 61, 32,112,111,119, 40,118, 97,108, 49, 44, 32,118, 97,108, 50, 41, 59, 10, 9,101,108,115,101, 10, 9, 9,111,
-117,116,118, 97,108, 32, 61, 32, 48, 46, 48, 59, 10,125, 10, 10,118,111,105,100, 32,109, 97,116,104, 95,108,111,103, 40,102,108,
-111, 97,116, 32,118, 97,108, 49, 44, 32,102,108,111, 97,116, 32,118, 97,108, 50, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,
-111,117,116,118, 97,108, 41, 10,123, 10, 9,105,102, 40,118, 97,108, 49, 32, 62, 32, 48, 46, 48, 32, 32, 38, 38, 32,118, 97,108,
- 50, 32, 62, 32, 48, 46, 48, 41, 10, 9, 9,111,117,116,118, 97,108, 61, 32,108,111,103, 50, 40,118, 97,108, 49, 41, 32, 47, 32,
-108,111,103, 50, 40,118, 97,108, 50, 41, 59, 10, 9,101,108,115,101, 10, 9, 9,111,117,116,118, 97,108, 61, 32, 48, 46, 48, 59,
- 10,125, 10, 10,118,111,105,100, 32,109, 97,116,104, 95,109, 97,120, 40,102,108,111, 97,116, 32,118, 97,108, 49, 44, 32,102,108,
-111, 97,116, 32,118, 97,108, 50, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,111,117,116,118, 97,108, 41, 10,123, 10, 9,111,
-117,116,118, 97,108, 32, 61, 32,109, 97,120, 40,118, 97,108, 49, 44, 32,118, 97,108, 50, 41, 59, 10,125, 10, 10,118,111,105,100,
- 32,109, 97,116,104, 95,109,105,110, 40,102,108,111, 97,116, 32,118, 97,108, 49, 44, 32,102,108,111, 97,116, 32,118, 97,108, 50,
- 44, 32,111,117,116, 32,102,108,111, 97,116, 32,111,117,116,118, 97,108, 41, 10,123, 10, 9,111,117,116,118, 97,108, 32, 61, 32,
-109,105,110, 40,118, 97,108, 49, 44, 32,118, 97,108, 50, 41, 59, 10,125, 10, 10,118,111,105,100, 32,109, 97,116,104, 95,114,111,
-117,110,100, 40,102,108,111, 97,116, 32,118, 97,108, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,111,117,116,118, 97,108, 41,
- 10,123, 10, 9,111,117,116,118, 97,108, 61, 32,102,108,111,111,114, 40,118, 97,108, 32, 43, 32, 48, 46, 53, 41, 59, 10,125, 10,
- 10,118,111,105,100, 32,109, 97,116,104, 95,108,101,115,115, 95,116,104, 97,110, 40,102,108,111, 97,116, 32,118, 97,108, 49, 44,
- 32,102,108,111, 97,116, 32,118, 97,108, 50, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,111,117,116,118, 97,108, 41, 10,123,
- 10, 9,105,102, 40,118, 97,108, 49, 32, 60, 32,118, 97,108, 50, 41, 10, 9, 9,111,117,116,118, 97,108, 32, 61, 32, 49, 46, 48,
- 59, 10, 9,101,108,115,101, 10, 9, 9,111,117,116,118, 97,108, 32, 61, 32, 48, 46, 48, 59, 10,125, 10, 10,118,111,105,100, 32,
-109, 97,116,104, 95,103,114,101, 97,116,101,114, 95,116,104, 97,110, 40,102,108,111, 97,116, 32,118, 97,108, 49, 44, 32,102,108,
-111, 97,116, 32,118, 97,108, 50, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,111,117,116,118, 97,108, 41, 10,123, 10, 9,105,
-102, 40,118, 97,108, 49, 32, 62, 32,118, 97,108, 50, 41, 10, 9, 9,111,117,116,118, 97,108, 32, 61, 32, 49, 46, 48, 59, 10, 9,
-101,108,115,101, 10, 9, 9,111,117,116,118, 97,108, 32, 61, 32, 48, 46, 48, 59, 10,125, 10, 10,118,111,105,100, 32,115,113,117,
-101,101,122,101, 40,102,108,111, 97,116, 32,118, 97,108, 44, 32,102,108,111, 97,116, 32,119,105,100,116,104, 44, 32,102,108,111,
- 97,116, 32, 99,101,110,116,101,114, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,111,117,116,118, 97,108, 41, 10,123, 10, 9,
-111,117,116,118, 97,108, 32, 61, 32, 49, 46, 48, 47, 40, 49, 46, 48, 32, 43, 32,112,111,119, 40, 50, 46, 55, 49, 56, 50, 56, 49,
- 56, 51, 44, 32, 45, 40, 40,118, 97,108, 45, 99,101,110,116,101,114, 41, 42,119,105,100,116,104, 41, 41, 41, 59, 10,125, 10, 10,
-118,111,105,100, 32,118,101, 99, 95,109, 97,116,104, 95, 97,100,100, 40,118,101, 99, 51, 32,118, 49, 44, 32,118,101, 99, 51, 32,
-118, 50, 44, 32,111,117,116, 32,118,101, 99, 51, 32,111,117,116,118,101, 99, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,111,
-117,116,118, 97,108, 41, 10,123, 10, 9,111,117,116,118,101, 99, 32, 61, 32,118, 49, 32, 43, 32,118, 50, 59, 10, 9,111,117,116,
-118, 97,108, 32, 61, 32, 40, 97, 98,115, 40,111,117,116,118,101, 99, 91, 48, 93, 41, 32, 43, 32, 97, 98,115, 40,111,117,116,118,
-101, 99, 91, 49, 93, 41, 32, 43, 32, 97, 98,115, 40,111,117,116,118,101, 99, 91, 50, 93, 41, 41, 47, 51, 46, 48, 59, 10,125, 10,
- 10,118,111,105,100, 32,118,101, 99, 95,109, 97,116,104, 95,115,117, 98, 40,118,101, 99, 51, 32,118, 49, 44, 32,118,101, 99, 51,
- 32,118, 50, 44, 32,111,117,116, 32,118,101, 99, 51, 32,111,117,116,118,101, 99, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,
-111,117,116,118, 97,108, 41, 10,123, 10, 9,111,117,116,118,101, 99, 32, 61, 32,118, 49, 32, 45, 32,118, 50, 59, 10, 9,111,117,
-116,118, 97,108, 32, 61, 32, 40, 97, 98,115, 40,111,117,116,118,101, 99, 91, 48, 93, 41, 32, 43, 32, 97, 98,115, 40,111,117,116,
-118,101, 99, 91, 49, 93, 41, 32, 43, 32, 97, 98,115, 40,111,117,116,118,101, 99, 91, 50, 93, 41, 41, 47, 51, 46, 48, 59, 10,125,
- 10, 10,118,111,105,100, 32,118,101, 99, 95,109, 97,116,104, 95, 97,118,101,114, 97,103,101, 40,118,101, 99, 51, 32,118, 49, 44,
+116,118, 97,108, 41, 10,123, 10, 9,111,117,116,118, 97,108, 32, 61, 32,109, 97,120, 40,118, 97,108, 49, 44, 32,118, 97,108, 50,
+ 41, 59, 10,125, 10, 10,118,111,105,100, 32,109, 97,116,104, 95,109,105,110, 40,102,108,111, 97,116, 32,118, 97,108, 49, 44, 32,
+102,108,111, 97,116, 32,118, 97,108, 50, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,111,117,116,118, 97,108, 41, 10,123, 10,
+ 9,111,117,116,118, 97,108, 32, 61, 32,109,105,110, 40,118, 97,108, 49, 44, 32,118, 97,108, 50, 41, 59, 10,125, 10, 10,118,111,
+105,100, 32,109, 97,116,104, 95,114,111,117,110,100, 40,102,108,111, 97,116, 32,118, 97,108, 44, 32,111,117,116, 32,102,108,111,
+ 97,116, 32,111,117,116,118, 97,108, 41, 10,123, 10, 9,111,117,116,118, 97,108, 61, 32,102,108,111,111,114, 40,118, 97,108, 32,
+ 43, 32, 48, 46, 53, 41, 59, 10,125, 10, 10,118,111,105,100, 32,109, 97,116,104, 95,108,101,115,115, 95,116,104, 97,110, 40,102,
+108,111, 97,116, 32,118, 97,108, 49, 44, 32,102,108,111, 97,116, 32,118, 97,108, 50, 44, 32,111,117,116, 32,102,108,111, 97,116,
+ 32,111,117,116,118, 97,108, 41, 10,123, 10, 9,105,102, 40,118, 97,108, 49, 32, 60, 32,118, 97,108, 50, 41, 10, 9, 9,111,117,
+116,118, 97,108, 32, 61, 32, 49, 46, 48, 59, 10, 9,101,108,115,101, 10, 9, 9,111,117,116,118, 97,108, 32, 61, 32, 48, 46, 48,
+ 59, 10,125, 10, 10,118,111,105,100, 32,109, 97,116,104, 95,103,114,101, 97,116,101,114, 95,116,104, 97,110, 40,102,108,111, 97,
+116, 32,118, 97,108, 49, 44, 32,102,108,111, 97,116, 32,118, 97,108, 50, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,111,117,
+116,118, 97,108, 41, 10,123, 10, 9,105,102, 40,118, 97,108, 49, 32, 62, 32,118, 97,108, 50, 41, 10, 9, 9,111,117,116,118, 97,
+108, 32, 61, 32, 49, 46, 48, 59, 10, 9,101,108,115,101, 10, 9, 9,111,117,116,118, 97,108, 32, 61, 32, 48, 46, 48, 59, 10,125,
+ 10, 10,118,111,105,100, 32,115,113,117,101,101,122,101, 40,102,108,111, 97,116, 32,118, 97,108, 44, 32,102,108,111, 97,116, 32,
+119,105,100,116,104, 44, 32,102,108,111, 97,116, 32, 99,101,110,116,101,114, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,111,
+117,116,118, 97,108, 41, 10,123, 10, 9,111,117,116,118, 97,108, 32, 61, 32, 49, 46, 48, 47, 40, 49, 46, 48, 32, 43, 32,112,111,
+119, 40, 50, 46, 55, 49, 56, 50, 56, 49, 56, 51, 44, 32, 45, 40, 40,118, 97,108, 45, 99,101,110,116,101,114, 41, 42,119,105,100,
+116,104, 41, 41, 41, 59, 10,125, 10, 10,118,111,105,100, 32,118,101, 99, 95,109, 97,116,104, 95, 97,100,100, 40,118,101, 99, 51,
+ 32,118, 49, 44, 32,118,101, 99, 51, 32,118, 50, 44, 32,111,117,116, 32,118,101, 99, 51, 32,111,117,116,118,101, 99, 44, 32,111,
+117,116, 32,102,108,111, 97,116, 32,111,117,116,118, 97,108, 41, 10,123, 10, 9,111,117,116,118,101, 99, 32, 61, 32,118, 49, 32,
+ 43, 32,118, 50, 59, 10, 9,111,117,116,118, 97,108, 32, 61, 32, 40, 97, 98,115, 40,111,117,116,118,101, 99, 91, 48, 93, 41, 32,
+ 43, 32, 97, 98,115, 40,111,117,116,118,101, 99, 91, 49, 93, 41, 32, 43, 32, 97, 98,115, 40,111,117,116,118,101, 99, 91, 50, 93,
+ 41, 41, 47, 51, 46, 48, 59, 10,125, 10, 10,118,111,105,100, 32,118,101, 99, 95,109, 97,116,104, 95,115,117, 98, 40,118,101, 99,
+ 51, 32,118, 49, 44, 32,118,101, 99, 51, 32,118, 50, 44, 32,111,117,116, 32,118,101, 99, 51, 32,111,117,116,118,101, 99, 44, 32,
+111,117,116, 32,102,108,111, 97,116, 32,111,117,116,118, 97,108, 41, 10,123, 10, 9,111,117,116,118,101, 99, 32, 61, 32,118, 49,
+ 32, 45, 32,118, 50, 59, 10, 9,111,117,116,118, 97,108, 32, 61, 32, 40, 97, 98,115, 40,111,117,116,118,101, 99, 91, 48, 93, 41,
+ 32, 43, 32, 97, 98,115, 40,111,117,116,118,101, 99, 91, 49, 93, 41, 32, 43, 32, 97, 98,115, 40,111,117,116,118,101, 99, 91, 50,
+ 93, 41, 41, 47, 51, 46, 48, 59, 10,125, 10, 10,118,111,105,100, 32,118,101, 99, 95,109, 97,116,104, 95, 97,118,101,114, 97,103,
+101, 40,118,101, 99, 51, 32,118, 49, 44, 32,118,101, 99, 51, 32,118, 50, 44, 32,111,117,116, 32,118,101, 99, 51, 32,111,117,116,
+118,101, 99, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,111,117,116,118, 97,108, 41, 10,123, 10, 9,111,117,116,118,101, 99,
+ 32, 61, 32,118, 49, 32, 43, 32,118, 50, 59, 10, 9,111,117,116,118, 97,108, 32, 61, 32,108,101,110,103,116,104, 40,111,117,116,
+118,101, 99, 41, 59, 10, 9,111,117,116,118,101, 99, 32, 61, 32,110,111,114,109, 97,108,105,122,101, 40,111,117,116,118,101, 99,
+ 41, 59, 10,125, 10, 10,118,111,105,100, 32,118,101, 99, 95,109, 97,116,104, 95,100,111,116, 40,118,101, 99, 51, 32,118, 49, 44,
32,118,101, 99, 51, 32,118, 50, 44, 32,111,117,116, 32,118,101, 99, 51, 32,111,117,116,118,101, 99, 44, 32,111,117,116, 32,102,
-108,111, 97,116, 32,111,117,116,118, 97,108, 41, 10,123, 10, 9,111,117,116,118,101, 99, 32, 61, 32,118, 49, 32, 43, 32,118, 50,
- 59, 10, 9,111,117,116,118, 97,108, 32, 61, 32,108,101,110,103,116,104, 40,111,117,116,118,101, 99, 41, 59, 10, 9,111,117,116,
-118,101, 99, 32, 61, 32,110,111,114,109, 97,108,105,122,101, 40,111,117,116,118,101, 99, 41, 59, 10,125, 10, 10,118,111,105,100,
- 32,118,101, 99, 95,109, 97,116,104, 95,100,111,116, 40,118,101, 99, 51, 32,118, 49, 44, 32,118,101, 99, 51, 32,118, 50, 44, 32,
-111,117,116, 32,118,101, 99, 51, 32,111,117,116,118,101, 99, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,111,117,116,118, 97,
-108, 41, 10,123, 10, 9,111,117,116,118,101, 99, 32, 61, 32,118,101, 99, 51, 40, 48, 44, 32, 48, 44, 32, 48, 41, 59, 10, 9,111,
-117,116,118, 97,108, 32, 61, 32,100,111,116, 40,118, 49, 44, 32,118, 50, 41, 59, 10,125, 10, 10,118,111,105,100, 32,118,101, 99,
- 95,109, 97,116,104, 95, 99,114,111,115,115, 40,118,101, 99, 51, 32,118, 49, 44, 32,118,101, 99, 51, 32,118, 50, 44, 32,111,117,
-116, 32,118,101, 99, 51, 32,111,117,116,118,101, 99, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,111,117,116,118, 97,108, 41,
- 10,123, 10, 9,111,117,116,118,101, 99, 32, 61, 32, 99,114,111,115,115, 40,118, 49, 44, 32,118, 50, 41, 59, 10, 9,111,117,116,
-118, 97,108, 32, 61, 32,108,101,110,103,116,104, 40,111,117,116,118,101, 99, 41, 59, 10,125, 10, 10,118,111,105,100, 32,118,101,
- 99, 95,109, 97,116,104, 95,110,111,114,109, 97,108,105,122,101, 40,118,101, 99, 51, 32,118, 44, 32,111,117,116, 32,118,101, 99,
- 51, 32,111,117,116,118,101, 99, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,111,117,116,118, 97,108, 41, 10,123, 10, 9,111,
-117,116,118, 97,108, 32, 61, 32,108,101,110,103,116,104, 40,118, 41, 59, 10, 9,111,117,116,118,101, 99, 32, 61, 32,110,111,114,
-109, 97,108,105,122,101, 40,118, 41, 59, 10,125, 10, 10,118,111,105,100, 32,118,101, 99, 95,109, 97,116,104, 95,110,101,103, 97,
-116,101, 40,118,101, 99, 51, 32,118, 44, 32,111,117,116, 32,118,101, 99, 51, 32,111,117,116,118, 41, 10,123, 10, 9,111,117,116,
-118, 32, 61, 32, 45,118, 59, 10,125, 10, 10,118,111,105,100, 32,110,111,114,109, 97,108, 40,118,101, 99, 51, 32,100,105,114, 44,
- 32,118,101, 99, 51, 32,110,111,114, 44, 32,111,117,116, 32,118,101, 99, 51, 32,111,117,116,110,111,114, 44, 32,111,117,116, 32,
-102,108,111, 97,116, 32,111,117,116,100,111,116, 41, 10,123, 10, 9,111,117,116,110,111,114, 32, 61, 32,100,105,114, 59, 10, 9,
-111,117,116,100,111,116, 32, 61, 32, 45,100,111,116, 40,100,105,114, 44, 32,110,111,114, 41, 59, 10,125, 10, 10,118,111,105,100,
- 32, 99,117,114,118,101,115, 95,118,101, 99, 40,102,108,111, 97,116, 32,102, 97, 99, 44, 32,118,101, 99, 51, 32,118,101, 99, 44,
- 32,115, 97,109,112,108,101,114, 50, 68, 32, 99,117,114,118,101,109, 97,112, 44, 32,111,117,116, 32,118,101, 99, 51, 32,111,117,
-116,118,101, 99, 41, 10,123, 10, 9,111,117,116,118,101, 99, 46,120, 32, 61, 32,116,101,120,116,117,114,101, 50, 68, 40, 99,117,
-114,118,101,109, 97,112, 44, 32,118,101, 99, 50, 40, 40,118,101, 99, 46,120, 32, 43, 32, 49, 46, 48, 41, 42, 48, 46, 53, 44, 32,
- 48, 46, 48, 41, 41, 46,120, 59, 10, 9,111,117,116,118,101, 99, 46,121, 32, 61, 32,116,101,120,116,117,114,101, 50, 68, 40, 99,
-117,114,118,101,109, 97,112, 44, 32,118,101, 99, 50, 40, 40,118,101, 99, 46,121, 32, 43, 32, 49, 46, 48, 41, 42, 48, 46, 53, 44,
- 32, 48, 46, 48, 41, 41, 46,121, 59, 10, 9,111,117,116,118,101, 99, 46,122, 32, 61, 32,116,101,120,116,117,114,101, 50, 68, 40,
- 99,117,114,118,101,109, 97,112, 44, 32,118,101, 99, 50, 40, 40,118,101, 99, 46,122, 32, 43, 32, 49, 46, 48, 41, 42, 48, 46, 53,
- 44, 32, 48, 46, 48, 41, 41, 46,122, 59, 10, 10, 9,105,102, 32, 40,102, 97, 99, 32, 33, 61, 32, 49, 46, 48, 41, 10, 9, 9,111,
-117,116,118,101, 99, 32, 61, 32, 40,111,117,116,118,101, 99, 42,102, 97, 99, 41, 32, 43, 32, 40,118,101, 99, 42, 40, 49, 46, 48,
- 45,102, 97, 99, 41, 41, 59, 10, 10,125, 10, 10,118,111,105,100, 32, 99,117,114,118,101,115, 95,114,103, 98, 40,102,108,111, 97,
-116, 32,102, 97, 99, 44, 32,118,101, 99, 52, 32, 99,111,108, 44, 32,115, 97,109,112,108,101,114, 50, 68, 32, 99,117,114,118,101,
-109, 97,112, 44, 32,111,117,116, 32,118,101, 99, 52, 32,111,117,116, 99,111,108, 41, 10,123, 10, 9,111,117,116, 99,111,108, 46,
-114, 32, 61, 32,116,101,120,116,117,114,101, 50, 68, 40, 99,117,114,118,101,109, 97,112, 44, 32,118,101, 99, 50, 40,116,101,120,
-116,117,114,101, 50, 68, 40, 99,117,114,118,101,109, 97,112, 44, 32,118,101, 99, 50, 40, 99,111,108, 46,114, 44, 32, 48, 46, 48,
- 41, 41, 46, 97, 44, 32, 48, 46, 48, 41, 41, 46,114, 59, 10, 9,111,117,116, 99,111,108, 46,103, 32, 61, 32,116,101,120,116,117,
-114,101, 50, 68, 40, 99,117,114,118,101,109, 97,112, 44, 32,118,101, 99, 50, 40,116,101,120,116,117,114,101, 50, 68, 40, 99,117,
-114,118,101,109, 97,112, 44, 32,118,101, 99, 50, 40, 99,111,108, 46,103, 44, 32, 48, 46, 48, 41, 41, 46, 97, 44, 32, 48, 46, 48,
- 41, 41, 46,103, 59, 10, 9,111,117,116, 99,111,108, 46, 98, 32, 61, 32,116,101,120,116,117,114,101, 50, 68, 40, 99,117,114,118,
-101,109, 97,112, 44, 32,118,101, 99, 50, 40,116,101,120,116,117,114,101, 50, 68, 40, 99,117,114,118,101,109, 97,112, 44, 32,118,
-101, 99, 50, 40, 99,111,108, 46, 98, 44, 32, 48, 46, 48, 41, 41, 46, 97, 44, 32, 48, 46, 48, 41, 41, 46, 98, 59, 10, 10, 9,105,
-102, 32, 40,102, 97, 99, 32, 33, 61, 32, 49, 46, 48, 41, 10, 9, 9,111,117,116, 99,111,108, 32, 61, 32, 40,111,117,116, 99,111,
-108, 42,102, 97, 99, 41, 32, 43, 32, 40, 99,111,108, 42, 40, 49, 46, 48, 45,102, 97, 99, 41, 41, 59, 10, 10, 9,111,117,116, 99,
-111,108, 46, 97, 32, 61, 32, 99,111,108, 46, 97, 59, 10,125, 10, 10,118,111,105,100, 32,115,101,116, 95,118, 97,108,117,101, 40,
-102,108,111, 97,116, 32,118, 97,108, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,111,117,116,118, 97,108, 41, 10,123, 10, 9,
-111,117,116,118, 97,108, 32, 61, 32,118, 97,108, 59, 10,125, 10, 10,118,111,105,100, 32,115,101,116, 95,114,103, 98, 40,118,101,
- 99, 51, 32, 99,111,108, 44, 32,111,117,116, 32,118,101, 99, 51, 32,111,117,116, 99,111,108, 41, 10,123, 10, 9,111,117,116, 99,
-111,108, 32, 61, 32, 99,111,108, 59, 10,125, 10, 10,118,111,105,100, 32,115,101,116, 95,114,103, 98, 97, 40,118,101, 99, 52, 32,
- 99,111,108, 44, 32,111,117,116, 32,118,101, 99, 52, 32,111,117,116, 99,111,108, 41, 10,123, 10, 9,111,117,116, 99,111,108, 32,
- 61, 32, 99,111,108, 59, 10,125, 10, 10,118,111,105,100, 32,115,101,116, 95,118, 97,108,117,101, 95,122,101,114,111, 40,111,117,
-116, 32,102,108,111, 97,116, 32,111,117,116,118, 97,108, 41, 10,123, 10, 9,111,117,116,118, 97,108, 32, 61, 32, 48, 46, 48, 59,
- 10,125, 10, 10,118,111,105,100, 32,115,101,116, 95,118, 97,108,117,101, 95,111,110,101, 40,111,117,116, 32,102,108,111, 97,116,
- 32,111,117,116,118, 97,108, 41, 10,123, 10, 9,111,117,116,118, 97,108, 32, 61, 32, 49, 46, 48, 59, 10,125, 10, 10,118,111,105,
-100, 32,115,101,116, 95,114,103, 98, 95,122,101,114,111, 40,111,117,116, 32,118,101, 99, 51, 32,111,117,116,118, 97,108, 41, 10,
-123, 10, 9,111,117,116,118, 97,108, 32, 61, 32,118,101, 99, 51, 40, 48, 46, 48, 41, 59, 10,125, 10, 10,118,111,105,100, 32,115,
-101,116, 95,114,103, 98, 97, 95,122,101,114,111, 40,111,117,116, 32,118,101, 99, 52, 32,111,117,116,118, 97,108, 41, 10,123, 10,
- 9,111,117,116,118, 97,108, 32, 61, 32,118,101, 99, 52, 40, 48, 46, 48, 41, 59, 10,125, 10, 10,118,111,105,100, 32,109,105,120,
+108,111, 97,116, 32,111,117,116,118, 97,108, 41, 10,123, 10, 9,111,117,116,118,101, 99, 32, 61, 32,118,101, 99, 51, 40, 48, 44,
+ 32, 48, 44, 32, 48, 41, 59, 10, 9,111,117,116,118, 97,108, 32, 61, 32,100,111,116, 40,118, 49, 44, 32,118, 50, 41, 59, 10,125,
+ 10, 10,118,111,105,100, 32,118,101, 99, 95,109, 97,116,104, 95, 99,114,111,115,115, 40,118,101, 99, 51, 32,118, 49, 44, 32,118,
+101, 99, 51, 32,118, 50, 44, 32,111,117,116, 32,118,101, 99, 51, 32,111,117,116,118,101, 99, 44, 32,111,117,116, 32,102,108,111,
+ 97,116, 32,111,117,116,118, 97,108, 41, 10,123, 10, 9,111,117,116,118,101, 99, 32, 61, 32, 99,114,111,115,115, 40,118, 49, 44,
+ 32,118, 50, 41, 59, 10, 9,111,117,116,118, 97,108, 32, 61, 32,108,101,110,103,116,104, 40,111,117,116,118,101, 99, 41, 59, 10,
+125, 10, 10,118,111,105,100, 32,118,101, 99, 95,109, 97,116,104, 95,110,111,114,109, 97,108,105,122,101, 40,118,101, 99, 51, 32,
+118, 44, 32,111,117,116, 32,118,101, 99, 51, 32,111,117,116,118,101, 99, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,111,117,
+116,118, 97,108, 41, 10,123, 10, 9,111,117,116,118, 97,108, 32, 61, 32,108,101,110,103,116,104, 40,118, 41, 59, 10, 9,111,117,
+116,118,101, 99, 32, 61, 32,110,111,114,109, 97,108,105,122,101, 40,118, 41, 59, 10,125, 10, 10,118,111,105,100, 32,118,101, 99,
+ 95,109, 97,116,104, 95,110,101,103, 97,116,101, 40,118,101, 99, 51, 32,118, 44, 32,111,117,116, 32,118,101, 99, 51, 32,111,117,
+116,118, 41, 10,123, 10, 9,111,117,116,118, 32, 61, 32, 45,118, 59, 10,125, 10, 10,118,111,105,100, 32,110,111,114,109, 97,108,
+ 40,118,101, 99, 51, 32,100,105,114, 44, 32,118,101, 99, 51, 32,110,111,114, 44, 32,111,117,116, 32,118,101, 99, 51, 32,111,117,
+116,110,111,114, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,111,117,116,100,111,116, 41, 10,123, 10, 9,111,117,116,110,111,
+114, 32, 61, 32,100,105,114, 59, 10, 9,111,117,116,100,111,116, 32, 61, 32, 45,100,111,116, 40,100,105,114, 44, 32,110,111,114,
+ 41, 59, 10,125, 10, 10,118,111,105,100, 32, 99,117,114,118,101,115, 95,118,101, 99, 40,102,108,111, 97,116, 32,102, 97, 99, 44,
+ 32,118,101, 99, 51, 32,118,101, 99, 44, 32,115, 97,109,112,108,101,114, 50, 68, 32, 99,117,114,118,101,109, 97,112, 44, 32,111,
+117,116, 32,118,101, 99, 51, 32,111,117,116,118,101, 99, 41, 10,123, 10, 9,111,117,116,118,101, 99, 46,120, 32, 61, 32,116,101,
+120,116,117,114,101, 50, 68, 40, 99,117,114,118,101,109, 97,112, 44, 32,118,101, 99, 50, 40, 40,118,101, 99, 46,120, 32, 43, 32,
+ 49, 46, 48, 41, 42, 48, 46, 53, 44, 32, 48, 46, 48, 41, 41, 46,120, 59, 10, 9,111,117,116,118,101, 99, 46,121, 32, 61, 32,116,
+101,120,116,117,114,101, 50, 68, 40, 99,117,114,118,101,109, 97,112, 44, 32,118,101, 99, 50, 40, 40,118,101, 99, 46,121, 32, 43,
+ 32, 49, 46, 48, 41, 42, 48, 46, 53, 44, 32, 48, 46, 48, 41, 41, 46,121, 59, 10, 9,111,117,116,118,101, 99, 46,122, 32, 61, 32,
+116,101,120,116,117,114,101, 50, 68, 40, 99,117,114,118,101,109, 97,112, 44, 32,118,101, 99, 50, 40, 40,118,101, 99, 46,122, 32,
+ 43, 32, 49, 46, 48, 41, 42, 48, 46, 53, 44, 32, 48, 46, 48, 41, 41, 46,122, 59, 10, 10, 9,105,102, 32, 40,102, 97, 99, 32, 33,
+ 61, 32, 49, 46, 48, 41, 10, 9, 9,111,117,116,118,101, 99, 32, 61, 32, 40,111,117,116,118,101, 99, 42,102, 97, 99, 41, 32, 43,
+ 32, 40,118,101, 99, 42, 40, 49, 46, 48, 45,102, 97, 99, 41, 41, 59, 10, 10,125, 10, 10,118,111,105,100, 32, 99,117,114,118,101,
+115, 95,114,103, 98, 40,102,108,111, 97,116, 32,102, 97, 99, 44, 32,118,101, 99, 52, 32, 99,111,108, 44, 32,115, 97,109,112,108,
+101,114, 50, 68, 32, 99,117,114,118,101,109, 97,112, 44, 32,111,117,116, 32,118,101, 99, 52, 32,111,117,116, 99,111,108, 41, 10,
+123, 10, 9,111,117,116, 99,111,108, 46,114, 32, 61, 32,116,101,120,116,117,114,101, 50, 68, 40, 99,117,114,118,101,109, 97,112,
+ 44, 32,118,101, 99, 50, 40,116,101,120,116,117,114,101, 50, 68, 40, 99,117,114,118,101,109, 97,112, 44, 32,118,101, 99, 50, 40,
+ 99,111,108, 46,114, 44, 32, 48, 46, 48, 41, 41, 46, 97, 44, 32, 48, 46, 48, 41, 41, 46,114, 59, 10, 9,111,117,116, 99,111,108,
+ 46,103, 32, 61, 32,116,101,120,116,117,114,101, 50, 68, 40, 99,117,114,118,101,109, 97,112, 44, 32,118,101, 99, 50, 40,116,101,
+120,116,117,114,101, 50, 68, 40, 99,117,114,118,101,109, 97,112, 44, 32,118,101, 99, 50, 40, 99,111,108, 46,103, 44, 32, 48, 46,
+ 48, 41, 41, 46, 97, 44, 32, 48, 46, 48, 41, 41, 46,103, 59, 10, 9,111,117,116, 99,111,108, 46, 98, 32, 61, 32,116,101,120,116,
+117,114,101, 50, 68, 40, 99,117,114,118,101,109, 97,112, 44, 32,118,101, 99, 50, 40,116,101,120,116,117,114,101, 50, 68, 40, 99,
+117,114,118,101,109, 97,112, 44, 32,118,101, 99, 50, 40, 99,111,108, 46, 98, 44, 32, 48, 46, 48, 41, 41, 46, 97, 44, 32, 48, 46,
+ 48, 41, 41, 46, 98, 59, 10, 10, 9,105,102, 32, 40,102, 97, 99, 32, 33, 61, 32, 49, 46, 48, 41, 10, 9, 9,111,117,116, 99,111,
+108, 32, 61, 32, 40,111,117,116, 99,111,108, 42,102, 97, 99, 41, 32, 43, 32, 40, 99,111,108, 42, 40, 49, 46, 48, 45,102, 97, 99,
+ 41, 41, 59, 10, 10, 9,111,117,116, 99,111,108, 46, 97, 32, 61, 32, 99,111,108, 46, 97, 59, 10,125, 10, 10,118,111,105,100, 32,
+115,101,116, 95,118, 97,108,117,101, 40,102,108,111, 97,116, 32,118, 97,108, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,111,
+117,116,118, 97,108, 41, 10,123, 10, 9,111,117,116,118, 97,108, 32, 61, 32,118, 97,108, 59, 10,125, 10, 10,118,111,105,100, 32,
+115,101,116, 95,114,103, 98, 40,118,101, 99, 51, 32, 99,111,108, 44, 32,111,117,116, 32,118,101, 99, 51, 32,111,117,116, 99,111,
+108, 41, 10,123, 10, 9,111,117,116, 99,111,108, 32, 61, 32, 99,111,108, 59, 10,125, 10, 10,118,111,105,100, 32,115,101,116, 95,
+114,103, 98, 97, 40,118,101, 99, 52, 32, 99,111,108, 44, 32,111,117,116, 32,118,101, 99, 52, 32,111,117,116, 99,111,108, 41, 10,
+123, 10, 9,111,117,116, 99,111,108, 32, 61, 32, 99,111,108, 59, 10,125, 10, 10,118,111,105,100, 32,115,101,116, 95,118, 97,108,
+117,101, 95,122,101,114,111, 40,111,117,116, 32,102,108,111, 97,116, 32,111,117,116,118, 97,108, 41, 10,123, 10, 9,111,117,116,
+118, 97,108, 32, 61, 32, 48, 46, 48, 59, 10,125, 10, 10,118,111,105,100, 32,115,101,116, 95,118, 97,108,117,101, 95,111,110,101,
+ 40,111,117,116, 32,102,108,111, 97,116, 32,111,117,116,118, 97,108, 41, 10,123, 10, 9,111,117,116,118, 97,108, 32, 61, 32, 49,
+ 46, 48, 59, 10,125, 10, 10,118,111,105,100, 32,115,101,116, 95,114,103, 98, 95,122,101,114,111, 40,111,117,116, 32,118,101, 99,
+ 51, 32,111,117,116,118, 97,108, 41, 10,123, 10, 9,111,117,116,118, 97,108, 32, 61, 32,118,101, 99, 51, 40, 48, 46, 48, 41, 59,
+ 10,125, 10, 10,118,111,105,100, 32,115,101,116, 95,114,103, 98, 97, 95,122,101,114,111, 40,111,117,116, 32,118,101, 99, 52, 32,
+111,117,116,118, 97,108, 41, 10,123, 10, 9,111,117,116,118, 97,108, 32, 61, 32,118,101, 99, 52, 40, 48, 46, 48, 41, 59, 10,125,
+ 10, 10,118,111,105,100, 32, 99,111,112,121, 95,114, 97,119, 40,118,101, 99, 52, 32,118, 97,108, 44, 32,111,117,116, 32,118,101,
+ 99, 52, 32,111,117,116,118, 97,108, 41, 10,123, 10, 9,111,117,116,118, 97,108, 32, 61, 32,118, 97,108, 59, 10,125, 10, 10,118,
+111,105,100, 32, 99,111,112,121, 95,114, 97,119, 40,118,101, 99, 51, 32,118, 97,108, 44, 32,111,117,116, 32,118,101, 99, 51, 32,
+111,117,116,118, 97,108, 41, 10,123, 10, 9,111,117,116,118, 97,108, 32, 61, 32,118, 97,108, 59, 10,125, 10, 10,118,111,105,100,
+ 32, 99,111,112,121, 95,114, 97,119, 40,118,101, 99, 50, 32,118, 97,108, 44, 32,111,117,116, 32,118,101, 99, 50, 32,111,117,116,
+118, 97,108, 41, 10,123, 10, 9,111,117,116,118, 97,108, 32, 61, 32,118, 97,108, 59, 10,125, 10, 10,118,111,105,100, 32, 99,111,
+112,121, 95,114, 97,119, 40,102,108,111, 97,116, 32,118, 97,108, 44, 32,111,117,116, 32,102,108,111, 97,116, 32,111,117,116,118,
+ 97,108, 41, 10,123, 10, 9,111,117,116,118, 97,108, 32, 61, 32,118, 97,108, 59, 10,125, 10, 10,118,111,105,100, 32,109,105,120,
95, 98,108,101,110,100, 40,102,108,111, 97,116, 32,102, 97, 99, 44, 32,118,101, 99, 52, 32, 99,111,108, 49, 44, 32,118,101, 99,
52, 32, 99,111,108, 50, 44, 32,111,117,116, 32,118,101, 99, 52, 32,111,117,116, 99,111,108, 41, 10,123, 10, 9,102, 97, 99, 32,
61, 32, 99,108, 97,109,112, 40,102, 97, 99, 44, 32, 48, 46, 48, 44, 32, 49, 46, 48, 41, 59, 10, 9,111,117,116, 99,111,108, 32,
diff --git a/source/blender/imbuf/IMB_imbuf_types.h b/source/blender/imbuf/IMB_imbuf_types.h
index 59899dc7490..5ce3d63fe86 100644
--- a/source/blender/imbuf/IMB_imbuf_types.h
+++ b/source/blender/imbuf/IMB_imbuf_types.h
@@ -74,7 +74,7 @@ typedef struct ImBuf {
* but this is problematic with texture math in imagetexture.c
* avoid problems and use int. - campbell */
- unsigned char depth; /* Active amount of bits/bitplanes */
+ unsigned char planes; /* Active amount of bits/bitplanes */
int channels; /* amount of channels in rect_float (0 = 4 channel default) */
/* flags */
diff --git a/source/blender/imbuf/intern/IMB_anim.h b/source/blender/imbuf/intern/IMB_anim.h
index 5a410a6a583..b627baf99bd 100644
--- a/source/blender/imbuf/intern/IMB_anim.h
+++ b/source/blender/imbuf/intern/IMB_anim.h
@@ -173,6 +173,7 @@ struct anim {
AVCodecContext *pCodecCtx;
AVCodec *pCodec;
AVFrame *pFrame;
+ int pFrameComplete;
AVFrame *pFrameRGB;
AVFrame *pFrameDeinterlaced;
struct SwsContext *img_convert_ctx;
@@ -181,7 +182,6 @@ struct anim {
struct ImBuf * last_frame;
int64_t last_pts;
int64_t next_pts;
- int64_t next_undecoded_pts;
AVPacket next_packet;
#endif
diff --git a/source/blender/imbuf/intern/IMB_filter.h b/source/blender/imbuf/intern/IMB_filter.h
index a9e9e0ae776..29e6c4950df 100644
--- a/source/blender/imbuf/intern/IMB_filter.h
+++ b/source/blender/imbuf/intern/IMB_filter.h
@@ -40,8 +40,8 @@ struct ImBuf;
void imb_filterx(struct ImBuf *ibuf);
-void IMB_premultiply_rect(unsigned int *rect, int depth, int w, int h);
-void IMB_premultiply_rect_float(float *rect_float, int depth, int w, int h);
+void IMB_premultiply_rect(unsigned int *rect, char planes, int w, int h);
+void IMB_premultiply_rect_float(float *rect_float, char planes, int w, int h);
void imb_onehalf_no_alloc(struct ImBuf *ibuf2, struct ImBuf *ibuf1);
diff --git a/source/blender/imbuf/intern/allocimbuf.c b/source/blender/imbuf/intern/allocimbuf.c
index 5bbabd84648..d08c86aacbc 100644
--- a/source/blender/imbuf/intern/allocimbuf.c
+++ b/source/blender/imbuf/intern/allocimbuf.c
@@ -323,7 +323,7 @@ short imb_addrectImBuf(ImBuf *ibuf)
if((ibuf->rect = MEM_mapallocN(size, "imb_addrectImBuf"))) {
ibuf->mall |= IB_rect;
ibuf->flags |= IB_rect;
- if(ibuf->depth > 32) return (addzbufImBuf(ibuf));
+ if(ibuf->planes > 32) return (addzbufImBuf(ibuf));
else return TRUE;
}
@@ -341,7 +341,7 @@ short imb_addtilesImBuf(ImBuf *ibuf)
return (ibuf->tiles != NULL);
}
-ImBuf *IMB_allocImBuf(unsigned int x, unsigned int y, uchar d, unsigned int flags)
+ImBuf *IMB_allocImBuf(unsigned int x, unsigned int y, uchar planes, unsigned int flags)
{
ImBuf *ibuf;
@@ -350,7 +350,7 @@ ImBuf *IMB_allocImBuf(unsigned int x, unsigned int y, uchar d, unsigned int flag
if(ibuf) {
ibuf->x= x;
ibuf->y= y;
- ibuf->depth= d;
+ ibuf->planes= planes;
ibuf->ftype= TGA;
ibuf->channels= 4; /* float option, is set to other values when buffers get assigned */
ibuf->ppm[0]= ibuf->ppm[1]= 150.0 / 0.0254; /* 150dpi -> pixels-per-meter */
@@ -402,7 +402,7 @@ ImBuf *IMB_dupImBuf(ImBuf *ibuf1)
y = ibuf1->y;
if(ibuf1->flags & IB_fields) y *= 2;
- ibuf2 = IMB_allocImBuf(x, y, ibuf1->depth, flags);
+ ibuf2 = IMB_allocImBuf(x, y, ibuf1->planes, flags);
if(ibuf2 == NULL) return NULL;
if(flags & IB_rect)
diff --git a/source/blender/imbuf/intern/anim_movie.c b/source/blender/imbuf/intern/anim_movie.c
index db27c1cee63..8928774dcb4 100644
--- a/source/blender/imbuf/intern/anim_movie.c
+++ b/source/blender/imbuf/intern/anim_movie.c
@@ -504,7 +504,6 @@ static int startffmpeg(struct anim * anim) {
anim->last_frame = 0;
anim->last_pts = -1;
anim->next_pts = -1;
- anim->next_undecoded_pts = -1;
anim->next_packet.stream_index = -1;
anim->pFormatCtx = pFormatCtx;
@@ -513,6 +512,7 @@ static int startffmpeg(struct anim * anim) {
anim->videoStream = videoStream;
anim->pFrame = avcodec_alloc_frame();
+ anim->pFrameComplete = FALSE;
anim->pFrameDeinterlaced = avcodec_alloc_frame();
anim->pFrameRGB = avcodec_alloc_frame();
@@ -602,6 +602,10 @@ static void ffmpeg_postprocess(struct anim * anim)
ibuf->profile = IB_PROFILE_SRGB;
+ if (!anim->pFrameComplete) {
+ return;
+ }
+
/* This means the data wasnt read properly,
this check stops crashing */
if (input->data[0]==0 && input->data[1]==0
@@ -611,6 +615,12 @@ static void ffmpeg_postprocess(struct anim * anim)
return;
}
+ av_log(anim->pFormatCtx, AV_LOG_DEBUG,
+ " POSTPROC: anim->pFrame planes: %p %p %p %p\n",
+ input->data[0], input->data[1], input->data[2],
+ input->data[3]);
+
+
if (anim->ib_flags & IB_animdeinterlace) {
if (avpicture_deinterlace(
(AVPicture*)
@@ -648,10 +658,6 @@ static void ffmpeg_postprocess(struct anim * anim)
dst2,
dstStride2);
- /* workaround: sws_scale bug
- sets alpha = 0 and compensate
- for altivec-bugs and flipy... */
-
bottom = (unsigned char*) ibuf->rect;
top = bottom + ibuf->x * (ibuf->y-1) * 4;
@@ -662,17 +668,17 @@ static void ffmpeg_postprocess(struct anim * anim)
unsigned char tmp[4];
unsigned int * tmp_l =
(unsigned int*) tmp;
- tmp[3] = 0xff;
for (x = 0; x < w; x++) {
tmp[0] = bottom[0];
tmp[1] = bottom[1];
tmp[2] = bottom[2];
+ tmp[3] = bottom[3];
bottom[0] = top[0];
bottom[1] = top[1];
bottom[2] = top[2];
- bottom[3] = 0xff;
+ bottom[3] = top[3];
*(unsigned int*) top = *tmp_l;
@@ -688,7 +694,6 @@ static void ffmpeg_postprocess(struct anim * anim)
uint8_t* dst2[4] = { dst[0] + (anim->y - 1)*dstStride[0],
0, 0, 0 };
int i;
- unsigned char* r;
sws_scale(anim->img_convert_ctx,
(const uint8_t * const *)input->data,
@@ -697,17 +702,6 @@ static void ffmpeg_postprocess(struct anim * anim)
anim->pCodecCtx->height,
dst2,
dstStride2);
-
- r = (unsigned char*) ibuf->rect;
-
- /* workaround sws_scale bug: older version of
- sws_scale set alpha = 0... */
- if (r[3] == 0) {
- for (i = 0; i < ibuf->x * ibuf->y; i++) {
- r[3] = 0xff;
- r += 4;
- }
- }
}
if (filter_y) {
@@ -715,42 +709,15 @@ static void ffmpeg_postprocess(struct anim * anim)
}
}
-/* decode one video frame and load the next packet into anim->packet,
- so that we can obtain next_pts and next undecoded pts */
+/* decode one video frame also considering the packet read into next_packet */
static int ffmpeg_decode_video_frame(struct anim * anim)
{
- int frameFinished = 0;
int rval = 0;
av_log(anim->pFormatCtx, AV_LOG_DEBUG, " DECODE VIDEO FRAME\n");
- anim->next_undecoded_pts = -1;
-
if (anim->next_packet.stream_index == anim->videoStream) {
- av_log(anim->pFormatCtx, AV_LOG_DEBUG,
- " DECODE: cached next packet\n");
-
- avcodec_decode_video2(anim->pCodecCtx,
- anim->pFrame, &frameFinished,
- &anim->next_packet);
-
- if (frameFinished) {
- av_log(anim->pFormatCtx,
- AV_LOG_DEBUG,
- " FRAME DONE: "
- "next_pts=%lld pkt_pts=%lld\n",
- (anim->pFrame->pts == AV_NOPTS_VALUE) ?
- -1 : (long long int)anim->pFrame->pts,
- (anim->pFrame->pkt_pts == AV_NOPTS_VALUE) ?
- -1 : (long long int)anim->pFrame->pkt_pts);
- anim->next_pts =
- av_get_pts_from_frame(anim->pFormatCtx,
- anim->pFrame);
-
- ffmpeg_postprocess(anim);
- }
-
av_free_packet(&anim->next_packet);
anim->next_packet.stream_index = -1;
}
@@ -771,21 +738,14 @@ static int ffmpeg_decode_video_frame(struct anim * anim)
(anim->next_packet.flags & AV_PKT_FLAG_KEY) ?
" KEY" : "");
if (anim->next_packet.stream_index == anim->videoStream) {
- if (frameFinished) {
- av_log(anim->pFormatCtx,
- AV_LOG_DEBUG,
- " FRAME finished, we leave\n");
- anim->next_undecoded_pts
- = anim->next_packet.dts;
- break;
- }
+ anim->pFrameComplete = 0;
avcodec_decode_video2(
anim->pCodecCtx,
- anim->pFrame, &frameFinished,
+ anim->pFrame, &anim->pFrameComplete,
&anim->next_packet);
- if (frameFinished) {
+ if (anim->pFrameComplete) {
anim->next_pts = av_get_pts_from_frame(
anim->pFormatCtx, anim->pFrame);
@@ -799,15 +759,16 @@ static int ffmpeg_decode_video_frame(struct anim * anim)
== AV_NOPTS_VALUE) ?
-1 : (long long int)anim->pFrame->pkt_pts,
(long long int)anim->next_pts);
-
- ffmpeg_postprocess(anim);
}
+ break;
}
av_free_packet(&anim->next_packet);
anim->next_packet.stream_index = -1;
}
if (rval < 0) {
+ anim->next_packet.stream_index = -1;
+
av_log(anim->pFormatCtx,
AV_LOG_ERROR, " DECODE READ FAILED: av_read_frame() "
"returned error: %d\n", rval);
@@ -875,7 +836,7 @@ static int match_format(const char *name, AVFormatContext * pFormatCtx)
static int ffmpeg_seek_by_byte(AVFormatContext *pFormatCtx)
{
- static const char * byte_seek_list [] = { "dv", "mpegts", 0 };
+ static const char * byte_seek_list [] = { "mpegts", 0 };
const char ** p;
if (pFormatCtx->iformat->flags & AVFMT_TS_DISCONT) {
@@ -928,7 +889,8 @@ static ImBuf * ffmpeg_fetchibuf(struct anim * anim, int position,
tc_index, new_frame_index);
} else {
pts_to_search = (long long)
- floor(((double) position) / pts_time_base / frame_rate + 0.5);
+ floor(((double) position)
+ / pts_time_base / frame_rate + 0.5);
if (st_time != AV_NOPTS_VALUE) {
pts_to_search += st_time / pts_time_base
@@ -939,36 +901,23 @@ static ImBuf * ffmpeg_fetchibuf(struct anim * anim, int position,
av_log(anim->pFormatCtx, AV_LOG_DEBUG,
"FETCH: looking for PTS=%lld "
"(pts_timebase=%g, frame_rate=%g, st_time=%lld)\n",
- (long long int)pts_to_search, pts_time_base, frame_rate, st_time);
+ (long long int)pts_to_search,pts_time_base, frame_rate, st_time);
if (anim->last_frame &&
anim->last_pts <= pts_to_search && anim->next_pts > pts_to_search){
av_log(anim->pFormatCtx, AV_LOG_DEBUG,
"FETCH: frame repeat: last: %lld next: %lld\n",
- (long long int)anim->last_pts, (long long int)anim->next_pts);
+ (long long int)anim->last_pts,
+ (long long int)anim->next_pts);
IMB_refImBuf(anim->last_frame);
anim->curposition = position;
return anim->last_frame;
}
- IMB_freeImBuf(anim->last_frame);
- anim->last_frame = IMB_allocImBuf(anim->x, anim->y, 32, IB_rect);
-
- if (anim->next_pts <= pts_to_search &&
- anim->next_undecoded_pts > pts_to_search) {
- av_log(anim->pFormatCtx, AV_LOG_DEBUG,
- "FETCH: no seek necessary: "
- "next: %lld next undecoded: %lld\n",
- (long long int)anim->next_pts,
- (long long int)anim->next_undecoded_pts);
-
- /* we are already done :) */
-
- } else if (position > anim->curposition + 1
- && anim->preseek
- && !tc_index
- && position - (anim->curposition + 1) < anim->preseek) {
-
+ if (position > anim->curposition + 1
+ && anim->preseek
+ && !tc_index
+ && position - (anim->curposition + 1) < anim->preseek) {
av_log(anim->pFormatCtx, AV_LOG_DEBUG,
"FETCH: within preseek interval (no index)\n");
@@ -1017,6 +966,11 @@ static ImBuf * ffmpeg_fetchibuf(struct anim * anim, int position,
} else {
pos = (long long) (position - anim->preseek)
* AV_TIME_BASE / frame_rate;
+
+ av_log(anim->pFormatCtx, AV_LOG_DEBUG,
+ "NO INDEX seek pos = %lld, st_time = %lld\n",
+ pos, (st_time != AV_NOPTS_VALUE) ? st_time : 0);
+
if (pos < 0) {
pos = 0;
}
@@ -1025,6 +979,9 @@ static ImBuf * ffmpeg_fetchibuf(struct anim * anim, int position,
pos += st_time;
}
+ av_log(anim->pFormatCtx, AV_LOG_DEBUG,
+ "NO INDEX final seek pos = %lld\n", pos);
+
ret = av_seek_frame(anim->pFormatCtx, -1,
pos, AVSEEK_FLAG_BACKWARD);
}
@@ -1054,8 +1011,16 @@ static ImBuf * ffmpeg_fetchibuf(struct anim * anim, int position,
} else if (position == 0 && anim->curposition == -1) {
/* first frame without seeking special case... */
ffmpeg_decode_video_frame(anim);
+ } else {
+ av_log(anim->pFormatCtx, AV_LOG_DEBUG,
+ "FETCH: no seek necessary, just continue...\n");
}
+ IMB_freeImBuf(anim->last_frame);
+ anim->last_frame = IMB_allocImBuf(anim->x, anim->y, 32, IB_rect);
+
+ ffmpeg_postprocess(anim);
+
anim->last_pts = anim->next_pts;
ffmpeg_decode_video_frame(anim);
@@ -1063,7 +1028,7 @@ static ImBuf * ffmpeg_fetchibuf(struct anim * anim, int position,
anim->curposition = position;
IMB_refImBuf(anim->last_frame);
-
+
return anim->last_frame;
}
diff --git a/source/blender/imbuf/intern/filter.c b/source/blender/imbuf/intern/filter.c
index 479c7ed5626..29da7973654 100644
--- a/source/blender/imbuf/intern/filter.c
+++ b/source/blender/imbuf/intern/filter.c
@@ -148,7 +148,7 @@ void IMB_filtery(struct ImBuf *ibuf)
for (;x>0;x--){
if (point) {
- if (ibuf->depth > 24) filtcolum(point,y,skip);
+ if (ibuf->planes > 24) filtcolum(point,y,skip);
point++;
filtcolum(point,y,skip);
point++;
@@ -158,7 +158,7 @@ void IMB_filtery(struct ImBuf *ibuf)
point++;
}
if (pointf) {
- if (ibuf->depth > 24) filtcolumf(pointf,y,skip);
+ if (ibuf->planes > 24) filtcolumf(pointf,y,skip);
pointf++;
filtcolumf(pointf,y,skip);
pointf++;
@@ -186,7 +186,7 @@ void imb_filterx(struct ImBuf *ibuf)
for (;y>0;y--){
if (point) {
- if (ibuf->depth > 24) filtrow(point,x);
+ if (ibuf->planes > 24) filtrow(point,x);
point++;
filtrow(point,x);
point++;
@@ -196,7 +196,7 @@ void imb_filterx(struct ImBuf *ibuf)
point+=skip;
}
if (pointf) {
- if (ibuf->depth > 24) filtrowf(pointf,x);
+ if (ibuf->planes > 24) filtrowf(pointf,x);
pointf++;
filtrowf(pointf,x);
pointf++;
@@ -529,12 +529,12 @@ ImBuf *IMB_getmipmap(ImBuf *ibuf, int level)
return (level == 0)? ibuf: ibuf->mipmap[level-1];
}
-void IMB_premultiply_rect(unsigned int *rect, int depth, int w, int h)
+void IMB_premultiply_rect(unsigned int *rect, char planes, int w, int h)
{
char *cp;
int x, y, val;
- if(depth == 24) { /* put alpha at 255 */
+ if(planes == 24) { /* put alpha at 255 */
cp= (char *)(rect);
for(y=0; y<h; y++)
@@ -555,12 +555,12 @@ void IMB_premultiply_rect(unsigned int *rect, int depth, int w, int h)
}
}
-void IMB_premultiply_rect_float(float *rect_float, int depth, int w, int h)
+void IMB_premultiply_rect_float(float *rect_float, char planes, int w, int h)
{
float val, *cp;
int x, y;
- if(depth==24) { /* put alpha at 1.0 */
+ if(planes==24) { /* put alpha at 1.0 */
cp= rect_float;
for(y=0; y<h; y++)
@@ -587,9 +587,9 @@ void IMB_premultiply_alpha(ImBuf *ibuf)
return;
if(ibuf->rect)
- IMB_premultiply_rect(ibuf->rect, ibuf->depth, ibuf->x, ibuf->y);
+ IMB_premultiply_rect(ibuf->rect, ibuf->planes, ibuf->x, ibuf->y);
if(ibuf->rect_float)
- IMB_premultiply_rect_float(ibuf->rect_float, ibuf->depth, ibuf->x, ibuf->y);
+ IMB_premultiply_rect_float(ibuf->rect_float, ibuf->planes, ibuf->x, ibuf->y);
}
diff --git a/source/blender/imbuf/intern/imbuf_cocoa.m b/source/blender/imbuf/intern/imbuf_cocoa.m
index 7005558d753..b79b1358ec2 100644
--- a/source/blender/imbuf/intern/imbuf_cocoa.m
+++ b/source/blender/imbuf/intern/imbuf_cocoa.m
@@ -228,7 +228,7 @@ short imb_cocoaSaveImage(struct ImBuf *ibuf, char *name, int flags)
/* check for a valid number of bytes per pixel. Like the PNG writer,
* the TIFF writer supports 1, 3 or 4 bytes per pixel, corresponding
* to gray, RGB, RGBA respectively. */
- samplesperpixel = (uint16_t)((ibuf->depth + 7) >> 3);
+ samplesperpixel = (uint16_t)((ibuf->planes + 7) >> 3);
switch (samplesperpixel) {
case 4: /*RGBA type*/
hasAlpha = YES;
diff --git a/source/blender/imbuf/intern/iris.c b/source/blender/imbuf/intern/iris.c
index cf7337a574b..83351b5e0e4 100644
--- a/source/blender/imbuf/intern/iris.c
+++ b/source/blender/imbuf/intern/iris.c
@@ -320,7 +320,7 @@ struct ImBuf *imb_loadiris(unsigned char *mem, size_t size, int flags)
if (bpp == 1) {
ibuf = IMB_allocImBuf(xsize, ysize, 8 * zsize, IB_rect);
- if (ibuf->depth > 32) ibuf->depth = 32;
+ if (ibuf->planes > 32) ibuf->planes = 32;
base = ibuf->rect;
zbase = (unsigned int *)ibuf->zbuf;
@@ -404,7 +404,7 @@ struct ImBuf *imb_loadiris(unsigned char *mem, size_t size, int flags)
if (bpp == 1) {
ibuf = IMB_allocImBuf(xsize, ysize, 8 * zsize, IB_rect);
- if (ibuf->depth > 32) ibuf->depth = 32;
+ if (ibuf->planes > 32) ibuf->planes = 32;
base = ibuf->rect;
zbase = (unsigned int *)ibuf->zbuf;
@@ -822,7 +822,7 @@ int imb_saveiris(struct ImBuf * ibuf, const char *name, int flags)
short zsize;
int ret;
- zsize = (ibuf->depth + 7) >> 3;
+ zsize = (ibuf->planes + 7) >> 3;
if (flags & IB_zbuf && ibuf->zbuf != NULL) zsize = 8;
IMB_convert_rgba_to_abgr(ibuf);
diff --git a/source/blender/imbuf/intern/jp2.c b/source/blender/imbuf/intern/jp2.c
index 151933d6651..568dd7a9fb7 100644
--- a/source/blender/imbuf/intern/jp2.c
+++ b/source/blender/imbuf/intern/jp2.c
@@ -101,7 +101,7 @@ struct ImBuf *imb_jp2_decode(unsigned char *mem, size_t size, int flags)
int index;
- int w, h, depth;
+ int w, h, planes;
opj_dparameters_t parameters; /* decompression parameters */
@@ -166,10 +166,10 @@ struct ImBuf *imb_jp2_decode(unsigned char *mem, size_t size, int flags)
switch (image->numcomps) {
case 1: /* Greyscale */
case 3: /* Color */
- depth= 24;
+ planes= 24;
break;
default: /* 2 or 4 - Greyscale or Color + alpha */
- depth= 32; /* greyscale + alpha */
+ planes= 32; /* greyscale + alpha */
break;
}
@@ -190,7 +190,7 @@ struct ImBuf *imb_jp2_decode(unsigned char *mem, size_t size, int flags)
float_divs[i]= (1<<image->comps[i].prec)-1;
}
- ibuf= IMB_allocImBuf(w, h, depth, use_float ? IB_rectfloat : IB_rect);
+ ibuf= IMB_allocImBuf(w, h, planes, use_float ? IB_rectfloat : IB_rect);
if (ibuf==NULL) {
if(dinfo)
@@ -494,7 +494,7 @@ static opj_image_t* ibuftoimage(ImBuf *ibuf, opj_cparameters_t *parameters) {
/* 32bit images == alpha channel */
/* grayscale not supported yet */
- numcomps= (ibuf->depth==32) ? 4 : 3;
+ numcomps= (ibuf->planes==32) ? 4 : 3;
}
w= ibuf->x;
diff --git a/source/blender/imbuf/intern/jpeg.c b/source/blender/imbuf/intern/jpeg.c
index 89038d7d1d2..5a40de0a65e 100644
--- a/source/blender/imbuf/intern/jpeg.c
+++ b/source/blender/imbuf/intern/jpeg.c
@@ -571,8 +571,8 @@ static int init_jpeg(FILE * outfile, struct jpeg_compress_struct * cinfo, struct
cinfo->image_height = ibuf->y;
cinfo->in_color_space = JCS_RGB;
- if (ibuf->depth == 8) cinfo->in_color_space = JCS_GRAYSCALE;
- if (ibuf->depth == 32) cinfo->in_color_space = JCS_UNKNOWN;
+ if (ibuf->planes == 8) cinfo->in_color_space = JCS_GRAYSCALE;
+ if (ibuf->planes == 32) cinfo->in_color_space = JCS_UNKNOWN;
switch(cinfo->in_color_space){
case JCS_RGB:
diff --git a/source/blender/imbuf/intern/openexr/openexr_api.cpp b/source/blender/imbuf/intern/openexr/openexr_api.cpp
index 1084355dd74..a5a9427ea89 100644
--- a/source/blender/imbuf/intern/openexr/openexr_api.cpp
+++ b/source/blender/imbuf/intern/openexr/openexr_api.cpp
@@ -208,7 +208,7 @@ static int imb_save_openexr_half(struct ImBuf *ibuf, const char *name, int flags
header.channels().insert ("R", Channel (HALF));
header.channels().insert ("G", Channel (HALF));
header.channels().insert ("B", Channel (HALF));
- if (ibuf->depth==32 && channels >= 4)
+ if (ibuf->planes==32 && channels >= 4)
header.channels().insert ("A", Channel (HALF));
if (write_zbuf) // z we do as float always
header.channels().insert ("Z", Channel (FLOAT));
@@ -226,7 +226,7 @@ static int imb_save_openexr_half(struct ImBuf *ibuf, const char *name, int flags
frameBuffer.insert ("R", Slice (HALF, (char *) &pixels[0].r, xstride, ystride));
frameBuffer.insert ("G", Slice (HALF, (char *) &pixels[0].g, xstride, ystride));
frameBuffer.insert ("B", Slice (HALF, (char *) &pixels[0].b, xstride, ystride));
- if (ibuf->depth==32 && channels >= 4)
+ if (ibuf->planes==32 && channels >= 4)
frameBuffer.insert ("A", Slice (HALF, (char *) &pixels[0].a, xstride, ystride));
if (write_zbuf)
frameBuffer.insert ("Z", Slice (FLOAT, (char *)(ibuf->zbuf_float + (height-1)*width),
@@ -335,7 +335,7 @@ static int imb_save_openexr_float(struct ImBuf *ibuf, const char *name, int flag
header.channels().insert ("R", Channel (FLOAT));
header.channels().insert ("G", Channel (FLOAT));
header.channels().insert ("B", Channel (FLOAT));
- if (ibuf->depth==32 && channels >= 4)
+ if (ibuf->planes==32 && channels >= 4)
header.channels().insert ("A", Channel (FLOAT));
if (write_zbuf)
header.channels().insert ("Z", Channel (FLOAT));
@@ -355,7 +355,7 @@ static int imb_save_openexr_float(struct ImBuf *ibuf, const char *name, int flag
frameBuffer.insert ("R", Slice (FLOAT, (char *)rect[0], xstride, ystride));
frameBuffer.insert ("G", Slice (FLOAT, (char *)rect[1], xstride, ystride));
frameBuffer.insert ("B", Slice (FLOAT, (char *)rect[2], xstride, ystride));
- if (ibuf->depth==32 && channels >= 4)
+ if (ibuf->planes==32 && channels >= 4)
frameBuffer.insert ("A", Slice (FLOAT, (char *)rect[3], xstride, ystride));
if (write_zbuf)
frameBuffer.insert ("Z", Slice (FLOAT, (char *) (ibuf->zbuf_float + (height-1)*width),
diff --git a/source/blender/imbuf/intern/png.c b/source/blender/imbuf/intern/png.c
index be245baef21..74047ae74f5 100644
--- a/source/blender/imbuf/intern/png.c
+++ b/source/blender/imbuf/intern/png.c
@@ -117,7 +117,7 @@ int imb_savepng(struct ImBuf *ibuf, const char *name, int flags)
if(flags & IB_mem)
name= "<memory>";
- bytesperpixel = (ibuf->depth + 7) >> 3;
+ bytesperpixel = (ibuf->planes + 7) >> 3;
if ((bytesperpixel > 4) || (bytesperpixel == 2)) {
printf("imb_savepng: Cunsupported bytes per pixel: %d for file: '%s'\n", bytesperpixel, name);
return (0);
diff --git a/source/blender/imbuf/intern/scaling.c b/source/blender/imbuf/intern/scaling.c
index 6519e389a21..4ee4aa218da 100644
--- a/source/blender/imbuf/intern/scaling.c
+++ b/source/blender/imbuf/intern/scaling.c
@@ -67,7 +67,7 @@ struct ImBuf *IMB_half_x(struct ImBuf *ibuf1)
if (ibuf1->x <= 1) return(IMB_dupImBuf(ibuf1));
- ibuf2 = IMB_allocImBuf((ibuf1->x)/2, ibuf1->y, ibuf1->depth, ibuf1->flags);
+ ibuf2 = IMB_allocImBuf((ibuf1->x)/2, ibuf1->y, ibuf1->planes, ibuf1->flags);
if (ibuf2==NULL) return (NULL);
_p1 = (uchar *) ibuf1->rect;
@@ -128,7 +128,7 @@ struct ImBuf *IMB_double_fast_x(struct ImBuf *ibuf1)
do_rect= (ibuf1->rect != NULL);
do_float= (ibuf1->rect_float != NULL);
- ibuf2 = IMB_allocImBuf(2 * ibuf1->x , ibuf1->y , ibuf1->depth, ibuf1->flags);
+ ibuf2 = IMB_allocImBuf(2 * ibuf1->x , ibuf1->y , ibuf1->planes, ibuf1->flags);
if (ibuf2==NULL) return (NULL);
p1 = (int *) ibuf1->rect;
@@ -187,7 +187,7 @@ struct ImBuf *IMB_half_y(struct ImBuf *ibuf1)
do_rect= (ibuf1->rect != NULL);
do_float= (ibuf1->rect_float != NULL);
- ibuf2 = IMB_allocImBuf(ibuf1->x , (ibuf1->y) / 2 , ibuf1->depth, ibuf1->flags);
+ ibuf2 = IMB_allocImBuf(ibuf1->x , (ibuf1->y) / 2 , ibuf1->planes, ibuf1->flags);
if (ibuf2==NULL) return (NULL);
_p1 = (uchar *) ibuf1->rect;
@@ -255,7 +255,7 @@ struct ImBuf *IMB_double_fast_y(struct ImBuf *ibuf1)
do_rect= (ibuf1->rect != NULL);
do_float= (ibuf1->rect_float != NULL);
- ibuf2 = IMB_allocImBuf(ibuf1->x , 2 * ibuf1->y , ibuf1->depth, ibuf1->flags);
+ ibuf2 = IMB_allocImBuf(ibuf1->x , 2 * ibuf1->y , ibuf1->planes, ibuf1->flags);
if (ibuf2==NULL) return (NULL);
p1 = (int *) ibuf1->rect;
@@ -353,7 +353,7 @@ struct ImBuf *IMB_onehalf(struct ImBuf *ibuf1)
if (ibuf1->x <= 1) return(IMB_half_y(ibuf1));
if (ibuf1->y <= 1) return(IMB_half_x(ibuf1));
- ibuf2=IMB_allocImBuf((ibuf1->x)/2, (ibuf1->y)/2, ibuf1->depth, ibuf1->flags);
+ ibuf2=IMB_allocImBuf((ibuf1->x)/2, (ibuf1->y)/2, ibuf1->planes, ibuf1->flags);
if (ibuf2==NULL) return (NULL);
imb_onehalf_no_alloc(ibuf2, ibuf1);
diff --git a/source/blender/imbuf/intern/targa.c b/source/blender/imbuf/intern/targa.c
index 2efed56ac2c..895f922a0da 100644
--- a/source/blender/imbuf/intern/targa.c
+++ b/source/blender/imbuf/intern/targa.c
@@ -200,20 +200,20 @@ static int dumptarga(struct ImBuf * ibuf, FILE * file)
size = ibuf->x * ibuf->y;
rect = (uchar *) ibuf->rect;
- if (ibuf->depth <= 8) {
+ if (ibuf->planes <= 8) {
while(size > 0){
if (putc(*rect, file) == EOF) return (0);
size--;
rect += 4;
}
- } else if (ibuf->depth <= 16) {
+ } else if (ibuf->planes <= 16) {
while(size > 0){
putc(rect[0], file);
if (putc(rect[1], file) == EOF) return (0);
size--;
rect += 4;
}
- } else if (ibuf->depth <= 24) {
+ } else if (ibuf->planes <= 24) {
while(size > 0){
putc(rect[2], file);
putc(rect[1], file);
@@ -221,7 +221,7 @@ static int dumptarga(struct ImBuf * ibuf, FILE * file)
size--;
rect += 4;
}
- } else if (ibuf->depth <= 32) {
+ } else if (ibuf->planes <= 32) {
while(size > 0){
putc(rect[2], file);
putc(rect[1], file);
@@ -244,8 +244,8 @@ int imb_savetarga(struct ImBuf * ibuf, const char *name, int flags)
(void)flags; /* unused */
- buf[16] = (ibuf->depth + 0x7 ) & ~0x7;
- if (ibuf->depth > 8 ){
+ buf[16] = (ibuf->planes + 0x7 ) & ~0x7;
+ if (ibuf->planes > 8 ){
buf[2] = 10;
} else{
buf[2] = 11;
@@ -265,7 +265,7 @@ int imb_savetarga(struct ImBuf * ibuf, const char *name, int flags)
/* Don't forget to indicate that your 32 bit
* targa uses 8 bits for the alpha channel! */
- if (ibuf->depth==32) {
+ if (ibuf->planes==32) {
buf[17] |= 0x08;
}
fildes = fopen(name,"wb");
@@ -279,7 +279,7 @@ int imb_savetarga(struct ImBuf * ibuf, const char *name, int flags)
if (ibuf->ftype == RAWTGA) {
ok = dumptarga(ibuf, fildes);
} else {
- switch((ibuf->depth + 7) >> 3){
+ switch((ibuf->planes + 7) >> 3){
case 1:
ok = makebody_tga(ibuf, fildes, tga_out1);
break;
@@ -582,7 +582,7 @@ struct ImBuf *imb_loadtarga(unsigned char *mem, size_t mem_size, int flags)
size = 0;
for (col = maxcol - 1; col > 0; col >>= 1) size++;
- ibuf->depth = size;
+ ibuf->planes = size;
if (tga.mapbits != 32) { /* set alpha bits */
cmap[0] &= BIG_LONG(0x00ffffffl);
@@ -643,7 +643,7 @@ struct ImBuf *imb_loadtarga(unsigned char *mem, size_t mem_size, int flags)
cp[3] += cp[3] >> 5;
cp[0] = 0xff;
}
- ibuf->depth = 24;
+ ibuf->planes = 24;
}
if (tga.imgtyp == 3 || tga.imgtyp == 11){
diff --git a/source/blender/imbuf/intern/thumbs.c b/source/blender/imbuf/intern/thumbs.c
index ffe255ab9eb..41278e8381a 100644
--- a/source/blender/imbuf/intern/thumbs.c
+++ b/source/blender/imbuf/intern/thumbs.c
@@ -363,7 +363,7 @@ ImBuf* IMB_thumb_create(const char* path, ThumbSize size, ThumbSource source, Im
IMB_metadata_change_field(img, "Thumb::Image::Height", cheight);
}
img->ftype = PNG;
- img->depth = 32;
+ img->planes = 32;
if (IMB_saveiff(img, temp, IB_rect | IB_metadata)) {
#ifndef WIN32
chmod(temp, S_IRUSR | S_IWUSR);
diff --git a/source/blender/imbuf/intern/tiff.c b/source/blender/imbuf/intern/tiff.c
index d9580961cf5..2051b8d2195 100644
--- a/source/blender/imbuf/intern/tiff.c
+++ b/source/blender/imbuf/intern/tiff.c
@@ -404,7 +404,7 @@ static int imb_read_tiff_pixels(ImBuf *ibuf, TIFF *image, int premul)
ib_flag = IB_rect;
}
- tmpibuf= IMB_allocImBuf(ibuf->x, ibuf->y, ibuf->depth, ib_flag);
+ tmpibuf= IMB_allocImBuf(ibuf->x, ibuf->y, ibuf->planes, ib_flag);
/* simple RGBA image */
if (!(bitspersample == 32 || bitspersample == 16)) {
@@ -685,7 +685,7 @@ int imb_savetiff(ImBuf *ibuf, const char *name, int flags)
/* check for a valid number of bytes per pixel. Like the PNG writer,
* the TIFF writer supports 1, 3 or 4 bytes per pixel, corresponding
* to gray, RGB, RGBA respectively. */
- samplesperpixel = (uint16)((ibuf->depth + 7) >> 3);
+ samplesperpixel = (uint16)((ibuf->planes + 7) >> 3);
if((samplesperpixel > 4) || (samplesperpixel == 2)) {
fprintf(stderr,
"imb_savetiff: unsupported number of bytes per "
diff --git a/source/blender/makesdna/DNA_node_types.h b/source/blender/makesdna/DNA_node_types.h
index 1897f8a0353..8f22b1b31cb 100644
--- a/source/blender/makesdna/DNA_node_types.h
+++ b/source/blender/makesdna/DNA_node_types.h
@@ -36,6 +36,7 @@
#include "DNA_vec_types.h"
#include "DNA_listBase.h"
#include "DNA_texture_types.h"
+#include "DNA_scene_types.h"
struct ID;
struct ListBase;
@@ -345,7 +346,7 @@ typedef struct NodeHueSat {
typedef struct NodeImageFile {
char name[256];
- short imtype, subimtype, quality, codec;
+ struct ImageFormatData im_format;
int sfra, efra;
} NodeImageFile;
diff --git a/source/blender/makesdna/DNA_scene_types.h b/source/blender/makesdna/DNA_scene_types.h
index 27e21290a9b..720f2cc5b08 100644
--- a/source/blender/makesdna/DNA_scene_types.h
+++ b/source/blender/makesdna/DNA_scene_types.h
@@ -209,13 +209,114 @@ typedef struct SceneRenderLayer {
/* note, srl->passflag is treestore element 'nr' in outliner, short still... */
+/* Generic image format settings,
+ * this is used for NodeImageFile and IMAGE_OT_save_as operator too.
+ *
+ * note: its a bit strange that even though this is an image format struct
+ * the imtype can still be used to select video formats.
+ * RNA ensures these enum's are only selectable for render output.
+ */
+typedef struct ImageFormatData {
+ char imtype; /* R_IMF_IMTYPE_PNG, R_... */
+ /* note, video types should only ever be set from this
+ * structure when used from RenderData */
+ char depth; /* bits per channel, R_IMF_CHAN_DEPTH_8 -> 32,
+ * not a flag, only set 1 at a time */
+
+ char planes ; /* - R_IMF_PLANES_BW, R_IMF_PLANES_RGB, R_IMF_PLANES_RGBA */
+ char flag; /* generic options for all image types, alpha zbuffer */
+
+ char quality; /* (0 - 100), eg: jpeg quality */
+ char compress; /* (0 - 100), eg: png compression */
+
+
+ /* --- format specific --- */
+
+ /* OpenEXR */
+ char exr_codec;
+
+ /* Cineon */
+ char cineon_flag;
+ short cineon_white, cineon_black;
+ float cineon_gamma;
+
+ /* Jpeg2000 */
+ char jp2_flag;
+
+ char pad[7];
+
+} ImageFormatData;
+
+
+/* ImageFormatData.imtype */
+#define R_IMF_IMTYPE_TARGA 0
+#define R_IMF_IMTYPE_IRIS 1
+/* #define R_HAMX 2 */ /* hamx is nomore */
+/* #define R_FTYPE 3 */ /* ftype is nomore */
+#define R_IMF_IMTYPE_JPEG90 4
+/* #define R_MOVIE 5 */ /* movie is nomore */
+#define R_IMF_IMTYPE_IRIZ 7
+#define R_IMF_IMTYPE_RAWTGA 14
+#define R_IMF_IMTYPE_AVIRAW 15
+#define R_IMF_IMTYPE_AVIJPEG 16
+#define R_IMF_IMTYPE_PNG 17
+#define R_IMF_IMTYPE_AVICODEC 18
+#define R_IMF_IMTYPE_QUICKTIME 19
+#define R_IMF_IMTYPE_BMP 20
+#define R_IMF_IMTYPE_RADHDR 21
+#define R_IMF_IMTYPE_TIFF 22
+#define R_IMF_IMTYPE_OPENEXR 23
+#define R_IMF_IMTYPE_FFMPEG 24
+#define R_IMF_IMTYPE_FRAMESERVER 25
+#define R_IMF_IMTYPE_CINEON 26
+#define R_IMF_IMTYPE_DPX 27
+#define R_IMF_IMTYPE_MULTILAYER 28
+#define R_IMF_IMTYPE_DDS 29
+#define R_IMF_IMTYPE_JP2 30
+#define R_IMF_IMTYPE_H264 31
+#define R_IMF_IMTYPE_XVID 32
+#define R_IMF_IMTYPE_THEORA 33
+
+/* ImageFormatData.flag */
+#define R_IMF_FLAG_ZBUF (1<<0) /* was R_OPENEXR_ZBUF */
+#define R_IMF_FLAG_PREVIEW_JPG (1<<1) /* was R_PREVIEW_JPG */
+
+/* return values from BKE_imtype_valid_depths, note this is depts per channel */
+#define R_IMF_CHAN_DEPTH_1 (1<<0) /* 1bits (unused) */
+#define R_IMF_CHAN_DEPTH_8 (1<<1) /* 8bits (default) */
+#define R_IMF_CHAN_DEPTH_12 (1<<2) /* 12bits (uncommon, jp2 supports) */
+#define R_IMF_CHAN_DEPTH_16 (1<<3) /* 16bits (tiff, halff float exr) */
+#define R_IMF_CHAN_DEPTH_24 (1<<4) /* 24bits (unused) */
+#define R_IMF_CHAN_DEPTH_32 (1<<5) /* 32bits (full float exr) */
+
+/* ImageFormatData.planes */
+#define R_IMF_PLANES_RGB 24
+#define R_IMF_PLANES_RGBA 32
+#define R_IMF_PLANES_BW 8
+
+/* ImageFormatData.exr_codec */
+#define R_IMF_EXR_CODEC_NONE 0
+#define R_IMF_EXR_CODEC_PXR24 1
+#define R_IMF_EXR_CODEC_ZIP 2
+#define R_IMF_EXR_CODEC_PIZ 3
+#define R_IMF_EXR_CODEC_RLE 4
+
+/* ImageFormatData.jp2_flag */
+#define R_IMF_JP2_FLAG_YCC (1<<0) /* when disabled use RGB */ /* was R_JPEG2K_YCC */
+#define R_IMF_JP2_FLAG_CINE_PRESET (1<<1) /* was R_JPEG2K_CINE_PRESET */
+#define R_IMF_JP2_FLAG_CINE_48 (1<<2) /* was R_JPEG2K_CINE_48FPS */
+
+/* ImageFormatData.cineon_flag */
+#define R_IMF_CINEON_FLAG_LOG (1<<0) /* was R_CINEON_LOG */
+
typedef struct RenderData {
+ struct ImageFormatData im_format;
struct AviCodecData *avicodecdata;
struct QuicktimeCodecData *qtcodecdata;
struct QuicktimeCodecSettings qtcodecsettings;
struct FFMpegCodecData ffcodecdata;
-
+
int cfra, sfra, efra; /* frames as in 'images' */
float subframe; /* subframe offset from cfra, in 0.0-1.0 */
int psfra, pefra; /* start+end frames of preview range */
@@ -256,8 +357,8 @@ typedef struct RenderData {
* The number of part to use in the y direction
*/
short yparts;
-
- short planes, imtype, subimtype, quality;
+
+ short planes, imtype, subimtype, quality; /*deprecated!*/
/**
* Render to image editor, fullscreen or to new window.
@@ -370,11 +471,11 @@ typedef struct RenderData {
float simplify_aosss;
/* cineon */
- short cineonwhite, cineonblack;
- float cineongamma;
+ short cineonwhite, cineonblack; /*deprecated*/
+ float cineongamma; /*deprecated*/
/* jpeg2000 */
- short jp2_preset, jp2_depth;
+ short jp2_preset, jp2_depth; /*deprecated*/
int rpad3;
/* Dome variables */ // XXX deprecated since 2.5
@@ -989,55 +1090,21 @@ typedef struct Scene {
#define R_ALPHAPREMUL 1
#define R_ALPHAKEY 2
-/* planes */
-#define R_PLANES24 24
-#define R_PLANES32 32
-#define R_PLANESBW 8
-
/* color_mgt_flag */
#define R_COLOR_MANAGEMENT 1
-/* imtype */
-#define R_TARGA 0
-#define R_IRIS 1
-/* #define R_HAMX 2 */ /* hamx is nomore */
-/* #define R_FTYPE 3 */ /* ftype is nomore */
-#define R_JPEG90 4
-/*#define R_MOVIE 5*/ /* movie is nomore */
-#define R_IRIZ 7
-#define R_RAWTGA 14
-#define R_AVIRAW 15
-#define R_AVIJPEG 16
-#define R_PNG 17
-#define R_AVICODEC 18
-#define R_QUICKTIME 19
-#define R_BMP 20
-#define R_RADHDR 21
-#define R_TIFF 22
-#define R_OPENEXR 23
-#define R_FFMPEG 24
-#define R_FRAMESERVER 25
-#define R_CINEON 26
-#define R_DPX 27
-#define R_MULTILAYER 28
-#define R_DDS 29
-#define R_JP2 30
-#define R_H264 31
-#define R_XVID 32
-#define R_THEORA 33
-
/* subimtype, flag options for imtype */
-#define R_OPENEXR_HALF 1
-#define R_OPENEXR_ZBUF 2
-#define R_PREVIEW_JPG 4
-#define R_CINEON_LOG 8
-#define R_TIFF_16BIT 16
-
-#define R_JPEG2K_12BIT 32 /* Jpeg2000 */
-#define R_JPEG2K_16BIT 64
-#define R_JPEG2K_YCC 128 /* when disabled use RGB */
-#define R_JPEG2K_CINE_PRESET 256
-#define R_JPEG2K_CINE_48FPS 512
+#define R_OPENEXR_HALF 1 /*deprecated*/
+#define R_OPENEXR_ZBUF 2 /*deprecated*/
+#define R_PREVIEW_JPG 4 /*deprecated*/
+#define R_CINEON_LOG 8 /*deprecated*/
+#define R_TIFF_16BIT 16 /*deprecated*/
+
+#define R_JPEG2K_12BIT 32 /* Jpeg2000 */ /*deprecated*/
+#define R_JPEG2K_16BIT 64 /*deprecated*/
+#define R_JPEG2K_YCC 128 /* when disabled use RGB */ /*deprecated*/
+#define R_JPEG2K_CINE_PRESET 256 /*deprecated*/
+#define R_JPEG2K_CINE_48FPS 512 /*deprecated*/
/* bake_mode: same as RE_BAKE_xxx defines */
/* bake_flag: */
diff --git a/source/blender/makesrna/RNA_access.h b/source/blender/makesrna/RNA_access.h
index a0bdd819744..c0faed69885 100644
--- a/source/blender/makesrna/RNA_access.h
+++ b/source/blender/makesrna/RNA_access.h
@@ -255,6 +255,7 @@ extern StructRNA RNA_HookModifier;
extern StructRNA RNA_ID;
extern StructRNA RNA_IKParam;
extern StructRNA RNA_Image;
+extern StructRNA RNA_ImageFormatSettings;
extern StructRNA RNA_ImagePaint;
extern StructRNA RNA_ImageSequence;
extern StructRNA RNA_ImageTexture;
diff --git a/source/blender/makesrna/RNA_enum_types.h b/source/blender/makesrna/RNA_enum_types.h
index a4866238caa..91e5d06fe5e 100644
--- a/source/blender/makesrna/RNA_enum_types.h
+++ b/source/blender/makesrna/RNA_enum_types.h
@@ -53,6 +53,7 @@ extern EnumPropertyItem boidrule_type_items[];
extern EnumPropertyItem image_type_items[];
extern EnumPropertyItem image_color_mode_items[];
+extern EnumPropertyItem image_depth_mode_items[];
extern EnumPropertyItem beztriple_keyframe_type_items[];
extern EnumPropertyItem beztriple_handle_type_items[];
diff --git a/source/blender/makesrna/intern/rna_armature.c b/source/blender/makesrna/intern/rna_armature.c
index 6785f1f4caf..18ba3936e44 100644
--- a/source/blender/makesrna/intern/rna_armature.c
+++ b/source/blender/makesrna/intern/rna_armature.c
@@ -820,8 +820,8 @@ static void rna_def_armature(BlenderRNA *brna)
{ARM_WIRE, "WIRE", 0, "Wire", "Display bones as thin wires, showing subdivision and B-Splines"},
{0, NULL, 0, NULL, NULL}};
static EnumPropertyItem prop_vdeformer[] = {
- {ARM_VDEF_BLENDER, "BLENDER", 0, "Blender", "Uses Blender's armature vertex deformation"},
- {ARM_VDEF_BGE_CPU, "BGE_CPU", 0, "BGE", "Uses vertex deformation code optimized for the BGE"},
+ {ARM_VDEF_BLENDER, "BLENDER", 0, "Blender", "Use Blender's armature vertex deformation"},
+ {ARM_VDEF_BGE_CPU, "BGE_CPU", 0, "BGE", "Use vertex deformation code optimized for the BGE"},
{0, NULL, 0, NULL, NULL}};
static EnumPropertyItem prop_ghost_type_items[] = {
{ARM_GHOST_CUR, "CURRENT_FRAME", 0, "Around Frame",
@@ -831,7 +831,7 @@ static void rna_def_armature(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}};
static const EnumPropertyItem prop_pose_position_items[]= {
{0, "POSE", 0, "Pose Position", "Show armature in posed state"},
- {ARM_RESTPOS, "REST", 0, "Rest Position", "Show Armature in binding pose state. No posing possible"},
+ {ARM_RESTPOS, "REST", 0, "Rest Position", "Show Armature in binding pose state (no posing possible)"},
{0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "Armature", "ID");
diff --git a/source/blender/makesrna/intern/rna_brush.c b/source/blender/makesrna/intern/rna_brush.c
index d4b0372d24f..60658e98c8d 100644
--- a/source/blender/makesrna/intern/rna_brush.c
+++ b/source/blender/makesrna/intern/rna_brush.c
@@ -511,14 +511,14 @@ static void rna_def_brush(BlenderRNA *brna)
RNA_def_property_float_default(prop, 0);
RNA_def_property_range(prop, -2.0f, 2.0f);
RNA_def_property_ui_range(prop, -0.5f, 0.5f, 0.001, 0.001);
- RNA_def_property_ui_text(prop, "Plane Offset", "Adjusts plane on which the brush acts towards or away from the object surface");
+ RNA_def_property_ui_text(prop, "Plane Offset", "Adjust plane on which the brush acts towards or away from the object surface");
RNA_def_property_update(prop, 0, "rna_Brush_update");
prop= RNA_def_property(srna, "plane_trim", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_float_sdna(prop, NULL, "plane_trim");
RNA_def_property_float_default(prop, 0.5f);
RNA_def_property_range(prop, 0, 1.0f);
- RNA_def_property_ui_text(prop, "Plane Trim", "If a vertex is further from offset plane than this then it is not affected");
+ RNA_def_property_ui_text(prop, "Plane Trim", "If a vertex is further away from offset plane than this, then it is not affected");
RNA_def_property_update(prop, 0, "rna_Brush_update");
prop= RNA_def_property(srna, "height", PROP_FLOAT, PROP_DISTANCE);
@@ -648,17 +648,17 @@ static void rna_def_brush(BlenderRNA *brna)
prop= RNA_def_property(srna, "use_persistent", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", BRUSH_PERSISTENT);
- RNA_def_property_ui_text(prop, "Persistent", "Sculpts on a persistent layer of the mesh");
+ RNA_def_property_ui_text(prop, "Persistent", "Sculpt on a persistent layer of the mesh");
RNA_def_property_update(prop, 0, "rna_Brush_update");
prop= RNA_def_property(srna, "use_accumulate", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", BRUSH_ACCUMULATE);
- RNA_def_property_ui_text(prop, "Accumulate", "Accumulate stroke dabs on top of each other");
+ RNA_def_property_ui_text(prop, "Accumulate", "Accumulate stroke daubs on top of each other");
RNA_def_property_update(prop, 0, "rna_Brush_update");
prop= RNA_def_property(srna, "use_space_atten", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", BRUSH_SPACE_ATTEN);
- RNA_def_property_ui_text(prop, "Use Automatic Strength Adjustment", "Automatically adjusts strength to give consistent results for different spacings");
+ RNA_def_property_ui_text(prop, "Use Automatic Strength Adjustment", "Automatically adjust strength to give consistent results for different spacings");
RNA_def_property_update(prop, 0, "rna_Brush_update");
/* adaptive space is not implemented yet */
@@ -685,7 +685,7 @@ static void rna_def_brush(BlenderRNA *brna)
prop= RNA_def_property(srna, "use_restore_mesh", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", BRUSH_RESTORE_MESH);
- RNA_def_property_ui_text(prop, "Restore Mesh", "Allows a single dot to be carefully positioned");
+ RNA_def_property_ui_text(prop, "Restore Mesh", "Allow a single dot to be carefully positioned");
RNA_def_property_update(prop, 0, "rna_Brush_update");
prop= RNA_def_property(srna, "use_fixed_texture", PROP_BOOLEAN, PROP_NONE);
diff --git a/source/blender/makesrna/intern/rna_define.c b/source/blender/makesrna/intern/rna_define.c
index 48274ffbd7a..abaeb202ffa 100644
--- a/source/blender/makesrna/intern/rna_define.c
+++ b/source/blender/makesrna/intern/rna_define.c
@@ -1504,7 +1504,8 @@ static PropertyDefRNA *rna_def_property_sdna(PropertyRNA *prop, const char *stru
return dp;
}
else {
- fprintf(stderr, "%s: \"%s.%s\" not found.\n", __func__, structname, propname);
+ fprintf(stderr, "%s: \"%s.%s\" (identifier \"%s\") not found.\n",
+ __func__, structname, propname, prop->identifier);
DefRNA.error= 1;
return NULL;
}
diff --git a/source/blender/makesrna/intern/rna_fcurve.c b/source/blender/makesrna/intern/rna_fcurve.c
index c651dca4b31..56f1efe3fed 100644
--- a/source/blender/makesrna/intern/rna_fcurve.c
+++ b/source/blender/makesrna/intern/rna_fcurve.c
@@ -637,7 +637,7 @@ static void rna_def_fmodifier_generator(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "FModifierGenerator", "FModifier");
- RNA_def_struct_ui_text(srna, "Generator F-Curve Modifier", "Deterministically generates values for the modified F-Curve");
+ RNA_def_struct_ui_text(srna, "Generator F-Modifier", "Deterministically generate values for the modified F-Curve");
RNA_def_struct_sdna_from(srna, "FMod_Generator", "data");
/* define common props */
@@ -659,7 +659,7 @@ static void rna_def_fmodifier_generator(BlenderRNA *brna)
// XXX this has a special validation func
prop= RNA_def_property(srna, "poly_order", PROP_INT, PROP_NONE);
RNA_def_property_ui_text(prop, "Polynomial Order",
- "The highest power of 'x' for this polynomial. (number of coefficients - 1)");
+ "The highest power of 'x' for this polynomial (number of coefficients - 1)");
RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME|NA_EDITED, NULL);
/* coefficients array */
@@ -689,7 +689,7 @@ static void rna_def_fmodifier_function_generator(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "FModifierFunctionGenerator", "FModifier");
- RNA_def_struct_ui_text(srna, "Built-In Function F-Modifier", "Generates values using a Built-In Function");
+ RNA_def_struct_ui_text(srna, "Built-In Function F-Modifier", "Generate values using a Built-In Function");
RNA_def_struct_sdna_from(srna, "FMod_FunctionGenerator", "data");
/* coefficients */
@@ -765,7 +765,7 @@ static void rna_def_fmodifier_envelope(BlenderRNA *brna)
PropertyRNA *prop;
srna= RNA_def_struct(brna, "FModifierEnvelope", "FModifier");
- RNA_def_struct_ui_text(srna, "Envelope F-Modifier", "Scales the values of the modified F-Curve");
+ RNA_def_struct_ui_text(srna, "Envelope F-Modifier", "Scale the values of the modified F-Curve");
RNA_def_struct_sdna_from(srna, "FMod_Envelope", "data");
/* Collections */
@@ -802,13 +802,13 @@ static void rna_def_fmodifier_cycles(BlenderRNA *brna)
{FCM_EXTRAPOLATE_NONE, "NONE", 0, "No Cycles", "Don't do anything"},
{FCM_EXTRAPOLATE_CYCLIC, "REPEAT", 0, "Repeat Motion", "Repeat keyframe range as-is"},
{FCM_EXTRAPOLATE_CYCLIC_OFFSET, "REPEAT_OFFSET", 0, "Repeat with Offset",
- "Repeat keyframe range, but with offset based on gradient between values"},
+ "Repeat keyframe range, but with offset based on gradient between start and end values"},
{FCM_EXTRAPOLATE_MIRROR, "MIRROR", 0, "Repeat Mirrored",
"Alternate between forward and reverse playback of keyframe range"},
{0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "FModifierCycles", "FModifier");
- RNA_def_struct_ui_text(srna, "Cycles F-Modifier", "Repeats the values of the modified F-Curve");
+ RNA_def_struct_ui_text(srna, "Cycles F-Modifier", "Repeat the values of the modified F-Curve");
RNA_def_struct_sdna_from(srna, "FMod_Cycles", "data");
/* before */
@@ -820,7 +820,7 @@ static void rna_def_fmodifier_cycles(BlenderRNA *brna)
prop= RNA_def_property(srna, "cycles_before", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "before_cycles");
- RNA_def_property_ui_text(prop, "Before Cycles", "Maximum number of cycles to allow before first keyframe. (0 = infinite)");
+ RNA_def_property_ui_text(prop, "Before Cycles", "Maximum number of cycles to allow before first keyframe (0 = infinite)");
RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME|NA_EDITED, NULL);
/* after */
@@ -832,7 +832,7 @@ static void rna_def_fmodifier_cycles(BlenderRNA *brna)
prop= RNA_def_property(srna, "cycles_after", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "after_cycles");
- RNA_def_property_ui_text(prop, "After Cycles", "Maximum number of cycles to allow after last keyframe. (0 = infinite)");
+ RNA_def_property_ui_text(prop, "After Cycles", "Maximum number of cycles to allow after last keyframe (0 = infinite)");
RNA_def_property_update(prop, NC_ANIMATION|ND_KEYFRAME|NA_EDITED, NULL);
}
@@ -844,7 +844,7 @@ static void rna_def_fmodifier_python(BlenderRNA *brna)
//PropertyRNA *prop;
srna= RNA_def_struct(brna, "FModifierPython", "FModifier");
- RNA_def_struct_ui_text(srna, "Python F-Modifier", "Performs user-defined operation on the modified F-Curve");
+ RNA_def_struct_ui_text(srna, "Python F-Modifier", "Perform user-defined operation on the modified F-Curve");
RNA_def_struct_sdna_from(srna, "FMod_Python", "data");
}
@@ -856,7 +856,7 @@ static void rna_def_fmodifier_limits(BlenderRNA *brna)
PropertyRNA *prop;
srna= RNA_def_struct(brna, "FModifierLimits", "FModifier");
- RNA_def_struct_ui_text(srna, "Limits F-Modifier", "Limits the time/value ranges of the modified F-Curve");
+ RNA_def_struct_ui_text(srna, "Limit F-Modifier", "Limit the time/value ranges of the modified F-Curve");
RNA_def_struct_sdna_from(srna, "FMod_Limits", "data");
prop= RNA_def_property(srna, "use_min_x", PROP_BOOLEAN, PROP_NONE);
@@ -919,7 +919,7 @@ static void rna_def_fmodifier_noise(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "FModifierNoise", "FModifier");
- RNA_def_struct_ui_text(srna, "Noise F-Modifier", "Gives randomness to the modified F-Curve");
+ RNA_def_struct_ui_text(srna, "Noise F-Modifier", "Give randomness to the modified F-Curve");
RNA_def_struct_sdna_from(srna, "FMod_Noise", "data");
prop= RNA_def_property(srna, "blend_type", PROP_ENUM, PROP_NONE);
diff --git a/source/blender/makesrna/intern/rna_fluidsim.c b/source/blender/makesrna/intern/rna_fluidsim.c
index 09f339fa7db..428f56b5130 100644
--- a/source/blender/makesrna/intern/rna_fluidsim.c
+++ b/source/blender/makesrna/intern/rna_fluidsim.c
@@ -218,9 +218,9 @@ static void rna_def_fluidsim_slip(StructRNA *srna)
PropertyRNA *prop;
static EnumPropertyItem slip_items[] = {
- {OB_FSBND_NOSLIP, "NOSLIP", 0, "No Slip", "Obstacle causes zero normal and tangential velocity (=sticky). Default for all. Only option for moving objects"},
- {OB_FSBND_PARTSLIP, "PARTIALSLIP", 0, "Partial Slip", "Mix between no-slip and free-slip. Non moving objects only!"},
- {OB_FSBND_FREESLIP, "FREESLIP", 0, "Free Slip", "Obstacle only causes zero normal velocity (=not sticky). Non moving objects only!"},
+ {OB_FSBND_NOSLIP, "NOSLIP", 0, "No Slip", "Obstacle causes zero normal and tangential velocity (=sticky), default for all (only option for moving objects)"},
+ {OB_FSBND_PARTSLIP, "PARTIALSLIP", 0, "Partial Slip", "Mix between no-slip and free-slip (non moving objects only!)"},
+ {OB_FSBND_FREESLIP, "FREESLIP", 0, "Free Slip", "Obstacle only causes zero normal velocity (=not sticky, non moving objects only!)"},
{0, NULL, 0, NULL, NULL}};
prop= RNA_def_property(srna, "slip_type", PROP_ENUM, PROP_NONE);
@@ -353,7 +353,7 @@ static void rna_def_fluidsim_domain(BlenderRNA *brna)
prop= RNA_def_property(srna, "viscosity_exponent", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "viscosityExponent");
RNA_def_property_range(prop, 0, 10);
- RNA_def_property_ui_text(prop, "Viscosity Exponent", "Negative exponent for the viscosity value (to simplify entering small values e.g. 5*10^-6.)");
+ RNA_def_property_ui_text(prop, "Viscosity Exponent", "Negative exponent for the viscosity value (to simplify entering small values e.g. 5*10^-6)");
prop= RNA_def_property(srna, "grid_levels", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "maxRefine");
@@ -365,7 +365,7 @@ static void rna_def_fluidsim_domain(BlenderRNA *brna)
RNA_def_property_float_sdna(prop, NULL, "gstar");
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_range(prop, 0.001, 0.1);
- RNA_def_property_ui_text(prop, "Compressibility", "Allowed compressibility due to gravitational force for standing fluid. (directly affects simulation step size)");
+ RNA_def_property_ui_text(prop, "Compressibility", "Allowed compressibility due to gravitational force for standing fluid (directly affects simulation step size)");
/* domain boundary settings */
@@ -375,13 +375,13 @@ static void rna_def_fluidsim_domain(BlenderRNA *brna)
RNA_def_property_float_sdna(prop, NULL, "surfaceSmoothing");
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_range(prop, 0.0, 5.0);
- RNA_def_property_ui_text(prop, "Surface Smoothing", "Amount of surface smoothing. A value of 0 is off, 1 is normal smoothing and more than 1 is extra smoothing");
+ RNA_def_property_ui_text(prop, "Surface Smoothing", "Amount of surface smoothing (a value of 0 is off, 1 is normal smoothing and more than 1 is extra smoothing)");
prop= RNA_def_property(srna, "surface_subdivisions", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "surfaceSubdivs");
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_range(prop, 0, 5);
- RNA_def_property_ui_text(prop, "Surface Subdivisions", "Number of isosurface subdivisions. This is necessary for the inclusion of particles into the surface generation. Warning - can lead to longer computation times!");
+ RNA_def_property_ui_text(prop, "Surface Subdivisions", "Number of isosurface subdivisions (this is necessary for the inclusion of particles into the surface generation - WARNING: can lead to longer computation times !)");
prop= RNA_def_property(srna, "use_speed_vectors", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "domainNovecgen", 0);
@@ -435,7 +435,7 @@ static void rna_def_fluidsim_volume(StructRNA *srna)
prop= RNA_def_property(srna, "use_animated_mesh", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "domainNovecgen", 0);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
- RNA_def_property_ui_text(prop, "Export Animated Mesh", "Export this mesh as an animated one. Slower, only use if really necessary (e.g. armatures or parented objects), animated pos/rot/scale IPOs do not require it");
+ RNA_def_property_ui_text(prop, "Export Animated Mesh", "Export this mesh as an animated one (slower, only use if really necessary [e.g. armatures or parented objects], animated pos/rot/scale F-Curves do not require it)");
}
static void rna_def_fluidsim_active(StructRNA *srna)
@@ -483,7 +483,7 @@ static void rna_def_fluidsim_obstacle(BlenderRNA *brna)
RNA_def_property_float_sdna(prop, NULL, "surfaceSmoothing");
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_range(prop, -2.0, 10.0);
- RNA_def_property_ui_text(prop, "Impact Factor", "This is an unphysical value for moving objects - it controls the impact an obstacle has on the fluid, =0 behaves a bit like outflow (deleting fluid), =1 is default, while >1 results in high forces. Can be used to tweak total mass");
+ RNA_def_property_ui_text(prop, "Impact Factor", "This is an unphysical value for moving objects - it controls the impact an obstacle has on the fluid, =0 behaves a bit like outflow (deleting fluid), =1 is default, while >1 results in high forces (can be used to tweak total mass)");
}
static void rna_def_fluidsim_inflow(BlenderRNA *brna)
@@ -507,7 +507,7 @@ static void rna_def_fluidsim_inflow(BlenderRNA *brna)
prop= RNA_def_property(srna, "use_local_coords", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_boolean_sdna(prop, NULL, "typeFlags", OB_FSINFLOW_LOCALCOORD);
- RNA_def_property_ui_text(prop, "Local Coordinates", "Use local coordinates for inflow. (e.g. for rotating objects)");
+ RNA_def_property_ui_text(prop, "Local Coordinates", "Use local coordinates for inflow (e.g. for rotating objects)");
}
static void rna_def_fluidsim_outflow(BlenderRNA *brna)
@@ -551,7 +551,7 @@ static void rna_def_fluidsim_particle(BlenderRNA *brna)
prop= RNA_def_property(srna, "alpha_influence", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "particleInfAlpha");
RNA_def_property_range(prop, 0.0, 2.0);
- RNA_def_property_ui_text(prop, "Alpha Influence", "Amount of particle alpha change, inverse of size influence: 0=off (all same alpha), 1=full. (large particles get lower alphas, smaller ones higher values)");
+ RNA_def_property_ui_text(prop, "Alpha Influence", "Amount of particle alpha change, inverse of size influence: 0=off (all same alpha), 1=full (large particles get lower alphas, smaller ones higher values)");
prop= RNA_def_property(srna, "filepath", PROP_STRING, PROP_FILEPATH);
RNA_def_property_string_maxlength(prop, 240);
@@ -574,12 +574,12 @@ static void rna_def_fluidsim_control(BlenderRNA *brna)
prop= RNA_def_property(srna, "start_time", PROP_FLOAT, PROP_TIME);
RNA_def_property_float_sdna(prop, NULL, "cpsTimeStart");
RNA_def_property_range(prop, 0.0, 100.0);
- RNA_def_property_ui_text(prop, "Start Time", "Specifies time when the control particles are activated");
+ RNA_def_property_ui_text(prop, "Start Time", "Time when the control particles are activated");
prop= RNA_def_property(srna, "end_time", PROP_FLOAT, PROP_TIME);
RNA_def_property_float_sdna(prop, NULL, "cpsTimeEnd");
RNA_def_property_range(prop, 0.0, 100.0);
- RNA_def_property_ui_text(prop, "End Time", "Specifies time when the control particles are deactivated");
+ RNA_def_property_ui_text(prop, "End Time", "Time when the control particles are deactivated");
prop= RNA_def_property(srna, "attraction_strength", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "attractforceStrength");
@@ -589,7 +589,7 @@ static void rna_def_fluidsim_control(BlenderRNA *brna)
prop= RNA_def_property(srna, "attraction_radius", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "attractforceRadius");
RNA_def_property_range(prop, 0.0, 10.0);
- RNA_def_property_ui_text(prop, "Attraction Radius", "Specifies the force field radius around the control object");
+ RNA_def_property_ui_text(prop, "Attraction Radius", "Force field radius around the control object");
prop= RNA_def_property(srna, "velocity_strength", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "velocityforceStrength");
@@ -599,13 +599,13 @@ static void rna_def_fluidsim_control(BlenderRNA *brna)
prop= RNA_def_property(srna, "velocity_radius", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "velocityforceRadius");
RNA_def_property_range(prop, 0.0, 10.0);
- RNA_def_property_ui_text(prop, "Velocity Radius", "Specifies the force field radius around the control object");
+ RNA_def_property_ui_text(prop, "Velocity Radius", "Force field radius around the control object");
prop= RNA_def_property(srna, "quality", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "cpsQuality");
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_range(prop, 5.0, 100.0);
- RNA_def_property_ui_text(prop, "Quality", "Specifies the quality which is used for object sampling. (higher = better but slower)");
+ RNA_def_property_ui_text(prop, "Quality", "Quality which is used for object sampling (higher = better but slower)");
prop= RNA_def_property(srna, "use_reverse_frames", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", OB_FLUIDSIM_REVERSE);
diff --git a/source/blender/makesrna/intern/rna_image.c b/source/blender/makesrna/intern/rna_image.c
index ad6f459f851..737ce73ff1d 100644
--- a/source/blender/makesrna/intern/rna_image.c
+++ b/source/blender/makesrna/intern/rna_image.c
@@ -258,20 +258,20 @@ static int rna_Image_depth_get(PointerRNA *ptr)
Image *im= (Image*)ptr->data;
ImBuf *ibuf;
void *lock;
- int depth;
+ int planes;
ibuf= BKE_image_acquire_ibuf(im, NULL, &lock);
if(!ibuf)
- depth= 0;
+ planes= 0;
else if(ibuf->rect_float)
- depth= ibuf->depth * 4;
+ planes= ibuf->planes * 4;
else
- depth= ibuf->depth;
+ planes= ibuf->planes;
BKE_image_release_ibuf(im, lock);
- return depth;
+ return planes;
}
static int rna_Image_pixels_get_length(PointerRNA *ptr, int length[RNA_MAX_ARRAY_DIMENSION])
diff --git a/source/blender/makesrna/intern/rna_image_api.c b/source/blender/makesrna/intern/rna_image_api.c
index 07271cb1aca..91aa9daac25 100644
--- a/source/blender/makesrna/intern/rna_image_api.c
+++ b/source/blender/makesrna/intern/rna_image_api.c
@@ -82,14 +82,14 @@ static void rna_Image_save_render(Image *image, bContext *C, ReportList *reports
}
else {
/* temp swap out the color */
- const unsigned char imb_depth_back= ibuf->depth;
+ const unsigned char imb_planes_back= ibuf->planes;
const float dither_back= ibuf->dither;
- ibuf->depth= scene->r.planes;
+ ibuf->planes= scene->r.im_format.planes;
ibuf->dither= scene->r.dither_intensity;
- if (!BKE_write_ibuf(ibuf, path, scene->r.imtype, scene->r.subimtype, scene->r.quality)) {
+ if (!BKE_write_ibuf(ibuf, path, &scene->r.im_format)) {
BKE_reportf(reports, RPT_ERROR, "Couldn't write image: %s", path);
}
- ibuf->depth= imb_depth_back;
+ ibuf->planes= imb_planes_back;
ibuf->dither= dither_back;
}
diff --git a/source/blender/makesrna/intern/rna_nodetree.c b/source/blender/makesrna/intern/rna_nodetree.c
index 30889bb25f6..cd1b74f2b38 100644
--- a/source/blender/makesrna/intern/rna_nodetree.c
+++ b/source/blender/makesrna/intern/rna_nodetree.c
@@ -1688,30 +1688,6 @@ static void def_cmp_output_file(StructRNA *srna)
{
PropertyRNA *prop;
- static EnumPropertyItem type_items[] = {
- {R_TARGA, "TARGA", 0, "Targa", ""},
- {R_RAWTGA, "RAW_TARGA", 0, "Targa Raw", ""},
- {R_PNG, "PNG", 0, "PNG", ""},
-#ifdef WITH_DDS
- {R_DDS, "DDS", 0, "DirectDraw Surface", ""},
-#endif
- {R_BMP, "BMP", 0, "BMP", ""},
- {R_JPEG90, "JPEG", 0, "JPEG", ""},
- {R_IRIS, "IRIS", 0, "IRIS", ""},
- {R_RADHDR, "RADIANCE_HDR", 0, "Radiance HDR", ""},
- {R_CINEON, "CINEON", 0, "Cineon", ""},
- {R_DPX, "DPX", 0, "DPX", ""},
- {R_OPENEXR, "OPENEXR", 0, "OpenEXR", ""},
- {0, NULL, 0, NULL, NULL}};
-
- static EnumPropertyItem openexr_codec_items[] = {
- {0, "NONE", 0, "None", ""},
- {1, "PXR24", 0, "Pxr24 (lossy)", ""},
- {2, "ZIP", 0, "ZIP (lossless)", ""},
- {3, "PIZ", 0, "PIZ (lossless)", ""},
- {4, "RLE", 0, "RLE (lossless)", ""},
- {0, NULL, 0, NULL, NULL}};
-
RNA_def_struct_sdna_from(srna, "NodeImageFile", "storage");
prop = RNA_def_property(srna, "filepath", PROP_STRING, PROP_FILEPATH);
@@ -1719,28 +1695,11 @@ static void def_cmp_output_file(StructRNA *srna)
RNA_def_property_ui_text(prop, "File Path", "Output path for the image, same functionality as render output");
RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
- prop = RNA_def_property(srna, "image_type", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_sdna(prop, NULL, "imtype");
- RNA_def_property_enum_items(prop, type_items);
- RNA_def_property_ui_text(prop, "Image Type", "");
- RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
-
- prop = RNA_def_property(srna, "use_exr_half", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "subimtype", R_OPENEXR_HALF);
- RNA_def_property_ui_text(prop, "Half", "");
- RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
-
- prop = RNA_def_property(srna, "exr_codec", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_sdna(prop, NULL, "codec");
- RNA_def_property_enum_items(prop, openexr_codec_items);
- RNA_def_property_ui_text(prop, "Codec", "");
- RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
-
- prop = RNA_def_property(srna, "quality", PROP_INT, PROP_NONE);
- RNA_def_property_int_sdna(prop, NULL, "quality");
- RNA_def_property_range(prop, 1, 100);
- RNA_def_property_ui_text(prop, "Quality", "");
- RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
+ prop= RNA_def_property(srna, "image_settings", PROP_POINTER, PROP_NONE);
+ RNA_def_property_flag(prop, PROP_NEVER_NULL);
+ RNA_def_property_pointer_sdna(prop, NULL, "im_format");
+ RNA_def_property_struct_type(prop, "ImageFormatSettings");
+ RNA_def_property_ui_text(prop, "Image Format", "");
prop = RNA_def_property(srna, "frame_start", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "sfra");
diff --git a/source/blender/makesrna/intern/rna_property.c b/source/blender/makesrna/intern/rna_property.c
index 3566197659c..e8ef61b6d74 100644
--- a/source/blender/makesrna/intern/rna_property.c
+++ b/source/blender/makesrna/intern/rna_property.c
@@ -153,7 +153,7 @@ void RNA_def_gameproperty(BlenderRNA *brna)
/* GameFloatProperty */
srna= RNA_def_struct(brna, "GameFloatProperty", "GameProperty");
- RNA_def_struct_ui_text(srna, "Game Float Property", "Game engine user defined floating pointer number property");
+ RNA_def_struct_ui_text(srna, "Game Float Property", "Game engine user defined floating point number property");
RNA_def_struct_sdna(srna, "bProperty");
prop= RNA_def_property(srna, "value", PROP_FLOAT, PROP_NONE);
diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c
index ee3193b5429..f9b88e19248 100644
--- a/source/blender/makesrna/intern/rna_scene.c
+++ b/source/blender/makesrna/intern/rna_scene.c
@@ -104,65 +104,124 @@ EnumPropertyItem snap_element_items[] = {
{SCE_SNAP_MODE_VOLUME, "VOLUME", ICON_SNAP_VOLUME, "Volume", "Snap to volume"},
{0, NULL, 0, NULL, NULL}};
+
+/* note on duplicate block, perhaps we should use some trick to avoid
+ * the duplicate, but with the inline defines it becomes very tricky
+ * this awaits someone who has very good preprocessor-fu.
+ * for now just make sure they stay in sync - campbell */
+
+EnumPropertyItem image_only_type_items[] = {
+
+
+ /* --- duplicate block warning (see below) --- */
+#define IMAGE_TYPE_ITEMS_IMAGE_ONLY
+ {R_IMF_IMTYPE_BMP, "BMP", ICON_FILE_IMAGE, "BMP", "Output image in bitmap format"},
+#ifdef WITH_DDS
+ {R_IMF_IMTYPE_DDS, "DDS", ICON_FILE_IMAGE, "DDS", "Output image in DDS format"},
+#endif
+ {R_IMF_IMTYPE_IRIS, "IRIS", ICON_FILE_IMAGE, "Iris", "Output image in (old!) SGI IRIS format"},
+ {R_IMF_IMTYPE_PNG, "PNG", ICON_FILE_IMAGE, "PNG", "Output image in PNG format"},
+ {R_IMF_IMTYPE_JPEG90, "JPEG", ICON_FILE_IMAGE, "JPEG", "Output image in JPEG format"},
+#ifdef WITH_OPENJPEG
+ {R_IMF_IMTYPE_JP2, "JPEG2000", ICON_FILE_IMAGE, "JPEG 2000", "Output image in JPEG 2000 format"},
+#endif
+ {R_IMF_IMTYPE_TARGA, "TARGA", ICON_FILE_IMAGE, "Targa", "Output image in Targa format"},
+ {R_IMF_IMTYPE_RAWTGA, "TARGA_RAW", ICON_FILE_IMAGE, "Targa Raw", "Output image in uncompressed Targa format"},
+ {0, "", 0, " ", NULL},
+#ifdef WITH_CINEON
+ {R_IMF_IMTYPE_CINEON, "CINEON", ICON_FILE_IMAGE, "Cineon", "Output image in Cineon format"},
+ {R_IMF_IMTYPE_DPX, "DPX",ICON_FILE_IMAGE, "DPX", "Output image in DPX format"},
+#endif
+#ifdef WITH_OPENEXR
+ {R_IMF_IMTYPE_MULTILAYER, "MULTILAYER", ICON_FILE_IMAGE, "MultiLayer", "Output image in multilayer OpenEXR format"},
+ {R_IMF_IMTYPE_OPENEXR, "OPEN_EXR", ICON_FILE_IMAGE, "OpenEXR", "Output image in OpenEXR format"},
+#endif
+#ifdef WITH_HDR
+ {R_IMF_IMTYPE_RADHDR, "HDR", ICON_FILE_IMAGE, "Radiance HDR", "Output image in Radiance HDR format"},
+#endif
+#ifdef WITH_TIFF
+ {R_IMF_IMTYPE_TIFF, "TIFF", ICON_FILE_IMAGE, "TIFF", "Output image in TIFF format"},
+#endif
+ /* --- end duplicate block (see below) --- */
+
+
+ {0, NULL, 0, NULL, NULL}};
+
EnumPropertyItem image_type_items[] = {
{0, "", 0, "Image", NULL},
- {R_BMP, "BMP", ICON_FILE_IMAGE, "BMP", "Output image in bitmap format"},
+
+
+ /* --- duplicate block warning (see above) --- */
+#define IMAGE_TYPE_ITEMS_IMAGE_ONLY
+ {R_IMF_IMTYPE_BMP, "BMP", ICON_FILE_IMAGE, "BMP", "Output image in bitmap format"},
#ifdef WITH_DDS
- {R_DDS, "DDS", ICON_FILE_IMAGE, "DDS", "Output image in DDS format"},
+ {R_IMF_IMTYPE_DDS, "DDS", ICON_FILE_IMAGE, "DDS", "Output image in DDS format"},
#endif
- {R_IRIS, "IRIS", ICON_FILE_IMAGE, "Iris", "Output image in (old!) SGI IRIS format"},
- {R_PNG, "PNG", ICON_FILE_IMAGE, "PNG", "Output image in PNG format"},
- {R_JPEG90, "JPEG", ICON_FILE_IMAGE, "JPEG", "Output image in JPEG format"},
+ {R_IMF_IMTYPE_IRIS, "IRIS", ICON_FILE_IMAGE, "Iris", "Output image in (old!) SGI IRIS format"},
+ {R_IMF_IMTYPE_PNG, "PNG", ICON_FILE_IMAGE, "PNG", "Output image in PNG format"},
+ {R_IMF_IMTYPE_JPEG90, "JPEG", ICON_FILE_IMAGE, "JPEG", "Output image in JPEG format"},
#ifdef WITH_OPENJPEG
- {R_JP2, "JPEG2000", ICON_FILE_IMAGE, "JPEG 2000", "Output image in JPEG 2000 format"},
+ {R_IMF_IMTYPE_JP2, "JPEG2000", ICON_FILE_IMAGE, "JPEG 2000", "Output image in JPEG 2000 format"},
#endif
- {R_TARGA, "TARGA", ICON_FILE_IMAGE, "Targa", "Output image in Targa format"},
- {R_RAWTGA, "TARGA_RAW", ICON_FILE_IMAGE, "Targa Raw", "Output image in uncompressed Targa format"},
+ {R_IMF_IMTYPE_TARGA, "TARGA", ICON_FILE_IMAGE, "Targa", "Output image in Targa format"},
+ {R_IMF_IMTYPE_RAWTGA, "TARGA_RAW", ICON_FILE_IMAGE, "Targa Raw", "Output image in uncompressed Targa format"},
{0, "", 0, " ", NULL},
#ifdef WITH_CINEON
- {R_CINEON, "CINEON", ICON_FILE_IMAGE, "Cineon", "Output image in Cineon format"},
- {R_DPX, "DPX",ICON_FILE_IMAGE, "DPX", "Output image in DPX format"},
+ {R_IMF_IMTYPE_CINEON, "CINEON", ICON_FILE_IMAGE, "Cineon", "Output image in Cineon format"},
+ {R_IMF_IMTYPE_DPX, "DPX",ICON_FILE_IMAGE, "DPX", "Output image in DPX format"},
#endif
#ifdef WITH_OPENEXR
- {R_MULTILAYER, "MULTILAYER", ICON_FILE_IMAGE, "MultiLayer", "Output image in multilayer OpenEXR format"},
- {R_OPENEXR, "OPEN_EXR", ICON_FILE_IMAGE, "OpenEXR", "Output image in OpenEXR format"},
+ {R_IMF_IMTYPE_MULTILAYER, "MULTILAYER", ICON_FILE_IMAGE, "MultiLayer", "Output image in multilayer OpenEXR format"},
+ {R_IMF_IMTYPE_OPENEXR, "OPEN_EXR", ICON_FILE_IMAGE, "OpenEXR", "Output image in OpenEXR format"},
#endif
#ifdef WITH_HDR
- {R_RADHDR, "HDR", ICON_FILE_IMAGE, "Radiance HDR", "Output image in Radiance HDR format"},
+ {R_IMF_IMTYPE_RADHDR, "HDR", ICON_FILE_IMAGE, "Radiance HDR", "Output image in Radiance HDR format"},
#endif
#ifdef WITH_TIFF
- {R_TIFF, "TIFF", ICON_FILE_IMAGE, "TIFF", "Output image in TIFF format"},
+ {R_IMF_IMTYPE_TIFF, "TIFF", ICON_FILE_IMAGE, "TIFF", "Output image in TIFF format"},
#endif
+ /* --- end duplicate block (see above) --- */
+
+
{0, "", 0, "Movie", NULL},
#ifdef _WIN32
- {R_AVICODEC, "AVICODEC", ICON_FILE_MOVIE, "AVI Codec", "Output video in AVI format"}, // XXX Missing codec menu
+ {R_IMF_IMTYPE_AVICODEC, "AVICODEC", ICON_FILE_MOVIE, "AVI Codec", "Output video in AVI format"}, // XXX Missing codec menu
#endif
- {R_AVIJPEG, "AVI_JPEG", ICON_FILE_MOVIE, "AVI JPEG", "Output video in AVI JPEG format"},
- {R_AVIRAW, "AVI_RAW", ICON_FILE_MOVIE, "AVI Raw", "Output video in AVI Raw format"},
+ {R_IMF_IMTYPE_AVIJPEG, "AVI_JPEG", ICON_FILE_MOVIE, "AVI JPEG", "Output video in AVI JPEG format"},
+ {R_IMF_IMTYPE_AVIRAW, "AVI_RAW", ICON_FILE_MOVIE, "AVI Raw", "Output video in AVI Raw format"},
#ifdef WITH_FRAMESERVER
- {R_FRAMESERVER, "FRAMESERVER", ICON_FILE_SCRIPT, "Frame Server", "Output image to a frameserver"},
+ {R_IMF_IMTYPE_FRAMESERVER, "FRAMESERVER", ICON_FILE_SCRIPT, "Frame Server", "Output image to a frameserver"},
#endif
#ifdef WITH_FFMPEG
- {R_H264, "H264", ICON_FILE_MOVIE, "H.264", "Output video in H.264 format"},
- {R_FFMPEG, "FFMPEG", ICON_FILE_MOVIE, "MPEG", "Output video in MPEG format"},
- {R_THEORA, "THEORA", ICON_FILE_MOVIE, "Ogg Theora", "Output video in Ogg format"},
+ {R_IMF_IMTYPE_H264, "H264", ICON_FILE_MOVIE, "H.264", "Output video in H.264 format"},
+ {R_IMF_IMTYPE_FFMPEG, "FFMPEG", ICON_FILE_MOVIE, "MPEG", "Output video in MPEG format"},
+ {R_IMF_IMTYPE_THEORA, "THEORA", ICON_FILE_MOVIE, "Ogg Theora", "Output video in Ogg format"},
#endif
#ifdef WITH_QUICKTIME
# ifdef USE_QTKIT
- {R_QUICKTIME, "QUICKTIME_QTKIT", ICON_FILE_MOVIE, "QuickTime", "Output video in Quicktime format"},
+ {R_IMF_IMTYPE_QUICKTIME, "QUICKTIME_QTKIT", ICON_FILE_MOVIE, "QuickTime", "Output video in Quicktime format"},
# else
- {R_QUICKTIME, "QUICKTIME_CARBON", ICON_FILE_MOVIE, "QuickTime", "Output video in Quicktime format"},
+ {R_IMF_IMTYPE_QUICKTIME, "QUICKTIME_CARBON", ICON_FILE_MOVIE, "QuickTime", "Output video in Quicktime format"},
# endif
#endif
#ifdef WITH_FFMPEG
- {R_XVID, "XVID", ICON_FILE_MOVIE, "Xvid", "Output video in Xvid format"},
+ {R_IMF_IMTYPE_XVID, "XVID", ICON_FILE_MOVIE, "Xvid", "Output video in Xvid format"},
#endif
{0, NULL, 0, NULL, NULL}};
EnumPropertyItem image_color_mode_items[] ={
- {R_PLANESBW, "BW", 0, "BW", "Images get saved in 8 bits grayscale (only PNG, JPEG, TGA, TIF)"},
- {R_PLANES24, "RGB", 0, "RGB", "Images are saved with RGB (color) data"},
- {R_PLANES32, "RGBA", 0, "RGBA", "Images are saved with RGB and Alpha data (if supported)"},
+ {R_IMF_PLANES_BW, "BW", 0, "BW", "Images get saved in 8 bits grayscale (only PNG, JPEG, TGA, TIF)"},
+ {R_IMF_PLANES_RGB, "RGB", 0, "RGB", "Images are saved with RGB (color) data"},
+ {R_IMF_PLANES_RGBA, "RGBA", 0, "RGBA", "Images are saved with RGB and Alpha data (if supported)"},
+ {0, NULL, 0, NULL, NULL}};
+
+EnumPropertyItem image_color_depth_items[] = {
+ /* 1 (monochrome) not used */
+ {R_IMF_CHAN_DEPTH_8, "8", 0, "8", "8 bit color channels"},
+ {R_IMF_CHAN_DEPTH_12, "12", 0, "12", "12 bit color channels"},
+ {R_IMF_CHAN_DEPTH_16, "16", 0, "16", "16 bit color channels"},
+ /* 24 not used */
+ {R_IMF_CHAN_DEPTH_32, "32", 0, "32", "32 bit color channels"},
{0, NULL, 0, NULL, NULL}};
#ifdef RNA_RUNTIME
@@ -531,7 +590,7 @@ static int rna_RenderSettings_threads_get(PointerRNA *ptr)
static int rna_RenderSettings_is_movie_fomat_get(PointerRNA *ptr)
{
RenderData *rd= (RenderData*)ptr->data;
- return BKE_imtype_is_movie(rd->imtype);
+ return BKE_imtype_is_movie(rd->im_format.imtype);
}
static int rna_RenderSettings_save_buffers_get(PointerRNA *ptr)
@@ -550,71 +609,156 @@ static int rna_RenderSettings_full_sample_get(PointerRNA *ptr)
return (rd->scemode & R_FULL_SAMPLE) && !(rd->mode & R_BORDER);
}
-static void rna_RenderSettings_file_format_set(PointerRNA *ptr, int value)
+static void rna_ImageFormatSettings_file_format_set(PointerRNA *ptr, int value)
{
- RenderData *rd= (RenderData*)ptr->data;
+ ImageFormatData *imf= (ImageFormatData *)ptr->data;
+ ID *id= ptr->id.data;
+
+ imf->imtype= value;
+
+ /* ensure depth and color settings match */
+ if (!BKE_imtype_supports_alpha(imf->imtype)) {
+ imf->planes= R_IMF_PLANES_RGB;
+ }
+
+ /* ensure usable depth */
+ {
+ const int depth_ok= BKE_imtype_valid_depths(imf->imtype);
+ if ((imf->depth & depth_ok) == 0) {
+ /* set first available depth */
+ char depth_ls[]= {R_IMF_CHAN_DEPTH_32,
+ R_IMF_CHAN_DEPTH_24,
+ R_IMF_CHAN_DEPTH_16,
+ R_IMF_CHAN_DEPTH_12,
+ R_IMF_CHAN_DEPTH_8,
+ R_IMF_CHAN_DEPTH_1,
+ 0};
+ int i;
+
+ for (i= 0; depth_ls[i]; i++) {
+ if (depth_ok & depth_ls[i]) {
+ imf->depth= depth_ls[i];
+ break;
+ }
+ }
+ }
+ }
- rd->imtype= value;
+ if (id && GS(id->name) == ID_SCE) {
+ Scene *scene= ptr->id.data;
+ RenderData *rd= &scene->r;
#ifdef WITH_FFMPEG
- ffmpeg_verify_image_type(rd);
+ ffmpeg_verify_image_type(rd);
#endif
#ifdef WITH_QUICKTIME
- quicktime_verify_image_type(rd);
+ quicktime_verify_image_type(rd);
#endif
+ (void)rd;
+ }
}
-static int rna_SceneRender_file_ext_length(PointerRNA *ptr)
+static EnumPropertyItem *rna_ImageFormatSettings_file_format_itemf(bContext *C, PointerRNA *ptr,
+ PropertyRNA *UNUSED(prop), int *free)
{
- RenderData *rd= (RenderData*)ptr->data;
- char ext[8];
- ext[0]= '\0';
- BKE_add_image_extension(ext, rd->imtype);
- return strlen(ext);
+ ID *id= ptr->id.data;
+ if (id && GS(id->name) == ID_SCE) {
+ return image_type_items;
+ }
+ else {
+ return image_only_type_items;
+ }
}
-static void rna_SceneRender_file_ext_get(PointerRNA *ptr, char *str)
+static EnumPropertyItem *rna_ImageFormatSettings_color_mode_itemf(bContext *C, PointerRNA *ptr,
+ PropertyRNA *UNUSED(prop), int *free)
{
- RenderData *rd= (RenderData*)ptr->data;
- str[0]= '\0';
- BKE_add_image_extension(str, rd->imtype);
+ ImageFormatData *imf= (ImageFormatData *)ptr->data;
+
+ if ((imf == NULL) || BKE_imtype_supports_alpha(imf->imtype)) {
+ return image_color_mode_items;
+ }
+ else {
+ static EnumPropertyItem color_mode_items[] ={
+ {R_IMF_PLANES_BW, "BW", 0, "BW", "Images get saved in 8 bits grayscale (only PNG, JPEG, TGA, TIF)"},
+ {R_IMF_PLANES_RGB, "RGB", 0, "RGB", "Images are saved with RGB (color) data"},
+ {0, NULL, 0, NULL, NULL}};
+ return color_mode_items;
+ }
}
-void rna_RenderSettings_jpeg2k_preset_update(RenderData *rd)
+static EnumPropertyItem *rna_ImageFormatSettings_color_depth_itemf(bContext *C, PointerRNA *ptr,
+ PropertyRNA *UNUSED(prop), int *free)
{
- rd->subimtype &= ~(R_JPEG2K_12BIT|R_JPEG2K_16BIT | R_JPEG2K_CINE_PRESET|R_JPEG2K_CINE_48FPS);
-
- switch(rd->jp2_depth) {
- case 8: break;
- case 12: rd->subimtype |= R_JPEG2K_12BIT; break;
- case 16: rd->subimtype |= R_JPEG2K_16BIT; break;
+ ImageFormatData *imf= (ImageFormatData *)ptr->data;
+
+ if (imf == NULL) {
+ return image_color_depth_items;
}
-
- switch(rd->jp2_preset) {
- case 1: rd->subimtype |= R_JPEG2K_CINE_PRESET; break;
- case 2: rd->subimtype |= R_JPEG2K_CINE_PRESET|R_JPEG2K_CINE_48FPS; break;
- case 3: rd->subimtype |= R_JPEG2K_CINE_PRESET; break;
- case 4: rd->subimtype |= R_JPEG2K_CINE_PRESET; break;
- case 5: rd->subimtype |= R_JPEG2K_CINE_PRESET|R_JPEG2K_CINE_48FPS; break;
- case 6: rd->subimtype |= R_JPEG2K_CINE_PRESET; break;
- case 7: rd->subimtype |= R_JPEG2K_CINE_PRESET|R_JPEG2K_CINE_48FPS; break;
+ else {
+ const int depth_ok= BKE_imtype_valid_depths(imf->imtype);
+ const int is_float= ELEM3(imf->imtype, R_IMF_IMTYPE_RADHDR, R_IMF_IMTYPE_OPENEXR, R_IMF_IMTYPE_MULTILAYER);
+
+ EnumPropertyItem *item_8bit= &image_color_depth_items[0];
+ EnumPropertyItem *item_12bit= &image_color_depth_items[1];
+ EnumPropertyItem *item_16bit= &image_color_depth_items[2];
+ EnumPropertyItem *item_32bit= &image_color_depth_items[3];
+
+ int totitem= 0;
+ EnumPropertyItem *item= NULL;
+ EnumPropertyItem tmp = {0, "", 0, "", ""};
+
+ if (depth_ok & R_IMF_CHAN_DEPTH_8) {
+ RNA_enum_item_add(&item, &totitem, item_8bit);
+ }
+
+ if (depth_ok & R_IMF_CHAN_DEPTH_12) {
+ RNA_enum_item_add(&item, &totitem, item_12bit);
+ }
+
+ if (depth_ok & R_IMF_CHAN_DEPTH_16) {
+ if (is_float) {
+ tmp= *item_16bit;
+ tmp.name= "Float (Half)";
+ RNA_enum_item_add(&item, &totitem, &tmp);
+ }
+ else {
+ RNA_enum_item_add(&item, &totitem, item_16bit);
+ }
+ }
+
+ if (depth_ok & R_IMF_CHAN_DEPTH_32) {
+ if (is_float) {
+ tmp= *item_32bit;
+ tmp.name= "Float (Full)";
+ RNA_enum_item_add(&item, &totitem, &tmp);
+ }
+ else {
+ RNA_enum_item_add(&item, &totitem, item_32bit);
+ }
+ }
+
+ RNA_enum_item_end(&item, &totitem);
+ *free= 1;
+
+ return item;
}
}
-#ifdef WITH_OPENJPEG
-static void rna_RenderSettings_jpeg2k_preset_set(PointerRNA *ptr, int value)
+static int rna_SceneRender_file_ext_length(PointerRNA *ptr)
{
RenderData *rd= (RenderData*)ptr->data;
- rd->jp2_preset= value;
- rna_RenderSettings_jpeg2k_preset_update(rd);
+ char ext[8];
+ ext[0]= '\0';
+ BKE_add_image_extension(ext, rd->im_format.imtype);
+ return strlen(ext);
}
-static void rna_RenderSettings_jpeg2k_depth_set(PointerRNA *ptr, int value)
+static void rna_SceneRender_file_ext_get(PointerRNA *ptr, char *str)
{
RenderData *rd= (RenderData*)ptr->data;
- rd->jp2_depth= value;
- rna_RenderSettings_jpeg2k_preset_update(rd);
+ str[0]= '\0';
+ BKE_add_image_extension(str, rd->im_format.imtype);
}
-#endif
#ifdef WITH_QUICKTIME
static int rna_RenderSettings_qtcodecsettings_codecType_get(PointerRNA *ptr)
@@ -2248,6 +2392,138 @@ static void rna_def_render_layers(BlenderRNA *brna, PropertyRNA *cprop)
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL);
}
+/* use for render output and image save operator,
+ * note: there are some cases where the members act differently when this is
+ * used from a scene, video formats can only be selected for render output
+ * for example, this is checked by seeing if the ptr->id.data is a Scene id */
+
+static void rna_def_scene_image_format_data(BlenderRNA *brna)
+{
+#ifdef WITH_OPENEXR
+ static EnumPropertyItem exr_codec_items[] = {
+ {R_IMF_EXR_CODEC_NONE, "NONE", 0, "None", ""},
+ {R_IMF_EXR_CODEC_PXR24, "PXR24", 0, "Pxr24 (lossy)", ""},
+ {R_IMF_EXR_CODEC_ZIP, "ZIP", 0, "ZIP (lossless)", ""},
+ {R_IMF_EXR_CODEC_PIZ, "PIZ", 0, "PIZ (lossless)", ""},
+ {R_IMF_EXR_CODEC_RLE, "RLE", 0, "RLE (lossless)", ""},
+ {0, NULL, 0, NULL, NULL}};
+#endif
+
+ StructRNA *srna;
+ PropertyRNA *prop;
+
+ srna= RNA_def_struct(brna, "ImageFormatSettings", NULL);
+ RNA_def_struct_sdna(srna, "ImageFormatData");
+ RNA_def_struct_nested(brna, srna, "Scene");
+ // RNA_def_struct_path_func(srna, "rna_RenderSettings_path"); // no need for the path, its not animated!
+ RNA_def_struct_ui_text(srna, "Image Format", "Settings for image formats");
+
+ prop= RNA_def_property(srna, "file_format", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_sdna(prop, NULL, "imtype");
+ RNA_def_property_enum_items(prop, image_type_items);
+ RNA_def_property_enum_funcs(prop, NULL, "rna_ImageFormatSettings_file_format_set", "rna_ImageFormatSettings_file_format_itemf");
+ RNA_def_property_ui_text(prop, "File Format", "File format to save the rendered images as");
+ RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+
+ prop= RNA_def_property(srna, "color_mode", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_bitflag_sdna(prop, NULL, "planes");
+ RNA_def_property_enum_items(prop, image_color_mode_items);
+ RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_ImageFormatSettings_color_mode_itemf");
+ RNA_def_property_ui_text(prop, "Color Mode",
+ "Choose BW for saving greyscale images, RGB for saving red, green and blue channels, "
+ "and RGBA for saving red, green, blue and alpha channels");
+ RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+
+ prop= RNA_def_property(srna, "color_depth", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_bitflag_sdna(prop, NULL, "depth");
+ RNA_def_property_enum_items(prop, image_color_depth_items);
+ RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_ImageFormatSettings_color_depth_itemf");
+ RNA_def_property_ui_text(prop, "Color Depth", "Bit depth per channel");
+ RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+
+ /* was 'file_quality' */
+ prop= RNA_def_property(srna, "quality", PROP_INT, PROP_PERCENTAGE);
+ RNA_def_property_int_sdna(prop, NULL, "quality");
+ RNA_def_property_range(prop, 0, 100); /* 0 is needed for compression. */
+ RNA_def_property_ui_text(prop, "Quality", "Quality for image formats that support lossy compression");
+ RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+
+ /* was shared with file_quality */
+ prop= RNA_def_property(srna, "compression", PROP_INT, PROP_PERCENTAGE);
+ RNA_def_property_int_sdna(prop, NULL, "compress");
+ RNA_def_property_range(prop, 0, 100); /* 0 is needed for compression. */
+ RNA_def_property_ui_text(prop, "Compression", "Compression level for formats that support lossless compression");
+ RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+
+ /* flag */
+ prop= RNA_def_property(srna, "use_zbuffer", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", R_IMF_FLAG_ZBUF);
+ RNA_def_property_ui_text(prop, "Z Buffer", "Save the z-depth per pixel (32 bit unsigned int z-buffer)Save the z-depth per pixel (32 bit unsigned int z-buffer)");
+ RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+
+ prop= RNA_def_property(srna, "use_preview", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", R_IMF_FLAG_PREVIEW_JPG);
+ RNA_def_property_ui_text(prop, "Preview", "When rendering animations, save JPG preview images in same directory");
+ RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+
+ /* format spesific */
+
+#ifdef WITH_OPENEXR
+ /* OpenEXR */
+
+ prop= RNA_def_property(srna, "exr_codec", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_sdna(prop, NULL, "exr_codec");
+ RNA_def_property_enum_items(prop, exr_codec_items);
+ RNA_def_property_ui_text(prop, "Codec", "Codec settings for OpenEXR");
+ RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+
+#endif
+
+
+#ifdef WITH_OPENJPEG
+ /* Jpeg 2000 */
+ prop= RNA_def_property(srna, "use_jpeg2k_ycc", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "jp2_flag", R_IMF_JP2_FLAG_YCC);
+ RNA_def_property_ui_text(prop, "YCC", "Save luminance-chrominance-chrominance channels instead of RGB colors");
+ RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+
+ prop= RNA_def_property(srna, "use_jpeg2k_cinema_preset", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "jp2_flag", R_IMF_JP2_FLAG_CINE_PRESET);
+ RNA_def_property_ui_text(prop, "Cinema", "Use Openjpeg Cinema Preset");
+ RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+
+ prop= RNA_def_property(srna, "use_jpeg2k_cinema_48", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "jp2_flag", R_IMF_JP2_FLAG_CINE_48);
+ RNA_def_property_ui_text(prop, "Cinema (48)", "Use Openjpeg Cinema Preset (48fps)");
+ RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+#endif
+
+ /* Cineon and DPX */
+
+ prop= RNA_def_property(srna, "use_cineon_log", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "cineon_flag", R_CINEON_LOG);
+ RNA_def_property_ui_text(prop, "Log", "Convert to logarithmic color space");
+ RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+
+ prop= RNA_def_property(srna, "cineon_black", PROP_INT, PROP_NONE);
+ RNA_def_property_int_sdna(prop, NULL, "cineon_black");
+ RNA_def_property_range(prop, 0, 1024);
+ RNA_def_property_ui_text(prop, "B", "Log conversion reference blackpoint");
+ RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+
+ prop= RNA_def_property(srna, "cineon_white", PROP_INT, PROP_NONE);
+ RNA_def_property_int_sdna(prop, NULL, "cineon_white");
+ RNA_def_property_range(prop, 0, 1024);
+ RNA_def_property_ui_text(prop, "W", "Log conversion reference whitepoint");
+ RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+
+ prop= RNA_def_property(srna, "cineon_gamma", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "cineon_gamma");
+ RNA_def_property_range(prop, 0.0f, 10.0f);
+ RNA_def_property_ui_text(prop, "G", "Log conversion gamma");
+ RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+}
+
static void rna_def_scene_render_data(BlenderRNA *brna)
{
StructRNA *srna;
@@ -2338,35 +2614,6 @@ static void rna_def_scene_render_data(BlenderRNA *brna)
{0, "AUTO", 0, "Auto-detect", "Automatically determine the number of threads, based on CPUs"},
{R_FIXED_THREADS, "FIXED", 0, "Fixed", "Manually determine the number of threads"},
{0, NULL, 0, NULL, NULL}};
-
-#ifdef WITH_OPENEXR
- static EnumPropertyItem exr_codec_items[] = {
- {0, "NONE", 0, "None", ""},
- {1, "PXR24", 0, "Pxr24 (lossy)", ""},
- {2, "ZIP", 0, "ZIP (lossless)", ""},
- {3, "PIZ", 0, "PIZ (lossless)", ""},
- {4, "RLE", 0, "RLE (lossless)", ""},
- {0, NULL, 0, NULL, NULL}};
-#endif
-
-#ifdef WITH_OPENJPEG
- static EnumPropertyItem jp2_preset_items[] = {
- {0, "NO_PRESET", 0, "No Preset", ""},
- {1, "CINE_24FPS", 0, "Cinema 24fps 2048x1080", ""},
- {2, "CINE_48FPS", 0, "Cinema 48fps 2048x1080", ""},
- {3, "CINE_24FPS_4K", 0, "Cinema 24fps 4096x2160", ""},
- {4, "CINE_SCOPE_24FPS", 0, "Cine-Scope 24fps 2048x858", ""},
- {5, "CINE_SCOPE_48FPS", 0, "Cine-Scope 48fps 2048x858", ""},
- {6, "CINE_FLAT_24FPS", 0, "Cine-Flat 24fps 1998x1080", ""},
- {7, "CINE_FLAT_48FPS", 0, "Cine-Flat 48fps 1998x1080", ""},
- {0, NULL, 0, NULL, NULL}};
-
- static EnumPropertyItem jp2_depth_items[] = {
- {8, "8", 0, "8", "8 bit color channels"},
- {12, "12", 0, "12", "12 bit color channels"},
- {16, "16", 0, "16", "16 bit color channels"},
- {0, NULL, 0, NULL, NULL}};
-#endif
#ifdef WITH_QUICKTIME
static EnumPropertyItem quicktime_codec_type_items[] = {
@@ -2462,7 +2709,9 @@ static void rna_def_scene_render_data(BlenderRNA *brna)
RNA_def_struct_nested(brna, srna, "Scene");
RNA_def_struct_path_func(srna, "rna_RenderSettings_path");
RNA_def_struct_ui_text(srna, "Render Data", "Rendering settings for a Scene datablock");
-
+
+#if 0 /* moved */
+
prop= RNA_def_property(srna, "color_mode", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_bitflag_sdna(prop, NULL, "planes");
RNA_def_property_enum_items(prop, image_color_mode_items);
@@ -2471,6 +2720,15 @@ static void rna_def_scene_render_data(BlenderRNA *brna)
"and RGBA for saving red, green, blue and alpha channels");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+#endif
+
+ /* Render Data */
+ prop= RNA_def_property(srna, "image_settings", PROP_POINTER, PROP_NONE);
+ RNA_def_property_flag(prop, PROP_NEVER_NULL);
+ RNA_def_property_pointer_sdna(prop, NULL, "im_format");
+ RNA_def_property_struct_type(prop, "ImageFormatSettings");
+ RNA_def_property_ui_text(prop, "Image Format", "");
+
prop= RNA_def_property(srna, "resolution_x", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "xsch");
RNA_def_property_range(prop, 4, 10000);
@@ -2515,90 +2773,23 @@ static void rna_def_scene_render_data(BlenderRNA *brna)
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, "rna_SceneCamera_update");
/* JPEG and AVI JPEG */
-
+
+#if 0 /* moved */
+
prop= RNA_def_property(srna, "file_quality", PROP_INT, PROP_PERCENTAGE);
RNA_def_property_int_sdna(prop, NULL, "quality");
RNA_def_property_range(prop, 0, 100); /* 0 is needed for compression. */
RNA_def_property_ui_text(prop, "Quality", "Quality of JPEG images, AVI Jpeg and SGI movies, compression for PNG's");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
-
- /* Tiff */
-
- prop= RNA_def_property(srna, "use_tiff_16bit", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "subimtype", R_TIFF_16BIT);
- RNA_def_property_ui_text(prop, "16 Bit", "Save TIFF with 16 bits per channel");
- RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
-
- /* Cineon and DPX */
-
- prop= RNA_def_property(srna, "use_cineon_log", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "subimtype", R_CINEON_LOG);
- RNA_def_property_ui_text(prop, "Log", "Convert to logarithmic color space");
- RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
-
- prop= RNA_def_property(srna, "cineon_black", PROP_INT, PROP_NONE);
- RNA_def_property_int_sdna(prop, NULL, "cineonblack");
- RNA_def_property_range(prop, 0, 1024);
- RNA_def_property_ui_text(prop, "B", "Log conversion reference blackpoint");
- RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
-
- prop= RNA_def_property(srna, "cineon_white", PROP_INT, PROP_NONE);
- RNA_def_property_int_sdna(prop, NULL, "cineonwhite");
- RNA_def_property_range(prop, 0, 1024);
- RNA_def_property_ui_text(prop, "W", "Log conversion reference whitepoint");
- RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
-
- prop= RNA_def_property(srna, "cineon_gamma", PROP_FLOAT, PROP_NONE);
- RNA_def_property_float_sdna(prop, NULL, "cineongamma");
- RNA_def_property_range(prop, 0.0f, 10.0f);
- RNA_def_property_ui_text(prop, "G", "Log conversion gamma");
- RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
-
-#ifdef WITH_OPENEXR
- /* OpenEXR */
- prop= RNA_def_property(srna, "exr_codec", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_bitflag_sdna(prop, NULL, "quality");
- RNA_def_property_enum_items(prop, exr_codec_items);
- RNA_def_property_ui_text(prop, "Codec", "Codec settings for OpenEXR");
- RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
-
- prop= RNA_def_property(srna, "use_exr_half", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "subimtype", R_OPENEXR_HALF);
- RNA_def_property_ui_text(prop, "Half", "Use 16 bit floats instead of 32 bit floats per channel");
- RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
-
- prop= RNA_def_property(srna, "exr_zbuf", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "subimtype", R_OPENEXR_ZBUF);
- RNA_def_property_ui_text(prop, "Zbuf", "Save the z-depth per pixel (32 bit unsigned int z-buffer)");
- RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
-
- prop= RNA_def_property(srna, "exr_preview", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "subimtype", R_PREVIEW_JPG);
- RNA_def_property_ui_text(prop, "Preview", "When rendering animations, save JPG preview images in same directory");
- RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
#endif
-#ifdef WITH_OPENJPEG
- /* Jpeg 2000 */
-
- prop= RNA_def_property(srna, "jpeg2k_preset", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_sdna(prop, NULL, "jp2_preset");
- RNA_def_property_enum_items(prop, jp2_preset_items);
- RNA_def_property_enum_funcs(prop, NULL, "rna_RenderSettings_jpeg2k_preset_set", NULL);
- RNA_def_property_ui_text(prop, "Preset", "Use a DCI Standard preset for saving jpeg2000");
- RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
-
- prop= RNA_def_property(srna, "jpeg2k_depth", PROP_ENUM, PROP_NONE);
- RNA_def_property_enum_bitflag_sdna(prop, NULL, "jp2_depth");
- RNA_def_property_enum_items(prop, jp2_depth_items);
- RNA_def_property_enum_funcs(prop, NULL, "rna_RenderSettings_jpeg2k_depth_set", NULL);
- RNA_def_property_ui_text(prop, "Depth", "Bit depth per channel");
- RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+ /* Tiff */
- prop= RNA_def_property(srna, "jpeg2k_ycc", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "subimtype", R_JPEG2K_YCC);
- RNA_def_property_ui_text(prop, "YCC", "Save luminance-chrominance-chrominance channels instead of RGB colors");
+#if 0 /* replaced, use generic */
+ prop= def_property(srna, "use_tiff_16bit", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "subimtype", R_TIFF_16BIT);
+ RNA_def_property_ui_text(prop, "16 Bit", "Save TIFF with 16 bits per channel");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
#endif
@@ -3023,13 +3214,15 @@ static void rna_def_scene_render_data(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "File Extensions",
"Add the file format extensions to the rendered file name (eg: filename + .jpg)");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
-
+
+#if 0 /* moved */
prop= RNA_def_property(srna, "file_format", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "imtype");
RNA_def_property_enum_items(prop, image_type_items);
RNA_def_property_enum_funcs(prop, NULL, "rna_RenderSettings_file_format_set", NULL);
RNA_def_property_ui_text(prop, "File Format", "File format to save the rendered images as");
RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL);
+#endif
prop= RNA_def_property(srna, "file_extension", PROP_STRING, PROP_NONE);
RNA_def_property_string_funcs(prop, "rna_SceneRender_file_ext_get", "rna_SceneRender_file_ext_length", NULL);
@@ -3810,6 +4003,7 @@ void RNA_def_scene(BlenderRNA *brna)
/* Nestled Data */
rna_def_tool_settings(brna);
rna_def_unit_settings(brna);
+ rna_def_scene_image_format_data(brna);
rna_def_scene_render_data(brna);
rna_def_scene_game_data(brna);
rna_def_scene_render_layer(brna);
diff --git a/source/blender/makesrna/intern/rna_scene_api.c b/source/blender/makesrna/intern/rna_scene_api.c
index 6816903090d..9d0149726c3 100644
--- a/source/blender/makesrna/intern/rna_scene_api.c
+++ b/source/blender/makesrna/intern/rna_scene_api.c
@@ -74,10 +74,10 @@ static void rna_Scene_update_tagged(Scene *scene)
static void rna_SceneRender_get_frame_path(RenderData *rd, int frame, char *name)
{
- if(BKE_imtype_is_movie(rd->imtype))
+ if(BKE_imtype_is_movie(rd->im_format.imtype))
BKE_makeanimstring(name, rd);
else
- BKE_makepicstring(name, rd->pic, G.main->name, (frame==INT_MIN) ? rd->cfra : frame, rd->imtype, rd->scemode & R_EXTENSION, TRUE);
+ BKE_makepicstring(name, rd->pic, G.main->name, (frame==INT_MIN) ? rd->cfra : frame, rd->im_format.imtype, rd->scemode & R_EXTENSION, TRUE);
}
#ifdef WITH_COLLADA
diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c
index a33622cf8a1..9f6f0bb7802 100644
--- a/source/blender/makesrna/intern/rna_space.c
+++ b/source/blender/makesrna/intern/rna_space.c
@@ -1612,9 +1612,9 @@ static void rna_def_space_view3d(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Show Camera Path", "Show reconstructed camera path");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
- prop= RNA_def_property(srna, "show_tracks_name", PROP_BOOLEAN, PROP_NONE);
+ prop= RNA_def_property(srna, "show_bundle_names", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag2", V3D_SHOW_BUNDLENAME);
- RNA_def_property_ui_text(prop, "Show Track Names", "Show names for tracks objects");
+ RNA_def_property_ui_text(prop, "Show 3D Marker Names", "Show names for reconstructed tracks objects");
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_VIEW3D, NULL);
/* region */
@@ -2915,7 +2915,7 @@ static void rna_def_space_clip(BlenderRNA *brna)
/* show bundles */
prop= RNA_def_property(srna, "show_bundles", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_ui_text(prop, "Show Bundles", "Show projection of bundles into footage");
+ RNA_def_property_ui_text(prop, "Show Bundles", "Show projection of 3D markers into footage");
RNA_def_property_boolean_sdna(prop, NULL, "flag", SC_SHOW_BUNDLES);
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_CLIP, NULL);
diff --git a/source/blender/makesrna/intern/rna_texture_api.c b/source/blender/makesrna/intern/rna_texture_api.c
index f1a6bb1b921..88ea78cd0da 100644
--- a/source/blender/makesrna/intern/rna_texture_api.c
+++ b/source/blender/makesrna/intern/rna_texture_api.c
@@ -49,7 +49,7 @@ void save_envmap(struct EnvMap *env, bContext *C, ReportList *reports, const cha
scene = CTX_data_scene(C);
}
- RE_WriteEnvmapResult(reports, scene, env, filepath, scene->r.imtype, layout);
+ RE_WriteEnvmapResult(reports, scene, env, filepath, scene->r.im_format.imtype, layout);
}
void clear_envmap(struct EnvMap *env, bContext *C)
diff --git a/source/blender/makesrna/intern/rna_ui_api.c b/source/blender/makesrna/intern/rna_ui_api.c
index e52a0f830dc..d0f25fcb60c 100644
--- a/source/blender/makesrna/intern/rna_ui_api.c
+++ b/source/blender/makesrna/intern/rna_ui_api.c
@@ -397,6 +397,14 @@ void RNA_api_ui_layout(StructRNA *srna)
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_RNAPTR|PROP_NEVER_NULL);
RNA_def_boolean(func, "compact", 0, "", "Use more compact layout");
+ func= RNA_def_function(srna, "template_image_settings", "uiTemplateImageSettings");
+ RNA_def_function_ui_description(func, "User interface for setting image format options");
+ // RNA_def_function_flag(func, FUNC_USE_CONTEXT);
+ // api_ui_item_rna_common(func);
+ parm= RNA_def_pointer(func, "image_settings", "ImageFormatSettings", "", "");
+ RNA_def_property_flag(parm, PROP_REQUIRED|PROP_RNAPTR|PROP_NEVER_NULL);
+ // RNA_def_boolean(func, "compact", 0, "", "Use more compact layout");
+
func= RNA_def_function(srna, "template_movieclip", "uiTemplateMovieClip");
RNA_def_function_ui_description(func, "Item(s). User interface for selecting movie clips and their source paths");
RNA_def_function_flag(func, FUNC_USE_CONTEXT);
diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c
index 34ee95c2962..f7ad47b4ad9 100644
--- a/source/blender/makesrna/intern/rna_userdef.c
+++ b/source/blender/makesrna/intern/rna_userdef.c
@@ -2636,7 +2636,7 @@ static void rna_def_userdef_system(BlenderRNA *brna)
{22, "BULGARIAN", 0, "Bulgarian (Български)", "bg_BG"},
{23, "GREEK", 0, "Greek (Ελληνικά)", "el_GR"},
{24, "KOREAN", 0, "Korean (한국 언어)", "ko_KR"},
- /*{25, "NEPALI", 0, "Nepali (नेपाली)", "ne_NP"},*/
+ {25, "NEPALI", 0, "Nepali (नेपाली)", "ne_NP"},
/* using the utf8 flipped form of Persian (فارسی) */
{26, "PERSIAN", 0, "Persian (ﯽﺳﺭﺎﻓ)", "fa_PE"},
{27, "INDONESIAN", 0, "Indonesian (Bahasa indonesia)", "id_ID"},
diff --git a/source/blender/modifiers/intern/MOD_fluidsim_util.c b/source/blender/modifiers/intern/MOD_fluidsim_util.c
index fa699e449db..16de49a8c9d 100644
--- a/source/blender/modifiers/intern/MOD_fluidsim_util.c
+++ b/source/blender/modifiers/intern/MOD_fluidsim_util.c
@@ -102,7 +102,7 @@ void fluidsim_init(FluidsimModifierData *fluidmd)
// fluid/inflow settings
// fss->iniVel --> automatically set to 0
- modifier_path_init(fss->surfdataPath, sizeof(fss->surfdataPath), "fluid_cache");
+ modifier_path_init(fss->surfdataPath, sizeof(fss->surfdataPath), "cache_fluid");
// first init of bounding box
// no bounding box needed
diff --git a/source/blender/modifiers/intern/MOD_ocean.c b/source/blender/modifiers/intern/MOD_ocean.c
index d5c36f25a32..9377fdc115d 100644
--- a/source/blender/modifiers/intern/MOD_ocean.c
+++ b/source/blender/modifiers/intern/MOD_ocean.c
@@ -127,7 +127,7 @@ static void initData(ModifierData *md)
omd->repeat_x = 1;
omd->repeat_y = 1;
- modifier_path_init(omd->cachepath, sizeof(omd->cachepath), "ocean_cache");
+ modifier_path_init(omd->cachepath, sizeof(omd->cachepath), "cache_ocean");
omd->cached = 0;
omd->bakestart = 1;
@@ -277,6 +277,7 @@ static DerivedMesh *generate_ocean_geometry(OceanModifierData *omd)
MVert *mv;
MFace *mf;
MTFace *tf;
+ int *origindex;
int cdlayer;
@@ -305,6 +306,7 @@ static DerivedMesh *generate_ocean_geometry(OceanModifierData *omd)
mv = CDDM_get_verts(result);
mf = CDDM_get_faces(result);
+ origindex= result->getFaceDataArray(result, CD_ORIGINDEX);
/* create vertices */
#pragma omp parallel for private(x, y) if (rx > OMP_MIN_RES)
@@ -329,6 +331,9 @@ static DerivedMesh *generate_ocean_geometry(OceanModifierData *omd)
mf[fi].v4 = vi + res_x+1;
mf[fi].flag |= ME_SMOOTH;
+
+ /* generated geometry does not map to original faces */
+ origindex[fi] = ORIGINDEX_NONE;
}
}
diff --git a/source/blender/nodes/NOD_composite.h b/source/blender/nodes/NOD_composite.h
index 6deea004417..b74342ab516 100644
--- a/source/blender/nodes/NOD_composite.h
+++ b/source/blender/nodes/NOD_composite.h
@@ -42,84 +42,84 @@ extern bNodeTreeType ntreeType_Composite;
/* ****************** types array for all composite nodes ****************** */
-void register_node_type_cmp_group(ListBase *lb);
-void register_node_type_cmp_forloop(ListBase *lb);
-void register_node_type_cmp_whileloop(ListBase *lb);
-
-void register_node_type_cmp_rlayers(ListBase *lb);
-void register_node_type_cmp_image(ListBase *lb);
-void register_node_type_cmp_texture(ListBase *lb);
-void register_node_type_cmp_value(ListBase *lb);
-void register_node_type_cmp_rgb(ListBase *lb);
-void register_node_type_cmp_curve_time(ListBase *lb);
-void register_node_type_cmp_movieclip(ListBase *lb);
-
-void register_node_type_cmp_composite(ListBase *lb);
-void register_node_type_cmp_viewer(ListBase *lb);
-void register_node_type_cmp_splitviewer(ListBase *lb);
-void register_node_type_cmp_output_file(ListBase *lb);
-void register_node_type_cmp_view_levels(ListBase *lb);
-
-void register_node_type_cmp_curve_rgb(ListBase *lb);
-void register_node_type_cmp_mix_rgb(ListBase *lb);
-void register_node_type_cmp_hue_sat(ListBase *lb);
-void register_node_type_cmp_brightcontrast(ListBase *lb);
-void register_node_type_cmp_gamma(ListBase *lb);
-void register_node_type_cmp_invert(ListBase *lb);
-void register_node_type_cmp_alphaover(ListBase *lb);
-void register_node_type_cmp_zcombine(ListBase *lb);
-void register_node_type_cmp_colorbalance(ListBase *lb);
-void register_node_type_cmp_huecorrect(ListBase *lb);
-
-void register_node_type_cmp_normal(ListBase *lb);
-void register_node_type_cmp_curve_vec(ListBase *lb);
-void register_node_type_cmp_map_value(ListBase *lb);
-void register_node_type_cmp_normalize(ListBase *lb);
-
-void register_node_type_cmp_filter(ListBase *lb);
-void register_node_type_cmp_blur(ListBase *lb);
-void register_node_type_cmp_dblur(ListBase *lb);
-void register_node_type_cmp_bilateralblur(ListBase *lb);
-void register_node_type_cmp_vecblur(ListBase *lb);
-void register_node_type_cmp_dilateerode(ListBase *lb);
-void register_node_type_cmp_defocus(ListBase *lb);
-
-void register_node_type_cmp_valtorgb(ListBase *lb);
-void register_node_type_cmp_rgbtobw(ListBase *lb);
-void register_node_type_cmp_setalpha(ListBase *lb);
-void register_node_type_cmp_idmask(ListBase *lb);
-void register_node_type_cmp_math(ListBase *lb);
-void register_node_type_cmp_seprgba(ListBase *lb);
-void register_node_type_cmp_combrgba(ListBase *lb);
-void register_node_type_cmp_sephsva(ListBase *lb);
-void register_node_type_cmp_combhsva(ListBase *lb);
-void register_node_type_cmp_sepyuva(ListBase *lb);
-void register_node_type_cmp_combyuva(ListBase *lb);
-void register_node_type_cmp_sepycca(ListBase *lb);
-void register_node_type_cmp_combycca(ListBase *lb);
-void register_node_type_cmp_premulkey(ListBase *lb);
-
-void register_node_type_cmp_diff_matte(ListBase *lb);
-void register_node_type_cmp_distance_matte(ListBase *lb);
-void register_node_type_cmp_chroma_matte(ListBase *lb);
-void register_node_type_cmp_color_matte(ListBase *lb);
-void register_node_type_cmp_channel_matte(ListBase *lb);
-void register_node_type_cmp_color_spill(ListBase *lb);
-void register_node_type_cmp_luma_matte(ListBase *lb);
-
-void register_node_type_cmp_translate(ListBase *lb);
-void register_node_type_cmp_rotate(ListBase *lb);
-void register_node_type_cmp_scale(ListBase *lb);
-void register_node_type_cmp_flip(ListBase *lb);
-void register_node_type_cmp_crop(ListBase *lb);
-void register_node_type_cmp_displace(ListBase *lb);
-void register_node_type_cmp_mapuv(ListBase *lb);
-void register_node_type_cmp_transform(ListBase *lb);
-void register_node_type_cmp_stabilize2d(ListBase *lb);
-void register_node_type_cmp_moviedistortion(ListBase *lb);
-
-void register_node_type_cmp_glare(ListBase *lb);
-void register_node_type_cmp_tonemap(ListBase *lb);
-void register_node_type_cmp_lensdist(ListBase *lb);
+void register_node_type_cmp_group(struct bNodeTreeType *ttype);
+void register_node_type_cmp_forloop(struct bNodeTreeType *ttype);
+void register_node_type_cmp_whileloop(struct bNodeTreeType *ttype);
+
+void register_node_type_cmp_rlayers(struct bNodeTreeType *ttype);
+void register_node_type_cmp_image(struct bNodeTreeType *ttype);
+void register_node_type_cmp_texture(struct bNodeTreeType *ttype);
+void register_node_type_cmp_value(struct bNodeTreeType *ttype);
+void register_node_type_cmp_rgb(struct bNodeTreeType *ttype);
+void register_node_type_cmp_curve_time(struct bNodeTreeType *ttype);
+void register_node_type_cmp_movieclip(struct bNodeTreeType *ttype);
+
+void register_node_type_cmp_composite(struct bNodeTreeType *ttype);
+void register_node_type_cmp_viewer(struct bNodeTreeType *ttype);
+void register_node_type_cmp_splitviewer(struct bNodeTreeType *ttype);
+void register_node_type_cmp_output_file(struct bNodeTreeType *ttype);
+void register_node_type_cmp_view_levels(struct bNodeTreeType *ttype);
+
+void register_node_type_cmp_curve_rgb(struct bNodeTreeType *ttype);
+void register_node_type_cmp_mix_rgb(struct bNodeTreeType *ttype);
+void register_node_type_cmp_hue_sat(struct bNodeTreeType *ttype);
+void register_node_type_cmp_brightcontrast(struct bNodeTreeType *ttype);
+void register_node_type_cmp_gamma(struct bNodeTreeType *ttype);
+void register_node_type_cmp_invert(struct bNodeTreeType *ttype);
+void register_node_type_cmp_alphaover(struct bNodeTreeType *ttype);
+void register_node_type_cmp_zcombine(struct bNodeTreeType *ttype);
+void register_node_type_cmp_colorbalance(struct bNodeTreeType *ttype);
+void register_node_type_cmp_huecorrect(struct bNodeTreeType *ttype);
+
+void register_node_type_cmp_normal(struct bNodeTreeType *ttype);
+void register_node_type_cmp_curve_vec(struct bNodeTreeType *ttype);
+void register_node_type_cmp_map_value(struct bNodeTreeType *ttype);
+void register_node_type_cmp_normalize(struct bNodeTreeType *ttype);
+
+void register_node_type_cmp_filter(struct bNodeTreeType *ttype);
+void register_node_type_cmp_blur(struct bNodeTreeType *ttype);
+void register_node_type_cmp_dblur(struct bNodeTreeType *ttype);
+void register_node_type_cmp_bilateralblur(struct bNodeTreeType *ttype);
+void register_node_type_cmp_vecblur(struct bNodeTreeType *ttype);
+void register_node_type_cmp_dilateerode(struct bNodeTreeType *ttype);
+void register_node_type_cmp_defocus(struct bNodeTreeType *ttype);
+
+void register_node_type_cmp_valtorgb(struct bNodeTreeType *ttype);
+void register_node_type_cmp_rgbtobw(struct bNodeTreeType *ttype);
+void register_node_type_cmp_setalpha(struct bNodeTreeType *ttype);
+void register_node_type_cmp_idmask(struct bNodeTreeType *ttype);
+void register_node_type_cmp_math(struct bNodeTreeType *ttype);
+void register_node_type_cmp_seprgba(struct bNodeTreeType *ttype);
+void register_node_type_cmp_combrgba(struct bNodeTreeType *ttype);
+void register_node_type_cmp_sephsva(struct bNodeTreeType *ttype);
+void register_node_type_cmp_combhsva(struct bNodeTreeType *ttype);
+void register_node_type_cmp_sepyuva(struct bNodeTreeType *ttype);
+void register_node_type_cmp_combyuva(struct bNodeTreeType *ttype);
+void register_node_type_cmp_sepycca(struct bNodeTreeType *ttype);
+void register_node_type_cmp_combycca(struct bNodeTreeType *ttype);
+void register_node_type_cmp_premulkey(struct bNodeTreeType *ttype);
+
+void register_node_type_cmp_diff_matte(struct bNodeTreeType *ttype);
+void register_node_type_cmp_distance_matte(struct bNodeTreeType *ttype);
+void register_node_type_cmp_chroma_matte(struct bNodeTreeType *ttype);
+void register_node_type_cmp_color_matte(struct bNodeTreeType *ttype);
+void register_node_type_cmp_channel_matte(struct bNodeTreeType *ttype);
+void register_node_type_cmp_color_spill(struct bNodeTreeType *ttype);
+void register_node_type_cmp_luma_matte(struct bNodeTreeType *ttype);
+
+void register_node_type_cmp_translate(struct bNodeTreeType *ttype);
+void register_node_type_cmp_rotate(struct bNodeTreeType *ttype);
+void register_node_type_cmp_scale(struct bNodeTreeType *ttype);
+void register_node_type_cmp_flip(struct bNodeTreeType *ttype);
+void register_node_type_cmp_crop(struct bNodeTreeType *ttype);
+void register_node_type_cmp_displace(struct bNodeTreeType *ttype);
+void register_node_type_cmp_mapuv(struct bNodeTreeType *ttype);
+void register_node_type_cmp_transform(struct bNodeTreeType *ttype);
+void register_node_type_cmp_stabilize2d(struct bNodeTreeType *ttype);
+void register_node_type_cmp_moviedistortion(struct bNodeTreeType *ttype);
+
+void register_node_type_cmp_glare(struct bNodeTreeType *ttype);
+void register_node_type_cmp_tonemap(struct bNodeTreeType *ttype);
+void register_node_type_cmp_lensdist(struct bNodeTreeType *ttype);
#endif
diff --git a/source/blender/nodes/NOD_shader.h b/source/blender/nodes/NOD_shader.h
index 996660fcb8b..293ce466574 100644
--- a/source/blender/nodes/NOD_shader.h
+++ b/source/blender/nodes/NOD_shader.h
@@ -43,68 +43,68 @@ extern struct bNodeTreeType ntreeType_Shader;
/* the type definitions array */
/* ****************** types array for all shaders ****************** */
-void register_node_type_sh_group(ListBase *lb);
-void register_node_type_sh_forloop(ListBase *lb);
-void register_node_type_sh_whileloop(ListBase *lb);
+void register_node_type_sh_group(struct bNodeTreeType *ttype);
+void register_node_type_sh_forloop(struct bNodeTreeType *ttype);
+void register_node_type_sh_whileloop(struct bNodeTreeType *ttype);
-void register_node_type_sh_output(ListBase *lb);
-void register_node_type_sh_material(ListBase *lb);
-void register_node_type_sh_camera(ListBase *lb);
-void register_node_type_sh_value(ListBase *lb);
-void register_node_type_sh_rgb(ListBase *lb);
-void register_node_type_sh_mix_rgb(ListBase *lb);
-void register_node_type_sh_valtorgb(ListBase *lb);
-void register_node_type_sh_rgbtobw(ListBase *lb);
-void register_node_type_sh_texture(ListBase *lb);
-void register_node_type_sh_normal(ListBase *lb);
-void register_node_type_sh_geom(ListBase *lb);
-void register_node_type_sh_mapping(ListBase *lb);
-void register_node_type_sh_curve_vec(ListBase *lb);
-void register_node_type_sh_curve_rgb(ListBase *lb);
-void register_node_type_sh_math(ListBase *lb);
-void register_node_type_sh_vect_math(ListBase *lb);
-void register_node_type_sh_squeeze(ListBase *lb);
-void register_node_type_sh_dynamic(ListBase *lb);
-void register_node_type_sh_material_ext(ListBase *lb);
-void register_node_type_sh_invert(ListBase *lb);
-void register_node_type_sh_seprgb(ListBase *lb);
-void register_node_type_sh_combrgb(ListBase *lb);
-void register_node_type_sh_hue_sat(ListBase *lb);
+void register_node_type_sh_output(struct bNodeTreeType *ttype);
+void register_node_type_sh_material(struct bNodeTreeType *ttype);
+void register_node_type_sh_camera(struct bNodeTreeType *ttype);
+void register_node_type_sh_value(struct bNodeTreeType *ttype);
+void register_node_type_sh_rgb(struct bNodeTreeType *ttype);
+void register_node_type_sh_mix_rgb(struct bNodeTreeType *ttype);
+void register_node_type_sh_valtorgb(struct bNodeTreeType *ttype);
+void register_node_type_sh_rgbtobw(struct bNodeTreeType *ttype);
+void register_node_type_sh_texture(struct bNodeTreeType *ttype);
+void register_node_type_sh_normal(struct bNodeTreeType *ttype);
+void register_node_type_sh_geom(struct bNodeTreeType *ttype);
+void register_node_type_sh_mapping(struct bNodeTreeType *ttype);
+void register_node_type_sh_curve_vec(struct bNodeTreeType *ttype);
+void register_node_type_sh_curve_rgb(struct bNodeTreeType *ttype);
+void register_node_type_sh_math(struct bNodeTreeType *ttype);
+void register_node_type_sh_vect_math(struct bNodeTreeType *ttype);
+void register_node_type_sh_squeeze(struct bNodeTreeType *ttype);
+void register_node_type_sh_dynamic(struct bNodeTreeType *ttype);
+void register_node_type_sh_material_ext(struct bNodeTreeType *ttype);
+void register_node_type_sh_invert(struct bNodeTreeType *ttype);
+void register_node_type_sh_seprgb(struct bNodeTreeType *ttype);
+void register_node_type_sh_combrgb(struct bNodeTreeType *ttype);
+void register_node_type_sh_hue_sat(struct bNodeTreeType *ttype);
-void register_node_type_sh_attribute(ListBase *lb);
-void register_node_type_sh_geometry(ListBase *lb);
-void register_node_type_sh_light_path(ListBase *lb);
-void register_node_type_sh_fresnel(ListBase *lb);
-void register_node_type_sh_layer_weight(ListBase *lb);
-void register_node_type_sh_tex_coord(ListBase *lb);
+void register_node_type_sh_attribute(struct bNodeTreeType *ttype);
+void register_node_type_sh_geometry(struct bNodeTreeType *ttype);
+void register_node_type_sh_light_path(struct bNodeTreeType *ttype);
+void register_node_type_sh_fresnel(struct bNodeTreeType *ttype);
+void register_node_type_sh_layer_weight(struct bNodeTreeType *ttype);
+void register_node_type_sh_tex_coord(struct bNodeTreeType *ttype);
-void register_node_type_sh_background(ListBase *lb);
-void register_node_type_sh_bsdf_diffuse(ListBase *lb);
-void register_node_type_sh_bsdf_glossy(ListBase *lb);
-void register_node_type_sh_bsdf_glass(ListBase *lb);
-void register_node_type_sh_bsdf_translucent(ListBase *lb);
-void register_node_type_sh_bsdf_transparent(ListBase *lb);
-void register_node_type_sh_bsdf_velvet(ListBase *lb);
-void register_node_type_sh_emission(ListBase *lb);
-void register_node_type_sh_holdout(ListBase *lb);
-void register_node_type_sh_volume_transparent(ListBase *lb);
-void register_node_type_sh_volume_isotropic(ListBase *lb);
-void register_node_type_sh_mix_shader(ListBase *lb);
-void register_node_type_sh_add_shader(ListBase *lb);
+void register_node_type_sh_background(struct bNodeTreeType *ttype);
+void register_node_type_sh_bsdf_diffuse(struct bNodeTreeType *ttype);
+void register_node_type_sh_bsdf_glossy(struct bNodeTreeType *ttype);
+void register_node_type_sh_bsdf_glass(struct bNodeTreeType *ttype);
+void register_node_type_sh_bsdf_translucent(struct bNodeTreeType *ttype);
+void register_node_type_sh_bsdf_transparent(struct bNodeTreeType *ttype);
+void register_node_type_sh_bsdf_velvet(struct bNodeTreeType *ttype);
+void register_node_type_sh_emission(struct bNodeTreeType *ttype);
+void register_node_type_sh_holdout(struct bNodeTreeType *ttype);
+void register_node_type_sh_volume_transparent(struct bNodeTreeType *ttype);
+void register_node_type_sh_volume_isotropic(struct bNodeTreeType *ttype);
+void register_node_type_sh_mix_shader(struct bNodeTreeType *ttype);
+void register_node_type_sh_add_shader(struct bNodeTreeType *ttype);
-void register_node_type_sh_output_lamp(ListBase *lb);
-void register_node_type_sh_output_material(ListBase *lb);
-void register_node_type_sh_output_world(ListBase *lb);
+void register_node_type_sh_output_lamp(struct bNodeTreeType *ttype);
+void register_node_type_sh_output_material(struct bNodeTreeType *ttype);
+void register_node_type_sh_output_world(struct bNodeTreeType *ttype);
-void register_node_type_sh_tex_image(ListBase *lb);
-void register_node_type_sh_tex_environment(ListBase *lb);
-void register_node_type_sh_tex_sky(ListBase *lb);
-void register_node_type_sh_tex_voronoi(ListBase *lb);
-void register_node_type_sh_tex_gradient(ListBase *lb);
-void register_node_type_sh_tex_magic(ListBase *lb);
-void register_node_type_sh_tex_wave(ListBase *lb);
-void register_node_type_sh_tex_musgrave(ListBase *lb);
-void register_node_type_sh_tex_noise(ListBase *lb);
+void register_node_type_sh_tex_image(struct bNodeTreeType *ttype);
+void register_node_type_sh_tex_environment(struct bNodeTreeType *ttype);
+void register_node_type_sh_tex_sky(struct bNodeTreeType *ttype);
+void register_node_type_sh_tex_voronoi(struct bNodeTreeType *ttype);
+void register_node_type_sh_tex_gradient(struct bNodeTreeType *ttype);
+void register_node_type_sh_tex_magic(struct bNodeTreeType *ttype);
+void register_node_type_sh_tex_wave(struct bNodeTreeType *ttype);
+void register_node_type_sh_tex_musgrave(struct bNodeTreeType *ttype);
+void register_node_type_sh_tex_noise(struct bNodeTreeType *ttype);
#endif
diff --git a/source/blender/nodes/NOD_texture.h b/source/blender/nodes/NOD_texture.h
index b07c0b22b75..b3fdbf0e250 100644
--- a/source/blender/nodes/NOD_texture.h
+++ b/source/blender/nodes/NOD_texture.h
@@ -42,45 +42,45 @@ extern bNodeTreeType ntreeType_Texture;
/* ****************** types array for all texture nodes ****************** */
-void register_node_type_tex_group(ListBase *lb);
-void register_node_type_tex_forloop(ListBase *lb);
-void register_node_type_tex_whileloop(ListBase *lb);
+void register_node_type_tex_group(struct bNodeTreeType *ttype);
+void register_node_type_tex_forloop(struct bNodeTreeType *ttype);
+void register_node_type_tex_whileloop(struct bNodeTreeType *ttype);
-void register_node_type_tex_math(ListBase *lb);
-void register_node_type_tex_mix_rgb(ListBase *lb);
-void register_node_type_tex_valtorgb(ListBase *lb);
-void register_node_type_tex_valtonor(ListBase *lb);
-void register_node_type_tex_rgbtobw(ListBase *lb);
-void register_node_type_tex_output(ListBase *lb);
-void register_node_type_tex_viewer(ListBase *lb);
-void register_node_type_tex_checker(ListBase *lb);
-void register_node_type_tex_texture(ListBase *lb);
-void register_node_type_tex_bricks(ListBase *lb);
-void register_node_type_tex_image(ListBase *lb);
-void register_node_type_tex_curve_rgb(ListBase *lb);
-void register_node_type_tex_curve_time(ListBase *lb);
-void register_node_type_tex_invert(ListBase *lb);
-void register_node_type_tex_hue_sat(ListBase *lb);
-void register_node_type_tex_coord(ListBase *lb);
-void register_node_type_tex_distance(ListBase *lb);
+void register_node_type_tex_math(struct bNodeTreeType *ttype);
+void register_node_type_tex_mix_rgb(struct bNodeTreeType *ttype);
+void register_node_type_tex_valtorgb(struct bNodeTreeType *ttype);
+void register_node_type_tex_valtonor(struct bNodeTreeType *ttype);
+void register_node_type_tex_rgbtobw(struct bNodeTreeType *ttype);
+void register_node_type_tex_output(struct bNodeTreeType *ttype);
+void register_node_type_tex_viewer(struct bNodeTreeType *ttype);
+void register_node_type_tex_checker(struct bNodeTreeType *ttype);
+void register_node_type_tex_texture(struct bNodeTreeType *ttype);
+void register_node_type_tex_bricks(struct bNodeTreeType *ttype);
+void register_node_type_tex_image(struct bNodeTreeType *ttype);
+void register_node_type_tex_curve_rgb(struct bNodeTreeType *ttype);
+void register_node_type_tex_curve_time(struct bNodeTreeType *ttype);
+void register_node_type_tex_invert(struct bNodeTreeType *ttype);
+void register_node_type_tex_hue_sat(struct bNodeTreeType *ttype);
+void register_node_type_tex_coord(struct bNodeTreeType *ttype);
+void register_node_type_tex_distance(struct bNodeTreeType *ttype);
-void register_node_type_tex_rotate(ListBase *lb);
-void register_node_type_tex_translate(ListBase *lb);
-void register_node_type_tex_scale(ListBase *lb);
-void register_node_type_tex_at(ListBase *lb);
+void register_node_type_tex_rotate(struct bNodeTreeType *ttype);
+void register_node_type_tex_translate(struct bNodeTreeType *ttype);
+void register_node_type_tex_scale(struct bNodeTreeType *ttype);
+void register_node_type_tex_at(struct bNodeTreeType *ttype);
-void register_node_type_tex_compose(ListBase *lb);
-void register_node_type_tex_decompose(ListBase *lb);
+void register_node_type_tex_compose(struct bNodeTreeType *ttype);
+void register_node_type_tex_decompose(struct bNodeTreeType *ttype);
-void register_node_type_tex_proc_voronoi(ListBase *lb);
-void register_node_type_tex_proc_blend(ListBase *lb);
-void register_node_type_tex_proc_magic(ListBase *lb);
-void register_node_type_tex_proc_marble(ListBase *lb);
-void register_node_type_tex_proc_clouds(ListBase *lb);
-void register_node_type_tex_proc_wood(ListBase *lb);
-void register_node_type_tex_proc_musgrave(ListBase *lb);
-void register_node_type_tex_proc_noise(ListBase *lb);
-void register_node_type_tex_proc_stucci(ListBase *lb);
-void register_node_type_tex_proc_distnoise(ListBase *lb);
+void register_node_type_tex_proc_voronoi(struct bNodeTreeType *ttype);
+void register_node_type_tex_proc_blend(struct bNodeTreeType *ttype);
+void register_node_type_tex_proc_magic(struct bNodeTreeType *ttype);
+void register_node_type_tex_proc_marble(struct bNodeTreeType *ttype);
+void register_node_type_tex_proc_clouds(struct bNodeTreeType *ttype);
+void register_node_type_tex_proc_wood(struct bNodeTreeType *ttype);
+void register_node_type_tex_proc_musgrave(struct bNodeTreeType *ttype);
+void register_node_type_tex_proc_noise(struct bNodeTreeType *ttype);
+void register_node_type_tex_proc_stucci(struct bNodeTreeType *ttype);
+void register_node_type_tex_proc_distnoise(struct bNodeTreeType *ttype);
#endif
diff --git a/source/blender/nodes/composite/node_composite_tree.c b/source/blender/nodes/composite/node_composite_tree.c
index 1a1d744fb1b..d6a1c50162b 100644
--- a/source/blender/nodes/composite/node_composite_tree.c
+++ b/source/blender/nodes/composite/node_composite_tree.c
@@ -228,7 +228,11 @@ bNodeTreeType ntreeType_Composite = {
/* local_sync */ local_sync,
/* local_merge */ local_merge,
/* update */ update,
- /* update_node */ update_node
+ /* update_node */ update_node,
+ /* validate_link */ NULL,
+ /* mutefunc */ node_compo_pass_on,
+ /* mutelinksfunc */ node_mute_get_links,
+ /* gpumutefunc */ NULL
};
@@ -356,13 +360,8 @@ static void *exec_composite_node(void *nodeexec_v)
node_get_stack(node, thd->stack, nsin, nsout);
- if((node->flag & NODE_MUTED) && (!node_only_value(node))) {
- /* viewers we execute, for feedback to user */
- if(ELEM(node->type, CMP_NODE_VIEWER, CMP_NODE_SPLITVIEWER))
- node->typeinfo->execfunc(thd->rd, node, nsin, nsout);
- else
- node_compo_pass_on(node, nsin, nsout);
- }
+ if((node->flag & NODE_MUTED) && node->typeinfo->mutefunc)
+ node->typeinfo->mutefunc(thd->rd, 0, node, nodeexec->data, nsin, nsout);
else if(node->typeinfo->execfunc)
node->typeinfo->execfunc(thd->rd, node, nsin, nsout);
else if (node->typeinfo->newexecfunc)
diff --git a/source/blender/nodes/composite/node_composite_util.c b/source/blender/nodes/composite/node_composite_util.c
index ddd55790436..99a36691b10 100644
--- a/source/blender/nodes/composite/node_composite_util.c
+++ b/source/blender/nodes/composite/node_composite_util.c
@@ -131,44 +131,29 @@ void compbuf_set_node(CompBuf *cbuf, bNode *node)
}
/* used for disabling node (similar code in node_draw.c for disable line and node_edit for untangling nodes) */
-void node_compo_pass_on(bNode *node, bNodeStack **nsin, bNodeStack **nsout)
+void node_compo_pass_on(void *UNUSED(data), int UNUSED(thread), struct bNode *node, void *UNUSED(nodedata),
+ struct bNodeStack **in, struct bNodeStack **out)
{
- CompBuf *valbuf= NULL, *colbuf= NULL, *vecbuf= NULL;
- bNodeSocket *sock;
- int a;
-
- /* connect the first value buffer in with first value out */
- /* connect the first RGBA buffer in with first RGBA out */
-
- /* test the inputs */
- for(a=0, sock= node->inputs.first; sock; sock= sock->next, a++) {
- if(nsin[a]->data) {
- CompBuf *cbuf= nsin[a]->data;
- if(cbuf->type==1 && valbuf==NULL) valbuf= cbuf;
- if(cbuf->type==3 && vecbuf==NULL) vecbuf= cbuf;
- if(cbuf->type==4 && colbuf==NULL) colbuf= cbuf;
- }
- }
-
- /* outputs */
- if(valbuf || colbuf || vecbuf) {
- for(a=0, sock= node->outputs.first; sock; sock= sock->next, a++) {
- if(nsout[a]->hasoutput) {
- if(sock->type==SOCK_FLOAT && valbuf) {
- nsout[a]->data= pass_on_compbuf(valbuf);
- valbuf= NULL;
- }
- if(sock->type==SOCK_VECTOR && vecbuf) {
- nsout[a]->data= pass_on_compbuf(vecbuf);
- vecbuf= NULL;
- }
- if(sock->type==SOCK_RGBA && colbuf) {
- nsout[a]->data= pass_on_compbuf(colbuf);
- colbuf= NULL;
- }
- }
+ ListBase links;
+ LinkInOutsMuteNode *lnk;
+ int i;
+
+ if(node->typeinfo->mutelinksfunc == NULL)
+ return;
+
+ /* Get default muting links (as bNodeStack pointers). */
+ links = node->typeinfo->mutelinksfunc(NULL, node, in, out, NULL, NULL);
+
+ for(lnk = links.first; lnk; lnk = lnk->next) {
+ for(i = 0; i < lnk->num_outs; i++) {
+ if(((bNodeStack*)(lnk->in))->data)
+ (((bNodeStack*)(lnk->outs))+i)->data = pass_on_compbuf((CompBuf*)((bNodeStack*)(lnk->in))->data);
}
+ /* If num_outs > 1, lnk->outs was an allocated table of pointers... */
+ if(i > 1)
+ MEM_freeN(lnk->outs);
}
+ BLI_freelistN(&links);
}
diff --git a/source/blender/nodes/composite/node_composite_util.h b/source/blender/nodes/composite/node_composite_util.h
index 9cac4c477eb..bb606f4202e 100644
--- a/source/blender/nodes/composite/node_composite_util.h
+++ b/source/blender/nodes/composite/node_composite_util.h
@@ -124,7 +124,7 @@ CompBuf *pass_on_compbuf(CompBuf *cbuf);
void free_compbuf(CompBuf *cbuf);
void print_compbuf(char *str, CompBuf *cbuf);
void compbuf_set_node(struct CompBuf *cbuf, struct bNode *node);
-void node_compo_pass_on(struct bNode *node, struct bNodeStack **nsin, struct bNodeStack **nsout);
+void node_compo_pass_on(void *data, int thread, struct bNode *node, void *nodedata, struct bNodeStack **in, struct bNodeStack **out);
CompBuf *get_cropped_compbuf(rcti *drect, float *rectf, int rectx, int recty, int type);
CompBuf *scalefast_compbuf(CompBuf *inbuf, int newx, int newy);
diff --git a/source/blender/nodes/composite/nodes/node_composite_alphaOver.c b/source/blender/nodes/composite/nodes/node_composite_alphaOver.c
index 4fd4b750178..cad85d33a66 100644
--- a/source/blender/nodes/composite/nodes/node_composite_alphaOver.c
+++ b/source/blender/nodes/composite/nodes/node_composite_alphaOver.c
@@ -143,19 +143,16 @@ static void node_alphaover_init(bNodeTree *UNUSED(ntree), bNode* node, bNodeTemp
node->storage= MEM_callocN(sizeof(NodeTwoFloats), "NodeTwoFloats");
}
-void register_node_type_cmp_alphaover(ListBase *lb)
+void register_node_type_cmp_alphaover(bNodeTreeType *ttype)
{
static bNodeType ntype;
- node_type_base(&ntype, CMP_NODE_ALPHAOVER, "AlphaOver", NODE_CLASS_OP_COLOR, NODE_OPTIONS);
+ node_type_base(ttype, &ntype, CMP_NODE_ALPHAOVER, "AlphaOver", NODE_CLASS_OP_COLOR, NODE_OPTIONS);
node_type_socket_templates(&ntype, cmp_node_alphaover_in, cmp_node_alphaover_out);
node_type_size(&ntype, 80, 40, 120);
node_type_init(&ntype, node_alphaover_init);
node_type_storage(&ntype, "NodeTwoFloats", node_free_standard_storage, node_copy_standard_storage);
node_type_exec(&ntype, node_composit_exec_alphaover);
- nodeRegisterType(lb, &ntype);
+ nodeRegisterType(ttype, &ntype);
}
-
-
-
diff --git a/source/blender/nodes/composite/nodes/node_composite_bilateralblur.c b/source/blender/nodes/composite/nodes/node_composite_bilateralblur.c
index 0f341335783..c6462e2870c 100644
--- a/source/blender/nodes/composite/nodes/node_composite_bilateralblur.c
+++ b/source/blender/nodes/composite/nodes/node_composite_bilateralblur.c
@@ -258,17 +258,16 @@ static void node_composit_init_bilateralblur(bNodeTree *UNUSED(ntree), bNode* no
nbbd->sigma_space= 5.0;
}
-void register_node_type_cmp_bilateralblur(ListBase *lb)
+void register_node_type_cmp_bilateralblur(bNodeTreeType *ttype)
{
static bNodeType ntype;
- node_type_base(&ntype, CMP_NODE_BILATERALBLUR, "Bilateral Blur", NODE_CLASS_OP_FILTER, NODE_OPTIONS);
+ node_type_base(ttype, &ntype, CMP_NODE_BILATERALBLUR, "Bilateral Blur", NODE_CLASS_OP_FILTER, NODE_OPTIONS);
node_type_socket_templates(&ntype, cmp_node_bilateralblur_in, cmp_node_bilateralblur_out);
node_type_size(&ntype, 150, 120, 200);
node_type_init(&ntype, node_composit_init_bilateralblur);
node_type_storage(&ntype, "NodeBilateralBlurData", node_free_standard_storage, node_copy_standard_storage);
node_type_exec(&ntype, node_composit_exec_bilateralblur);
- nodeRegisterType(lb, &ntype);
+ nodeRegisterType(ttype, &ntype);
}
-
diff --git a/source/blender/nodes/composite/nodes/node_composite_blur.c b/source/blender/nodes/composite/nodes/node_composite_blur.c
index 816aacbe61c..76827f719f5 100644
--- a/source/blender/nodes/composite/nodes/node_composite_blur.c
+++ b/source/blender/nodes/composite/nodes/node_composite_blur.c
@@ -716,19 +716,16 @@ static void node_composit_init_blur(bNodeTree *UNUSED(ntree), bNode* node, bNode
node->storage= MEM_callocN(sizeof(NodeBlurData), "node blur data");
}
-void register_node_type_cmp_blur(ListBase *lb)
+void register_node_type_cmp_blur(bNodeTreeType *ttype)
{
static bNodeType ntype;
- node_type_base(&ntype, CMP_NODE_BLUR, "Blur", NODE_CLASS_OP_FILTER, NODE_PREVIEW|NODE_OPTIONS);
+ node_type_base(ttype, &ntype, CMP_NODE_BLUR, "Blur", NODE_CLASS_OP_FILTER, NODE_PREVIEW|NODE_OPTIONS);
node_type_socket_templates(&ntype, cmp_node_blur_in, cmp_node_blur_out);
node_type_size(&ntype, 120, 80, 200);
node_type_init(&ntype, node_composit_init_blur);
node_type_storage(&ntype, "NodeBlurData", node_free_standard_storage, node_copy_standard_storage);
node_type_exec(&ntype, node_composit_exec_blur);
- nodeRegisterType(lb, &ntype);
+ nodeRegisterType(ttype, &ntype);
}
-
-
-
diff --git a/source/blender/nodes/composite/nodes/node_composite_brightness.c b/source/blender/nodes/composite/nodes/node_composite_brightness.c
index 9153e3899fc..d935d9af7f7 100644
--- a/source/blender/nodes/composite/nodes/node_composite_brightness.c
+++ b/source/blender/nodes/composite/nodes/node_composite_brightness.c
@@ -94,15 +94,14 @@ static void node_composit_exec_brightcontrast(void *UNUSED(data), bNode *node, b
}
}
-void register_node_type_cmp_brightcontrast(ListBase *lb)
+void register_node_type_cmp_brightcontrast(bNodeTreeType *ttype)
{
static bNodeType ntype;
- node_type_base(&ntype, CMP_NODE_BRIGHTCONTRAST, "Bright/Contrast", NODE_CLASS_OP_COLOR, NODE_OPTIONS);
+ node_type_base(ttype, &ntype, CMP_NODE_BRIGHTCONTRAST, "Bright/Contrast", NODE_CLASS_OP_COLOR, NODE_OPTIONS);
node_type_socket_templates(&ntype, cmp_node_brightcontrast_in, cmp_node_brightcontrast_out);
node_type_size(&ntype, 140, 100, 320);
node_type_exec(&ntype, node_composit_exec_brightcontrast);
- nodeRegisterType(lb, &ntype);
+ nodeRegisterType(ttype, &ntype);
}
-
diff --git a/source/blender/nodes/composite/nodes/node_composite_channelMatte.c b/source/blender/nodes/composite/nodes/node_composite_channelMatte.c
index 6597ceaeee2..785786dacbe 100644
--- a/source/blender/nodes/composite/nodes/node_composite_channelMatte.c
+++ b/source/blender/nodes/composite/nodes/node_composite_channelMatte.c
@@ -200,16 +200,16 @@ static void node_composit_init_channel_matte(bNodeTree *UNUSED(ntree), bNode* no
node->custom2= 2; /* Green Channel */
}
-void register_node_type_cmp_channel_matte(ListBase *lb)
+void register_node_type_cmp_channel_matte(bNodeTreeType *ttype)
{
static bNodeType ntype;
- node_type_base(&ntype, CMP_NODE_CHANNEL_MATTE, "Channel Key", NODE_CLASS_MATTE, NODE_PREVIEW|NODE_OPTIONS);
+ node_type_base(ttype, &ntype, CMP_NODE_CHANNEL_MATTE, "Channel Key", NODE_CLASS_MATTE, NODE_PREVIEW|NODE_OPTIONS);
node_type_socket_templates(&ntype, cmp_node_channel_matte_in, cmp_node_channel_matte_out);
node_type_size(&ntype, 200, 80, 250);
node_type_init(&ntype, node_composit_init_channel_matte);
node_type_storage(&ntype, "NodeChroma", node_free_standard_storage, node_copy_standard_storage);
node_type_exec(&ntype, node_composit_exec_channel_matte);
- nodeRegisterType(lb, &ntype);
+ nodeRegisterType(ttype, &ntype);
}
diff --git a/source/blender/nodes/composite/nodes/node_composite_chromaMatte.c b/source/blender/nodes/composite/nodes/node_composite_chromaMatte.c
index 0005d9d2cc9..b6f490a0320 100644
--- a/source/blender/nodes/composite/nodes/node_composite_chromaMatte.c
+++ b/source/blender/nodes/composite/nodes/node_composite_chromaMatte.c
@@ -187,19 +187,16 @@ static void node_composit_init_chroma_matte(bNodeTree *UNUSED(ntree), bNode* nod
c->fstrength= 1.0f;
}
-void register_node_type_cmp_chroma_matte(ListBase *lb)
+void register_node_type_cmp_chroma_matte(bNodeTreeType *ttype)
{
static bNodeType ntype;
- node_type_base(&ntype, CMP_NODE_CHROMA_MATTE, "Chroma Key", NODE_CLASS_MATTE, NODE_PREVIEW|NODE_OPTIONS);
+ node_type_base(ttype, &ntype, CMP_NODE_CHROMA_MATTE, "Chroma Key", NODE_CLASS_MATTE, NODE_PREVIEW|NODE_OPTIONS);
node_type_socket_templates(&ntype, cmp_node_chroma_in, cmp_node_chroma_out);
node_type_size(&ntype, 200, 80, 300);
node_type_init(&ntype, node_composit_init_chroma_matte);
node_type_storage(&ntype, "NodeChroma", node_free_standard_storage, node_copy_standard_storage);
node_type_exec(&ntype, node_composit_exec_chroma_matte);
- nodeRegisterType(lb, &ntype);
+ nodeRegisterType(ttype, &ntype);
}
-
-
-
diff --git a/source/blender/nodes/composite/nodes/node_composite_colorMatte.c b/source/blender/nodes/composite/nodes/node_composite_colorMatte.c
index 66dc9ff0304..2d56c9e5973 100644
--- a/source/blender/nodes/composite/nodes/node_composite_colorMatte.c
+++ b/source/blender/nodes/composite/nodes/node_composite_colorMatte.c
@@ -123,19 +123,16 @@ static void node_composit_init_color_matte(bNodeTree *UNUSED(ntree), bNode* node
c->fstrength= 1.0f;
}
-void register_node_type_cmp_color_matte(ListBase *lb)
+void register_node_type_cmp_color_matte(bNodeTreeType *ttype)
{
static bNodeType ntype;
- node_type_base(&ntype, CMP_NODE_COLOR_MATTE, "Color Key", NODE_CLASS_MATTE, NODE_PREVIEW|NODE_OPTIONS);
+ node_type_base(ttype, &ntype, CMP_NODE_COLOR_MATTE, "Color Key", NODE_CLASS_MATTE, NODE_PREVIEW|NODE_OPTIONS);
node_type_socket_templates(&ntype, cmp_node_color_in, cmp_node_color_out);
node_type_size(&ntype, 200, 80, 300);
node_type_init(&ntype, node_composit_init_color_matte);
node_type_storage(&ntype, "NodeChroma", node_free_standard_storage, node_copy_standard_storage);
node_type_exec(&ntype, node_composit_exec_color_matte);
- nodeRegisterType(lb, &ntype);
+ nodeRegisterType(ttype, &ntype);
}
-
-
-
diff --git a/source/blender/nodes/composite/nodes/node_composite_colorSpill.c b/source/blender/nodes/composite/nodes/node_composite_colorSpill.c
index c85a81b9bdb..af6a295cf7f 100644
--- a/source/blender/nodes/composite/nodes/node_composite_colorSpill.c
+++ b/source/blender/nodes/composite/nodes/node_composite_colorSpill.c
@@ -324,16 +324,16 @@ static void node_composit_init_color_spill(bNodeTree *UNUSED(ntree), bNode* node
ncs->unspill=0; /* do not use unspill */
}
-void register_node_type_cmp_color_spill(ListBase *lb)
+void register_node_type_cmp_color_spill(bNodeTreeType *ttype)
{
static bNodeType ntype;
- node_type_base(&ntype, CMP_NODE_COLOR_SPILL, "Color Spill", NODE_CLASS_MATTE, NODE_OPTIONS);
+ node_type_base(ttype, &ntype, CMP_NODE_COLOR_SPILL, "Color Spill", NODE_CLASS_MATTE, NODE_OPTIONS);
node_type_socket_templates(&ntype, cmp_node_color_spill_in, cmp_node_color_spill_out);
node_type_size(&ntype, 140, 80, 200);
node_type_init(&ntype, node_composit_init_color_spill);
node_type_storage(&ntype, "NodeColorspill", node_free_standard_storage, node_copy_standard_storage);
node_type_exec(&ntype, node_composit_exec_color_spill);
- nodeRegisterType(lb, &ntype);
+ nodeRegisterType(ttype, &ntype);
}
diff --git a/source/blender/nodes/composite/nodes/node_composite_colorbalance.c b/source/blender/nodes/composite/nodes/node_composite_colorbalance.c
index f7de5801a5e..26d7aa0a3a0 100644
--- a/source/blender/nodes/composite/nodes/node_composite_colorbalance.c
+++ b/source/blender/nodes/composite/nodes/node_composite_colorbalance.c
@@ -182,18 +182,16 @@ static void node_composit_init_colorbalance(bNodeTree *UNUSED(ntree), bNode* nod
n->gain[0] = n->gain[1] = n->gain[2] = 1.0f;
}
-void register_node_type_cmp_colorbalance(ListBase *lb)
+void register_node_type_cmp_colorbalance(bNodeTreeType *ttype)
{
static bNodeType ntype;
- node_type_base(&ntype, CMP_NODE_COLORBALANCE, "Color Balance", NODE_CLASS_OP_COLOR, NODE_OPTIONS);
+ node_type_base(ttype, &ntype, CMP_NODE_COLORBALANCE, "Color Balance", NODE_CLASS_OP_COLOR, NODE_OPTIONS);
node_type_socket_templates(&ntype, cmp_node_colorbalance_in, cmp_node_colorbalance_out);
node_type_size(&ntype, 400, 200, 400);
node_type_init(&ntype, node_composit_init_colorbalance);
node_type_storage(&ntype, "NodeColorBalance", node_free_standard_storage, node_copy_standard_storage);
node_type_exec(&ntype, node_composit_exec_colorbalance);
- nodeRegisterType(lb, &ntype);
+ nodeRegisterType(ttype, &ntype);
}
-
-
diff --git a/source/blender/nodes/composite/nodes/node_composite_common.c b/source/blender/nodes/composite/nodes/node_composite_common.c
index 7060971830e..f3e0edfc691 100644
--- a/source/blender/nodes/composite/nodes/node_composite_common.c
+++ b/source/blender/nodes/composite/nodes/node_composite_common.c
@@ -119,6 +119,9 @@ static void *group_initexec(bNode *node)
bNodeSocket *sock;
bNodeStack *ns;
+ if (!ngroup)
+ return NULL;
+
/* initialize the internal node tree execution */
exec = ntreeCompositBeginExecTree(ngroup, 0);
@@ -137,7 +140,8 @@ static void group_freeexec(bNode *UNUSED(node), void *nodedata)
{
bNodeTreeExec *gexec= (bNodeTreeExec*)nodedata;
- ntreeCompositEndExecTree(gexec, 0);
+ if (gexec)
+ ntreeCompositEndExecTree(gexec, 0);
}
/* Copy inputs to the internal stack.
@@ -191,6 +195,9 @@ static void group_execute(void *data, int thread, struct bNode *node, void *node
{
bNodeTreeExec *exec= (bNodeTreeExec*)nodedata;
+ if (!exec)
+ return;
+
/* XXX same behavior as trunk: all nodes inside group are executed.
* it's stupid, but just makes it work. compo redesign will do this better.
*/
@@ -206,11 +213,11 @@ static void group_execute(void *data, int thread, struct bNode *node, void *node
group_move_outputs(node, out, exec->stack);
}
-void register_node_type_cmp_group(ListBase *lb)
+void register_node_type_cmp_group(bNodeTreeType *ttype)
{
static bNodeType ntype;
- node_type_base(&ntype, NODE_GROUP, "Group", NODE_CLASS_GROUP, NODE_OPTIONS|NODE_CONST_OUTPUT);
+ node_type_base(ttype, &ntype, NODE_GROUP, "Group", NODE_CLASS_GROUP, NODE_OPTIONS|NODE_CONST_OUTPUT);
node_type_socket_templates(&ntype, NULL, NULL);
node_type_size(&ntype, 120, 60, 200);
node_type_label(&ntype, node_group_label);
@@ -221,7 +228,7 @@ void register_node_type_cmp_group(ListBase *lb)
node_type_group_edit(&ntype, node_group_edit_get, node_group_edit_set, node_group_edit_clear);
node_type_exec_new(&ntype, group_initexec, group_freeexec, group_execute);
- nodeRegisterType(lb, &ntype);
+ nodeRegisterType(ttype, &ntype);
}
@@ -290,11 +297,11 @@ static void forloop_execute(void *data, int thread, struct bNode *node, void *no
group_move_outputs(node, out, exec->stack);
}
-void register_node_type_cmp_forloop(ListBase *lb)
+void register_node_type_cmp_forloop(bNodeTreeType *ttype)
{
static bNodeType ntype;
- node_type_base(&ntype, NODE_FORLOOP, "For", NODE_CLASS_GROUP, NODE_OPTIONS);
+ node_type_base(ttype, &ntype, NODE_FORLOOP, "For", NODE_CLASS_GROUP, NODE_OPTIONS);
node_type_socket_templates(&ntype, NULL, NULL);
node_type_size(&ntype, 120, 60, 200);
node_type_label(&ntype, node_group_label);
@@ -306,7 +313,7 @@ void register_node_type_cmp_forloop(ListBase *lb)
node_type_group_edit(&ntype, node_group_edit_get, node_group_edit_set, node_group_edit_clear);
node_type_exec_new(&ntype, group_initexec, group_freeexec, forloop_execute);
- nodeRegisterType(lb, &ntype);
+ nodeRegisterType(ttype, &ntype);
}
#endif
@@ -351,11 +358,11 @@ static void whileloop_execute(void *data, int thread, struct bNode *node, void *
group_move_outputs(node, out, exec->stack);
}
-void register_node_type_cmp_whileloop(ListBase *lb)
+void register_node_type_cmp_whileloop(bNodeTreeType *ttype)
{
static bNodeType ntype;
- node_type_base(&ntype, NODE_WHILELOOP, "While", NODE_CLASS_GROUP, NODE_OPTIONS);
+ node_type_base(ttype, &ntype, NODE_WHILELOOP, "While", NODE_CLASS_GROUP, NODE_OPTIONS);
node_type_socket_templates(&ntype, NULL, NULL);
node_type_size(&ntype, 120, 60, 200);
node_type_label(&ntype, node_group_label);
@@ -367,6 +374,6 @@ void register_node_type_cmp_whileloop(ListBase *lb)
node_type_group_edit(&ntype, node_group_edit_get, node_group_edit_set, node_group_edit_clear);
node_type_exec_new(&ntype, group_initexec, group_freeexec, whileloop_execute);
- nodeRegisterType(lb, &ntype);
+ nodeRegisterType(ttype, &ntype);
}
#endif
diff --git a/source/blender/nodes/composite/nodes/node_composite_composite.c b/source/blender/nodes/composite/nodes/node_composite_composite.c
index 4eb9dd74b2e..a5f90d31643 100644
--- a/source/blender/nodes/composite/nodes/node_composite_composite.c
+++ b/source/blender/nodes/composite/nodes/node_composite_composite.c
@@ -97,15 +97,16 @@ static void node_composit_exec_composite(void *data, bNode *node, bNodeStack **i
generate_preview(data, node, in[0]->data);
}
-void register_node_type_cmp_composite(ListBase *lb)
+void register_node_type_cmp_composite(bNodeTreeType *ttype)
{
static bNodeType ntype;
- node_type_base(&ntype, CMP_NODE_COMPOSITE, "Composite", NODE_CLASS_OUTPUT, NODE_PREVIEW);
+ node_type_base(ttype, &ntype, CMP_NODE_COMPOSITE, "Composite", NODE_CLASS_OUTPUT, NODE_PREVIEW);
node_type_socket_templates(&ntype, cmp_node_composite_in, NULL);
node_type_size(&ntype, 80, 60, 200);
node_type_exec(&ntype, node_composit_exec_composite);
+ /* Do not allow muting for this node. */
+ node_type_mute(&ntype, NULL, NULL);
- nodeRegisterType(lb, &ntype);
+ nodeRegisterType(ttype, &ntype);
}
-
diff --git a/source/blender/nodes/composite/nodes/node_composite_crop.c b/source/blender/nodes/composite/nodes/node_composite_crop.c
index 7847726c68e..3697f3e4c5c 100644
--- a/source/blender/nodes/composite/nodes/node_composite_crop.c
+++ b/source/blender/nodes/composite/nodes/node_composite_crop.c
@@ -111,17 +111,16 @@ static void node_composit_init_crop(bNodeTree *UNUSED(ntree), bNode* node, bNode
nxy->y2= 0;
}
-void register_node_type_cmp_crop(ListBase *lb)
+void register_node_type_cmp_crop(bNodeTreeType *ttype)
{
static bNodeType ntype;
- node_type_base(&ntype, CMP_NODE_CROP, "Crop", NODE_CLASS_DISTORT, NODE_OPTIONS);
+ node_type_base(ttype, &ntype, CMP_NODE_CROP, "Crop", NODE_CLASS_DISTORT, NODE_OPTIONS);
node_type_socket_templates(&ntype, cmp_node_crop_in, cmp_node_crop_out);
node_type_size(&ntype, 140, 100, 320);
node_type_init(&ntype, node_composit_init_crop);
node_type_storage(&ntype, "NodeTwoXYs", node_free_standard_storage, node_copy_standard_storage);
node_type_exec(&ntype, node_composit_exec_crop);
- nodeRegisterType(lb, &ntype);
+ nodeRegisterType(ttype, &ntype);
}
-
diff --git a/source/blender/nodes/composite/nodes/node_composite_curves.c b/source/blender/nodes/composite/nodes/node_composite_curves.c
index 2e54836e042..81424586a11 100644
--- a/source/blender/nodes/composite/nodes/node_composite_curves.c
+++ b/source/blender/nodes/composite/nodes/node_composite_curves.c
@@ -62,23 +62,22 @@ static void node_composit_init_curves_time(bNodeTree *UNUSED(ntree), bNode* node
node->storage= curvemapping_add(1, 0.0f, 0.0f, 1.0f, 1.0f);
}
-void register_node_type_cmp_curve_time(ListBase *lb)
+void register_node_type_cmp_curve_time(bNodeTreeType *ttype)
{
static bNodeType ntype;
- node_type_base(&ntype, CMP_NODE_TIME, "Time", NODE_CLASS_INPUT, NODE_OPTIONS);
+ node_type_base(ttype, &ntype, CMP_NODE_TIME, "Time", NODE_CLASS_INPUT, NODE_OPTIONS);
node_type_socket_templates(&ntype, NULL, cmp_node_time_out);
node_type_size(&ntype, 140, 100, 320);
node_type_init(&ntype, node_composit_init_curves_time);
node_type_storage(&ntype, "CurveMapping", node_free_curves, node_copy_curves);
node_type_exec(&ntype, node_composit_exec_curves_time);
- nodeRegisterType(lb, &ntype);
+ nodeRegisterType(ttype, &ntype);
}
-
/* **************** CURVE VEC ******************** */
static bNodeSocketTemplate cmp_node_curve_vec_in[]= {
{ SOCK_VECTOR, 1, "Vector", 0.0f, 0.0f, 0.0f, 1.0f, -1.0f, 1.0f, PROP_NONE},
@@ -103,18 +102,18 @@ static void node_composit_init_curve_vec(bNodeTree *UNUSED(ntree), bNode* node,
node->storage= curvemapping_add(3, -1.0f, -1.0f, 1.0f, 1.0f);
}
-void register_node_type_cmp_curve_vec(ListBase *lb)
+void register_node_type_cmp_curve_vec(bNodeTreeType *ttype)
{
static bNodeType ntype;
- node_type_base(&ntype, CMP_NODE_CURVE_VEC, "Vector Curves", NODE_CLASS_OP_VECTOR, NODE_OPTIONS);
+ node_type_base(ttype, &ntype, CMP_NODE_CURVE_VEC, "Vector Curves", NODE_CLASS_OP_VECTOR, NODE_OPTIONS);
node_type_socket_templates(&ntype, cmp_node_curve_vec_in, cmp_node_curve_vec_out);
node_type_size(&ntype, 200, 140, 320);
node_type_init(&ntype, node_composit_init_curve_vec);
node_type_storage(&ntype, "CurveMapping", node_free_curves, node_copy_curves);
node_type_exec(&ntype, node_composit_exec_curve_vec);
- nodeRegisterType(lb, &ntype);
+ nodeRegisterType(ttype, &ntype);
}
@@ -190,18 +189,16 @@ static void node_composit_init_curve_rgb(bNodeTree *UNUSED(ntree), bNode* node,
node->storage= curvemapping_add(4, 0.0f, 0.0f, 1.0f, 1.0f);
}
-void register_node_type_cmp_curve_rgb(ListBase *lb)
+void register_node_type_cmp_curve_rgb(bNodeTreeType *ttype)
{
static bNodeType ntype;
- node_type_base(&ntype, CMP_NODE_CURVE_RGB, "RGB Curves", NODE_CLASS_OP_COLOR, NODE_OPTIONS);
+ node_type_base(ttype, &ntype, CMP_NODE_CURVE_RGB, "RGB Curves", NODE_CLASS_OP_COLOR, NODE_OPTIONS);
node_type_socket_templates(&ntype, cmp_node_curve_rgb_in, cmp_node_curve_rgb_out);
node_type_size(&ntype, 200, 140, 320);
node_type_init(&ntype, node_composit_init_curve_rgb);
node_type_storage(&ntype, "CurveMapping", node_free_curves, node_copy_curves);
node_type_exec(&ntype, node_composit_exec_curve_rgb);
- nodeRegisterType(lb, &ntype);
+ nodeRegisterType(ttype, &ntype);
}
-
-
diff --git a/source/blender/nodes/composite/nodes/node_composite_defocus.c b/source/blender/nodes/composite/nodes/node_composite_defocus.c
index f1c2fb321d1..1e7c8e8b58c 100644
--- a/source/blender/nodes/composite/nodes/node_composite_defocus.c
+++ b/source/blender/nodes/composite/nodes/node_composite_defocus.c
@@ -875,19 +875,16 @@ static void node_composit_init_defocus(bNodeTree *UNUSED(ntree), bNode* node, bN
node->storage = nbd;
}
-void register_node_type_cmp_defocus(ListBase *lb)
+void register_node_type_cmp_defocus(bNodeTreeType *ttype)
{
static bNodeType ntype;
- node_type_base(&ntype, CMP_NODE_DEFOCUS, "Defocus", NODE_CLASS_OP_FILTER, NODE_OPTIONS);
+ node_type_base(ttype, &ntype, CMP_NODE_DEFOCUS, "Defocus", NODE_CLASS_OP_FILTER, NODE_OPTIONS);
node_type_socket_templates(&ntype, cmp_node_defocus_in, cmp_node_defocus_out);
node_type_size(&ntype, 150, 120, 200);
node_type_init(&ntype, node_composit_init_defocus);
node_type_storage(&ntype, "NodeDefocus", node_free_standard_storage, node_copy_standard_storage);
node_type_exec(&ntype, node_composit_exec_defocus);
- nodeRegisterType(lb, &ntype);
+ nodeRegisterType(ttype, &ntype);
}
-
-
-
diff --git a/source/blender/nodes/composite/nodes/node_composite_diffMatte.c b/source/blender/nodes/composite/nodes/node_composite_diffMatte.c
index 3b2a2342167..eae59dea3f4 100644
--- a/source/blender/nodes/composite/nodes/node_composite_diffMatte.c
+++ b/source/blender/nodes/composite/nodes/node_composite_diffMatte.c
@@ -131,19 +131,16 @@ static void node_composit_init_diff_matte(bNodeTree *UNUSED(ntree), bNode* node,
c->t2= 0.1f;
}
-void register_node_type_cmp_diff_matte(ListBase *lb)
+void register_node_type_cmp_diff_matte(bNodeTreeType *ttype)
{
static bNodeType ntype;
- node_type_base(&ntype, CMP_NODE_DIFF_MATTE, "Difference Key", NODE_CLASS_MATTE, NODE_PREVIEW|NODE_OPTIONS);
+ node_type_base(ttype, &ntype, CMP_NODE_DIFF_MATTE, "Difference Key", NODE_CLASS_MATTE, NODE_PREVIEW|NODE_OPTIONS);
node_type_socket_templates(&ntype, cmp_node_diff_matte_in, cmp_node_diff_matte_out);
node_type_size(&ntype, 200, 80, 250);
node_type_init(&ntype, node_composit_init_diff_matte);
node_type_storage(&ntype, "NodeChroma", node_free_standard_storage, node_copy_standard_storage);
node_type_exec(&ntype, node_composit_exec_diff_matte);
- nodeRegisterType(lb, &ntype);
+ nodeRegisterType(ttype, &ntype);
}
-
-
-
diff --git a/source/blender/nodes/composite/nodes/node_composite_dilate.c b/source/blender/nodes/composite/nodes/node_composite_dilate.c
index 751db641785..f8abf96e742 100644
--- a/source/blender/nodes/composite/nodes/node_composite_dilate.c
+++ b/source/blender/nodes/composite/nodes/node_composite_dilate.c
@@ -146,16 +146,14 @@ static void node_composit_exec_dilateerode(void *UNUSED(data), bNode *node, bNod
}
}
-void register_node_type_cmp_dilateerode(ListBase *lb)
+void register_node_type_cmp_dilateerode(bNodeTreeType *ttype)
{
static bNodeType ntype;
- node_type_base(&ntype, CMP_NODE_DILATEERODE, "Dilate/Erode", NODE_CLASS_OP_FILTER, NODE_OPTIONS);
+ node_type_base(ttype, &ntype, CMP_NODE_DILATEERODE, "Dilate/Erode", NODE_CLASS_OP_FILTER, NODE_OPTIONS);
node_type_socket_templates(&ntype, cmp_node_dilateerode_in, cmp_node_dilateerode_out);
node_type_size(&ntype, 130, 100, 320);
node_type_exec(&ntype, node_composit_exec_dilateerode);
- nodeRegisterType(lb, &ntype);
+ nodeRegisterType(ttype, &ntype);
}
-
-
diff --git a/source/blender/nodes/composite/nodes/node_composite_directionalblur.c b/source/blender/nodes/composite/nodes/node_composite_directionalblur.c
index 04610150356..d0f7feccf2e 100644
--- a/source/blender/nodes/composite/nodes/node_composite_directionalblur.c
+++ b/source/blender/nodes/composite/nodes/node_composite_directionalblur.c
@@ -130,17 +130,16 @@ static void node_composit_init_dblur(bNodeTree *UNUSED(ntree), bNode* node, bNod
ndbd->center_y= 0.5;
}
-void register_node_type_cmp_dblur(ListBase *lb)
+void register_node_type_cmp_dblur(bNodeTreeType *ttype)
{
static bNodeType ntype;
- node_type_base(&ntype, CMP_NODE_DBLUR, "Directional Blur", NODE_CLASS_OP_FILTER, NODE_OPTIONS);
+ node_type_base(ttype, &ntype, CMP_NODE_DBLUR, "Directional Blur", NODE_CLASS_OP_FILTER, NODE_OPTIONS);
node_type_socket_templates(&ntype, cmp_node_dblur_in, cmp_node_dblur_out);
node_type_size(&ntype, 150, 120, 200);
node_type_init(&ntype, node_composit_init_dblur);
node_type_storage(&ntype, "NodeDBlurData", node_free_standard_storage, node_copy_standard_storage);
node_type_exec(&ntype, node_composit_exec_dblur);
- nodeRegisterType(lb, &ntype);
+ nodeRegisterType(ttype, &ntype);
}
-
diff --git a/source/blender/nodes/composite/nodes/node_composite_displace.c b/source/blender/nodes/composite/nodes/node_composite_displace.c
index a55a6093f12..ad7c1fa589e 100644
--- a/source/blender/nodes/composite/nodes/node_composite_displace.c
+++ b/source/blender/nodes/composite/nodes/node_composite_displace.c
@@ -182,16 +182,14 @@ static void node_composit_exec_displace(void *UNUSED(data), bNode *node, bNodeSt
}
}
-void register_node_type_cmp_displace(ListBase *lb)
+void register_node_type_cmp_displace(bNodeTreeType *ttype)
{
static bNodeType ntype;
- node_type_base(&ntype, CMP_NODE_DISPLACE, "Displace", NODE_CLASS_DISTORT, NODE_OPTIONS);
+ node_type_base(ttype, &ntype, CMP_NODE_DISPLACE, "Displace", NODE_CLASS_DISTORT, NODE_OPTIONS);
node_type_socket_templates(&ntype, cmp_node_displace_in, cmp_node_displace_out);
node_type_size(&ntype, 140, 100, 320);
node_type_exec(&ntype, node_composit_exec_displace);
- nodeRegisterType(lb, &ntype);
+ nodeRegisterType(ttype, &ntype);
}
-
-
diff --git a/source/blender/nodes/composite/nodes/node_composite_distanceMatte.c b/source/blender/nodes/composite/nodes/node_composite_distanceMatte.c
index 27fe66cbe0d..292bb66613d 100644
--- a/source/blender/nodes/composite/nodes/node_composite_distanceMatte.c
+++ b/source/blender/nodes/composite/nodes/node_composite_distanceMatte.c
@@ -128,19 +128,16 @@ static void node_composit_init_distance_matte(bNodeTree *UNUSED(ntree), bNode* n
c->t2= 0.1f;
}
-void register_node_type_cmp_distance_matte(ListBase *lb)
+void register_node_type_cmp_distance_matte(bNodeTreeType *ttype)
{
static bNodeType ntype;
- node_type_base(&ntype, CMP_NODE_DIST_MATTE, "Distance Key", NODE_CLASS_MATTE, NODE_PREVIEW|NODE_OPTIONS);
+ node_type_base(ttype, &ntype, CMP_NODE_DIST_MATTE, "Distance Key", NODE_CLASS_MATTE, NODE_PREVIEW|NODE_OPTIONS);
node_type_socket_templates(&ntype, cmp_node_distance_matte_in, cmp_node_distance_matte_out);
node_type_size(&ntype, 200, 80, 250);
node_type_init(&ntype, node_composit_init_distance_matte);
node_type_storage(&ntype, "NodeChroma", node_free_standard_storage, node_copy_standard_storage);
node_type_exec(&ntype, node_composit_exec_distance_matte);
- nodeRegisterType(lb, &ntype);
+ nodeRegisterType(ttype, &ntype);
}
-
-
-
diff --git a/source/blender/nodes/composite/nodes/node_composite_filter.c b/source/blender/nodes/composite/nodes/node_composite_filter.c
index 1a0c51fab53..94a109de8f2 100644
--- a/source/blender/nodes/composite/nodes/node_composite_filter.c
+++ b/source/blender/nodes/composite/nodes/node_composite_filter.c
@@ -220,18 +220,15 @@ static void node_composit_exec_filter(void *data, bNode *node, bNodeStack **in,
}
-void register_node_type_cmp_filter(ListBase *lb)
+void register_node_type_cmp_filter(bNodeTreeType *ttype)
{
static bNodeType ntype;
- node_type_base(&ntype, CMP_NODE_FILTER, "Filter", NODE_CLASS_OP_FILTER, NODE_PREVIEW|NODE_OPTIONS);
+ node_type_base(ttype, &ntype, CMP_NODE_FILTER, "Filter", NODE_CLASS_OP_FILTER, NODE_PREVIEW|NODE_OPTIONS);
node_type_socket_templates(&ntype, cmp_node_filter_in, cmp_node_filter_out);
node_type_size(&ntype, 80, 40, 120);
node_type_label(&ntype, node_filter_label);
node_type_exec(&ntype, node_composit_exec_filter);
- nodeRegisterType(lb, &ntype);
+ nodeRegisterType(ttype, &ntype);
}
-
-
-
diff --git a/source/blender/nodes/composite/nodes/node_composite_flip.c b/source/blender/nodes/composite/nodes/node_composite_flip.c
index 01f58182227..974a14037eb 100644
--- a/source/blender/nodes/composite/nodes/node_composite_flip.c
+++ b/source/blender/nodes/composite/nodes/node_composite_flip.c
@@ -88,17 +88,14 @@ static void node_composit_exec_flip(void *UNUSED(data), bNode *node, bNodeStack
}
}
-void register_node_type_cmp_flip(ListBase *lb)
+void register_node_type_cmp_flip(bNodeTreeType *ttype)
{
static bNodeType ntype;
- node_type_base(&ntype, CMP_NODE_FLIP, "Flip", NODE_CLASS_DISTORT, NODE_OPTIONS);
+ node_type_base(ttype, &ntype, CMP_NODE_FLIP, "Flip", NODE_CLASS_DISTORT, NODE_OPTIONS);
node_type_socket_templates(&ntype, cmp_node_flip_in, cmp_node_flip_out);
node_type_size(&ntype, 140, 100, 320);
node_type_exec(&ntype, node_composit_exec_flip);
- nodeRegisterType(lb, &ntype);
+ nodeRegisterType(ttype, &ntype);
}
-
-
-
diff --git a/source/blender/nodes/composite/nodes/node_composite_gamma.c b/source/blender/nodes/composite/nodes/node_composite_gamma.c
index ad377799dea..90135b5cf35 100644
--- a/source/blender/nodes/composite/nodes/node_composite_gamma.c
+++ b/source/blender/nodes/composite/nodes/node_composite_gamma.c
@@ -75,14 +75,14 @@ static void node_composit_exec_gamma(void *UNUSED(data), bNode *node, bNodeStack
}
}
-void register_node_type_cmp_gamma(ListBase *lb)
+void register_node_type_cmp_gamma(bNodeTreeType *ttype)
{
static bNodeType ntype;
- node_type_base(&ntype, CMP_NODE_GAMMA, "Gamma", NODE_CLASS_OP_COLOR, NODE_OPTIONS);
+ node_type_base(ttype, &ntype, CMP_NODE_GAMMA, "Gamma", NODE_CLASS_OP_COLOR, NODE_OPTIONS);
node_type_socket_templates(&ntype, cmp_node_gamma_in, cmp_node_gamma_out);
node_type_size(&ntype, 140, 100, 320);
node_type_exec(&ntype, node_composit_exec_gamma);
- nodeRegisterType(lb, &ntype);
+ nodeRegisterType(ttype, &ntype);
}
diff --git a/source/blender/nodes/composite/nodes/node_composite_glare.c b/source/blender/nodes/composite/nodes/node_composite_glare.c
index 296ad2e3a5b..d4e15f780e5 100644
--- a/source/blender/nodes/composite/nodes/node_composite_glare.c
+++ b/source/blender/nodes/composite/nodes/node_composite_glare.c
@@ -489,17 +489,16 @@ static void node_composit_init_glare(bNodeTree *UNUSED(ntree), bNode* node, bNod
node->storage = ndg;
}
-void register_node_type_cmp_glare(ListBase *lb)
+void register_node_type_cmp_glare(bNodeTreeType *ttype)
{
static bNodeType ntype;
- node_type_base(&ntype, CMP_NODE_GLARE, "Glare", NODE_CLASS_OP_FILTER, NODE_OPTIONS);
+ node_type_base(ttype, &ntype, CMP_NODE_GLARE, "Glare", NODE_CLASS_OP_FILTER, NODE_OPTIONS);
node_type_socket_templates(&ntype, cmp_node_glare_in, cmp_node_glare_out);
node_type_size(&ntype, 150, 120, 200);
node_type_init(&ntype, node_composit_init_glare);
node_type_storage(&ntype, "NodeGlare", node_free_standard_storage, node_copy_standard_storage);
node_type_exec(&ntype, node_composit_exec_glare);
- nodeRegisterType(lb, &ntype);
+ nodeRegisterType(ttype, &ntype);
}
-
diff --git a/source/blender/nodes/composite/nodes/node_composite_hueSatVal.c b/source/blender/nodes/composite/nodes/node_composite_hueSatVal.c
index 711560a0a94..c4598717e00 100644
--- a/source/blender/nodes/composite/nodes/node_composite_hueSatVal.c
+++ b/source/blender/nodes/composite/nodes/node_composite_hueSatVal.c
@@ -102,19 +102,16 @@ static void node_composit_init_hue_sat(bNodeTree *UNUSED(ntree), bNode* node, bN
nhs->val= 1.0f;
}
-void register_node_type_cmp_hue_sat(ListBase *lb)
+void register_node_type_cmp_hue_sat(bNodeTreeType *ttype)
{
static bNodeType ntype;
- node_type_base(&ntype, CMP_NODE_HUE_SAT, "Hue Saturation Value", NODE_CLASS_OP_COLOR, NODE_OPTIONS);
+ node_type_base(ttype, &ntype, CMP_NODE_HUE_SAT, "Hue Saturation Value", NODE_CLASS_OP_COLOR, NODE_OPTIONS);
node_type_socket_templates(&ntype, cmp_node_hue_sat_in, cmp_node_hue_sat_out);
node_type_size(&ntype, 150, 80, 250);
node_type_init(&ntype, node_composit_init_hue_sat);
node_type_storage(&ntype, "NodeHueSat", node_free_standard_storage, node_copy_standard_storage);
node_type_exec(&ntype, node_composit_exec_hue_sat);
- nodeRegisterType(lb, &ntype);
+ nodeRegisterType(ttype, &ntype);
}
-
-
-
diff --git a/source/blender/nodes/composite/nodes/node_composite_huecorrect.c b/source/blender/nodes/composite/nodes/node_composite_huecorrect.c
index acb70f13ec2..6b0849b2391 100644
--- a/source/blender/nodes/composite/nodes/node_composite_huecorrect.c
+++ b/source/blender/nodes/composite/nodes/node_composite_huecorrect.c
@@ -151,18 +151,16 @@ static void node_composit_init_huecorrect(bNodeTree *UNUSED(ntree), bNode* node,
cumapping->cur = 1;
}
-void register_node_type_cmp_huecorrect(ListBase *lb)
+void register_node_type_cmp_huecorrect(bNodeTreeType *ttype)
{
static bNodeType ntype;
- node_type_base(&ntype, CMP_NODE_HUECORRECT, "Hue Correct", NODE_CLASS_OP_COLOR, NODE_OPTIONS);
+ node_type_base(ttype, &ntype, CMP_NODE_HUECORRECT, "Hue Correct", NODE_CLASS_OP_COLOR, NODE_OPTIONS);
node_type_socket_templates(&ntype, cmp_node_huecorrect_in, cmp_node_huecorrect_out);
node_type_size(&ntype, 320, 140, 400);
node_type_init(&ntype, node_composit_init_huecorrect);
node_type_storage(&ntype, "CurveMapping", node_free_curves, node_copy_curves);
node_type_exec(&ntype, node_composit_exec_huecorrect);
- nodeRegisterType(lb, &ntype);
+ nodeRegisterType(ttype, &ntype);
}
-
-
diff --git a/source/blender/nodes/composite/nodes/node_composite_idMask.c b/source/blender/nodes/composite/nodes/node_composite_idMask.c
index 914483bc52f..0600e44b0d0 100644
--- a/source/blender/nodes/composite/nodes/node_composite_idMask.c
+++ b/source/blender/nodes/composite/nodes/node_composite_idMask.c
@@ -107,17 +107,14 @@ static void node_composit_exec_idmask(void *data, bNode *node, bNodeStack **in,
}
-void register_node_type_cmp_idmask(ListBase *lb)
+void register_node_type_cmp_idmask(bNodeTreeType *ttype)
{
static bNodeType ntype;
- node_type_base(&ntype, CMP_NODE_ID_MASK, "ID Mask", NODE_CLASS_CONVERTOR, NODE_OPTIONS);
+ node_type_base(ttype, &ntype, CMP_NODE_ID_MASK, "ID Mask", NODE_CLASS_CONVERTOR, NODE_OPTIONS);
node_type_socket_templates(&ntype, cmp_node_idmask_in, cmp_node_idmask_out);
node_type_size(&ntype, 140, 100, 320);
node_type_exec(&ntype, node_composit_exec_idmask);
- nodeRegisterType(lb, &ntype);
+ nodeRegisterType(ttype, &ntype);
}
-
-
-
diff --git a/source/blender/nodes/composite/nodes/node_composite_image.c b/source/blender/nodes/composite/nodes/node_composite_image.c
index 672d2af0646..9920cdab039 100644
--- a/source/blender/nodes/composite/nodes/node_composite_image.c
+++ b/source/blender/nodes/composite/nodes/node_composite_image.c
@@ -314,18 +314,18 @@ static void node_composit_init_image(bNodeTree *UNUSED(ntree), bNode* node, bNod
iuser->ok= 1;
}
-void register_node_type_cmp_image(ListBase *lb)
+void register_node_type_cmp_image(bNodeTreeType *ttype)
{
static bNodeType ntype;
- node_type_base(&ntype, CMP_NODE_IMAGE, "Image", NODE_CLASS_INPUT, NODE_PREVIEW|NODE_OPTIONS);
+ node_type_base(ttype, &ntype, CMP_NODE_IMAGE, "Image", NODE_CLASS_INPUT, NODE_PREVIEW|NODE_OPTIONS);
node_type_socket_templates(&ntype, NULL, cmp_node_rlayers_out);
node_type_size(&ntype, 120, 80, 300);
node_type_init(&ntype, node_composit_init_image);
node_type_storage(&ntype, "ImageUser", node_free_standard_storage, node_copy_standard_storage);
node_type_exec(&ntype, node_composit_exec_image);
- nodeRegisterType(lb, &ntype);
+ nodeRegisterType(ttype, &ntype);
}
@@ -445,17 +445,14 @@ static void node_composit_exec_rlayers(void *data, bNode *node, bNodeStack **UNU
}
-void register_node_type_cmp_rlayers(ListBase *lb)
+void register_node_type_cmp_rlayers(bNodeTreeType *ttype)
{
static bNodeType ntype;
- node_type_base(&ntype, CMP_NODE_R_LAYERS, "Render Layers", NODE_CLASS_INPUT, NODE_PREVIEW|NODE_OPTIONS);
+ node_type_base(ttype, &ntype, CMP_NODE_R_LAYERS, "Render Layers", NODE_CLASS_INPUT, NODE_PREVIEW|NODE_OPTIONS);
node_type_socket_templates(&ntype, NULL, cmp_node_rlayers_out);
node_type_size(&ntype, 150, 100, 300);
node_type_exec(&ntype, node_composit_exec_rlayers);
- nodeRegisterType(lb, &ntype);
+ nodeRegisterType(ttype, &ntype);
}
-
-
-
diff --git a/source/blender/nodes/composite/nodes/node_composite_invert.c b/source/blender/nodes/composite/nodes/node_composite_invert.c
index d98f5a1c64b..4fda90e0a1e 100644
--- a/source/blender/nodes/composite/nodes/node_composite_invert.c
+++ b/source/blender/nodes/composite/nodes/node_composite_invert.c
@@ -118,16 +118,15 @@ static void node_composit_init_invert(bNodeTree *UNUSED(ntree), bNode* node, bNo
}
/* custom1 = mix type */
-void register_node_type_cmp_invert(ListBase *lb)
+void register_node_type_cmp_invert(bNodeTreeType *ttype)
{
static bNodeType ntype;
- node_type_base(&ntype, CMP_NODE_INVERT, "Invert", NODE_CLASS_OP_COLOR, NODE_OPTIONS);
+ node_type_base(ttype, &ntype, CMP_NODE_INVERT, "Invert", NODE_CLASS_OP_COLOR, NODE_OPTIONS);
node_type_socket_templates(&ntype, cmp_node_invert_in, cmp_node_invert_out);
node_type_size(&ntype, 120, 120, 140);
node_type_init(&ntype, node_composit_init_invert);
node_type_exec(&ntype, node_composit_exec_invert);
- nodeRegisterType(lb, &ntype);
+ nodeRegisterType(ttype, &ntype);
}
-
diff --git a/source/blender/nodes/composite/nodes/node_composite_lensdist.c b/source/blender/nodes/composite/nodes/node_composite_lensdist.c
index e57f405ed68..5d3a9323f52 100644
--- a/source/blender/nodes/composite/nodes/node_composite_lensdist.c
+++ b/source/blender/nodes/composite/nodes/node_composite_lensdist.c
@@ -190,17 +190,16 @@ static void node_composit_init_lensdist(bNodeTree *UNUSED(ntree), bNode* node, b
}
-void register_node_type_cmp_lensdist(ListBase *lb)
+void register_node_type_cmp_lensdist(bNodeTreeType *ttype)
{
static bNodeType ntype;
- node_type_base(&ntype, CMP_NODE_LENSDIST, "Lens Distortion", NODE_CLASS_DISTORT, NODE_OPTIONS);
+ node_type_base(ttype, &ntype, CMP_NODE_LENSDIST, "Lens Distortion", NODE_CLASS_DISTORT, NODE_OPTIONS);
node_type_socket_templates(&ntype, cmp_node_lensdist_in, cmp_node_lensdist_out);
node_type_size(&ntype, 150, 120, 200);
node_type_init(&ntype, node_composit_init_lensdist);
node_type_storage(&ntype, "NodeLensDist", node_free_standard_storage, node_copy_standard_storage);
node_type_exec(&ntype, node_composit_exec_lensdist);
- nodeRegisterType(lb, &ntype);
+ nodeRegisterType(ttype, &ntype);
}
-
diff --git a/source/blender/nodes/composite/nodes/node_composite_levels.c b/source/blender/nodes/composite/nodes/node_composite_levels.c
index f3e4f0db8b6..9417e504a1b 100644
--- a/source/blender/nodes/composite/nodes/node_composite_levels.c
+++ b/source/blender/nodes/composite/nodes/node_composite_levels.c
@@ -320,18 +320,16 @@ static void node_composit_init_view_levels(bNodeTree *UNUSED(ntree), bNode* node
node->custom1=1; /*All channels*/
}
-void register_node_type_cmp_view_levels(ListBase *lb)
+void register_node_type_cmp_view_levels(bNodeTreeType *ttype)
{
static bNodeType ntype;
- node_type_base(&ntype, CMP_NODE_VIEW_LEVELS, "Levels", NODE_CLASS_OUTPUT, NODE_OPTIONS|NODE_PREVIEW);
+ node_type_base(ttype, &ntype, CMP_NODE_VIEW_LEVELS, "Levels", NODE_CLASS_OUTPUT, NODE_OPTIONS|NODE_PREVIEW);
node_type_socket_templates(&ntype, cmp_node_view_levels_in, cmp_node_view_levels_out);
node_type_size(&ntype, 140, 100, 320);
node_type_init(&ntype, node_composit_init_view_levels);
node_type_storage(&ntype, "ImageUser", NULL, NULL);
node_type_exec(&ntype, node_composit_exec_view_levels);
- nodeRegisterType(lb, &ntype);
+ nodeRegisterType(ttype, &ntype);
}
-
-
diff --git a/source/blender/nodes/composite/nodes/node_composite_lummaMatte.c b/source/blender/nodes/composite/nodes/node_composite_lummaMatte.c
index 8573849b069..ad5e9d423e5 100644
--- a/source/blender/nodes/composite/nodes/node_composite_lummaMatte.c
+++ b/source/blender/nodes/composite/nodes/node_composite_lummaMatte.c
@@ -104,18 +104,16 @@ static void node_composit_init_luma_matte(bNodeTree *UNUSED(ntree), bNode* node,
c->t2= 0.0f;
}
-void register_node_type_cmp_luma_matte(ListBase *lb)
+void register_node_type_cmp_luma_matte(bNodeTreeType *ttype)
{
static bNodeType ntype;
- node_type_base(&ntype, CMP_NODE_LUMA_MATTE, "Luminance Key", NODE_CLASS_MATTE, NODE_PREVIEW|NODE_OPTIONS);
+ node_type_base(ttype, &ntype, CMP_NODE_LUMA_MATTE, "Luminance Key", NODE_CLASS_MATTE, NODE_PREVIEW|NODE_OPTIONS);
node_type_socket_templates(&ntype, cmp_node_luma_matte_in, cmp_node_luma_matte_out);
node_type_size(&ntype, 200, 80, 250);
node_type_init(&ntype, node_composit_init_luma_matte);
node_type_storage(&ntype, "NodeChroma", node_free_standard_storage, node_copy_standard_storage);
node_type_exec(&ntype, node_composit_exec_luma_matte);
- nodeRegisterType(lb, &ntype);
+ nodeRegisterType(ttype, &ntype);
}
-
-
diff --git a/source/blender/nodes/composite/nodes/node_composite_mapUV.c b/source/blender/nodes/composite/nodes/node_composite_mapUV.c
index b596f67a886..1ca729c8393 100644
--- a/source/blender/nodes/composite/nodes/node_composite_mapUV.c
+++ b/source/blender/nodes/composite/nodes/node_composite_mapUV.c
@@ -162,17 +162,14 @@ static void node_composit_exec_mapuv(void *UNUSED(data), bNode *node, bNodeStack
}
}
-void register_node_type_cmp_mapuv(ListBase *lb)
+void register_node_type_cmp_mapuv(bNodeTreeType *ttype)
{
static bNodeType ntype;
- node_type_base(&ntype, CMP_NODE_MAP_UV, "Map UV", NODE_CLASS_DISTORT, NODE_OPTIONS);
+ node_type_base(ttype, &ntype, CMP_NODE_MAP_UV, "Map UV", NODE_CLASS_DISTORT, NODE_OPTIONS);
node_type_socket_templates(&ntype, cmp_node_mapuv_in, cmp_node_mapuv_out);
node_type_size(&ntype, 140, 100, 320);
node_type_exec(&ntype, node_composit_exec_mapuv);
- nodeRegisterType(lb, &ntype);
+ nodeRegisterType(ttype, &ntype);
}
-
-
-
diff --git a/source/blender/nodes/composite/nodes/node_composite_mapValue.c b/source/blender/nodes/composite/nodes/node_composite_mapValue.c
index 6930fbf0664..380aa0b716b 100644
--- a/source/blender/nodes/composite/nodes/node_composite_mapValue.c
+++ b/source/blender/nodes/composite/nodes/node_composite_mapValue.c
@@ -82,20 +82,16 @@ static void node_composit_init_map_value(bNodeTree *UNUSED(ntree), bNode* node,
node->storage= add_tex_mapping();
}
-void register_node_type_cmp_map_value(ListBase *lb)
+void register_node_type_cmp_map_value(bNodeTreeType *ttype)
{
static bNodeType ntype;
- node_type_base(&ntype, CMP_NODE_MAP_VALUE, "Map Value", NODE_CLASS_OP_VECTOR, NODE_OPTIONS);
+ node_type_base(ttype, &ntype, CMP_NODE_MAP_VALUE, "Map Value", NODE_CLASS_OP_VECTOR, NODE_OPTIONS);
node_type_socket_templates(&ntype, cmp_node_map_value_in, cmp_node_map_value_out);
node_type_size(&ntype, 100, 60, 150);
node_type_init(&ntype, node_composit_init_map_value);
node_type_storage(&ntype, "TexMapping", node_free_standard_storage, node_copy_standard_storage);
node_type_exec(&ntype, node_composit_exec_map_value);
- nodeRegisterType(lb, &ntype);
+ nodeRegisterType(ttype, &ntype);
}
-
-
-
-
diff --git a/source/blender/nodes/composite/nodes/node_composite_math.c b/source/blender/nodes/composite/nodes/node_composite_math.c
index 27fdcfc1d4e..6c2cbb9a92b 100644
--- a/source/blender/nodes/composite/nodes/node_composite_math.c
+++ b/source/blender/nodes/composite/nodes/node_composite_math.c
@@ -194,19 +194,15 @@ static void node_composit_exec_math(void *UNUSED(data), bNode *node, bNodeStack
out[0]->data= stackbuf;
}
-void register_node_type_cmp_math(ListBase *lb)
+void register_node_type_cmp_math(bNodeTreeType *ttype)
{
static bNodeType ntype;
- node_type_base(&ntype, CMP_NODE_MATH, "Math", NODE_CLASS_CONVERTOR, NODE_OPTIONS);
+ node_type_base(ttype, &ntype, CMP_NODE_MATH, "Math", NODE_CLASS_CONVERTOR, NODE_OPTIONS);
node_type_socket_templates(&ntype, cmp_node_math_in, cmp_node_math_out);
node_type_size(&ntype, 120, 110, 160);
node_type_label(&ntype, node_math_label);
node_type_exec(&ntype, node_composit_exec_math);
- nodeRegisterType(lb, &ntype);
+ nodeRegisterType(ttype, &ntype);
}
-
-
-
-
diff --git a/source/blender/nodes/composite/nodes/node_composite_mixrgb.c b/source/blender/nodes/composite/nodes/node_composite_mixrgb.c
index 275d949da28..4a303e911e2 100644
--- a/source/blender/nodes/composite/nodes/node_composite_mixrgb.c
+++ b/source/blender/nodes/composite/nodes/node_composite_mixrgb.c
@@ -82,16 +82,15 @@ static void node_composit_exec_mix_rgb(void *data, bNode *node, bNodeStack **in,
}
/* custom1 = mix type */
-void register_node_type_cmp_mix_rgb(ListBase *lb)
+void register_node_type_cmp_mix_rgb(bNodeTreeType *ttype)
{
static bNodeType ntype;
- node_type_base(&ntype, CMP_NODE_MIX_RGB, "Mix", NODE_CLASS_OP_COLOR, NODE_PREVIEW|NODE_OPTIONS);
+ node_type_base(ttype, &ntype, CMP_NODE_MIX_RGB, "Mix", NODE_CLASS_OP_COLOR, NODE_PREVIEW|NODE_OPTIONS);
node_type_socket_templates(&ntype, cmp_node_mix_rgb_in, cmp_node_mix_rgb_out);
node_type_size(&ntype, 110, 60, 120);
node_type_label(&ntype, node_blend_label);
node_type_exec(&ntype, node_composit_exec_mix_rgb);
- nodeRegisterType(lb, &ntype);
+ nodeRegisterType(ttype, &ntype);
}
-
diff --git a/source/blender/nodes/composite/nodes/node_composite_movieclip.c b/source/blender/nodes/composite/nodes/node_composite_movieclip.c
index 8931b899017..1f449f8c16a 100644
--- a/source/blender/nodes/composite/nodes/node_composite_movieclip.c
+++ b/source/blender/nodes/composite/nodes/node_composite_movieclip.c
@@ -142,16 +142,16 @@ static void init(bNodeTree *UNUSED(ntree), bNode *node, bNodeTemplate *UNUSED(nt
user->framenr= 1;
}
-void register_node_type_cmp_movieclip(ListBase *lb)
+void register_node_type_cmp_movieclip(bNodeTreeType *ttype)
{
static bNodeType ntype;
- node_type_base(&ntype, CMP_NODE_MOVIECLIP, "Movie Clip", NODE_CLASS_INPUT, NODE_PREVIEW|NODE_OPTIONS);
+ node_type_base(ttype, &ntype, CMP_NODE_MOVIECLIP, "Movie Clip", NODE_CLASS_INPUT, NODE_PREVIEW|NODE_OPTIONS);
node_type_socket_templates(&ntype, NULL, cmp_node_movieclip_out);
node_type_size(&ntype, 120, 80, 300);
node_type_init(&ntype, init);
node_type_storage(&ntype, "MovieClipUser", node_free_standard_storage, node_copy_standard_storage);
node_type_exec(&ntype, node_composit_exec_movieclip);
- nodeRegisterType(lb, &ntype);
+ nodeRegisterType(ttype, &ntype);
}
diff --git a/source/blender/nodes/composite/nodes/node_composite_moviedistortion.c b/source/blender/nodes/composite/nodes/node_composite_moviedistortion.c
index 05d13f346f3..bc3f648a374 100644
--- a/source/blender/nodes/composite/nodes/node_composite_moviedistortion.c
+++ b/source/blender/nodes/composite/nodes/node_composite_moviedistortion.c
@@ -124,16 +124,16 @@ static void storage_copy(bNode *orig_node, bNode *new_node)
new_node->storage= BKE_tracking_distortion_copy(orig_node->storage);
}
-void register_node_type_cmp_moviedistortion(ListBase *lb)
+void register_node_type_cmp_moviedistortion(bNodeTreeType *ttype)
{
static bNodeType ntype;
- node_type_base(&ntype, CMP_NODE_MOVIEDISTORTION, "Movie Distortion", NODE_CLASS_DISTORT, NODE_OPTIONS);
+ node_type_base(ttype, &ntype, CMP_NODE_MOVIEDISTORTION, "Movie Distortion", NODE_CLASS_DISTORT, NODE_OPTIONS);
node_type_socket_templates(&ntype, cmp_node_moviedistortion_in, cmp_node_moviedistortion_out);
node_type_size(&ntype, 140, 100, 320);
node_type_label(&ntype, label);
node_type_exec(&ntype, exec);
node_type_storage(&ntype, NULL, storage_free, storage_copy);
- nodeRegisterType(lb, &ntype);
+ nodeRegisterType(ttype, &ntype);
}
diff --git a/source/blender/nodes/composite/nodes/node_composite_normal.c b/source/blender/nodes/composite/nodes/node_composite_normal.c
index 4c43871d867..fbbd58932ea 100644
--- a/source/blender/nodes/composite/nodes/node_composite_normal.c
+++ b/source/blender/nodes/composite/nodes/node_composite_normal.c
@@ -91,17 +91,15 @@ static void init(bNodeTree *UNUSED(ntree), bNode *node, bNodeTemplate *UNUSED(nt
nor[2] = 1.0f;
}
-void register_node_type_cmp_normal(ListBase *lb)
+void register_node_type_cmp_normal(bNodeTreeType *ttype)
{
static bNodeType ntype;
- node_type_base(&ntype, CMP_NODE_NORMAL, "Normal", NODE_CLASS_OP_VECTOR, NODE_OPTIONS);
+ node_type_base(ttype, &ntype, CMP_NODE_NORMAL, "Normal", NODE_CLASS_OP_VECTOR, NODE_OPTIONS);
node_type_socket_templates(&ntype, cmp_node_normal_in, cmp_node_normal_out);
node_type_init(&ntype, init);
node_type_size(&ntype, 100, 60, 200);
node_type_exec(&ntype, node_composit_exec_normal);
- nodeRegisterType(lb, &ntype);
+ nodeRegisterType(ttype, &ntype);
}
-
-
diff --git a/source/blender/nodes/composite/nodes/node_composite_normalize.c b/source/blender/nodes/composite/nodes/node_composite_normalize.c
index d14f589f3f2..455966e4f38 100644
--- a/source/blender/nodes/composite/nodes/node_composite_normalize.c
+++ b/source/blender/nodes/composite/nodes/node_composite_normalize.c
@@ -101,14 +101,14 @@ static void node_composit_exec_normalize(void *UNUSED(data), bNode *node, bNodeS
}
}
-void register_node_type_cmp_normalize(ListBase *lb)
+void register_node_type_cmp_normalize(bNodeTreeType *ttype)
{
static bNodeType ntype;
- node_type_base(&ntype, CMP_NODE_NORMALIZE, "Normalize", NODE_CLASS_OP_VECTOR, NODE_OPTIONS);
+ node_type_base(ttype, &ntype, CMP_NODE_NORMALIZE, "Normalize", NODE_CLASS_OP_VECTOR, NODE_OPTIONS);
node_type_socket_templates(&ntype, cmp_node_normalize_in, cmp_node_normalize_out);
node_type_size(&ntype, 100, 60, 150);
node_type_exec(&ntype, node_composit_exec_normalize);
- nodeRegisterType(lb, &ntype);
+ nodeRegisterType(ttype, &ntype);
}
diff --git a/source/blender/nodes/composite/nodes/node_composite_outputFile.c b/source/blender/nodes/composite/nodes/node_composite_outputFile.c
index 845c5b88020..50a196deb07 100644
--- a/source/blender/nodes/composite/nodes/node_composite_outputFile.c
+++ b/source/blender/nodes/composite/nodes/node_composite_outputFile.c
@@ -70,14 +70,14 @@ static void node_composit_exec_output_file(void *data, bNode *node, bNodeStack *
if(in[1]->data) {
CompBuf *zbuf= in[1]->data;
if(zbuf->type==CB_VAL && zbuf->x==cbuf->x && zbuf->y==cbuf->y) {
- nif->subimtype|= R_OPENEXR_ZBUF;
+ nif->im_format.flag |= R_IMF_FLAG_ZBUF;
ibuf->zbuf_float= zbuf->rect;
}
}
- BKE_makepicstring(string, nif->name, bmain->name, rd->cfra, nif->imtype, (rd->scemode & R_EXTENSION), TRUE);
+ BKE_makepicstring(string, nif->name, bmain->name, rd->cfra, nif->im_format.imtype, (rd->scemode & R_EXTENSION), TRUE);
- if(0 == BKE_write_ibuf(ibuf, string, nif->imtype, nif->subimtype, nif->imtype==R_OPENEXR?nif->codec:nif->quality))
+ if(0 == BKE_write_ibuf(ibuf, string, &nif->im_format))
printf("Cannot save Node File Output to %s\n", string);
else
printf("Saved: %s\n", string);
@@ -100,27 +100,25 @@ static void node_composit_init_output_file(bNodeTree *UNUSED(ntree), bNode* node
if(scene) {
BLI_strncpy(nif->name, scene->r.pic, sizeof(nif->name));
- nif->imtype= scene->r.imtype;
- nif->subimtype= scene->r.subimtype;
- nif->quality= scene->r.quality;
+ nif->im_format= scene->r.im_format;
+ if (BKE_imtype_is_movie(nif->im_format.imtype)) {
+ nif->im_format.imtype= R_IMF_IMTYPE_OPENEXR;
+ }
nif->sfra= scene->r.sfra;
nif->efra= scene->r.efra;
}
}
-void register_node_type_cmp_output_file(ListBase *lb)
+void register_node_type_cmp_output_file(bNodeTreeType *ttype)
{
static bNodeType ntype;
- node_type_base(&ntype, CMP_NODE_OUTPUT_FILE, "File Output", NODE_CLASS_OUTPUT, NODE_PREVIEW|NODE_OPTIONS);
+ node_type_base(ttype, &ntype, CMP_NODE_OUTPUT_FILE, "File Output", NODE_CLASS_OUTPUT, NODE_PREVIEW|NODE_OPTIONS);
node_type_socket_templates(&ntype, cmp_node_output_file_in, NULL);
node_type_size(&ntype, 140, 80, 300);
node_type_init(&ntype, node_composit_init_output_file);
node_type_storage(&ntype, "NodeImageFile", node_free_standard_storage, node_copy_standard_storage);
node_type_exec(&ntype, node_composit_exec_output_file);
- nodeRegisterType(lb, &ntype);
+ nodeRegisterType(ttype, &ntype);
}
-
-
-
diff --git a/source/blender/nodes/composite/nodes/node_composite_premulkey.c b/source/blender/nodes/composite/nodes/node_composite_premulkey.c
index b188b0dd323..bf934fcd0f7 100644
--- a/source/blender/nodes/composite/nodes/node_composite_premulkey.c
+++ b/source/blender/nodes/composite/nodes/node_composite_premulkey.c
@@ -61,16 +61,14 @@ static void node_composit_exec_premulkey(void *UNUSED(data), bNode *node, bNodeS
}
}
-void register_node_type_cmp_premulkey(ListBase *lb)
+void register_node_type_cmp_premulkey(bNodeTreeType *ttype)
{
static bNodeType ntype;
- node_type_base(&ntype, CMP_NODE_PREMULKEY, "Alpha Convert", NODE_CLASS_CONVERTOR, NODE_OPTIONS);
+ node_type_base(ttype, &ntype, CMP_NODE_PREMULKEY, "Alpha Convert", NODE_CLASS_CONVERTOR, NODE_OPTIONS);
node_type_socket_templates(&ntype, cmp_node_premulkey_in, cmp_node_premulkey_out);
node_type_size(&ntype, 140, 100, 320);
node_type_exec(&ntype, node_composit_exec_premulkey);
- nodeRegisterType(lb, &ntype);
+ nodeRegisterType(ttype, &ntype);
}
-
-
diff --git a/source/blender/nodes/composite/nodes/node_composite_rgb.c b/source/blender/nodes/composite/nodes/node_composite_rgb.c
index 12f073a816d..ca9db716b66 100644
--- a/source/blender/nodes/composite/nodes/node_composite_rgb.c
+++ b/source/blender/nodes/composite/nodes/node_composite_rgb.c
@@ -58,18 +58,15 @@ static void node_composit_exec_rgb(void *UNUSED(data), bNode *node, bNodeStack *
copy_v4_v4(out[0]->vec, col);
}
-void register_node_type_cmp_rgb(ListBase *lb)
+void register_node_type_cmp_rgb(bNodeTreeType *ttype)
{
static bNodeType ntype;
- node_type_base(&ntype, CMP_NODE_RGB, "RGB", NODE_CLASS_INPUT, NODE_OPTIONS);
+ node_type_base(ttype, &ntype, CMP_NODE_RGB, "RGB", NODE_CLASS_INPUT, NODE_OPTIONS);
node_type_socket_templates(&ntype, NULL, cmp_node_rgb_out);
node_type_init(&ntype, node_composit_init_rgb);
node_type_size(&ntype, 140, 80, 140);
node_type_exec(&ntype, node_composit_exec_rgb);
- nodeRegisterType(lb, &ntype);
+ nodeRegisterType(ttype, &ntype);
}
-
-
-
diff --git a/source/blender/nodes/composite/nodes/node_composite_rotate.c b/source/blender/nodes/composite/nodes/node_composite_rotate.c
index d02602c7d04..826653c6cff 100644
--- a/source/blender/nodes/composite/nodes/node_composite_rotate.c
+++ b/source/blender/nodes/composite/nodes/node_composite_rotate.c
@@ -126,16 +126,15 @@ static void node_composit_init_rotate(bNodeTree *UNUSED(ntree), bNode* node, bNo
node->custom1= 1; /* Bilinear Filter*/
}
-void register_node_type_cmp_rotate(ListBase *lb)
+void register_node_type_cmp_rotate(bNodeTreeType *ttype)
{
static bNodeType ntype;
- node_type_base(&ntype, CMP_NODE_ROTATE, "Rotate", NODE_CLASS_DISTORT, NODE_OPTIONS);
+ node_type_base(ttype, &ntype, CMP_NODE_ROTATE, "Rotate", NODE_CLASS_DISTORT, NODE_OPTIONS);
node_type_socket_templates(&ntype, cmp_node_rotate_in, cmp_node_rotate_out);
node_type_size(&ntype, 140, 100, 320);
node_type_init(&ntype, node_composit_init_rotate);
node_type_exec(&ntype, node_composit_exec_rotate);
- nodeRegisterType(lb, &ntype);
+ nodeRegisterType(ttype, &ntype);
}
-
diff --git a/source/blender/nodes/composite/nodes/node_composite_scale.c b/source/blender/nodes/composite/nodes/node_composite_scale.c
index 37332c9bd7e..188449df5fb 100644
--- a/source/blender/nodes/composite/nodes/node_composite_scale.c
+++ b/source/blender/nodes/composite/nodes/node_composite_scale.c
@@ -129,21 +129,14 @@ static void node_composit_exec_scale(void *data, bNode *node, bNodeStack **in, b
}
}
-void register_node_type_cmp_scale(ListBase *lb)
+void register_node_type_cmp_scale(bNodeTreeType *ttype)
{
static bNodeType ntype;
- node_type_base(&ntype, CMP_NODE_SCALE, "Scale", NODE_CLASS_DISTORT, NODE_OPTIONS);
+ node_type_base(ttype, &ntype, CMP_NODE_SCALE, "Scale", NODE_CLASS_DISTORT, NODE_OPTIONS);
node_type_socket_templates(&ntype, cmp_node_scale_in, cmp_node_scale_out);
node_type_size(&ntype, 140, 100, 320);
node_type_exec(&ntype, node_composit_exec_scale);
- nodeRegisterType(lb, &ntype);
+ nodeRegisterType(ttype, &ntype);
}
-
-
-
-
-
-
-
diff --git a/source/blender/nodes/composite/nodes/node_composite_sepcombHSVA.c b/source/blender/nodes/composite/nodes/node_composite_sepcombHSVA.c
index bf58d443aec..d742a916fdf 100644
--- a/source/blender/nodes/composite/nodes/node_composite_sepcombHSVA.c
+++ b/source/blender/nodes/composite/nodes/node_composite_sepcombHSVA.c
@@ -99,16 +99,16 @@ static void node_composit_exec_sephsva(void *UNUSED(data), bNode *node, bNodeSta
}
}
-void register_node_type_cmp_sephsva(ListBase *lb)
+void register_node_type_cmp_sephsva(bNodeTreeType *ttype)
{
static bNodeType ntype;
- node_type_base(&ntype, CMP_NODE_SEPHSVA, "Separate HSVA", NODE_CLASS_CONVERTOR, 0);
+ node_type_base(ttype, &ntype, CMP_NODE_SEPHSVA, "Separate HSVA", NODE_CLASS_CONVERTOR, 0);
node_type_socket_templates(&ntype, cmp_node_sephsva_in, cmp_node_sephsva_out);
node_type_size(&ntype, 80, 40, 140);
node_type_exec(&ntype, node_composit_exec_sephsva);
- nodeRegisterType(lb, &ntype);
+ nodeRegisterType(ttype, &ntype);
}
@@ -169,17 +169,14 @@ static void node_composit_exec_combhsva(void *UNUSED(data), bNode *node, bNodeSt
}
}
-void register_node_type_cmp_combhsva(ListBase *lb)
+void register_node_type_cmp_combhsva(bNodeTreeType *ttype)
{
static bNodeType ntype;
- node_type_base(&ntype, CMP_NODE_COMBHSVA, "Combine HSVA", NODE_CLASS_CONVERTOR, NODE_OPTIONS);
+ node_type_base(ttype, &ntype, CMP_NODE_COMBHSVA, "Combine HSVA", NODE_CLASS_CONVERTOR, NODE_OPTIONS);
node_type_socket_templates(&ntype, cmp_node_combhsva_in, cmp_node_combhsva_out);
node_type_size(&ntype, 80, 40, 140);
node_type_exec(&ntype, node_composit_exec_combhsva);
- nodeRegisterType(lb, &ntype);
+ nodeRegisterType(ttype, &ntype);
}
-
-
-
diff --git a/source/blender/nodes/composite/nodes/node_composite_sepcombRGBA.c b/source/blender/nodes/composite/nodes/node_composite_sepcombRGBA.c
index ade2b22bf35..1f0b504f161 100644
--- a/source/blender/nodes/composite/nodes/node_composite_sepcombRGBA.c
+++ b/source/blender/nodes/composite/nodes/node_composite_sepcombRGBA.c
@@ -77,16 +77,16 @@ static void node_composit_exec_seprgba(void *UNUSED(data), bNode *UNUSED(node),
}
}
-void register_node_type_cmp_seprgba(ListBase *lb)
+void register_node_type_cmp_seprgba(bNodeTreeType *ttype)
{
static bNodeType ntype;
- node_type_base(&ntype, CMP_NODE_SEPRGBA, "Separate RGBA", NODE_CLASS_CONVERTOR, 0);
+ node_type_base(ttype, &ntype, CMP_NODE_SEPRGBA, "Separate RGBA", NODE_CLASS_CONVERTOR, 0);
node_type_socket_templates(&ntype, cmp_node_seprgba_in, cmp_node_seprgba_out);
node_type_size(&ntype, 80, 40, 140);
node_type_exec(&ntype, node_composit_exec_seprgba);
- nodeRegisterType(lb, &ntype);
+ nodeRegisterType(ttype, &ntype);
}
@@ -145,16 +145,14 @@ static void node_composit_exec_combrgba(void *UNUSED(data), bNode *node, bNodeSt
}
}
-void register_node_type_cmp_combrgba(ListBase *lb)
+void register_node_type_cmp_combrgba(bNodeTreeType *ttype)
{
static bNodeType ntype;
- node_type_base(&ntype, CMP_NODE_COMBRGBA, "Combine RGBA", NODE_CLASS_CONVERTOR, NODE_OPTIONS);
+ node_type_base(ttype, &ntype, CMP_NODE_COMBRGBA, "Combine RGBA", NODE_CLASS_CONVERTOR, NODE_OPTIONS);
node_type_socket_templates(&ntype, cmp_node_combrgba_in, cmp_node_combrgba_out);
node_type_size(&ntype, 80, 40, 140);
node_type_exec(&ntype, node_composit_exec_combrgba);
- nodeRegisterType(lb, &ntype);
+ nodeRegisterType(ttype, &ntype);
}
-
-
diff --git a/source/blender/nodes/composite/nodes/node_composite_sepcombYCCA.c b/source/blender/nodes/composite/nodes/node_composite_sepcombYCCA.c
index 7944176c5d3..a5f827b094d 100644
--- a/source/blender/nodes/composite/nodes/node_composite_sepcombYCCA.c
+++ b/source/blender/nodes/composite/nodes/node_composite_sepcombYCCA.c
@@ -148,16 +148,16 @@ static void node_composit_exec_sepycca(void *UNUSED(data), bNode *node, bNodeSta
}
}
-void register_node_type_cmp_sepycca(ListBase *lb)
+void register_node_type_cmp_sepycca(bNodeTreeType *ttype)
{
static bNodeType ntype;
- node_type_base(&ntype, CMP_NODE_SEPYCCA, "Separate YCbCrA", NODE_CLASS_CONVERTOR, NODE_OPTIONS);
+ node_type_base(ttype, &ntype, CMP_NODE_SEPYCCA, "Separate YCbCrA", NODE_CLASS_CONVERTOR, NODE_OPTIONS);
node_type_socket_templates(&ntype, cmp_node_sepycca_in, cmp_node_sepycca_out);
node_type_size(&ntype, 80, 40, 140);
node_type_exec(&ntype, node_composit_exec_sepycca);
- nodeRegisterType(lb, &ntype);
+ nodeRegisterType(ttype, &ntype);
}
@@ -295,17 +295,14 @@ static void node_composit_exec_combycca(void *UNUSED(data), bNode *node, bNodeSt
}
}
-void register_node_type_cmp_combycca(ListBase *lb)
+void register_node_type_cmp_combycca(bNodeTreeType *ttype)
{
static bNodeType ntype;
- node_type_base(&ntype, CMP_NODE_COMBYCCA, "Combine YCbCrA", NODE_CLASS_CONVERTOR, NODE_OPTIONS);
+ node_type_base(ttype, &ntype, CMP_NODE_COMBYCCA, "Combine YCbCrA", NODE_CLASS_CONVERTOR, NODE_OPTIONS);
node_type_socket_templates(&ntype, cmp_node_combycca_in, cmp_node_combycca_out);
node_type_size(&ntype, 80, 40, 140);
node_type_exec(&ntype, node_composit_exec_combycca);
- nodeRegisterType(lb, &ntype);
+ nodeRegisterType(ttype, &ntype);
}
-
-
-
diff --git a/source/blender/nodes/composite/nodes/node_composite_sepcombYUVA.c b/source/blender/nodes/composite/nodes/node_composite_sepcombYUVA.c
index aedb5652e61..2a2f64a5209 100644
--- a/source/blender/nodes/composite/nodes/node_composite_sepcombYUVA.c
+++ b/source/blender/nodes/composite/nodes/node_composite_sepcombYUVA.c
@@ -99,16 +99,16 @@ static void node_composit_exec_sepyuva(void *UNUSED(data), bNode *node, bNodeSta
}
}
-void register_node_type_cmp_sepyuva(ListBase *lb)
+void register_node_type_cmp_sepyuva(bNodeTreeType *ttype)
{
static bNodeType ntype;
- node_type_base(&ntype, CMP_NODE_SEPYUVA, "Separate YUVA", NODE_CLASS_CONVERTOR, 0);
+ node_type_base(ttype, &ntype, CMP_NODE_SEPYUVA, "Separate YUVA", NODE_CLASS_CONVERTOR, 0);
node_type_socket_templates(&ntype, cmp_node_sepyuva_in, cmp_node_sepyuva_out);
node_type_size(&ntype, 80, 40, 140);
node_type_exec(&ntype, node_composit_exec_sepyuva);
- nodeRegisterType(lb, &ntype);
+ nodeRegisterType(ttype, &ntype);
}
@@ -170,16 +170,14 @@ static void node_composit_exec_combyuva(void *UNUSED(data), bNode *node, bNodeSt
}
}
-void register_node_type_cmp_combyuva(ListBase *lb)
+void register_node_type_cmp_combyuva(bNodeTreeType *ttype)
{
static bNodeType ntype;
- node_type_base(&ntype, CMP_NODE_COMBYUVA, "Combine YUVA", NODE_CLASS_CONVERTOR, NODE_OPTIONS);
+ node_type_base(ttype, &ntype, CMP_NODE_COMBYUVA, "Combine YUVA", NODE_CLASS_CONVERTOR, NODE_OPTIONS);
node_type_socket_templates(&ntype, cmp_node_combyuva_in, cmp_node_combyuva_out);
node_type_size(&ntype, 80, 40, 140);
node_type_exec(&ntype, node_composit_exec_combyuva);
- nodeRegisterType(lb, &ntype);
+ nodeRegisterType(ttype, &ntype);
}
-
-
diff --git a/source/blender/nodes/composite/nodes/node_composite_setalpha.c b/source/blender/nodes/composite/nodes/node_composite_setalpha.c
index 2b19ebfe5a3..6c24185bb88 100644
--- a/source/blender/nodes/composite/nodes/node_composite_setalpha.c
+++ b/source/blender/nodes/composite/nodes/node_composite_setalpha.c
@@ -73,15 +73,14 @@ static void node_composit_exec_setalpha(void *UNUSED(data), bNode *node, bNodeSt
}
}
-void register_node_type_cmp_setalpha(ListBase *lb)
+void register_node_type_cmp_setalpha(bNodeTreeType *ttype)
{
static bNodeType ntype;
- node_type_base(&ntype, CMP_NODE_SETALPHA, "Set Alpha", NODE_CLASS_CONVERTOR, NODE_OPTIONS);
+ node_type_base(ttype, &ntype, CMP_NODE_SETALPHA, "Set Alpha", NODE_CLASS_CONVERTOR, NODE_OPTIONS);
node_type_socket_templates(&ntype, cmp_node_setalpha_in, cmp_node_setalpha_out);
node_type_size(&ntype, 120, 40, 140);
node_type_exec(&ntype, node_composit_exec_setalpha);
- nodeRegisterType(lb, &ntype);
+ nodeRegisterType(ttype, &ntype);
}
-
diff --git a/source/blender/nodes/composite/nodes/node_composite_splitViewer.c b/source/blender/nodes/composite/nodes/node_composite_splitViewer.c
index b63b42224e2..bc8bc7c84d1 100644
--- a/source/blender/nodes/composite/nodes/node_composite_splitViewer.c
+++ b/source/blender/nodes/composite/nodes/node_composite_splitViewer.c
@@ -149,21 +149,18 @@ static void node_composit_init_splitviewer(bNodeTree *UNUSED(ntree), bNode* node
node->custom1= 50; /* default 50% split */
}
-void register_node_type_cmp_splitviewer(ListBase *lb)
+void register_node_type_cmp_splitviewer(bNodeTreeType *ttype)
{
static bNodeType ntype;
- node_type_base(&ntype, CMP_NODE_SPLITVIEWER, "SplitViewer", NODE_CLASS_OUTPUT, NODE_PREVIEW|NODE_OPTIONS);
+ node_type_base(ttype, &ntype, CMP_NODE_SPLITVIEWER, "SplitViewer", NODE_CLASS_OUTPUT, NODE_PREVIEW|NODE_OPTIONS);
node_type_socket_templates(&ntype, cmp_node_splitviewer_in, NULL);
node_type_size(&ntype, 140, 100, 320);
node_type_init(&ntype, node_composit_init_splitviewer);
node_type_storage(&ntype, "ImageUser", node_free_standard_storage, node_copy_standard_storage);
node_type_exec(&ntype, node_composit_exec_splitviewer);
+ /* Do not allow muting this node. */
+ node_type_mute(&ntype, NULL, NULL);
- nodeRegisterType(lb, &ntype);
+ nodeRegisterType(ttype, &ntype);
}
-
-
-
-
-
diff --git a/source/blender/nodes/composite/nodes/node_composite_stabilize2d.c b/source/blender/nodes/composite/nodes/node_composite_stabilize2d.c
index c5d60e65530..f41751b3e15 100644
--- a/source/blender/nodes/composite/nodes/node_composite_stabilize2d.c
+++ b/source/blender/nodes/composite/nodes/node_composite_stabilize2d.c
@@ -66,14 +66,14 @@ static void node_composit_exec_stabilize2d(void *data, bNode *node, bNodeStack *
}
}
-void register_node_type_cmp_stabilize2d(ListBase *lb)
+void register_node_type_cmp_stabilize2d(bNodeTreeType *ttype)
{
static bNodeType ntype;
- node_type_base(&ntype, CMP_NODE_STABILIZE2D, "Stabilize 2D", NODE_CLASS_DISTORT, NODE_OPTIONS);
+ node_type_base(ttype, &ntype, CMP_NODE_STABILIZE2D, "Stabilize 2D", NODE_CLASS_DISTORT, NODE_OPTIONS);
node_type_socket_templates(&ntype, cmp_node_stabilize2d_in, cmp_node_stabilize2d_out);
node_type_size(&ntype, 140, 100, 320);
node_type_exec(&ntype, node_composit_exec_stabilize2d);
- nodeRegisterType(lb, &ntype);
+ nodeRegisterType(ttype, &ntype);
}
diff --git a/source/blender/nodes/composite/nodes/node_composite_texture.c b/source/blender/nodes/composite/nodes/node_composite_texture.c
index 2f54f27e481..7f8f14bcfc5 100644
--- a/source/blender/nodes/composite/nodes/node_composite_texture.c
+++ b/source/blender/nodes/composite/nodes/node_composite_texture.c
@@ -142,17 +142,14 @@ static void node_composit_exec_texture(void *data, bNode *node, bNodeStack **in,
}
}
-void register_node_type_cmp_texture(ListBase *lb)
+void register_node_type_cmp_texture(bNodeTreeType *ttype)
{
static bNodeType ntype;
- node_type_base(&ntype, CMP_NODE_TEXTURE, "Texture", NODE_CLASS_INPUT, NODE_OPTIONS|NODE_PREVIEW);
+ node_type_base(ttype, &ntype, CMP_NODE_TEXTURE, "Texture", NODE_CLASS_INPUT, NODE_OPTIONS|NODE_PREVIEW);
node_type_socket_templates(&ntype, cmp_node_texture_in, cmp_node_texture_out);
node_type_size(&ntype, 120, 80, 240);
node_type_exec(&ntype, node_composit_exec_texture);
- nodeRegisterType(lb, &ntype);
+ nodeRegisterType(ttype, &ntype);
}
-
-
-
diff --git a/source/blender/nodes/composite/nodes/node_composite_tonemap.c b/source/blender/nodes/composite/nodes/node_composite_tonemap.c
index 36e583a77ff..9b34e117496 100644
--- a/source/blender/nodes/composite/nodes/node_composite_tonemap.c
+++ b/source/blender/nodes/composite/nodes/node_composite_tonemap.c
@@ -162,17 +162,16 @@ static void node_composit_init_tonemap(bNodeTree *UNUSED(ntree), bNode* node, bN
node->storage = ntm;
}
-void register_node_type_cmp_tonemap(ListBase *lb)
+void register_node_type_cmp_tonemap(bNodeTreeType *ttype)
{
static bNodeType ntype;
- node_type_base(&ntype, CMP_NODE_TONEMAP, "Tonemap", NODE_CLASS_OP_COLOR, NODE_OPTIONS);
+ node_type_base(ttype, &ntype, CMP_NODE_TONEMAP, "Tonemap", NODE_CLASS_OP_COLOR, NODE_OPTIONS);
node_type_socket_templates(&ntype, cmp_node_tonemap_in, cmp_node_tonemap_out);
node_type_size(&ntype, 150, 120, 200);
node_type_init(&ntype, node_composit_init_tonemap);
node_type_storage(&ntype, "NodeTonemap", node_free_standard_storage, node_copy_standard_storage);
node_type_exec(&ntype, node_composit_exec_tonemap);
- nodeRegisterType(lb, &ntype);
+ nodeRegisterType(ttype, &ntype);
}
-
diff --git a/source/blender/nodes/composite/nodes/node_composite_transform.c b/source/blender/nodes/composite/nodes/node_composite_transform.c
index de9b8fceaee..7e096bf0545 100644
--- a/source/blender/nodes/composite/nodes/node_composite_transform.c
+++ b/source/blender/nodes/composite/nodes/node_composite_transform.c
@@ -127,16 +127,14 @@ static void node_composit_exec_transform(void *UNUSED(data), bNode *node, bNodeS
}
}
-void register_node_type_cmp_transform(ListBase *lb)
+void register_node_type_cmp_transform(bNodeTreeType *ttype)
{
static bNodeType ntype;
- node_type_base(&ntype, CMP_NODE_TRANSFORM, "Transform", NODE_CLASS_DISTORT, NODE_OPTIONS);
+ node_type_base(ttype, &ntype, CMP_NODE_TRANSFORM, "Transform", NODE_CLASS_DISTORT, NODE_OPTIONS);
node_type_socket_templates(&ntype, cmp_node_transform_in, cmp_node_transform_out);
node_type_size(&ntype, 140, 100, 320);
node_type_exec(&ntype, node_composit_exec_transform);
- nodeRegisterType(lb, &ntype);
+ nodeRegisterType(ttype, &ntype);
}
-
-
diff --git a/source/blender/nodes/composite/nodes/node_composite_translate.c b/source/blender/nodes/composite/nodes/node_composite_translate.c
index 2b25ef92a1e..073b035add0 100644
--- a/source/blender/nodes/composite/nodes/node_composite_translate.c
+++ b/source/blender/nodes/composite/nodes/node_composite_translate.c
@@ -59,16 +59,14 @@ static void node_composit_exec_translate(void *UNUSED(data), bNode *UNUSED(node)
}
}
-void register_node_type_cmp_translate(ListBase *lb)
+void register_node_type_cmp_translate(bNodeTreeType *ttype)
{
static bNodeType ntype;
- node_type_base(&ntype, CMP_NODE_TRANSLATE, "Translate", NODE_CLASS_DISTORT, NODE_OPTIONS);
+ node_type_base(ttype, &ntype, CMP_NODE_TRANSLATE, "Translate", NODE_CLASS_DISTORT, NODE_OPTIONS);
node_type_socket_templates(&ntype, cmp_node_translate_in, cmp_node_translate_out);
node_type_size(&ntype, 140, 100, 320);
node_type_exec(&ntype, node_composit_exec_translate);
- nodeRegisterType(lb, &ntype);
+ nodeRegisterType(ttype, &ntype);
}
-
-
diff --git a/source/blender/nodes/composite/nodes/node_composite_valToRgb.c b/source/blender/nodes/composite/nodes/node_composite_valToRgb.c
index 014f40a1a48..30f624641d1 100644
--- a/source/blender/nodes/composite/nodes/node_composite_valToRgb.c
+++ b/source/blender/nodes/composite/nodes/node_composite_valToRgb.c
@@ -83,18 +83,18 @@ static void node_composit_init_valtorgb(bNodeTree *UNUSED(ntree), bNode* node, b
node->storage= add_colorband(1);
}
-void register_node_type_cmp_valtorgb(ListBase *lb)
+void register_node_type_cmp_valtorgb(bNodeTreeType *ttype)
{
static bNodeType ntype;
- node_type_base(&ntype, CMP_NODE_VALTORGB, "ColorRamp", NODE_CLASS_CONVERTOR, NODE_OPTIONS);
+ node_type_base(ttype, &ntype, CMP_NODE_VALTORGB, "ColorRamp", NODE_CLASS_CONVERTOR, NODE_OPTIONS);
node_type_socket_templates(&ntype, cmp_node_valtorgb_in, cmp_node_valtorgb_out);
node_type_size(&ntype, 240, 200, 300);
node_type_init(&ntype, node_composit_init_valtorgb);
node_type_storage(&ntype, "ColorBand", node_free_standard_storage, node_copy_standard_storage);
node_type_exec(&ntype, node_composit_exec_valtorgb);
- nodeRegisterType(lb, &ntype);
+ nodeRegisterType(ttype, &ntype);
}
@@ -137,14 +137,14 @@ static void node_composit_exec_rgbtobw(void *UNUSED(data), bNode *node, bNodeSta
}
}
-void register_node_type_cmp_rgbtobw(ListBase *lb)
+void register_node_type_cmp_rgbtobw(bNodeTreeType *ttype)
{
static bNodeType ntype;
- node_type_base(&ntype, CMP_NODE_RGBTOBW, "RGB to BW", NODE_CLASS_CONVERTOR, 0);
+ node_type_base(ttype, &ntype, CMP_NODE_RGBTOBW, "RGB to BW", NODE_CLASS_CONVERTOR, 0);
node_type_socket_templates(&ntype, cmp_node_rgbtobw_in, cmp_node_rgbtobw_out);
node_type_size(&ntype, 80, 40, 120);
node_type_exec(&ntype, node_composit_exec_rgbtobw);
- nodeRegisterType(lb, &ntype);
+ nodeRegisterType(ttype, &ntype);
}
diff --git a/source/blender/nodes/composite/nodes/node_composite_value.c b/source/blender/nodes/composite/nodes/node_composite_value.c
index a38187847fd..3cecb69bc7e 100644
--- a/source/blender/nodes/composite/nodes/node_composite_value.c
+++ b/source/blender/nodes/composite/nodes/node_composite_value.c
@@ -57,17 +57,15 @@ static void node_composit_exec_value(void *UNUSED(data), bNode *node, bNodeStack
out[0]->vec[0]= val;
}
-void register_node_type_cmp_value(ListBase *lb)
+void register_node_type_cmp_value(bNodeTreeType *ttype)
{
static bNodeType ntype;
- node_type_base(&ntype, CMP_NODE_VALUE, "Value", NODE_CLASS_INPUT, NODE_OPTIONS);
+ node_type_base(ttype, &ntype, CMP_NODE_VALUE, "Value", NODE_CLASS_INPUT, NODE_OPTIONS);
node_type_socket_templates(&ntype, NULL, cmp_node_value_out);
node_type_init(&ntype, node_composit_init_value);
node_type_size(&ntype, 80, 40, 120);
node_type_exec(&ntype, node_composit_exec_value);
- nodeRegisterType(lb, &ntype);
+ nodeRegisterType(ttype, &ntype);
}
-
-
diff --git a/source/blender/nodes/composite/nodes/node_composite_vecBlur.c b/source/blender/nodes/composite/nodes/node_composite_vecBlur.c
index a0fbcec198a..69f896e9bb5 100644
--- a/source/blender/nodes/composite/nodes/node_composite_vecBlur.c
+++ b/source/blender/nodes/composite/nodes/node_composite_vecBlur.c
@@ -94,18 +94,16 @@ static void node_composit_init_vecblur(bNodeTree *UNUSED(ntree), bNode* node, bN
}
/* custom1: itterations, custom2: maxspeed (0 = nolimit) */
-void register_node_type_cmp_vecblur(ListBase *lb)
+void register_node_type_cmp_vecblur(bNodeTreeType *ttype)
{
static bNodeType ntype;
- node_type_base(&ntype, CMP_NODE_VECBLUR, "Vector Blur", NODE_CLASS_OP_FILTER, NODE_OPTIONS);
+ node_type_base(ttype, &ntype, CMP_NODE_VECBLUR, "Vector Blur", NODE_CLASS_OP_FILTER, NODE_OPTIONS);
node_type_socket_templates(&ntype, cmp_node_vecblur_in, cmp_node_vecblur_out);
node_type_size(&ntype, 120, 80, 200);
node_type_init(&ntype, node_composit_init_vecblur);
node_type_storage(&ntype, "NodeBlurData", node_free_standard_storage, node_copy_standard_storage);
node_type_exec(&ntype, node_composit_exec_vecblur);
- nodeRegisterType(lb, &ntype);
+ nodeRegisterType(ttype, &ntype);
}
-
-
diff --git a/source/blender/nodes/composite/nodes/node_composite_viewer.c b/source/blender/nodes/composite/nodes/node_composite_viewer.c
index fcf7fe530bd..6a0c074cdb3 100644
--- a/source/blender/nodes/composite/nodes/node_composite_viewer.c
+++ b/source/blender/nodes/composite/nodes/node_composite_viewer.c
@@ -131,16 +131,18 @@ static void node_composit_init_viewer(bNodeTree *UNUSED(ntree), bNode* node, bNo
iuser->ok= 1;
}
-void register_node_type_cmp_viewer(ListBase *lb)
+void register_node_type_cmp_viewer(bNodeTreeType *ttype)
{
static bNodeType ntype;
- node_type_base(&ntype, CMP_NODE_VIEWER, "Viewer", NODE_CLASS_OUTPUT, NODE_PREVIEW);
+ node_type_base(ttype, &ntype, CMP_NODE_VIEWER, "Viewer", NODE_CLASS_OUTPUT, NODE_PREVIEW);
node_type_socket_templates(&ntype, cmp_node_viewer_in, NULL);
node_type_size(&ntype, 80, 60, 200);
node_type_init(&ntype, node_composit_init_viewer);
node_type_storage(&ntype, "ImageUser", node_free_standard_storage, node_copy_standard_storage);
node_type_exec(&ntype, node_composit_exec_viewer);
+ /* Do not allow muting this node. */
+ node_type_mute(&ntype, NULL, NULL);
- nodeRegisterType(lb, &ntype);
+ nodeRegisterType(ttype, &ntype);
}
diff --git a/source/blender/nodes/composite/nodes/node_composite_zcombine.c b/source/blender/nodes/composite/nodes/node_composite_zcombine.c
index 868c0d2b5f3..57b0b7bbf14 100644
--- a/source/blender/nodes/composite/nodes/node_composite_zcombine.c
+++ b/source/blender/nodes/composite/nodes/node_composite_zcombine.c
@@ -222,15 +222,14 @@ static void node_composit_exec_zcombine(void *data, bNode *node, bNodeStack **in
}
-void register_node_type_cmp_zcombine(ListBase *lb)
+void register_node_type_cmp_zcombine(bNodeTreeType *ttype)
{
static bNodeType ntype;
- node_type_base(&ntype, CMP_NODE_ZCOMBINE, "Z Combine", NODE_CLASS_OP_COLOR, NODE_OPTIONS);
+ node_type_base(ttype, &ntype, CMP_NODE_ZCOMBINE, "Z Combine", NODE_CLASS_OP_COLOR, NODE_OPTIONS);
node_type_socket_templates(&ntype, cmp_node_zcombine_in, cmp_node_zcombine_out);
node_type_size(&ntype, 80, 40, 120);
node_type_exec(&ntype, node_composit_exec_zcombine);
- nodeRegisterType(lb, &ntype);
+ nodeRegisterType(ttype, &ntype);
}
-
diff --git a/source/blender/nodes/intern/node_common.c b/source/blender/nodes/intern/node_common.c
index 11dcf44a288..5ad84da45d2 100644
--- a/source/blender/nodes/intern/node_common.c
+++ b/source/blender/nodes/intern/node_common.c
@@ -973,15 +973,15 @@ bNodeTemplate node_whileloop_template(bNode *node)
/**** FRAME ****/
-void register_node_type_frame(ListBase *lb)
+void register_node_type_frame(bNodeTreeType *ttype)
{
/* frame type is used for all tree types, needs dynamic allocation */
bNodeType *ntype= MEM_callocN(sizeof(bNodeType), "frame node type");
- node_type_base(ntype, NODE_FRAME, "Frame", NODE_CLASS_LAYOUT, NODE_BACKGROUND);
+ node_type_base(ttype, ntype, NODE_FRAME, "Frame", NODE_CLASS_LAYOUT, NODE_BACKGROUND);
node_type_size(ntype, 150, 100, 0);
node_type_compatibility(ntype, NODE_OLD_SHADING|NODE_NEW_SHADING);
ntype->needs_free = 1;
- nodeRegisterType(lb, ntype);
+ nodeRegisterType(ttype, ntype);
}
diff --git a/source/blender/nodes/intern/node_exec.c b/source/blender/nodes/intern/node_exec.c
index b6374aeb386..1def0c31983 100644
--- a/source/blender/nodes/intern/node_exec.c
+++ b/source/blender/nodes/intern/node_exec.c
@@ -276,7 +276,13 @@ void ntreeExecNodes(bNodeTreeExec *exec, void *callerdata, int thread)
node = nodeexec->node;
if(node->need_exec) {
node_get_stack(node, exec->stack, nsin, nsout);
- if(node->typeinfo->execfunc)
+ /* Handle muted nodes...
+ * If the mute func is not set, assume the node should never be muted,
+ * and hence execute it!
+ */
+ if((node->flag & NODE_MUTED) && node->typeinfo->mutefunc)
+ node->typeinfo->mutefunc(callerdata, thread, node, nodeexec->data, nsin, nsout);
+ else if(node->typeinfo->execfunc)
node->typeinfo->execfunc(callerdata, node, nsin, nsout);
else if (node->typeinfo->newexecfunc)
node->typeinfo->newexecfunc(callerdata, thread, node, nodeexec->data, nsin, nsout);
@@ -298,7 +304,13 @@ void ntreeExecThreadNodes(bNodeTreeExec *exec, bNodeThreadStack *nts, void *call
node = nodeexec->node;
if(node->need_exec) {
node_get_stack(node, nts->stack, nsin, nsout);
- if(node->typeinfo->execfunc)
+ /* Handle muted nodes...
+ * If the mute func is not set, assume the node should never be muted,
+ * and hence execute it!
+ */
+ if((node->flag & NODE_MUTED) && node->typeinfo->mutefunc)
+ node->typeinfo->mutefunc(callerdata, thread, node, nodeexec->data, nsin, nsout);
+ else if(node->typeinfo->execfunc)
node->typeinfo->execfunc(callerdata, node, nsin, nsout);
else if (node->typeinfo->newexecfunc)
node->typeinfo->newexecfunc(callerdata, thread, node, nodeexec->data, nsin, nsout);
diff --git a/source/blender/nodes/intern/node_util.c b/source/blender/nodes/intern/node_util.c
index da85dd0a5ea..dabad10f568 100644
--- a/source/blender/nodes/intern/node_util.c
+++ b/source/blender/nodes/intern/node_util.c
@@ -97,3 +97,64 @@ const char *node_filter_label(bNode *node)
RNA_enum_name(node_filter_items, node->custom1, &name);
return name;
}
+
+/* Returns a list of mapping of some input bNodeStack, GPUNodeStack or bNodeSocket
+ * to one or more outputs of the same type.
+ * *ntree or (**nsin, **nsout) or (*gnsin, *gnsout) must not be NULL. */
+ListBase node_mute_get_links(bNodeTree *ntree, bNode *node, bNodeStack **nsin, bNodeStack **nsout,
+ GPUNodeStack *gnsin, GPUNodeStack *gnsout)
+{
+ static int types[] = { SOCK_FLOAT, SOCK_VECTOR, SOCK_RGBA };
+ bNodeLink link = {NULL};
+ ListBase ret;
+ LinkInOutsMuteNode *lnk;
+ int in, out, i;
+
+ ret.first = ret.last = NULL;
+
+ /* Security check! */
+ if(!(ntree || (nsin && nsout) || (gnsin && gnsout)))
+ return ret;
+
+ /* Connect the first input of each type with first output of the same type. */
+
+ link.fromnode = link.tonode = node;
+ for (i=0; i < 3; ++i) {
+ /* find input socket */
+ for (in=0, link.fromsock=node->inputs.first; link.fromsock; in++, link.fromsock=link.fromsock->next) {
+ if (link.fromsock->type==types[i] && (ntree ? nodeCountSocketLinks(ntree, link.fromsock) : nsin ? nsin[in]->hasinput : gnsin[in].hasinput))
+ break;
+ }
+ if (link.fromsock) {
+ for (out=0, link.tosock=node->outputs.first; link.tosock; out++, link.tosock=link.tosock->next) {
+ if (link.tosock->type==types[i] && (ntree ? nodeCountSocketLinks(ntree, link.tosock) : nsout ? nsout[out]->hasoutput : gnsout[out].hasoutput))
+ break;
+ }
+ if (link.tosock) {
+ if(nsin && nsout) {
+ lnk = MEM_mallocN(sizeof(LinkInOutsMuteNode), "Muting node: new in to outs link.");
+ lnk->in = nsin[in];
+ lnk->outs = nsout[out];
+ lnk->num_outs = 1;
+ BLI_addtail(&ret, lnk);
+ }
+ else if(gnsin && gnsout) {
+ lnk = MEM_mallocN(sizeof(LinkInOutsMuteNode), "Muting node: new in to outs link.");
+ lnk->in = &gnsin[in];
+ lnk->outs = &gnsout[out];
+ lnk->num_outs = 1;
+ BLI_addtail(&ret, lnk);
+ }
+ else {
+ lnk = MEM_mallocN(sizeof(LinkInOutsMuteNode), "Muting node: new in to outs link.");
+ lnk->in = link.fromsock;
+ lnk->outs = link.tosock;
+ lnk->num_outs = 1;
+ BLI_addtail(&ret, lnk);
+ }
+ }
+ }
+ }
+
+ return ret;
+}
diff --git a/source/blender/nodes/intern/node_util.h b/source/blender/nodes/intern/node_util.h
index d127a49cb4b..7ca090394c3 100644
--- a/source/blender/nodes/intern/node_util.h
+++ b/source/blender/nodes/intern/node_util.h
@@ -41,6 +41,8 @@
#include "NOD_socket.h"
+#include "GPU_material.h" /* For Shader muting GPU code... */
+
struct bNodeTree;
struct bNode;
@@ -59,6 +61,15 @@ const char *node_math_label(struct bNode *node);
const char *node_vect_math_label(struct bNode *node);
const char *node_filter_label(struct bNode *node);
+typedef struct LinkInOutsMuteNode
+{
+ struct LinkInOutsMuteNode *next, *prev;
+ void *in, *outs;
+ unsigned int num_outs; /* If > 1, outs is an array of pointers that need to be freed too! */
+} LinkInOutsMuteNode;
+ListBase node_mute_get_links(struct bNodeTree *ntree, struct bNode *node, struct bNodeStack **nsin,
+ struct bNodeStack **nsout, struct GPUNodeStack *gnsin, struct GPUNodeStack *gnsout);
+
#endif
// this is needed for inlining behaviour
diff --git a/source/blender/nodes/shader/node_shader_tree.c b/source/blender/nodes/shader/node_shader_tree.c
index 6c7667c6729..b3144ff6830 100644
--- a/source/blender/nodes/shader/node_shader_tree.c
+++ b/source/blender/nodes/shader/node_shader_tree.c
@@ -134,7 +134,11 @@ bNodeTreeType ntreeType_Shader = {
/* local_sync */ local_sync,
/* local_merge */ NULL,
/* update */ update,
- /* update_node */ NULL
+ /* update_node */ NULL,
+ /* validate_link */ NULL,
+ /* mute node */ node_shader_pass_on,
+ /* mute links node */ node_mute_get_links,
+ /* gpu mute node */ gpu_shader_pass_on
};
/* GPU material from shader nodes */
diff --git a/source/blender/nodes/shader/node_shader_util.c b/source/blender/nodes/shader/node_shader_util.c
index d601c205682..87585c35e6a 100644
--- a/source/blender/nodes/shader/node_shader_util.c
+++ b/source/blender/nodes/shader/node_shader_util.c
@@ -78,6 +78,54 @@ void nodestack_get_vec(float *in, short type_in, bNodeStack *ns)
/* ******************* execute and parse ************ */
+/* Used for muted nodes, just copy the vec data from input to output… */
+void node_shader_pass_on(void *UNUSED(data), int UNUSED(thread), struct bNode *node, void *UNUSED(nodedata),
+ struct bNodeStack **in, struct bNodeStack **out)
+{
+ ListBase links;
+ LinkInOutsMuteNode *lnk;
+ int i;
+
+ if(node->typeinfo->mutelinksfunc == NULL)
+ return;
+
+ /* Get default muting links (as bNodeStack pointers). */
+ links = node->typeinfo->mutelinksfunc(NULL, node, in, out, NULL, NULL);
+
+ for(lnk = links.first; lnk; lnk = lnk->next) {
+ for(i = 0; i < lnk->num_outs; i++) {
+ copy_v4_v4((((bNodeStack*)(lnk->outs))+i)->vec, ((bNodeStack*)(lnk->in))->vec);
+ }
+ /* If num_outs > 1, lnk->outs was an allocated table of pointers... */
+ if(i > 1)
+ MEM_freeN(lnk->outs);
+ }
+ BLI_freelistN(&links);
+}
+
+int gpu_shader_pass_on(struct GPUMaterial *mat, struct bNode *node, void *UNUSED(nodedata),
+ struct GPUNodeStack *in, struct GPUNodeStack *out)
+{
+ ListBase links;
+ LinkInOutsMuteNode *lnk;
+
+ if(node->typeinfo->mutelinksfunc == NULL)
+ return 0;
+
+ /* Get default muting links (as GPUNodeStack pointers). */
+ links = node->typeinfo->mutelinksfunc(NULL, node, NULL, NULL, in, out);
+
+ for(lnk = links.first; lnk; lnk = lnk->next) {
+ GPU_stack_link_mute(mat, "copy_raw", lnk);
+ /* If num_outs > 1, lnk->outs was an allocated table of pointers... */
+ if(lnk->num_outs > 1)
+ MEM_freeN(lnk->outs);
+ }
+
+ BLI_freelistN(&links);
+ return 1;
+}
+
/* go over all used Geometry and Texture nodes, and return a texco flag */
/* no group inside needed, this function is called for groups too */
void ntreeShaderGetTexcoMode(bNodeTree *ntree, int r_mode, short *texco, int *mode)
@@ -214,7 +262,11 @@ void node_gpu_stack_from_data(struct GPUNodeStack *gs, int type, bNodeStack *ns)
gs->name = "";
gs->hasinput= ns->hasinput && ns->data;
- gs->hasoutput= ns->hasoutput && ns->data;
+ /* XXX Commented out the ns->data check here, as it seems it’s not alwas set,
+ * even though there *is* a valid connection/output... But that might need
+ * further investigation.
+ */
+ gs->hasoutput= ns->hasoutput /*&& ns->data*/;
gs->sockettype= ns->sockettype;
}
@@ -293,7 +345,14 @@ void ntreeExecGPUNodes(bNodeTreeExec *exec, GPUMaterial *mat, int do_outputs)
doit = 1;
if (doit) {
- if(node->typeinfo->gpufunc) {
+ if((node->flag & NODE_MUTED) && node->typeinfo->gpumutefunc) {
+ node_get_stack(node, stack, nsin, nsout);
+ gpu_stack_from_data_list(gpuin, &node->inputs, nsin);
+ gpu_stack_from_data_list(gpuout, &node->outputs, nsout);
+ if(node->typeinfo->gpumutefunc(mat, node, nodeexec->data, gpuin, gpuout))
+ data_from_gpu_stack_list(&node->outputs, nsout, gpuout);
+ }
+ else if(node->typeinfo->gpufunc) {
node_get_stack(node, stack, nsin, nsout);
gpu_stack_from_data_list(gpuin, &node->inputs, nsin);
gpu_stack_from_data_list(gpuout, &node->outputs, nsout);
diff --git a/source/blender/nodes/shader/node_shader_util.h b/source/blender/nodes/shader/node_shader_util.h
index 48e54d9d0b4..d345f3fb310 100644
--- a/source/blender/nodes/shader/node_shader_util.h
+++ b/source/blender/nodes/shader/node_shader_util.h
@@ -128,4 +128,7 @@ void node_shader_gpu_tex_mapping(struct GPUMaterial *mat, struct bNode *node, st
void ntreeExecGPUNodes(struct bNodeTreeExec *exec, struct GPUMaterial *mat, int do_outputs);
+void node_shader_pass_on(void *data, int thread, struct bNode *node, void *nodedata, struct bNodeStack **in, struct bNodeStack **out);
+int gpu_shader_pass_on(struct GPUMaterial *mat, struct bNode *node, void *nodedata, struct GPUNodeStack *in, struct GPUNodeStack *out);
+
#endif
diff --git a/source/blender/nodes/shader/nodes/node_shader_add_shader.c b/source/blender/nodes/shader/nodes/node_shader_add_shader.c
index cddf49dd4d5..c12ff54d24c 100644
--- a/source/blender/nodes/shader/nodes/node_shader_add_shader.c
+++ b/source/blender/nodes/shader/nodes/node_shader_add_shader.c
@@ -46,11 +46,11 @@ static int node_shader_gpu_add_shader(GPUMaterial *mat, bNode *UNUSED(node), GPU
}
/* node type definition */
-void register_node_type_sh_add_shader(ListBase *lb)
+void register_node_type_sh_add_shader(bNodeTreeType *ttype)
{
static bNodeType ntype;
- node_type_base(&ntype, SH_NODE_ADD_SHADER, "Add Shader", NODE_CLASS_SHADER, 0);
+ node_type_base(ttype, &ntype, SH_NODE_ADD_SHADER, "Add Shader", NODE_CLASS_SHADER, 0);
node_type_compatibility(&ntype, NODE_NEW_SHADING);
node_type_socket_templates(&ntype, sh_node_add_shader_in, sh_node_add_shader_out);
node_type_size(&ntype, 150, 60, 200);
@@ -59,6 +59,5 @@ void register_node_type_sh_add_shader(ListBase *lb)
node_type_exec(&ntype, NULL);
node_type_gpu(&ntype, node_shader_gpu_add_shader);
- nodeRegisterType(lb, &ntype);
-};
-
+ nodeRegisterType(ttype, &ntype);
+}
diff --git a/source/blender/nodes/shader/nodes/node_shader_attribute.c b/source/blender/nodes/shader/nodes/node_shader_attribute.c
index 6fb21f123fb..bd0779ae5b1 100644
--- a/source/blender/nodes/shader/nodes/node_shader_attribute.c
+++ b/source/blender/nodes/shader/nodes/node_shader_attribute.c
@@ -43,11 +43,11 @@ static void node_shader_init_attribute(bNodeTree *UNUSED(ntree), bNode* node, bN
}
/* node type definition */
-void register_node_type_sh_attribute(ListBase *lb)
+void register_node_type_sh_attribute(bNodeTreeType *ttype)
{
static bNodeType ntype;
- node_type_base(&ntype, SH_NODE_ATTRIBUTE, "Attribute", NODE_CLASS_INPUT, NODE_OPTIONS);
+ node_type_base(ttype, &ntype, SH_NODE_ATTRIBUTE, "Attribute", NODE_CLASS_INPUT, NODE_OPTIONS);
node_type_compatibility(&ntype, NODE_NEW_SHADING);
node_type_socket_templates(&ntype, NULL, sh_node_attribute_out);
node_type_size(&ntype, 150, 60, 200);
@@ -56,6 +56,5 @@ void register_node_type_sh_attribute(ListBase *lb)
node_type_exec(&ntype, NULL);
node_type_gpu(&ntype, NULL);
- nodeRegisterType(lb, &ntype);
+ nodeRegisterType(ttype, &ntype);
}
-
diff --git a/source/blender/nodes/shader/nodes/node_shader_background.c b/source/blender/nodes/shader/nodes/node_shader_background.c
index 2cdd99da65c..6acdc5baa59 100644
--- a/source/blender/nodes/shader/nodes/node_shader_background.c
+++ b/source/blender/nodes/shader/nodes/node_shader_background.c
@@ -41,11 +41,11 @@ static bNodeSocketTemplate sh_node_background_out[]= {
};
/* node type definition */
-void register_node_type_sh_background(ListBase *lb)
+void register_node_type_sh_background(bNodeTreeType *ttype)
{
static bNodeType ntype;
- node_type_base(&ntype, SH_NODE_BACKGROUND, "Background", NODE_CLASS_SHADER, 0);
+ node_type_base(ttype, &ntype, SH_NODE_BACKGROUND, "Background", NODE_CLASS_SHADER, 0);
node_type_compatibility(&ntype, NODE_NEW_SHADING);
node_type_socket_templates(&ntype, sh_node_background_in, sh_node_background_out);
node_type_size(&ntype, 150, 60, 200);
@@ -54,6 +54,5 @@ void register_node_type_sh_background(ListBase *lb)
node_type_exec(&ntype, NULL);
node_type_gpu(&ntype, NULL);
- nodeRegisterType(lb, &ntype);
-};
-
+ nodeRegisterType(ttype, &ntype);
+}
diff --git a/source/blender/nodes/shader/nodes/node_shader_bsdf_anisotropic.c b/source/blender/nodes/shader/nodes/node_shader_bsdf_anisotropic.c
index e19d867a057..2fd41fed92f 100644
--- a/source/blender/nodes/shader/nodes/node_shader_bsdf_anisotropic.c
+++ b/source/blender/nodes/shader/nodes/node_shader_bsdf_anisotropic.c
@@ -47,11 +47,11 @@ static int node_shader_gpu_bsdf_anisotropic(GPUMaterial *mat, bNode *UNUSED(node
}
/* node type definition */
-void register_node_type_sh_bsdf_anisotropic(ListBase *lb)
+void register_node_type_sh_bsdf_anisotropic(bNodeTreeType *ttype)
{
static bNodeType ntype;
- node_type_base(&ntype, SH_NODE_BSDF_ANISOTROPIC, "Glossy Anisotropic BSDF", NODE_CLASS_SHADER, 0);
+ node_type_base(ttype, &ntype, SH_NODE_BSDF_ANISOTROPIC, "Glossy Anisotropic BSDF", NODE_CLASS_SHADER, 0);
node_type_compatibility(&ntype, NODE_NEW_SHADING);
node_type_socket_templates(&ntype, sh_node_bsdf_anisotropic_in, sh_node_bsdf_anisotropic_out);
node_type_size(&ntype, 150, 60, 200);
@@ -60,6 +60,5 @@ void register_node_type_sh_bsdf_anisotropic(ListBase *lb)
node_type_exec(&ntype, NULL);
node_type_gpu(&ntype, node_shader_gpu_bsdf_anisotropic);
- nodeRegisterType(lb, &ntype);
-};
-
+ nodeRegisterType(ttype, &ntype);
+}
diff --git a/source/blender/nodes/shader/nodes/node_shader_bsdf_diffuse.c b/source/blender/nodes/shader/nodes/node_shader_bsdf_diffuse.c
index cbc82969588..114581f8a20 100644
--- a/source/blender/nodes/shader/nodes/node_shader_bsdf_diffuse.c
+++ b/source/blender/nodes/shader/nodes/node_shader_bsdf_diffuse.c
@@ -46,11 +46,11 @@ static int node_shader_gpu_bsdf_diffuse(GPUMaterial *mat, bNode *UNUSED(node), G
}
/* node type definition */
-void register_node_type_sh_bsdf_diffuse(ListBase *lb)
+void register_node_type_sh_bsdf_diffuse(bNodeTreeType *ttype)
{
static bNodeType ntype;
- node_type_base(&ntype, SH_NODE_BSDF_DIFFUSE, "Diffuse BSDF", NODE_CLASS_SHADER, 0);
+ node_type_base(ttype, &ntype, SH_NODE_BSDF_DIFFUSE, "Diffuse BSDF", NODE_CLASS_SHADER, 0);
node_type_compatibility(&ntype, NODE_NEW_SHADING);
node_type_socket_templates(&ntype, sh_node_bsdf_diffuse_in, sh_node_bsdf_diffuse_out);
node_type_size(&ntype, 150, 60, 200);
@@ -59,6 +59,5 @@ void register_node_type_sh_bsdf_diffuse(ListBase *lb)
node_type_exec(&ntype, NULL);
node_type_gpu(&ntype, node_shader_gpu_bsdf_diffuse);
- nodeRegisterType(lb, &ntype);
-};
-
+ nodeRegisterType(ttype, &ntype);
+}
diff --git a/source/blender/nodes/shader/nodes/node_shader_bsdf_glass.c b/source/blender/nodes/shader/nodes/node_shader_bsdf_glass.c
index 2652385e273..89d469a6a4d 100644
--- a/source/blender/nodes/shader/nodes/node_shader_bsdf_glass.c
+++ b/source/blender/nodes/shader/nodes/node_shader_bsdf_glass.c
@@ -47,11 +47,11 @@ static int node_shader_gpu_bsdf_glass(GPUMaterial *mat, bNode *UNUSED(node), GPU
}
/* node type definition */
-void register_node_type_sh_bsdf_glass(ListBase *lb)
+void register_node_type_sh_bsdf_glass(bNodeTreeType *ttype)
{
static bNodeType ntype;
- node_type_base(&ntype, SH_NODE_BSDF_GLASS, "Glass BSDF", NODE_CLASS_SHADER, NODE_OPTIONS);
+ node_type_base(ttype, &ntype, SH_NODE_BSDF_GLASS, "Glass BSDF", NODE_CLASS_SHADER, NODE_OPTIONS);
node_type_compatibility(&ntype, NODE_NEW_SHADING);
node_type_socket_templates(&ntype, sh_node_bsdf_glass_in, sh_node_bsdf_glass_out);
node_type_size(&ntype, 150, 60, 200);
@@ -60,6 +60,5 @@ void register_node_type_sh_bsdf_glass(ListBase *lb)
node_type_exec(&ntype, NULL);
node_type_gpu(&ntype, node_shader_gpu_bsdf_glass);
- nodeRegisterType(lb, &ntype);
-};
-
+ nodeRegisterType(ttype, &ntype);
+}
diff --git a/source/blender/nodes/shader/nodes/node_shader_bsdf_glossy.c b/source/blender/nodes/shader/nodes/node_shader_bsdf_glossy.c
index 03c1ca29de1..000a211805b 100644
--- a/source/blender/nodes/shader/nodes/node_shader_bsdf_glossy.c
+++ b/source/blender/nodes/shader/nodes/node_shader_bsdf_glossy.c
@@ -47,11 +47,11 @@ static int node_shader_gpu_bsdf_glossy(GPUMaterial *mat, bNode *UNUSED(node), GP
}
/* node type definition */
-void register_node_type_sh_bsdf_glossy(ListBase *lb)
+void register_node_type_sh_bsdf_glossy(bNodeTreeType *ttype)
{
static bNodeType ntype;
- node_type_base(&ntype, SH_NODE_BSDF_GLOSSY, "Glossy BSDF", NODE_CLASS_SHADER, NODE_OPTIONS);
+ node_type_base(ttype, &ntype, SH_NODE_BSDF_GLOSSY, "Glossy BSDF", NODE_CLASS_SHADER, NODE_OPTIONS);
node_type_compatibility(&ntype, NODE_NEW_SHADING);
node_type_socket_templates(&ntype, sh_node_bsdf_glossy_in, sh_node_bsdf_glossy_out);
node_type_size(&ntype, 150, 60, 200);
@@ -60,6 +60,5 @@ void register_node_type_sh_bsdf_glossy(ListBase *lb)
node_type_exec(&ntype, NULL);
node_type_gpu(&ntype, node_shader_gpu_bsdf_glossy);
- nodeRegisterType(lb, &ntype);
-};
-
+ nodeRegisterType(ttype, &ntype);
+}
diff --git a/source/blender/nodes/shader/nodes/node_shader_bsdf_translucent.c b/source/blender/nodes/shader/nodes/node_shader_bsdf_translucent.c
index 74db25f3b13..60fe847ac11 100644
--- a/source/blender/nodes/shader/nodes/node_shader_bsdf_translucent.c
+++ b/source/blender/nodes/shader/nodes/node_shader_bsdf_translucent.c
@@ -45,11 +45,11 @@ static int node_shader_gpu_bsdf_translucent(GPUMaterial *mat, bNode *UNUSED(node
}
/* node type definition */
-void register_node_type_sh_bsdf_translucent(ListBase *lb)
+void register_node_type_sh_bsdf_translucent(bNodeTreeType *ttype)
{
static bNodeType ntype;
- node_type_base(&ntype, SH_NODE_BSDF_TRANSLUCENT, "Translucent BSDF", NODE_CLASS_SHADER, 0);
+ node_type_base(ttype, &ntype, SH_NODE_BSDF_TRANSLUCENT, "Translucent BSDF", NODE_CLASS_SHADER, 0);
node_type_compatibility(&ntype, NODE_NEW_SHADING);
node_type_socket_templates(&ntype, sh_node_bsdf_translucent_in, sh_node_bsdf_translucent_out);
node_type_size(&ntype, 150, 60, 200);
@@ -58,6 +58,5 @@ void register_node_type_sh_bsdf_translucent(ListBase *lb)
node_type_exec(&ntype, NULL);
node_type_gpu(&ntype, node_shader_gpu_bsdf_translucent);
- nodeRegisterType(lb, &ntype);
-};
-
+ nodeRegisterType(ttype, &ntype);
+}
diff --git a/source/blender/nodes/shader/nodes/node_shader_bsdf_transparent.c b/source/blender/nodes/shader/nodes/node_shader_bsdf_transparent.c
index c74786441f0..301e6dfabab 100644
--- a/source/blender/nodes/shader/nodes/node_shader_bsdf_transparent.c
+++ b/source/blender/nodes/shader/nodes/node_shader_bsdf_transparent.c
@@ -45,11 +45,11 @@ static int node_shader_gpu_bsdf_transparent(GPUMaterial *mat, bNode *UNUSED(node
}
/* node type definition */
-void register_node_type_sh_bsdf_transparent(ListBase *lb)
+void register_node_type_sh_bsdf_transparent(bNodeTreeType *ttype)
{
static bNodeType ntype;
- node_type_base(&ntype, SH_NODE_BSDF_TRANSPARENT, "Transparent BSDF", NODE_CLASS_SHADER, 0);
+ node_type_base(ttype, &ntype, SH_NODE_BSDF_TRANSPARENT, "Transparent BSDF", NODE_CLASS_SHADER, 0);
node_type_compatibility(&ntype, NODE_NEW_SHADING);
node_type_socket_templates(&ntype, sh_node_bsdf_transparent_in, sh_node_bsdf_transparent_out);
node_type_size(&ntype, 150, 60, 200);
@@ -58,6 +58,5 @@ void register_node_type_sh_bsdf_transparent(ListBase *lb)
node_type_exec(&ntype, NULL);
node_type_gpu(&ntype, node_shader_gpu_bsdf_transparent);
- nodeRegisterType(lb, &ntype);
-};
-
+ nodeRegisterType(ttype, &ntype);
+}
diff --git a/source/blender/nodes/shader/nodes/node_shader_bsdf_velvet.c b/source/blender/nodes/shader/nodes/node_shader_bsdf_velvet.c
index 7ca38fc0af7..fefcf4caeaf 100644
--- a/source/blender/nodes/shader/nodes/node_shader_bsdf_velvet.c
+++ b/source/blender/nodes/shader/nodes/node_shader_bsdf_velvet.c
@@ -46,11 +46,11 @@ static int node_shader_gpu_bsdf_velvet(GPUMaterial *mat, bNode *UNUSED(node), GP
}
/* node type definition */
-void register_node_type_sh_bsdf_velvet(ListBase *lb)
+void register_node_type_sh_bsdf_velvet(bNodeTreeType *ttype)
{
static bNodeType ntype;
- node_type_base(&ntype, SH_NODE_BSDF_VELVET, "Velvet BSDF", NODE_CLASS_SHADER, 0);
+ node_type_base(ttype, &ntype, SH_NODE_BSDF_VELVET, "Velvet BSDF", NODE_CLASS_SHADER, 0);
node_type_compatibility(&ntype, NODE_NEW_SHADING);
node_type_socket_templates(&ntype, sh_node_bsdf_velvet_in, sh_node_bsdf_velvet_out);
node_type_size(&ntype, 150, 60, 200);
@@ -59,6 +59,5 @@ void register_node_type_sh_bsdf_velvet(ListBase *lb)
node_type_exec(&ntype, NULL);
node_type_gpu(&ntype, node_shader_gpu_bsdf_velvet);
- nodeRegisterType(lb, &ntype);
-};
-
+ nodeRegisterType(ttype, &ntype);
+}
diff --git a/source/blender/nodes/shader/nodes/node_shader_camera.c b/source/blender/nodes/shader/nodes/node_shader_camera.c
index 02efbd63aba..d95cc1460df 100644
--- a/source/blender/nodes/shader/nodes/node_shader_camera.c
+++ b/source/blender/nodes/shader/nodes/node_shader_camera.c
@@ -57,11 +57,11 @@ static int gpu_shader_camera(GPUMaterial *mat, bNode *UNUSED(node), GPUNodeStack
return GPU_stack_link(mat, "camera", in, out, GPU_builtin(GPU_VIEW_POSITION));
}
-void register_node_type_sh_camera(ListBase *lb)
+void register_node_type_sh_camera(bNodeTreeType *ttype)
{
static bNodeType ntype;
- node_type_base(&ntype, SH_NODE_CAMERA, "Camera Data", NODE_CLASS_INPUT, 0);
+ node_type_base(ttype, &ntype, SH_NODE_CAMERA, "Camera Data", NODE_CLASS_INPUT, 0);
node_type_compatibility(&ntype, NODE_OLD_SHADING);
node_type_socket_templates(&ntype, NULL, sh_node_camera_out);
node_type_size(&ntype, 95, 95, 120);
@@ -69,7 +69,5 @@ void register_node_type_sh_camera(ListBase *lb)
node_type_exec(&ntype, node_shader_exec_camera);
node_type_gpu(&ntype, gpu_shader_camera);
- nodeRegisterType(lb, &ntype);
+ nodeRegisterType(ttype, &ntype);
}
-
-
diff --git a/source/blender/nodes/shader/nodes/node_shader_common.c b/source/blender/nodes/shader/nodes/node_shader_common.c
index ff995e02ca6..f75cecfe83b 100644
--- a/source/blender/nodes/shader/nodes/node_shader_common.c
+++ b/source/blender/nodes/shader/nodes/node_shader_common.c
@@ -180,11 +180,11 @@ static int gpu_group_execute(GPUMaterial *mat, bNode *node, void *nodedata, GPUN
return 1;
}
-void register_node_type_sh_group(ListBase *lb)
+void register_node_type_sh_group(bNodeTreeType *ttype)
{
static bNodeType ntype;
- node_type_base(&ntype, NODE_GROUP, "Group", NODE_CLASS_GROUP, NODE_OPTIONS|NODE_CONST_OUTPUT);
+ node_type_base(ttype, &ntype, NODE_GROUP, "Group", NODE_CLASS_GROUP, NODE_OPTIONS|NODE_CONST_OUTPUT);
node_type_socket_templates(&ntype, NULL, NULL);
node_type_size(&ntype, 120, 60, 200);
node_type_label(&ntype, node_group_label);
@@ -196,7 +196,7 @@ void register_node_type_sh_group(ListBase *lb)
node_type_exec_new(&ntype, group_initexec, group_freeexec, group_execute);
node_type_gpu_ext(&ntype, gpu_group_execute);
- nodeRegisterType(lb, &ntype);
+ nodeRegisterType(ttype, &ntype);
}
@@ -242,11 +242,11 @@ static void forloop_execute(void *data, int thread, struct bNode *node, void *no
ntreeReleaseThreadStack(nts);
}
-void register_node_type_sh_forloop(ListBase *lb)
+void register_node_type_sh_forloop(bNodeTreeType *ttype)
{
static bNodeType ntype;
- node_type_base(&ntype, NODE_FORLOOP, "For", NODE_CLASS_GROUP, NODE_OPTIONS);
+ node_type_base(ttype, &ntype, NODE_FORLOOP, "For", NODE_CLASS_GROUP, NODE_OPTIONS);
node_type_socket_templates(&ntype, NULL, NULL);
node_type_size(&ntype, 120, 60, 200);
node_type_label(&ntype, node_group_label);
@@ -258,7 +258,7 @@ void register_node_type_sh_forloop(ListBase *lb)
node_type_group_edit(&ntype, node_group_edit_get, node_group_edit_set, node_group_edit_clear);
node_type_exec_new(&ntype, group_initexec, group_freeexec, forloop_execute);
- nodeRegisterType(lb, &ntype);
+ nodeRegisterType(ttype, &ntype);
}
#endif
@@ -304,11 +304,11 @@ static void whileloop_execute(void *data, int thread, struct bNode *node, void *
ntreeReleaseThreadStack(nts);
}
-void register_node_type_sh_whileloop(ListBase *lb)
+void register_node_type_sh_whileloop(bNodeTreeType *ttype)
{
static bNodeType ntype;
- node_type_base(&ntype, NODE_WHILELOOP, "While", NODE_CLASS_GROUP, NODE_OPTIONS);
+ node_type_base(ttype, &ntype, NODE_WHILELOOP, "While", NODE_CLASS_GROUP, NODE_OPTIONS);
node_type_socket_templates(&ntype, NULL, NULL);
node_type_size(&ntype, 120, 60, 200);
node_type_label(&ntype, node_group_label);
@@ -320,6 +320,6 @@ void register_node_type_sh_whileloop(ListBase *lb)
node_type_group_edit(&ntype, node_group_edit_get, node_group_edit_set, node_group_edit_clear);
node_type_exec_new(&ntype, group_initexec, group_freeexec, whileloop_execute);
- nodeRegisterType(lb, &ntype);
+ nodeRegisterType(ttype, &ntype);
}
#endif
diff --git a/source/blender/nodes/shader/nodes/node_shader_curves.c b/source/blender/nodes/shader/nodes/node_shader_curves.c
index 7ac05bb28bf..d30434f4e32 100644
--- a/source/blender/nodes/shader/nodes/node_shader_curves.c
+++ b/source/blender/nodes/shader/nodes/node_shader_curves.c
@@ -69,11 +69,11 @@ static int gpu_shader_curve_vec(GPUMaterial *mat, bNode *node, GPUNodeStack *in,
return GPU_stack_link(mat, "curves_vec", in, out, GPU_texture(size, array));
}
-void register_node_type_sh_curve_vec(ListBase *lb)
+void register_node_type_sh_curve_vec(bNodeTreeType *ttype)
{
static bNodeType ntype;
- node_type_base(&ntype, SH_NODE_CURVE_VEC, "Vector Curves", NODE_CLASS_OP_VECTOR, NODE_OPTIONS);
+ node_type_base(ttype, &ntype, SH_NODE_CURVE_VEC, "Vector Curves", NODE_CLASS_OP_VECTOR, NODE_OPTIONS);
node_type_compatibility(&ntype, NODE_OLD_SHADING);
node_type_socket_templates(&ntype, sh_node_curve_vec_in, sh_node_curve_vec_out);
node_type_size(&ntype, 200, 140, 320);
@@ -82,7 +82,7 @@ void register_node_type_sh_curve_vec(ListBase *lb)
node_type_exec(&ntype, node_shader_exec_curve_vec);
node_type_gpu(&ntype, gpu_shader_curve_vec);
- nodeRegisterType(lb, &ntype);
+ nodeRegisterType(ttype, &ntype);
}
@@ -124,11 +124,11 @@ static int gpu_shader_curve_rgb(GPUMaterial *mat, bNode *node, GPUNodeStack *in,
return GPU_stack_link(mat, "curves_rgb", in, out, GPU_texture(size, array));
}
-void register_node_type_sh_curve_rgb(ListBase *lb)
+void register_node_type_sh_curve_rgb(bNodeTreeType *ttype)
{
static bNodeType ntype;
- node_type_base(&ntype, SH_NODE_CURVE_RGB, "RGB Curves", NODE_CLASS_OP_COLOR, NODE_OPTIONS);
+ node_type_base(ttype, &ntype, SH_NODE_CURVE_RGB, "RGB Curves", NODE_CLASS_OP_COLOR, NODE_OPTIONS);
node_type_compatibility(&ntype, NODE_OLD_SHADING);
node_type_socket_templates(&ntype, sh_node_curve_rgb_in, sh_node_curve_rgb_out);
node_type_size(&ntype, 200, 140, 320);
@@ -137,6 +137,5 @@ void register_node_type_sh_curve_rgb(ListBase *lb)
node_type_exec(&ntype, node_shader_exec_curve_rgb);
node_type_gpu(&ntype, gpu_shader_curve_rgb);
- nodeRegisterType(lb, &ntype);
+ nodeRegisterType(ttype, &ntype);
}
-
diff --git a/source/blender/nodes/shader/nodes/node_shader_dynamic.c b/source/blender/nodes/shader/nodes/node_shader_dynamic.c
index 51ddb865c54..5e7c99f7276 100644
--- a/source/blender/nodes/shader/nodes/node_shader_dynamic.c
+++ b/source/blender/nodes/shader/nodes/node_shader_dynamic.c
@@ -761,32 +761,30 @@ static void node_dynamic_exec_cb(void *data, bNode *node, bNodeStack **in, bNode
#endif
}
-void register_node_type_sh_dynamic(ListBase *lb)
+void register_node_type_sh_dynamic(bNodeTreeType *ttype)
{
static bNodeType ntype;
- node_type_base(&ntype, NODE_DYNAMIC, "Dynamic", NODE_CLASS_OP_DYNAMIC, NODE_OPTIONS, NULL, NULL);
+ node_type_base(ttype, &ntype, NODE_DYNAMIC, "Dynamic", NODE_CLASS_OP_DYNAMIC, NODE_OPTIONS, NULL, NULL);
node_type_compatibility(&ntype, NODE_OLD_SHADING);
node_type_size(&ntype, 150, 60, 300);
node_type_init(&ntype, node_dynamic_init_cb);
node_type_storage(&ntype, "NodeScriptDict", node_dynamic_free_storage_cb, node_dynamic_copy_cb);
node_type_exec(&ntype, node_dynamic_exec_cb);
- nodeRegisterType(lb, &ntype);
+ nodeRegisterType(ttype, &ntype);
}
#else
-void register_node_type_sh_dynamic(ListBase *lb)
+void register_node_type_sh_dynamic(bNodeTreeType *ttype)
{
static bNodeType ntype;
- node_type_base(&ntype, NODE_DYNAMIC, "Dynamic", NODE_CLASS_OP_DYNAMIC, 0);
+ node_type_base(ttype, &ntype, NODE_DYNAMIC, "Dynamic", NODE_CLASS_OP_DYNAMIC, 0);
node_type_compatibility(&ntype, NODE_OLD_SHADING);
- nodeRegisterType(lb, &ntype);
+ nodeRegisterType(ttype, &ntype);
}
#endif
-
-
diff --git a/source/blender/nodes/shader/nodes/node_shader_emission.c b/source/blender/nodes/shader/nodes/node_shader_emission.c
index 9b9d95086ce..9eb8fc98c69 100644
--- a/source/blender/nodes/shader/nodes/node_shader_emission.c
+++ b/source/blender/nodes/shader/nodes/node_shader_emission.c
@@ -46,11 +46,11 @@ static int node_shader_gpu_emission(GPUMaterial *mat, bNode *UNUSED(node), GPUNo
}
/* node type definition */
-void register_node_type_sh_emission(ListBase *lb)
+void register_node_type_sh_emission(bNodeTreeType *ttype)
{
static bNodeType ntype;
- node_type_base(&ntype, SH_NODE_EMISSION, "Emission", NODE_CLASS_SHADER, 0);
+ node_type_base(ttype, &ntype, SH_NODE_EMISSION, "Emission", NODE_CLASS_SHADER, 0);
node_type_compatibility(&ntype, NODE_NEW_SHADING);
node_type_socket_templates(&ntype, sh_node_emission_in, sh_node_emission_out);
node_type_size(&ntype, 150, 60, 200);
@@ -59,6 +59,5 @@ void register_node_type_sh_emission(ListBase *lb)
node_type_exec(&ntype, NULL);
node_type_gpu(&ntype, node_shader_gpu_emission);
- nodeRegisterType(lb, &ntype);
-};
-
+ nodeRegisterType(ttype, &ntype);
+}
diff --git a/source/blender/nodes/shader/nodes/node_shader_fresnel.c b/source/blender/nodes/shader/nodes/node_shader_fresnel.c
index b98fa191beb..8e5350c2167 100644
--- a/source/blender/nodes/shader/nodes/node_shader_fresnel.c
+++ b/source/blender/nodes/shader/nodes/node_shader_fresnel.c
@@ -45,11 +45,11 @@ static int node_shader_gpu_fresnel(GPUMaterial *mat, bNode *UNUSED(node), GPUNod
}
/* node type definition */
-void register_node_type_sh_fresnel(ListBase *lb)
+void register_node_type_sh_fresnel(bNodeTreeType *ttype)
{
static bNodeType ntype;
- node_type_base(&ntype, SH_NODE_FRESNEL, "Fresnel", NODE_CLASS_INPUT, 0);
+ node_type_base(ttype, &ntype, SH_NODE_FRESNEL, "Fresnel", NODE_CLASS_INPUT, 0);
node_type_compatibility(&ntype, NODE_NEW_SHADING);
node_type_socket_templates(&ntype, sh_node_fresnel_in, sh_node_fresnel_out);
node_type_size(&ntype, 150, 60, 200);
@@ -58,6 +58,5 @@ void register_node_type_sh_fresnel(ListBase *lb)
node_type_exec(&ntype, NULL);
node_type_gpu(&ntype, node_shader_gpu_fresnel);
- nodeRegisterType(lb, &ntype);
-};
-
+ nodeRegisterType(ttype, &ntype);
+}
diff --git a/source/blender/nodes/shader/nodes/node_shader_geom.c b/source/blender/nodes/shader/nodes/node_shader_geom.c
index 6547194b33a..2b28eae4085 100644
--- a/source/blender/nodes/shader/nodes/node_shader_geom.c
+++ b/source/blender/nodes/shader/nodes/node_shader_geom.c
@@ -138,11 +138,11 @@ static int gpu_shader_geom(GPUMaterial *mat, bNode *node, GPUNodeStack *in, GPUN
}
/* node type definition */
-void register_node_type_sh_geom(ListBase *lb)
+void register_node_type_sh_geom(bNodeTreeType *ttype)
{
static bNodeType ntype;
- node_type_base(&ntype, SH_NODE_GEOMETRY, "Geometry", NODE_CLASS_INPUT, NODE_OPTIONS);
+ node_type_base(ttype, &ntype, SH_NODE_GEOMETRY, "Geometry", NODE_CLASS_INPUT, NODE_OPTIONS);
node_type_compatibility(&ntype, NODE_OLD_SHADING);
node_type_socket_templates(&ntype, NULL, sh_node_geom_out);
node_type_size(&ntype, 120, 80, 160);
@@ -151,6 +151,5 @@ void register_node_type_sh_geom(ListBase *lb)
node_type_exec(&ntype, node_shader_exec_geom);
node_type_gpu(&ntype, gpu_shader_geom);
- nodeRegisterType(lb, &ntype);
+ nodeRegisterType(ttype, &ntype);
}
-
diff --git a/source/blender/nodes/shader/nodes/node_shader_geometry.c b/source/blender/nodes/shader/nodes/node_shader_geometry.c
index 2bbdf3c23bb..6b576b0c0d1 100644
--- a/source/blender/nodes/shader/nodes/node_shader_geometry.c
+++ b/source/blender/nodes/shader/nodes/node_shader_geometry.c
@@ -48,11 +48,11 @@ static int node_shader_gpu_geometry(GPUMaterial *mat, bNode *UNUSED(node), GPUNo
}
/* node type definition */
-void register_node_type_sh_geometry(ListBase *lb)
+void register_node_type_sh_geometry(bNodeTreeType *ttype)
{
static bNodeType ntype;
- node_type_base(&ntype, SH_NODE_NEW_GEOMETRY, "Geometry", NODE_CLASS_INPUT, 0);
+ node_type_base(ttype, &ntype, SH_NODE_NEW_GEOMETRY, "Geometry", NODE_CLASS_INPUT, 0);
node_type_compatibility(&ntype, NODE_NEW_SHADING);
node_type_socket_templates(&ntype, NULL, sh_node_geometry_out);
node_type_size(&ntype, 120, 60, 200);
@@ -61,6 +61,5 @@ void register_node_type_sh_geometry(ListBase *lb)
node_type_exec(&ntype, NULL);
node_type_gpu(&ntype, node_shader_gpu_geometry);
- nodeRegisterType(lb, &ntype);
-};
-
+ nodeRegisterType(ttype, &ntype);
+}
diff --git a/source/blender/nodes/shader/nodes/node_shader_holdout.c b/source/blender/nodes/shader/nodes/node_shader_holdout.c
index f08217f3a92..81dceafe21f 100644
--- a/source/blender/nodes/shader/nodes/node_shader_holdout.c
+++ b/source/blender/nodes/shader/nodes/node_shader_holdout.c
@@ -40,11 +40,11 @@ static bNodeSocketTemplate sh_node_holdout_out[]= {
/* node type definition */
-void register_node_type_sh_holdout(ListBase *lb)
+void register_node_type_sh_holdout(bNodeTreeType *ttype)
{
static bNodeType ntype;
- node_type_base(&ntype, SH_NODE_HOLDOUT, "Holdout", NODE_CLASS_SHADER, 0);
+ node_type_base(ttype, &ntype, SH_NODE_HOLDOUT, "Holdout", NODE_CLASS_SHADER, 0);
node_type_compatibility(&ntype, NODE_NEW_SHADING);
node_type_socket_templates(&ntype, sh_node_holdout_in, sh_node_holdout_out);
node_type_size(&ntype, 150, 60, 200);
@@ -53,6 +53,5 @@ void register_node_type_sh_holdout(ListBase *lb)
node_type_exec(&ntype, NULL);
node_type_gpu(&ntype, NULL);
- nodeRegisterType(lb, &ntype);
-};
-
+ nodeRegisterType(ttype, &ntype);
+}
diff --git a/source/blender/nodes/shader/nodes/node_shader_hueSatVal.c b/source/blender/nodes/shader/nodes/node_shader_hueSatVal.c
index 1207196381d..bfdcb5d0917 100644
--- a/source/blender/nodes/shader/nodes/node_shader_hueSatVal.c
+++ b/source/blender/nodes/shader/nodes/node_shader_hueSatVal.c
@@ -80,19 +80,16 @@ static int gpu_shader_hue_sat(GPUMaterial *mat, bNode *UNUSED(node), GPUNodeStac
return GPU_stack_link(mat, "hue_sat", in, out);
}
-void register_node_type_sh_hue_sat(ListBase *lb)
+void register_node_type_sh_hue_sat(bNodeTreeType *ttype)
{
static bNodeType ntype;
- node_type_base(&ntype, SH_NODE_HUE_SAT, "Hue Saturation Value", NODE_CLASS_OP_COLOR, NODE_OPTIONS);
+ node_type_base(ttype, &ntype, SH_NODE_HUE_SAT, "Hue Saturation Value", NODE_CLASS_OP_COLOR, NODE_OPTIONS);
node_type_compatibility(&ntype, NODE_OLD_SHADING);
node_type_socket_templates(&ntype, sh_node_hue_sat_in, sh_node_hue_sat_out);
node_type_size(&ntype, 150, 80, 250);
node_type_exec(&ntype, node_shader_exec_hue_sat);
node_type_gpu(&ntype, gpu_shader_hue_sat);
- nodeRegisterType(lb, &ntype);
+ nodeRegisterType(ttype, &ntype);
}
-
-
-
diff --git a/source/blender/nodes/shader/nodes/node_shader_invert.c b/source/blender/nodes/shader/nodes/node_shader_invert.c
index e3dacefbcf2..6d21b93fb65 100644
--- a/source/blender/nodes/shader/nodes/node_shader_invert.c
+++ b/source/blender/nodes/shader/nodes/node_shader_invert.c
@@ -72,18 +72,16 @@ static int gpu_shader_invert(GPUMaterial *mat, bNode *UNUSED(node), GPUNodeStack
return GPU_stack_link(mat, "invert", in, out);
}
-void register_node_type_sh_invert(ListBase *lb)
+void register_node_type_sh_invert(bNodeTreeType *ttype)
{
static bNodeType ntype;
- node_type_base(&ntype, SH_NODE_INVERT, "Invert", NODE_CLASS_OP_COLOR, NODE_OPTIONS);
+ node_type_base(ttype, &ntype, SH_NODE_INVERT, "Invert", NODE_CLASS_OP_COLOR, NODE_OPTIONS);
node_type_compatibility(&ntype, NODE_OLD_SHADING);
node_type_socket_templates(&ntype, sh_node_invert_in, sh_node_invert_out);
node_type_size(&ntype, 90, 80, 100);
node_type_exec(&ntype, node_shader_exec_invert);
node_type_gpu(&ntype, gpu_shader_invert);
- nodeRegisterType(lb, &ntype);
+ nodeRegisterType(ttype, &ntype);
}
-
-
diff --git a/source/blender/nodes/shader/nodes/node_shader_layer_weight.c b/source/blender/nodes/shader/nodes/node_shader_layer_weight.c
index 39c7173bd16..bcd7fb8639d 100644
--- a/source/blender/nodes/shader/nodes/node_shader_layer_weight.c
+++ b/source/blender/nodes/shader/nodes/node_shader_layer_weight.c
@@ -46,11 +46,11 @@ static int node_shader_gpu_layer_weight(GPUMaterial *UNUSED(mat), bNode *UNUSED(
}
/* node type definition */
-void register_node_type_sh_layer_weight(ListBase *lb)
+void register_node_type_sh_layer_weight(bNodeTreeType *ttype)
{
static bNodeType ntype;
- node_type_base(&ntype, SH_NODE_LAYER_WEIGHT, "Layer Weight", NODE_CLASS_INPUT, 0);
+ node_type_base(ttype, &ntype, SH_NODE_LAYER_WEIGHT, "Layer Weight", NODE_CLASS_INPUT, 0);
node_type_compatibility(&ntype, NODE_NEW_SHADING);
node_type_socket_templates(&ntype, sh_node_layer_weight_in, sh_node_layer_weight_out);
node_type_size(&ntype, 150, 60, 200);
@@ -59,6 +59,5 @@ void register_node_type_sh_layer_weight(ListBase *lb)
node_type_exec(&ntype, NULL);
node_type_gpu(&ntype, node_shader_gpu_layer_weight);
- nodeRegisterType(lb, &ntype);
-};
-
+ nodeRegisterType(ttype, &ntype);
+}
diff --git a/source/blender/nodes/shader/nodes/node_shader_light_path.c b/source/blender/nodes/shader/nodes/node_shader_light_path.c
index b64b9bf8b11..5d7a3014682 100644
--- a/source/blender/nodes/shader/nodes/node_shader_light_path.c
+++ b/source/blender/nodes/shader/nodes/node_shader_light_path.c
@@ -46,11 +46,11 @@ static int node_shader_gpu_light_path(GPUMaterial *mat, bNode *UNUSED(node), GPU
}
/* node type definition */
-void register_node_type_sh_light_path(ListBase *lb)
+void register_node_type_sh_light_path(bNodeTreeType *ttype)
{
static bNodeType ntype;
- node_type_base(&ntype, SH_NODE_LIGHT_PATH, "Light Path", NODE_CLASS_INPUT, 0);
+ node_type_base(ttype, &ntype, SH_NODE_LIGHT_PATH, "Light Path", NODE_CLASS_INPUT, 0);
node_type_compatibility(&ntype, NODE_NEW_SHADING);
node_type_socket_templates(&ntype, NULL, sh_node_light_path_out);
node_type_size(&ntype, 150, 60, 200);
@@ -59,6 +59,5 @@ void register_node_type_sh_light_path(ListBase *lb)
node_type_exec(&ntype, NULL);
node_type_gpu(&ntype, node_shader_gpu_light_path);
- nodeRegisterType(lb, &ntype);
-};
-
+ nodeRegisterType(ttype, &ntype);
+}
diff --git a/source/blender/nodes/shader/nodes/node_shader_mapping.c b/source/blender/nodes/shader/nodes/node_shader_mapping.c
index 2fa885dcdd3..c2a58d49161 100644
--- a/source/blender/nodes/shader/nodes/node_shader_mapping.c
+++ b/source/blender/nodes/shader/nodes/node_shader_mapping.c
@@ -86,11 +86,11 @@ static int gpu_shader_mapping(GPUMaterial *mat, bNode *node, GPUNodeStack *in, G
return GPU_stack_link(mat, "mapping", in, out, tmat, tmin, tmax, tdomin, tdomax);
}
-void register_node_type_sh_mapping(ListBase *lb)
+void register_node_type_sh_mapping(bNodeTreeType *ttype)
{
static bNodeType ntype;
- node_type_base(&ntype, SH_NODE_MAPPING, "Mapping", NODE_CLASS_OP_VECTOR, NODE_OPTIONS);
+ node_type_base(ttype, &ntype, SH_NODE_MAPPING, "Mapping", NODE_CLASS_OP_VECTOR, NODE_OPTIONS);
node_type_compatibility(&ntype, NODE_OLD_SHADING|NODE_NEW_SHADING);
node_type_socket_templates(&ntype, sh_node_mapping_in, sh_node_mapping_out);
node_type_size(&ntype, 240, 160, 320);
@@ -99,5 +99,5 @@ void register_node_type_sh_mapping(ListBase *lb)
node_type_exec(&ntype, node_shader_exec_mapping);
node_type_gpu(&ntype, gpu_shader_mapping);
- nodeRegisterType(lb, &ntype);
+ nodeRegisterType(ttype, &ntype);
}
diff --git a/source/blender/nodes/shader/nodes/node_shader_material.c b/source/blender/nodes/shader/nodes/node_shader_material.c
index a74a2567844..decd3bb225f 100644
--- a/source/blender/nodes/shader/nodes/node_shader_material.c
+++ b/source/blender/nodes/shader/nodes/node_shader_material.c
@@ -300,11 +300,11 @@ static int gpu_shader_material(GPUMaterial *mat, bNode *node, GPUNodeStack *in,
return 0;
}
-void register_node_type_sh_material(ListBase *lb)
+void register_node_type_sh_material(bNodeTreeType *ttype)
{
static bNodeType ntype;
- node_type_base(&ntype, SH_NODE_MATERIAL, "Material", NODE_CLASS_INPUT, NODE_OPTIONS|NODE_PREVIEW);
+ node_type_base(ttype, &ntype, SH_NODE_MATERIAL, "Material", NODE_CLASS_INPUT, NODE_OPTIONS|NODE_PREVIEW);
node_type_compatibility(&ntype, NODE_OLD_SHADING);
node_type_socket_templates(&ntype, sh_node_material_in, sh_node_material_out);
node_type_size(&ntype, 120, 80, 240);
@@ -312,15 +312,15 @@ void register_node_type_sh_material(ListBase *lb)
node_type_exec(&ntype, node_shader_exec_material);
node_type_gpu(&ntype, gpu_shader_material);
- nodeRegisterType(lb, &ntype);
+ nodeRegisterType(ttype, &ntype);
}
-void register_node_type_sh_material_ext(ListBase *lb)
+void register_node_type_sh_material_ext(bNodeTreeType *ttype)
{
static bNodeType ntype;
- node_type_base(&ntype, SH_NODE_MATERIAL_EXT, "Extended Material", NODE_CLASS_INPUT, NODE_OPTIONS|NODE_PREVIEW);
+ node_type_base(ttype, &ntype, SH_NODE_MATERIAL_EXT, "Extended Material", NODE_CLASS_INPUT, NODE_OPTIONS|NODE_PREVIEW);
node_type_compatibility(&ntype, NODE_OLD_SHADING);
node_type_socket_templates(&ntype, sh_node_material_ext_in, sh_node_material_ext_out);
node_type_size(&ntype, 120, 80, 240);
@@ -328,7 +328,5 @@ void register_node_type_sh_material_ext(ListBase *lb)
node_type_exec(&ntype, node_shader_exec_material);
node_type_gpu(&ntype, gpu_shader_material);
- nodeRegisterType(lb, &ntype);
+ nodeRegisterType(ttype, &ntype);
}
-
-
diff --git a/source/blender/nodes/shader/nodes/node_shader_math.c b/source/blender/nodes/shader/nodes/node_shader_math.c
index 1c15c49a7da..c9234c626aa 100644
--- a/source/blender/nodes/shader/nodes/node_shader_math.c
+++ b/source/blender/nodes/shader/nodes/node_shader_math.c
@@ -236,11 +236,11 @@ static int gpu_shader_math(GPUMaterial *mat, bNode *node, GPUNodeStack *in, GPUN
return 1;
}
-void register_node_type_sh_math(ListBase *lb)
+void register_node_type_sh_math(bNodeTreeType *ttype)
{
static bNodeType ntype;
- node_type_base(&ntype, SH_NODE_MATH, "Math", NODE_CLASS_CONVERTOR, NODE_OPTIONS);
+ node_type_base(ttype, &ntype, SH_NODE_MATH, "Math", NODE_CLASS_CONVERTOR, NODE_OPTIONS);
node_type_compatibility(&ntype, NODE_OLD_SHADING|NODE_NEW_SHADING);
node_type_socket_templates(&ntype, sh_node_math_in, sh_node_math_out);
node_type_size(&ntype, 120, 110, 160);
@@ -249,7 +249,5 @@ void register_node_type_sh_math(ListBase *lb)
node_type_exec(&ntype, node_shader_exec_math);
node_type_gpu(&ntype, gpu_shader_math);
- nodeRegisterType(lb, &ntype);
+ nodeRegisterType(ttype, &ntype);
}
-
-
diff --git a/source/blender/nodes/shader/nodes/node_shader_mixRgb.c b/source/blender/nodes/shader/nodes/node_shader_mixRgb.c
index 5d7ec9a23ab..e7350612b5b 100644
--- a/source/blender/nodes/shader/nodes/node_shader_mixRgb.c
+++ b/source/blender/nodes/shader/nodes/node_shader_mixRgb.c
@@ -73,11 +73,11 @@ static int gpu_shader_mix_rgb(GPUMaterial *mat, bNode *node, GPUNodeStack *in, G
}
-void register_node_type_sh_mix_rgb(ListBase *lb)
+void register_node_type_sh_mix_rgb(bNodeTreeType *ttype)
{
static bNodeType ntype;
- node_type_base(&ntype, SH_NODE_MIX_RGB, "Mix", NODE_CLASS_OP_COLOR, NODE_OPTIONS);
+ node_type_base(ttype, &ntype, SH_NODE_MIX_RGB, "Mix", NODE_CLASS_OP_COLOR, NODE_OPTIONS);
node_type_compatibility(&ntype, NODE_OLD_SHADING|NODE_NEW_SHADING);
node_type_socket_templates(&ntype, sh_node_mix_rgb_in, sh_node_mix_rgb_out);
node_type_size(&ntype, 100, 60, 150);
@@ -85,6 +85,5 @@ void register_node_type_sh_mix_rgb(ListBase *lb)
node_type_exec(&ntype, node_shader_exec_mix_rgb);
node_type_gpu(&ntype, gpu_shader_mix_rgb);
- nodeRegisterType(lb, &ntype);
+ nodeRegisterType(ttype, &ntype);
}
-
diff --git a/source/blender/nodes/shader/nodes/node_shader_mix_shader.c b/source/blender/nodes/shader/nodes/node_shader_mix_shader.c
index bf44d26024c..43dde9e5b91 100644
--- a/source/blender/nodes/shader/nodes/node_shader_mix_shader.c
+++ b/source/blender/nodes/shader/nodes/node_shader_mix_shader.c
@@ -47,11 +47,11 @@ static int node_shader_gpu_mix_shader(GPUMaterial *mat, bNode *UNUSED(node), GPU
}
/* node type definition */
-void register_node_type_sh_mix_shader(ListBase *lb)
+void register_node_type_sh_mix_shader(bNodeTreeType *ttype)
{
static bNodeType ntype;
- node_type_base(&ntype, SH_NODE_MIX_SHADER, "Mix Shader", NODE_CLASS_SHADER, 0);
+ node_type_base(ttype, &ntype, SH_NODE_MIX_SHADER, "Mix Shader", NODE_CLASS_SHADER, 0);
node_type_compatibility(&ntype, NODE_NEW_SHADING);
node_type_socket_templates(&ntype, sh_node_mix_shader_in, sh_node_mix_shader_out);
node_type_size(&ntype, 150, 60, 200);
@@ -60,6 +60,5 @@ void register_node_type_sh_mix_shader(ListBase *lb)
node_type_exec(&ntype, NULL);
node_type_gpu(&ntype, node_shader_gpu_mix_shader);
- nodeRegisterType(lb, &ntype);
-};
-
+ nodeRegisterType(ttype, &ntype);
+}
diff --git a/source/blender/nodes/shader/nodes/node_shader_normal.c b/source/blender/nodes/shader/nodes/node_shader_normal.c
index 40f2f65a193..f699268e939 100644
--- a/source/blender/nodes/shader/nodes/node_shader_normal.c
+++ b/source/blender/nodes/shader/nodes/node_shader_normal.c
@@ -79,16 +79,16 @@ static int gpu_shader_normal(GPUMaterial *mat, bNode *node, GPUNodeStack *in, GP
return GPU_stack_link(mat, "normal", in, out, vec);
}
-void register_node_type_sh_normal(ListBase *lb)
+void register_node_type_sh_normal(bNodeTreeType *ttype)
{
static bNodeType ntype;
- node_type_base(&ntype, SH_NODE_NORMAL, "Normal", NODE_CLASS_OP_VECTOR, NODE_OPTIONS);
+ node_type_base(ttype, &ntype, SH_NODE_NORMAL, "Normal", NODE_CLASS_OP_VECTOR, NODE_OPTIONS);
node_type_compatibility(&ntype, NODE_OLD_SHADING);
node_type_socket_templates(&ntype, sh_node_normal_in, sh_node_normal_out);
node_type_init(&ntype, node_shader_init_normal);
node_type_exec(&ntype, node_shader_exec_normal);
node_type_gpu(&ntype, gpu_shader_normal);
- nodeRegisterType(lb, &ntype);
+ nodeRegisterType(ttype, &ntype);
}
diff --git a/source/blender/nodes/shader/nodes/node_shader_output.c b/source/blender/nodes/shader/nodes/node_shader_output.c
index 22e3cab532d..5bc61859a0a 100644
--- a/source/blender/nodes/shader/nodes/node_shader_output.c
+++ b/source/blender/nodes/shader/nodes/node_shader_output.c
@@ -78,18 +78,20 @@ static int gpu_shader_output(GPUMaterial *mat, bNode *UNUSED(node), GPUNodeStack
return 1;
}
-void register_node_type_sh_output(ListBase *lb)
+void register_node_type_sh_output(bNodeTreeType *ttype)
{
static bNodeType ntype;
- node_type_base(&ntype, SH_NODE_OUTPUT, "Output", NODE_CLASS_OUTPUT, NODE_PREVIEW);
+ node_type_base(ttype, &ntype, SH_NODE_OUTPUT, "Output", NODE_CLASS_OUTPUT, NODE_PREVIEW);
node_type_compatibility(&ntype, NODE_OLD_SHADING);
node_type_socket_templates(&ntype, sh_node_output_in, NULL);
node_type_size(&ntype, 80, 60, 200);
node_type_exec(&ntype, node_shader_exec_output);
node_type_gpu(&ntype, gpu_shader_output);
- nodeRegisterType(lb, &ntype);
-}
-
+ /* Do not allow muting output node. */
+ node_type_mute(&ntype, NULL, NULL);
+ node_type_gpu_mute(&ntype, NULL);
+ nodeRegisterType(ttype, &ntype);
+}
diff --git a/source/blender/nodes/shader/nodes/node_shader_output_lamp.c b/source/blender/nodes/shader/nodes/node_shader_output_lamp.c
index 8aa9de15eb4..cf2542c948c 100644
--- a/source/blender/nodes/shader/nodes/node_shader_output_lamp.c
+++ b/source/blender/nodes/shader/nodes/node_shader_output_lamp.c
@@ -35,11 +35,11 @@ static bNodeSocketTemplate sh_node_output_lamp_in[]= {
};
/* node type definition */
-void register_node_type_sh_output_lamp(ListBase *lb)
+void register_node_type_sh_output_lamp(bNodeTreeType *ttype)
{
static bNodeType ntype;
- node_type_base(&ntype, SH_NODE_OUTPUT_LAMP, "Lamp Output", NODE_CLASS_OUTPUT, 0);
+ node_type_base(ttype, &ntype, SH_NODE_OUTPUT_LAMP, "Lamp Output", NODE_CLASS_OUTPUT, 0);
node_type_compatibility(&ntype, NODE_NEW_SHADING);
node_type_socket_templates(&ntype, sh_node_output_lamp_in, NULL);
node_type_size(&ntype, 120, 60, 200);
@@ -48,6 +48,9 @@ void register_node_type_sh_output_lamp(ListBase *lb)
node_type_exec(&ntype, NULL);
node_type_gpu(&ntype, NULL);
- nodeRegisterType(lb, &ntype);
-};
+ /* Do not allow muting output node. */
+ node_type_mute(&ntype, NULL, NULL);
+ node_type_gpu_mute(&ntype, NULL);
+ nodeRegisterType(ttype, &ntype);
+}
diff --git a/source/blender/nodes/shader/nodes/node_shader_output_material.c b/source/blender/nodes/shader/nodes/node_shader_output_material.c
index 58d8bc03972..298df3bb66f 100644
--- a/source/blender/nodes/shader/nodes/node_shader_output_material.c
+++ b/source/blender/nodes/shader/nodes/node_shader_output_material.c
@@ -48,11 +48,11 @@ static int node_shader_gpu_output_material(GPUMaterial *mat, bNode *UNUSED(node)
/* node type definition */
-void register_node_type_sh_output_material(ListBase *lb)
+void register_node_type_sh_output_material(bNodeTreeType *ttype)
{
static bNodeType ntype;
- node_type_base(&ntype, SH_NODE_OUTPUT_MATERIAL, "Material Output", NODE_CLASS_OUTPUT, 0);
+ node_type_base(ttype, &ntype, SH_NODE_OUTPUT_MATERIAL, "Material Output", NODE_CLASS_OUTPUT, 0);
node_type_compatibility(&ntype, NODE_NEW_SHADING);
node_type_socket_templates(&ntype, sh_node_output_material_in, NULL);
node_type_size(&ntype, 120, 60, 200);
@@ -61,6 +61,9 @@ void register_node_type_sh_output_material(ListBase *lb)
node_type_exec(&ntype, NULL);
node_type_gpu(&ntype, node_shader_gpu_output_material);
- nodeRegisterType(lb, &ntype);
-};
+ /* Do not allow muting output node. */
+ node_type_mute(&ntype, NULL, NULL);
+ node_type_gpu_mute(&ntype, NULL);
+ nodeRegisterType(ttype, &ntype);
+}
diff --git a/source/blender/nodes/shader/nodes/node_shader_output_world.c b/source/blender/nodes/shader/nodes/node_shader_output_world.c
index 98cecd0d04b..711f591c192 100644
--- a/source/blender/nodes/shader/nodes/node_shader_output_world.c
+++ b/source/blender/nodes/shader/nodes/node_shader_output_world.c
@@ -36,11 +36,11 @@ static bNodeSocketTemplate sh_node_output_world_in[]= {
};
/* node type definition */
-void register_node_type_sh_output_world(ListBase *lb)
+void register_node_type_sh_output_world(bNodeTreeType *ttype)
{
static bNodeType ntype;
- node_type_base(&ntype, SH_NODE_OUTPUT_WORLD, "World Output", NODE_CLASS_OUTPUT, 0);
+ node_type_base(ttype, &ntype, SH_NODE_OUTPUT_WORLD, "World Output", NODE_CLASS_OUTPUT, 0);
node_type_compatibility(&ntype, NODE_NEW_SHADING);
node_type_socket_templates(&ntype, sh_node_output_world_in, NULL);
node_type_size(&ntype, 120, 60, 200);
@@ -49,6 +49,9 @@ void register_node_type_sh_output_world(ListBase *lb)
node_type_exec(&ntype, NULL);
node_type_gpu(&ntype, NULL);
- nodeRegisterType(lb, &ntype);
-};
+ /* Do not allow muting output node. */
+ node_type_mute(&ntype, NULL, NULL);
+ node_type_gpu_mute(&ntype, NULL);
+ nodeRegisterType(ttype, &ntype);
+}
diff --git a/source/blender/nodes/shader/nodes/node_shader_rgb.c b/source/blender/nodes/shader/nodes/node_shader_rgb.c
index 58a00ed92e5..d0c52035f96 100644
--- a/source/blender/nodes/shader/nodes/node_shader_rgb.c
+++ b/source/blender/nodes/shader/nodes/node_shader_rgb.c
@@ -66,11 +66,11 @@ static int gpu_shader_rgb(GPUMaterial *mat, bNode *node, GPUNodeStack *in, GPUNo
return GPU_stack_link(mat, "set_rgba", in, out, vec);
}
-void register_node_type_sh_rgb(ListBase *lb)
+void register_node_type_sh_rgb(bNodeTreeType *ttype)
{
static bNodeType ntype;
- node_type_base(&ntype, SH_NODE_RGB, "RGB", NODE_CLASS_INPUT, NODE_OPTIONS);
+ node_type_base(ttype, &ntype, SH_NODE_RGB, "RGB", NODE_CLASS_INPUT, NODE_OPTIONS);
node_type_compatibility(&ntype, NODE_OLD_SHADING|NODE_NEW_SHADING);
node_type_socket_templates(&ntype, NULL, sh_node_rgb_out);
node_type_init(&ntype, node_shader_init_rgb);
@@ -78,6 +78,5 @@ void register_node_type_sh_rgb(ListBase *lb)
node_type_exec(&ntype, node_shader_exec_rgb);
node_type_gpu(&ntype, gpu_shader_rgb);
- nodeRegisterType(lb, &ntype);
+ nodeRegisterType(ttype, &ntype);
}
-
diff --git a/source/blender/nodes/shader/nodes/node_shader_sepcombRGB.c b/source/blender/nodes/shader/nodes/node_shader_sepcombRGB.c
index 4f409bb3ec1..09371a8a5ae 100644
--- a/source/blender/nodes/shader/nodes/node_shader_sepcombRGB.c
+++ b/source/blender/nodes/shader/nodes/node_shader_sepcombRGB.c
@@ -56,18 +56,18 @@ static int gpu_shader_seprgb(GPUMaterial *mat, bNode *UNUSED(node), GPUNodeStack
return GPU_stack_link(mat, "separate_rgb", in, out);
}
-void register_node_type_sh_seprgb(ListBase *lb)
+void register_node_type_sh_seprgb(bNodeTreeType *ttype)
{
static bNodeType ntype;
- node_type_base(&ntype, SH_NODE_SEPRGB, "Separate RGB", NODE_CLASS_CONVERTOR, 0);
+ node_type_base(ttype, &ntype, SH_NODE_SEPRGB, "Separate RGB", NODE_CLASS_CONVERTOR, 0);
node_type_compatibility(&ntype, NODE_OLD_SHADING);
node_type_socket_templates(&ntype, sh_node_seprgb_in, sh_node_seprgb_out);
node_type_size(&ntype, 80, 40, 140);
node_type_exec(&ntype, node_shader_exec_seprgb);
node_type_gpu(&ntype, gpu_shader_seprgb);
- nodeRegisterType(lb, &ntype);
+ nodeRegisterType(ttype, &ntype);
}
@@ -96,17 +96,16 @@ static int gpu_shader_combrgb(GPUMaterial *mat, bNode *UNUSED(node), GPUNodeStac
return GPU_stack_link(mat, "combine_rgb", in, out);
}
-void register_node_type_sh_combrgb(ListBase *lb)
+void register_node_type_sh_combrgb(bNodeTreeType *ttype)
{
static bNodeType ntype;
- node_type_base(&ntype, SH_NODE_COMBRGB, "Combine RGB", NODE_CLASS_CONVERTOR, NODE_OPTIONS);
+ node_type_base(ttype, &ntype, SH_NODE_COMBRGB, "Combine RGB", NODE_CLASS_CONVERTOR, NODE_OPTIONS);
node_type_compatibility(&ntype, NODE_OLD_SHADING);
node_type_socket_templates(&ntype, sh_node_combrgb_in, sh_node_combrgb_out);
node_type_size(&ntype, 80, 40, 140);
node_type_exec(&ntype, node_shader_exec_combrgb);
node_type_gpu(&ntype, gpu_shader_combrgb);
- nodeRegisterType(lb, &ntype);
+ nodeRegisterType(ttype, &ntype);
}
-
diff --git a/source/blender/nodes/shader/nodes/node_shader_squeeze.c b/source/blender/nodes/shader/nodes/node_shader_squeeze.c
index 16a9ae8aedc..ded930659e5 100644
--- a/source/blender/nodes/shader/nodes/node_shader_squeeze.c
+++ b/source/blender/nodes/shader/nodes/node_shader_squeeze.c
@@ -62,11 +62,11 @@ static int gpu_shader_squeeze(GPUMaterial *mat, bNode *UNUSED(node), GPUNodeStac
return GPU_stack_link(mat, "squeeze", in, out);
}
-void register_node_type_sh_squeeze(ListBase *lb)
+void register_node_type_sh_squeeze(bNodeTreeType *ttype)
{
static bNodeType ntype;
- node_type_base(&ntype, SH_NODE_SQUEEZE, "Squeeze Value", NODE_CLASS_CONVERTOR, NODE_OPTIONS);
+ node_type_base(ttype, &ntype, SH_NODE_SQUEEZE, "Squeeze Value", NODE_CLASS_CONVERTOR, NODE_OPTIONS);
node_type_compatibility(&ntype, NODE_OLD_SHADING);
node_type_socket_templates(&ntype, sh_node_squeeze_in, sh_node_squeeze_out);
node_type_size(&ntype, 120, 110, 160);
@@ -74,7 +74,5 @@ void register_node_type_sh_squeeze(ListBase *lb)
node_type_exec(&ntype, node_shader_exec_squeeze);
node_type_gpu(&ntype, gpu_shader_squeeze);
- nodeRegisterType(lb, &ntype);
+ nodeRegisterType(ttype, &ntype);
}
-
-
diff --git a/source/blender/nodes/shader/nodes/node_shader_tex_coord.c b/source/blender/nodes/shader/nodes/node_shader_tex_coord.c
index 0982c0fe90d..8f67fb585c9 100644
--- a/source/blender/nodes/shader/nodes/node_shader_tex_coord.c
+++ b/source/blender/nodes/shader/nodes/node_shader_tex_coord.c
@@ -52,11 +52,11 @@ static int node_shader_gpu_tex_coord(GPUMaterial *mat, bNode *UNUSED(node), GPUN
}
/* node type definition */
-void register_node_type_sh_tex_coord(ListBase *lb)
+void register_node_type_sh_tex_coord(bNodeTreeType *ttype)
{
static bNodeType ntype;
- node_type_base(&ntype, SH_NODE_TEX_COORD, "Texture Coordinate", NODE_CLASS_INPUT, 0);
+ node_type_base(ttype, &ntype, SH_NODE_TEX_COORD, "Texture Coordinate", NODE_CLASS_INPUT, 0);
node_type_compatibility(&ntype, NODE_NEW_SHADING);
node_type_socket_templates(&ntype, NULL, sh_node_tex_coord_out);
node_type_size(&ntype, 150, 60, 200);
@@ -65,6 +65,5 @@ void register_node_type_sh_tex_coord(ListBase *lb)
node_type_exec(&ntype, NULL);
node_type_gpu(&ntype, node_shader_gpu_tex_coord);
- nodeRegisterType(lb, &ntype);
-};
-
+ nodeRegisterType(ttype, &ntype);
+}
diff --git a/source/blender/nodes/shader/nodes/node_shader_tex_environment.c b/source/blender/nodes/shader/nodes/node_shader_tex_environment.c
index 5639e82ddb8..dbdd6a8619b 100644
--- a/source/blender/nodes/shader/nodes/node_shader_tex_environment.c
+++ b/source/blender/nodes/shader/nodes/node_shader_tex_environment.c
@@ -69,11 +69,11 @@ static int node_shader_gpu_tex_environment(GPUMaterial *mat, bNode *node, GPUNod
}
/* node type definition */
-void register_node_type_sh_tex_environment(ListBase *lb)
+void register_node_type_sh_tex_environment(bNodeTreeType *ttype)
{
static bNodeType ntype;
- node_type_base(&ntype, SH_NODE_TEX_ENVIRONMENT, "Environment Texture", NODE_CLASS_TEXTURE, NODE_OPTIONS);
+ node_type_base(ttype, &ntype, SH_NODE_TEX_ENVIRONMENT, "Environment Texture", NODE_CLASS_TEXTURE, NODE_OPTIONS);
node_type_compatibility(&ntype, NODE_NEW_SHADING);
node_type_socket_templates(&ntype, sh_node_tex_environment_in, sh_node_tex_environment_out);
node_type_size(&ntype, 150, 60, 200);
@@ -82,6 +82,5 @@ void register_node_type_sh_tex_environment(ListBase *lb)
node_type_exec(&ntype, NULL);
node_type_gpu(&ntype, node_shader_gpu_tex_environment);
- nodeRegisterType(lb, &ntype);
-};
-
+ nodeRegisterType(ttype, &ntype);
+}
diff --git a/source/blender/nodes/shader/nodes/node_shader_tex_gradient.c b/source/blender/nodes/shader/nodes/node_shader_tex_gradient.c
index f93507e2997..a2403b6bdec 100644
--- a/source/blender/nodes/shader/nodes/node_shader_tex_gradient.c
+++ b/source/blender/nodes/shader/nodes/node_shader_tex_gradient.c
@@ -61,11 +61,11 @@ static int node_shader_gpu_tex_gradient(GPUMaterial *mat, bNode *node, GPUNodeSt
}
/* node type definition */
-void register_node_type_sh_tex_gradient(ListBase *lb)
+void register_node_type_sh_tex_gradient(bNodeTreeType *ttype)
{
static bNodeType ntype;
- node_type_base(&ntype, SH_NODE_TEX_GRADIENT, "Gradient Texture", NODE_CLASS_TEXTURE, NODE_OPTIONS);
+ node_type_base(ttype, &ntype, SH_NODE_TEX_GRADIENT, "Gradient Texture", NODE_CLASS_TEXTURE, NODE_OPTIONS);
node_type_compatibility(&ntype, NODE_NEW_SHADING);
node_type_socket_templates(&ntype, sh_node_tex_gradient_in, sh_node_tex_gradient_out);
node_type_size(&ntype, 150, 60, 200);
@@ -74,6 +74,5 @@ void register_node_type_sh_tex_gradient(ListBase *lb)
node_type_exec(&ntype, NULL);
node_type_gpu(&ntype, node_shader_gpu_tex_gradient);
- nodeRegisterType(lb, &ntype);
-};
-
+ nodeRegisterType(ttype, &ntype);
+}
diff --git a/source/blender/nodes/shader/nodes/node_shader_tex_image.c b/source/blender/nodes/shader/nodes/node_shader_tex_image.c
index ce614d6117d..aa679b4e04e 100644
--- a/source/blender/nodes/shader/nodes/node_shader_tex_image.c
+++ b/source/blender/nodes/shader/nodes/node_shader_tex_image.c
@@ -69,11 +69,11 @@ static int node_shader_gpu_tex_image(GPUMaterial *mat, bNode *node, GPUNodeStack
}
/* node type definition */
-void register_node_type_sh_tex_image(ListBase *lb)
+void register_node_type_sh_tex_image(bNodeTreeType *ttype)
{
static bNodeType ntype;
- node_type_base(&ntype, SH_NODE_TEX_IMAGE, "Image Texture", NODE_CLASS_TEXTURE, NODE_OPTIONS);
+ node_type_base(ttype, &ntype, SH_NODE_TEX_IMAGE, "Image Texture", NODE_CLASS_TEXTURE, NODE_OPTIONS);
node_type_compatibility(&ntype, NODE_NEW_SHADING);
node_type_socket_templates(&ntype, sh_node_tex_image_in, sh_node_tex_image_out);
node_type_size(&ntype, 150, 60, 200);
@@ -82,6 +82,5 @@ void register_node_type_sh_tex_image(ListBase *lb)
node_type_exec(&ntype, NULL);
node_type_gpu(&ntype, node_shader_gpu_tex_image);
- nodeRegisterType(lb, &ntype);
-};
-
+ nodeRegisterType(ttype, &ntype);
+}
diff --git a/source/blender/nodes/shader/nodes/node_shader_tex_magic.c b/source/blender/nodes/shader/nodes/node_shader_tex_magic.c
index 73a66c94193..3a270220667 100644
--- a/source/blender/nodes/shader/nodes/node_shader_tex_magic.c
+++ b/source/blender/nodes/shader/nodes/node_shader_tex_magic.c
@@ -66,11 +66,11 @@ static int node_shader_gpu_tex_magic(GPUMaterial *mat, bNode *node, GPUNodeStack
}
/* node type definition */
-void register_node_type_sh_tex_magic(ListBase *lb)
+void register_node_type_sh_tex_magic(bNodeTreeType *ttype)
{
static bNodeType ntype;
- node_type_base(&ntype, SH_NODE_TEX_MAGIC, "Magic Texture", NODE_CLASS_TEXTURE, NODE_OPTIONS);
+ node_type_base(ttype, &ntype, SH_NODE_TEX_MAGIC, "Magic Texture", NODE_CLASS_TEXTURE, NODE_OPTIONS);
node_type_compatibility(&ntype, NODE_NEW_SHADING);
node_type_socket_templates(&ntype, sh_node_tex_magic_in, sh_node_tex_magic_out);
node_type_size(&ntype, 150, 60, 200);
@@ -79,6 +79,5 @@ void register_node_type_sh_tex_magic(ListBase *lb)
node_type_exec(&ntype, NULL);
node_type_gpu(&ntype, node_shader_gpu_tex_magic);
- nodeRegisterType(lb, &ntype);
-};
-
+ nodeRegisterType(ttype, &ntype);
+}
diff --git a/source/blender/nodes/shader/nodes/node_shader_tex_musgrave.c b/source/blender/nodes/shader/nodes/node_shader_tex_musgrave.c
index 00cde10ccea..015b78687fd 100644
--- a/source/blender/nodes/shader/nodes/node_shader_tex_musgrave.c
+++ b/source/blender/nodes/shader/nodes/node_shader_tex_musgrave.c
@@ -67,11 +67,11 @@ static int node_shader_gpu_tex_musgrave(GPUMaterial *mat, bNode *node, GPUNodeSt
}
/* node type definition */
-void register_node_type_sh_tex_musgrave(ListBase *lb)
+void register_node_type_sh_tex_musgrave(bNodeTreeType *ttype)
{
static bNodeType ntype;
- node_type_base(&ntype, SH_NODE_TEX_MUSGRAVE, "Musgrave Texture", NODE_CLASS_TEXTURE, NODE_OPTIONS);
+ node_type_base(ttype, &ntype, SH_NODE_TEX_MUSGRAVE, "Musgrave Texture", NODE_CLASS_TEXTURE, NODE_OPTIONS);
node_type_compatibility(&ntype, NODE_NEW_SHADING);
node_type_socket_templates(&ntype, sh_node_tex_musgrave_in, sh_node_tex_musgrave_out);
node_type_size(&ntype, 150, 60, 200);
@@ -80,6 +80,5 @@ void register_node_type_sh_tex_musgrave(ListBase *lb)
node_type_exec(&ntype, NULL);
node_type_gpu(&ntype, node_shader_gpu_tex_musgrave);
- nodeRegisterType(lb, &ntype);
-};
-
+ nodeRegisterType(ttype, &ntype);
+}
diff --git a/source/blender/nodes/shader/nodes/node_shader_tex_noise.c b/source/blender/nodes/shader/nodes/node_shader_tex_noise.c
index f767fb6f36d..bb365cf5a33 100644
--- a/source/blender/nodes/shader/nodes/node_shader_tex_noise.c
+++ b/source/blender/nodes/shader/nodes/node_shader_tex_noise.c
@@ -63,11 +63,11 @@ static int node_shader_gpu_tex_noise(GPUMaterial *mat, bNode *node, GPUNodeStack
}
/* node type definition */
-void register_node_type_sh_tex_noise(ListBase *lb)
+void register_node_type_sh_tex_noise(bNodeTreeType *ttype)
{
static bNodeType ntype;
- node_type_base(&ntype, SH_NODE_TEX_NOISE, "Noise Texture", NODE_CLASS_TEXTURE, 0);
+ node_type_base(ttype, &ntype, SH_NODE_TEX_NOISE, "Noise Texture", NODE_CLASS_TEXTURE, 0);
node_type_compatibility(&ntype, NODE_NEW_SHADING);
node_type_socket_templates(&ntype, sh_node_tex_noise_in, sh_node_tex_noise_out);
node_type_size(&ntype, 150, 60, 200);
@@ -76,6 +76,5 @@ void register_node_type_sh_tex_noise(ListBase *lb)
node_type_exec(&ntype, NULL);
node_type_gpu(&ntype, node_shader_gpu_tex_noise);
- nodeRegisterType(lb, &ntype);
-};
-
+ nodeRegisterType(ttype, &ntype);
+}
diff --git a/source/blender/nodes/shader/nodes/node_shader_tex_sky.c b/source/blender/nodes/shader/nodes/node_shader_tex_sky.c
index 72bcccee5c7..a4131f3ca6c 100644
--- a/source/blender/nodes/shader/nodes/node_shader_tex_sky.c
+++ b/source/blender/nodes/shader/nodes/node_shader_tex_sky.c
@@ -63,11 +63,11 @@ static int node_shader_gpu_tex_sky(GPUMaterial *mat, bNode *node, GPUNodeStack *
}
/* node type definition */
-void register_node_type_sh_tex_sky(ListBase *lb)
+void register_node_type_sh_tex_sky(bNodeTreeType *ttype)
{
static bNodeType ntype;
- node_type_base(&ntype, SH_NODE_TEX_SKY, "Sky Texture", NODE_CLASS_TEXTURE, NODE_OPTIONS);
+ node_type_base(ttype, &ntype, SH_NODE_TEX_SKY, "Sky Texture", NODE_CLASS_TEXTURE, NODE_OPTIONS);
node_type_compatibility(&ntype, NODE_NEW_SHADING);
node_type_socket_templates(&ntype, sh_node_tex_sky_in, sh_node_tex_sky_out);
node_type_size(&ntype, 150, 60, 200);
@@ -76,6 +76,5 @@ void register_node_type_sh_tex_sky(ListBase *lb)
node_type_exec(&ntype, NULL);
node_type_gpu(&ntype, node_shader_gpu_tex_sky);
- nodeRegisterType(lb, &ntype);
-};
-
+ nodeRegisterType(ttype, &ntype);
+}
diff --git a/source/blender/nodes/shader/nodes/node_shader_tex_voronoi.c b/source/blender/nodes/shader/nodes/node_shader_tex_voronoi.c
index 563774d8338..9adaab22b03 100644
--- a/source/blender/nodes/shader/nodes/node_shader_tex_voronoi.c
+++ b/source/blender/nodes/shader/nodes/node_shader_tex_voronoi.c
@@ -62,11 +62,11 @@ static int node_shader_gpu_tex_voronoi(GPUMaterial *mat, bNode *node, GPUNodeSta
}
/* node type definition */
-void register_node_type_sh_tex_voronoi(ListBase *lb)
+void register_node_type_sh_tex_voronoi(bNodeTreeType *ttype)
{
static bNodeType ntype;
- node_type_base(&ntype, SH_NODE_TEX_VORONOI, "Voronoi Texture", NODE_CLASS_TEXTURE, NODE_OPTIONS);
+ node_type_base(ttype, &ntype, SH_NODE_TEX_VORONOI, "Voronoi Texture", NODE_CLASS_TEXTURE, NODE_OPTIONS);
node_type_compatibility(&ntype, NODE_NEW_SHADING);
node_type_socket_templates(&ntype, sh_node_tex_voronoi_in, sh_node_tex_voronoi_out);
node_type_size(&ntype, 150, 60, 200);
@@ -75,6 +75,5 @@ void register_node_type_sh_tex_voronoi(ListBase *lb)
node_type_exec(&ntype, NULL);
node_type_gpu(&ntype, node_shader_gpu_tex_voronoi);
- nodeRegisterType(lb, &ntype);
-};
-
+ nodeRegisterType(ttype, &ntype);
+}
diff --git a/source/blender/nodes/shader/nodes/node_shader_tex_wave.c b/source/blender/nodes/shader/nodes/node_shader_tex_wave.c
index 059a41c2b0c..d359a407bc0 100644
--- a/source/blender/nodes/shader/nodes/node_shader_tex_wave.c
+++ b/source/blender/nodes/shader/nodes/node_shader_tex_wave.c
@@ -65,11 +65,11 @@ static int node_shader_gpu_tex_wave(GPUMaterial *mat, bNode *node, GPUNodeStack
}
/* node type definition */
-void register_node_type_sh_tex_wave(ListBase *lb)
+void register_node_type_sh_tex_wave(bNodeTreeType *ttype)
{
static bNodeType ntype;
- node_type_base(&ntype, SH_NODE_TEX_WAVE, "Wave Texture", NODE_CLASS_TEXTURE, NODE_OPTIONS);
+ node_type_base(ttype, &ntype, SH_NODE_TEX_WAVE, "Wave Texture", NODE_CLASS_TEXTURE, NODE_OPTIONS);
node_type_compatibility(&ntype, NODE_NEW_SHADING);
node_type_socket_templates(&ntype, sh_node_tex_wave_in, sh_node_tex_wave_out);
node_type_size(&ntype, 150, 60, 200);
@@ -78,6 +78,5 @@ void register_node_type_sh_tex_wave(ListBase *lb)
node_type_exec(&ntype, NULL);
node_type_gpu(&ntype, node_shader_gpu_tex_wave);
- nodeRegisterType(lb, &ntype);
+ nodeRegisterType(ttype, &ntype);
}
-
diff --git a/source/blender/nodes/shader/nodes/node_shader_texture.c b/source/blender/nodes/shader/nodes/node_shader_texture.c
index c26cf2451df..02818496dab 100644
--- a/source/blender/nodes/shader/nodes/node_shader_texture.c
+++ b/source/blender/nodes/shader/nodes/node_shader_texture.c
@@ -133,18 +133,16 @@ static int gpu_shader_texture(GPUMaterial *mat, bNode *node, GPUNodeStack *in, G
return 0;
}
-void register_node_type_sh_texture(ListBase *lb)
+void register_node_type_sh_texture(bNodeTreeType *ttype)
{
static bNodeType ntype;
- node_type_base(&ntype, SH_NODE_TEXTURE, "Texture", NODE_CLASS_INPUT, NODE_OPTIONS|NODE_PREVIEW);
+ node_type_base(ttype, &ntype, SH_NODE_TEXTURE, "Texture", NODE_CLASS_INPUT, NODE_OPTIONS|NODE_PREVIEW);
node_type_compatibility(&ntype, NODE_OLD_SHADING);
node_type_socket_templates(&ntype, sh_node_texture_in, sh_node_texture_out);
node_type_size(&ntype, 120, 80, 240);
node_type_exec(&ntype, node_shader_exec_texture);
node_type_gpu(&ntype, gpu_shader_texture);
- nodeRegisterType(lb, &ntype);
+ nodeRegisterType(ttype, &ntype);
}
-
-
diff --git a/source/blender/nodes/shader/nodes/node_shader_valToRgb.c b/source/blender/nodes/shader/nodes/node_shader_valToRgb.c
index 94afd09274a..f0a94928985 100644
--- a/source/blender/nodes/shader/nodes/node_shader_valToRgb.c
+++ b/source/blender/nodes/shader/nodes/node_shader_valToRgb.c
@@ -71,11 +71,11 @@ static int gpu_shader_valtorgb(GPUMaterial *mat, bNode *node, GPUNodeStack *in,
return GPU_stack_link(mat, "valtorgb", in, out, GPU_texture(size, array));
}
-void register_node_type_sh_valtorgb(ListBase *lb)
+void register_node_type_sh_valtorgb(bNodeTreeType *ttype)
{
static bNodeType ntype;
- node_type_base(&ntype, SH_NODE_VALTORGB, "ColorRamp", NODE_CLASS_CONVERTOR, NODE_OPTIONS);
+ node_type_base(ttype, &ntype, SH_NODE_VALTORGB, "ColorRamp", NODE_CLASS_CONVERTOR, NODE_OPTIONS);
node_type_compatibility(&ntype, NODE_OLD_SHADING);
node_type_socket_templates(&ntype, sh_node_valtorgb_in, sh_node_valtorgb_out);
node_type_size(&ntype, 240, 200, 300);
@@ -84,7 +84,7 @@ void register_node_type_sh_valtorgb(ListBase *lb)
node_type_exec(&ntype, node_shader_exec_valtorgb);
node_type_gpu(&ntype, gpu_shader_valtorgb);
- nodeRegisterType(lb, &ntype);
+ nodeRegisterType(ttype, &ntype);
}
@@ -112,18 +112,16 @@ static int gpu_shader_rgbtobw(GPUMaterial *mat, bNode *UNUSED(node), GPUNodeStac
return GPU_stack_link(mat, "rgbtobw", in, out);
}
-void register_node_type_sh_rgbtobw(ListBase *lb)
+void register_node_type_sh_rgbtobw(bNodeTreeType *ttype)
{
static bNodeType ntype;
- node_type_base(&ntype, SH_NODE_RGBTOBW, "RGB to BW", NODE_CLASS_CONVERTOR, 0);
+ node_type_base(ttype, &ntype, SH_NODE_RGBTOBW, "RGB to BW", NODE_CLASS_CONVERTOR, 0);
node_type_compatibility(&ntype, NODE_OLD_SHADING|NODE_NEW_SHADING);
node_type_socket_templates(&ntype, sh_node_rgbtobw_in, sh_node_rgbtobw_out);
node_type_size(&ntype, 80, 40, 120);
node_type_exec(&ntype, node_shader_exec_rgbtobw);
node_type_gpu(&ntype, gpu_shader_rgbtobw);
- nodeRegisterType(lb, &ntype);
+ nodeRegisterType(ttype, &ntype);
}
-
-
diff --git a/source/blender/nodes/shader/nodes/node_shader_value.c b/source/blender/nodes/shader/nodes/node_shader_value.c
index 8f490f4953b..3196ce5cbe4 100644
--- a/source/blender/nodes/shader/nodes/node_shader_value.c
+++ b/source/blender/nodes/shader/nodes/node_shader_value.c
@@ -66,11 +66,11 @@ static int gpu_shader_value(GPUMaterial *mat, bNode *node, GPUNodeStack *in, GPU
return GPU_stack_link(mat, "set_value", in, out, vec);
}
-void register_node_type_sh_value(ListBase *lb)
+void register_node_type_sh_value(bNodeTreeType *ttype)
{
static bNodeType ntype;
- node_type_base(&ntype, SH_NODE_VALUE, "Value", NODE_CLASS_INPUT, NODE_OPTIONS);
+ node_type_base(ttype, &ntype, SH_NODE_VALUE, "Value", NODE_CLASS_INPUT, NODE_OPTIONS);
node_type_compatibility(&ntype, NODE_OLD_SHADING|NODE_NEW_SHADING);
node_type_socket_templates(&ntype, NULL, sh_node_value_out);
node_type_init(&ntype, node_shader_init_value);
@@ -78,7 +78,5 @@ void register_node_type_sh_value(ListBase *lb)
node_type_exec(&ntype, node_shader_exec_value);
node_type_gpu(&ntype, gpu_shader_value);
- nodeRegisterType(lb, &ntype);
+ nodeRegisterType(ttype, &ntype);
}
-
-
diff --git a/source/blender/nodes/shader/nodes/node_shader_vectMath.c b/source/blender/nodes/shader/nodes/node_shader_vectMath.c
index bb56037b4d4..75dbff11b6e 100644
--- a/source/blender/nodes/shader/nodes/node_shader_vectMath.c
+++ b/source/blender/nodes/shader/nodes/node_shader_vectMath.c
@@ -130,11 +130,11 @@ static int gpu_shader_vect_math(GPUMaterial *mat, bNode *node, GPUNodeStack *in,
return 1;
}
-void register_node_type_sh_vect_math(ListBase *lb)
+void register_node_type_sh_vect_math(bNodeTreeType *ttype)
{
static bNodeType ntype;
- node_type_base(&ntype, SH_NODE_VECT_MATH, "Vector Math", NODE_CLASS_CONVERTOR, NODE_OPTIONS);
+ node_type_base(ttype, &ntype, SH_NODE_VECT_MATH, "Vector Math", NODE_CLASS_CONVERTOR, NODE_OPTIONS);
node_type_compatibility(&ntype, NODE_OLD_SHADING|NODE_NEW_SHADING);
node_type_socket_templates(&ntype, sh_node_vect_math_in, sh_node_vect_math_out);
node_type_size(&ntype, 80, 75, 140);
@@ -143,7 +143,5 @@ void register_node_type_sh_vect_math(ListBase *lb)
node_type_exec(&ntype, node_shader_exec_vect_math);
node_type_gpu(&ntype, gpu_shader_vect_math);
- nodeRegisterType(lb, &ntype);
+ nodeRegisterType(ttype, &ntype);
}
-
-
diff --git a/source/blender/nodes/shader/nodes/node_shader_volume_isotropic.c b/source/blender/nodes/shader/nodes/node_shader_volume_isotropic.c
index 1ce975eae8f..6eb3178709f 100644
--- a/source/blender/nodes/shader/nodes/node_shader_volume_isotropic.c
+++ b/source/blender/nodes/shader/nodes/node_shader_volume_isotropic.c
@@ -46,11 +46,11 @@ static int node_shader_gpu_volume_isotropic(GPUMaterial *UNUSED(mat), bNode *UNU
}
/* node type definition */
-void register_node_type_sh_volume_isotropic(ListBase *lb)
+void register_node_type_sh_volume_isotropic(bNodeTreeType *ttype)
{
static bNodeType ntype;
- node_type_base(&ntype, SH_NODE_VOLUME_ISOTROPIC, "Isotropic Volume", NODE_CLASS_SHADER, 0);
+ node_type_base(ttype, &ntype, SH_NODE_VOLUME_ISOTROPIC, "Isotropic Volume", NODE_CLASS_SHADER, 0);
node_type_compatibility(&ntype, NODE_NEW_SHADING);
node_type_socket_templates(&ntype, sh_node_volume_isotropic_in, sh_node_volume_isotropic_out);
node_type_size(&ntype, 150, 60, 200);
@@ -59,6 +59,5 @@ void register_node_type_sh_volume_isotropic(ListBase *lb)
node_type_exec(&ntype, NULL);
node_type_gpu(&ntype, node_shader_gpu_volume_isotropic);
- nodeRegisterType(lb, &ntype);
-};
-
+ nodeRegisterType(ttype, &ntype);
+}
diff --git a/source/blender/nodes/shader/nodes/node_shader_volume_transparent.c b/source/blender/nodes/shader/nodes/node_shader_volume_transparent.c
index 5c557aee45d..3d2d4fc689e 100644
--- a/source/blender/nodes/shader/nodes/node_shader_volume_transparent.c
+++ b/source/blender/nodes/shader/nodes/node_shader_volume_transparent.c
@@ -46,11 +46,11 @@ static int node_shader_gpu_volume_transparent(GPUMaterial *UNUSED(mat), bNode *U
}
/* node type definition */
-void register_node_type_sh_volume_transparent(ListBase *lb)
+void register_node_type_sh_volume_transparent(bNodeTreeType *ttype)
{
static bNodeType ntype;
- node_type_base(&ntype, SH_NODE_VOLUME_TRANSPARENT, "Transparent Volume", NODE_CLASS_SHADER, 0);
+ node_type_base(ttype, &ntype, SH_NODE_VOLUME_TRANSPARENT, "Transparent Volume", NODE_CLASS_SHADER, 0);
node_type_compatibility(&ntype, NODE_NEW_SHADING);
node_type_socket_templates(&ntype, sh_node_volume_transparent_in, sh_node_volume_transparent_out);
node_type_size(&ntype, 150, 60, 200);
@@ -59,6 +59,5 @@ void register_node_type_sh_volume_transparent(ListBase *lb)
node_type_exec(&ntype, NULL);
node_type_gpu(&ntype, node_shader_gpu_volume_transparent);
- nodeRegisterType(lb, &ntype);
-};
-
+ nodeRegisterType(ttype, &ntype);
+}
diff --git a/source/blender/nodes/texture/node_texture_tree.c b/source/blender/nodes/texture/node_texture_tree.c
index e863e9f6e0f..1e171bd8a46 100644
--- a/source/blender/nodes/texture/node_texture_tree.c
+++ b/source/blender/nodes/texture/node_texture_tree.c
@@ -111,7 +111,11 @@ bNodeTreeType ntreeType_Texture = {
/* local_sync */ local_sync,
/* local_merge */ NULL,
/* update */ NULL,
- /* update_node */ NULL
+ /* update_node */ NULL,
+ /* validate_link */ NULL,
+ /* mute node */ node_tex_pass_on,
+ /* mute links node */ node_mute_get_links,
+ /* gpu mute node */ NULL
};
int ntreeTexTagAnimated(bNodeTree *ntree)
diff --git a/source/blender/nodes/texture/node_texture_util.c b/source/blender/nodes/texture/node_texture_util.c
index c3d298d1ecd..06ee4b0a53d 100644
--- a/source/blender/nodes/texture/node_texture_util.c
+++ b/source/blender/nodes/texture/node_texture_util.c
@@ -143,6 +143,98 @@ void tex_output(bNode *node, bNodeStack **in, bNodeStack *out, TexFn texfn, TexC
dg->type = out->sockettype;
}
+/* Used for muted nodes, just pass the TexDelegate data from input to output…
+ * XXX That *%!?¿§ callback TextureDelegate system is a nightmare here!
+ * So I have to use an ugly hack (checking inputs twice!)… Yuk!
+ * I’d be very happy if someone can imagine a better solution
+ * (without changing the whole stuff).
+ * WARNING: These are only suitable for default muting behavior. If you want a custom
+ * one for your texnode, you must not use them!
+ */
+static void passonvalfn(float *out, TexParams *p, bNode *node, bNodeStack **in, short thread)
+{
+ bNodeSocket *sock;
+ int i;
+
+ /* test the inputs */
+ for(i=0, sock = node->inputs.first; sock; sock = sock->next, i++) {
+ if(sock->link && sock->type==SOCK_FLOAT && in) {
+ out[0] = tex_input_value(in[i], p, thread);
+ break;
+ }
+ }
+}
+
+static void passonvecfn(float *out, TexParams *p, bNode *node, bNodeStack **in, short thread)
+{
+ bNodeSocket *sock;
+ int i;
+
+ /* test the inputs */
+ for(i=0, sock = node->inputs.first; sock; sock = sock->next, i++) {
+ if(sock->link && sock->type==SOCK_VECTOR && in) {
+ tex_input_vec(out, in[i], p, thread);
+ break;
+ }
+ }
+}
+
+static void passoncolfn(float *out, TexParams *p, bNode *node, bNodeStack **in, short thread)
+{
+ bNodeSocket *sock;
+ int i;
+
+ /* test the inputs */
+ for(i=0, sock = node->inputs.first; sock; sock = sock->next, i++) {
+ if(sock->link && sock->type==SOCK_RGBA && in) {
+ tex_input_rgba(out, in[i], p, thread);
+ break;
+ }
+ }
+}
+
+void node_tex_pass_on(void *data, int UNUSED(thread), struct bNode *node, void *UNUSED(nodedata),
+ struct bNodeStack **in, struct bNodeStack **out)
+{
+ ListBase links;
+ LinkInOutsMuteNode *lnk;
+ int i;
+
+ if(node->typeinfo->mutelinksfunc == NULL)
+ return;
+
+ /* Get default muting links (as bNodeStack pointers). */
+ links = node->typeinfo->mutelinksfunc(NULL, node, in, out, NULL, NULL);
+
+ for(lnk = links.first; lnk; lnk = lnk->next) {
+ /* XXX This breaks the generality of the system.
+ * Again, unfortunately, I see no other way to do due to tex nodes behavior...
+ */
+ void (*passonfn)(float *out, TexParams *p, bNode *node, bNodeStack **in, short thread);
+ switch(((bNodeStack*)(lnk->in))->sockettype) {
+ case SOCK_FLOAT:
+ passonfn = passonvalfn;
+ break;
+ case SOCK_VECTOR:
+ passonfn = passonvecfn;
+ break;
+ case SOCK_RGBA:
+ passonfn = passoncolfn;
+ break;
+ default:
+ passonfn = NULL;
+ }
+ for(i = 0; i < lnk->num_outs; i++) {
+ if(((bNodeStack*)(lnk->in))->data && passonfn)
+ tex_output(node, in, ((bNodeStack*)(lnk->outs))+i, passonfn, data);
+ }
+ /* If num_outs > 1, lnk->outs was an allocated table of pointers... */
+ if(i > 1)
+ MEM_freeN(lnk->outs);
+ }
+ BLI_freelistN(&links);
+}
+
void ntreeTexCheckCyclics(struct bNodeTree *ntree)
{
bNode *node;
diff --git a/source/blender/nodes/texture/node_texture_util.h b/source/blender/nodes/texture/node_texture_util.h
index 766cc73c330..5095a9799e4 100644
--- a/source/blender/nodes/texture/node_texture_util.h
+++ b/source/blender/nodes/texture/node_texture_util.h
@@ -119,4 +119,6 @@ void tex_do_preview(bNode *node, float *coord, float *col);
void params_from_cdata(TexParams *out, TexCallData *in);
+void node_tex_pass_on(void *data, int thread, struct bNode *node, void *nodedata, struct bNodeStack **in, struct bNodeStack **out);
+
#endif
diff --git a/source/blender/nodes/texture/nodes/node_texture_at.c b/source/blender/nodes/texture/nodes/node_texture_at.c
index 65787891602..33548be3208 100644
--- a/source/blender/nodes/texture/nodes/node_texture_at.c
+++ b/source/blender/nodes/texture/nodes/node_texture_at.c
@@ -58,14 +58,14 @@ static void exec(void *data, bNode *node, bNodeStack **in, bNodeStack **out)
tex_output(node, in, out[0], &colorfn, data);
}
-void register_node_type_tex_at(ListBase *lb)
+void register_node_type_tex_at(bNodeTreeType *ttype)
{
static bNodeType ntype;
- node_type_base(&ntype, TEX_NODE_AT, "At", NODE_CLASS_DISTORT, 0);
+ node_type_base(ttype, &ntype, TEX_NODE_AT, "At", NODE_CLASS_DISTORT, 0);
node_type_socket_templates(&ntype, inputs, outputs);
node_type_size(&ntype, 140, 100, 320);
node_type_exec(&ntype, exec);
- nodeRegisterType(lb, &ntype);
+ nodeRegisterType(ttype, &ntype);
}
diff --git a/source/blender/nodes/texture/nodes/node_texture_bricks.c b/source/blender/nodes/texture/nodes/node_texture_bricks.c
index 0700085a787..b4b25a10537 100644
--- a/source/blender/nodes/texture/nodes/node_texture_bricks.c
+++ b/source/blender/nodes/texture/nodes/node_texture_bricks.c
@@ -119,15 +119,15 @@ static void exec(void *data, bNode *node, bNodeStack **in, bNodeStack **out)
tex_output(node, in, out[0], &colorfn, data);
}
-void register_node_type_tex_bricks(ListBase *lb)
+void register_node_type_tex_bricks(bNodeTreeType *ttype)
{
static bNodeType ntype;
- node_type_base(&ntype, TEX_NODE_BRICKS, "Bricks", NODE_CLASS_PATTERN, NODE_PREVIEW|NODE_OPTIONS);
+ node_type_base(ttype, &ntype, TEX_NODE_BRICKS, "Bricks", NODE_CLASS_PATTERN, NODE_PREVIEW|NODE_OPTIONS);
node_type_socket_templates(&ntype, inputs, outputs);
node_type_size(&ntype, 150, 60, 150);
node_type_init(&ntype, init);
node_type_exec(&ntype, exec);
- nodeRegisterType(lb, &ntype);
+ nodeRegisterType(ttype, &ntype);
}
diff --git a/source/blender/nodes/texture/nodes/node_texture_checker.c b/source/blender/nodes/texture/nodes/node_texture_checker.c
index aebd3f2a05c..6b5848270ba 100644
--- a/source/blender/nodes/texture/nodes/node_texture_checker.c
+++ b/source/blender/nodes/texture/nodes/node_texture_checker.c
@@ -69,14 +69,14 @@ static void exec(void *data, bNode *node, bNodeStack **in, bNodeStack **out)
tex_output(node, in, out[0], &colorfn, data);
}
-void register_node_type_tex_checker(ListBase *lb)
+void register_node_type_tex_checker(bNodeTreeType *ttype)
{
static bNodeType ntype;
- node_type_base(&ntype, TEX_NODE_CHECKER, "Checker", NODE_CLASS_PATTERN, NODE_PREVIEW|NODE_OPTIONS);
+ node_type_base(ttype, &ntype, TEX_NODE_CHECKER, "Checker", NODE_CLASS_PATTERN, NODE_PREVIEW|NODE_OPTIONS);
node_type_socket_templates(&ntype, inputs, outputs);
node_type_size(&ntype, 100, 60, 150);
node_type_exec(&ntype, exec);
- nodeRegisterType(lb, &ntype);
+ nodeRegisterType(ttype, &ntype);
}
diff --git a/source/blender/nodes/texture/nodes/node_texture_common.c b/source/blender/nodes/texture/nodes/node_texture_common.c
index 0b8ee031d4f..9a66ecb5ffb 100644
--- a/source/blender/nodes/texture/nodes/node_texture_common.c
+++ b/source/blender/nodes/texture/nodes/node_texture_common.c
@@ -125,11 +125,11 @@ static void group_execute(void *data, int thread, struct bNode *node, void *node
ntreeReleaseThreadStack(nts);
}
-void register_node_type_tex_group(ListBase *lb)
+void register_node_type_tex_group(bNodeTreeType *ttype)
{
static bNodeType ntype;
- node_type_base(&ntype, NODE_GROUP, "Group", NODE_CLASS_GROUP, NODE_OPTIONS|NODE_CONST_OUTPUT);
+ node_type_base(ttype, &ntype, NODE_GROUP, "Group", NODE_CLASS_GROUP, NODE_OPTIONS|NODE_CONST_OUTPUT);
node_type_socket_templates(&ntype, NULL, NULL);
node_type_size(&ntype, 120, 60, 200);
node_type_label(&ntype, node_group_label);
@@ -140,7 +140,7 @@ void register_node_type_tex_group(ListBase *lb)
node_type_group_edit(&ntype, node_group_edit_get, node_group_edit_set, node_group_edit_clear);
node_type_exec_new(&ntype, group_initexec, group_freeexec, group_execute);
- nodeRegisterType(lb, &ntype);
+ nodeRegisterType(ttype, &ntype);
}
@@ -186,11 +186,11 @@ static void forloop_execute(void *data, int thread, struct bNode *node, void *no
ntreeReleaseThreadStack(nts);
}
-void register_node_type_tex_forloop(ListBase *lb)
+void register_node_type_tex_forloop(bNodeTreeType *ttype)
{
static bNodeType ntype;
- node_type_base(&ntype, NODE_FORLOOP, "For", NODE_CLASS_GROUP, NODE_OPTIONS);
+ node_type_base(ttype, &ntype, NODE_FORLOOP, "For", NODE_CLASS_GROUP, NODE_OPTIONS);
node_type_socket_templates(&ntype, NULL, NULL);
node_type_size(&ntype, 120, 60, 200);
node_type_label(&ntype, node_group_label);
@@ -202,7 +202,7 @@ void register_node_type_tex_forloop(ListBase *lb)
node_type_group_edit(&ntype, node_group_edit_get, node_group_edit_set, node_group_edit_clear);
node_type_exec_new(&ntype, group_initexec, group_freeexec, forloop_execute);
- nodeRegisterType(lb, &ntype);
+ nodeRegisterType(ttype, &ntype);
}
#endif
@@ -248,11 +248,11 @@ static void whileloop_execute(void *data, int thread, struct bNode *node, void *
ntreeReleaseThreadStack(nts);
}
-void register_node_type_tex_whileloop(ListBase *lb)
+void register_node_type_tex_whileloop(bNodeTreeType *ttype)
{
static bNodeType ntype;
- node_type_base(&ntype, NODE_WHILELOOP, "While", NODE_CLASS_GROUP, NODE_OPTIONS);
+ node_type_base(ttype, &ntype, NODE_WHILELOOP, "While", NODE_CLASS_GROUP, NODE_OPTIONS);
node_type_socket_templates(&ntype, NULL, NULL);
node_type_size(&ntype, 120, 60, 200);
node_type_label(&ntype, node_group_label);
@@ -264,6 +264,6 @@ void register_node_type_tex_whileloop(ListBase *lb)
node_type_group_edit(&ntype, node_group_edit_get, node_group_edit_set, node_group_edit_clear);
node_type_exec_new(&ntype, group_initexec, group_freeexec, whileloop_execute);
- nodeRegisterType(lb, &ntype);
+ nodeRegisterType(ttype, &ntype);
}
#endif
diff --git a/source/blender/nodes/texture/nodes/node_texture_compose.c b/source/blender/nodes/texture/nodes/node_texture_compose.c
index d2a6cd0cb42..5256db98d78 100644
--- a/source/blender/nodes/texture/nodes/node_texture_compose.c
+++ b/source/blender/nodes/texture/nodes/node_texture_compose.c
@@ -57,14 +57,14 @@ static void exec(void *data, bNode *node, bNodeStack **in, bNodeStack **out)
tex_output(node, in, out[0], &colorfn, data);
}
-void register_node_type_tex_compose(ListBase *lb)
+void register_node_type_tex_compose(bNodeTreeType *ttype)
{
static bNodeType ntype;
- node_type_base(&ntype, TEX_NODE_COMPOSE, "Compose RGBA", NODE_CLASS_OP_COLOR, 0);
+ node_type_base(ttype, &ntype, TEX_NODE_COMPOSE, "Compose RGBA", NODE_CLASS_OP_COLOR, 0);
node_type_socket_templates(&ntype, inputs, outputs);
node_type_size(&ntype, 100, 60, 150);
node_type_exec(&ntype, exec);
- nodeRegisterType(lb, &ntype);
+ nodeRegisterType(ttype, &ntype);
}
diff --git a/source/blender/nodes/texture/nodes/node_texture_coord.c b/source/blender/nodes/texture/nodes/node_texture_coord.c
index a86324e9f7d..6d6f31d6aaa 100644
--- a/source/blender/nodes/texture/nodes/node_texture_coord.c
+++ b/source/blender/nodes/texture/nodes/node_texture_coord.c
@@ -50,15 +50,15 @@ static void exec(void *data, bNode *node, bNodeStack **in, bNodeStack **out)
tex_output(node, in, out[0], &vectorfn, data);
}
-void register_node_type_tex_coord(ListBase *lb)
+void register_node_type_tex_coord(bNodeTreeType *ttype)
{
static bNodeType ntype;
- node_type_base(&ntype, TEX_NODE_COORD, "Coordinates", NODE_CLASS_INPUT, NODE_OPTIONS);
+ node_type_base(ttype, &ntype, TEX_NODE_COORD, "Coordinates", NODE_CLASS_INPUT, NODE_OPTIONS);
node_type_socket_templates(&ntype, NULL, outputs);
node_type_size(&ntype, 120, 110, 160);
node_type_storage(&ntype, "node_coord", NULL, NULL);
node_type_exec(&ntype, exec);
- nodeRegisterType(lb, &ntype);
+ nodeRegisterType(ttype, &ntype);
}
diff --git a/source/blender/nodes/texture/nodes/node_texture_curves.c b/source/blender/nodes/texture/nodes/node_texture_curves.c
index b14036ace5b..08e7efc1606 100644
--- a/source/blender/nodes/texture/nodes/node_texture_curves.c
+++ b/source/blender/nodes/texture/nodes/node_texture_curves.c
@@ -66,18 +66,18 @@ static void time_init(bNodeTree *UNUSED(ntree), bNode* node, bNodeTemplate *UNUS
node->storage= curvemapping_add(1, 0.0f, 0.0f, 1.0f, 1.0f);
}
-void register_node_type_tex_curve_time(ListBase *lb)
+void register_node_type_tex_curve_time(bNodeTreeType *ttype)
{
static bNodeType ntype;
- node_type_base(&ntype, TEX_NODE_CURVE_TIME, "Time", NODE_CLASS_INPUT, NODE_OPTIONS);
+ node_type_base(ttype, &ntype, TEX_NODE_CURVE_TIME, "Time", NODE_CLASS_INPUT, NODE_OPTIONS);
node_type_socket_templates(&ntype, NULL, time_outputs);
node_type_size(&ntype, 140, 100, 320);
node_type_init(&ntype, time_init);
node_type_storage(&ntype, "CurveMapping", node_free_curves, node_copy_curves);
node_type_exec(&ntype, time_exec);
- nodeRegisterType(lb, &ntype);
+ nodeRegisterType(ttype, &ntype);
}
/* **************** CURVE RGB ******************** */
@@ -110,17 +110,16 @@ static void rgb_init(bNodeTree *UNUSED(ntree), bNode* node, bNodeTemplate *UNUSE
node->storage= curvemapping_add(4, 0.0f, 0.0f, 1.0f, 1.0f);
}
-void register_node_type_tex_curve_rgb(ListBase *lb)
+void register_node_type_tex_curve_rgb(bNodeTreeType *ttype)
{
static bNodeType ntype;
- node_type_base(&ntype, TEX_NODE_CURVE_RGB, "RGB Curves", NODE_CLASS_OP_COLOR, NODE_OPTIONS);
+ node_type_base(ttype, &ntype, TEX_NODE_CURVE_RGB, "RGB Curves", NODE_CLASS_OP_COLOR, NODE_OPTIONS);
node_type_socket_templates(&ntype, rgb_inputs, rgb_outputs);
node_type_size(&ntype, 200, 140, 320);
node_type_init(&ntype, rgb_init);
node_type_storage(&ntype, "CurveMapping", node_free_curves, node_copy_curves);
node_type_exec(&ntype, rgb_exec);
- nodeRegisterType(lb, &ntype);
+ nodeRegisterType(ttype, &ntype);
}
-
diff --git a/source/blender/nodes/texture/nodes/node_texture_decompose.c b/source/blender/nodes/texture/nodes/node_texture_decompose.c
index e83e6a718ef..435b87164c4 100644
--- a/source/blender/nodes/texture/nodes/node_texture_decompose.c
+++ b/source/blender/nodes/texture/nodes/node_texture_decompose.c
@@ -78,14 +78,14 @@ static void exec(void *data, bNode *node, bNodeStack **in, bNodeStack **out)
tex_output(node, in, out[3], &valuefn_a, data);
}
-void register_node_type_tex_decompose(ListBase *lb)
+void register_node_type_tex_decompose(bNodeTreeType *ttype)
{
static bNodeType ntype;
- node_type_base(&ntype, TEX_NODE_DECOMPOSE, "Decompose RGBA", NODE_CLASS_OP_COLOR, 0);
+ node_type_base(ttype, &ntype, TEX_NODE_DECOMPOSE, "Decompose RGBA", NODE_CLASS_OP_COLOR, 0);
node_type_socket_templates(&ntype, inputs, outputs);
node_type_size(&ntype, 100, 60, 150);
node_type_exec(&ntype, exec);
- nodeRegisterType(lb, &ntype);
+ nodeRegisterType(ttype, &ntype);
}
diff --git a/source/blender/nodes/texture/nodes/node_texture_distance.c b/source/blender/nodes/texture/nodes/node_texture_distance.c
index c0a9950e761..a2c1f41c0de 100644
--- a/source/blender/nodes/texture/nodes/node_texture_distance.c
+++ b/source/blender/nodes/texture/nodes/node_texture_distance.c
@@ -61,15 +61,15 @@ static void exec(void *data, bNode *node, bNodeStack **in, bNodeStack **out)
tex_output(node, in, out[0], &valuefn, data);
}
-void register_node_type_tex_distance(ListBase *lb)
+void register_node_type_tex_distance(bNodeTreeType *ttype)
{
static bNodeType ntype;
- node_type_base(&ntype, TEX_NODE_DISTANCE, "Distance", NODE_CLASS_CONVERTOR, NODE_OPTIONS);
+ node_type_base(ttype, &ntype, TEX_NODE_DISTANCE, "Distance", NODE_CLASS_CONVERTOR, NODE_OPTIONS);
node_type_socket_templates(&ntype, inputs, outputs);
node_type_size(&ntype, 120, 110, 160);
node_type_storage(&ntype, "node_distance", NULL, NULL);
node_type_exec(&ntype, exec);
- nodeRegisterType(lb, &ntype);
+ nodeRegisterType(ttype, &ntype);
}
diff --git a/source/blender/nodes/texture/nodes/node_texture_hueSatVal.c b/source/blender/nodes/texture/nodes/node_texture_hueSatVal.c
index 3346592f7d3..e566fb0298a 100644
--- a/source/blender/nodes/texture/nodes/node_texture_hueSatVal.c
+++ b/source/blender/nodes/texture/nodes/node_texture_hueSatVal.c
@@ -92,14 +92,14 @@ static void exec(void *data, bNode *node, bNodeStack **in, bNodeStack **out)
tex_output(node, in, out[0], &colorfn, data);
}
-void register_node_type_tex_hue_sat(ListBase *lb)
+void register_node_type_tex_hue_sat(bNodeTreeType *ttype)
{
static bNodeType ntype;
- node_type_base(&ntype, TEX_NODE_HUE_SAT, "Hue Saturation Value", NODE_CLASS_OP_COLOR, NODE_OPTIONS);
+ node_type_base(ttype, &ntype, TEX_NODE_HUE_SAT, "Hue Saturation Value", NODE_CLASS_OP_COLOR, NODE_OPTIONS);
node_type_socket_templates(&ntype, inputs, outputs);
node_type_size(&ntype, 150, 80, 250);
node_type_exec(&ntype, exec);
- nodeRegisterType(lb, &ntype);
+ nodeRegisterType(ttype, &ntype);
}
diff --git a/source/blender/nodes/texture/nodes/node_texture_image.c b/source/blender/nodes/texture/nodes/node_texture_image.c
index 0ead3a3dec2..0acfe62ed82 100644
--- a/source/blender/nodes/texture/nodes/node_texture_image.c
+++ b/source/blender/nodes/texture/nodes/node_texture_image.c
@@ -95,16 +95,16 @@ static void init(bNodeTree *UNUSED(ntree), bNode* node, bNodeTemplate *UNUSED(nt
iuser->ok= 1;
}
-void register_node_type_tex_image(ListBase *lb)
+void register_node_type_tex_image(bNodeTreeType *ttype)
{
static bNodeType ntype;
- node_type_base(&ntype, TEX_NODE_IMAGE, "Image", NODE_CLASS_INPUT, NODE_PREVIEW|NODE_OPTIONS);
+ node_type_base(ttype, &ntype, TEX_NODE_IMAGE, "Image", NODE_CLASS_INPUT, NODE_PREVIEW|NODE_OPTIONS);
node_type_socket_templates(&ntype, NULL, outputs);
node_type_size(&ntype, 120, 80, 300);
node_type_init(&ntype, init);
node_type_storage(&ntype, "ImageUser", node_free_standard_storage, node_copy_standard_storage);
node_type_exec(&ntype, exec);
- nodeRegisterType(lb, &ntype);
+ nodeRegisterType(ttype, &ntype);
}
diff --git a/source/blender/nodes/texture/nodes/node_texture_invert.c b/source/blender/nodes/texture/nodes/node_texture_invert.c
index 5ee60d02e32..297675f498c 100644
--- a/source/blender/nodes/texture/nodes/node_texture_invert.c
+++ b/source/blender/nodes/texture/nodes/node_texture_invert.c
@@ -63,15 +63,14 @@ static void exec(void *data, bNode *node, bNodeStack **in, bNodeStack **out)
tex_output(node, in, out[0], &colorfn, data);
}
-void register_node_type_tex_invert(ListBase *lb)
+void register_node_type_tex_invert(bNodeTreeType *ttype)
{
static bNodeType ntype;
- node_type_base(&ntype, TEX_NODE_INVERT, "Invert", NODE_CLASS_OP_COLOR, NODE_OPTIONS);
+ node_type_base(ttype, &ntype, TEX_NODE_INVERT, "Invert", NODE_CLASS_OP_COLOR, NODE_OPTIONS);
node_type_socket_templates(&ntype, inputs, outputs);
node_type_size(&ntype, 90, 80, 100);
node_type_exec(&ntype, exec);
- nodeRegisterType(lb, &ntype);
+ nodeRegisterType(ttype, &ntype);
}
-
diff --git a/source/blender/nodes/texture/nodes/node_texture_math.c b/source/blender/nodes/texture/nodes/node_texture_math.c
index 74b9dcdd30a..4659aa2b6c0 100644
--- a/source/blender/nodes/texture/nodes/node_texture_math.c
+++ b/source/blender/nodes/texture/nodes/node_texture_math.c
@@ -184,17 +184,16 @@ static void exec(void *data, bNode *node, bNodeStack **in, bNodeStack **out)
tex_output(node, in, out[0], &valuefn, data);
}
-void register_node_type_tex_math(ListBase *lb)
+void register_node_type_tex_math(bNodeTreeType *ttype)
{
static bNodeType ntype;
- node_type_base(&ntype, TEX_NODE_MATH, "Math", NODE_CLASS_CONVERTOR, NODE_OPTIONS);
+ node_type_base(ttype, &ntype, TEX_NODE_MATH, "Math", NODE_CLASS_CONVERTOR, NODE_OPTIONS);
node_type_socket_templates(&ntype, inputs, outputs);
node_type_size(&ntype, 120, 110, 160);
node_type_label(&ntype, node_math_label);
node_type_storage(&ntype, "node_math", NULL, NULL);
node_type_exec(&ntype, exec);
- nodeRegisterType(lb, &ntype);
+ nodeRegisterType(ttype, &ntype);
}
-
diff --git a/source/blender/nodes/texture/nodes/node_texture_mixRgb.c b/source/blender/nodes/texture/nodes/node_texture_mixRgb.c
index e3b5119c797..13816088ea7 100644
--- a/source/blender/nodes/texture/nodes/node_texture_mixRgb.c
+++ b/source/blender/nodes/texture/nodes/node_texture_mixRgb.c
@@ -64,15 +64,15 @@ static void exec(void *data, bNode *node, bNodeStack **in, bNodeStack **out)
tex_output(node, in, out[0], &colorfn, data);
}
-void register_node_type_tex_mix_rgb(ListBase *lb)
+void register_node_type_tex_mix_rgb(bNodeTreeType *ttype)
{
static bNodeType ntype;
- node_type_base(&ntype, TEX_NODE_MIX_RGB, "Mix", NODE_CLASS_OP_COLOR, NODE_OPTIONS);
+ node_type_base(ttype, &ntype, TEX_NODE_MIX_RGB, "Mix", NODE_CLASS_OP_COLOR, NODE_OPTIONS);
node_type_socket_templates(&ntype, inputs, outputs);
node_type_size(&ntype, 100, 60, 150);
node_type_label(&ntype, node_blend_label);
node_type_exec(&ntype, exec);
- nodeRegisterType(lb, &ntype);
+ nodeRegisterType(ttype, &ntype);
}
diff --git a/source/blender/nodes/texture/nodes/node_texture_output.c b/source/blender/nodes/texture/nodes/node_texture_output.c
index 42ee2847d06..0ed6d232b81 100644
--- a/source/blender/nodes/texture/nodes/node_texture_output.c
+++ b/source/blender/nodes/texture/nodes/node_texture_output.c
@@ -157,16 +157,19 @@ static void copy(bNode *orig, bNode *new)
assign_index(new);
}
-void register_node_type_tex_output(ListBase *lb)
+void register_node_type_tex_output(bNodeTreeType *ttype)
{
static bNodeType ntype;
- node_type_base(&ntype, TEX_NODE_OUTPUT, "Output", NODE_CLASS_OUTPUT, NODE_PREVIEW|NODE_OPTIONS);
+ node_type_base(ttype, &ntype, TEX_NODE_OUTPUT, "Output", NODE_CLASS_OUTPUT, NODE_PREVIEW|NODE_OPTIONS);
node_type_socket_templates(&ntype, inputs, NULL);
node_type_size(&ntype, 150, 60, 200);
node_type_init(&ntype, init);
node_type_storage(&ntype, "TexNodeOutput", node_free_standard_storage, copy);
node_type_exec(&ntype, exec);
- nodeRegisterType(lb, &ntype);
+ /* Do not allow muting output. */
+ node_type_mute(&ntype, NULL, NULL);
+
+ nodeRegisterType(ttype, &ntype);
}
diff --git a/source/blender/nodes/texture/nodes/node_texture_proc.c b/source/blender/nodes/texture/nodes/node_texture_proc.c
index 3012d313db5..fac8b02fb85 100644
--- a/source/blender/nodes/texture/nodes/node_texture_proc.c
+++ b/source/blender/nodes/texture/nodes/node_texture_proc.c
@@ -296,18 +296,18 @@ static void init(bNodeTree *UNUSED(ntree), bNode* node, bNodeTemplate *UNUSED(nt
/* Node type definitions */
#define TexDef(TEXTYPE, outputs, name, Name) \
-void register_node_type_tex_proc_##name(ListBase *lb) \
+void register_node_type_tex_proc_##name(bNodeTreeType *ttype) \
{ \
static bNodeType ntype; \
\
- node_type_base(&ntype, TEX_NODE_PROC+TEXTYPE, Name, NODE_CLASS_TEXTURE, NODE_PREVIEW|NODE_OPTIONS); \
+ node_type_base(ttype, &ntype, TEX_NODE_PROC+TEXTYPE, Name, NODE_CLASS_TEXTURE, NODE_PREVIEW|NODE_OPTIONS); \
node_type_socket_templates(&ntype, name##_inputs, outputs); \
node_type_size(&ntype, 140, 80, 140); \
node_type_init(&ntype, init); \
node_type_storage(&ntype, "Tex", node_free_standard_storage, node_copy_standard_storage); \
node_type_exec(&ntype, name##_exec); \
\
- nodeRegisterType(lb, &ntype); \
+ nodeRegisterType(ttype, &ntype); \
}
#define C outputs_color_only
diff --git a/source/blender/nodes/texture/nodes/node_texture_rotate.c b/source/blender/nodes/texture/nodes/node_texture_rotate.c
index a3f69286269..d1c9cca3f3c 100644
--- a/source/blender/nodes/texture/nodes/node_texture_rotate.c
+++ b/source/blender/nodes/texture/nodes/node_texture_rotate.c
@@ -95,14 +95,14 @@ static void exec(void *data, bNode *node, bNodeStack **in, bNodeStack **out)
tex_output(node, in, out[0], &colorfn, data);
}
-void register_node_type_tex_rotate(ListBase *lb)
+void register_node_type_tex_rotate(bNodeTreeType *ttype)
{
static bNodeType ntype;
- node_type_base(&ntype, TEX_NODE_ROTATE, "Rotate", NODE_CLASS_DISTORT, NODE_OPTIONS);
+ node_type_base(ttype, &ntype, TEX_NODE_ROTATE, "Rotate", NODE_CLASS_DISTORT, NODE_OPTIONS);
node_type_socket_templates(&ntype, inputs, outputs);
node_type_size(&ntype, 140, 100, 320);
node_type_exec(&ntype, exec);
- nodeRegisterType(lb, &ntype);
+ nodeRegisterType(ttype, &ntype);
}
diff --git a/source/blender/nodes/texture/nodes/node_texture_scale.c b/source/blender/nodes/texture/nodes/node_texture_scale.c
index f42b3addc91..f8790d414c9 100644
--- a/source/blender/nodes/texture/nodes/node_texture_scale.c
+++ b/source/blender/nodes/texture/nodes/node_texture_scale.c
@@ -68,14 +68,14 @@ static void exec(void *data, bNode *node, bNodeStack **in, bNodeStack **out)
tex_output(node, in, out[0], &colorfn, data);
}
-void register_node_type_tex_scale(ListBase *lb)
+void register_node_type_tex_scale(bNodeTreeType *ttype)
{
static bNodeType ntype;
- node_type_base(&ntype, TEX_NODE_SCALE, "Scale", NODE_CLASS_DISTORT, NODE_OPTIONS);
+ node_type_base(ttype, &ntype, TEX_NODE_SCALE, "Scale", NODE_CLASS_DISTORT, NODE_OPTIONS);
node_type_socket_templates(&ntype, inputs, outputs);
node_type_size(&ntype, 90, 80, 100);
node_type_exec(&ntype, exec);
- nodeRegisterType(lb, &ntype);
+ nodeRegisterType(ttype, &ntype);
}
diff --git a/source/blender/nodes/texture/nodes/node_texture_texture.c b/source/blender/nodes/texture/nodes/node_texture_texture.c
index 667570582fe..3a0f11d5417 100644
--- a/source/blender/nodes/texture/nodes/node_texture_texture.c
+++ b/source/blender/nodes/texture/nodes/node_texture_texture.c
@@ -95,14 +95,14 @@ static void exec(void *data, bNode *node, bNodeStack **in, bNodeStack **out)
tex_output(node, in, out[0], &colorfn, data);
}
-void register_node_type_tex_texture(ListBase *lb)
+void register_node_type_tex_texture(bNodeTreeType *ttype)
{
static bNodeType ntype;
- node_type_base(&ntype, TEX_NODE_TEXTURE, "Texture", NODE_CLASS_INPUT, NODE_PREVIEW|NODE_OPTIONS);
+ node_type_base(ttype, &ntype, TEX_NODE_TEXTURE, "Texture", NODE_CLASS_INPUT, NODE_PREVIEW|NODE_OPTIONS);
node_type_socket_templates(&ntype, inputs, outputs);
node_type_size(&ntype, 120, 80, 240);
node_type_exec(&ntype, exec);
- nodeRegisterType(lb, &ntype);
+ nodeRegisterType(ttype, &ntype);
}
diff --git a/source/blender/nodes/texture/nodes/node_texture_translate.c b/source/blender/nodes/texture/nodes/node_texture_translate.c
index 8d09b4363f8..61b0702b333 100644
--- a/source/blender/nodes/texture/nodes/node_texture_translate.c
+++ b/source/blender/nodes/texture/nodes/node_texture_translate.c
@@ -64,14 +64,14 @@ static void exec(void *data, bNode *node, bNodeStack **in, bNodeStack **out)
tex_output(node, in, out[0], &colorfn, data);
}
-void register_node_type_tex_translate(ListBase *lb)
+void register_node_type_tex_translate(bNodeTreeType *ttype)
{
static bNodeType ntype;
- node_type_base(&ntype, TEX_NODE_TRANSLATE, "Translate", NODE_CLASS_DISTORT, NODE_OPTIONS);
+ node_type_base(ttype, &ntype, TEX_NODE_TRANSLATE, "Translate", NODE_CLASS_DISTORT, NODE_OPTIONS);
node_type_socket_templates(&ntype, inputs, outputs);
node_type_size(&ntype, 90, 80, 100);
node_type_exec(&ntype, exec);
- nodeRegisterType(lb, &ntype);
+ nodeRegisterType(ttype, &ntype);
}
diff --git a/source/blender/nodes/texture/nodes/node_texture_valToNor.c b/source/blender/nodes/texture/nodes/node_texture_valToNor.c
index 28b0a19c5a9..c8159060433 100644
--- a/source/blender/nodes/texture/nodes/node_texture_valToNor.c
+++ b/source/blender/nodes/texture/nodes/node_texture_valToNor.c
@@ -80,14 +80,14 @@ static void exec(void *data, bNode *node, bNodeStack **in, bNodeStack **out)
tex_output(node, in, out[0], &normalfn, data);
}
-void register_node_type_tex_valtonor(ListBase *lb)
+void register_node_type_tex_valtonor(bNodeTreeType *ttype)
{
static bNodeType ntype;
- node_type_base(&ntype, TEX_NODE_VALTONOR, "Value to Normal", NODE_CLASS_CONVERTOR, NODE_OPTIONS);
+ node_type_base(ttype, &ntype, TEX_NODE_VALTONOR, "Value to Normal", NODE_CLASS_CONVERTOR, NODE_OPTIONS);
node_type_socket_templates(&ntype, inputs, outputs);
node_type_size(&ntype, 90, 80, 100);
node_type_exec(&ntype, exec);
- nodeRegisterType(lb, &ntype);
+ nodeRegisterType(ttype, &ntype);
}
diff --git a/source/blender/nodes/texture/nodes/node_texture_valToRgb.c b/source/blender/nodes/texture/nodes/node_texture_valToRgb.c
index 0a6cdbd2024..c0efa43c14f 100644
--- a/source/blender/nodes/texture/nodes/node_texture_valToRgb.c
+++ b/source/blender/nodes/texture/nodes/node_texture_valToRgb.c
@@ -62,18 +62,18 @@ static void valtorgb_init(bNodeTree *UNUSED(ntree), bNode* node, bNodeTemplate *
node->storage = add_colorband(1);
}
-void register_node_type_tex_valtorgb(ListBase *lb)
+void register_node_type_tex_valtorgb(bNodeTreeType *ttype)
{
static bNodeType ntype;
- node_type_base(&ntype, TEX_NODE_VALTORGB, "ColorRamp", NODE_CLASS_CONVERTOR, NODE_OPTIONS);
+ node_type_base(ttype, &ntype, TEX_NODE_VALTORGB, "ColorRamp", NODE_CLASS_CONVERTOR, NODE_OPTIONS);
node_type_socket_templates(&ntype, valtorgb_in, valtorgb_out);
node_type_size(&ntype, 240, 200, 300);
node_type_init(&ntype, valtorgb_init);
node_type_storage(&ntype, "ColorBand", node_free_standard_storage, node_copy_standard_storage);
node_type_exec(&ntype, valtorgb_exec);
- nodeRegisterType(lb, &ntype);
+ nodeRegisterType(ttype, &ntype);
}
/* **************** RGBTOBW ******************** */
@@ -100,15 +100,14 @@ static void rgbtobw_exec(void *data, bNode *node, bNodeStack **in, bNodeStack **
tex_output(node, in, out[0], &rgbtobw_valuefn, data);
}
-void register_node_type_tex_rgbtobw(ListBase *lb)
+void register_node_type_tex_rgbtobw(bNodeTreeType *ttype)
{
static bNodeType ntype;
- node_type_base(&ntype, TEX_NODE_RGBTOBW, "RGB to BW", NODE_CLASS_CONVERTOR, 0);
+ node_type_base(ttype, &ntype, TEX_NODE_RGBTOBW, "RGB to BW", NODE_CLASS_CONVERTOR, 0);
node_type_socket_templates(&ntype, rgbtobw_in, rgbtobw_out);
node_type_size(&ntype, 80, 40, 120);
node_type_exec(&ntype, rgbtobw_exec);
- nodeRegisterType(lb, &ntype);
+ nodeRegisterType(ttype, &ntype);
}
-
diff --git a/source/blender/nodes/texture/nodes/node_texture_viewer.c b/source/blender/nodes/texture/nodes/node_texture_viewer.c
index a9670bfa78b..a588f13f18f 100644
--- a/source/blender/nodes/texture/nodes/node_texture_viewer.c
+++ b/source/blender/nodes/texture/nodes/node_texture_viewer.c
@@ -56,14 +56,17 @@ static void exec(void *data, bNode *node, bNodeStack **in, bNodeStack **UNUSED(o
}
}
-void register_node_type_tex_viewer(ListBase *lb)
+void register_node_type_tex_viewer(bNodeTreeType *ttype)
{
static bNodeType ntype;
- node_type_base(&ntype, TEX_NODE_VIEWER, "Viewer", NODE_CLASS_OUTPUT, NODE_PREVIEW);
+ node_type_base(ttype, &ntype, TEX_NODE_VIEWER, "Viewer", NODE_CLASS_OUTPUT, NODE_PREVIEW);
node_type_socket_templates(&ntype, inputs, outputs);
node_type_size(&ntype, 100, 60, 150);
node_type_exec(&ntype, exec);
- nodeRegisterType(lb, &ntype);
+ /* Do not allow muting viewer node. */
+ node_type_mute(&ntype, NULL, NULL);
+
+ nodeRegisterType(ttype, &ntype);
}
diff --git a/source/blender/quicktime/apple/qtkit_export.m b/source/blender/quicktime/apple/qtkit_export.m
index e0a87b33b5f..b26781d8026 100644
--- a/source/blender/quicktime/apple/qtkit_export.m
+++ b/source/blender/quicktime/apple/qtkit_export.m
@@ -779,7 +779,7 @@ void free_qtcomponentdata(void) {
void quicktime_verify_image_type(RenderData *rd)
{
- if (rd->imtype == R_QUICKTIME) {
+ if (rd->imtype == R_IMF_IMTYPE_QUICKTIME) {
if ((rd->qtcodecsettings.codecType<= 0) ||
(rd->qtcodecsettings.codecSpatialQuality <0) ||
(rd->qtcodecsettings.codecSpatialQuality > 100)) {
diff --git a/source/blender/quicktime/apple/quicktime_export.c b/source/blender/quicktime/apple/quicktime_export.c
index 5c0460d4e74..ffda20ead7f 100644
--- a/source/blender/quicktime/apple/quicktime_export.c
+++ b/source/blender/quicktime/apple/quicktime_export.c
@@ -689,7 +689,7 @@ static void check_renderbutton_framerate(RenderData *rd, ReportList *reports)
void quicktime_verify_image_type(RenderData *rd)
{
- if (rd->imtype == R_QUICKTIME) {
+ if (rd->imtype == R_IMF_IMTYPE_QUICKTIME) {
if ((rd->qtcodecsettings.codecType== 0) ||
(rd->qtcodecsettings.codecSpatialQuality <0) ||
(rd->qtcodecsettings.codecSpatialQuality > 100)) {
diff --git a/source/blender/render/extern/include/RE_pipeline.h b/source/blender/render/extern/include/RE_pipeline.h
index bcce7cbdfcc..600d1a3c377 100644
--- a/source/blender/render/extern/include/RE_pipeline.h
+++ b/source/blender/render/extern/include/RE_pipeline.h
@@ -227,7 +227,7 @@ int RE_WriteRenderResult(struct ReportList *reports, RenderResult *rr, const cha
struct RenderResult *RE_MultilayerConvert(void *exrhandle, int rectx, int recty);
extern const float default_envmap_layout[];
-int RE_WriteEnvmapResult(struct ReportList *reports, struct Scene *scene, struct EnvMap *env, const char *relpath, int imtype, float layout[12]);
+int RE_WriteEnvmapResult(struct ReportList *reports, struct Scene *scene, struct EnvMap *env, const char *relpath, const char imtype, float layout[12]);
/* do a full sample buffer compo */
void RE_MergeFullSample(struct Render *re, struct Main *bmain, struct Scene *sce, struct bNodeTree *ntree);
diff --git a/source/blender/render/intern/source/pipeline.c b/source/blender/render/intern/source/pipeline.c
index ca019e3ffe8..c5cea980b04 100644
--- a/source/blender/render/intern/source/pipeline.c
+++ b/source/blender/render/intern/source/pipeline.c
@@ -1279,7 +1279,7 @@ void RE_InitState(Render *re, Render *source, RenderData *rd, SceneRenderLayer *
re->recty= winy;
}
- if(re->rectx < 2 || re->recty < 2 || (BKE_imtype_is_movie(rd->imtype) &&
+ if(re->rectx < 2 || re->recty < 2 || (BKE_imtype_is_movie(rd->im_format.imtype) &&
(re->rectx < 16 || re->recty < 16) )) {
BKE_report(re->reports, RPT_ERROR, "Image too small");
re->ok= 0;
@@ -2958,13 +2958,13 @@ void RE_BlenderFrame(Render *re, Main *bmain, Scene *scene, SceneRenderLayer *sr
do_render_all_options(re);
if(write_still && !G.afbreek) {
- if(BKE_imtype_is_movie(scene->r.imtype)) {
+ if(BKE_imtype_is_movie(scene->r.im_format.imtype)) {
/* operator checks this but incase its called from elsewhere */
printf("Error: cant write single images with a movie format!\n");
}
else {
char name[FILE_MAX];
- BKE_makepicstring(name, scene->r.pic, bmain->name, scene->r.cfra, scene->r.imtype, scene->r.scemode & R_EXTENSION, FALSE);
+ BKE_makepicstring(name, scene->r.pic, bmain->name, scene->r.cfra, scene->r.im_format.imtype, scene->r.scemode & R_EXTENSION, FALSE);
/* reports only used for Movie */
do_write_image_or_movie(re, bmain, scene, NULL, name);
@@ -2988,7 +2988,7 @@ static int do_write_image_or_movie(Render *re, Main *bmain, Scene *scene, bMovie
RE_AcquireResultImage(re, &rres);
/* write movie or image */
- if(BKE_imtype_is_movie(scene->r.imtype)) {
+ if(BKE_imtype_is_movie(scene->r.im_format.imtype)) {
int dofree = 0;
/* note; the way it gets 32 bits rects is weak... */
if(rres.rect32==NULL) {
@@ -3006,16 +3006,16 @@ static int do_write_image_or_movie(Render *re, Main *bmain, Scene *scene, bMovie
if(name_override)
BLI_strncpy(name, name_override, sizeof(name));
else
- BKE_makepicstring(name, scene->r.pic, bmain->name, scene->r.cfra, scene->r.imtype, scene->r.scemode & R_EXTENSION, TRUE);
+ BKE_makepicstring(name, scene->r.pic, bmain->name, scene->r.cfra, scene->r.im_format.imtype, scene->r.scemode & R_EXTENSION, TRUE);
- if(re->r.imtype==R_MULTILAYER) {
+ if(re->r.im_format.imtype==R_IMF_IMTYPE_MULTILAYER) {
if(re->result) {
- RE_WriteRenderResult(re->reports, re->result, name, scene->r.quality);
+ RE_WriteRenderResult(re->reports, re->result, name, scene->r.im_format.compress);
printf("Saved: %s", name);
}
}
else {
- ImBuf *ibuf= IMB_allocImBuf(rres.rectx, rres.recty, scene->r.planes, 0);
+ ImBuf *ibuf= IMB_allocImBuf(rres.rectx, rres.recty, scene->r.im_format.planes, 0);
/* if not exists, BKE_write_ibuf makes one */
ibuf->rect= (unsigned int *)rres.rect32;
@@ -3030,7 +3030,7 @@ static int do_write_image_or_movie(Render *re, Main *bmain, Scene *scene, bMovie
/* sequence editor can generate 8bpc render buffers */
if (ibuf->rect) {
ibuf->profile = IB_PROFILE_SRGB;
- if (ELEM(scene->r.imtype, R_OPENEXR, R_RADHDR))
+ if (BKE_imtype_valid_depths(scene->r.im_format.imtype) & (R_IMF_CHAN_DEPTH_12|R_IMF_CHAN_DEPTH_16|R_IMF_CHAN_DEPTH_24|R_IMF_CHAN_DEPTH_32))
IMB_float_from_rect(ibuf);
} else {
ibuf->profile = IB_PROFILE_LINEAR_RGB;
@@ -3039,14 +3039,14 @@ static int do_write_image_or_movie(Render *re, Main *bmain, Scene *scene, bMovie
/* color -> greyscale */
/* editing directly would alter the render view */
- if(scene->r.planes == 8) {
+ if(scene->r.im_format.planes == R_IMF_PLANES_BW) {
ImBuf *ibuf_bw= IMB_dupImBuf(ibuf);
IMB_color_to_bw(ibuf_bw);
IMB_freeImBuf(ibuf);
ibuf= ibuf_bw;
}
- ok= BKE_write_ibuf_stamp(scene, camera, ibuf, name, scene->r.imtype, scene->r.subimtype, scene->r.quality);
+ ok= BKE_write_ibuf_stamp(scene, camera, ibuf, name, &scene->r.im_format);
if(ok==0) {
printf("Render error: cannot save %s\n", name);
@@ -3054,12 +3054,15 @@ static int do_write_image_or_movie(Render *re, Main *bmain, Scene *scene, bMovie
else printf("Saved: %s", name);
/* optional preview images for exr */
- if(ok && scene->r.imtype==R_OPENEXR && (scene->r.subimtype & R_PREVIEW_JPG)) {
+ if(ok && scene->r.im_format.imtype==R_IMF_IMTYPE_OPENEXR && (scene->r.im_format.flag & R_IMF_FLAG_PREVIEW_JPG)) {
+ ImageFormatData imf= scene->r.im_format;
+ imf.imtype= R_IMF_IMTYPE_JPEG90;
+
if(BLI_testextensie(name, ".exr"))
name[strlen(name)-4]= 0;
- BKE_add_image_extension(name, R_JPEG90);
- ibuf->depth= 24;
- BKE_write_ibuf_stamp(scene, camera, ibuf, name, R_JPEG90, scene->r.subimtype, scene->r.quality);
+ BKE_add_image_extension(name, R_IMF_IMTYPE_JPEG90);
+ ibuf->planes= 24;
+ BKE_write_ibuf_stamp(scene, camera, ibuf, name, &imf);
printf("\nSaved: %s", name);
}
@@ -3080,7 +3083,7 @@ static int do_write_image_or_movie(Render *re, Main *bmain, Scene *scene, bMovie
/* saves images to disk */
void RE_BlenderAnim(Render *re, Main *bmain, Scene *scene, Object *camera_override, unsigned int lay, int sfra, int efra, int tfra)
{
- bMovieHandle *mh= BKE_get_movie_handle(scene->r.imtype);
+ bMovieHandle *mh= BKE_get_movie_handle(scene->r.im_format.imtype);
int cfrao= scene->r.cfra;
int nfra;
@@ -3094,7 +3097,7 @@ void RE_BlenderAnim(Render *re, Main *bmain, Scene *scene, Object *camera_overri
re->flag |= R_ANIMATION;
- if(BKE_imtype_is_movie(scene->r.imtype))
+ if(BKE_imtype_is_movie(scene->r.im_format.imtype))
if(!mh->start_movie(scene, &re->r, re->rectx, re->recty, re->reports))
G.afbreek= 1;
@@ -3149,9 +3152,9 @@ void RE_BlenderAnim(Render *re, Main *bmain, Scene *scene, Object *camera_overri
nfra+= tfra;
/* Touch/NoOverwrite options are only valid for image's */
- if(BKE_imtype_is_movie(scene->r.imtype) == 0) {
+ if(BKE_imtype_is_movie(scene->r.im_format.imtype) == 0) {
if(scene->r.mode & (R_NO_OVERWRITE | R_TOUCH))
- BKE_makepicstring(name, scene->r.pic, bmain->name, scene->r.cfra, scene->r.imtype, scene->r.scemode & R_EXTENSION, TRUE);
+ BKE_makepicstring(name, scene->r.pic, bmain->name, scene->r.cfra, scene->r.im_format.imtype, scene->r.scemode & R_EXTENSION, TRUE);
if(scene->r.mode & R_NO_OVERWRITE && BLI_exists(name)) {
printf("skipping existing frame \"%s\"\n", name);
@@ -3181,7 +3184,7 @@ void RE_BlenderAnim(Render *re, Main *bmain, Scene *scene, Object *camera_overri
if(G.afbreek==1) {
/* remove touched file */
- if(BKE_imtype_is_movie(scene->r.imtype) == 0) {
+ if(BKE_imtype_is_movie(scene->r.im_format.imtype) == 0) {
if (scene->r.mode & R_TOUCH && BLI_exists(name) && BLI_file_size(name) == 0) {
BLI_delete(name, 0, 0);
}
@@ -3197,7 +3200,7 @@ void RE_BlenderAnim(Render *re, Main *bmain, Scene *scene, Object *camera_overri
}
/* end movie */
- if(BKE_imtype_is_movie(scene->r.imtype))
+ if(BKE_imtype_is_movie(scene->r.im_format.imtype))
mh->end_movie();
scene->r.cfra= cfrao;
@@ -3340,8 +3343,9 @@ void RE_result_load_from_file(RenderResult *result, ReportList *reports, const c
const float default_envmap_layout[] = { 0,0, 1,0, 2,0, 0,1, 1,1, 2,1 };
-int RE_WriteEnvmapResult(struct ReportList *reports, Scene *scene, EnvMap *env, const char *relpath, int imtype, float layout[12])
+int RE_WriteEnvmapResult(struct ReportList *reports, Scene *scene, EnvMap *env, const char *relpath, const char imtype, float layout[12])
{
+ ImageFormatData imf;
ImBuf *ibuf=NULL;
int ok;
int dx;
@@ -3353,6 +3357,9 @@ int RE_WriteEnvmapResult(struct ReportList *reports, Scene *scene, EnvMap *env,
return 0;
}
+ imf= scene->r.im_format;
+ imf.imtype= imtype;
+
dx= env->cube[1]->x;
if (env->type == ENV_CUBE) {
@@ -3383,7 +3390,7 @@ int RE_WriteEnvmapResult(struct ReportList *reports, Scene *scene, EnvMap *env,
BLI_strncpy(filepath, relpath, sizeof(filepath));
BLI_path_abs(filepath, G.main->name);
- ok= BKE_write_ibuf(ibuf, filepath, imtype, scene->r.subimtype, scene->r.quality);
+ ok= BKE_write_ibuf(ibuf, filepath, &imf);
IMB_freeImBuf(ibuf);
diff --git a/source/blender/render/intern/source/rendercore.c b/source/blender/render/intern/source/rendercore.c
index 456702e0827..5559d2ff34c 100644
--- a/source/blender/render/intern/source/rendercore.c
+++ b/source/blender/render/intern/source/rendercore.c
@@ -2458,7 +2458,7 @@ static int get_next_bake_face(BakeShade *bs)
imb_freerectImBuf(ibuf);
/* clear image */
if(R.r.bake_flag & R_BAKE_CLEAR)
- IMB_rectfill(ibuf, (ibuf->depth == 32) ? vec_alpha : vec_solid);
+ IMB_rectfill(ibuf, (ibuf->planes == R_IMF_PLANES_RGBA) ? vec_alpha : vec_solid);
/* might be read by UI to set active image for display */
R.bakebuf= ima;
@@ -2566,7 +2566,7 @@ static void *do_bake_thread(void *bs_v)
void RE_bake_ibuf_filter(ImBuf *ibuf, char *mask, const int filter)
{
/* must check before filtering */
- const short is_new_alpha= (ibuf->depth != 32) && BKE_alphatest_ibuf(ibuf);
+ const short is_new_alpha= (ibuf->planes != R_IMF_PLANES_RGBA) && BKE_alphatest_ibuf(ibuf);
/* Margin */
if(filter) {
@@ -2575,10 +2575,10 @@ void RE_bake_ibuf_filter(ImBuf *ibuf, char *mask, const int filter)
/* if the bake results in new alpha then change the image setting */
if(is_new_alpha) {
- ibuf->depth= 32;
+ ibuf->planes= R_IMF_PLANES_RGBA;
}
else {
- if(filter && ibuf->depth != 32) {
+ if(filter && ibuf->planes != R_IMF_PLANES_RGBA) {
/* clear alpha added by filtering */
IMB_rectfill_alpha(ibuf, 1.0f);
}
diff --git a/source/blender/windowmanager/intern/wm_keymap.c b/source/blender/windowmanager/intern/wm_keymap.c
index 2e191a5ab6d..c75395456dd 100644
--- a/source/blender/windowmanager/intern/wm_keymap.c
+++ b/source/blender/windowmanager/intern/wm_keymap.c
@@ -597,6 +597,8 @@ static void wm_keymap_diff_update(ListBase *lb, wmKeyMap *defaultmap, wmKeyMap *
/* create diff keymap */
diffmap= wm_keymap_new(km->idname, km->spaceid, km->regionid);
diffmap->flag |= KEYMAP_DIFF;
+ if(defaultmap->flag & KEYMAP_MODAL)
+ diffmap->flag |= KEYMAP_MODAL;
wm_keymap_diff(diffmap, defaultmap, km, origmap, addonmap);
/* add to list if not empty */
diff --git a/source/blenderplayer/bad_level_call_stubs/stubs.c b/source/blenderplayer/bad_level_call_stubs/stubs.c
index 0e28d23e52b..f0c706afb79 100644
--- a/source/blenderplayer/bad_level_call_stubs/stubs.c
+++ b/source/blenderplayer/bad_level_call_stubs/stubs.c
@@ -173,7 +173,7 @@ double elbeemEstimateMemreq(int res, float sx, float sy, float sz, int refine, c
struct Render *RE_NewRender(const char *name){return (struct Render*) NULL;}
void RE_SwapResult(struct Render *re, struct RenderResult **rr){}
void RE_BlenderFrame(struct Render *re, struct Scene *scene, int frame){}
-int RE_WriteEnvmapResult(struct ReportList *reports, struct Scene *scene, struct EnvMap *env, const char *relpath, int imtype, float layout[12]) { return 0; }
+int RE_WriteEnvmapResult(struct ReportList *reports, struct Scene *scene, struct EnvMap *env, const char *relpath, const char imtype, float layout[12]) { return 0; }
/* rna */
float *give_cursor(struct Scene *scene, struct View3D *v3d){return (float *) NULL;}
@@ -407,6 +407,7 @@ void uiTemplateKeymapItemProperties(struct uiLayout *layout, struct PointerRNA *
void uiTemplateMovieClip(struct uiLayout *layout, struct bContext *C, struct PointerRNA *ptr, const char *propname, int compact){}
void uiTemplateTrack(struct uiLayout *layout, struct PointerRNA *ptr, const char *propname){}
void uiTemplateMarker(struct uiLayout *layout, struct PointerRNA *ptr, const char *propname, PointerRNA *userptr, PointerRNA *trackptr, int compact){}
+void uiTemplateImageSettings(struct uiLayout *layout, struct PointerRNA *imfptr){}
/* rna render */
struct RenderResult *RE_engine_begin_result(struct RenderEngine *engine, int x, int y, int w, int h){return (struct RenderResult *) NULL;}
diff --git a/source/creator/creator.c b/source/creator/creator.c
index 93cc5ad0d2e..61bb50daa3e 100644
--- a/source/creator/creator.c
+++ b/source/creator/creator.c
@@ -612,40 +612,47 @@ static int set_image_type(int argc, const char **argv, void *data)
const char *imtype = argv[1];
Scene *scene= CTX_data_scene(C);
if (scene) {
- if (!strcmp(imtype,"TGA")) scene->r.imtype = R_TARGA;
- else if (!strcmp(imtype,"IRIS")) scene->r.imtype = R_IRIS;
+ char imtype_new;
+
+ if (!strcmp(imtype,"TGA")) imtype_new = R_IMF_IMTYPE_TARGA;
+ else if (!strcmp(imtype,"IRIS")) imtype_new = R_IMF_IMTYPE_IRIS;
#ifdef WITH_DDS
- else if (!strcmp(imtype,"DDS")) scene->r.imtype = R_DDS;
+ else if (!strcmp(imtype,"DDS")) imtype_new = R_IMF_IMTYPE_DDS;
#endif
- else if (!strcmp(imtype,"JPEG")) scene->r.imtype = R_JPEG90;
- else if (!strcmp(imtype,"IRIZ")) scene->r.imtype = R_IRIZ;
- else if (!strcmp(imtype,"RAWTGA")) scene->r.imtype = R_RAWTGA;
- else if (!strcmp(imtype,"AVIRAW")) scene->r.imtype = R_AVIRAW;
- else if (!strcmp(imtype,"AVIJPEG")) scene->r.imtype = R_AVIJPEG;
- else if (!strcmp(imtype,"PNG")) scene->r.imtype = R_PNG;
- else if (!strcmp(imtype,"AVICODEC")) scene->r.imtype = R_AVICODEC;
- else if (!strcmp(imtype,"QUICKTIME")) scene->r.imtype = R_QUICKTIME;
- else if (!strcmp(imtype,"BMP")) scene->r.imtype = R_BMP;
+ else if (!strcmp(imtype,"JPEG")) imtype_new = R_IMF_IMTYPE_JPEG90;
+ else if (!strcmp(imtype,"IRIZ")) imtype_new = R_IMF_IMTYPE_IRIZ;
+ else if (!strcmp(imtype,"RAWTGA")) imtype_new = R_IMF_IMTYPE_RAWTGA;
+ else if (!strcmp(imtype,"AVIRAW")) imtype_new = R_IMF_IMTYPE_AVIRAW;
+ else if (!strcmp(imtype,"AVIJPEG")) imtype_new = R_IMF_IMTYPE_AVIJPEG;
+ else if (!strcmp(imtype,"PNG")) imtype_new = R_IMF_IMTYPE_PNG;
+ else if (!strcmp(imtype,"AVICODEC")) imtype_new = R_IMF_IMTYPE_AVICODEC;
+ else if (!strcmp(imtype,"QUICKTIME")) imtype_new = R_IMF_IMTYPE_QUICKTIME;
+ else if (!strcmp(imtype,"BMP")) imtype_new = R_IMF_IMTYPE_BMP;
#ifdef WITH_HDR
- else if (!strcmp(imtype,"HDR")) scene->r.imtype = R_RADHDR;
+ else if (!strcmp(imtype,"HDR")) imtype_new = R_IMF_IMTYPE_RADHDR;
#endif
#ifdef WITH_TIFF
- else if (!strcmp(imtype,"TIFF")) scene->r.imtype = R_TIFF;
+ else if (!strcmp(imtype,"TIFF")) imtype_new = R_IMF_IMTYPE_TIFF;
#endif
#ifdef WITH_OPENEXR
- else if (!strcmp(imtype,"EXR")) scene->r.imtype = R_OPENEXR;
- else if (!strcmp(imtype,"MULTILAYER")) scene->r.imtype = R_MULTILAYER;
+ else if (!strcmp(imtype,"EXR")) imtype_new = R_IMF_IMTYPE_OPENEXR;
+ else if (!strcmp(imtype,"MULTILAYER")) imtype_new = R_IMF_IMTYPE_MULTILAYER;
#endif
- else if (!strcmp(imtype,"MPEG")) scene->r.imtype = R_FFMPEG;
- else if (!strcmp(imtype,"FRAMESERVER")) scene->r.imtype = R_FRAMESERVER;
+ else if (!strcmp(imtype,"MPEG")) imtype_new = R_IMF_IMTYPE_FFMPEG;
+ else if (!strcmp(imtype,"FRAMESERVER")) imtype_new = R_IMF_IMTYPE_FRAMESERVER;
#ifdef WITH_CINEON
- else if (!strcmp(imtype,"CINEON")) scene->r.imtype = R_CINEON;
- else if (!strcmp(imtype,"DPX")) scene->r.imtype = R_DPX;
+ else if (!strcmp(imtype,"CINEON")) imtype_new = R_IMF_IMTYPE_CINEON;
+ else if (!strcmp(imtype,"DPX")) imtype_new = R_IMF_IMTYPE_DPX;
#endif
#ifdef WITH_OPENJPEG
- else if (!strcmp(imtype,"JP2")) scene->r.imtype = R_JP2;
+ else if (!strcmp(imtype,"JP2")) imtype_new = R_IMF_IMTYPE_JP2;
#endif
- else printf("\nError: Format from '-F / --render-format' not known or not compiled in this release.\n");
+ else {
+ printf("\nError: Format from '-F / --render-format' not known or not compiled in this release.\n");
+ imtype_new= scene->r.im_format.imtype;
+ }
+
+ scene->r.im_format.imtype= imtype_new;
}
else {
printf("\nError: no blend loaded. order the arguments so '-F / --render-format' is after the blend is loaded.\n");
diff --git a/source/gameengine/BlenderRoutines/KX_BlenderGL.cpp b/source/gameengine/BlenderRoutines/KX_BlenderGL.cpp
index 9d2e8751a41..14346cd8260 100644
--- a/source/gameengine/BlenderRoutines/KX_BlenderGL.cpp
+++ b/source/gameengine/BlenderRoutines/KX_BlenderGL.cpp
@@ -265,7 +265,7 @@ void BL_MakeScreenShot(ScrArea *curarea, const char* filename)
ImBuf *ibuf;
BLI_path_abs(path, G.main->name);
/* BKE_add_image_extension() checks for if extension was already set */
- BKE_add_image_extension(path, R_PNG); /* scene->r.imtype */
+ BKE_add_image_extension(path, R_IMF_IMTYPE_PNG); /* scene->r.im_format.imtype */
ibuf= IMB_allocImBuf(dumpsx, dumpsy, 24, 0);
ibuf->rect= dumprect;
ibuf->ftype= PNG;
diff --git a/source/gameengine/GamePlayer/common/bmfont.cpp b/source/gameengine/GamePlayer/common/bmfont.cpp
index b03d7f40bdd..dd7126b2944 100644
--- a/source/gameengine/GamePlayer/common/bmfont.cpp
+++ b/source/gameengine/GamePlayer/common/bmfont.cpp
@@ -171,7 +171,7 @@ void readBitmapFontVersion0(ImBuf * ibuf, unsigned char * rect, int step)
ibuf->userdata = bmfont;
ibuf->userflags |= IB_BITMAPFONT;
- if (ibuf->depth < 32) {
+ if (ibuf->planes < 32) {
// we're going to fake alpha here:
calcAlpha(ibuf);
}