Changeset View
Changeset View
Standalone View
Standalone View
source/blender/makesrna/intern/rna_object_api.c
| Show First 20 Lines • Show All 323 Lines • ▼ Show 20 Lines | static void rna_Object_shape_key_remove( | ||||
| } | } | ||||
| DEG_id_tag_update(&ob->id, OB_RECALC_DATA); | DEG_id_tag_update(&ob->id, OB_RECALC_DATA); | ||||
| WM_main_add_notifier(NC_OBJECT | ND_DRAW, ob); | WM_main_add_notifier(NC_OBJECT | ND_DRAW, ob); | ||||
| RNA_POINTER_INVALIDATE(kb_ptr); | RNA_POINTER_INVALIDATE(kb_ptr); | ||||
| } | } | ||||
| static int rna_Object_is_visible(Object *ob, Scene *sce) | |||||
| { | |||||
| return !(ob->restrictflag & OB_RESTRICT_VIEW) && (ob->lay & sce->lay); | |||||
| } | |||||
| #if 0 | #if 0 | ||||
| static void rna_Mesh_assign_verts_to_group(Object *ob, bDeformGroup *group, int *indices, int totindex, | static void rna_Mesh_assign_verts_to_group(Object *ob, bDeformGroup *group, int *indices, int totindex, | ||||
| float weight, int assignmode) | float weight, int assignmode) | ||||
| { | { | ||||
| if (ob->type != OB_MESH) { | if (ob->type != OB_MESH) { | ||||
| BKE_report(reports, RPT_ERROR, "Object should be of mesh type"); | BKE_report(reports, RPT_ERROR, "Object should be of mesh type"); | ||||
| return; | return; | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 404 Lines • ▼ Show 20 Lines | parm = RNA_def_float_vector(func, "normal", 3, NULL, -FLT_MAX, FLT_MAX, "Normal", | ||||
| "The face normal at the closest point", -1e4, 1e4); | "The face normal at the closest point", -1e4, 1e4); | ||||
| RNA_def_parameter_flags(parm, PROP_THICK_WRAP, 0); | RNA_def_parameter_flags(parm, PROP_THICK_WRAP, 0); | ||||
| RNA_def_function_output(func, parm); | RNA_def_function_output(func, parm); | ||||
| parm = RNA_def_int(func, "index", 0, 0, 0, "", "The face index, -1 when original data isn't available", 0, 0); | parm = RNA_def_int(func, "index", 0, 0, 0, "", "The face index, -1 when original data isn't available", 0, 0); | ||||
| RNA_def_function_output(func, parm); | RNA_def_function_output(func, parm); | ||||
| /* View */ | /* View */ | ||||
| func = RNA_def_function(srna, "is_visible", "rna_Object_is_visible"); | |||||
| RNA_def_function_ui_description(func, "Determine if object is visible in a given scene"); | |||||
| parm = RNA_def_pointer(func, "scene", "Scene", "", ""); | |||||
| RNA_def_parameter_flags(parm, PROP_NEVER_NULL, PARM_REQUIRED); | |||||
| parm = RNA_def_boolean(func, "result", 0, "", "Object visibility"); | |||||
| RNA_def_function_return(func, parm); | |||||
| /* utility function for checking if the object is modified */ | /* utility function for checking if the object is modified */ | ||||
| func = RNA_def_function(srna, "is_modified", "rna_Object_is_modified"); | func = RNA_def_function(srna, "is_modified", "rna_Object_is_modified"); | ||||
| RNA_def_function_ui_description(func, "Determine if this object is modified from the base mesh data"); | RNA_def_function_ui_description(func, "Determine if this object is modified from the base mesh data"); | ||||
| parm = RNA_def_pointer(func, "scene", "Scene", "", ""); | parm = RNA_def_pointer(func, "scene", "Scene", "", ""); | ||||
| RNA_def_parameter_flags(parm, PROP_NEVER_NULL, PARM_REQUIRED); | RNA_def_parameter_flags(parm, PROP_NEVER_NULL, PARM_REQUIRED); | ||||
| parm = RNA_def_enum(func, "settings", mesh_type_items, 0, "", "Modifier settings to apply"); | parm = RNA_def_enum(func, "settings", mesh_type_items, 0, "", "Modifier settings to apply"); | ||||
| RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); | RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); | ||||
| ▲ Show 20 Lines • Show All 48 Lines • Show Last 20 Lines | |||||