DrQueueRubyBindings 0.1 → 0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/ext/libdrqueue_ruby.i +36 -4
- metadata +3 -3
data/ext/libdrqueue_ruby.i
CHANGED
@@ -115,6 +115,7 @@ slaves. Also provides access to all data structures of DrQueue."
|
|
115
115
|
%include "luxrendersg.h"
|
116
116
|
%include "mayasg.h"
|
117
117
|
%include "vraysg.h"
|
118
|
+
%include "3dsmaxsg.h"
|
118
119
|
|
119
120
|
// type mapppings
|
120
121
|
typedef unsigned int time_t;
|
@@ -272,7 +273,7 @@ typedef unsigned char uint8_t;
|
|
272
273
|
|
273
274
|
|
274
275
|
/* Blender script file generation */
|
275
|
-
char *blendersg (char *scene, char *scriptdir, uint8_t
|
276
|
+
char *blendersg (char *scene, char *scriptdir, uint8_t render_type)
|
276
277
|
{
|
277
278
|
struct blendersgi *blend = (struct blendersgi *)malloc (sizeof(struct blendersgi));
|
278
279
|
if (!blend) {
|
@@ -290,7 +291,7 @@ typedef unsigned char uint8_t;
|
|
290
291
|
|
291
292
|
strncpy(blend->scene, scene, BUFFERLEN-1);
|
292
293
|
strncpy(blend->scriptdir, scriptdir, BUFFERLEN-1);
|
293
|
-
blend->
|
294
|
+
blend->render_type = render_type;
|
294
295
|
|
295
296
|
outfile = blendersg_create(blend);
|
296
297
|
|
@@ -433,7 +434,7 @@ typedef unsigned char uint8_t;
|
|
433
434
|
}
|
434
435
|
|
435
436
|
/* Maya script file generation */
|
436
|
-
char *mayasg (char *scene, char *projectdir, char *scriptdir, char *renderdir, char *image, char *file_owner, char *camera, int res_x, int res_y, char *format, uint8_t
|
437
|
+
char *mayasg (char *scene, char *projectdir, char *scriptdir, char *renderdir, char *image, char *file_owner, char *camera, int res_x, int res_y, char *format, uint8_t renderer)
|
437
438
|
{
|
438
439
|
struct mayasgi *mayast = (struct mayasgi *)malloc (sizeof(struct mayasgi));
|
439
440
|
if (!mayast) {
|
@@ -460,7 +461,7 @@ typedef unsigned char uint8_t;
|
|
460
461
|
mayast->res_x = res_x;
|
461
462
|
mayast->res_y = res_y;
|
462
463
|
strncpy(mayast->format, format, BUFFERLEN-1);
|
463
|
-
mayast->
|
464
|
+
mayast->renderer = renderer;
|
464
465
|
|
465
466
|
outfile = mayasg_create(mayast);
|
466
467
|
|
@@ -501,6 +502,37 @@ typedef unsigned char uint8_t;
|
|
501
502
|
|
502
503
|
return outfile;
|
503
504
|
}
|
505
|
+
|
506
|
+
/* 3DSMax script file generation */
|
507
|
+
char *threedsmaxsg (char *scene, char *scriptdir, char *image)
|
508
|
+
{
|
509
|
+
struct threedsmaxsgi *vray = (struct threedsmaxsgi *)malloc (sizeof(struct threedsmaxsgi));
|
510
|
+
if (!vray) {
|
511
|
+
rb_raise(rb_eNoMemError,"out of memory");
|
512
|
+
return NULL;
|
513
|
+
}
|
514
|
+
|
515
|
+
char *outfile = (char *)malloc(sizeof(char *));
|
516
|
+
if (!outfile) {
|
517
|
+
rb_raise(rb_eNoMemError,"out of memory");
|
518
|
+
return NULL;
|
519
|
+
}
|
520
|
+
|
521
|
+
memset (vray,0,sizeof(struct threedsmaxsgi));
|
522
|
+
|
523
|
+
strncpy(vray->scene, scene, BUFFERLEN-1);
|
524
|
+
strncpy(vray->scriptdir, scriptdir, BUFFERLEN-1);
|
525
|
+
strncpy(vray->scriptdir, image, BUFFERLEN-1);
|
526
|
+
|
527
|
+
outfile = threedsmaxsg_create(vray);
|
528
|
+
|
529
|
+
if (!outfile) {
|
530
|
+
rb_raise(rb_eException,"Problem creating script file");
|
531
|
+
return NULL;
|
532
|
+
}
|
533
|
+
|
534
|
+
return outfile;
|
535
|
+
}
|
504
536
|
|
505
537
|
}
|
506
538
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: DrQueueRubyBindings
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: "0.
|
4
|
+
version: "0.2"
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andreas Schroeder
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain:
|
11
|
-
date:
|
11
|
+
date: 2009-12-31 00:00:00 +01:00
|
12
12
|
default_executable:
|
13
13
|
dependencies: []
|
14
14
|
|
@@ -45,7 +45,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
45
45
|
requirements:
|
46
46
|
- Ruby bindings for DrQueue
|
47
47
|
rubyforge_project: drqueue
|
48
|
-
rubygems_version: 1.
|
48
|
+
rubygems_version: 1.3.1
|
49
49
|
signing_key:
|
50
50
|
specification_version: 1
|
51
51
|
summary: Ruby extension library providing an API to DrQueue
|