Changeset View
Changeset View
Standalone View
Standalone View
source/blender/makesrna/intern/rna_object.c
| Show First 20 Lines • Show All 343 Lines • ▼ Show 20 Lines | |||||
| { | { | ||||
| Object *ob = (Object *)ptr->owner_id; | Object *ob = (Object *)ptr->owner_id; | ||||
| BKE_main_collection_sync_remap(bmain); | BKE_main_collection_sync_remap(bmain); | ||||
| DEG_id_tag_update(&ob->id, ID_RECALC_COPY_ON_WRITE); | DEG_id_tag_update(&ob->id, ID_RECALC_COPY_ON_WRITE); | ||||
| DEG_relations_tag_update(bmain); | DEG_relations_tag_update(bmain); | ||||
| WM_main_add_notifier(NC_OBJECT | ND_DRAW, &ob->id); | WM_main_add_notifier(NC_OBJECT | ND_DRAW, &ob->id); | ||||
| } | } | ||||
| static void rna_Object_duplicator_visibility_flag_update(Main *UNUSED(bmain), | |||||
| Scene *UNUSED(scene), | |||||
| PointerRNA *ptr) | |||||
| { | |||||
| Object *ob = (Object *)ptr->owner_id; | |||||
| DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY); | |||||
| } | |||||
| static void rna_MaterialIndex_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr) | static void rna_MaterialIndex_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr) | ||||
| { | { | ||||
| Object *ob = (Object *)ptr->owner_id; | Object *ob = (Object *)ptr->owner_id; | ||||
| if (ob && ob->type == OB_GPENCIL) { | if (ob && ob->type == OB_GPENCIL) { | ||||
| /* notifying material property in topbar */ | /* notifying material property in topbar */ | ||||
| WM_main_add_notifier(NC_SPACE | ND_SPACE_VIEW3D, NULL); | WM_main_add_notifier(NC_SPACE | ND_SPACE_VIEW3D, NULL); | ||||
| } | } | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 2,732 Lines • ▼ Show 20 Lines | # endif | ||||
| RNA_def_property_override_flag(prop, PROPOVERRIDE_OVERRIDABLE_LIBRARY); | RNA_def_property_override_flag(prop, PROPOVERRIDE_OVERRIDABLE_LIBRARY); | ||||
| RNA_def_property_ui_text(prop, "Disable in Renders", "Globally disable in renders"); | RNA_def_property_ui_text(prop, "Disable in Renders", "Globally disable in renders"); | ||||
| RNA_def_property_ui_icon(prop, ICON_RESTRICT_RENDER_OFF, -1); | RNA_def_property_ui_icon(prop, ICON_RESTRICT_RENDER_OFF, -1); | ||||
| RNA_def_property_update(prop, NC_OBJECT | ND_DRAW, "rna_Object_hide_update"); | RNA_def_property_update(prop, NC_OBJECT | ND_DRAW, "rna_Object_hide_update"); | ||||
| prop = RNA_def_property(srna, "show_instancer_for_render", PROP_BOOLEAN, PROP_NONE); | prop = RNA_def_property(srna, "show_instancer_for_render", PROP_BOOLEAN, PROP_NONE); | ||||
| RNA_def_property_boolean_sdna(prop, NULL, "duplicator_visibility_flag", OB_DUPLI_FLAG_RENDER); | RNA_def_property_boolean_sdna(prop, NULL, "duplicator_visibility_flag", OB_DUPLI_FLAG_RENDER); | ||||
| RNA_def_property_ui_text(prop, "Render Instancer", "Make instancer visible when rendering"); | RNA_def_property_ui_text(prop, "Render Instancer", "Make instancer visible when rendering"); | ||||
| RNA_def_property_update( | |||||
| prop, NC_OBJECT | ND_DRAW, "rna_Object_duplicator_visibility_flag_update"); | |||||
| prop = RNA_def_property(srna, "show_instancer_for_viewport", PROP_BOOLEAN, PROP_NONE); | prop = RNA_def_property(srna, "show_instancer_for_viewport", PROP_BOOLEAN, PROP_NONE); | ||||
| RNA_def_property_boolean_sdna(prop, NULL, "duplicator_visibility_flag", OB_DUPLI_FLAG_VIEWPORT); | RNA_def_property_boolean_sdna(prop, NULL, "duplicator_visibility_flag", OB_DUPLI_FLAG_VIEWPORT); | ||||
| RNA_def_property_ui_text(prop, "Display Instancer", "Make instancer visible in the viewport"); | RNA_def_property_ui_text(prop, "Display Instancer", "Make instancer visible in the viewport"); | ||||
| RNA_def_property_update( | |||||
| prop, NC_OBJECT | ND_DRAW, "rna_Object_duplicator_visibility_flag_update"); | |||||
| /* anim */ | /* anim */ | ||||
| rna_def_animdata_common(srna); | rna_def_animdata_common(srna); | ||||
| rna_def_animviz_common(srna); | rna_def_animviz_common(srna); | ||||
| rna_def_motionpath_common(srna); | rna_def_motionpath_common(srna); | ||||
| /* instancing */ | /* instancing */ | ||||
| ▲ Show 20 Lines • Show All 181 Lines • Show Last 20 Lines | |||||