diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-03-09 22:28:30 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-03-09 22:28:30 +0400 |
commit | 89a963fb7fdff543b77de790355b9dac3019bd33 (patch) | |
tree | 4e1d2245e20f8c21625e99d771776f66c233a0de /source/blender/makesrna | |
parent | de4bd55e01bc574c13977537ace1a0901dcfcaf0 (diff) |
style cleanup: comment blocks
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r-- | source/blender/makesrna/RNA_define.h | 8 | ||||
-rw-r--r-- | source/blender/makesrna/RNA_types.h | 2 | ||||
-rw-r--r-- | source/blender/makesrna/intern/makesrna.c | 24 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_ID.c | 12 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_access.c | 4 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_define.c | 2 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_dynamicpaint.c | 44 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_gpencil.c | 4 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_key.c | 6 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_object_api.c | 8 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_sculpt_paint.c | 2 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_space.c | 2 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_wm.c | 2 |
13 files changed, 66 insertions, 54 deletions
diff --git a/source/blender/makesrna/RNA_define.h b/source/blender/makesrna/RNA_define.h index 95f988b470b..d6c3422c8d4 100644 --- a/source/blender/makesrna/RNA_define.h +++ b/source/blender/makesrna/RNA_define.h @@ -100,10 +100,10 @@ PropertyRNA *RNA_def_float_rotation(StructOrFunctionRNA *cont, const char *ident float hardmin, float hardmax, const char *ui_name, const char *ui_description, float softmin, float softmax); PropertyRNA *RNA_def_float_array(StructOrFunctionRNA *cont, const char *identifier, int len, const float *default_value, float hardmin, float hardmax, const char *ui_name, const char *ui_description, float softmin, float softmax); - /* -PropertyRNA *RNA_def_float_dynamic_array(StructOrFunctionRNA *cont, const char *identifier, float hardmin, float hardmax, - const char *ui_name, const char *ui_description, float softmin, float softmax, unsigned int dimension, unsigned short dim_size[]); - */ + +//PropertyRNA *RNA_def_float_dynamic_array(StructOrFunctionRNA *cont, const char *identifier, float hardmin, float hardmax, +// const char *ui_name, const char *ui_description, float softmin, float softmax, unsigned int dimension, unsigned short dim_size[]); + PropertyRNA *RNA_def_float_percentage(StructOrFunctionRNA *cont, const char *identifier, float default_value, float hardmin, float hardmax, const char *ui_name, const char *ui_description, float softmin, float softmax); PropertyRNA *RNA_def_float_factor(StructOrFunctionRNA *cont, const char *identifier, float default_value, float hardmin, float hardmax, diff --git a/source/blender/makesrna/RNA_types.h b/source/blender/makesrna/RNA_types.h index af45c6d1696..8a668f68761 100644 --- a/source/blender/makesrna/RNA_types.h +++ b/source/blender/makesrna/RNA_types.h @@ -191,7 +191,7 @@ typedef enum PropertyFlag { * this exposes the flag as multiple options in python and the UI. * * note: these can't be animated so use with care. - */ + */ PROP_ENUM_FLAG = 1<<21, /* need context for update function */ diff --git a/source/blender/makesrna/intern/makesrna.c b/source/blender/makesrna/intern/makesrna.c index 418d4e31819..2e8090c71f4 100644 --- a/source/blender/makesrna/intern/makesrna.c +++ b/source/blender/makesrna/intern/makesrna.c @@ -1559,12 +1559,14 @@ static void rna_def_property_funcs_impl_cpp(FILE *f, StructRNA *srna, PropertyDe break; } case PROP_COLLECTION: { - /*CollectionPropertyRNA *cprop= (CollectionPropertyRNA*)dp->prop; +#if 0 + CollectionPropertyRNA *cprop= (CollectionPropertyRNA*)dp->prop; if(cprop->type) fprintf(f, "\tCOLLECTION_PROPERTY(%s, %s, %s)", (const char*)cprop->type, srna->identifier, prop->identifier); else - fprintf(f, "\tCOLLECTION_PROPERTY(%s, %s, %s)", "UnknownType", srna->identifier, prop->identifier);*/ + fprintf(f, "\tCOLLECTION_PROPERTY(%s, %s, %s)", "UnknownType", srna->identifier, prop->identifier); +#endif break; } } @@ -2529,9 +2531,11 @@ static void rna_generate(BlenderRNA *brna, FILE *f, const char *filename, const PropertyDefRNA *dp; FunctionDefRNA *dfunc; - fprintf(f, "\n/* Automatically generated struct definitions for the Data API.\n" - " Do not edit manually, changes will be overwritten. */\n\n" - "#define RNA_RUNTIME\n\n"); + fprintf(f, + "\n" + "/* Automatically generated struct definitions for the Data API.\n" + " * Do not edit manually, changes will be overwritten. */\n\n" + "#define RNA_RUNTIME\n\n"); fprintf(f, "#include <float.h>\n"); fprintf(f, "#include <stdio.h>\n"); @@ -2606,8 +2610,9 @@ static void rna_generate_header(BlenderRNA *brna, FILE *f) fprintf(f, "\n#ifndef __RNA_BLENDER_H__\n"); fprintf(f, "#define __RNA_BLENDER_H__\n\n"); - fprintf(f, "/* Automatically generated function declarations for the Data API.\n" - " Do not edit manually, changes will be overwritten. */\n\n"); + fprintf(f, + "/* Automatically generated function declarations for the Data API.\n" + " * Do not edit manually, changes will be overwritten. */\n\n"); fprintf(f, "#include \"RNA_types.h\"\n\n"); @@ -2768,8 +2773,9 @@ static void rna_generate_header_cpp(BlenderRNA *brna, FILE *f) fprintf(f, "\n#ifndef __RNA_BLENDER_CPP_H__\n"); fprintf(f, "#define __RNA_BLENDER_CPP_H__\n\n"); - fprintf(f, "/* Automatically generated classes for the Data API.\n" - " Do not edit manually, changes will be overwritten. */\n\n"); + fprintf(f, + "/* Automatically generated classes for the Data API.\n" + " * Do not edit manually, changes will be overwritten. */\n\n"); fprintf(f, "#include \"RNA_blender.h\"\n"); fprintf(f, "#include \"RNA_types.h\"\n"); diff --git a/source/blender/makesrna/intern/rna_ID.c b/source/blender/makesrna/intern/rna_ID.c index 6ca66f1d116..bb541471a19 100644 --- a/source/blender/makesrna/intern/rna_ID.c +++ b/source/blender/makesrna/intern/rna_ID.c @@ -262,11 +262,13 @@ ID *rna_ID_copy(ID *id) static void rna_ID_update_tag(ID *id, ReportList *reports, int flag) { /* XXX, new function for this! */ - /*if (ob->type == OB_FONT) { +#if 0 + if (ob->type == OB_FONT) { Curve *cu = ob->data; freedisplist(&cu->disp); BKE_text_to_curve(sce, ob, CU_LEFT); - }*/ + } +#endif if (flag == 0) { /* pass */ @@ -281,12 +283,14 @@ static void rna_ID_update_tag(ID *id, ReportList *reports, int flag) } break; /* Could add particle updates later */ -/* case ID_PA: +#if 0 + case ID_PA: if(flag & ~(OB_RECALC_ALL|PSYS_RECALC)) { BKE_report(reports, RPT_ERROR, "'refresh' incompatible with ParticleSettings ID type"); return; } - break; */ + break; +#endif default: BKE_report(reports, RPT_ERROR, "This ID type is not compatible with any 'refresh' options"); return; diff --git a/source/blender/makesrna/intern/rna_access.c b/source/blender/makesrna/intern/rna_access.c index bf9a21a87c6..2ccd7d293d3 100644 --- a/source/blender/makesrna/intern/rna_access.c +++ b/source/blender/makesrna/intern/rna_access.c @@ -1447,7 +1447,7 @@ static void rna_property_update(bContext *C, Main *bmain, Scene *scene, PointerR if (is_rna) { if (prop->update) { /* ideally no context would be needed for update, but there's some - parts of the code that need it still, so we have this exception */ + * parts of the code that need it still, so we have this exception */ if (prop->flag & PROP_CONTEXT_UPDATE) { if (C) { if (prop->flag & PROP_CONTEXT_PROPERTY_UPDATE) { @@ -2521,7 +2521,7 @@ PointerRNA RNA_property_pointer_get(PointerRNA *ptr, PropertyRNA *prop) } else if (prop->flag & PROP_IDPROPERTY) { /* XXX temporary hack to add it automatically, reading should - never do any write ops, to ensure thread safety etc .. */ + * never do any write ops, to ensure thread safety etc .. */ RNA_property_pointer_add(ptr, prop); return RNA_property_pointer_get(ptr, prop); } diff --git a/source/blender/makesrna/intern/rna_define.c b/source/blender/makesrna/intern/rna_define.c index a27ee0af828..202418205f3 100644 --- a/source/blender/makesrna/intern/rna_define.c +++ b/source/blender/makesrna/intern/rna_define.c @@ -2694,7 +2694,7 @@ int rna_parameter_size(PropertyRNA *parm) } /* this function returns the size of the memory allocated for the parameter, - useful for instance for memory alignment or for storing additional information */ + * useful for instance for memory alignment or for storing additional information */ int rna_parameter_size_alloc(PropertyRNA *parm) { int size = rna_parameter_size(parm); diff --git a/source/blender/makesrna/intern/rna_dynamicpaint.c b/source/blender/makesrna/intern/rna_dynamicpaint.c index fafa3a72174..e9e7f58b638 100644 --- a/source/blender/makesrna/intern/rna_dynamicpaint.c +++ b/source/blender/makesrna/intern/rna_dynamicpaint.c @@ -68,8 +68,8 @@ static char *rna_DynamicPaintSurface_path(PointerRNA *ptr) /* -* Surfaces -*/ + * Surfaces + */ static void rna_DynamicPaint_redoModifier(Main *bmain, Scene *scene, PointerRNA *ptr) { @@ -102,7 +102,7 @@ static void rna_DynamicPaintSurface_changePreview(Main *bmain, Scene *scene, Poi DynamicPaintSurface *surface = act_surface->canvas->surfaces.first; /* since only one color surface can show preview at time - * disable preview on other surfaces*/ + * disable preview on other surfaces*/ for (; surface; surface = surface->next) { if (surface != act_surface) surface->flags &= ~MOD_DPAINT_PREVIEW; @@ -316,7 +316,7 @@ static void rna_def_canvas_surface(BlenderRNA *brna) {0, NULL, 0, NULL, NULL}}; /* Effect type - * Only used by ui to view per effect settings */ + * Only used by ui to view per effect settings */ static EnumPropertyItem prop_dynamicpaint_effecttype[] = { {1, "SPREAD", 0, "Spread", ""}, {2, "DRIP", 0, "Drip", ""}, @@ -383,8 +383,8 @@ static void rna_def_canvas_surface(BlenderRNA *brna) /* - * Paint, wet and displace - */ + * Paint, wet and displace + */ prop = RNA_def_property(srna, "use_dissolve", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flags", MOD_DPAINT_DISSOLVE); @@ -406,8 +406,8 @@ static void rna_def_canvas_surface(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Dry Speed", "Approximately in how many frames should drying happen"); /* - * Simulation settings - */ + * Simulation settings + */ prop = RNA_def_property(srna, "image_resolution", PROP_INT, PROP_NONE); RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); RNA_def_property_range(prop, 16.0, 4096.0); @@ -462,8 +462,8 @@ static void rna_def_canvas_surface(BlenderRNA *brna) RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_DynamicPaint_redoModifier"); /* - * Initial Color - */ + * Initial Color + */ prop = RNA_def_property(srna, "init_color_type", PROP_ENUM, PROP_NONE); RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); @@ -487,8 +487,8 @@ static void rna_def_canvas_surface(BlenderRNA *brna) RNA_def_property_update(prop, NC_MATERIAL|ND_SHADING_DRAW|ND_MODIFIER, "rna_DynamicPaintSurface_reset"); /* - * Effect Settings - */ + * Effect Settings + */ prop = RNA_def_property(srna, "effect_ui", PROP_ENUM, PROP_NONE); RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); RNA_def_property_enum_items(prop, prop_dynamicpaint_effecttype); @@ -562,8 +562,8 @@ static void rna_def_canvas_surface(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Acceleration", "How much surface acceleration affects dripping"); /* - * Output settings - */ + * Output settings + */ prop = RNA_def_property(srna, "use_premultiply", PROP_BOOLEAN, PROP_NONE); RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); RNA_def_property_boolean_sdna(prop, NULL, "flags", MOD_DPAINT_MULALPHA); @@ -691,8 +691,8 @@ static void rna_def_dynamic_paint_canvas_settings(BlenderRNA *brna) RNA_def_struct_path_func(srna, "rna_DynamicPaintCanvasSettings_path"); /* - * Surface Slots - */ + * Surface Slots + */ prop = RNA_def_property(srna, "canvas_surfaces", PROP_COLLECTION, PROP_NONE); RNA_def_property_collection_funcs(prop, "rna_DynamicPaint_surfaces_begin", "rna_iterator_listbase_next", "rna_iterator_listbase_end", "rna_iterator_listbase_get", NULL, NULL, NULL, NULL); RNA_def_property_struct_type(prop, "DynamicPaintSurface"); @@ -739,8 +739,8 @@ static void rna_def_dynamic_paint_brush_settings(BlenderRNA *brna) RNA_def_struct_path_func(srna, "rna_DynamicPaintBrushSettings_path"); /* - * Paint - */ + * Paint + */ prop = RNA_def_property(srna, "paint_color", PROP_FLOAT, PROP_COLOR_GAMMA); RNA_def_property_float_sdna(prop, NULL, "r"); RNA_def_property_array(prop, 3); @@ -878,8 +878,8 @@ static void rna_def_dynamic_paint_brush_settings(BlenderRNA *brna) /* - * Particle - */ + * Particle + */ prop = RNA_def_property(srna, "particle_system", PROP_POINTER, PROP_NONE); RNA_def_property_pointer_sdna(prop, NULL, "psys"); RNA_def_property_struct_type(prop, "ParticleSystem"); @@ -909,8 +909,8 @@ static void rna_def_dynamic_paint_brush_settings(BlenderRNA *brna) /* - * Color ramps - */ + * Color ramps + */ prop = RNA_def_property(srna, "paint_ramp", PROP_POINTER, PROP_NONE); RNA_def_property_pointer_sdna(prop, NULL, "paint_ramp"); RNA_def_property_struct_type(prop, "ColorRamp"); diff --git a/source/blender/makesrna/intern/rna_gpencil.c b/source/blender/makesrna/intern/rna_gpencil.c index 21cc97bd1c0..fa8f9bf9d35 100644 --- a/source/blender/makesrna/intern/rna_gpencil.c +++ b/source/blender/makesrna/intern/rna_gpencil.c @@ -253,13 +253,13 @@ static void rna_def_gpencil_layer(BlenderRNA *brna) RNA_def_property_update(prop, NC_SCREEN|ND_GPENCIL, NULL); /* expose as layers.active */ - /* +#if 0 prop= RNA_def_property(srna, "active", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", GP_LAYER_ACTIVE); RNA_def_property_boolean_funcs(prop, NULL, "rna_GPencilLayer_active_set"); RNA_def_property_ui_text(prop, "Active", "Set active layer for editing"); RNA_def_property_update(prop, NC_SCREEN|ND_GPENCIL, NULL); - */ +#endif prop = RNA_def_property(srna, "select", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", GP_LAYER_SELECT); diff --git a/source/blender/makesrna/intern/rna_key.c b/source/blender/makesrna/intern/rna_key.c index 54d258e2e72..9e7ea1379d9 100644 --- a/source/blender/makesrna/intern/rna_key.c +++ b/source/blender/makesrna/intern/rna_key.c @@ -494,11 +494,13 @@ static void rna_def_keydata(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Handle 2 Location", ""); RNA_def_property_update(prop, 0, "rna_Key_update_data"); - /* appears to be unused currently + /* appears to be unused currently */ +#if 0 prop= RNA_def_property(srna, "tilt", PROP_FLOAT, PROP_NONE); RNA_def_property_float_funcs(prop, "rna_ShapeKeyBezierPoint_tilt_get", "rna_ShapeKeyBezierPoint_tilt_set", NULL); RNA_def_property_ui_text(prop, "Tilt", ""); - RNA_def_property_update(prop, 0, "rna_Key_update_data"); */ + RNA_def_property_update(prop, 0, "rna_Key_update_data"); +#endif } static void rna_def_keyblock(BlenderRNA *brna) diff --git a/source/blender/makesrna/intern/rna_object_api.c b/source/blender/makesrna/intern/rna_object_api.c index 51fd52360e4..f33cf1a3993 100644 --- a/source/blender/makesrna/intern/rna_object_api.c +++ b/source/blender/makesrna/intern/rna_object_api.c @@ -104,8 +104,8 @@ Mesh *rna_Object_to_mesh(Object *ob, ReportList *reports, Scene *sce, int apply_ copycu = tmpobj->data = copy_curve( (Curve *) ob->data ); /* temporarily set edit so we get updates from edit mode, but - also because for text datablocks copying it while in edit - mode gives invalid data structures */ + * also because for text datablocks copying it while in edit + * mode gives invalid data structures */ copycu->editfont = tmpcu->editfont; copycu->editnurb = tmpcu->editnurb; @@ -279,8 +279,8 @@ static void dupli_render_particle_set(Scene *scene, Object *ob, int level, int e if (level == 0 && enable) { /* this is to make sure we get render level duplis in groups: - * the derivedmesh must be created before init_render_mesh, - * since object_duplilist does dupliparticles before that */ + * the derivedmesh must be created before init_render_mesh, + * since object_duplilist does dupliparticles before that */ dm = mesh_create_derived_render(scene, ob, CD_MASK_BAREMESH|CD_MASK_MTFACE|CD_MASK_MCOL); dm->release(dm); diff --git a/source/blender/makesrna/intern/rna_sculpt_paint.c b/source/blender/makesrna/intern/rna_sculpt_paint.c index f48224884ba..eea11aed803 100644 --- a/source/blender/makesrna/intern/rna_sculpt_paint.c +++ b/source/blender/makesrna/intern/rna_sculpt_paint.c @@ -179,7 +179,7 @@ static int rna_Brush_mode_poll(PointerRNA *ptr, PointerRNA value) int mode = 0; /* check the origin of the Paint struct to see which paint - mode to select from */ + * mode to select from */ if (ptr->data == &ts->imapaint) mode = OB_MODE_TEXTURE_PAINT; diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c index 779a5720645..d89af94d447 100644 --- a/source/blender/makesrna/intern/rna_space.c +++ b/source/blender/makesrna/intern/rna_space.c @@ -2644,7 +2644,7 @@ static void rna_def_space_filebrowser(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Active Operator", ""); /* keep this for compatibility with existing presets, - not exposed in c++ api because of keyword conflict */ + * not exposed in c++ api because of keyword conflict */ prop = RNA_def_property(srna, "operator", PROP_POINTER, PROP_NONE); RNA_def_property_pointer_sdna(prop, NULL, "op"); RNA_def_property_ui_text(prop, "Active Operator", ""); diff --git a/source/blender/makesrna/intern/rna_wm.c b/source/blender/makesrna/intern/rna_wm.c index cd9eec5abb6..18d599ca283 100644 --- a/source/blender/makesrna/intern/rna_wm.c +++ b/source/blender/makesrna/intern/rna_wm.c @@ -540,7 +540,7 @@ static void rna_Window_screen_update(bContext *C, PointerRNA *ptr) wmWindow *win = (wmWindow*)ptr->data; /* exception: can't set screens inside of area/region handers, and must - use context so notifier gets to the right window */ + * use context so notifier gets to the right window */ if (win->newscreen) { WM_event_add_notifier(C, NC_SCREEN|ND_SCREENBROWSE, win->newscreen); win->newscreen = NULL; |