- 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 d31dad8..4f3e373 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 c1ddad3..11a9c0d 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 42cd450..720f2cc 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 8f03bb9..f1dfa81 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 34c8c4c..7222265 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 db98c22..152a9a6 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;