diff options
Diffstat (limited to 'scene')
-rw-r--r-- | scene/2d/canvas_item.cpp | 4 | ||||
-rw-r--r-- | scene/3d/baked_light_instance.cpp | 4 | ||||
-rw-r--r-- | scene/3d/gi_probe.cpp | 4 | ||||
-rw-r--r-- | scene/resources/packed_scene.cpp | 4 |
4 files changed, 12 insertions, 4 deletions
diff --git a/scene/2d/canvas_item.cpp b/scene/2d/canvas_item.cpp index 1f4804990f..611e7540c1 100644 --- a/scene/2d/canvas_item.cpp +++ b/scene/2d/canvas_item.cpp @@ -1005,8 +1005,8 @@ void CanvasItem::_bind_methods() { ADD_GROUP("Visibility",""); ADD_PROPERTYNO( PropertyInfo(Variant::BOOL,"visible"), _SCS("_set_visible_"),_SCS("_is_visible_") ); - ADD_PROPERTYNO( PropertyInfo(Variant::REAL,"modulate",PROPERTY_HINT_RANGE, "0,1,0.01"), _SCS("set_modulate"),_SCS("get_modulate") ); - ADD_PROPERTYNO( PropertyInfo(Variant::REAL,"self_modulate",PROPERTY_HINT_RANGE, "0,1,0.01"), _SCS("set_self_modulate"),_SCS("get_self_modulate") ); + ADD_PROPERTYNO( PropertyInfo(Variant::COLOR,"modulate"), _SCS("set_modulate"),_SCS("get_modulate") ); + ADD_PROPERTYNO( PropertyInfo(Variant::COLOR,"self_modulate"), _SCS("set_self_modulate"),_SCS("get_self_modulate") ); ADD_PROPERTYNZ( PropertyInfo(Variant::BOOL,"show_behind_parent"), _SCS("set_draw_behind_parent"),_SCS("is_draw_behind_parent_enabled") ); ADD_PROPERTY( PropertyInfo(Variant::BOOL,"show_on_top",PROPERTY_HINT_NONE,"",0), _SCS("_set_on_top"),_SCS("_is_on_top") ); //compatibility ADD_PROPERTYNO( PropertyInfo(Variant::INT,"light_mask",PROPERTY_HINT_ALL_FLAGS), _SCS("set_light_mask"),_SCS("get_light_mask") ); diff --git a/scene/3d/baked_light_instance.cpp b/scene/3d/baked_light_instance.cpp index f85dfea80e..19be12ed91 100644 --- a/scene/3d/baked_light_instance.cpp +++ b/scene/3d/baked_light_instance.cpp @@ -1695,12 +1695,16 @@ void BakedLight::create_debug_mesh(DebugMode p_mode) { MultiMeshInstance *mmi = memnew( MultiMeshInstance ); mmi->set_multimesh(mm); add_child(mmi); +#ifdef TOOLS_ENABLED if (get_tree()->get_edited_scene_root()==this){ mmi->set_owner(this); } else { mmi->set_owner(get_owner()); } +#else + mmi->set_owner(get_owner()); +#endif } diff --git a/scene/3d/gi_probe.cpp b/scene/3d/gi_probe.cpp index 5b51273d0e..438be13394 100644 --- a/scene/3d/gi_probe.cpp +++ b/scene/3d/gi_probe.cpp @@ -1314,12 +1314,16 @@ void GIProbe::_create_debug_mesh(Baker *p_baker) { MultiMeshInstance *mmi = memnew( MultiMeshInstance ); mmi->set_multimesh(mm); add_child(mmi); +#ifdef TOOLS_ENABLED if (get_tree()->get_edited_scene_root()==this){ mmi->set_owner(this); } else { mmi->set_owner(get_owner()); } +#else + mmi->set_owner(get_owner()); +#endif } diff --git a/scene/resources/packed_scene.cpp b/scene/resources/packed_scene.cpp index b0161f6898..625cc6a596 100644 --- a/scene/resources/packed_scene.cpp +++ b/scene/resources/packed_scene.cpp @@ -1777,9 +1777,9 @@ bool PackedScene::can_instance() const { Node *PackedScene::instance(GenEditState p_edit_state) const { #ifndef TOOLS_ENABLED - if (p_gen_edit_state) { + if (p_edit_state!=GEN_EDIT_STATE_DISABLED) { ERR_EXPLAIN("Edit state is only for editors, does not work without tools compiled"); - ERR_FAIL_COND_V(p_gen_edit_state,NULL); + ERR_FAIL_COND_V(p_edit_state!=GEN_EDIT_STATE_DISABLED,NULL); } #endif |