- use cache_ as a prefix for new modifiers.
authorCampbell Barton <ideasman42@gmail.com>
Tue, 22 Nov 2011 10:04:28 +0000 (10:04 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Tue, 22 Nov 2011 10:04:28 +0000 (10:04 +0000)
- some comments to recent image changes.

source/blender/blenkernel/intern/dynamicpaint.c
source/blender/editors/space_image/image_buttons.c
source/blender/makesdna/DNA_scene_types.h
source/blender/makesrna/intern/rna_scene.c
source/blender/modifiers/intern/MOD_fluidsim_util.c
source/blender/modifiers/intern/MOD_ocean.c

index d31dad8f8faab5821dbc380f36a204f0a3ee8de0..4f3e37391f45fc8566c39a9f838a09d05a5f98ba 100644 (file)
@@ -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");
 
index c1ddad3c01283ff63b5814311f0f5e550fa34e7a..11a9c0d8d40be16212247474b3ce862245e75f26 100644 (file)
@@ -855,16 +855,16 @@ void uiTemplateImageSettings(uiLayout *layout, PointerRNA *imfptr)
                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 (ELEM(imf->imtype, R_IMF_IMTYPE_OPENEXR, R_IMF_IMTYPE_MULTILAYER)) {
-               uiItemR(col, imfptr, "exr_codec", 0, NULL, ICON_NONE);
-
-               if (is_render_out && (imf->imtype == R_IMF_IMTYPE_OPENEXR)) {
-                       uiItemR(col, imfptr, "use_preview", 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) {
index 42cd45034fe86d73dd31e59484cf57355d0f08e5..720f2cc5b08116c315547732cef14cb2e3bd54f7 100644 (file)
@@ -209,8 +209,13 @@ typedef struct SceneRenderLayer {
 /* note, srl->passflag is treestore element 'nr' in outliner, short still... */
 
 
-/* generic image format settings,
- * no video codec info however */
+/* 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
index 8f03bb9b55c567f7de0903da5a1b36bebef14046..f1dfa81914063f767f5bb58abdabaf8b571cff0a 100644 (file)
@@ -2390,7 +2390,10 @@ 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 */
+/* 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)
 {
index 34c8c4cc1b1e4c691c86bf0f156e092ff2a7042f..7222265f61c4d483547efd892b730b2c1a23f7f2 100644 (file)
@@ -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
index db98c2234163cf6dfb13f3f20c77af2fdc4f25fb..152a9a6750263f47eeada0f3a7b5d307898d786d 100644 (file)
@@ -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;