glitch3d 0.1.4 → 0.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: eab3428beb9ab872707d266ddb1bdc9ffdc69bbb
4
- data.tar.gz: b1af5a621c4cfb76a523ede94837d9c82fff1eb2
3
+ metadata.gz: 7f57298b4aeab0fdbe9cda58070adfcfd3434e99
4
+ data.tar.gz: 6f8de6fd6a1008f0e2fb2ebbc875f46001fb164f
5
5
  SHA512:
6
- metadata.gz: 6dec0a64750aaa887a880293acdd19b44efde3b4dd15b8622a0da150aa981238f6495b1d983e10094c043c91b87bb6124587c7e3ff19075a89bdd09d5b927f60
7
- data.tar.gz: 10c084a6f15c0e80daced25c590d1df1c93432f6e71e603b0596bfe50b12dd48e245352fad13f5d0a9e702bf5032b143aeebcf8586e74790b3868072c4400d55
6
+ metadata.gz: 27db3f9feb5996d4af8097082f28fe70cc4e5323c9c0376115d1632fa6970712ead7d473d25ccc4d2741a4e8b9b375a217718d4e4fcda6fc1fb91af67de49fdb
7
+ data.tar.gz: 40c612550e10395aa72e4c7ba4dcf0f15a768e6a96a33fb8b6c324338c01333bc0eabb00dcf24e23d6699ace9f4ee7f5bc10c69afef499bd5a2358f71c22755c
@@ -19,7 +19,8 @@ mode = args.mode
19
19
  shots_number = int(args.shots_number)
20
20
 
21
21
  context = bpy.context
22
- texture_folder_path = str(args.path) + '/../fixtures/textures/'
22
+ fixtures_folder_path = str(args.path) + '/../fixtures/'
23
+ texture_folder_path = fixtures_folder_path + 'textures/'
23
24
 
24
25
  # Scene
25
26
  new_scene = bpy.data.scenes.new("Automated Render Scene")
@@ -43,10 +44,11 @@ if mode == 'high':
43
44
  context.scene.render.resolution_percentage = 100
44
45
 
45
46
  # Add background to world
46
- world = bpy.data.worlds[0]
47
+ world = bpy.data.worlds.new('A Brave New World')
47
48
  world.use_nodes = True
48
49
  world_node_tree = world.node_tree
49
50
  world_node_tree.nodes['Background'].inputs[0].default_value = rand_color_vector()
51
+ context.scene.world = world
50
52
 
51
53
  # Delete current objects
52
54
  for index, obj in enumerate(bpy.data.objects):
@@ -58,7 +60,7 @@ bpy.ops.import_scene.obj(filepath = model_path, use_edges=True)
58
60
  model_object = bpy.data.objects[0]
59
61
 
60
62
  # Load props
61
- bpy.ops.import_scene.obj(filepath = os.path.join('fixtures/m4a1.obj'), use_edges=True)
63
+ bpy.ops.import_scene.obj(filepath = os.path.join(fixtures_folder_path + 'm4a1.obj'), use_edges=True)
62
64
  m4a1 = bpy.data.objects['m4a1']
63
65
  texture_object(m4a1)
64
66
  m4a1.location = rand_location()
@@ -69,14 +71,6 @@ bpy.ops.mesh.primitive_cube_add(location=rand_location(),radius=rand_scale(), ro
69
71
  cube = bpy.data.objects['Cube']
70
72
  texture_object(cube)
71
73
 
72
- bpy.ops.mesh.primitive_torus_add(location=rand_location(), rotation=rand_rotation(), major_radius=rand_scale(), minor_radius=rand_scale())
73
- torus = bpy.data.objects['Torus']
74
- texture_object(torus)
75
-
76
- bpy.ops.mesh.primitive_cone_add(location=rand_location(), depth=1.0, rotation=rand_rotation(), radius1=rand_scale(), radius2=rand_scale())
77
- cone = bpy.data.objects['Cone']
78
- texture_object(cone)
79
-
80
74
  # Use center of mass to center object
81
75
  model_object.select = True
82
76
  bpy.ops.object.origin_set(type="ORIGIN_CENTER_OF_MASS")
@@ -1,3 +1,3 @@
1
1
  module Glitch3d
2
- VERSION = "0.1.4"
2
+ VERSION = "0.1.5"
3
3
  end
data/lib/glitch3d.rb CHANGED
@@ -41,7 +41,8 @@ module Glitch3d
41
41
  return Glitch3d::Default if mode.nil?
42
42
  {
43
43
  default: Glitch3d::Default,
44
- localized: Glitch3d::Localized
44
+ localized: Glitch3d::Localized,
45
+ none: Glitch3d::None
45
46
  }[mode.to_sym]
46
47
  end
47
48
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: glitch3d
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - pskl
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-03-19 00:00:00.000000000 Z
11
+ date: 2017-03-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler