Changeset View
Changeset View
Standalone View
Standalone View
source/blender/makesrna/intern/rna_object.c
| Show First 20 Lines • Show All 350 Lines • ▼ Show 20 Lines | |||||
| { | { | ||||
| DEG_id_tag_update(ptr->owner_id, ID_RECALC_SHADING); | DEG_id_tag_update(ptr->owner_id, ID_RECALC_SHADING); | ||||
| WM_main_add_notifier(NC_OBJECT | ND_DRAW, ptr->owner_id); | WM_main_add_notifier(NC_OBJECT | ND_DRAW, ptr->owner_id); | ||||
| } | } | ||||
| static void rna_Object_matrix_world_update(Main *bmain, Scene *scene, PointerRNA *ptr) | static void rna_Object_matrix_world_update(Main *bmain, Scene *scene, PointerRNA *ptr) | ||||
| { | { | ||||
| /* don't use compat so we get predictable rotation */ | /* don't use compat so we get predictable rotation */ | ||||
| BKE_object_apply_mat4((Object *)ptr->owner_id, ((Object *)ptr->owner_id)->obmat, false, true); | BKE_object_apply_mat4( | ||||
| (Object *)ptr->owner_id, ((Object *)ptr->owner_id)->object_to_world, false, true); | |||||
| rna_Object_internal_update(bmain, scene, ptr); | rna_Object_internal_update(bmain, scene, ptr); | ||||
| } | } | ||||
| static void rna_Object_hide_update(Main *bmain, Scene *UNUSED(scene), PointerRNA *ptr) | static void rna_Object_hide_update(Main *bmain, Scene *UNUSED(scene), PointerRNA *ptr) | ||||
| { | { | ||||
| 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); | ||||
| ▲ Show 20 Lines • Show All 3,017 Lines • ▼ Show 20 Lines | # endif | ||||
| RNA_def_property_boolean_sdna(prop, NULL, "protectflag", OB_LOCK_SCALEX); | RNA_def_property_boolean_sdna(prop, NULL, "protectflag", OB_LOCK_SCALEX); | ||||
| RNA_def_property_array(prop, 3); | RNA_def_property_array(prop, 3); | ||||
| RNA_def_property_ui_text(prop, "Lock Scale", "Lock editing of scale when transforming"); | RNA_def_property_ui_text(prop, "Lock Scale", "Lock editing of scale when transforming"); | ||||
| RNA_def_property_ui_icon(prop, ICON_UNLOCKED, 1); | RNA_def_property_ui_icon(prop, ICON_UNLOCKED, 1); | ||||
| RNA_def_property_update(prop, NC_OBJECT | ND_TRANSFORM, "rna_Object_internal_update"); | RNA_def_property_update(prop, NC_OBJECT | ND_TRANSFORM, "rna_Object_internal_update"); | ||||
| /* matrix */ | /* matrix */ | ||||
| prop = RNA_def_property(srna, "matrix_world", PROP_FLOAT, PROP_MATRIX); | prop = RNA_def_property(srna, "matrix_world", PROP_FLOAT, PROP_MATRIX); | ||||
| RNA_def_property_float_sdna(prop, NULL, "obmat"); | RNA_def_property_float_sdna(prop, NULL, "object_to_world"); | ||||
| RNA_def_property_multi_array(prop, 2, rna_matrix_dimsize_4x4); | RNA_def_property_multi_array(prop, 2, rna_matrix_dimsize_4x4); | ||||
| RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); | RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); | ||||
| RNA_def_property_override_flag(prop, PROPOVERRIDE_NO_COMPARISON); | RNA_def_property_override_flag(prop, PROPOVERRIDE_NO_COMPARISON); | ||||
| RNA_def_property_override_clear_flag(prop, PROPOVERRIDE_OVERRIDABLE_LIBRARY); | RNA_def_property_override_clear_flag(prop, PROPOVERRIDE_OVERRIDABLE_LIBRARY); | ||||
| RNA_def_property_ui_text(prop, "Matrix World", "Worldspace transformation matrix"); | RNA_def_property_ui_text(prop, "Matrix World", "Worldspace transformation matrix"); | ||||
| RNA_def_property_update(prop, NC_OBJECT | ND_TRANSFORM, "rna_Object_matrix_world_update"); | RNA_def_property_update(prop, NC_OBJECT | ND_TRANSFORM, "rna_Object_matrix_world_update"); | ||||
| prop = RNA_def_property(srna, "matrix_local", PROP_FLOAT, PROP_MATRIX); | prop = RNA_def_property(srna, "matrix_local", PROP_FLOAT, PROP_MATRIX); | ||||
| ▲ Show 20 Lines • Show All 475 Lines • Show Last 20 Lines | |||||