diff options
author | Michael Kowalski <makowalski@nvidia.com> | 2022-09-23 23:56:14 +0300 |
---|---|---|
committer | Michael Kowalski <makowalski@nvidia.com> | 2022-09-23 23:56:14 +0300 |
commit | b2ad97ba97f3e55d1dd463e29ca0b2ec6fe761e1 (patch) | |
tree | f94394835c6b731e4e379f4ef48fb78b4af4b9ca /source/blender/makesrna/intern/rna_object.c | |
parent | b31807c75f0c18c43ac6979e6da57dc9d420167a (diff) | |
parent | 7e980f2b8cb96aa6d04dc72899d08473367eeeb9 (diff) |
Merge branch 'master' into tmp-usd-alab-v2-T100452tmp-usd-alab-v2-T100452
Diffstat (limited to 'source/blender/makesrna/intern/rna_object.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_object.c | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/source/blender/makesrna/intern/rna_object.c b/source/blender/makesrna/intern/rna_object.c index 103c77fa808..46a89d3a6e0 100644 --- a/source/blender/makesrna/intern/rna_object.c +++ b/source/blender/makesrna/intern/rna_object.c @@ -381,7 +381,7 @@ static void rna_MaterialIndex_update(Main *UNUSED(bmain), Scene *UNUSED(scene), { Object *ob = (Object *)ptr->owner_id; if (ob && ob->type == OB_GPENCIL) { - /* notifying material property in topbar */ + /* Notifying material property in top-bar. */ WM_main_add_notifier(NC_SPACE | ND_SPACE_VIEW3D, NULL); } } @@ -497,12 +497,6 @@ static void rna_Object_dependency_update(Main *bmain, Scene *UNUSED(scene), Poin void rna_Object_data_update(Main *bmain, Scene *scene, PointerRNA *ptr) { - Object *object = (Object *)ptr->data; - - if (object->mode == OB_MODE_SCULPT) { - BKE_sculpt_ensure_orig_mesh_data(scene, object); - } - rna_Object_internal_update_data_dependency(bmain, scene, ptr); } @@ -687,6 +681,11 @@ static void rna_Object_parent_type_set(PointerRNA *ptr, int value) { Object *ob = (Object *)ptr->data; + /* Skip if type did not change (otherwise we loose parent inverse in ED_object_parent). */ + if (ob->partype == value) { + return; + } + ED_object_parent(ob, ob->parent, value, ob->parsubstr); } @@ -2224,7 +2223,7 @@ bool rna_GPencil_object_poll(PointerRNA *UNUSED(ptr), PointerRNA value) return ((Object *)value.owner_id)->type == OB_GPENCIL; } -int rna_Object_use_dynamic_topology_sculpting_get(PointerRNA *ptr) +bool rna_Object_use_dynamic_topology_sculpting_get(PointerRNA *ptr) { SculptSession *ss = ((Object *)ptr->owner_id)->sculpt; return (ss && ss->bm); @@ -2923,6 +2922,11 @@ static void rna_def_object_lineart(BlenderRNA *brna) 0, "No Intersection", "Include this object but do not generate intersection lines"}, + {OBJECT_LRT_FORCE_INTERSECTION, + "FORCE_INTERSECTION", + 0, + "Force Intersection", + "Generate intersection lines even with objects that disabled intersection"}, {0, NULL, 0, NULL, NULL}, }; |