Expose more properties to Python
Rename "from" to "from_solid" to avoid clashing with Python keyword
This commit is contained in:
parent
6eb460c359
commit
bb85b261f8
|
|
@ -98,8 +98,8 @@ PUBLISHED:
|
|||
void write(ostream &out, int indent_level = 0) const;
|
||||
|
||||
PUBLISHED:
|
||||
MAKE_PROPERTY(from, get_from);
|
||||
MAKE_PROPERTY(into, get_into);
|
||||
MAKE_PROPERTY(from_solid, get_from);
|
||||
MAKE_PROPERTY(into_solid, get_into);
|
||||
MAKE_PROPERTY(from_node, get_from_node);
|
||||
MAKE_PROPERTY(into_node, get_into_node);
|
||||
MAKE_PROPERTY(from_node_path, get_from_node_path);
|
||||
|
|
|
|||
|
|
@ -43,11 +43,14 @@ PUBLISHED:
|
|||
|
||||
PN_stdfloat get_progress() const;
|
||||
|
||||
PUBLISHED:
|
||||
MAKE_PROPERTY(progress, get_progress);
|
||||
|
||||
private:
|
||||
void cleanup();
|
||||
|
||||
Filename _source_filename;
|
||||
|
||||
|
||||
istream *_source;
|
||||
istream *_decompress;
|
||||
ostream *_dest;
|
||||
|
|
|
|||
|
|
@ -79,6 +79,14 @@ PUBLISHED:
|
|||
void output(ostream &out) const;
|
||||
void write(ostream &out, int indent_level = 0) const;
|
||||
|
||||
PUBLISHED:
|
||||
MAKE_PROPERTY(url, get_url, set_url);
|
||||
MAKE_PROPERTY2(tag, has_tag, get_tag, set_tag, clear_tag);
|
||||
MAKE_PROPERTY2(date, has_date, get_date, set_date, clear_date);
|
||||
|
||||
MAKE_PROPERTY(request_mode, get_request_mode, set_request_mode);
|
||||
MAKE_PROPERTY(cache_control, get_cache_control, set_cache_control);
|
||||
|
||||
private:
|
||||
URLSpec _url;
|
||||
HTTPEntityTag _tag;
|
||||
|
|
|
|||
|
|
@ -54,6 +54,9 @@ PUBLISHED:
|
|||
|
||||
bool run();
|
||||
|
||||
PUBLISHED:
|
||||
MAKE_PROPERTY(progress, get_progress);
|
||||
|
||||
private:
|
||||
Filename _multifile_name;
|
||||
PT(Multifile) _multifile;
|
||||
|
|
|
|||
|
|
@ -312,6 +312,54 @@ PUBLISHED:
|
|||
static TexGen string_tex_gen(const string &string);
|
||||
static QualityLevel string_quality_level(const string &string);
|
||||
|
||||
PUBLISHED:
|
||||
MAKE_PROPERTY(texture_type, get_texture_type, set_texture_type);
|
||||
MAKE_PROPERTY(format, get_format, set_format);
|
||||
MAKE_PROPERTY(compression_mode, get_compression_mode, set_compression_mode);
|
||||
MAKE_PROPERTY(wrap_mode, get_wrap_mode, set_wrap_mode);
|
||||
MAKE_PROPERTY(wrap_u, get_wrap_u, set_wrap_u);
|
||||
MAKE_PROPERTY(wrap_v, get_wrap_v, set_wrap_v);
|
||||
MAKE_PROPERTY(wrap_w, get_wrap_w, set_wrap_w);
|
||||
MAKE_PROPERTY(minfilter, get_minfilter, set_minfilter);
|
||||
MAKE_PROPERTY(magfilter, get_magfilter, set_magfilter);
|
||||
MAKE_PROPERTY2(anisotropic_degree, has_anisotropic_degree, get_anisotropic_degree,
|
||||
set_anisotropic_degree, clear_anisotropic_degree);
|
||||
MAKE_PROPERTY(env_type, get_env_type, set_env_type);
|
||||
MAKE_PROPERTY(saved_result, get_saved_result, set_saved_result);
|
||||
MAKE_PROPERTY(tex_gen, get_tex_gen, set_tex_gen);
|
||||
MAKE_PROPERTY(quality_level, get_quality_level, set_quality_level);
|
||||
MAKE_PROPERTY2(stage_name, has_stage_name, get_stage_name,
|
||||
set_stage_name, clear_stage_name);
|
||||
MAKE_PROPERTY2(priority, has_priority, get_priority,
|
||||
set_priority, clear_priority);
|
||||
MAKE_PROPERTY2(color, has_color, get_color,
|
||||
set_color, clear_color);
|
||||
MAKE_PROPERTY2(border_color, has_border_color, get_border_color,
|
||||
set_border_color, clear_border_color);
|
||||
MAKE_PROPERTY2(uv_name, has_uv_name, get_uv_name,
|
||||
set_uv_name, clear_uv_name);
|
||||
MAKE_PROPERTY2(rgb_scale, has_rgb_scale, get_rgb_scale,
|
||||
set_rgb_scale, clear_rgb_scale);
|
||||
MAKE_PROPERTY2(alpha_scale, has_alpha_scale, get_alpha_scale,
|
||||
set_alpha_scale, clear_alpha_scale);
|
||||
MAKE_PROPERTY2(alpha_filename, has_alpha_filename, get_alpha_filename,
|
||||
set_alpha_filename, clear_alpha_filename);
|
||||
MAKE_PROPERTY(alpha_fullpath, get_alpha_fullpath, set_alpha_fullpath);
|
||||
MAKE_PROPERTY2(alpha_file_channel, has_alpha_file_channel, get_alpha_file_channel,
|
||||
set_alpha_file_channel, clear_alpha_file_channel);
|
||||
MAKE_PROPERTY(multiview, get_multiview, set_multiview);
|
||||
MAKE_PROPERTY2(num_views, has_num_views, get_num_views,
|
||||
set_num_views, clear_num_views);
|
||||
MAKE_PROPERTY(read_mipmaps, get_read_mipmaps, set_read_mipmaps);
|
||||
MAKE_PROPERTY2(min_lod, has_min_lod, get_min_lod,
|
||||
set_min_lod, clear_min_lod);
|
||||
MAKE_PROPERTY2(max_lod, has_max_lod, get_max_lod,
|
||||
set_max_lod, clear_max_lod);
|
||||
MAKE_PROPERTY2(lod_bias, has_lod_bias, get_lod_bias,
|
||||
set_lod_bias, clear_lod_bias);
|
||||
|
||||
MAKE_PROPERTY(multitexture_sort, get_multitexture_sort);
|
||||
|
||||
public:
|
||||
virtual EggTransform *as_transform();
|
||||
|
||||
|
|
|
|||
|
|
@ -78,6 +78,13 @@ PUBLISHED:
|
|||
BamReader *get_reader();
|
||||
BamWriter *get_writer();
|
||||
|
||||
PUBLISHED:
|
||||
MAKE_PROPERTY(file_endian, get_file_endian);
|
||||
MAKE_PROPERTY(file_stdfloat_double, get_file_stdfloat_double);
|
||||
|
||||
MAKE_PROPERTY(reader, get_reader);
|
||||
MAKE_PROPERTY(writer, get_writer);
|
||||
|
||||
private:
|
||||
bool continue_open_read(const string &bam_filename, bool report_errors);
|
||||
bool continue_open_write(const string &bam_filename, bool report_errors);
|
||||
|
|
|
|||
|
|
@ -233,12 +233,15 @@ PUBLISHED:
|
|||
INLINE static DrawMask get_all_camera_mask();
|
||||
INLINE bool is_overall_hidden() const;
|
||||
INLINE void set_overall_hidden(bool overall_hidden);
|
||||
MAKE_PROPERTY(overall_hidden, is_overall_hidden, set_overall_hidden);
|
||||
|
||||
void adjust_draw_mask(DrawMask show_mask,
|
||||
DrawMask hide_mask,
|
||||
DrawMask clear_mask);
|
||||
INLINE DrawMask get_draw_control_mask() const;
|
||||
INLINE DrawMask get_draw_show_mask() const;
|
||||
MAKE_PROPERTY(draw_control_mask, get_draw_control_mask);
|
||||
MAKE_PROPERTY(draw_show_mask, get_draw_show_mask);
|
||||
|
||||
DrawMask get_net_draw_control_mask() const;
|
||||
DrawMask get_net_draw_show_mask() const;
|
||||
|
|
@ -246,6 +249,8 @@ PUBLISHED:
|
|||
void set_into_collide_mask(CollideMask mask);
|
||||
INLINE CollideMask get_into_collide_mask() const;
|
||||
virtual CollideMask get_legal_collide_mask() const;
|
||||
MAKE_PROPERTY(into_collide_mask, get_into_collide_mask, set_into_collide_mask);
|
||||
MAKE_PROPERTY(legal_collide_mask, get_legal_collide_mask);
|
||||
|
||||
CollideMask get_net_collide_mask(Thread *current_thread = Thread::get_current_thread()) const;
|
||||
CPT(RenderAttrib) get_off_clip_planes(Thread *current_thread = Thread::get_current_thread()) const;
|
||||
|
|
@ -273,6 +278,7 @@ PUBLISHED:
|
|||
// way the user thinks about nodes and bounding volumes.
|
||||
void set_bounds_type(BoundingVolume::BoundsType bounds_type);
|
||||
BoundingVolume::BoundsType get_bounds_type() const;
|
||||
MAKE_PROPERTY(bounds_type, get_bounds_type);
|
||||
|
||||
void set_bounds(const BoundingVolume *volume);
|
||||
void set_bound(const BoundingVolume *volume);
|
||||
|
|
@ -282,13 +288,18 @@ PUBLISHED:
|
|||
int get_nested_vertices(Thread *current_thread = Thread::get_current_thread()) const;
|
||||
INLINE CPT(BoundingVolume) get_internal_bounds(Thread *current_thread = Thread::get_current_thread()) const;
|
||||
INLINE int get_internal_vertices(Thread *current_thread = Thread::get_current_thread()) const;
|
||||
MAKE_PROPERTY(nested_vertices, get_nested_vertices);
|
||||
MAKE_PROPERTY(internal_bounds, get_internal_bounds);
|
||||
MAKE_PROPERTY(internal_vertices, get_internal_vertices);
|
||||
|
||||
void mark_bounds_stale(Thread *current_thread = Thread::get_current_thread()) const;
|
||||
void mark_internal_bounds_stale(Thread *current_thread = Thread::get_current_thread());
|
||||
INLINE bool is_bounds_stale() const;
|
||||
MAKE_PROPERTY(bounds_stale, is_bounds_stale);
|
||||
|
||||
INLINE void set_final(bool flag);
|
||||
INLINE bool is_final(Thread *current_thread = Thread::get_current_thread()) const;
|
||||
MAKE_PROPERTY(final, is_final, set_final);
|
||||
|
||||
virtual bool is_geom_node() const;
|
||||
virtual bool is_lod_node() const;
|
||||
|
|
|
|||
|
|
@ -61,6 +61,10 @@ public:
|
|||
|
||||
void output(ostream &out) const;
|
||||
|
||||
PUBLISHED:
|
||||
MAKE_PROPERTY(valid, is_valid);
|
||||
MAKE_PROPERTY(node_path, get_node_path);
|
||||
|
||||
private:
|
||||
PT(NodePathComponent) r_get_node_path() const;
|
||||
|
||||
|
|
|
|||
|
|
@ -26,6 +26,8 @@ extern EXPCL_PANDA_PNMIMAGE const unsigned char to_srgb8_table[256];
|
|||
extern EXPCL_PANDA_PNMIMAGE const unsigned char to_linear_uchar_table[256];
|
||||
extern EXPCL_PANDA_PNMIMAGE const float to_linear_float_table[256];
|
||||
|
||||
BEGIN_PUBLISH
|
||||
|
||||
EXPCL_PANDA_PNMIMAGE INLINE float decode_sRGB_float(unsigned char val);
|
||||
EXPCL_PANDA_PNMIMAGE INLINE float decode_sRGB_float(float val);
|
||||
EXPCL_PANDA_PNMIMAGE INLINE unsigned char decode_sRGB_uchar(unsigned char val);
|
||||
|
|
@ -36,6 +38,8 @@ EXPCL_PANDA_PNMIMAGE INLINE float encode_sRGB_float(float val);
|
|||
EXPCL_PANDA_PNMIMAGE INLINE unsigned char encode_sRGB_uchar(unsigned char val);
|
||||
EXPCL_PANDA_PNMIMAGE INLINE unsigned char encode_sRGB_uchar(float val);
|
||||
|
||||
END_PUBLISH
|
||||
|
||||
// These functions convert more than one component in one go,
|
||||
// which can be faster due to vectorization.
|
||||
EXPCL_PANDA_PNMIMAGE INLINE void encode_sRGB_uchar(const LColorf &from,
|
||||
|
|
|
|||
|
|
@ -68,6 +68,7 @@ PUBLISHED:
|
|||
INLINE UpdateSeq operator ++ (int);
|
||||
|
||||
INLINE AtomicAdjust::Integer get_seq() const;
|
||||
MAKE_PROPERTY(seq, get_seq);
|
||||
|
||||
INLINE void output(ostream &out) const;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue