Skip to content

Update transform panel to include seed boolean#33

Merged
ruaridhg merged 20 commits intomainfrom
11-keep-track-of-randomisation-seed
Apr 24, 2023
Merged

Update transform panel to include seed boolean#33
ruaridhg merged 20 commits intomainfrom
11-keep-track-of-randomisation-seed

Conversation

@ruaridhg
Copy link
Copy Markdown
Collaborator

@ruaridhg ruaridhg commented Apr 20, 2023

Seed boolean added to transform panel
Modified install_and_enable_addons.py to include an additional randomisation seed argument
randomisation_seed.sh script to automate with an example seed of 32

@ruaridhg ruaridhg linked an issue Apr 20, 2023 that may be closed by this pull request
3 tasks
…rgument and .sh script to launch with specificed randomisation seed
@ruaridhg ruaridhg marked this pull request as ready for review April 20, 2023 14:38
@ruaridhg ruaridhg requested a review from sfmig April 20, 2023 14:39
Copy link
Copy Markdown
Collaborator

@sfmig sfmig left a comment

Choose a reason for hiding this comment

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

Looks alright! But I have requested some changes, and have three larger comments:

  • There were a few breakpoints from the Python debugger here and there. When I removed them, I got the following error:

image

  • I realised we use a different approach to generate random numbers . I use numpy's random number generator and you use the random module. It is probably a good idea to make it consistent. I guess this is related to expanding this PR to also apply the same seed to the materials panel. So maybe we can cover it in that future PR? Happy to chat about it, or if you agree feel free to open an issue.

  • I think we can remove some of the commented blocks, and if you can add docstrings to the functions that would be great.

Comment thread blender_randomiser/install_and_enable_addons.py Outdated
Comment thread blender_randomiser/install_and_enable_addons.py Outdated
Comment thread blender_randomiser/install_and_enable_addons.py Outdated
Comment thread blender_randomiser/install_and_enable_addons.py Outdated
Comment thread blender_randomiser/install_and_enable_addons.py
Comment thread blender_randomiser/randomiser/transform/operators.py Outdated
Comment thread blender_randomiser/randomiser/transform/operators.py Outdated
Comment thread blender_randomiser/randomiser/transform/operators.py
Comment thread blender_randomiser/randomiser/transform/ui.py Outdated
Comment thread blender_randomiser/randomiser/transform/properties.py
ruaridhg and others added 11 commits April 21, 2023 16:40
Co-authored-by: sfmig <33267254+sfmig@users.noreply.github.com>
Co-authored-by: sfmig <33267254+sfmig@users.noreply.github.com>
Co-authored-by: sfmig <33267254+sfmig@users.noreply.github.com>
Co-authored-by: sfmig <33267254+sfmig@users.noreply.github.com>
Co-authored-by: sfmig <33267254+sfmig@users.noreply.github.com>
Co-authored-by: sfmig <33267254+sfmig@users.noreply.github.com>
Co-authored-by: sfmig <33267254+sfmig@users.noreply.github.com>
Co-authored-by: sfmig <33267254+sfmig@users.noreply.github.com>
Co-authored-by: sfmig <33267254+sfmig@users.noreply.github.com>
Co-authored-by: sfmig <33267254+sfmig@users.noreply.github.com>
@ruaridhg
Copy link
Copy Markdown
Collaborator Author

ruaridhg commented Apr 21, 2023

Looks alright! But I have requested some changes, and have three larger comments:

  • There were a few breakpoints from the Python debugger here and there. When I removed them, I got the following error:
image
  • I realised we use a different approach to generate random numbers . I use numpy's random number generator and you use the random module. It is probably a good idea to make it consistent. I guess this is related to expanding this PR to also apply the same seed to the materials panel. So maybe we can cover it in that future PR? Happy to chat about it, or if you agree feel free to open an issue.
  • I think we can remove some of the commented blocks, and if you can add docstrings to the functions that would be great.
  • Can you try to run the randomisation_seed.sh script again? I think the issue was it didn't have the zip line in the .sh script
  • Yep we can get consistent in a future PR
  • I will tidy it up a bit

@ruaridhg ruaridhg requested a review from sfmig April 21, 2023 16:22
@sfmig sfmig removed a link to an issue Apr 24, 2023
3 tasks
@sfmig sfmig linked an issue Apr 24, 2023 that may be closed by this pull request
Copy link
Copy Markdown
Collaborator

@sfmig sfmig left a comment

Choose a reason for hiding this comment

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

looks great!

One thing I noticed when testing it out is that when I launch it with sh randomisation_seed.sh, the seed is set to the value in the bash script but the randomisation toggle is set to False. I think it would be nice to have it set to True if a seed is passed as a command line argument.

The rest are very minor things

Comment thread blender_randomiser/install_and_enable_addons.py
Comment thread blender_randomiser/randomiser/transform/operators.py Outdated
Comment thread blender_randomiser/randomiser/transform/operators.py Outdated
Comment thread blender_randomiser/randomiser/transform/operators.py Outdated
rot_y_range,
rot_z_range,
delta_on,
seed_no,
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

can we add a docstring for this?

Comment thread blender_randomiser/randomiser/transform/properties.py
Comment thread blender_randomiser/randomiser/transform/ui.py Outdated
ruaridhg and others added 6 commits April 24, 2023 15:53
Co-authored-by: sfmig <33267254+sfmig@users.noreply.github.com>
Co-authored-by: sfmig <33267254+sfmig@users.noreply.github.com>
Co-authored-by: sfmig <33267254+sfmig@users.noreply.github.com>
Co-authored-by: sfmig <33267254+sfmig@users.noreply.github.com>
@ruaridhg ruaridhg merged commit f9761ec into main Apr 24, 2023
@ruaridhg ruaridhg deleted the 11-keep-track-of-randomisation-seed branch April 24, 2023 15:21
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.

camera transforms

2 participants