Skip to content

Rugo/transforms newdir#25

Merged
sfmig merged 14 commits intomainfrom
rugo/transforms_newdir
Apr 18, 2023
Merged

Rugo/transforms newdir#25
sfmig merged 14 commits intomainfrom
rugo/transforms_newdir

Conversation

@ruaridhg
Copy link
Copy Markdown
Collaborator

@ruaridhg ruaridhg commented Apr 3, 2023

For the transforms rotation/location part of Randomisation panel
The UI has 3 main sections:

  • Original code with 1 input per direction i.e. range for randomising was -x_value to +x_value
  • Layout option of row per direction i.e. x row, y row and z row (currently used for location)
  • Layout option of col per direction i.e. x col, y col and z col (currently used for rotation)

Toggle for delta transforms on/off also added and randomise button to execute the code once values entered

@ruaridhg ruaridhg requested review from sfmig and tdowrick April 3, 2023 15:04
@ruaridhg ruaridhg marked this pull request as draft April 5, 2023 09:25

if delta_on:
# pdb.set_trace()
obj.delta_location += Vector([rand_x, rand_y, rand_z])
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 you change this to obj.delta_location = Vector([rand_x, rand_y, rand_z]), rather than +=? We want the location/rotaion to be set anew each iteration, rather than compounding with the previous ones. There are a few other places below where this should be changed too.

@tdowrick
Copy link
Copy Markdown
Collaborator

Looks good - just a few comments:

  1. At the moment, it is randomising whichever item is currently selected, rather than always doing the Camera object. The functionality should either be that it always assumes the object will be called 'Camera' and hard codes that, or it allows for the object to be specified in the panel itself.

  2. I'm not quite clear what the functionality of this part is? It doesn't seem to have any effect on the randomisation.
    image

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.

LGTM

@sfmig sfmig merged commit 43999f5 into main Apr 18, 2023
@ruaridhg ruaridhg deleted the rugo/transforms_newdir branch April 21, 2023 14:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

3 participants