# Modify Structure Values for Map Variable from Blueprint in Python

**URL:** <https://forums.unrealengine.com/t/modify-structure-values-for-map-variable-from-blueprint-in-python/250622>\
**Category:** Editor Scripting\
**Tags:** unreal-engine\
**Created:** [September 14, 2021, 4:11am UTC](https://forums.unrealengine.com/t/modify-structure-values-for-map-variable-from-blueprint-in-python/250622 "2021-09-14T04:11:10Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![TonyHeadband](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/tonyheadband/32/725142_2.png) [@TonyHeadband](https://forums.unrealengine.com/u/TonyHeadband)\
**Post date:** [September 14, 2021, 4:11am UTC](https://forums.unrealengine.com/t/modify-structure-values-for-map-variable-from-blueprint-in-python/250622/1 "2021-09-14T04:11:10Z")

</div>

Hello guys,  
I’m trying to modify a value, part of a map(dictionary in python) composed of int:myStructure.  
I’m already able to modify any direct variable in the blueprint, but troubles arise from Structure, even worse that is part of a map.  
I read the documentation, but It’s not clear to me.  
So I’m looking for help here,  
thank you all!

---

<div class="post-metadata">

**Author:** ![Havard\_stardust](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Havard\_stardust](https://forums.unrealengine.com/u/Havard_stardust)\
**Post date:** [November 18, 2022, 11:55am UTC](https://forums.unrealengine.com/t/modify-structure-values-for-map-variable-from-blueprint-in-python/250622/2 "2022-11-18T11:55:17Z")

</div>

Hi!

Here is how you configure a unreal.Map variable, I’m using the console\_variables in unreal.MoviePipelineConsoleVariableSetting as an example:

The console\_variables property requires Type: (Map(str, float)) as input.

```auto
#Get movie queue subsystem for editor.
subsystem = unreal.get_editor_subsystem(unreal.MoviePipelineQueueSubsystem)
pipelineQueue = subsystem.get_queue()

#Create new movie pipeline job
newJob = pipelineQueue.allocate_new_job(unreal.MoviePipelineExecutorJob)
newJob.get_configuration().find_or_add_setting_by_class(unreal.MoviePipelineOutputSetting)

#Get ConsoleVariableSetting
ConsoleVariableSetting = newJob.get_configuration().find_or_add_setting_by_class(unreal.MoviePipelineConsoleVariableSetting)

```

```auto
#Set
ConsoleVariableSetting.console_variables = [("r.ScreenPercentage", 100.0), ("r.MotionBlurQuality", 4.0)]

#Append/update values
ConsoleVariableSetting.console_variables.update([("r.ScreenPercentage", 50.0),("r.MotionBlur.Scale", 1.0)])

```

```auto
#Print
unreal.log( ConsoleVariableSetting.console_variables )
LogPython: {"r.ScreenPercentage": 50.000000, "r.MotionBlurQuality": 4.000000, "r.MotionBlur.Scale": 1.000000}

```

I know its a bit late but also couldn’t find any specific examples on it so here it is.

---

<div class="post-metadata">

**Author:** ![TonyHeadband](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/tonyheadband/32/725142_2.png) [@TonyHeadband](https://forums.unrealengine.com/u/TonyHeadband)\
**Post date:** [November 18, 2022, 8:04pm UTC](https://forums.unrealengine.com/t/modify-structure-values-for-map-variable-from-blueprint-in-python/250622/3 "2022-11-18T20:04:41Z")

</div>

Thank you for the answer @Havard_stardust but it’s not what I was looking for.  
Maybe I poorly explained myself.

That works for console variables but I was looking how to modify the value of a Editor Property that was a map of structures.  
I figured it out in the end.

```python
obj = unreal.EditorLevelLibrary.get_selected_level_actors()[0]
print(obj.get_editor_property("test"))
asd = {"qwe": False}
obj.set_editor_property("test", asd)

```

Thank you again.
