Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UPBGE: Add the option to disable component execution on game start #694

Merged
merged 3 commits into from
May 27, 2018

Conversation

lordloki
Copy link
Member

@lordloki lordloki commented May 24, 2018

It uses the same DEFINE as the python script auto-exec disable. Therefore, scripts and components are enable/disable using the same check at user preferences.

As blend component execution on loading as component registration or component reloading are disable by default.

Warning notifications were added to top-bar and console.

The new option is at user preferences under system tab. The component
execution is disable by default (similar to scripts).
@lordloki lordloki requested a review from panzergame May 24, 2018 23:38
@BluePrintRandom
Copy link
Member

BluePrintRandom commented May 25, 2018 via email

@panzergame
Copy link
Contributor

Nice patch, I accept it. Is there an advantage of using a separate flag for scripts and components ?

@lordloki
Copy link
Member Author

Simply it is for adding more flexibility.

@@ -4041,6 +4048,13 @@ static void rna_def_userdef_system(BlenderRNA *brna)
"(unsafe with blend files from an untrusted source)");
RNA_def_property_update(prop, 0, "rna_userdef_script_autoexec_update");

prop = RNA_def_property(srna, "use_components_auto_execute", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", USER_COMPONENT_AUTOEXEC_DISABLE);
RNA_def_property_ui_text(prop, "Auto Run UPBGE Components",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could rename "UPBGE Components" to "python components" as in the description.

lordloki added 2 commits May 27, 2018 02:49
Now it uses the same DEFINE as the python script auto-exec disable.

As blend component executation on loading as component registration or
component reloading are disable by default.

Warning notifications were added to top-bar and console.
@lordloki
Copy link
Member Author

I reworked component auto-exec disable. Now it uses the same DEFINE as the python script auto-exec disable.

As blend component execution on loading as component registration or component reloading are disable by default.

Warning notifications were added to top-bar and console.

@lordloki lordloki merged commit a8f9cf3 into master May 27, 2018
@panzergame panzergame deleted the experimental-component-security branch June 20, 2018 12:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants